From: <chr...@us...> - 2008-01-20 15:04:20
|
Revision: 1286 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1286&view=rev Author: chreekar Date: 2008-01-20 07:03:58 -0800 (Sun, 20 Jan 2008) Log Message: ----------- included Project Mayhem 3 skin file, use of wildcard with argument passing, use delete key in setup Modified Paths: -------------- trunk/plugins/MyEmulators/Readme.txt trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs trunk/plugins/MyEmulators/myEmulators/setupForm.cs trunk/plugins/MyEmulators/output.rar Added Paths: ----------- trunk/plugins/MyEmulators/skin/Project Mayhem 3/ trunk/plugins/MyEmulators/skin/Project Mayhem 3/myEmulators.xml Modified: trunk/plugins/MyEmulators/Readme.txt =================================================================== --- trunk/plugins/MyEmulators/Readme.txt 2008-01-20 13:38:06 UTC (rev 1285) +++ trunk/plugins/MyEmulators/Readme.txt 2008-01-20 15:03:58 UTC (rev 1286) @@ -6,6 +6,11 @@ CHANGELOG ------------------------------------------- +v1.8 +-A couple more skin files are now included +-More flexible passing of arguments, see USAGE +-Use delete key in Emulator list in setup + v1.7 -Built for MP 0.2.3.0 -Fixed bugs with paths to thumbs and data- @@ -112,6 +117,21 @@ the games shown in MP all well as other fields, such as a grade and description. +To pass argments to the emulator, just add +them in the Path to Emulator field, ie +C:\n64.exe -switch1. To have switches after +the executable, add the widcard %ROM% where +the path is to be inserted, ie +C:\n64.exe -switch1 %ROM% -switch2. When a +game is launched from the list, the wildcard +will be changed to the correct game file. +If no %ROM% is defined, the path to the game +file will be inserted at the end. + +Make certain to disable Mediaportal always +on top in the configuration to be able to +launch the games correctly. + IMAGES -------------------------------------------- Each emulator can have its own image. To show Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2008-01-20 13:38:06 UTC (rev 1285) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2008-01-20 15:03:58 UTC (rev 1286) @@ -288,17 +288,26 @@ //Takes away the switch from path if it exists if (!path.EndsWith(".exe") && !path.EndsWith(".bat")) { - args += path.Substring(path.LastIndexOf('.') + 5) + " "; + args += path.Substring(path.LastIndexOf('.') + 5); path = path.Remove(path.LastIndexOf('.') + 4); } String rompath = selected.getPath(); + //To allow the use of arguments after the ROM file, use wildcard DB.romPrefix + if (!args.Contains(DB.romPrefix)) + { + if (args.Length > 0) + { + args += " "; + } + args += DB.romPrefix; + } if (selected.getParentItem().isQuotesUsed()) { - args += "\"" + rompath + "\""; + args = args.Replace(DB.romPrefix, "\"" + rompath + "\""); } else { - args += rompath; + args = args.Replace(DB.romPrefix, rompath); } Log.Info("My Emulators - Executing: {0}", path + " " + args); Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-01-20 13:38:06 UTC (rev 1285) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-01-20 15:03:58 UTC (rev 1286) @@ -13,6 +13,8 @@ { class DB { + public static String romPrefix = "%ROM%"; + private static String dbName = "myEmulators.db3"; private static String tableROMName = "myEmulatorsROMs"; private static String tableEmuName = "myEmulatorsEmus"; @@ -34,7 +36,7 @@ } //TODO: REMEMBER to put the correct version number! - private static int current_version = 160; + private static int current_version = 180; public static void launch() { Modified: trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2008-01-20 13:38:06 UTC (rev 1285) +++ trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2008-01-20 15:03:58 UTC (rev 1286) @@ -31,5 +31,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.1.7.0")] -[assembly: AssemblyFileVersion("0.1.7.0")] +[assembly: AssemblyVersion("0.1.8.0")] +[assembly: AssemblyFileVersion("0.1.8.0")] Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs 2008-01-20 13:38:06 UTC (rev 1285) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs 2008-01-20 15:03:58 UTC (rev 1286) @@ -141,7 +141,7 @@ listBox1.Size = new System.Drawing.Size(225, 147); listBox1.TabIndex = 29; listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick_1); - listBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.listBox1_KeyPress); + listBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(listBox1_KeyDown); // // label1 // Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2008-01-20 13:38:06 UTC (rev 1285) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2008-01-20 15:03:58 UTC (rev 1286) @@ -303,12 +303,12 @@ dataGridView1.Height = this.Height - 102; } - private void listBox1_KeyPress(object sender, KeyPressEventArgs e) + private void listBox1_KeyDown(object sender, KeyEventArgs e) { - //TODO: catch delete key - //{ - // remove_Click_1(sender, EventArgs.Empty); - //} + if (e.KeyCode == Keys.Delete) + { + remove_Click_1(sender, EventArgs.Empty); + } } private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) Added: trunk/plugins/MyEmulators/skin/Project Mayhem 3/myEmulators.xml =================================================================== --- trunk/plugins/MyEmulators/skin/Project Mayhem 3/myEmulators.xml (rev 0) +++ trunk/plugins/MyEmulators/skin/Project Mayhem 3/myEmulators.xml 2008-01-20 15:03:58 UTC (rev 1286) @@ -0,0 +1,258 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <id>5001</id> + <defaultcontrol>50</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <define>#header.label:</define> + <define>#header.hover:hover_myEmulators.png</define> + <define>#header.image:myEmulators_logo.png</define> + <controls> + <import>common.window.xml</import> + <control> + <description>background image</description> + <type>image</type> + <id>1</id> + <width>720</width> + <height>576</height> + <texture>background3.png</texture> + </control> + + <control> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <type>label</type> + <id>9</id> + <posX>250</posX> + <posY>70</posY> + <font>font16</font> + <align>right</align> + <textcolor>White</textcolor> + <animation effect="fade" time="200">WindowOpen</animation> + <animation effect="fade" time="200">WindowClose</animation> + </control> + + <!-- SIDE BUTTONS --> + <control> + <type>group</type> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="slide" time="250" start="-300,0">WindowOpen</animation> + <animation effect="slide" time="500" end="0,-300">WindowClose</animation> + <description>group element</description> + <posX>5</posX> + <posY>125</posY> + <layout>StackLayout</layout> + <control> + <description>View-As button</description> + <type>button</type> + <id>10</id> + <label>100</label> + <onleft>10</onleft> + <onright>50</onright> + <onup>10</onup> + <ondown>11</ondown> + </control> + <control> + <type>image</type> + <description>Divider image</description> + <id>999</id> + <texture>hbar1.png</texture> + <keepaspectratio>yes</keepaspectratio> + </control> + <control> + <type>button</type> + <id>11</id> + <label>Most played</label> + <onleft>11</onleft> + <onright>50</onright> + <onup>10</onup> + <ondown>12</ondown> + </control> + <control> + <type>button</type> + <id>12</id> + <label>Recently played</label> + <onleft>12</onleft> + <onright>50</onright> + <onup>11</onup> + <ondown>13</ondown> + </control> + <control> + <type>button</type> + <id>13</id> + <label>Top graded</label> + <onleft>13</onleft> + <onright>50</onright> + <onup>12</onup> + <ondown>13</ondown> + </control> + </control> + <!-- LIST OF EMULATOR AND ROMS --> + <control> + <type>group</type> + <description>group element</description> + <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> + <animation effect="slide" time="400" end="800,0">WindowClose</animation> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <control> + <description>composite control consisting of a list control and a thumbnail panel</description> + <type>facadeview</type> + <id>50</id> + <control> + <description>listcontrol</description> + <type>listcontrol</type> + <id>50</id> + <scrollOffset>2</scrollOffset> + </control> + <control> + <description>Thumbnail Panel</description> + <type>thumbnailpanel</type> + <id>50</id> + <scrollOffset>1</scrollOffset> + <onleft>10</onleft> + <onright>2</onright> + </control> + <control> + <description>Filmstrip view</description> + <type>filmstrip</type> + <id>50</id> + <onleft>10</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>2</ondown> + </control> + <control> + <description>playlist listcontrol</description> + <type>playlistcontrol</type> + <id>50</id> + <scrollOffset>1</scrollOffset> + </control> + </control> + </control> + <!-- DESCRIPTION OF GAME --> + <control> + <animation effect="slide" time="400" end="-300,0">WindowClose</animation> + <animation effect="fade" time="500">WindowClose</animation> + <type>textboxscrollup</type> + <description>desscription</description> + <id>40</id> + <posX>25</posX> + <posY>300</posY> + <width>170</width> + <height>145</height> + <font>font11</font> + </control> + <!-- ALL THE STARS --> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 1</description> + <id>101</id> + <posX>411</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 2</description> + <id>102</id> + <posX>426</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 3</description> + <id>103</id> + <posX>441</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 4</description> + <id>104</id> + <posX>456</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 5</description> + <id>105</id> + <posX>471</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 6</description> + <id>106</id> + <posX>486</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 7</description> + <id>107</id> + <posX>501</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 8</description> + <id>108</id> + <posX>516</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 9</description> + <id>109</id> + <posX>531</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 10</description> + <id>110</id> + <posX>546</posX> + <posY>525</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + </controls> +</window> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |