From: <chr...@us...> - 2007-02-19 16:06:49
|
Revision: 126 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=126&view=rev Author: chreekar Date: 2007-02-19 08:06:40 -0800 (Mon, 19 Feb 2007) Log Message: ----------- Changed a lot of the comments to English Modified Paths: -------------- trunk/plugins/MyEmulators/myEmulators/Class1.cs trunk/plugins/MyEmulators/myEmulators/DB.cs trunk/plugins/MyEmulators/myEmulators/Emulator.cs trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj trunk/plugins/MyEmulators/myEmulators/setupForm.cs Modified: trunk/plugins/MyEmulators/myEmulators/Class1.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-02-19 11:19:27 UTC (rev 125) +++ trunk/plugins/MyEmulators/myEmulators/Class1.cs 2007-02-19 16:06:40 UTC (rev 126) @@ -10,24 +10,24 @@ { public class Class1 : GUIWindow, ISetupForm { - //Logiska listan med emulatorerna + //The logical list with emulators private List<Emulator> emulators; - //Variabel som h\xE5ller koll p\xE5 om man tryckt p\xE5 en knapp + //Variable for checking if is browsing roms or emulators private bool isInFolder; - //Variabel som h\xE5ller koll p\xE5 vilken emulators mapp man \xE4r i + //Variable for checking the parent emulator of a ROM folder private int indexOfEmulator; - //F\xF6r att j\xE4mf\xF6ra med den nu markerade + //To compare with the current marked private int previouslySelectedIndex; - //Knapparna f\xF6r emulatorerna + //The emulator/rom list control [SkinControlAttribute(50)] protected GUIFacadeControl lstEmulators = null; - //Knapparna i menyn till v\xE4nster + //The buttons in the menu to the left [SkinControlAttribute(10)] protected GUIButtonControl button_viewAs = null; [SkinControlAttribute(11)] protected GUIButtonControl button_mostPlayed = null; [SkinControlAttribute(12)] protected GUIButtonControl button_recentlyPlayed = null; [SkinControlAttribute(13)] protected GUIButtonControl button_topGraded = null; - //Speltexten + //Description text [SkinControlAttribute(40)] protected GUITextScrollUpControl text_description = null; - //Stj\xE4rnbilderna + //Grade star images [SkinControlAttribute(101)] protected GUIImage starimage1 = null; [SkinControlAttribute(102)] protected GUIImage starimage2 = null; [SkinControlAttribute(103)] protected GUIImage starimage3 = null; @@ -40,7 +40,7 @@ [SkinControlAttribute(110)] protected GUIImage starimage10 = null; private GUIImage[] stars; - #region Metoder som beskriver pluginet + #region Methods for plugin description //Namn p\xE5 pluginet public string PluginName() { @@ -95,14 +95,13 @@ } strButtonImage = String.Empty; strButtonImageFocus = String.Empty; - //Det st\xE5r r\xE4tt nedan, fast bilden m\xE5ste heta hover_myEmulators.png + //It is correct below, but the image must be named hover_myEmulators.png strPictureImage = GUIGraphicsContext.Skin + @"\\Media\\myEmulators.png"; return true; } #endregion - #region Metoder f\xF6r att skinet ska fungera - //Returnerar r\xE4tt id-nummer + #region Obligatory methods for the plugin to work public override int GetID { get @@ -114,14 +113,14 @@ } } - //Vid start av MediaPortal + //At start of MP public override bool Init() { DB.launch(); emulators = new List<Emulator>(); stars = new GUIImage[10]; previouslySelectedIndex = -1; - //Laddar listan \xF6ver emulatorer + //Loads the list of emulators Emulator[] loaded = DB.loadEmus(); for (int i = 0; i < loaded.Length; i++) { @@ -129,12 +128,12 @@ } _autoHideTopbar = true; _autoHideTopbarType = AutoHideTopBar.Yes; - //Laddar skinet + //Loads the skin return Load(GUIGraphicsContext.Skin+@"\myEmulators.xml"); } #endregion - #region Metoder f\xF6r h\xE4ndelser + #region Methods for events protected override void OnPageLoad() { stars[0] = starimage1; stars[1] = starimage2; stars[2] = starimage3; stars[3] = starimage4; stars[4] = starimage5; @@ -156,7 +155,7 @@ if (emulators.Count > 0) { isInFolder = false; - //Fyller listan med emulatorerna + //Fills the list with the emulators refreshEmulatorList(true); } else @@ -246,24 +245,24 @@ base.OnClicked(controlId, control, actionType); if (controlId == lstEmulators.GetID) { - //\xC4r i katalogen + //Is in folder if (isInFolder || ((GUIFacadeControl)control)[0].Label == "..") { int index = ((GUIFacadeControl)control).SelectedListItemIndex; - //Om tryckt p\xE5 tillbakaknappen + //If selected back button if (index == 0) { OnPageLoad(); } else { - //K\xF6r emulatorn med r\xE4tt ROM + //Run the emulator with the correct ROM try { ROMItem selected = ((ROMItem)(((GUIFacadeControl)control).SelectedListItem)); String path = selected.getParentItem().getEmulator_path(); String args = ""; - //Skalar bort switchen fr\xE5n path om det finns en s\xE5dan + //Takes away the switch from path if it exists if (!path.EndsWith(".exe")) { args += path.Substring(path.LastIndexOf('.') + 5) + " "; @@ -318,10 +317,10 @@ } } } - //\xC4r i listan \xF6ver emulatorer + //Is in the list of emulators else { - //Kontrollerar vilken emulator man tryckt p\xE5 + //Checks which emulator has been selected indexOfEmulator = ((GUIFacadeControl)control).SelectedListItemIndex; switch (emulators[indexOfEmulator].View) { @@ -330,11 +329,11 @@ case (2): { lstEmulators.View = GUIFacadeControl.ViewMode.List; button_viewAs.Label = "View: List"; break; } } isInFolder = true; - //Fyller listan med filer fr\xE5n katalogen + //Fills the list with files from the directory refreshROMList(true); } } - //Tryckt p\xE5 knapparna i menyn till v\xE4nster + //The buttons on the left have been pushed else if (controlId == button_viewAs.GetID) { switch (lstEmulators.View) @@ -461,7 +460,7 @@ private void refreshEmulatorList(bool log) { lstEmulators.Clear(); - //Fyller listan med emulatorerna + //Fills the list with the emulators for (int i = 0; i < emulators.Count; i++) { if (log) @@ -488,9 +487,8 @@ private void refreshROMList(bool log) { lstEmulators.Clear(); - //L\xE4gger till tillbaka-knappen + //Adds the back button GUIListItem backdots = new GUIListItem(".."); - //TODO: Kan h\xE4nda att raden nedanf\xF6r f\xE5r MP att bete sig konstigt efter \xE5terkomst av spelande backdots.ThumbnailImage = GUIGraphicsContext.Skin + @"\\Media\\DefaultFolderBackBig.png"; backdots.IconImage = GUIGraphicsContext.Skin + @"\\Media\\defaultFolderBack.png"; lstEmulators.Add(backdots); @@ -531,9 +529,8 @@ private void refreshROMList(ROMItem[] list, DB.SortButton type) { lstEmulators.Clear(); - //L\xE4gger till tillbaka-knappen + //Adds the back-button GUIListItem backdots = new GUIListItem(".."); - //TODO: Kan h\xE4nda att raden nedanf\xF6r f\xE5r MP att bete sig konstigt efter \xE5terkomst av spelande backdots.ThumbnailImage = GUIGraphicsContext.Skin + @"\\Media\\DefaultFolderBackBig.png"; backdots.IconImage = GUIGraphicsContext.Skin + @"\\Media\\defaultFolderBack.png"; lstEmulators.Add(backdots); Modified: trunk/plugins/MyEmulators/myEmulators/DB.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-02-19 11:19:27 UTC (rev 125) +++ trunk/plugins/MyEmulators/myEmulators/DB.cs 2007-02-19 16:06:40 UTC (rev 126) @@ -33,7 +33,7 @@ BUTTON_TOPGRADED } - //TODO: Kom ih\xE5g att skriva r\xE4tt version + //TODO: REMEMBER to put the correct version number! private static int current_version = 151; public static void launch() @@ -296,7 +296,7 @@ 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()) + "';"); } - //Kontrollerar vilka filer som ska f\xE5 visas + //Check which files will be shown public static bool filterFile(string filename, string[] filters) { for (int i = 0; i < filters.Length; i++) Modified: trunk/plugins/MyEmulators/myEmulators/Emulator.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/Emulator.cs 2007-02-19 11:19:27 UTC (rev 125) +++ trunk/plugins/MyEmulators/myEmulators/Emulator.cs 2007-02-19 16:06:40 UTC (rev 126) @@ -123,7 +123,7 @@ return usequotes; } - //TODO: s\xE5h\xE4r funkar getters och setters + //TODO: this is how getters och setters work public int View { get @@ -337,7 +337,7 @@ { filter = "*.*"; } - //Sparar informationen + //Saves the information if (indexInList < 0) { Emulator temp = new Emulator(emulator_path, ROM_path, emulator_name, filter, usequotes, view); Modified: trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj =================================================================== --- trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2007-02-19 11:19:27 UTC (rev 125) +++ trunk/plugins/MyEmulators/myEmulators/myEmulators.csproj 2007-02-19 16:06:40 UTC (rev 126) @@ -76,9 +76,6 @@ <DependentUpon>setupForm.cs</DependentUpon> </EmbeddedResource> </ItemGroup> - <ItemGroup> - <None Include="ClassDiagram1.cd" /> - </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Modified: trunk/plugins/MyEmulators/myEmulators/setupForm.cs =================================================================== --- trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2007-02-19 11:19:27 UTC (rev 125) +++ trunk/plugins/MyEmulators/myEmulators/setupForm.cs 2007-02-19 16:06:40 UTC (rev 126) @@ -101,7 +101,7 @@ //Save ROMs for (int i = 0; i < dataGridView1.Rows.Count; i++) { - //TODO: kolla att v\xE4rdena f\xF6r varje cell inte \xE4r null och r\xE4tt format + //TODO: check for not null and correct format DataGridViewRow row = dataGridView1.Rows[i]; ROMs[i].setName(((DataGridViewTextBoxCell)row.Cells[1]).Value.ToString()); ROMs[i].Grade = Int32.Parse(((DataGridViewComboBoxCell)row.Cells[3]).Value.ToString()); @@ -165,8 +165,9 @@ for (int i = 0; i < emulators.Count; i++) { listBox1.Items.Add(emulators[i].getName()); - //TODO: Kom ih\xE5g: S\xE5 fort man \xE4ndrar n\xE5t med listbox s\xE5 g\xF6rs - //den om till ickestatisk, s\xE5 det m\xE5ste \xE4ndras i definitionen + //TODO: REMEMBER: if anything changes with listbox, it will + //be remade as non-static and errors will occur. It has to be + //changed to static in the definition each time (setupForm.Designer.cs) } } @@ -262,7 +263,7 @@ private void listBox1_KeyPress(object sender, KeyPressEventArgs e) { - //TODO: kolla om e.getchar() =0 'DEL' + //TODO: catch delete key //{ // remove_Click_1(sender, EventArgs.Empty); //} @@ -326,7 +327,7 @@ private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) { - //TODO: S\xE4tt flaggan att r\xE4tt romitem \xE4r \xE4ndrad och spara sedan bara de som \xE4r \xE4ndrade + //TODO: Set a flag that changes have been made and only save the ROMItems that has the flag set } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |