From: <chr...@us...> - 2007-05-06 18:24:40
|
Revision: 382 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=382&view=rev Author: chreekar Date: 2007-05-06 11:24:35 -0700 (Sun, 06 May 2007) Log Message: ----------- Support for translation strings Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs trunk/plugins/MyEmulators/myEmulators/setupForm.cs Added Paths: ----------- trunk/plugins/MyEmulators/Readme.txt Added: trunk/plugins/MyEmulators/Readme.txt =================================================================== --- trunk/plugins/MyEmulators/Readme.txt (rev 0) +++ trunk/plugins/MyEmulators/Readme.txt 2007-05-06 18:24:35 UTC (rev 382) @@ -0,0 +1,127 @@ +My Emulators plugin for Media Portal + + +Readme +=========================================== + +CHANGELOG +------------------------------------------- +v1.6 +-Added support for translations, see below + +v1.5.1 +-Fixed compability issues with MP + +v1.5 +-A ROM Database accessed from the + configuration that lets the user: + -Change the name of each game + -Write a description + -Set a grade that is displayed in the + plugin (can also be set from the + context menu inside MP) + -Change and view a play count and the + latest date the game has been launched. +-Buttons to sort the ROMs according to grade, + number of times played or the latest date + launched. +-Thumbnail support! After the first run, + directories will be created in the thumbs- + directory. Name the image exactly the same + as the emulator or game to make it visible. +-An option to change the label of the plugin +-Switched to rar file format for the + distribution file, and included source code. + Most of the comments are in Swedish though. +-Loads of GUI improvements to the setup... +-...and a much better looking skin... +-...with animations and different views. + +v1.0.2 +-Option to not use quotes on ROM paths, + which should solve some compability + issues +-All settings are now stored in a + database (which means the plugin + must be reconfigured) +-Tabbed configuration layout +-New header logo + +v1.0.1 +-Added an option to not close MediaPortal + after launching a game + +PURPOSE +------------------------------------------- +This plugin lets the user in a quick and +easy way list and launch the ROMs on the +harddrive in an installed emulator. + +It also features a database function that +can hold information about how many times +a game has been played, a grade and more. + +REQUIREMENTS +------------------------------------------- +The plugin has been build from and tested +to work with MediaPortal version 0.2.2.0, +but it may work just fine for older +versions too (if the animations in the skin +file is commented). No guarantee though. + +INSTALLATION +------------------------------------------- +Extract all the files in the archive to +the folder where Mediaportal.exe is located. +Remember to keep the directory structure. + +(Alternatively, you can extract only the +neccesary files: +-myEmulators.dll to plugins\windows folder, +-myEmulators.xml to current skin folder. +-myEmulators_logo.png to the Media folder +in current skin folder +-hover_myEmulators.png to the same folder). + +USAGE +-------------------------------------------- +Before first use, enter Mediaportal configur- +ation and activate and setup the plugin. In +the setup, you should enter a path to the +emulator that is to load the ROMs, a folder +where all the ROMs are stored, and a name +and filter for which files will be shown. +When you run the plugin in Media Portal you +will be presented with a list of the ROMs. +By pressing a ROM, that one is loaded in +the correct emulator. + +Whenever something is changed in the setup, +a star in the title bar appears. After pres- +sing Apply, the ROM database will be updated. +This tab makes it easy to edit the name of +the games shown in MP all well as other +fields, such as a grade and description. + +TRANSLATION +-------------------------------------------- +To translate myEmulators into another lang- +uage, create a file named myEmulators.txt +in the appropriate dir in Mediaportal\ +language. The file MUST contain the fol- +lowing lines: + +Line 1 - View: List +Line 2 - View: Large Icons +Line 3 - View: Icons +Line 4 - Most played +Line 5 - Recently played +Line 6 - Top graded + +Note that the setup is not translated, only +the buttons in the main program. + +============================================ + +Christer Carlsund +www.carlsund.se, chr...@ho... \ No newline at end of file Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-06 15:08:52 UTC (rev 381) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-06 18:24:35 UTC (rev 382) @@ -18,6 +18,8 @@ private int indexOfEmulator; //To compare with the current marked private int previouslySelectedIndex; + //Translation strings + private String[] translation = { "View: List", "View: Large Icons", "View: Icons", "Most played", "Recently played", "Top graded" }; //The emulator/rom list control [SkinControlAttribute(50)] protected GUIFacadeControl lstEmulators = null; //The buttons in the menu to the left @@ -128,6 +130,22 @@ } _autoHideTopbar = true; _autoHideTopbarType = AutoHideTopBar.Yes; + //Loads the translation strings + try + { + if (Options.getStringOption("language") != "English") + { + StreamReader translationFile = new StreamReader("language\\" + Options.getStringOption("language") + "\\myEmulators.txt"); + for (int i = 0; i < 6; i++) + { + String line = translationFile.ReadLine(); + if (line == null) { break; } + translation[i] = line; + } + translationFile.Close(); + } + } + catch (Exception) { } //Loads the skin return Load(GUIGraphicsContext.Skin+@"\myEmulators.xml"); } @@ -141,12 +159,15 @@ displayStars(0); text_description.Label = String.Empty; + button_mostPlayed.Label = translation[3]; + button_recentlyPlayed.Label = translation[4]; + button_topGraded.Label = translation[5]; switch (Options.getIntOption("default_view")) { - case (0): { lstEmulators.View = GUIFacadeControl.ViewMode.LargeIcons; button_viewAs.Label = "View: Large Icons"; break; } - case (1): { lstEmulators.View = GUIFacadeControl.ViewMode.SmallIcons; button_viewAs.Label = "View: Icons"; break; } - case (2): { lstEmulators.View = GUIFacadeControl.ViewMode.List; button_viewAs.Label = "View: List"; break; } + case (0): { lstEmulators.View = GUIFacadeControl.ViewMode.LargeIcons; button_viewAs.Label = translation[1]; break; } + case (1): { lstEmulators.View = GUIFacadeControl.ViewMode.SmallIcons; button_viewAs.Label = translation[2]; break; } + case (2): { lstEmulators.View = GUIFacadeControl.ViewMode.List; button_viewAs.Label = translation[0]; break; } } if (lstEmulators == null) { @@ -324,9 +345,9 @@ indexOfEmulator = ((GUIFacadeControl)control).SelectedListItemIndex; switch (emulators[indexOfEmulator].View) { - case (0): { lstEmulators.View = GUIFacadeControl.ViewMode.LargeIcons; button_viewAs.Label = "View: Large Icons"; break; } - case (1): { lstEmulators.View = GUIFacadeControl.ViewMode.SmallIcons; button_viewAs.Label = "View: Icons"; break; } - case (2): { lstEmulators.View = GUIFacadeControl.ViewMode.List; button_viewAs.Label = "View: List"; break; } + case (0): { lstEmulators.View = GUIFacadeControl.ViewMode.LargeIcons; button_viewAs.Label = translation[1]; break; } + case (1): { lstEmulators.View = GUIFacadeControl.ViewMode.SmallIcons; button_viewAs.Label = translation[2]; break; } + case (2): { lstEmulators.View = GUIFacadeControl.ViewMode.List; button_viewAs.Label = translation[0]; break; } } isInFolder = true; //Fills the list with files from the directory @@ -340,7 +361,7 @@ { case (GUIFacadeControl.ViewMode.LargeIcons): { - button_viewAs.Label = "View: Icons"; + button_viewAs.Label = translation[2]; lstEmulators.View = GUIFacadeControl.ViewMode.SmallIcons; if (!isInFolder) { @@ -357,7 +378,7 @@ } case (GUIFacadeControl.ViewMode.SmallIcons): { - button_viewAs.Label = "View: List"; + button_viewAs.Label = translation[0]; lstEmulators.View = GUIFacadeControl.ViewMode.List; if (!isInFolder) { @@ -374,7 +395,7 @@ } case (GUIFacadeControl.ViewMode.List): { - button_viewAs.Label = "View: Large Icons"; + button_viewAs.Label = translation[1]; lstEmulators.View = GUIFacadeControl.ViewMode.LargeIcons; if (!isInFolder) { @@ -421,7 +442,7 @@ emulators[i].readROMs(); } } - button_viewAs.Label = "View: List"; + button_viewAs.Label = translation[0]; lstEmulators.View = GUIFacadeControl.ViewMode.List; } else Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-05-06 15:08:52 UTC (rev 381) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-05-06 18:24:35 UTC (rev 382) @@ -34,7 +34,7 @@ } //TODO: REMEMBER to put the correct version number! - private static int current_version = 151; + private static int current_version = 160; public static void launch() { @@ -66,6 +66,7 @@ Options.addBoolOption("setup_maximized", "False"); Options.addBoolOption("display_stars", "True"); Options.addBoolOption("display_desc", "True"); + Options.addStringOption("language", "English"); //Updates to correct version of DB if (Options.getIntOption("version") <= 102) Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs 2007-05-06 15:08:52 UTC (rev 381) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs 2007-05-06 18:24:35 UTC (rev 382) @@ -48,13 +48,15 @@ this.Dateplayed = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ROM_DB_List_Description = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.tabPage3 = new System.Windows.Forms.TabPage(); + this.display_desc = new System.Windows.Forms.CheckBox(); + this.display_stars = new System.Windows.Forms.CheckBox(); this.shown_name = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.shutdownonload = new System.Windows.Forms.CheckBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.apply = new System.Windows.Forms.Button(); - this.display_stars = new System.Windows.Forms.CheckBox(); - this.display_desc = new System.Windows.Forms.CheckBox(); + this.label3 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -242,6 +244,8 @@ // // tabPage3 // + this.tabPage3.Controls.Add(this.comboBox1); + this.tabPage3.Controls.Add(this.label3); this.tabPage3.Controls.Add(this.display_desc); this.tabPage3.Controls.Add(this.display_stars); this.tabPage3.Controls.Add(this.shown_name); @@ -255,6 +259,26 @@ this.tabPage3.Text = "Options"; this.tabPage3.UseVisualStyleBackColor = true; // + // display_desc + // + this.display_desc.AutoSize = true; + this.display_desc.Location = new System.Drawing.Point(8, 89); + this.display_desc.Name = "display_desc"; + this.display_desc.Size = new System.Drawing.Size(212, 17); + this.display_desc.TabIndex = 7; + this.display_desc.Text = "Display ROM description in MediaPortal"; + this.display_desc.UseVisualStyleBackColor = true; + // + // display_stars + // + this.display_stars.AutoSize = true; + this.display_stars.Location = new System.Drawing.Point(8, 62); + this.display_stars.Name = "display_stars"; + this.display_stars.Size = new System.Drawing.Size(188, 17); + this.display_stars.TabIndex = 6; + this.display_stars.Text = "Display ROM grade in MediaPortal"; + this.display_stars.UseVisualStyleBackColor = true; + // // shown_name // this.shown_name.Location = new System.Drawing.Point(156, 32); @@ -304,25 +328,24 @@ this.apply.UseVisualStyleBackColor = true; this.apply.Click += new System.EventHandler(this.apply_Click); // - // display_stars + // label3 // - this.display_stars.AutoSize = true; - this.display_stars.Location = new System.Drawing.Point(8, 62); - this.display_stars.Name = "display_stars"; - this.display_stars.Size = new System.Drawing.Size(188, 17); - this.display_stars.TabIndex = 6; - this.display_stars.Text = "Display ROM grade in MediaPortal"; - this.display_stars.UseVisualStyleBackColor = true; + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(8, 116); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(58, 13); + this.label3.TabIndex = 8; + this.label3.Text = "Language:"; // - // display_desc + // comboBox1 // - this.display_desc.AutoSize = true; - this.display_desc.Location = new System.Drawing.Point(8, 89); - this.display_desc.Name = "display_desc"; - this.display_desc.Size = new System.Drawing.Size(212, 17); - this.display_desc.TabIndex = 7; - this.display_desc.Text = "Display ROM description in MediaPortal"; - this.display_desc.UseVisualStyleBackColor = true; + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "English (default)"}); + this.comboBox1.Location = new System.Drawing.Point(72, 112); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(121, 21); + this.comboBox1.TabIndex = 9; // // setupForm // @@ -380,5 +403,7 @@ private System.Windows.Forms.CheckBox display_desc; private System.Windows.Forms.CheckBox display_stars; private static System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comboBox1; } } \ No newline at end of file Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2007-05-06 15:08:52 UTC (rev 381) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2007-05-06 18:24:35 UTC (rev 382) @@ -5,6 +5,7 @@ using System.Drawing; using System.Text; using System.Windows.Forms; +using System.IO; namespace myEmulators { @@ -41,6 +42,15 @@ Options.updateStringOption("shown_name", shown_name.Text); Options.updateBoolOption("display_stars", display_stars.Checked); Options.updateBoolOption("display_desc", display_desc.Checked); + //Save language + if (comboBox1.SelectedIndex != 0) + { + Options.updateStringOption("language", comboBox1.SelectedItem.ToString()); + } + else + { + Options.updateStringOption("language", "English"); + } DB.saveOptions(); //Save emulators @@ -147,6 +157,35 @@ shown_name.Text = Options.getStringOption("shown_name"); display_stars.Checked = Options.getBoolOption("display_stars"); display_desc.Checked = Options.getBoolOption("display_desc"); + //Load language + try + { + String[] langDirs = Directory.GetDirectories("language"); + for (int i = 0; i < langDirs.Length; i++) + { + String[] files = Directory.GetFiles(langDirs[i]); + for (int a = 0; a < files.Length; a++) + { + if (files[a].Substring(files[a].LastIndexOf("\\")+1) == "myEmulators.txt") + { + comboBox1.Items.Add(langDirs[i].Substring(langDirs[i].LastIndexOf("\\")+1)); + } + } + } + } + catch (Exception) { } + comboBox1.SelectedIndex = 0; //Default-English + if (comboBox1.Items.Count > 1 && Options.getStringOption("language") != "English") + { + for (int i = 1; i < comboBox1.Items.Count; i++) //Skip first, since it is English + { + if (comboBox1.Items[i].ToString() == Options.getStringOption("language")) + { + comboBox1.SelectedIndex = i; + break; + } + } + } //Load remembered window setting if (Options.getBoolOption("setup_maximized") == true) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-08 18:12:14
|
Revision: 389 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=389&view=rev Author: chreekar Date: 2007-05-08 11:12:12 -0700 (Tue, 08 May 2007) Log Message: ----------- Uploaded skin files Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/Class1.cs Added Paths: ----------- trunk/plugins/MyEmulators/skin/ trunk/plugins/MyEmulators/skin/BlueTwo/ trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml trunk/plugins/MyEmulators/skin/BlueTwo wide/ trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-08 14:45:27 UTC (rev 388) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-08 18:12:12 UTC (rev 389) @@ -201,7 +201,7 @@ public override void OnAction(Action action) { base.OnAction(action); - if (lstEmulators != null) + if (lstEmulators != null && lstEmulators.Count > 0) { if ((isInFolder || lstEmulators[0].Label == "..") && (lstEmulators.SelectedListItemIndex != previouslySelectedIndex)) { Added: trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml =================================================================== --- trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml (rev 0) +++ trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml 2007-05-08 18:12:12 UTC (rev 389) @@ -0,0 +1,241 @@ +<!-- BlueTwo skin for My Emulators --> + +<window> + <id>5001</id> + <defaultcontrol>50</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <define>#header.label:My Emulators</define> + <define>#header.hover:hover_myEmulators.png</define> + <define>#header.image:myEmulators_logo.png</define> + <controls> + <import>common.window.xml</import> + + <!-- 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>60</posX> + <posY>97</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>75</posX> + <posY>260</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>511</posX> + <posY>43</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>526</posX> + <posY>43</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>541</posX> + <posY>43</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>556</posX> + <posY>43</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>571</posX> + <posY>43</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>586</posX> + <posY>43</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>601</posX> + <posY>43</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>616</posX> + <posY>43</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>631</posX> + <posY>43</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>646</posX> + <posY>43</posY> + <width>14</width> + <height>14</height> + <texture></texture> + </control> + + </controls> +</window> \ No newline at end of file Added: trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml =================================================================== --- trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml (rev 0) +++ trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml 2007-05-08 18:12:12 UTC (rev 389) @@ -0,0 +1,241 @@ +<!-- BlueTwo wide skin for My Emulators --> + +<window> + <id>5001</id> + <defaultcontrol>50</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <define>#header.label:My Emulators</define> + <define>#header.hover:hover_myEmulators.png</define> + <define>#header.image:myEmulators_logo.png</define> + <controls> + <import>common.window.xml</import> + + <!-- 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>120</posX> + <posY>130</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>140</posX> + <posY>343</posY> + <width>265</width> + <height>170</height> + <font>font12</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>1051</posX> + <posY>55</posY> + <width>20</width> + <height>20</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 2</description> + <id>102</id> + <posX>1072</posX> + <posY>55</posY> + <width>20</width> + <height>20</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 3</description> + <id>103</id> + <posX>1093</posX> + <posY>55</posY> + <width>20</width> + <height>20</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 4</description> + <id>104</id> + <posX>1114</posX> + <posY>55</posY> + <width>20</width> + <height>20</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 5</description> + <id>105</id> + <posX>1135</posX> + <posY>55</posY> + <width>20</width> + <height>20</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 6</description> + <id>106</id> + <posX>1156</posX> + <posY>55</posY> + <width>20</width> + <height>20</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 7</description> + <id>107</id> + <posX>1177</posX> + <posY>55</posY> + <width>20</width> + <height>20</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 8</description> + <id>108</id> + <posX>1198</posX> + <posY>55</posY> + <width>20</width> + <height>20</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 9</description> + <id>109</id> + <posX>1219</posX> + <posY>55</posY> + <width>20</width> + <height>20</height> + <texture></texture> + </control> + <control> + <animation effect="fade" time="400">WindowClose</animation> + <type>image</type> + <description>star image 10</description> + <id>110</id> + <posX>1240</posX> + <posY>55</posY> + <width>20</width> + <height>20</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. |
From: <chr...@us...> - 2007-05-08 18:17:20
|
Revision: 390 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=390&view=rev Author: chreekar Date: 2007-05-08 11:17:18 -0700 (Tue, 08 May 2007) Log Message: ----------- The file output.rar will always contain the latest build Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs Added Paths: ----------- trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2007-05-08 18:12:12 UTC (rev 389) +++ trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2007-05-08 18:17:18 UTC (rev 390) @@ -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.5.0")] -[assembly: AssemblyFileVersion("0.1.5.0")] +[assembly: AssemblyVersion("0.1.6.0")] +[assembly: AssemblyFileVersion("0.1.6.0")] Added: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyEmulators/output.rar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-08 18:40:07
|
Revision: 391 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=391&view=rev Author: chreekar Date: 2007-05-08 11:40:02 -0700 (Tue, 08 May 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-08 18:17:18 UTC (rev 390) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-08 18:40:02 UTC (rev 391) @@ -136,7 +136,7 @@ if (Options.getStringOption("language") != "English") { StreamReader translationFile = new StreamReader("language\\" + Options.getStringOption("language") + "\\myEmulators.txt"); - for (int i = 0; i < 6; i++) + for (int i = 0; i < translation.Length; i++) { String line = translationFile.ReadLine(); if (line == null) { break; } Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-08 19:20:58
|
Revision: 392 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=392&view=rev Author: chreekar Date: 2007-05-08 12:20:17 -0700 (Tue, 08 May 2007) Log Message: ----------- Have I solved the Alt+F4 issue? Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-08 18:40:02 UTC (rev 391) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-08 19:20:17 UTC (rev 392) @@ -320,8 +320,8 @@ System.Diagnostics.Process spelproc = new System.Diagnostics.Process(); spelproc.StartInfo = new System.Diagnostics.ProcessStartInfo(path, args); spelproc.Start(); - spelproc.WaitForExit(); - OnPageDestroy(GetWindowId()); + //spelproc.WaitForExit(); + //OnPageDestroy(GetWindowId()); } else { Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-20 20:00:24
|
Revision: 411 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=411&view=rev Author: chreekar Date: 2007-05-20 13:00:20 -0700 (Sun, 20 May 2007) Log Message: ----------- All strings in main GUI is now translateable Modified Paths: -------------- trunk/plugins/MyEmulators/Readme.txt trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/Readme.txt =================================================================== --- trunk/plugins/MyEmulators/Readme.txt 2007-05-19 16:16:01 UTC (rev 410) +++ trunk/plugins/MyEmulators/Readme.txt 2007-05-20 20:00:20 UTC (rev 411) @@ -7,6 +7,8 @@ CHANGELOG ------------------------------------------- v1.6 +-Solved problem when returning from + a launched emulator -Added support for translations, see below v1.5.1 @@ -117,6 +119,9 @@ Line 4 - Most played Line 5 - Recently played Line 6 - Top graded +Line 7 - Select grade for this game +Line 8 - Set grade to +Line 9 - No grade Note that the setup is not translated, only the buttons in the main program. Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-19 16:16:01 UTC (rev 410) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-20 20:00:20 UTC (rev 411) @@ -19,7 +19,7 @@ //To compare with the current marked private int previouslySelectedIndex; //Translation strings - private String[] translation = { "View: List", "View: Large Icons", "View: Icons", "Most played", "Recently played", "Top graded" }; + private String[] translation = { "View: List", "View: Large Icons", "View: Icons", "Most played", "Recently played", "Top graded", "Select grade for this game", "Set grade to", "No grade" }; //The emulator/rom list control [SkinControlAttribute(50)] protected GUIFacadeControl lstEmulators = null; //The buttons in the menu to the left @@ -118,6 +118,7 @@ //At start of MP public override bool Init() { + Log.Info("My Emulators - Init{0}",""); DB.launch(); emulators = new List<Emulator>(); stars = new GUIImage[10]; @@ -133,15 +134,18 @@ //Loads the translation strings try { + Log.Info("My Emulators - Language is set to {0}", Options.getStringOption("language")); if (Options.getStringOption("language") != "English") { StreamReader translationFile = new StreamReader("language\\" + Options.getStringOption("language") + "\\myEmulators.txt"); - for (int i = 0; i < translation.Length; i++) + int i = 0; + for (; i < translation.Length; i++) { String line = translationFile.ReadLine(); if (line == null) { break; } translation[i] = line; } + Log.Info("My Emulators - Found {0} translated strings", i); translationFile.Close(); } } @@ -232,18 +236,12 @@ if (dlg != null) { dlg.Reset(); - dlg.SetHeading("Select grade for this game"); - dlg.Add(new GUIListItem("Set grade to 1")); - dlg.Add(new GUIListItem("Set grade to 2")); - dlg.Add(new GUIListItem("Set grade to 3")); - dlg.Add(new GUIListItem("Set grade to 4")); - dlg.Add(new GUIListItem("Set grade to 5")); - dlg.Add(new GUIListItem("Set grade to 6")); - dlg.Add(new GUIListItem("Set grade to 7")); - dlg.Add(new GUIListItem("Set grade to 8")); - dlg.Add(new GUIListItem("Set grade to 9")); - dlg.Add(new GUIListItem("Set grade to 10")); - dlg.Add(new GUIListItem("No grade")); + dlg.SetHeading(translation[6]); + for (int i = 1; i < 11; i++) + { + dlg.Add(new GUIListItem(translation[7] + " " + i)); + } + dlg.Add(new GUIListItem(translation[8])); dlg.DoModal(GetID); if (dlg.SelectedId > 0 && dlg.SelectedId <= 10) { Modified: trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj =================================================================== --- trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2007-05-19 16:16:01 UTC (rev 410) +++ trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2007-05-20 20:00:20 UTC (rev 411) @@ -84,4 +84,8 @@ <Target Name="AfterBuild"> </Target> --> + <PropertyGroup> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> </Project> \ No newline at end of file Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-25 16:04:33
|
Revision: 442 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=442&view=rev Author: chreekar Date: 2007-05-25 09:04:28 -0700 (Fri, 25 May 2007) Log Message: ----------- Correct Encoding when reading translation strings which allows special characters Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-24 22:13:07 UTC (rev 441) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-25 16:04:28 UTC (rev 442) @@ -137,7 +137,7 @@ Log.Info("My Emulators - Language is set to {0}", Options.getStringOption("language")); if (Options.getStringOption("language") != "English") { - StreamReader translationFile = new StreamReader("language\\" + Options.getStringOption("language") + "\\myEmulators.txt"); + StreamReader translationFile = new StreamReader("language\\" + Options.getStringOption("language") + "\\myEmulators.txt", Encoding.Default); int i = 0; for (; i < translation.Length; i++) { Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-05-25 17:29:54
|
Revision: 443 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=443&view=rev Author: chreekar Date: 2007-05-25 10:29:51 -0700 (Fri, 25 May 2007) Log Message: ----------- The header label is now changed to match the string "shown name" set up in Configuration Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs trunk/plugins/MyEmulators/myEmulators/setupForm.cs trunk/plugins/MyEmulators/myEmulators/setupForm.resx trunk/plugins/MyEmulators/output.rar trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-25 16:04:28 UTC (rev 442) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-05-25 17:29:51 UTC (rev 443) @@ -20,6 +20,9 @@ private int previouslySelectedIndex; //Translation strings private String[] translation = { "View: List", "View: Large Icons", "View: Icons", "Most played", "Recently played", "Top graded", "Select grade for this game", "Set grade to", "No grade" }; + //The header label + [SkinControlAttribute(9)] protected GUILabelControl headerText = null; + //The emulator/rom list control [SkinControlAttribute(50)] protected GUIFacadeControl lstEmulators = null; //The buttons in the menu to the left @@ -162,6 +165,7 @@ stars[5] = starimage6; stars[6] = starimage7; stars[7] = starimage8; stars[8] = starimage9; stars[9] = starimage10; displayStars(0); + headerText.Label = Options.getStringOption("shown_name"); text_description.Label = String.Empty; button_mostPlayed.Label = translation[3]; button_recentlyPlayed.Label = translation[4]; Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs 2007-05-25 16:04:28 UTC (rev 442) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs 2007-05-25 17:29:51 UTC (rev 443) @@ -48,6 +48,8 @@ this.Dateplayed = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ROM_DB_List_Description = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.tabPage3 = new System.Windows.Forms.TabPage(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.label3 = new System.Windows.Forms.Label(); this.display_desc = new System.Windows.Forms.CheckBox(); this.display_stars = new System.Windows.Forms.CheckBox(); this.shown_name = new System.Windows.Forms.TextBox(); @@ -55,8 +57,6 @@ this.shutdownonload = new System.Windows.Forms.CheckBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.apply = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -259,6 +259,25 @@ this.tabPage3.Text = "Options"; this.tabPage3.UseVisualStyleBackColor = true; // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "English (default)"}); + this.comboBox1.Location = new System.Drawing.Point(72, 112); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(121, 21); + this.comboBox1.TabIndex = 9; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(8, 116); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(58, 13); + this.label3.TabIndex = 8; + this.label3.Text = "Language:"; + // // display_desc // this.display_desc.AutoSize = true; @@ -282,6 +301,7 @@ // shown_name // this.shown_name.Location = new System.Drawing.Point(156, 32); + this.shown_name.MaxLength = 30; this.shown_name.Name = "shown_name"; this.shown_name.Size = new System.Drawing.Size(195, 20); this.shown_name.TabIndex = 5; @@ -328,25 +348,6 @@ this.apply.UseVisualStyleBackColor = true; this.apply.Click += new System.EventHandler(this.apply_Click); // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(8, 116); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(58, 13); - this.label3.TabIndex = 8; - this.label3.Text = "Language:"; - // - // comboBox1 - // - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Items.AddRange(new object[] { - "English (default)"}); - this.comboBox1.Location = new System.Drawing.Point(72, 112); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(121, 21); - this.comboBox1.TabIndex = 9; - // // setupForm // this.AcceptButton = this.save; @@ -402,8 +403,8 @@ private System.Windows.Forms.DataGridViewTextBoxColumn ROM_DB_List_Description; private System.Windows.Forms.CheckBox display_desc; private System.Windows.Forms.CheckBox display_stars; - private static System.Windows.Forms.ListBox listBox1; private System.Windows.Forms.Label label3; private System.Windows.Forms.ComboBox comboBox1; + private static System.Windows.Forms.ListBox listBox1; } } \ No newline at end of file Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2007-05-25 16:04:28 UTC (rev 442) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2007-05-25 17:29:51 UTC (rev 443) @@ -39,7 +39,10 @@ { //Save options Options.updateBoolOption("shutdownonlaunch", shutdownonload.Checked); - Options.updateStringOption("shown_name", shown_name.Text); + if (shown_name.Text.Length > 0) + { + Options.updateStringOption("shown_name", shown_name.Text); + } Options.updateBoolOption("display_stars", display_stars.Checked); Options.updateBoolOption("display_desc", display_desc.Checked); //Save language Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.resx =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.resx 2007-05-25 16:04:28 UTC (rev 442) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.resx 2007-05-25 17:29:51 UTC (rev 443) @@ -117,9 +117,6 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> <metadata name="ROM_DB_List_Path.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> @@ -141,27 +138,6 @@ <metadata name="ROM_DB_List_Description.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="ROM_DB_List_Path.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="ROM_DB_List_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="ROM_DB_List_Emulator.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="ROM_DB_List_Grade.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="Count.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="Dateplayed.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="ROM_DB_List_Description.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) Modified: trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml =================================================================== --- trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml 2007-05-25 16:04:28 UTC (rev 442) +++ trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml 2007-05-25 17:29:51 UTC (rev 443) @@ -4,12 +4,27 @@ <id>5001</id> <defaultcontrol>50</defaultcontrol> <allowoverlay>yes</allowoverlay> - <define>#header.label:My Emulators</define> + <define>#header.label:</define> <define>#header.hover:hover_myEmulators.png</define> <define>#header.image:myEmulators_logo.png</define> <controls> <import>common.window.xml</import> + <!-- HEADER LABEL --> + <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> Modified: trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml =================================================================== --- trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml 2007-05-25 16:04:28 UTC (rev 442) +++ trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml 2007-05-25 17:29:51 UTC (rev 443) @@ -4,11 +4,26 @@ <id>5001</id> <defaultcontrol>50</defaultcontrol> <allowoverlay>yes</allowoverlay> - <define>#header.label:My Emulators</define> + <define>#header.label:</define> <define>#header.hover:hover_myEmulators.png</define> <define>#header.image:myEmulators_logo.png</define> <controls> <import>common.window.xml</import> + + <!-- HEADER LABEL --> + <control> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <type>label</type> + <id>9</id> + <posX>474</posX> + <posY>93</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> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-07-19 14:59:50
|
Revision: 746 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=746&view=rev Author: chreekar Date: 2007-07-19 07:59:49 -0700 (Thu, 19 Jul 2007) Log Message: ----------- ROM images must now be placed in a subfolder in thumbs\myEmulators\games named as the emulator it belongs to Modified Paths: -------------- trunk/plugins/MyEmulators/Readme.txt trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/Readme.txt =================================================================== --- trunk/plugins/MyEmulators/Readme.txt 2007-07-19 00:30:46 UTC (rev 745) +++ trunk/plugins/MyEmulators/Readme.txt 2007-07-19 14:59:49 UTC (rev 746) @@ -10,6 +10,9 @@ -Solved problem when returning from a launched emulator -Added support for translations, see below +-The ROM images must now be placed in a + subfolder of thumbs\myEmulators\games + named as the emulator it belongs to v1.5.1 -Fixed compability issues with MP @@ -105,6 +108,18 @@ the games shown in MP all well as other fields, such as a grade and description. +IMAGES +-------------------------------------------- +Each emulator can have its own image. To show +that, it must be placed in the +thumbs\myEmulators\emulators folder in the +MediaPortal folder. The image should be named +exactly the same as the shown name of the +emulator. To show images of specific games, +create a subfolder in thumbs\myEmulators\ +games named as the emulator and name the +image exactly the same as the game. + TRANSLATION -------------------------------------------- To translate myEmulators into another lang- Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-07-19 00:30:46 UTC (rev 745) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-07-19 14:59:49 UTC (rev 746) @@ -528,7 +528,7 @@ ROMItem[] list = emulators[indexOfEmulator].getROMs(); for (int i = 0; i < list.Length; i++) { - String thumbpath = Options.thumb_games + "\\" + list[i].getTitle(); + String thumbpath = Options.thumb_games + "\\" + emulators[indexOfEmulator].getName() + "\\" + list[i].getTitle(); if (File.Exists(thumbpath + ".png")) { list[i].ThumbnailImage = thumbpath + ".png"; Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-09-14 12:32:15
|
Revision: 921 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=921&view=rev Author: chreekar Date: 2007-09-14 05:32:10 -0700 (Fri, 14 Sep 2007) Log Message: ----------- Support for .bat-files as Emulator executable Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-09-14 10:17:12 UTC (rev 920) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-09-14 12:32:10 UTC (rev 921) @@ -286,7 +286,7 @@ String path = selected.getParentItem().getEmulator_path(); String args = ""; //Takes away the switch from path if it exists - if (!path.EndsWith(".exe")) + if (!path.EndsWith(".exe") && !path.EndsWith(".bat")) { args += path.Substring(path.LastIndexOf('.') + 5) + " "; path = path.Remove(path.LastIndexOf('.') + 4); Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-26 14:59:32
|
Revision: 1006 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1006&view=rev Author: chreekar Date: 2007-10-26 07:59:29 -0700 (Fri, 26 Oct 2007) Log Message: ----------- in DB.init(): create DB file through File.Create if it doesn't exist Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-10-22 13:00:37 UTC (rev 1005) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-10-26 14:59:29 UTC (rev 1006) @@ -38,7 +38,12 @@ public static void launch() { - sqlDB = new SQLiteClient("database\\" + dbName); + String path = "database\\" + dbName; + if (!File.Exists(path)) + { + File.Create(path); + } + sqlDB = new SQLiteClient(path); createDBs(); try { Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-10-30 19:57:45
|
Revision: 1016 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1016&view=rev Author: chreekar Date: 2007-10-30 12:57:43 -0700 (Tue, 30 Oct 2007) Log Message: ----------- Changed the paths of thumbs and DB file to the absolute path gotten from Assemby info instead of just using the working folder Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/myEmulators/Options.cs trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-10-29 21:28:42 UTC (rev 1015) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-10-30 19:57:43 UTC (rev 1016) @@ -38,7 +38,9 @@ public static void launch() { - String path = "database\\" + dbName; + //String path = System.Reflection.Assembly.GetExecutingAssembly().Location; + //path = new FileInfo(path).Directory.Parent.Parent.FullName + @"\database\" + dbName; + String path = Options.getMainFolder() + @"\database\" + dbName; if (!File.Exists(path)) { File.Create(path); Modified: trunk/plugins/MyEmulators/myEmulators/Options.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Options.cs 2007-10-29 21:28:42 UTC (rev 1015) +++ trunk/plugins/MyEmulators/myEmulators/Options.cs 2007-10-30 19:57:43 UTC (rev 1016) @@ -12,10 +12,10 @@ public const int STRING = 2; //Static options - public static String thumb_main = "thumbs\\myEmulators"; - public static String thumb_emulators = "thumbs\\myEmulators\\emulators"; - public static String thumb_previews = "thumbs\\myEmulators\\previews"; - public static String thumb_games = "thumbs\\myEmulators\\games"; + public static String thumb_main = getMainFolder() + @"\thumbs\myEmulators"; + public static String thumb_emulators = getMainFolder() + @"\thumbs\myEmulators\emulators"; + public static String thumb_previews = getMainFolder() + @"\thumbs\myEmulators\previews"; + public static String thumb_games = getMainFolder() + @"\thumbs\myEmulators\games"; //Dynamic options private static List<String> bool_names = new List<String>(); @@ -25,6 +25,13 @@ private static List<String> string_names = new List<String>(); private static List<String> string_values = new List<String>(); + public static String getMainFolder() + { + String path = System.Reflection.Assembly.GetExecutingAssembly().Location; + path = new System.IO.FileInfo(path).Directory.Parent.Parent.FullName; + return path; + } + // // ADD OPTION // Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-08 09:54:39
|
Revision: 1036 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1036&view=rev Author: chreekar Date: 2007-11-08 01:54:38 -0800 (Thu, 08 Nov 2007) Log Message: ----------- Removed the if(!File.exists(dbfile))File.create(dbfile), I think it was preventing SQLite from opening the DB the first time it was run Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-11-07 18:51:29 UTC (rev 1035) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-11-08 09:54:38 UTC (rev 1036) @@ -38,13 +38,7 @@ public static void launch() { - //String path = System.Reflection.Assembly.GetExecutingAssembly().Location; - //path = new FileInfo(path).Directory.Parent.Parent.FullName + @"\database\" + dbName; - String path = Options.getMainFolder() + @"\database\" + dbName; - if (!File.Exists(path)) - { - File.Create(path); - } + String path = Options.getMainFolder() + @"\database\" + dbName; sqlDB = new SQLiteClient(path); createDBs(); try Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-21 11:29:20
|
Revision: 1081 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1081&view=rev Author: chreekar Date: 2007-11-21 03:29:16 -0800 (Wed, 21 Nov 2007) Log Message: ----------- Built for MP 0.2.3.0, and sources set up accordingly Modified Paths: -------------- trunk/plugins/MyEmulators/Readme.txt trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/Readme.txt =================================================================== --- trunk/plugins/MyEmulators/Readme.txt 2007-11-20 21:29:57 UTC (rev 1080) +++ trunk/plugins/MyEmulators/Readme.txt 2007-11-21 11:29:16 UTC (rev 1081) @@ -6,6 +6,9 @@ CHANGELOG ------------------------------------------- +v1.7 +-Built for MP 0.2.3.0 + v1.6 -Solved problem when returning from a launched emulator @@ -69,10 +72,9 @@ REQUIREMENTS ------------------------------------------- The plugin has been build from and tested -to work with MediaPortal version 0.2.2.0, +to work with MediaPortal version 0.2.3.0, but it may work just fine for older -versions too (if the animations in the skin -file is commented). No guarantee though. +versions too. No guarantee though. INSTALLATION ------------------------------------------- Modified: trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2007-11-20 21:29:57 UTC (rev 1080) +++ trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2007-11-21 11:29:16 UTC (rev 1081) @@ -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.6.0")] -[assembly: AssemblyFileVersion("0.1.6.0")] +[assembly: AssemblyVersion("0.1.7.0")] +[assembly: AssemblyFileVersion("0.1.7.0")] Modified: trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj =================================================================== --- trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2007-11-20 21:29:57 UTC (rev 1080) +++ trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2007-11-21 11:29:16 UTC (rev 1081) @@ -28,23 +28,27 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.2560.28099, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Core, Version=0.2.3.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\dll version 2.2.0\Core.dll</HintPath> + <HintPath>..\dll version 2.3.0\Core.dll</HintPath> </Reference> - <Reference Include="Databases, Version=1.0.2560.28101, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Databases, Version=0.2.3.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\dll version 2.2.0\Databases.dll</HintPath> + <HintPath>..\dll version 2.3.0\Databases.dll</HintPath> </Reference> - <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Dialogs, Version=0.2.3.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\dll version 2.2.0\Dialogs.dll</HintPath> + <HintPath>..\dll version 2.3.0\Dialogs.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=2.2.2.0, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\dll version 2.3.0\Utils.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="Class1.cs" /> Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <Chr...@us...> - 2008-03-25 08:02:48
|
Revision: 1511 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1511&view=rev Author: Chreekar Date: 2008-03-25 01:02:43 -0700 (Tue, 25 Mar 2008) Log Message: ----------- execute PC games, ROMItem has a field for genre Modified Paths: -------------- trunk/plugins/MyEmulators/Readme.txt trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/myEmulators/Emulator.cs trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs trunk/plugins/MyEmulators/myEmulators/ROMItem.cs trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs trunk/plugins/MyEmulators/myEmulators/setupForm.cs trunk/plugins/MyEmulators/myEmulators/setupForm.resx trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/Readme.txt =================================================================== --- trunk/plugins/MyEmulators/Readme.txt 2008-03-25 08:02:00 UTC (rev 1510) +++ trunk/plugins/MyEmulators/Readme.txt 2008-03-25 08:02:43 UTC (rev 1511) @@ -6,6 +6,17 @@ CHANGELOG ------------------------------------------- +v1.9 +-Execute PC games, or other programs without + arguments. See USAGE below for instructions. +-Support for using .bat files as emulators +-Added a column for genre, or type of game, + which can be used to filter games via the + context menu in MP. The translation files + will have to be updated with two new + strings, shown in the TRANSLATION section + below. + v1.8 -A couple more skin files are now included -More flexible passing of arguments, see USAGE @@ -110,6 +121,14 @@ By pressing a ROM, that one is loaded in the correct emulator. +To execute PC games or other programs dir- +ectly without arguments, check "Execute +without arguments" in that Emulator prop- +erties window. When the button corresponding +to that program is pressed in the main +screen of the plugin no list will be showed, +but instead the program will launch. + Whenever something is changed in the setup, a star in the title bar appears. After pres- sing Apply, the ROM database will be updated. @@ -161,6 +180,8 @@ Line 7 - Select grade for this game Line 8 - Set grade to Line 9 - No grade +Line 10 - Filter by genre +Line 11 - Show all Note that the setup is not translated, only the buttons in the main program. If you want Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2008-03-25 08:02:00 UTC (rev 1510) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2008-03-25 08:02:43 UTC (rev 1511) @@ -19,7 +19,7 @@ //To compare with the current marked private int previouslySelectedIndex; //Translation strings - private String[] translation = { "View: List", "View: Large Icons", "View: Icons", "Most played", "Recently played", "Top graded", "Select grade for this game", "Set grade to", "No grade" }; + private String[] translation = { "View: List", "View: Large Icons", "View: Icons", "Most played", "Recently played", "Top graded", "Select grade for this game", "Set grade to", "No grade", "Filter by genre", "Show all" }; //The header label [SkinControlAttribute(9)] protected GUILabelControl headerText = null; @@ -130,7 +130,7 @@ Emulator[] loaded = DB.loadEmus(); for (int i = 0; i < loaded.Length; i++) { - emulators.Add(new Emulator(loaded[i].getEmulator_path(), loaded[i].getROM_path(), loaded[i].getName(), loaded[i].getFilter(), loaded[i].isQuotesUsed(), loaded[i].View)); + emulators.Add(new Emulator(loaded[i].getEmulator_path(), loaded[i].getROM_path(), loaded[i].getName(), loaded[i].getFilter(), loaded[i].isQuotesUsed(), loaded[i].View, loaded[i].isNoArguments())); } _autoHideTopbar = true; _autoHideTopbarType = AutoHideTopBar.Yes; @@ -240,24 +240,49 @@ if (dlg != null) { dlg.Reset(); - dlg.SetHeading(translation[6]); - for (int i = 1; i < 11; i++) - { - dlg.Add(new GUIListItem(translation[7] + " " + i)); - } - dlg.Add(new GUIListItem(translation[8])); + dlg.SetHeading(Options.getStringOption("shown_name")); + dlg.Add(new GUIListItem(translation[6])); + dlg.Add(new GUIListItem(translation[9])); dlg.DoModal(GetID); - if (dlg.SelectedId > 0 && dlg.SelectedId <= 10) + //Set grade + if (dlg.SelectedId == 1) { - item.Grade = dlg.SelectedId; - DB.saveROM(item); - displayStars(dlg.SelectedId); + dlg.Reset(); + dlg.SetHeading(translation[6]); + for (int i = 1; i < 11; i++) + { + dlg.Add(new GUIListItem(translation[7] + " " + i)); + } + dlg.Add(new GUIListItem(translation[8])); + dlg.DoModal(GetID); + if (dlg.SelectedId > 0 && dlg.SelectedId <= 10) + { + item.Grade = dlg.SelectedId; + DB.saveROM(item); + displayStars(dlg.SelectedId); + } + else if (dlg.SelectedId == 11) + { + item.Grade = 0; + DB.saveROM(item); + displayStars(0); + } } - else if (dlg.SelectedId == 11) + //Filter by genre + else if (dlg.SelectedId == 2) { - item.Grade = 0; - DB.saveROM(item); - displayStars(0); + dlg.Reset(); + dlg.SetHeading(translation[9]); + dlg.Add(new GUIListItem(translation[10])); + String[] genres = DB.getGenres(); + for (int i = 0; i < genres.Length; i++) + { + dlg.Add(new GUIListItem(genres[i])); + } + dlg.DoModal(GetID); + + //TODO: Take action + } } } @@ -354,15 +379,30 @@ { //Checks which emulator has been selected indexOfEmulator = ((GUIFacadeControl)control).SelectedListItemIndex; - switch (emulators[indexOfEmulator].View) + //If it should be executed directly without arguments + if (emulators[indexOfEmulator].isNoArguments()) { - case (0): { lstEmulators.View = GUIFacadeControl.ViewMode.LargeIcons; button_viewAs.Label = translation[1]; break; } - case (1): { lstEmulators.View = GUIFacadeControl.ViewMode.SmallIcons; button_viewAs.Label = translation[2]; break; } - case (2): { lstEmulators.View = GUIFacadeControl.ViewMode.List; button_viewAs.Label = translation[0]; break; } + Log.Info("My Emulators - Executing: {0} without arguments", emulators[indexOfEmulator].getEmulator_path()); + System.Diagnostics.Process.Start(emulators[indexOfEmulator].getEmulator_path()); + if (Options.getBoolOption("shutdownonlaunch")) + { + Log.Info("My Emulators - Shutting down MediaPortal{0}", ""); + Application.Exit(); + } } - isInFolder = true; - //Fills the list with files from the directory - refreshROMList(true); + else + { + //Open the games associated with that emulator + switch (emulators[indexOfEmulator].View) + { + case (0): { lstEmulators.View = GUIFacadeControl.ViewMode.LargeIcons; button_viewAs.Label = translation[1]; break; } + case (1): { lstEmulators.View = GUIFacadeControl.ViewMode.SmallIcons; button_viewAs.Label = translation[2]; break; } + case (2): { lstEmulators.View = GUIFacadeControl.ViewMode.List; button_viewAs.Label = translation[0]; break; } + } + isInFolder = true; + //Fills the list with files from the directory + refreshROMList(true); + } } } //The buttons on the left have been pushed Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-03-25 08:02:00 UTC (rev 1510) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-03-25 08:02:43 UTC (rev 1511) @@ -36,7 +36,7 @@ } //TODO: REMEMBER to put the correct version number! - private static int current_version = 180; + private static int current_version = 190; public static void launch() { @@ -79,7 +79,7 @@ SQLiteResultSet result = sqlDB.Execute("SELECT * FROM " + tableEmuName + ";"); for (int i = 0; i < result.Rows.Count; i++) { - Emulator item = new Emulator(result.GetField(i, 0), result.GetField(i, 1), result.GetField(i, 2), result.GetField(i, 3), Boolean.Parse(result.GetField(i, 4)), 2); + Emulator item = new Emulator(result.GetField(i, 0), result.GetField(i, 1), result.GetField(i, 2), result.GetField(i, 3), Boolean.Parse(result.GetField(i, 4)), 2, false); item.resetOldName(); item.setFlag('C'); loaded.Add(item); @@ -92,6 +92,35 @@ saveEmu(loaded[i]); } } + if (Options.getIntOption("version") < 190) + { + //Add column noarguments to emulator table + List<Emulator> loaded = new List<Emulator>(); + SQLiteResultSet result = sqlDB.Execute("SELECT * FROM " + tableEmuName + ";"); + for (int i = 0; i < result.Rows.Count; i++) + { + Emulator item = new Emulator(decode(result.GetField(i, 0)), decode(result.GetField(i, 1)), decode(result.GetField(i, 2)), result.GetField(i, 3), Boolean.Parse(result.GetField(i, 4)), DatabaseUtility.GetAsInt(result, i, 5), false); + item.resetOldName(); + item.setFlag('C'); + loaded.Add(item); + } + sqlDB.Execute("DROP TABLE " + tableEmuName + ";"); + createDBs(); + saveOptions(); + for (int i = 0; i < loaded.Count; i++) + { + saveEmu(loaded[i]); + } + //Add column genre to ROM table + try + { + sqlDB.Execute("ALTER TABLE " + tableROMName + " ADD genre varchar(30) NOT NULL DEFAULT 'No genre'"); + } + catch (Exception) + { + //If no DB existed + } + } if (Options.getIntOption("version") < current_version) { Options.updateIntOption("version", current_version); @@ -121,9 +150,9 @@ { //DatabaseUtility.SetPragmas(sqlDB); String query; - query = "CREATE TABLE " + tableEmuName + "(emulator_path char(80) NOT NULL, ROM_path char(80) NOT NULL, emulator_name char(25) NOT NULL, filter char(20) NOT NULL, usequotes char(5) NOT NULL, view char(1) NOT NULL, PRIMARY KEY(emulator_name));"; + query = "CREATE TABLE " + tableEmuName + "(emulator_path char(80) NOT NULL, ROM_path char(80) NOT NULL, emulator_name char(25) NOT NULL, filter char(20) NOT NULL, usequotes char(5) NOT NULL, view char(1) NOT NULL, noarguments char(5), PRIMARY KEY(emulator_name));"; DatabaseUtility.AddTable(sqlDB, tableEmuName, query); - query = "CREATE TABLE " + tableROMName + "(path char(80) NOT NULL, name char(50) NOT NULL, emulator char(25) NOT NULL, grade int(1), count int NOT NULL, dateplayed int NOT NULL, description text, PRIMARY KEY(path), FOREIGN KEY(emulator) REFERENCES " + tableEmuName + "(emulator_name) ON DELETE CASCADE ON UPDATE CASCADE);"; + query = "CREATE TABLE " + tableROMName + "(path char(80) NOT NULL, name char(50) NOT NULL, emulator char(25) NOT NULL, grade int(1), count int NOT NULL, dateplayed int NOT NULL, description text, genre varchar(30) NOT NULL, PRIMARY KEY(path), FOREIGN KEY(emulator) REFERENCES " + tableEmuName + "(emulator_name) ON DELETE CASCADE ON UPDATE CASCADE);"; DatabaseUtility.AddTable(sqlDB, tableROMName, query); query = "CREATE TABLE " + tableOptionsName + "(name char(20) NOT NULL, value char(20) NOT NULL, variable_type char(6) NOT NULL, PRIMARY KEY(name));"; DatabaseUtility.AddTable(sqlDB, tableOptionsName, query); @@ -153,7 +182,7 @@ //DEBUG //MessageBox.Show("NEW ENTRY"); Log.Info("My Emulators - Inserting emulator: {0}", item.getName()); - query = "INSERT INTO " + tableEmuName + " VALUES('" + encode(item.getEmulator_path()) + "','" + encode(item.getROM_path()) + "','" + encode(item.getName()) + "','" + item.getFilter() + "','" + item.isQuotesUsed() + "','" + item.View + "');"; + query = "INSERT INTO " + tableEmuName + " VALUES('" + encode(item.getEmulator_path()) + "','" + encode(item.getROM_path()) + "','" + encode(item.getName()) + "','" + item.getFilter() + "','" + item.isQuotesUsed() + "','" + item.View + "','" + item.isNoArguments() + "');"; sqlDB.Execute(query); } //Updated entry, did not change name @@ -162,7 +191,7 @@ //DEBUG //MessageBox.Show("UPDATED - SAME NAME"); Log.Info("My Emulators - Updating emulator with same name: {0}", item.getName()); - query = "UPDATE " + tableEmuName + " SET emulator_path='" + encode(item.getEmulator_path()) + "',ROM_path='" + encode(item.getROM_path()) + "',filter='" + item.getFilter() + "',usequotes='" + item.isQuotesUsed() + "',view='" + item.View + "' WHERE emulator_name='" + encode(item.getName()) + "';"; + query = "UPDATE " + tableEmuName + " SET emulator_path='" + encode(item.getEmulator_path()) + "',ROM_path='" + encode(item.getROM_path()) + "',filter='" + item.getFilter() + "',usequotes='" + item.isQuotesUsed() + "',view='" + item.View + "',noarguments='" + item.isNoArguments() + "' WHERE emulator_name='" + encode(item.getName()) + "';"; item.setFlag('-'); sqlDB.Execute(query); } @@ -172,7 +201,7 @@ //DEBUG //MessageBox.Show("UPDATED - CHANGED NAME"); Log.Info("My Emulators - Updating emulator with new name: {0}", item.getName()); - query = "UPDATE " + tableEmuName + " SET emulator_path='" + encode(item.getEmulator_path()) + "',ROM_path='" + encode(item.getROM_path()) + "',emulator_name='" + encode(item.getName()) + "',filter='" + item.getFilter() + "',usequotes='" + item.isQuotesUsed() + "',view='" + item.View + "' WHERE emulator_name='" + encode(item.getOldName()) + "';"; + query = "UPDATE " + tableEmuName + " SET emulator_path='" + encode(item.getEmulator_path()) + "',ROM_path='" + encode(item.getROM_path()) + "',emulator_name='" + encode(item.getName()) + "',filter='" + item.getFilter() + "',usequotes='" + item.isQuotesUsed() + "',view='" + item.View + "',noarguments='" + item.isNoArguments() + "' WHERE emulator_name='" + encode(item.getOldName()) + "';"; item.setFlag('-'); sqlDB.Execute(query); } @@ -189,7 +218,7 @@ SQLiteResultSet result = sqlDB.Execute(query); for (int i = 0; i < result.Rows.Count; i++) { - Emulator item = new Emulator(decode(result.GetField(i, 0)), decode(result.GetField(i, 1)), decode(result.GetField(i, 2)), result.GetField(i, 3), Boolean.Parse(result.GetField(i, 4)), DatabaseUtility.GetAsInt(result, i, 5)); + Emulator item = new Emulator(decode(result.GetField(i, 0)), decode(result.GetField(i, 1)), decode(result.GetField(i, 2)), result.GetField(i, 3), Boolean.Parse(result.GetField(i, 4)), DatabaseUtility.GetAsInt(result, i, 5), Boolean.Parse(result.GetField(i, 6))); retur.Add(item); } } @@ -237,10 +266,11 @@ item.Count = Int32.Parse(result.GetField(0, 4)); item.DatePlayed = Int32.Parse(result.GetField(0, 5)); item.Description = decode(result.GetField(0, 6)); + item.Genre = decode(result.GetField(0, 7)); } else { - query = "INSERT INTO " + tableROMName + " VALUES('" + encode(item.getPath()) + "','" + encode(item.getTitle()) + "','" + encode(item.getParent()) + "'," + item.Grade + "," + item.Count + "," + item.DatePlayed + ",'" + encode(item.Description) + "');"; + query = "INSERT INTO " + tableROMName + " VALUES('" + encode(item.getPath()) + "','" + encode(item.getTitle()) + "','" + encode(item.getParent()) + "'," + item.Grade + "," + item.Count + "," + item.DatePlayed + ",'" + encode(item.Description) + "','" + encode(item.Genre) + "');"; sqlDB.Execute(query); } retur.Add(item); @@ -282,7 +312,7 @@ { if (lst[a].getName() == emu) { - ROMItem item = new ROMItem(decode(result.GetField(i, 0)), decode(result.GetField(i, 1)), lst[a], DatabaseUtility.GetAsInt(result, i, 3), DatabaseUtility.GetAsInt(result, i, 4), DatabaseUtility.GetAsInt(result, i, 5), decode(result.GetField(i, 6))); + ROMItem item = new ROMItem(decode(result.GetField(i, 0)), decode(result.GetField(i, 1)), lst[a], DatabaseUtility.GetAsInt(result, i, 3), DatabaseUtility.GetAsInt(result, i, 4), DatabaseUtility.GetAsInt(result, i, 5), decode(result.GetField(i, 6)), decode(result.GetField(i, 7))); retur.Add(item); } } @@ -297,7 +327,7 @@ public static void saveROM(ROMItem item) { - sqlDB.Execute("UPDATE " + tableROMName + " SET name='" + encode(item.getTitle()) + "',grade='" + item.Grade + "',count='" + item.Count + "',dateplayed='" + item.DatePlayed + "',description='" + encode(item.Description) + "' WHERE path='" + encode(item.getPath()) + "';"); + sqlDB.Execute("UPDATE " + tableROMName + " SET name='" + encode(item.getTitle()) + "',grade='" + item.Grade + "',count='" + item.Count + "',dateplayed='" + item.DatePlayed + "',description='" + encode(item.Description) + "',genre='" + encode(item.Genre) + "' WHERE path='" + encode(item.getPath()) + "';"); } //Check which files will be shown @@ -431,5 +461,21 @@ Options.addStringOption(result.GetField(i, 0), result.GetField(i, 1)); } } + + public static String[] getGenres() + { + List<String> genres = new List<String>(); + SQLiteResultSet result = sqlDB.Execute("SELECT genre FROM " + tableROMName + ";"); + for (int i = 0; i < result.Rows.Count; i++) + { + String item = result.GetField(i, 0); + if (!genres.Contains(item)) + { + genres.Add(item); + } + } + genres.Sort(); + return genres.ToArray(); + } } } Modified: trunk/plugins/MyEmulators/myEmulators/Emulator.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Emulator.cs 2008-03-25 08:02:00 UTC (rev 1510) +++ trunk/plugins/MyEmulators/myEmulators/Emulator.cs 2008-03-25 08:02:43 UTC (rev 1511) @@ -16,6 +16,7 @@ private int view; private char flag; private bool usequotes; + private bool noarguments; private List<Emulator> emulators; private List<ROMItem> ROMs; private Label label1; @@ -31,19 +32,22 @@ private Button button3; private Button button4; private CheckBox checkbox1; + private CheckBox checkbox2; public Emulator() { init("", "", "", "*.*"); usequotes = true; + noarguments = false; view = 2; } - public Emulator(string emulator_path, string ROM_path, string name, string filter, bool usequotes, int view) + public Emulator(string emulator_path, string ROM_path, string name, string filter, bool usequotes, int view, bool noarguments) { init(emulator_path, ROM_path, name, filter); this.usequotes = usequotes; this.view = view; + this.noarguments = noarguments; } private void init(string emulator_path, string ROM_path, string name, string filter) @@ -60,13 +64,14 @@ textbox4.Text = filter; } - public void update(string emulator_path, string ROM_path, string name, string filter, bool usequotes) + public void update(string emulator_path, string ROM_path, string name, string filter, bool usequotes, bool noarguments) { textbox1.Text = emulator_path; textbox2.Text = ROM_path; textbox3.Text = name; textbox4.Text = filter; checkbox1.Checked = usequotes; + checkbox2.Checked = noarguments; } public String getEmulator_path() @@ -123,6 +128,11 @@ return usequotes; } + public bool isNoArguments() + { + return noarguments; + } + //TODO: this is how getters och setters work public int View { @@ -153,9 +163,9 @@ groupbox.Top = y; groupbox2 = new GroupBox(); - groupbox2.Text = "Advanced (change only in case of problems)"; + groupbox2.Text = "Advanced"; groupbox2.Width = 336; - groupbox2.Height = 50; + groupbox2.Height = 70; groupbox2.Left = x; groupbox2.Top = groupbox.Bottom + 10; @@ -212,6 +222,14 @@ checkbox1.CheckedChanged += new System.EventHandler(this.useQuotesChanged); checkbox1.Checked = usequotes; + checkbox2 = new CheckBox(); + checkbox2.Text = "Execute without arguments"; + checkbox2.Left = x + 6; + checkbox2.Top = y + 200; + checkbox2.Width = 325; + checkbox2.CheckedChanged += new EventHandler(this.useArgumentsChanged); + checkbox2.Checked = noarguments; + button1 = new Button(); button1.Text = "..."; button1.Width = 26; @@ -230,13 +248,13 @@ button3.Text = "Cancel"; button3.Width = 70; button3.Left = x; - button3.Top = y + 227; + button3.Top = y + 247; button3.Click += new System.EventHandler(this.Cancel_Click); button4 = new Button(); button4.Text = "OK"; button4.Width = 70; button4.Left = x + 266; - button4.Top = y + 227; + button4.Top = y + 247; button4.Click += new System.EventHandler(this.OK_Click); ToolTip tooltip1 = new ToolTip(); @@ -247,6 +265,10 @@ tooltip3.SetToolTip(textbox3, "This will be the visible text in Media Portal"); ToolTip tooltip4 = new ToolTip(); tooltip4.SetToolTip(textbox4, "Separate with ;. Eg: *.nes;*.rom"); + ToolTip tooltip5 = new ToolTip(); + tooltip5.SetToolTip(checkbox1, "Uncheck to correct compability issues with Project64 among others"); + ToolTip tooltip6 = new ToolTip(); + tooltip6.SetToolTip(checkbox2, "To use PC games, check this and enter the path to the game in the topmost box"); owner.AcceptButton = button4; owner.CancelButton = button3; @@ -260,6 +282,7 @@ owner.Controls.Add(textbox3); owner.Controls.Add(textbox4); owner.Controls.Add(checkbox1); + owner.Controls.Add(checkbox2); owner.Controls.Add(button1); owner.Controls.Add(button2); owner.Controls.Add(button3); @@ -273,7 +296,7 @@ try { OpenFileDialog dialog = new OpenFileDialog(); - dialog.Filter = "Executables|*.exe"; + dialog.Filter = "Executables (*.exe, *.bat)|*.exe;*.bat"; dialog.CheckFileExists = true; dialog.RestoreDirectory = true; if (dialog.ShowDialog() == DialogResult.OK) @@ -303,6 +326,28 @@ { usequotes = ((CheckBox)sender).Checked; } + private void useArgumentsChanged(object sender, EventArgs e) + { + noarguments = ((CheckBox)sender).Checked; + if (noarguments) + { + textbox2.Enabled = false; + textbox2.Text = "not applicable"; + button2.Enabled = false; + textbox4.Enabled = false; + textbox4.Text = "not applicable"; + checkbox1.Enabled = false; + } + else + { + textbox2.Text = ""; + textbox2.Enabled = true; + button2.Enabled = true; + textbox4.Text = "*.*"; + textbox4.Enabled = true; + checkbox1.Enabled = true; + } + } private void updateFlag(object sender, EventArgs e) { setFlag('C'); @@ -323,7 +368,7 @@ { throw new Exception(); } - else if (!ROM_path.Contains("\\") || !emulator_path.Contains("\\")) + else if ((!checkbox2.Checked && !ROM_path.Contains("\\")) || !emulator_path.Contains("\\")) { throw new Exception(); } @@ -340,7 +385,7 @@ //Saves the information if (indexInList < 0) { - Emulator temp = new Emulator(emulator_path, ROM_path, emulator_name, filter, usequotes, view); + Emulator temp = new Emulator(emulator_path, ROM_path, emulator_name, filter, usequotes, view, noarguments); temp.resetOldName(); temp.setFlag(flag); emulators.Add(temp); @@ -352,6 +397,7 @@ emulators[indexInList].textbox3.Text = emulator_name; emulators[indexInList].textbox4.Text = filter; emulators[indexInList].usequotes = usequotes; + emulators[indexInList].noarguments = noarguments; emulators[indexInList].oldname = oldname; emulators[indexInList].flag = flag; emulators[indexInList].view = view; Modified: trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2008-03-25 08:02:00 UTC (rev 1510) +++ trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2008-03-25 08:02:43 UTC (rev 1511) @@ -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.8.0")] -[assembly: AssemblyFileVersion("0.1.8.0")] +[assembly: AssemblyVersion("0.1.9.0")] +[assembly: AssemblyFileVersion("0.1.9.0")] Modified: trunk/plugins/MyEmulators/myEmulators/ROMItem.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/ROMItem.cs 2008-03-25 08:02:00 UTC (rev 1510) +++ trunk/plugins/MyEmulators/myEmulators/ROMItem.cs 2008-03-25 08:02:43 UTC (rev 1511) @@ -14,18 +14,19 @@ private String name; private int count; private char flag; + private String genre; public ROMItem(String path, Emulator parent) { - init(path, null, parent, 0, 0, 0, ""); + init(path, null, parent, 0, 0, 0, "", "No genre"); } - public ROMItem(String path, String name, Emulator parent, int grade, int count, int dateplayed, String description) + public ROMItem(String path, String name, Emulator parent, int grade, int count, int dateplayed, String description, String genre) { - init(path, name, parent, grade, count, dateplayed, description); + init(path, name, parent, grade, count, dateplayed, description, genre); } - public void init(String path, String name, Emulator parent, int grade, int count, int dateplayed, String description) + public void init(String path, String name, Emulator parent, int grade, int count, int dateplayed, String description, String genre) { this.path = path; this.name = name; @@ -34,6 +35,7 @@ this.count = count; this.dateplayed = dateplayed; this.description = description; + this.genre = genre; flag = '-'; Label = getTitle(); } @@ -107,6 +109,18 @@ } } + public String Genre + { + get + { + return genre; + } + set + { + genre = value; + } + } + public int Count { get Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs 2008-03-25 08:02:00 UTC (rev 1510) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.Designer.cs 2008-03-25 08:02:43 UTC (rev 1511) @@ -40,13 +40,6 @@ this.add = new System.Windows.Forms.Button(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.ROM_DB_List_Path = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ROM_DB_List_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ROM_DB_List_Emulator = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ROM_DB_List_Grade = new System.Windows.Forms.DataGridViewComboBoxColumn(); - this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Dateplayed = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ROM_DB_List_Description = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.tabPage3 = new System.Windows.Forms.TabPage(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.label3 = new System.Windows.Forms.Label(); @@ -57,6 +50,14 @@ this.shutdownonload = new System.Windows.Forms.CheckBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.apply = new System.Windows.Forms.Button(); + this.ROM_DB_List_Path = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ROM_DB_List_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ROM_DB_List_Emulator = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ROM_DB_List_Grade = new System.Windows.Forms.DataGridViewComboBoxColumn(); + this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Dateplayed = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ROM_DB_List_Description = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Genre = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -141,7 +142,7 @@ listBox1.Size = new System.Drawing.Size(225, 147); listBox1.TabIndex = 29; listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick_1); - listBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(listBox1_KeyDown); + listBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listBox1_KeyDown); // // label1 // @@ -185,63 +186,14 @@ this.ROM_DB_List_Grade, this.Count, this.Dateplayed, - this.ROM_DB_List_Description}); + this.ROM_DB_List_Description, + this.Genre}); this.dataGridView1.Location = new System.Drawing.Point(8, 6); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Size = new System.Drawing.Size(343, 218); this.dataGridView1.TabIndex = 1; this.dataGridView1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellEndEdit); // - // ROM_DB_List_Path - // - this.ROM_DB_List_Path.HeaderText = "Path"; - this.ROM_DB_List_Path.MaxInputLength = 80; - this.ROM_DB_List_Path.Name = "ROM_DB_List_Path"; - this.ROM_DB_List_Path.ReadOnly = true; - this.ROM_DB_List_Path.ToolTipText = "The absolute path to the game"; - // - // ROM_DB_List_Name - // - this.ROM_DB_List_Name.HeaderText = "Name"; - this.ROM_DB_List_Name.MaxInputLength = 50; - this.ROM_DB_List_Name.Name = "ROM_DB_List_Name"; - this.ROM_DB_List_Name.ToolTipText = "The name shown in MediaPortal"; - // - // ROM_DB_List_Emulator - // - this.ROM_DB_List_Emulator.HeaderText = "Emulator"; - this.ROM_DB_List_Emulator.Name = "ROM_DB_List_Emulator"; - this.ROM_DB_List_Emulator.ReadOnly = true; - this.ROM_DB_List_Emulator.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.ROM_DB_List_Emulator.ToolTipText = "The emulator used for launching the game"; - // - // ROM_DB_List_Grade - // - this.ROM_DB_List_Grade.HeaderText = "Grade"; - this.ROM_DB_List_Grade.Name = "ROM_DB_List_Grade"; - this.ROM_DB_List_Grade.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.ROM_DB_List_Grade.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.ROM_DB_List_Grade.ToolTipText = "A score between 1 and 10"; - this.ROM_DB_List_Grade.Width = 50; - // - // Count - // - this.Count.HeaderText = "Play count"; - this.Count.Name = "Count"; - this.Count.Width = 60; - // - // Dateplayed - // - this.Dateplayed.HeaderText = "Date played"; - this.Dateplayed.Name = "Dateplayed"; - this.Dateplayed.Width = 80; - // - // ROM_DB_List_Description - // - this.ROM_DB_List_Description.HeaderText = "Description"; - this.ROM_DB_List_Description.Name = "ROM_DB_List_Description"; - this.ROM_DB_List_Description.Width = 200; - // // tabPage3 // this.tabPage3.Controls.Add(this.comboBox1); @@ -348,6 +300,62 @@ this.apply.UseVisualStyleBackColor = true; this.apply.Click += new System.EventHandler(this.apply_Click); // + // ROM_DB_List_Path + // + this.ROM_DB_List_Path.HeaderText = "Path"; + this.ROM_DB_List_Path.MaxInputLength = 80; + this.ROM_DB_List_Path.Name = "ROM_DB_List_Path"; + this.ROM_DB_List_Path.ReadOnly = true; + this.ROM_DB_List_Path.ToolTipText = "The absolute path to the game"; + // + // ROM_DB_List_Name + // + this.ROM_DB_List_Name.HeaderText = "Name"; + this.ROM_DB_List_Name.MaxInputLength = 50; + this.ROM_DB_List_Name.Name = "ROM_DB_List_Name"; + this.ROM_DB_List_Name.ToolTipText = "The name shown in MediaPortal"; + // + // ROM_DB_List_Emulator + // + this.ROM_DB_List_Emulator.HeaderText = "Emulator"; + this.ROM_DB_List_Emulator.Name = "ROM_DB_List_Emulator"; + this.ROM_DB_List_Emulator.ReadOnly = true; + this.ROM_DB_List_Emulator.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.ROM_DB_List_Emulator.ToolTipText = "The emulator used for launching the game"; + // + // ROM_DB_List_Grade + // + this.ROM_DB_List_Grade.HeaderText = "Grade"; + this.ROM_DB_List_Grade.Name = "ROM_DB_List_Grade"; + this.ROM_DB_List_Grade.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.ROM_DB_List_Grade.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.ROM_DB_List_Grade.ToolTipText = "A score between 1 and 10"; + this.ROM_DB_List_Grade.Width = 50; + // + // Count + // + this.Count.HeaderText = "Play count"; + this.Count.Name = "Count"; + this.Count.Width = 60; + // + // Dateplayed + // + this.Dateplayed.HeaderText = "Date played"; + this.Dateplayed.Name = "Dateplayed"; + this.Dateplayed.Width = 80; + // + // ROM_DB_List_Description + // + this.ROM_DB_List_Description.HeaderText = "Description"; + this.ROM_DB_List_Description.Name = "ROM_DB_List_Description"; + this.ROM_DB_List_Description.Width = 200; + // + // Genre + // + this.Genre.HeaderText = "Genre"; + this.Genre.MaxInputLength = 30; + this.Genre.Name = "Genre"; + // // setupForm // this.AcceptButton = this.save; @@ -394,6 +402,10 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.Button apply; + private System.Windows.Forms.CheckBox display_desc; + private System.Windows.Forms.CheckBox display_stars; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.DataGridViewTextBoxColumn ROM_DB_List_Path; private System.Windows.Forms.DataGridViewTextBoxColumn ROM_DB_List_Name; private System.Windows.Forms.DataGridViewTextBoxColumn ROM_DB_List_Emulator; @@ -401,10 +413,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn Count; private System.Windows.Forms.DataGridViewTextBoxColumn Dateplayed; private System.Windows.Forms.DataGridViewTextBoxColumn ROM_DB_List_Description; - private System.Windows.Forms.CheckBox display_desc; - private System.Windows.Forms.CheckBox display_stars; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.DataGridViewTextBoxColumn Genre; private static System.Windows.Forms.ListBox listBox1; } } \ No newline at end of file Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2008-03-25 08:02:00 UTC (rev 1510) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2008-03-25 08:02:43 UTC (rev 1511) @@ -66,7 +66,7 @@ { continue; } - else if (!item.getROM_path().Contains("\\") || !item.getEmulator_path().Contains("\\")) + else if ((!item.isNoArguments() && !item.getROM_path().Contains("\\")) || !item.getEmulator_path().Contains("\\")) { throw new FieldAccessException(); } @@ -128,6 +128,7 @@ { ROMs[i].Description = ""; } + ROMs[i].Genre = ((DataGridViewTextBoxCell)row.Cells[7]).Value.ToString(); DB.saveROM(ROMs[i]); } if (close) @@ -151,7 +152,7 @@ Emulator[] loaded = DB.loadEmus(); for (int i = 0; i < loaded.Length; i++) { - Emulator item = new Emulator(loaded[i].getEmulator_path(), loaded[i].getROM_path(), loaded[i].getName(), loaded[i].getFilter(), loaded[i].isQuotesUsed(), loaded[i].View); + Emulator item = new Emulator(loaded[i].getEmulator_path(), loaded[i].getROM_path(), loaded[i].getName(), loaded[i].getFilter(), loaded[i].isQuotesUsed(), loaded[i].View, loaded[i].isNoArguments()); emulators.Add(item); listBox1.Items.Add(loaded[i].getName()); } @@ -218,7 +219,7 @@ Form tempForm = new Form(); tempForm.Text = "Emulator properties"; tempForm.Width = 365; - tempForm.Height = 294; + tempForm.Height = 314; tempForm.ShowIcon = false; tempForm.FormBorderStyle = FormBorderStyle.FixedSingle; Emulator tempEmulator = new Emulator(); @@ -229,7 +230,7 @@ else { tempEmulator.show(tempForm, emulators, emulators.IndexOf(emulator),emulator.getName()); - tempEmulator.update(emulator.getEmulator_path(), emulator.getROM_path(), emulator.getName(), emulator.getFilter(), emulator.isQuotesUsed()); + tempEmulator.update(emulator.getEmulator_path(), emulator.getROM_path(), emulator.getName(), emulator.getFilter(), emulator.isQuotesUsed(), emulator.isNoArguments()); } tempForm.ShowDialog(); } @@ -353,6 +354,10 @@ textcell = new DataGridViewTextBoxCell(); textcell.Value = ROMs[i].Description; row.Cells.Add(textcell); + //Eight cell + textcell = new DataGridViewTextBoxCell(); + textcell.Value = ROMs[i].Genre; + row.Cells.Add(textcell); dataGridView1.Rows.Add(row); } } Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.resx =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.resx 2008-03-25 08:02:00 UTC (rev 1510) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.resx 2008-03-25 08:02:43 UTC (rev 1511) @@ -138,6 +138,9 @@ <metadata name="ROM_DB_List_Description.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="Genre.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Chr...@us...> - 2008-05-26 12:45:38
|
Revision: 1813 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1813&view=rev Author: Chreekar Date: 2008-05-26 05:45:33 -0700 (Mon, 26 May 2008) Log Message: ----------- use of Config.GetFile() instead of Reflection.Assembly to find out where the DB file and Thumbs folder are located Modified Paths: -------------- trunk/plugins/MyEmulators/Readme.txt trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/myEmulators/Options.cs trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj trunk/plugins/MyEmulators/output.rar Modified: trunk/plugins/MyEmulators/Readme.txt =================================================================== --- trunk/plugins/MyEmulators/Readme.txt 2008-05-26 05:13:24 UTC (rev 1812) +++ trunk/plugins/MyEmulators/Readme.txt 2008-05-26 12:45:33 UTC (rev 1813) @@ -7,6 +7,7 @@ CHANGELOG ------------------------------------------- v1.9 +-Support for Windows Vista and MP RC1 -Execute PC games, or other programs without arguments. See USAGE below for instructions. -Support for using .bat files as emulators Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-05-26 05:13:24 UTC (rev 1812) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-05-26 12:45:33 UTC (rev 1813) @@ -40,7 +40,7 @@ public static void launch() { - String path = Options.getMainFolder() + @"\database\" + dbName; + String path = Config.GetFile(Config.Dir.Database, dbName); sqlDB = new SQLiteClient(path); createDBs(); try @@ -127,6 +127,7 @@ //Saving version info in DB, even if pressing Cancel saveOptions(DB.SaveInfo.ONLY_VERSION_INFO); } + //Create thumbnail directories if (!Directory.Exists(Options.thumb_main)) { Modified: trunk/plugins/MyEmulators/myEmulators/Options.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Options.cs 2008-05-26 05:13:24 UTC (rev 1812) +++ trunk/plugins/MyEmulators/myEmulators/Options.cs 2008-05-26 12:45:33 UTC (rev 1813) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; +using MediaPortal.Configuration; namespace myEmulators { @@ -12,10 +13,10 @@ public const int STRING = 2; //Static options - public static String thumb_main = getMainFolder() + @"\thumbs\myEmulators"; - public static String thumb_emulators = getMainFolder() + @"\thumbs\myEmulators\emulators"; - public static String thumb_previews = getMainFolder() + @"\thumbs\myEmulators\previews"; - public static String thumb_games = getMainFolder() + @"\thumbs\myEmulators\games"; + public static String thumb_main = getThumbsFolder() + @"\myEmulators"; + public static String thumb_emulators = getThumbsFolder() + @"\myEmulators\emulators"; + public static String thumb_previews = getThumbsFolder() + @"\myEmulators\previews"; + public static String thumb_games = getThumbsFolder() + @"\myEmulators\games"; //Dynamic options private static List<String> bool_names = new List<String>(); @@ -25,11 +26,10 @@ private static List<String> string_names = new List<String>(); private static List<String> string_values = new List<String>(); - public static String getMainFolder() + //Folder location + public static String getThumbsFolder() { - String path = System.Reflection.Assembly.GetExecutingAssembly().Location; - path = new System.IO.FileInfo(path).Directory.Parent.Parent.FullName; - return path; + return Config.GetFolder(Config.Dir.Thumbs); } // Modified: trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj =================================================================== --- trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2008-05-26 05:13:24 UTC (rev 1812) +++ trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2008-05-26 12:45:33 UTC (rev 1813) @@ -22,7 +22,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>bin\Debug\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Chr...@us...> - 2008-07-10 08:34:54
|
Revision: 1912 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1912&view=rev Author: Chreekar Date: 2008-07-10 01:34:35 -0700 (Thu, 10 Jul 2008) Log Message: ----------- filter for showing files made case insensitive, added FAQ.txt Modified Paths: -------------- trunk/plugins/MyEmulators/Readme.txt trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs trunk/plugins/MyEmulators/output.rar Added Paths: ----------- trunk/plugins/MyEmulators/FAQ.txt Added: trunk/plugins/MyEmulators/FAQ.txt =================================================================== --- trunk/plugins/MyEmulators/FAQ.txt (rev 0) +++ trunk/plugins/MyEmulators/FAQ.txt 2008-07-10 08:34:35 UTC (rev 1912) @@ -0,0 +1,201 @@ +My Emulators 2.0 FAQ + + +Q: Why won't ___ emulator work? (Project 64, ePSXe...) + +Q: Which emulators are the best? + +Q: Where can I find system thumbnails? + +Q: Where can I find thumbnails for games? + +Q: Where can I find the most recent version of the + My Emulators plugin? + +Q: My system thumbnails won't show up + +Q: My thumbnails for games won't show up + +Q: How can I exit every emulator with the same key press? + +Q: How do I select more than one file type to search for + in the "Filter for showing files"? + +Q: How do I get the plugin to scan subfolders or multiple + locations for games? + +Q: Can I categorise games into subfolders or browse by + letter or search for games within MediaPortal? + +Q: Can you add support for the ___ skin? + +Q: How do I add descriptions, ratings or genres or change + the name of games? + +Q: I have a question not answered here + + + + +--------------------------------------------------------- + +Q: Why won't ___ emulator work? (Project 64, ePSXe...) + +A: Here are some common settings + + Project 64: + Uncheck the option "Use quotes in paths". + + ePSXe: + The Path to emulator has to be include these switches + at the end (including a space before and after) + -nogui -loadbin + So it would look like this: + "C:\Program Files\ePSXe\ePSXe.exe -nogui -loadbin " + (minus the quotes). + + PC Games: + Check the option "Execute without arguments". + + Other: + 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 replaced by the correct game file. If no %ROM% + is defined, the path to the game file will be inserted + at the end. + + You can also set .bat files as emulators if that helps. + + + +Q: Which emulators are the best? + +A: The highest rated ones on http://www.emulator-zone.com/ + + + +Q: Where can I find system thumbnails? + +A: http://forum.team-mediaportal.com/attachments/my-emulators-247/2448d1168379310-my-emulators-emulator_icons.rar + + + +Q: Where can I find thumbnails for games? + +A: http://localarcade.com/screenshotarchive/ + + + +Q: Where can I find the most recent version of the + My Emulators plugin? + +A: https://mp-plugins.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/MyEmulators/ + + + +Q: My system thumbnails won't show up + +A: Make sure the images are in the + thumbs\myEmulators\emulators folder in the MediaPortal + folder. The image should be named exactly the same + as the name of the emulator in MediaPortal. + + Supported file types are gif, jpg and png. + + + +Q: My thumbnails for games won't show up + +A: To show images of specific games, create a subfolder + in thumbs\myEmulators\games in the MediaPortal folder + named as the emulator and name the image exactly + the same as the game name in MediaPortal. + + Supported file types are gif, jpg and png. + + +Q: How can I exit every emulator with the same key press? + +A: Alt+F4 is the currently recommended way although it does + not work in every situation. (ePSXe wont save...) + + This site has a list of emulators that have been modified + to be closed with the same key press (esc): + + http://localarcade.com/screenshotarchive/downloads_emus.htm + + + +Q: How do I select more than one file type to search for + in the "Filter for showing files"? + +A: Separate with ; Eg: *.nes;*.rom + + + +Q: How do I get the plugin to scan subfolders or multiple + locations for games? + +A: This is not possible at the moment. + (You may be able to manually add games into the database + by modifying the myEmulators.db3 file but I haven't tried + that yet.) + + You could add a request here: + http://forum.team-mediaportal.com/my-emulators-247/my-emulators-12771/ + + + +Q: Can I categorise games into subfolders or browse by + letter or search for games within MediaPortal? + +A: Not at the moment. + + You could add a request here: + http://forum.team-mediaportal.com/my-emulators-247/my-emulators-12771/ + + + +Q: Can you add support for the ___ skin? + +A: You could try asking the creator of that skin or in its + thread on the Mediaportal forums. + + http://forum.team-mediaportal.com/skins-50/ + + Also, if you have made/modified an xml file to work with + a skin please post it in the My Emulators skin thread: + + http://forum.team-mediaportal.com/my-emulators-247/post-skin-files-here-42074/ + + Currently supported skins: + BlueTwo + BlueTwo wide + Project Mayhem 3 + + + +Q: How do I add descriptions, ratings or genres or change + the name of games? + +A: In the My Emulators configuration on the ROM Database tab + + + +Q: I have a question not answered here + +A: Check the readme and search through this thread: + http://forum.team-mediaportal.com/my-emulators-247/my-emulators-12771/ + + If its not in there then make a new post. The author + (Chreekar) checks that thread regularly. + + +--------------------------------------------------------- +Created by gamingexpert, modified by Chreekar \ No newline at end of file Modified: trunk/plugins/MyEmulators/Readme.txt =================================================================== --- trunk/plugins/MyEmulators/Readme.txt 2008-07-09 08:08:48 UTC (rev 1911) +++ trunk/plugins/MyEmulators/Readme.txt 2008-07-10 08:34:35 UTC (rev 1912) @@ -6,6 +6,10 @@ CHANGELOG ------------------------------------------- +v2.0 +-Filter for showing files made case- + insensitive + v1.9 -Support for Windows Vista and MP RC1 -Execute PC games, or other programs without Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-07-09 08:08:48 UTC (rev 1911) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2008-07-10 08:34:35 UTC (rev 1912) @@ -337,7 +337,7 @@ for (int i = 0; i < filters.Length; i++) { String ext = filters[i].Substring(filters[i].LastIndexOf('.') + 1); - if (ext == "*" || filename.EndsWith(ext)) + if (ext == "*" || filename.ToLower().EndsWith(ext.ToLower())) { return true; } Modified: trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2008-07-09 08:08:48 UTC (rev 1911) +++ trunk/plugins/MyEmulators/myEmulators/Properties/AssemblyInfo.cs 2008-07-10 08:34:35 UTC (rev 1912) @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Christer Carlsund")] [assembly: AssemblyProduct("myEmulators")] -[assembly: AssemblyCopyright("Copyright © 2006")] +[assembly: AssemblyCopyright("Copyright © 2006-2008")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -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.9.0")] -[assembly: AssemblyFileVersion("0.1.9.0")] +[assembly: AssemblyVersion("0.2.0.0")] +[assembly: AssemblyFileVersion("0.2.0.0")] Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-12-19 21:35:05
|
Revision: 1164 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1164&view=rev Author: chreekar Date: 2007-12-19 13:35:01 -0800 (Wed, 19 Dec 2007) Log Message: ----------- changed window id from 5001 to 5678 in skin files Modified Paths: -------------- trunk/plugins/MyEmulators/output.rar trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml Modified: trunk/plugins/MyEmulators/output.rar =================================================================== (Binary files differ) Modified: trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml =================================================================== --- trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml 2007-12-19 20:35:31 UTC (rev 1163) +++ trunk/plugins/MyEmulators/skin/BlueTwo/myEmulators.xml 2007-12-19 21:35:01 UTC (rev 1164) @@ -1,7 +1,7 @@ <!-- BlueTwo skin for My Emulators --> <window> - <id>5001</id> + <id>5678</id> <defaultcontrol>50</defaultcontrol> <allowoverlay>yes</allowoverlay> <define>#header.label:</define> Modified: trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml =================================================================== --- trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml 2007-12-19 20:35:31 UTC (rev 1163) +++ trunk/plugins/MyEmulators/skin/BlueTwo wide/myEmulators.xml 2007-12-19 21:35:01 UTC (rev 1164) @@ -1,7 +1,7 @@ <!-- BlueTwo wide skin for My Emulators --> <window> - <id>5001</id> + <id>5678</id> <defaultcontrol>50</defaultcontrol> <allowoverlay>yes</allowoverlay> <define>#header.label:</define> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |