From: <che...@us...> - 2007-06-24 16:20:56
|
Revision: 624 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=624&view=rev Author: chef_koch Date: 2007-06-24 09:20:49 -0700 (Sun, 24 Jun 2007) Log Message: ----------- when creating default views, localized codes are used now Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/myProgramsAltViews_example.xml Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-24 15:51:37 UTC (rev 623) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-24 16:20:49 UTC (rev 624) @@ -72,7 +72,7 @@ //manufacturer ViewDefinition viewManufacturer = new ViewDefinition(); - viewManufacturer.Name = "Manufacturer"; + viewManufacturer.Name = "13031"; filter1 = new FilterDefinition(); filter1.Where = "manufacturer"; ; filter1.SortAscending = true; filter2 = new FilterDefinition(); filter2.Where = "filename"; ; filter2.SortAscending = true; viewManufacturer.Filters.Add(filter1); @@ -80,7 +80,7 @@ //Alphabetical ViewDefinition viewAlphabetical = new ViewDefinition(); - viewAlphabetical.Name = "Alphabetical"; + viewAlphabetical.Name = "13034"; filter1 = new FilterDefinition(); filter1.Where = "title"; filter1.SqlOperator = "group by"; @@ -94,7 +94,7 @@ //genre ViewDefinition viewGenre = new ViewDefinition(); - viewGenre.Name = "Genre"; + viewGenre.Name = "135"; filter1 = new FilterDefinition(); filter1.Where = "mainGenre"; ; filter1.SortAscending = true; filter2 = new FilterDefinition(); filter2.Where = "subGenre"; ; filter2.SortAscending = true; filter3 = new FilterDefinition(); filter3.Where = "filename"; ; filter3.SortAscending = true; @@ -105,7 +105,7 @@ //rating ViewDefinition viewRating = new ViewDefinition(); - viewRating.Name = "Rating"; + viewRating.Name = "931"; filter1 = new FilterDefinition(); filter1.Where = "rating"; ; filter1.SortAscending = false; filter2 = new FilterDefinition(); filter2.Where = "filename"; ; filter2.SortAscending = true; viewRating.Filters.Add(filter1); @@ -113,7 +113,7 @@ //year ViewDefinition viewYear = new ViewDefinition(); - viewYear.Name = "Year"; + viewYear.Name = "987"; filter1 = new FilterDefinition(); filter1.Where = "year"; ; filter1.SortAscending = true; filter2 = new FilterDefinition(); filter2.Where = "filename"; ; filter2.SortAscending = true; viewYear.Filters.Add(filter1); @@ -121,13 +121,13 @@ //most launched ViewDefinition viewMostLaunched = new ViewDefinition(); - viewMostLaunched.Name = "Most Launched"; + viewMostLaunched.Name = "13032"; filter1 = new FilterDefinition(); filter1.Where = "launchcount"; filter1.SqlOperator = ">"; filter1.Restriction = "0"; filter1.SortAscending = false; viewMostLaunched.Filters.Add(filter1); //most recently launched ViewDefinition viewMostRecentlyLaunched = new ViewDefinition(); - viewMostRecentlyLaunched.Name = "Most Recently Launched"; + viewMostRecentlyLaunched.Name = "13033"; filter1 = new FilterDefinition(); filter1.Where = "lastTimeLaunched"; ; filter1.SortAscending = false; filter1.Limit = 100; viewMostRecentlyLaunched.Filters.Add(filter1); Deleted: trunk/plugins/myGUIProgramsAlt/myProgramsAltViews_example.xml =================================================================== --- trunk/plugins/myGUIProgramsAlt/myProgramsAltViews_example.xml 2007-06-24 15:51:37 UTC (rev 623) +++ trunk/plugins/myGUIProgramsAlt/myProgramsAltViews_example.xml 2007-06-24 16:20:49 UTC (rev 624) @@ -1,277 +0,0 @@ -<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> -<SOAP-ENV:Body> -<a1:ArrayList id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-2"/> -<_size>7</_size> -<_version>7</_version> -</a1:ArrayList> -<SOAP-ENC:Array id="ref-2" SOAP-ENC:arrayType="xsd:anyType[8]"> -<item href="#ref-3"/> -<item href="#ref-4"/> -<item href="#ref-5"/> -<item href="#ref-6"/> -<item href="#ref-7"/> -<item href="#ref-8"/> -<item href="#ref-9"/> -</SOAP-ENC:Array> -<a3:ViewDefinition id="ref-3" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-11"/> -<name id="ref-12">13031</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-4" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-13"/> -<name id="ref-14">135</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-5" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-15"/> -<name id="ref-16">931</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-6" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-17"/> -<name id="ref-18">987</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-7" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-19"/> -<name id="ref-20">13032</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-8" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-21"/> -<name id="ref-22">13033</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-9" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-23"/> -<name id="ref-24">13034</name> -</a3:ViewDefinition> -<a1:ArrayList id="ref-11" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-25"/> -<_size>2</_size> -<_version>143</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-13" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-26"/> -<_size>3</_size> -<_version>168</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-15" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-27"/> -<_size>2</_size> -<_version>173</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-17" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-28"/> -<_size>2</_size> -<_version>146</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-19" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-29"/> -<_size>1</_size> -<_version>179</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-21" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-30"/> -<_size>1</_size> -<_version>129</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-23" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-31"/> -<_size>2</_size> -<_version>111</_version> -</a1:ArrayList> -<SOAP-ENC:Array id="ref-25" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-32"/> -<item href="#ref-33"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-26" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-34"/> -<item href="#ref-35"/> -<item href="#ref-36"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-27" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-37"/> -<item href="#ref-38"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-28" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-39"/> -<item href="#ref-40"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-29" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-41"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-30" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-42"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-31" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-43"/> -<item href="#ref-44"/> -</SOAP-ENC:Array> -<a3:FilterDefinition id="ref-32" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction id="ref-45"></restriction> -<whereClause id="ref-46">manufacturer</whereClause> -<fromStatement id="ref-47"></fromStatement> -<sqloperator href="#ref-45"/> -<whereValue id="ref-48">*</whereValue> -<selectedValue href="#ref-47"/> -<defaultView id="ref-49">List</defaultView> -<defaultSort id="ref-50">Name</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-33" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-45"/> -<whereClause id="ref-51">title</whereClause> -<fromStatement href="#ref-47"/> -<sqloperator href="#ref-45"/> -<whereValue href="#ref-48"/> -<selectedValue href="#ref-47"/> -<defaultView href="#ref-49"/> -<defaultSort id="ref-52">Title</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-34" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-45"/> -<whereClause id="ref-53">mainGenre</whereClause> -<fromStatement href="#ref-47"/> -<sqloperator href="#ref-45"/> -<whereValue href="#ref-48"/> -<selectedValue href="#ref-47"/> -<defaultView id="ref-54">List</defaultView> -<defaultSort href="#ref-50"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-35" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-47"/> -<whereClause id="ref-55">subGenre</whereClause> -<fromStatement href="#ref-47"/> -<sqloperator href="#ref-47"/> -<whereValue href="#ref-48"/> -<selectedValue href="#ref-47"/> -<defaultView id="ref-56">List</defaultView> -<defaultSort id="ref-57">Name</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-36" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-45"/> -<whereClause id="ref-58">title</whereClause> -<fromStatement href="#ref-47"/> -<sqloperator href="#ref-45"/> -<whereValue href="#ref-48"/> -<selectedValue href="#ref-47"/> -<defaultView href="#ref-54"/> -<defaultSort href="#ref-52"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-37" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>false</sortAscending> -<restriction href="#ref-45"/> -<whereClause id="ref-59">rating</whereClause> -<fromStatement href="#ref-45"/> -<sqloperator href="#ref-45"/> -<whereValue id="ref-60">*</whereValue> -<selectedValue href="#ref-45"/> -<defaultView href="#ref-54"/> -<defaultSort id="ref-61">Rating</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-38" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-45"/> -<whereClause href="#ref-58"/> -<fromStatement href="#ref-45"/> -<sqloperator href="#ref-45"/> -<whereValue href="#ref-60"/> -<selectedValue href="#ref-45"/> -<defaultView href="#ref-54"/> -<defaultSort href="#ref-52"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-39" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-45"/> -<whereClause id="ref-62">year</whereClause> -<fromStatement href="#ref-45"/> -<sqloperator href="#ref-45"/> -<whereValue href="#ref-60"/> -<selectedValue href="#ref-45"/> -<defaultView href="#ref-54"/> -<defaultSort href="#ref-50"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-40" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-45"/> -<whereClause href="#ref-58"/> -<fromStatement href="#ref-45"/> -<sqloperator href="#ref-45"/> -<whereValue href="#ref-60"/> -<selectedValue href="#ref-45"/> -<defaultView href="#ref-54"/> -<defaultSort href="#ref-52"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-41" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>false</sortAscending> -<restriction id="ref-63">0</restriction> -<whereClause id="ref-64">launchcount</whereClause> -<fromStatement href="#ref-45"/> -<sqloperator id="ref-65">></sqloperator> -<whereValue href="#ref-60"/> -<selectedValue href="#ref-45"/> -<defaultView id="ref-66">List</defaultView> -<defaultSort id="ref-67">LaunchCount</defaultSort> -<limit>100</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-42" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>false</sortAscending> -<restriction id="ref-68">01.01.0001 00:00:00</restriction> -<whereClause id="ref-69">lastTimeLaunched</whereClause> -<fromStatement href="#ref-45"/> -<sqloperator id="ref-70">></sqloperator> -<whereValue href="#ref-60"/> -<selectedValue href="#ref-45"/> -<defaultView id="ref-71">List</defaultView> -<defaultSort id="ref-72">LastTimeLaunched</defaultSort> -<limit>100</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-43" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction id="ref-73">1</restriction> -<whereClause id="ref-74">title</whereClause> -<fromStatement href="#ref-45"/> -<sqloperator id="ref-75">group by</sqloperator> -<whereValue id="ref-76">*</whereValue> -<selectedValue href="#ref-45"/> -<defaultView id="ref-77">List</defaultView> -<defaultSort id="ref-78">Name</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-44" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.9991%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-45"/> -<whereClause href="#ref-74"/> -<fromStatement href="#ref-45"/> -<sqloperator href="#ref-45"/> -<whereValue href="#ref-76"/> -<selectedValue href="#ref-45"/> -<defaultView href="#ref-77"/> -<defaultSort id="ref-79">Name</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -</SOAP-ENV:Body> -</SOAP-ENV:Envelope> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-07-12 18:58:39
|
Revision: 689 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=689&view=rev Author: northern_sky Date: 2007-07-12 11:58:38 -0700 (Thu, 12 Jul 2007) Log Message: ----------- small changes Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -733,77 +733,7 @@ } } - public virtual void OnInfo(GUIListItem item, ref bool isOverviewVisible, ref ProgramInfoAction modalResult, ref int selectedFileID) - { - // GUIFileInfo fileInfoDialog = (GUIFileInfo)GUIWindowManager.GetWindow(ProgramUtils.ProgramInfoID); - // if (fileInfoDialog == null) return; - // if (item.MusicTag == null) return; - //FileItem curFile = (FileItem)item.MusicTag; - //if (curFile == null) return; - /* fileInfoDialog.App = this; - fileInfoDialog.File = curFile; - fileInfoDialog.IsOverviewVisible = isOverviewVisible; - fileInfoDialog.DoModal(GetID); - isOverviewVisible = fileInfoDialog.IsOverviewVisible; - modalResult = fileInfoDialog.ModalResult; - selectedFileID = fileInfoDialog.SelectedFileID; - return;*/ - } - - - #region old sorting stuff, some(all) might be obsolete, but maybe usefull for improving new sorting method - - public virtual void OnSort(GUIFacadeControl view, bool doSwitchState) - { - /* - * if (!filesAreLoaded) - { - LoadFiles(); - } - - if (doSwitchState) - { - dbPc.UpdateState(); - } - view.Sort(dbPc); - */ - } - - /* public virtual void OnSortToggle(GUIFacadeControl view) - { - // dbPc.SortAscending = (!dbPc.SortAscending); - //view.Sort(dbPc); - } - - public virtual int GetCurrentSortIndex() - { - return dbPc.CurrentSortMethodIndex; - } - - public virtual void SetCurrentSortIndex(int newValue) - { - dbPc.CurrentSortMethodIndex = newValue; - } - - public virtual string CurrentSortTitle() - { - return dbPc.CurrentSortMethodAsText; - } - - public virtual bool GetCurrentSortIsAscending() - { - return dbPc.SortAscending; - } - - public virtual void SetCurrentSortIsAscending(bool newValue) - { - dbPc.SortAscending = newValue; - } - */ - #endregion - - public virtual bool RefreshButtonVisible() { return false; // otherwise, override this in child class Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -65,8 +65,8 @@ newApp.Arguments = ProgramUtils.Get(results, recordIndex, "arguments"); newApp.WindowStyle = ProgramUtils.GetProcessWindowStyle(results, recordIndex, "windowstyle"); newApp.StartupDir = ProgramUtils.Get(results, recordIndex, "startupdir"); - newApp.UseShellExecute = ProgramUtils.GetBool(results, recordIndex, "useshellexecute"); - newApp.UseQuotes = ProgramUtils.GetBool(results, recordIndex, "usequotes"); + newApp.UseShellExecute = ProgramUtils.GetBool(results, recordIndex, "useShellExecute"); + newApp.UseQuotes = ProgramUtils.GetBool(results, recordIndex, "useQuotes"); newApp.SourceType = ProgramUtils.GetSourceType(results, recordIndex, "applicationItemType"); newApp.Source = ProgramUtils.Get(results, recordIndex, "source"); newApp.Imagefile = ProgramUtils.Get(results, recordIndex, "imagefile"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -1030,103 +1030,5 @@ } } } - - public string GetValueOfTag(string TagName) - { - string strLowerTag = TagName.ToLower() + "="; - string strLowerItem = ""; - string result = ""; - foreach (string strItem in this.tagData.Split('\r')) - { - strLowerItem = strItem.ToLower(); - if (strLowerItem.StartsWith(strLowerTag)) - { - result = strItem.Remove(0, strLowerTag.Length); - } - else if (strLowerItem.StartsWith("\n" + strLowerTag)) - { - result = strItem.Remove(0, strLowerTag.Length + 1); - } - } - result = result.Replace("\n", ""); - result = result.Replace("\r", ""); - result = result.TrimStart('\"'); - result = result.TrimEnd('\"'); - return result; - } - - public string GetValueOfCategory(int CatIndex) - { - string result = ""; - List<string> Categories = new List<string>(categoryData.Split('\r')); - if ((CatIndex >= 0) && (CatIndex <= Categories.Count - 1)) - { - string strLine = (string)Categories[CatIndex]; - strLine = strLine.TrimStart('\r'); - bool bValueLine = false; - bool bFirst = true; - string strSep = ""; - foreach (string strToken in strLine.Split('=')) - { - //Log.Info("getvalueofcategory dw token {0}", strToken); - if (!bFirst) - { - bValueLine = true; - // bValueLine = strToken.EndsWith("\""); - } - if (bValueLine) - { - result = result + strSep + strToken; - strSep = "="; - } - bFirst = false; - } - } - result = result.Replace("\n", ""); - result = result.Replace("\r", ""); - result = result.TrimStart('\"'); - result = result.TrimEnd('\"'); - return result; - } - - public string GetNameOfCategory(int CatIndex) - { - string result = ""; - List<string> Categories = new List<string>(categoryData.Split('\r')); - if ((CatIndex >= 0) && (CatIndex <= Categories.Count - 1)) - { - string strLine = (string)Categories[CatIndex]; - strLine = strLine.TrimStart('\r'); - bool bValueLine = false; - bool bFirst = true; - string strSep = ""; - foreach (string strToken in strLine.Split('=')) - { - strToken.Replace("\n", ""); - strToken.Replace("\r", ""); - //Log.Info("getnameofcategory dw token {0}", strToken); - if (!bFirst) - { - //doesn't work bValueLine = strToken.EndsWith("\""); - bValueLine = true; - } - if (!bValueLine) - { - result = result + strSep + strToken; - strSep = "="; - } - else - { - break; - } - bFirst = false; - } - } - result = result.Replace("\n", ""); - result = result.Replace("\r", ""); - result = result.TrimStart('\"'); - result = result.TrimEnd('\"'); - return result; - } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -1451,46 +1451,6 @@ - /* void OnInfo() - { - // <F3> keypress - if (null != lastApp) - { - selectedItemIndex = GetSelectedItemNo(); - GUIListItem item = GetSelectedItem(); - - FileItem curFile = null; - - if (!item.Label.Equals(ProgramUtils.cBackLabel) && (!item.IsFolder)) - { - if ((item.MusicTag != null) && (item.MusicTag is FileItem)) - { - curFile = (FileItem)item.MusicTag; - } - // show file info but only if the selected item is not the back button - bool ovVisible = mapSettings.OverviewVisible; - ProgramInfoAction modalResult = ProgramInfoAction.LookupFileInfo; - int selectedFileID = -1; - lastApp.OnInfo(item, ref ovVisible, ref modalResult, ref selectedFileID); - if ((null != curFile) && (modalResult == ProgramInfoAction.LookupFileInfo)) - { - FileItem scrapeFile = lastApp.Files.GetFileItemByID(selectedFileID); - if (null != scrapeFile) - { - int scrapeIndex = lastApp.Files.IndexOf(scrapeFile); - if (-1 != scrapeIndex) - { - GUIControl.SelectItemControl(GetID, facadeView.GetID, scrapeIndex + 1); - } - ScrapeFileInfo(scrapeFile); - } - } - mapSettings.OverviewVisible = ovVisible; - UpdateListControl(); - } - } - } - */ protected void OnInfo() { @@ -1507,7 +1467,8 @@ { curFile = (FileItem)item.MusicTag; GUIProgramsAltFileInfo fileInfo = (GUIProgramsAltFileInfo)GUIWindowManager.GetWindow(9999); - fileInfo.Movie = curFile; + fileInfo.CurrentFileItem = curFile; + fileInfo.CurrentApplicationItem = lastApp; fileInfo.FolderForThumbs = string.Empty; GUIWindowManager.ActivateWindow(9999); } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-07-12 18:58:38 UTC (rev 689) @@ -58,8 +58,7 @@ protected GUIButtonControl launchButton = null; [SkinControlAttribute(3)] protected GUIToggleButtonControl overviewInfoButton = null; - [SkinControlAttribute(4)] - protected GUIToggleButtonControl btnCast = null; + [SkinControlAttribute(5)] protected GUIButtonControl btnRefresh = null; @@ -76,16 +75,14 @@ [SkinControlAttribute(30)] protected GUILabelControl lblImage = null; + FileItem currentFileItem = null; + ApplicationItem currentApplicationItem = null; - - enum ViewMode + public ApplicationItem CurrentApplicationItem { - Image, - Cast, + get { return currentApplicationItem; } + set { currentApplicationItem = value; } } - - ViewMode viewmode = ViewMode.Image; - FileItem currentFileItem = null; string folderForThumbs = string.Empty; string[] coverArtUrls = new string[1]; string imdbCoverArtUrl = String.Empty; @@ -119,8 +116,6 @@ ResetSpinControl(); - viewmode = ViewMode.Image; - Refresh(false); Update(); imageSearchThread = new Thread(new ThreadStart(AmazonLookupThread)); @@ -167,33 +162,19 @@ VideoDatabase.SetThumbURL(idMovie, currentFileItem.Imagefile); return; } - - if (control == btnCast) - { - viewmode = ViewMode.Cast; - Update(); - } if (control == overviewInfoButton) { - - viewmode = ViewMode.Image; Update(); } if (control == launchButton) { - int id = currentFileItem.FileID; - - //fix hack later - // ApplicationItem a = new ApplicationItem(DatabaseHandler.sqlDB); - // a.LaunchFile(leItem, true); - // GUIVideoFiles.PlayMovie(id); - return; + CurrentApplicationItem.LaunchFile(CurrentFileItem, true); } } - public FileItem Movie + public FileItem CurrentFileItem { get { return currentFileItem; } set { currentFileItem = value; } @@ -209,7 +190,7 @@ if (currentFileItem == null) return; //cast->image - if (viewmode == ViewMode.Cast) + /* if (viewmode == ViewMode.Cast) { tblOverviewInfoArea.IsVisible = false; tbTextArea.IsVisible = true; @@ -224,9 +205,7 @@ tbTextArea.IsVisible = false; imgCoverArt.IsVisible = true; overviewInfoButton.Selected = true; - btnCast.Selected = false; - - } + }*/ //btnWatched.Selected = (currentFileItem.Watched != 0); currentFileItem.SetProperties(); if (imgCoverArt != null) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml 2007-07-12 18:58:38 UTC (rev 689) @@ -53,48 +53,16 @@ <posX>60</posX> <posY>97</posY> <width>120</width> - <label>208</label> + <label>Launch</label> <font>font13</font> <onleft>22</onleft> <onright>22</onright> - <onup>7</onup> - <ondown>3</ondown> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> - <control> - <description>Overview</description> - <type>togglebutton</type> - <id>3</id> - <posX>60</posX> - <posY>131</posY> - <width>120</width> - <label>207</label> - <font>font13</font> - <onleft>22</onleft> - <onright>22</onright> - <onup>2</onup> - <ondown>4</ondown> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> - <!--<control> - <description>Cast</description> - <type>togglebutton</type> - <id>4</id> - <posX>60</posX> - <posY>165</posY> - <width>120</width> - <label>206</label> - <font>font13</font> - <onleft>22</onleft> - <onright>22</onright> - <onup>3</onup> + <onup>10</onup> <ondown>5</ondown> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> - </control>--> - <control> + </control> + <control> <description>Refresh</description> <type>button</type> <id>5</id> @@ -104,26 +72,11 @@ <label>184</label> <onleft>22</onleft> <onright>22</onright> - <onup>4</onup> - <ondown>6</ondown> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> -<!-- <control> - <description>Watched</description> - <type>togglebutton</type> - <id>6</id> - <posX>60</posX> - <posY>233</posY> - <width>120</width> - <label>1010</label> - <onleft>22</onleft> - <onright>22</onright> - <onup>5</onup> + <onup>2</onup> <ondown>10</ondown> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> - </control>--> + </control> <control> <description>image title:</description> <type>label</type> @@ -143,8 +96,8 @@ <id>10</id> <posX>60</posX> <posY>292</posY> - <onup>6</onup> - <ondown>11</ondown> + <onup>5</onup> + <ondown>2</ondown> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> </control> @@ -191,54 +144,30 @@ <animation effect="fade" time="200">WindowClose</animation> </control> <control> - <description>Main Genre</description> + <description>Genre</description> <type>label</type> <id>1</id> <posX>400</posX> <posY>160</posY> - <label>Maingenre</label> + <label>Genre</label> <font>font13</font> <textcolor>FFB2D4F5</textcolor> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> </control> <control> - <description>MainGenre value</description> + <description>Genre value</description> <type>label</type> <id>1</id> <posX>400</posX> <posY>175</posY> - <label>#maingenre</label> + <label>#maingenre/#subgenre</label> <font>font13</font> <textcolor>FFFFFFFF</textcolor> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> </control> <control> - <description>SubGenre</description> - <type>label</type> - <id>1</id> - <posX>400</posX> - <posY>205</posY> - <label>Subgenre</label> - <font>font13</font> - <textcolor>FFB2D4F5</textcolor> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> - <control> - <description>SubGenre value</description> - <type>label</type> - <id>1</id> - <posX>400</posX> - <posY>220</posY> - <label>#subgenre</label> - <font>font13</font> - <textcolor>FFFFFFFF</textcolor> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> - <control> <description>Year txt</description> <type>label</type> <id>1</id> Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-07-12 05:54:07 UTC (rev 688) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-07-12 18:58:38 UTC (rev 689) @@ -1,4 +1,4 @@ -Work in progress on an alternative/update to myprograms. +WIP on an alternative/update to myprograms. Still features and bugs to fix. Do NOT USE on your real MP-installation, only for tests.. Bug-reports ,not yet, there are a few=) known to fix first. @@ -7,6 +7,7 @@ :--INSTALLATION Copy contents of metadata-folder to MP root folder , and the GUIPrograms.dll to MP/windowsplugins to run. +Copy skin to relevant folder. There will possibly be db-changes and xml-changes between versions, so always make sure that you have a clean install between updates. So far: @@ -101,32 +102,9 @@ Above: mabey add an advanced option for the user. In short, allowing a merge between "easy setup" (as above) and total control filepaths etc. - - What should be the name for the plugin, when we will release it? - -Imo MyProgramsAlt sounds a bit uggly. I think it should not be too long and complicated. - - MyProgramsV2 - - MyProgramsAlt - - MyProgramsAlternative - - NewMyPrograms - - NewPrograms - ..... - could contain: new, alt -What about using a complete new name? - something with Games or Emu? +MyEmu... --myGemu --nahh --myEmu maybe... there already is myEmulators--- but this would be the most fitting maybe, as i plan to add a lot of preconfigs for this kind of stuff. --myProgramsV2 ...boring --myProgramsRemix -- nope -What do you feel is the best? - - - What about an BackUp feature? - I you wanna do it.... ...Same goes for report features. -Don't worry should not backup all stuff, just save in any fileformat you want: - - filepath and filename: to identify the file - - Launchcount - - LastTimeLaunched - - Add some more specific emulator support.. - using emulator ids??? can be used for - filter in fileinfoscraperForm.. we got system id's now.. so feel free to implement.Will add emulator table at some point. @@ -137,6 +115,8 @@ - saving the path to file for import - saving the path to image dir, or using thumbsDir of MP, are there any pros? + + Iso mounting -> pro/contra??? "Minimize MP before starting a file" as a new option for application items: @@ -160,4 +140,11 @@ - Remotes, in general, maybe we should handle it like DirectInput imo lower priority, if you play with keyboard, use it to close the app, if you play with joystick try first point +----Won't do--------------- + - What about an BackUp feature? - I you wanna do it.... ...Same goes for report features. +Don't worry should not backup all stuff, just save in any fileformat you want: + - filepath and filename: to identify the file + - Launchcount + - LastTimeLaunched + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-07-28 08:35:12
|
Revision: 780 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=780&view=rev Author: northern_sky Date: 2007-07-28 01:35:10 -0700 (Sat, 28 Jul 2007) Log Message: ----------- replaced dbcalls with opensource ado.net System.Data.SQLite + misc other changes It rocks! Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilterItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs trunk/plugins/myGUIProgramsAlt/README.txt Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/SqlNet/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/SqlNet/System.Data.SQLite.DLL Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -27,13 +27,13 @@ using System.Collections; using System.Collections.Generic; using System.IO; +using System.Data; using MediaPortal.GUI.Library; using GUIPrograms; -using SQLite.NET; using MediaPortal.Database; using MediaPortal.Util; using MediaPortal.Configuration; - +using System.Data.SQLite; using GUIPrograms.Items; namespace GUIPrograms.Database @@ -43,7 +43,10 @@ /// </summary> public class DatabaseHandler { - public static SQLiteClient sqlDB = null; + + private static SQLiteConnection sqlLiteConn = null; + + static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; @@ -62,8 +65,11 @@ //check if database exists if (!File.Exists(DatabasePath)) { - sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, DATABASEFILE)); - DatabaseUtility.SetPragmas(sqlDB); + SQLiteConnection.CreateFile(Config.GetFile(Config.Dir.Database, DATABASEFILE)); + string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE); + sqlLiteConn = new SQLiteConnection(connString); + + SetPragmas(); // make sure the DB-structure is complete CreateDBTables(); @@ -73,9 +79,9 @@ } else { - sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, DATABASEFILE)); - - } + string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE) + ";Version=3"; + sqlLiteConn = new SQLiteConnection(connString); + } //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); LoadAllApplicationItems(); } @@ -83,10 +89,16 @@ { Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } - - } + static private void SetPragmas() + { + ExecuteStmtNonQuery("PRAGMA default_cache_size=3000"); + ExecuteStmtNonQuery("PRAGMA count_changes=1"); + ExecuteStmtNonQuery("PRAGMA short_column_names=1"); + ExecuteStmtNonQuery("PRAGMA auto_vacuum=1"); + } + /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) { ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); @@ -96,75 +108,94 @@ } }*/ + // we can always keep an connection open in sqllite.. + //to expensive closing it + public static SQLiteConnection SqlLiteConn + { + get + { + if (sqlLiteConn.State == ConnectionState.Closed) + { + sqlLiteConn.Open(); + } + return sqlLiteConn; + } + } + /// <summary> /// Create db tables etc,if not already exist /// </summary> /// <returns></returns> static bool CreateDBTables() { - if (sqlDB == null) - return false; - - - DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", @"CREATE TABLE + string sqlStmt = @"CREATE TABLE tblApplicationItem ( applicationId INTEGER PRIMARY KEY, - fatherNodeId INTEGER, + fatherNodeId INTEGER, title TEXT, filename TEXT, arguments TEXT, windowstyle TEXT, startupdir TEXT, - useShellExecute TEXT, - useQuotes TEXT, + useShellExecute BOOL, + useQuotes BOOL, applicationItemType TEXT, source TEXT, imagefile TEXT, filedirectory TEXT, imagedirectory TEXT, validExtensions TEXT, - enabled TEXT, - importValidImagesOnly TEXT, - iposition INTEGER, - refreshGUIAllowed TEXT, + enabled BOOL, + importValidImagesOnly BOOL, + iposition INTEGER, + refreshGUIAllowed BOOL, systemdefault TEXT, - waitForExit TEXT, + waitForExit BOOL, preLaunch TEXT, postLaunch TEXT - )"); + )"; - DatabaseUtility.AddTable(sqlDB, "tblFileItem", "CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, import_flag INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, isfolder TEXT, uppertitle TEXT,categorydata TEXT, gameInfoUrl TEXT)"); - DatabaseUtility.AddTable(sqlDB, "tblFilterItem", "CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"); - DatabaseUtility.AddTable(sqlDB, "tblSetting", "CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"); + ExecuteStmtNonQuery(sqlStmt); - DatabaseUtility.AddTable(sqlDB, "tblGenre", @"CREATE TABLE + + sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, isfolder BOOL, categorydata TEXT, gameInfoUrl TEXT)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; + ExecuteStmtNonQuery(sqlStmt); + + sqlStmt = @"CREATE TABLE tblGenre ( genreId INTEGER PRIMARY KEY, genre TEXT - )"); - - DatabaseUtility.AddTable(sqlDB, "tblPlatform", @"CREATE TABLE + )"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblPlatform ( platformId INTEGER PRIMARY KEY, platform TEXT - )"); - - DatabaseUtility.AddTable(sqlDB, "tblManufacturer", @"CREATE TABLE + )"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblManufacturer ( manufacturerId INTEGER PRIMARY KEY, manufacturer TEXT - )"); - - - DatabaseUtility.AddIndex(sqlDB, "idxFile1", "CREATE INDEX idxFile1 ON tblFileItem(applicationId)"); - DatabaseUtility.AddIndex(sqlDB, "idxApp1", "CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"); - DatabaseUtility.AddIndex(sqlDB, "idxFilterItem1", "CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"); + )"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; + ExecuteStmtNonQuery(sqlStmt); + return true; } @@ -174,9 +205,8 @@ /// </summary> private static void InsertDefaultDBValues() { - //Insert these - - sqlDB.Execute(@"INSERT INTO + + string sqlStmt = @"INSERT INTO tblGenre ( genre @@ -184,9 +214,11 @@ VALUES ( 'Unknown' - )"); + )"; - sqlDB.Execute(@"INSERT INTO + ExecuteStmtNonQuery(sqlStmt); + + sqlStmt = @"INSERT INTO tblManufacturer ( manufacturer @@ -194,10 +226,12 @@ VALUES ( 'Unknown' - )"); + )"; - sqlDB.Execute(@"INSERT INTO + ExecuteStmtNonQuery(sqlStmt); + + sqlStmt = @"INSERT INTO tblPlatform ( platform @@ -205,20 +239,23 @@ VALUES ( 'Unknown' - )"); + )"; - FillDefaultDBLexiconHelper("tblPlatform","platform",CreateSystemLexiconList()); - FillDefaultDBLexiconHelper("tblManufacturer","manufacturer",CreateManufacturerLexiconList()); + ExecuteStmtNonQuery(sqlStmt); + + FillDefaultDBLexiconHelper("tblPlatform", "platform", CreateSystemLexiconList()); + FillDefaultDBLexiconHelper("tblManufacturer", "manufacturer", CreateManufacturerLexiconList()); FillDefaultDBLexiconHelper("tblGenre", "genre", CreateGenreLexiconList()); } - private static void FillDefaultDBLexiconHelper(string tableName,string columnName,List<string> itemList) + private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) {// dont support parameters..... yet at least //AND mediaportals sqlite support dont support multiple inserst with ; bettween... gaaa //change to to net provider as soon as we can - string sqlStmt = ""; + string sqlStmt = string.Empty; + foreach (string insertValue in itemList) { sqlStmt = @" @@ -232,18 +269,17 @@ '" + insertValue + @"' );"; - sqlDB.Execute(sqlStmt); + ExecuteStmtNonQuery(sqlStmt); } - - } #region dbsettings static public string ReadSetting(string Key) { - SQLiteResultSet results; - string res = null; - string SQL = @" + string sqlStmt = string.Empty; + + string keyValue = string.Empty; + sqlStmt = @" SELECT value @@ -253,36 +289,30 @@ WHERE key ='" + Key + "'"; - results = sqlDB.Execute(SQL); - if (results != null && results.Rows.Count > 0) + object o = ExecuteStmtScalar(sqlStmt); + if (o != null) { - SQLiteResultSet.Row arr = results.Rows[0]; - res = arr.fields[0]; + keyValue = o.ToString(); } - //Log.Info("dw read setting key:{0}\nvalue:{1}", Key, applicationItem); - return res; + return keyValue; } static int CountKey(string Key) { - SQLiteResultSet results; - int res = 0; - results = sqlDB.Execute(@" + string sqlStmt = string.Empty; + int keyValue = 0; + sqlStmt = @" SELECT COUNT(*) FROM tblSetting - WHERE key ='" + Key + "'"); + WHERE key ='" + Key + "'"; - if (results != null && results.Rows.Count > 0) - { - SQLiteResultSet.Row arr = results.Rows[0]; - res = Int32.Parse(arr.fields[0]); - } - return res; + keyValue = Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); + return keyValue; } static public bool KeyExists(string Key) @@ -292,9 +322,11 @@ static public void WriteSetting(string Key, string Value) { + string sqlStmt = string.Empty; + if (KeyExists(Key)) { - sqlDB.Execute(@" + sqlStmt = @" UPDATE tblSetting @@ -302,31 +334,34 @@ value = '" + Value + @"' WHERE - key = '" + Key + "'"); + key = '" + Key + "'"; + } else { - sqlDB.Execute(@" + sqlStmt = @" INSERT INTO tblSetting (key, value) - VALUES('" + Key + "', '" + Value + "')"); + VALUES('" + Key + "', '" + Value + "')"; } + ExecuteStmtNonQuery(sqlStmt); } static public void DeleteSetting(string Key) { - sqlDB.Execute("DELETE FROM tblSetting WHERE key = '" + Key + "'"); + + string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; + ExecuteStmtNonQuery(sqlStmt); } #endregion dbsettings public static int LexiconDataExists(string tableName, string columnName, string fieldValue) { - SQLiteResultSet result = null; string sqlStmt = @" SELECT - * + " + columnName + @"id FROM " + tableName + @" @@ -343,20 +378,22 @@ VALUES ( '" + ProgramUtils.Encode(fieldValue) + @"' - )"; + );"; try { - result = sqlDB.Execute(sqlStmt); - if (result.Rows.Count > 0) + + object o = ExecuteStmtScalar(sqlStmt); + + //lexion didnt exist, we save it + if (o == null) { - return Convert.ToInt32(result.Rows[0].fields[0]); + ExecuteStmtNonQuery(sqlStmtInsert); + return Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); } else - {//lexion didnt exist, we save it - - sqlDB.Execute(sqlStmtInsert); - return sqlDB.LastInsertID(); + { + return Convert.ToInt32(o); } } catch (SQLiteException ex) @@ -367,7 +404,7 @@ #region default lexiconvalues - private static List<string> CreateGenreLexiconList() + private static List<string> CreateGenreLexiconList() { List<string> genreList = new List<string>(); @@ -379,7 +416,7 @@ return genreList; } - private static List<string> CreateManufacturerLexiconList() + private static List<string> CreateManufacturerLexiconList() { List<string> manufacturerList = new List<string>(); @@ -390,7 +427,7 @@ return manufacturerList; } - private static List<string> CreateSystemLexiconList() + private static List<string> CreateSystemLexiconList() { List<string> systemList = new List<string>(); @@ -412,20 +449,88 @@ } } + static public ItemType GetItemType(string columnName, string tableName, int id) + { + ItemType itemType = ItemType.UNKNOWN; + + string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; + + itemType = ProgramUtils.StringToSourceType(ExecuteStmtScalar(sqlStmt).ToString()); + return itemType; + } + + + public static DataTable ExecuteStmtDataTable(string stmt) + { + DataTable dataTable = new DataTable(); + + try + { + + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + using (SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(command)) + { + dataAdapter.Fill(dataTable); + } + } + } + catch (Exception exception) + { + throw exception; + } + return dataTable; + } + + public static void ExecuteStmtNonQuery(string stmt) + { + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + command.ExecuteNonQuery(); + } + } + catch (Exception exception) + { + throw exception; + } + } + + + public static object ExecuteStmtScalar(string stmt) + { + object o = null; + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + o = command.ExecuteScalar(); + } + } + catch (Exception exception) + { + throw exception; + } + return o; + } + public static void LoadAllApplicationItems() { try { globalApplicationItemList.Clear(); - SQLiteResultSet results = sqlDB.Execute("select * from tblApplicationItem order by iposition"); - if (results.Rows.Count == 0) - return; - - for (int row = 0; row < results.Rows.Count; row++) + string sqlStmt = "select * from tblApplicationItem order by iposition"; + DataTable dataTable = ExecuteStmtDataTable(sqlStmt); + + foreach (DataRow row in dataTable.Rows) { - ApplicationItem applicationItem = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem( ProgramUtils.GetSourceType(results, row, "applicationItemType"), results, row); - // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); + ApplicationItem applicationItem = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(GetItemType("applicationItemType", "tblApplicationItem", Convert.ToInt32(row["applicationId"])), row); + // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); globalApplicationItemList.Add(applicationItem); } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -228,7 +228,7 @@ private void AddItem() { - FileItem file = new FileItem(currentApplication.db); + FileItem file = new FileItem(); file.AppID = currentApplication.AppID; // CRUCIAL!! :-) FileDetailsForm frmFileDetails = new FileDetailsForm(); frmFileDetails.CurApp = currentApplication; @@ -541,7 +541,7 @@ foreach (ListViewItem curItem in fileListView.SelectedItems) { FileItem curFile = (FileItem)curItem.Tag; - FilelinkItem newLink = new FilelinkItem(currentApplication.db); + FilelinkItem newLink = new FilelinkItem(); // example: "add the 'MAME' game 'r-type' to the 'top 20 shooters'" // 'MAME' : targetAppID // 'r-type': fileid Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -34,7 +34,7 @@ using GUIPrograms; using GUIPrograms.Items; using GUIPrograms.Database; -using SQLite.NET; +using System.Data.SQLite; namespace GUIPrograms.Design @@ -116,9 +116,11 @@ List<ListItem> listItemList = new List<ListItem>(); - SQLiteResultSet resultSet = null; + SQLiteCommand command = DatabaseHandler.SqlLiteConn.CreateCommand(); + + - string sqlStmt = @" + command.CommandText = @" SELECT * @@ -129,29 +131,27 @@ try { - resultSet = DatabaseHandler.sqlDB.Execute(sqlStmt); + + using (SQLiteDataReader dataReader = command.ExecuteReader()) + { + while (dataReader.Read()) + { + + ListItem listItem = new ListItem(dataReader[1].ToString(), Convert.ToInt32(dataReader[0])); + listItemList.Add(listItem); + + } + } } catch (Exception exception) { throw exception; } - if (resultSet.Rows.Count > 0) - { - for (int i = 0; i < resultSet.Rows.Count; i++) - { - //genreid why oh why cant the implementation offer getvalue from columname... arrghr - //maybe can use the sqlnet provider later on.. - - ListItem listItem = new ListItem(resultSet.Rows[i].fields[1].ToString(), Convert.ToInt32(resultSet.Rows[i].fields[0])); - listItemList.Add(listItem); - } - - comboBox.DataSource = listItemList; comboBox.ValueMember = "Value"; comboBox.DisplayMember = "Text"; - } + } private void UpdateComboBoxes() Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -10,7 +10,7 @@ using System.Windows.Forms; using MediaPortal.GUI.Library; using MediaPortal.Util; -using SQLite.NET; +using System.Data.SQLite; using MediaPortal.Configuration; using System.IO; @@ -78,7 +78,7 @@ public SetupForm() { InitializeComponent(); - + appSettingsFileEditView.OnRefreshClick += new EventHandler(this.RefreshClick); //when imagefolder was clicked on filesview... appSettingsFileEditView.OnImageFolderSearch += new EventHandler(this.ImageSearchClick); @@ -341,7 +341,7 @@ #endregion Treeview helper Methods - + private void AttachFilesView() { this.tabControl.TabPages["directoryTabPage"].Controls.Clear(); @@ -360,8 +360,8 @@ this.tabControl.TabPages["directoryTabPage"].Controls.Add(filesProgress); } - + private AppSettingsBase GetCurrentSettingsPage() { AppSettingsBase appSettings = null; @@ -640,7 +640,7 @@ if (pageCurrentSettings != null) { // create a pseudo-appitem and read the values from the xml node - ApplicationItem tempApp = new ApplicationItem(curApp.db); + ApplicationItem tempApp = new ApplicationItem(); tempApp.LoadFromXmlProfile(node); pageCurrentSettings.LoadFromAppItem(tempApp); appSettingsFileEditView.FileExtensionsText = tempApp.ValidExtensions; @@ -686,7 +686,7 @@ { if (SaveAppItem()) { - ApplicationItem newApplication = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(newSourceType, null, 0); + ApplicationItem newApplication = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(newSourceType, null); globalApplicationList.Add(newApplication); newApplication.FatherID = GetTreeNodeApplicationItemId(); @@ -801,8 +801,8 @@ } } - + private void treeView_DragDrop(object sender, DragEventArgs e) { // Retrieve the client coordinates of the drop location. @@ -958,11 +958,17 @@ } } } + + //close conn + if (DatabaseHandler.SqlLiteConn.State == ConnectionState.Open) + { + DatabaseHandler.SqlLiteConn.Close(); + } } - - + + private void DoRefresh() { bool DoIt = false; @@ -1028,10 +1034,7 @@ private void FillComboBox(string tableName, string orderBy, ComboBox comboBox) { - - List<ListItem> listItemList = new List<ListItem>(); - SQLiteResultSet resultSet = null; string sqlStmt = @" SELECT @@ -1044,29 +1047,28 @@ try { - resultSet = DatabaseHandler.sqlDB.Execute(sqlStmt); + + SQLiteCommand command = new SQLiteCommand(DatabaseHandler.SqlLiteConn); + + command.CommandText = sqlStmt; + using (SQLiteDataReader dataReader = command.ExecuteReader()) + { + while (dataReader.Read()) + { + ListItem listItem = new ListItem(dataReader[1].ToString(), Convert.ToInt32(dataReader[0])); + listItemList.Add(listItem); + } + } } catch (Exception exception) { throw exception; } - if (resultSet.Rows.Count > 0) - { - for (int i = 0; i < resultSet.Rows.Count; i++) - { - //genreid why oh why cant the implementation offer getvalue from columname... arrghr - //maybe can use the sqlnet provider later on.. + comboBox.DataSource = listItemList; + comboBox.ValueMember = "Value"; + comboBox.DisplayMember = "Text"; - ListItem listItem = new ListItem(resultSet.Rows[i].fields[1].ToString(), Convert.ToInt32(resultSet.Rows[i].fields[0])); - listItemList.Add(listItem); - } - - - comboBox.DataSource = listItemList; - comboBox.ValueMember = "Value"; - comboBox.DisplayMember = "Text"; - } } private void mameImportToolStripMenuItem_Click(object sender, EventArgs e) @@ -1128,6 +1130,7 @@ private void InsertData(string tableName, string column, string insertValue) { + string sqlStmt = @" INSERT INTO " + tableName + @" @@ -1142,7 +1145,7 @@ try { - DatabaseHandler.sqlDB.Execute(sqlStmt); + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); } catch (Exception exception) { @@ -1166,7 +1169,7 @@ try { - DatabaseHandler.sqlDB.Execute(sqlStmt); + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); } catch (Exception exception) { @@ -1189,7 +1192,7 @@ " + column + @" <> 1 "; try { - DatabaseHandler.sqlDB.Execute(sqlStmt); + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); } catch (Exception exception) { Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -44,6 +44,8 @@ using GUIPrograms.Items; using GUIPrograms.Database; using GUIPrograms.Design; +using System.Data.SQLite; +using System.Data; namespace GUIPrograms { @@ -93,7 +95,7 @@ } public string Author() { - return "Reconstruct by Northern/Chefkoch"; + return "Reconstruct by Northern.Thanks to chefkoch,waebard"; } public void ShowPlugin() { @@ -427,12 +429,18 @@ { selectedItemIndex = GetSelectedItemNo(); } + + + if (DatabaseHandler.SqlLiteConn.State == ConnectionState.Open) + { + DatabaseHandler.SqlLiteConn.Close(); + } } void InitMyPrograms() { LoadFolderSettings(""); - + if (skipInit) { mapSettings.LastAppID = -1; @@ -444,14 +452,14 @@ lastApp = GetAppByID(mapSettings.LastAppID); if (lastApp != null) { - lastFilepath = lastApp.DefaultFilepath(); + prevFilepath = lastApp.DefaultFilepath(); this.CurrentSortAsc = mapSettings.SortAscending; ViewHandler.CurrentLevel = mapSettings.LastViewLevel; lastApp.ViewHandler = this.ViewHandler; } else { - lastFilepath = ""; + prevFilepath = ""; } UpdateListControl(); ShowThumbPanel(); @@ -465,7 +473,7 @@ static int startWindow = (int)GUIWindow.Window.WINDOW_FILES; protected ProgramSort.SortMethod currentSortMethod = ProgramSort.SortMethod.Name; - string currentView = ""; + bool currentSortAsc = true; ProgramViewHandler viewHandler = ProgramViewHandler.Instance; @@ -474,7 +482,7 @@ DirectoryHistory itemHistory = new DirectoryHistory(); public ApplicationItem lastApp = null; - public string lastFilepath = ""; + public string prevFilepath = ""; public int selectedItemIndex = -1; int slideSpeed = 3000; // speed in milliseconds between two slides long slideTime = 0; @@ -510,12 +518,6 @@ } } - public string CurrentView - { - get { return currentView; } - set { currentView = value; } - } - public int StartWindow { get { return startWindow; } @@ -664,7 +666,7 @@ protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); - + if (control == btnViewAs) { mapSettings.SwitchToNextViewLayout(); @@ -693,7 +695,7 @@ if (lastApp != null) { lastApp.Refresh(true); - lastFilepath = lastApp.DefaultFilepath(); + prevFilepath = lastApp.DefaultFilepath(); // todo: reset viewHandler UpdateButtonStates(); UpdateListControl(); @@ -758,11 +760,8 @@ _lastThumbnailPath = ThumbnailPath; } - RenderThumbnail(timePassed); } - - #endregion #region Display @@ -840,7 +839,6 @@ btnSortBy.Label = sortBy; btnSortBy.IsAscending = CurrentSortAsc; } - SetLabels(); } void ShowThumbPanel() @@ -931,6 +929,7 @@ { GUIControl.SelectItemControl(GetID, facadeView.GetID, selectedItemIndex); } + SetLabels(); } int DisplayFiles() @@ -938,10 +937,10 @@ if (lastApp == null) return 0; // Refresh FileList if view has changed, while this appItem was not active - if (lastApp.CurrentView != this.CurrentView) + if ((lastApp.CurrentView != ViewHandler.CurrentView) || (lastApp.filesAreLoaded == false)) { lastApp.LoadFiles(); - lastApp.CurrentView = this.CurrentView; + lastApp.CurrentView = ViewHandler.CurrentView; } int totalFiles = lastApp.DisplayFiles(lastApp.FileDirectory, facadeView); @@ -1020,11 +1019,10 @@ { if (lastApp != null) { - if ((lastFilepath != null) && (lastFilepath != "") && (lastFilepath != lastApp.FileDirectory)) + if ((prevFilepath != null) && (prevFilepath != "") && (prevFilepath != lastApp.FileDirectory)) { // back item in filelist clicked - string newFilepath = Path.GetDirectoryName(lastFilepath); - lastFilepath = newFilepath; + prevFilepath = Path.GetDirectoryName(prevFilepath); } else { @@ -1061,19 +1059,19 @@ if (lastApp != null) { mapSettings.LastAppID = lastApp.AppID; - lastFilepath = lastApp.DefaultFilepath(); + prevFilepath = lastApp.DefaultFilepath(); } else { // back to home screen..... mapSettings.LastAppID = -1; - lastFilepath = ""; + prevFilepath = ""; } } } UpdateButtonStates(); UpdateListControl(); - RestoreItemIndex(lastApp, lastFilepath); + RestoreItemIndex(lastApp, prevFilepath); } else { @@ -1242,9 +1240,6 @@ } } - - - void OnClick() { GUIListItem item = GetSelectedItem(); @@ -1331,6 +1326,8 @@ if (item.Label.Equals(ProgramUtils.cBackLabel)) return; if (item.MusicTag == null) return; + if (item.MusicTag is ApplicationItem) return; + if (item.MusicTag is FileItem) { curFile = (FileItem)item.MusicTag; @@ -1379,7 +1376,6 @@ int nNewWindow = (int)Window.WINDOW_FILES; StartWindow = nNewWindow; CurrentLayout = Layout.List; - CurrentView = GUILocalizeStrings.Get(100000 + GetID);//my files ViewHandler.CurrentView = GUILocalizeStrings.Get(100000 + GetID);//my files if (nNewWindow != GetID) { @@ -1389,8 +1385,6 @@ else { ViewDefinition selectedView = (ViewDefinition)ViewHandler.Views[dlg.SelectedLabel - 1]; - CurrentView = selectedView.Name; - ViewHandler.CurrentView = selectedView.Name; int nNewWindow = (int)Window.WINDOW_FILES; if (GetID != nNewWindow) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-07-28 08:35:10 UTC (rev 780) @@ -43,6 +43,7 @@ <Reference Include="Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <Reference Include="System" /> <Reference Include="System.Data" /> + <Reference Include="System.Data.SQLite, Version=1.0.44.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86" /> <Reference Include="System.Drawing" /> <Reference Include="System.Management" /> <Reference Include="System.Runtime.Serialization.Formatters.Soap" /> @@ -163,6 +164,7 @@ <Content Include="MetaData\myProgramsAltPreconfiguration.xml" /> <Content Include="skin\BlueTwo\myprograms.xml" /> <Content Include="skin\BlueTwo\myProgramsAltFileInfo.xml" /> + <Content Include="SqlNet\System.Data.SQLite.DLL" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="Design\AppFilesImportProgress.resx"> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -233,14 +233,11 @@ { coverArtImage = currentFileItem.Imagefile; } - - - } } catch (Exception ex2) { - Log.Error("GUIVideoInfo: Error creating new thumbs for {0} - {1}", currentFileItem.Imagefile, ex2.Message); + Log.Error("GUIProgramsAltInfo: Error creating new thumbs for {0} - {1}", currentFileItem.Imagefile, ex2.Message); } currentFileItem.SetProperties(); } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -51,17 +51,16 @@ public event MyEventHandler OnSendMessage = null; - public GamebaseImport(ApplicationItem objApp, SQLiteClient objDB) + public GamebaseImport(ApplicationItem objApp) { applicationItem = objApp; - sqlDB = objDB; } void DBImportGamebaseItem(OleDbDataReader myReader, string romFilename, string imgFilename, int curPos, int maxGames) { - FileItem curFile = new FileItem(sqlDB); + FileItem curFile = new FileItem(); curFile.FileID = -1; // to force an INSERT statement when writing the item curFile.AppID = applicationItem.AppID; curFile.Title = myReader["name"].ToString(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -31,7 +31,7 @@ using System.IO; using Core.Util; using MediaPortal.GUI.Library; -using SQLite.NET; +using System.Data.SQLite; using System.Text.RegularExpressions; using System.Text; @@ -49,7 +49,6 @@ public class MameImport { ApplicationItem currentApplication = null; - SQLiteClient sqliteClient = null; // event: read new file public delegate void MyEventHandler(string informationMessage, int progressBarCtr); @@ -76,11 +75,10 @@ List<string> localRomNames = new List<string>(); - public MameImport(ApplicationItem applicationItem, SQLiteClient objDB) + public MameImport(ApplicationItem applicationItem) { currentApplication = applicationItem; - sqliteClient = objDB; } @@ -106,7 +104,6 @@ { while ((line = streamReader.ReadLine()) != null) { - Match match = regexMameGameName.Match(line); if (match.Success) @@ -323,11 +320,18 @@ localRomNames.Reverse(); double total = localRomNames.Count; - foreach (string fileName in localRomNames) - {// - FillFileItem(fileName, i, total); - i++; + + using (SQLiteTransaction transaction = DatabaseHandler.SqlLiteConn.BeginTransaction()) + { + foreach (string fileName in localRomNames) + {// + FillFileItem(fileName, i, total); + i++; + } + transaction.Commit(); } + + SendText("Import done...................", 100); } @@ -373,7 +377,7 @@ if ((!onlyOriginals) || (onlyOriginals && (!cloneRomDictionary.ContainsKey(curRomname)))) { - FileItem curFile = new FileItem(sqliteClient); + FileItem curFile = new FileItem(); curFile.AppID = currentApplication.AppID; curFile.Filename = fullRomname; curFile.Imagefile = GetImageFile(curRomname); @@ -435,7 +439,8 @@ ProcessFullEntry(curFile, fullEntry); ProcessGenreEntry(curFile, genreEntry); ProcessVersionEntry(curFile, versionEntry); - + + int LexiconId = DatabaseHandler.LexiconDataExists("tblPlatform", "platform", "Arcade"); curFile.PlatformId = LexiconId; @@ -455,8 +460,7 @@ } } - - void ProcessFullEntry(FileItem curFile, string fullEntry) + void ProcessFullEntry(FileItem curFile, string fullEntry) { // mspacman "Ms. Pac-Man" Match m = regexMameGameName.Match(fullEntry); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-07-27 18:24:42 UTC (rev 779) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-07-28 08:35:10 UTC (rev 780) @@ -25,10 +25,11 @@ using System; using System.Collections.Generic; -using System.Diagnostics; +using System.Diagnostics; using System.IO; using System.Xml; -using SQLite.NET; +using System.Data.SQLite; +using System.Data; using MediaPortal.Configuration; using MediaPortal.GUI.Library; @@ -47,8 +48,6 @@ { #region Variables - - int appID; int fatherID; string title; @@ -68,22 +67,16 @@ string currentView = ""; + public List<BaseItem> ItemList = new List<BaseItem>(); public bool filesAreLoaded = false; // load on demand.... - // protected FileItemList fileList = null; + // protected FileItemList fileList = null; public bool linksAreLoaded = false; // load on demand.... - - bool importMamePlaychoice10 = false; bool importMameMahjong = false; bool refreshGUIAllowed = false; - - - - - // more variables, maybe need some renaming or anything else Process proc; ItemType sourceType; string sourceFile; @@ -103,18 +96,11 @@ protected string lastFilepath = ""; // cached path - //private DatabaseSorter dbPc = new DatabaseSorter(); - //private ProgramSort dbPc = new ProgramSort(ProgramSort.SortMethod.Name, true); - #endregion #region Properties // Helper Routines - public SQLiteClient db - { - get { return sqlDB; } - } public int AppID { @@ -211,7 +197,6 @@ set { appPosition = value; } } - public string CurrentView { get { return currentView; } @@ -229,7 +214,6 @@ set { importMameMahjong = value; } } - // more Properties, maybe need some renaming or anything else public string FileDirectory { @@ -301,10 +285,10 @@ #region Constructor - public ApplicationItem(SQLiteClient initSqlDb) : base(initSqlDb) + public ApplicationItem() { - - // .. init member variables ... + + // .. init member variables ... appID = -1; fatherID = -1; title = ""; @@ -333,10 +317,7 @@ #endregion - - - - protected void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + protected void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) { /*ApplicationItem targetApp = GetAppByID(curLink.TargetAppID); if (targetApp != null) @@ -356,9 +337,6 @@ protected int GetID = ProgramUtils.GetID; - - - public FileItem PrevFile(FileItem curFile) { if (ItemList == null) return null; @@ -402,13 +380,13 @@ // Launch File by item if (mpGuiMode) - curFileItem.UpdateLaunchInfo(); + curFileItem.UpdateLaunchInfo(); ProcessStartInfo procStart = new ProcessStartInfo(); if (this.Filename != "") { // use the APPLICATION launcher and add current file information - + // filename of the application procStart.FileName = this.Filename; @@ -480,7 +458,8 @@ proc.StartInfo = procStart; ProgramUtils.StartProcess(proc, this.WaitForExit); - */Utils.StartProcess(procStart, this.WaitForExit); + */ + Utils.StartProcess(procStart, this.WaitForExit); if (mpGuiMode) { @@ -533,6 +512,42 @@ } } + public override void ItemLoad(int appID, string pathSubfolders) + { + + try + { + ItemList.Clear(); + + filePath = pathSubfolders; + string sqlQuery = ViewHandler.BuildQuery(appID, pathSubfolders); + DataTable dataTable = new DataTable(); + SQLiteCommand command = sqlDB.CreateCommand(); + command.CommandText = sqlQuery; + SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(command); + dataAdapter.Fill(dataTable); + + foreach (DataRow row in dataTable.Rows) + { + if (ViewHandler.IsFilterQuery) + { + FilterItem curFile = (FilterItem)ApplicationItemFactory.AppFactory.GetApplicationItem(ItemType.FILTERITEM, row); + ItemList.Add(curFile); + } + else + { + FileItem curFile = (FileItem)ApplicationItemFactory.AppFactory.GetApplicationItem(ItemType.FILEITEM, row); + ItemList.Add(curFile); + } + } + + } + catch (SQLiteException ex) + { + Log.Info("Filedatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + protected void LaunchCmd(string commands) { string results = ""; @@ -589,29 +604,24 @@ public virtual int DisplayFiles(string filePath, GUIFacadeControl facadeView) { int totalItems = 0; - if (filePath != lastFilepath) - { - ItemLoad(AppID, filePath); - //Filelinks.Load(AppID, filePath); - } + totalItems = totalItems + DisplayItemList(filePath, this.ItemList, facadeView); - // totalItems = totalItems + DisplayArrayList(filePath, this.Filelinks, facadeView); - lastFilepath = filePath; + return totalItems; } - public override void OnClick(BaseItem baseItem,GUIPrograms guiPrograms) + public override void OnClick(BaseItem baseItem, GUIPrograms guiPrograms) { ApplicationItem candidate = (ApplicationItem)baseItem; guiPrograms.SaveItemIndex(guiPrograms.GetSelectedItemNo().ToString(), guiPrograms.lastApp, lastFilepath); guiPrograms.lastApp = candidate; guiPrograms.mapSettings.LastAppID = guiPrograms.lastApp.AppID; - guiPrograms.lastFilepath = guiPrograms.lastApp.DefaultFilepath(); + guiPrograms.prevFilepath = guiPrograms.lastApp.DefaultFilepath(); guiPrograms.ViewHandler.CurrentLevel = 0; guiPrograms.lastApp.ViewHandler = guiPrograms.ViewHandler; } - protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) + /* protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) { int totalItems = 0; //foreach (FileItem currentFileItem in dbItems) @@ -632,10 +642,8 @@ } return totalItems; } + */ - - - public virtual bool FileEditorAllowed() { return true; // otherwise, override this in child class @@ -680,33 +688,24 @@ /// </summary> private int GetNewAppID() { - if (sqlDB == null) return -1; - + int result = 0; // won't work in multiuser environment :) - SQLiteResultSet results; - int res = 0; - results = sqlDB.Execute("SELECT MAX(applicationId) FROM tblApplicationItem"); - SQLiteResultSet.Row arr = results.Rows[0]; - if (arr.fields[0] != null) + string sqlStmt = "SELECT MAX(applicationId) FROM tblApplicationItem"; + object o = DatabaseHandler.ExecuteStmtScalar(sqlStmt); + if (o.ToString() != "") { - if (arr.fields[0] != "") - { - res = Int32.Parse(arr.fields[0]); - } + result = Convert.ToInt32(o); } - return res + 1; + return result + 1; } private void Insert() { - if (sqlDB == null) return; - string sql = ""; - try { AppID = GetNewAppID(); // important to avoid subsequent inserts! - sql = String.Format(@" + string sqlStmt = @" INSERT INTO tblApplicationItem ( @@ -736,33 +735,33 @@ ) VALUES ( - '"+ AppID + @"', - '"+ FatherID + @"', - '"+ ProgramUtils.Encode(Title) +@"', - '"+ ProgramUtils.Encode(Filename) +@"', - '"+ ProgramUtils.Encode(Arguments) + @"', - '"+ ProgramUtils.WindowStyleToStr(WindowStyle) +@"', - '"+ ProgramUtils.Encode(StartupDir) +@"', - '"+ ProgramUtils.BooleanToStr(UseShellExecute) +@"', - '"+ ProgramUtils.BooleanToStr(UseQuotes) +@"', - '"+ ProgramUtils.ApplicationTypeToString(SourceType) +@"', - '"+ ProgramUtils.Encode(Source) +@"', - '"+ ProgramUtils.Encode(Imagefile) +@"', - '"+ ProgramUtils.Encode(FileDirectory) +@"', - '"+ ProgramUtils.Encode(ImageDirectory)+@"', - '"+ ProgramUtils.Encode(ValidExtensions)+@"', - '"+ ProgramUtils.BooleanToStr(importValidImagesOnly)+@"', - '"+ Position+@"', - '"+ ProgramUtils.BooleanToStr(Enabled)+@"', - '" + ProgramUtils.BooleanToStr(RefreshGUIAllowed)+@"', - '"+ ProgramUtils.Encode(SystemDefault)+@"', - '"+ ProgramUtils.BooleanToStr(WaitForExit) +@"', - '"+ ProgramUtils.Encode(PreLaunch)+@"', - '"+ ProgramUtils.Encode(PostLaunch)+@"' + " + AppID + @", + " + FatherID + @", + '" + ProgramUtils.Encode(Title) + @"', + '" + ProgramUtils.Encode(Filename) + @"', + '" + ProgramUtils.Encode(Arguments) + @"', + '" + ProgramUtils.WindowStyleToStr(WindowStyle) + @"', + '" + ProgramUtils.Encode(StartupDir) + @"', + " + ProgramUtils.TrueOrFalseToInt(UseShellExecute.ToString()) + @", + '" + UseQuotes + @"', + '" + ProgramUtils.ApplicationTypeToString(SourceType) + @"', + '" + ProgramUtils.Encode(Source) + @"', + '" + ProgramUtils.Encode(Imagefile) + @"', + '" + ProgramUtils.Encode(FileDirectory) + @"', + '" + ProgramUtils.Encode(ImageDirectory) + @"', + '" + ProgramUtils.Encode(ValidExtensions) + @"', + " + ProgramUtils.TrueOrFalseToInt(importValidImagesOnly.ToString()) + @", + " + Position + @", + " + ProgramUtils.TrueOrFalseToInt(Enabled.ToString()) + @", + " + ProgramUtils.TrueOrFalseToInt(RefreshGUIAllowed.ToString()) + @", + '" + ProgramUtils.Encode(SystemDefault) + @"', + " + ProgramUtils.TrueOrFalseToInt(WaitForExit.ToString()) + @", + '" + ProgramUtils.Encode(PreLaunch) + @"', + '" + ProgramUtils.Encode(PostLaunch) + @"' )" - - ); - sqlDB.Execute(sql); + ; + + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); } catch (SQLiteException ex) { @@ -772,15 +771,13 @@ private void Update() { - if (sqlDB == null) return; + if (AppID == -1) return; - string sql = ""; - try { - sql = String.Format( - @"UPDATE + string sqlStmt = + @"UPDATE tblApplicationItem SET title = '" + ProgramUtils.Encode(Title) + @"', @@ -788,44 +785,43 @@ arguments = '" + ProgramUtils.Encode(Arguments) + @"', windowstyle = '" + ProgramUtils.WindowStyleToStr(WindowStyle) + @"', startupdir = '" + ProgramUtils.Encode(StartupDir) + @"', - useShellExecute = '" + ProgramUtils.BooleanToStr(UseShellExecute) + @"', - useQuotes = '" + ProgramUtils.BooleanToStr(UseQuotes) + @"', + useShellExecute = " + ProgramUtils.TrueOrFalseToInt(UseShellExecute.ToString()) + @", + useQuotes = " + ProgramUtils.TrueOrFalseToInt(UseQuotes.ToString()) + @", applicationItemType = '" + ProgramUtils.ApplicationTypeToString(SourceType) + @"', source = '" + ProgramUtils.Encode(Source) + @"', imagefile = '" + ProgramUtils.Encode(Imagefile) + @"', filedirectory = '" + ProgramUtils.Encode(FileDirectory) + @"', imagedirectory = '" + ProgramUtils.Encode(ImageDirectory) + @"', validExtensions = '" + ProgramUtils.Encode(ValidExtensions) + @"', - importValidImagesOnly = '" + ProgramUtils.BooleanToStr(importValidImagesOnly) + @"', + importValidImagesOnly = " + ProgramUtils.TrueOrFalseToInt(importValidImagesOnly.ToString()) + @", iposition = " + Position + @", - enabled = '" + ProgramUtils.BooleanToStr(Enabled) + @"', + enabled = " + ProgramUtils.TrueOrFalseToInt(Enabled.ToString()) + @", fatherNodeId = '" + FatherID + @"', - refreshGUIAllowed = '" + ProgramUtils.BooleanToStr(RefreshGUIAllowed) +@"', + refreshGUIAllowed = " + ProgramUtils.TrueOrFalseToInt(RefreshGUIAllowed.ToString()) + @", systemDefault = '" + ProgramUtils.Encode(SystemDefault) + @"', - waitForExit = '" + ProgramUtils.BooleanToStr(WaitForExit) + @"', + waitForExit = " + ProgramUtils.TrueOrFalseToInt(WaitForExit.ToString()) + @", preLaunch = '" + ProgramUtils.Encode(PreLaunch) + @"', postLaunch = '" + ProgramUtils.Encode(PostLaunch) + @"' - WHERE applicationId = " + AppID); - sqlDB.Execute(sql); + WHERE applicationId = " + AppID; + + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); ; } catch (SQLiteException ex) { Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - Log.Info("sql \n{0}", sql); } } public void Delete() { - if (sqlDB == null) return; if (AppID == -1) return; try { DeleteFiles(); DeleteFileLinks(); - sqlDB.Execute(String.Format("delete from tblApplicationItem where applicationId = {0}", AppID)); + DatabaseHandler.ExecuteStmtNonQuery("delete from tblApplicationItem where applicationId = " + AppID); } catch (SQLiteException ex) { @@ -836,12 +832,11 @@ protected void DeleteFiles() { - if (sqlDB == null) return; - if (AppID == -1) return; + if (AppID == -1) return; try { - sqlDB.Execute(String.Format("delete from tblFileItem where applicationId = {0}", AppID)); + DatabaseHandler.ExecuteStmtNonQuery("delete from tblFileItem where applicationId = " + AppID); } catch (SQLiteException ex) { @@ -851,12 +846,11 @@ protected void DeleteFileLinks() { - if (sqlDB == null) return; if (AppID == -1) return; try { - sqlDB.Execute(String.Format("delete from tblFilterItem where applicationId = {0} or grouperappid = {0}", AppID)); + DatabaseHandler.ExecuteStmtNonQuery("delete from tblFilterItem where applicationId = " + AppID + " or grouperappid = " + AppID); } catch (SQLiteException ex) { @@ -866,18 +860,11 @@ public virtual void LoadFiles() { - //linksAreLoaded = true; - if (sqlDB == null) return; - lastFilepath = ""; ItemLoad(AppID, ""); filesAreLoaded = true; } - - - - public void InsertOrUpdateSettings() { if (appID == -1) @@ -896,33 +883,32 @@ // query with data to fix string sqlSelectDataToFix = String.Format("select fi.applicationId, fi.fileid as oldfileid, f.fileid as newfileid, fi.filename as filename from tblFilterItem fi, tblFileItem f where fi.applicationId = f.applicationId and fi.filename = f.filename and fi.applicationId = {0}", AppID); + DataTable dataTable = null; - // update command to fix one single link - string sqlFixOneLink = "update tblFilterItem set fileID = {0}, tag = 0 where applicationId = {1} and filename = '{2}'"; - - SQLiteResultSet rows2fix; - - try { - // 1) initialize TAG - sqlDB.Execute(String.Format("update tblFilterItem set tag = 1234 where applicationId = {0}", AppID)); + // 1) initialize TAG.. // update command to fix one single link + DatabaseHandler.ExecuteStmtNonQuery("update tblFilterItem set tag = 1234 where applicationId = " + AppID); + dataTable = DatabaseHandler.ExecuteStmtDataTable(sqlSelectDataToFix); + // 2) fix all file... [truncated message content] |
From: <che...@us...> - 2007-11-04 12:47:34
|
Revision: 1024 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1024&view=rev Author: chef_koch Date: 2007-11-04 04:47:21 -0800 (Sun, 04 Nov 2007) Log Message: ----------- added xmp project file, for releasing the plugin as mpi package Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-04 12:27:37 UTC (rev 1023) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-04 12:47:21 UTC (rev 1024) @@ -30,13 +30,11 @@ --------------- -- ChangeLog -- --------------- +2007-11-04: chefkoch : plugin is distributed as MPI package from now on +2007-11-04: chefkoch : changed: plugin uses now it's own WindowsIDs (not Window.Files anymore) to prevent problems with old MyPrograms PluginName +2007-11-04: chefkoch : fixed: if default title "My Programs Alt." was used, "My Programs" was displayed in GUI +2007-11-04: chefkoch : fixed exception when no profiles config file was found - -changed: plugin uses now it's own WindowsIDs (not Window.Files anymore) to prevent problems with old MyPrograms PluginName -fixed: if default title "My Programs Alt." was used, "My Programs" was displayed in GUI - -fixed exception when no profiles config file was found - 2007-10-09: chefkoch : new readme layout 2007-10-09: chefkoch : fixed navigation in bluetwo skin file Added: trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp =================================================================== --- trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp (rev 0) +++ trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp 2007-11-04 12:47:21 UTC (rev 1024) @@ -0,0 +1,86 @@ +<MPinstaler> + <ver>1.00.000</ver> + <FileList> + <File> + <FileName>GUIProgramsAlt.dll</FileName> + <Type>Plugin</Type> + <SubType>Window</SubType> + <Source>GUIProgramsAlt\bin\Release\GUIProgramsAlt.dll</Source> + <Id>01010</Id> + <Option /> + <Guid>591a053f-dbfd-42d5-8662-3e506d59c7fc</Guid> + </File> + <File> + <FileName>myProgramsAlt.xml</FileName> + <Type>Skin</Type> + <SubType>BlueTwo</SubType> + <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAlt.xml</Source> + <Id>02010</Id> + <Option>OutputFileName=|DefaultFile=True|</Option> + <Guid>46a7fbc9-a28e-47a1-a27b-fab318f79c05</Guid> + </File> + <File> + <FileName>myProgramsAltFileInfo.xml</FileName> + <Type>Skin</Type> + <SubType>BlueTwo</SubType> + <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAltFileInfo.xml</Source> + <Id>02010</Id> + <Option>OutputFileName=|DefaultFile=True|</Option> + <Guid>1fa8dd2b-5119-4363-8600-c0a89858cd02</Guid> + </File> + <File> + <FileName>myProgramsAltPreconfiguration.xml</FileName> + <Type>Other</Type> + <SubType /> + <Source>GUIProgramsAlt\MetaData\myProgramsAltPreconfiguration.xml</Source> + <Id>02010</Id> + <Option /> + <Guid>6b4a0879-a870-42c0-8c81-ca997efa4825</Guid> + </File> + <File> + <FileName>README.txt</FileName> + <Type>Other</Type> + <SubType /> + <Source>README.txt</Source> + <Id>04010</Id> + <Option>OutputFileName=MyPrograms2_ReadMe|DefaultFile=False|</Option> + <Guid>475f4b9d-b611-437e-8214-4a48afcdf6c6</Guid> + </File> + <File> + <FileName>System.Data.SQLite.DLL</FileName> + <Type>Other</Type> + <SubType>plugins\Windows</SubType> + <Source>GUIProgramsAlt\bin\Release\System.Data.SQLite.DLL</Source> + <Id>04010</Id> + <Option /> + <Guid>b6192c05-5345-407e-8410-33b26a2513f6</Guid> + </File> + </FileList> + <StringList /> + <Actions> + <Action Place="POSTSETUP" Id="1" Command="GUIProgramsAlt.dll" /> + </Actions> + <SetupGroups /> + <SetupGroupMappings /> + <Option> + <BuildFileName /> + <ProiectFileName>E:\mediaportal\mediaportal_plugins\myGUIProgramsAlt\myProgramsAlt.xmp</ProiectFileName> + <ProiectName>MyPrograms2</ProiectName> + <Author>chefkoch,northern</Author> + <UpdateURL>http://www.team-mediaportal.com</UpdateURL> + <Version>0.1.0.8</Version> + <Description>myprograms2 is a complete rewrite of weabeard's MyPrograms plugin. it's able to start apps and games.</Description> + <Group>Games</Group> + <Release>Test</Release> + </Option> + <Properties> + <MPMaxVersion /> + <MPMinVersion /> + <MinExtensionVersion /> + <MaxExtensionVersion /> + <ForumURL>http://forum.team-mediaportal.com/my_programs_update-t21757.html?t=21757</ForumURL> + <WebURL /> + <CreationDate>Sunday, November 04, 2007 12:00:00 AM</CreationDate> + <SingleGroupSelect>False</SingleGroupSelect> + </Properties> +</MPinstaler> \ 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: <che...@us...> - 2007-11-18 11:51:59
|
Revision: 1074 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1074&view=rev Author: chef_koch Date: 2007-11-18 03:51:50 -0800 (Sun, 18 Nov 2007) Log Message: ----------- added: option to set an application item as root, so it is possible to show it's files in root view together with other application items Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs trunk/plugins/myGUIProgramsAlt/README.txt trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-11-18 03:24:29 UTC (rev 1073) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-11-18 11:51:50 UTC (rev 1074) @@ -81,6 +81,7 @@ DatabaseHandler dbHandlerInstance = DatabaseHandler.DBHandlerInstance; ApplicationItem currentApplicationItem = null; + ApplicationItem rootApplicationItem = null; string prevFilepath = ""; int selectedItemIndex = -1; Layout currentLayout = Layout.List; @@ -434,7 +435,7 @@ int TotalItems = 0; if (ApplicationItemSubItemsAllowed()) TotalItems += DisplayApps(); - if (IsCurrentApplicationItemNotNull()) + //if (IsCurrentApplicationItemNotNull()) trying to display Files in root folder TotalItems += DisplayFiles(); if (currentApplicationItem != null) @@ -452,7 +453,7 @@ int DisplayFiles() { - if (currentApplicationItem == null) return 0; + if (currentApplicationItem == null) return DisplayRootFiles(); // Refresh FileList if view has changed, while this appItem was not active if ((currentApplicationItem.CurrentView != ViewHandler.CurrentView) || (currentApplicationItem.filesAreLoaded == false)) @@ -465,6 +466,22 @@ return (totalFiles); } + int DisplayRootFiles() + { + foreach (ApplicationItem applicationItem in AppsOfFatherID(currentApplicationItem == null ? -1 : currentApplicationItem.ApplicationItemId)) + { + if (!applicationItem.Title.Equals(@"@ROOT@")) continue; + rootApplicationItem = applicationItem; + } + if (rootApplicationItem == null) return 0; + + rootApplicationItem.LoadFiles(); + + int totalFiles = 0; + totalFiles = totalFiles + DisplayItemList(rootApplicationItem.ItemList, facadeView); + return (totalFiles); + } + int DisplayApps() { int totalApps = 0; @@ -472,7 +489,8 @@ foreach (ApplicationItem applicationItem in AppsOfFatherID(currentApplicationItem == null ? -1 : currentApplicationItem.ApplicationItemId)) { if (!applicationItem.Enabled) continue; - + if (applicationItem.Title.Equals(@"@ROOT@")) continue; + totalApps++; GUIListItem item = new GUIListItem(applicationItem.Title); @@ -648,6 +666,11 @@ prevFilepath = currentApplicationItem.DefaultFilepath(); currentApplicationItem.LaunchFile(fileItem); } + else + { + prevFilepath = rootApplicationItem.DefaultFilepath(); + rootApplicationItem.LaunchFile(fileItem); + } } else if (item is FilterItem) { Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-18 03:24:29 UTC (rev 1073) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-18 11:51:50 UTC (rev 1074) @@ -30,6 +30,9 @@ --------------- -- ChangeLog -- --------------- +v0.1.0.10 +2007-11-18: chefkoch : added: option to set an application item as root, so it is possible to show it's files in root view together with other application items + v0.1.0.9 2007-11-04: chefkoch : changed: remember last used application is now optional Modified: trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp =================================================================== --- trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp 2007-11-18 03:24:29 UTC (rev 1073) +++ trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp 2007-11-18 11:51:50 UTC (rev 1074) @@ -8,7 +8,7 @@ <Source>GUIProgramsAlt\bin\Release\GUIProgramsAlt.dll</Source> <Id>01010</Id> <Option /> - <Guid>71910bfb-9ee2-445d-9c76-b93aba6bced3</Guid> + <Guid>57893c55-dcc4-4a2f-bc23-b05c7c653c7e</Guid> </File> <File> <FileName>myProgramsAlt.xml</FileName> @@ -17,7 +17,7 @@ <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAlt.xml</Source> <Id>02010</Id> <Option>OutputFileName=|DefaultFile=True|</Option> - <Guid>062d6b00-83c7-4876-8f0b-debb2bed6c5b</Guid> + <Guid>972438e5-d3cc-4e34-9aaa-6ae9cf39b023</Guid> </File> <File> <FileName>myProgramsAltFileInfo.xml</FileName> @@ -26,7 +26,7 @@ <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAltFileInfo.xml</Source> <Id>02010</Id> <Option>OutputFileName=|DefaultFile=True|</Option> - <Guid>7dde964f-674f-4b41-923e-cb2c5d00c12c</Guid> + <Guid>58a988af-5557-4ec9-a0b7-2b862c6f9887</Guid> </File> <File> <FileName>myProgramsAltPreconfiguration.xml</FileName> @@ -35,7 +35,7 @@ <Source>GUIProgramsAlt\MetaData\myProgramsAltPreconfiguration.xml</Source> <Id>02010</Id> <Option /> - <Guid>da68b967-88fd-4509-b0d1-16a9f6c435ab</Guid> + <Guid>1a909c22-67c5-4915-8c92-e7464d416e0a</Guid> </File> <File> <FileName>README.txt</FileName> @@ -44,7 +44,7 @@ <Source>README.txt</Source> <Id>04010</Id> <Option>OutputFileName=MyPrograms2_ReadMe|DefaultFile=False|</Option> - <Guid>418d38f1-3fb9-4d12-b190-d9e4315f6f3a</Guid> + <Guid>1d7ab3ca-a21a-4953-ac24-ffd485215ae1</Guid> </File> <File> <FileName>System.Data.SQLite.DLL</FileName> @@ -53,7 +53,7 @@ <Source>GUIProgramsAlt\bin\Release\System.Data.SQLite.DLL</Source> <Id>04010</Id> <Option /> - <Guid>b4d409d8-4fbd-43f3-81d7-5062f19ee48a</Guid> + <Guid>17cf81f6-0105-42f2-aaa4-9246a856d21a</Guid> </File> </FileList> <StringList /> @@ -68,7 +68,7 @@ <ProiectName>MyPrograms2</ProiectName> <Author>chefkoch,northern</Author> <UpdateURL>http://www.team-mediaportal.com</UpdateURL> - <Version>0.1.0.9</Version> + <Version>0.1.0.10</Version> <Description>myprograms2 is a complete rewrite of weabeard's MyPrograms plugin. it's able to start apps and games.</Description> <Group>Games</Group> <Release>Test</Release> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-11-28 23:10:28
|
Revision: 1103 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1103&view=rev Author: chef_koch Date: 2007-11-28 15:10:24 -0800 (Wed, 28 Nov 2007) Log Message: ----------- fixed: it is possible to rescan imagefolders on FilesViewTab, even if default folder/filenames were used Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-11-28 23:04:42 UTC (rev 1102) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-11-28 23:10:24 UTC (rev 1103) @@ -735,7 +735,7 @@ { //by default show these... - this.scanImageDirsButton.Visible = true; + this.scanImageDirsButton.Visible = !ProgramUtils.UseThumbsDir(); this.filesettingsPanel.Visible = true; if (currentApplicationItem != null) Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-28 23:04:42 UTC (rev 1102) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-28 23:10:24 UTC (rev 1103) @@ -36,6 +36,7 @@ v0.1.0.11 2007-11-28: chefkoch : fixed: it is possible to change the imagefile in file details dialog, even if default folder/filenames were used 2007-11-28: chefkoch : fixed: it is possible to edit the imagedirectory on FilesViewTab, even if default folder/filenames were used +2007-11-28: chefkoch : fixed: it is possible to rescan imagefolders on FilesViewTab, even if default folder/filenames were used v0.1.0.10 2007-11-18: chefkoch : added: option to set an application item as root, so it is possible to show it's files in root view together with other application items This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-08-02 00:09:22
|
Revision: 783 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=783&view=rev Author: northern_sky Date: 2007-08-01 17:09:20 -0700 (Wed, 01 Aug 2007) Log Message: ----------- misc: etc parameters. imoprts blazing fast now Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myprograms.xml trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -38,98 +38,98 @@ namespace GUIPrograms.Database { - /// <summary> - /// DBhandling methods - /// </summary> - public class DatabaseHandler - { + /// <summary> + /// DBhandling methods + /// </summary> + public class DatabaseHandler + { - private static SQLiteConnection sqlLiteConn = null; + private static SQLiteConnection sqlLiteConn = null; - static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); - private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; + static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); + private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; - public static bool useMPsThumbDirectory = false; + public static bool useMPsThumbDirectory = false; - // singleton. Dont allow any instance of this class - private DatabaseHandler() { } + // singleton. Dont allow any instance of this class + private DatabaseHandler() { } - static DatabaseHandler() - { - string DatabasePath = Config.GetFile(Config.Dir.Database, DATABASEFILE); + static DatabaseHandler() + { + string DatabasePath = Config.GetFile( Config.Dir.Database, DATABASEFILE ); - try - { + try + { - //check if database exists - if (!File.Exists(DatabasePath)) - { - SQLiteConnection.CreateFile(Config.GetFile(Config.Dir.Database, DATABASEFILE)); - string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE); - sqlLiteConn = new SQLiteConnection(connString); - - SetPragmas(); + //check if database exists + if ( !File.Exists( DatabasePath ) ) + { + SQLiteConnection.CreateFile( Config.GetFile( Config.Dir.Database, DATABASEFILE ) ); + string connString = "Data Source=" + Config.GetFile( Config.Dir.Database, DATABASEFILE ); + sqlLiteConn = new SQLiteConnection( connString ); - // make sure the DB-structure is complete - CreateDBTables(); + SetPragmas(); - //fill upp some default lexicon values - InsertDefaultDBValues(); - } - else - { - string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE) + ";Version=3"; - sqlLiteConn = new SQLiteConnection(connString); - } - //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); - LoadAllApplicationItems(); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - static private void SetPragmas() - { - ExecuteStmtNonQuery("PRAGMA default_cache_size=3000"); - ExecuteStmtNonQuery("PRAGMA count_changes=1"); - ExecuteStmtNonQuery("PRAGMA short_column_names=1"); - ExecuteStmtNonQuery("PRAGMA auto_vacuum=1"); + // make sure the DB-structure is complete + CreateDBTables(); - } + //fill upp some default lexicon values + InsertDefaultDBValues(); + } + else + { + string connString = "Data Source=" + Config.GetFile( Config.Dir.Database, DATABASEFILE ) + ";Version=3"; + sqlLiteConn = new SQLiteConnection( connString ); + } + //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); + LoadAllApplicationItems(); + } + catch ( SQLiteException ex ) + { + Log.Info( "programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace ); + } + } + static private void SetPragmas() + { + ExecuteStmtNonQuery( "PRAGMA default_cache_size=3000" ); + ExecuteStmtNonQuery( "PRAGMA count_changes=1" ); + ExecuteStmtNonQuery( "PRAGMA short_column_names=1" ); + ExecuteStmtNonQuery( "PRAGMA auto_vacuum=1" ); - /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) - { - ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); - if (targetApp != null) - { - targetApp.LaunchFile(curLink, MPGUIMode); - } - }*/ + } - // we can always keep an connection open in sqllite.. - //to expensive closing it - public static SQLiteConnection SqlLiteConn - { - get - { - if (sqlLiteConn.State == ConnectionState.Closed) - { - sqlLiteConn.Open(); - } - return sqlLiteConn; - } - } + /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + { + ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); + if (targetApp != null) + { + targetApp.LaunchFile(curLink, MPGUIMode); + } + }*/ - /// <summary> - /// Create db tables etc,if not already exist - /// </summary> - /// <returns></returns> - static bool CreateDBTables() - { - string sqlStmt = @"CREATE TABLE - tblApplicationItem + // we can always keep an connection open in sqllite.. + //to expensive closing it + public static SQLiteConnection SqlLiteConn + { + get + { + if ( sqlLiteConn.State == ConnectionState.Closed ) + { + sqlLiteConn.Open(); + } + return sqlLiteConn; + } + } + + /// <summary> + /// Create db tables etc,if not already exist + /// </summary> + /// <returns></returns> + static bool CreateDBTables() + { + string sqlStmt = @"CREATE TABLE + tblApplicationItem ( applicationId INTEGER PRIMARY KEY, fatherNodeId INTEGER, @@ -157,56 +157,56 @@ )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, isfolder BOOL, categorydata TEXT, gameInfoUrl TEXT)"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; - ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, categorydata TEXT, gameInfoUrl TEXT)"; + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE + sqlStmt = @"CREATE TABLE tblGenre ( genreId INTEGER PRIMARY KEY, genre TEXT )"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblPlatform ( platformId INTEGER PRIMARY KEY, platform TEXT )"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblManufacturer ( manufacturerId INTEGER PRIMARY KEY, manufacturer TEXT )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; - ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; - ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; + ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; + ExecuteStmtNonQuery( sqlStmt ); - return true; - } + return true; + } - /// <summary> - /// Inserting some default values so that the db is preloaded - /// Should always be there. - /// </summary> - private static void InsertDefaultDBValues() - { + /// <summary> + /// Inserting some default values so that the db is preloaded + /// Should always be there. + /// </summary> + private static void InsertDefaultDBValues() + { - string sqlStmt = @"INSERT INTO + string sqlStmt = @"INSERT INTO tblGenre ( genre @@ -216,9 +216,9 @@ 'Unknown' )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"INSERT INTO + sqlStmt = @"INSERT INTO tblManufacturer ( manufacturer @@ -229,9 +229,9 @@ )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"INSERT INTO + sqlStmt = @"INSERT INTO tblPlatform ( platform @@ -241,45 +241,53 @@ 'Unknown' )"; - ExecuteStmtNonQuery(sqlStmt); + ExecuteStmtNonQuery( sqlStmt ); - FillDefaultDBLexiconHelper("tblPlatform", "platform", CreateSystemLexiconList()); - FillDefaultDBLexiconHelper("tblManufacturer", "manufacturer", CreateManufacturerLexiconList()); - FillDefaultDBLexiconHelper("tblGenre", "genre", CreateGenreLexiconList()); - } + using ( SQLiteTransaction transaction = SqlLiteConn.BeginTransaction() ) + { + FillDefaultDBLexiconHelper( "tblPlatform", "platform", CreateSystemLexiconList() ); + FillDefaultDBLexiconHelper( "tblManufacturer", "manufacturer", CreateManufacturerLexiconList() ); + FillDefaultDBLexiconHelper( "tblGenre", "genre", CreateGenreLexiconList() ); - private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) - {// dont support parameters..... yet at least - //AND mediaportals sqlite support dont support multiple inserst with ; bettween... gaaa - //change to to net provider as soon as we can + transaction.Commit(); + } - string sqlStmt = string.Empty; + } - foreach (string insertValue in itemList) - { - sqlStmt = @" + private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) + { + SQLiteParameter[] paramCollection = new SQLiteParameter[1]; + SQLiteParameter paramInsertValue = new SQLiteParameter( "@insertValue", DbType.String ); + paramCollection[0] = paramInsertValue; + + string sqlStmt = @" INSERT INTO - " + tableName + @" + " + tableName + @" ( - " + columnName + @" + " + columnName + @" ) VALUES ( - '" + insertValue + @"' + @insertValue );"; - ExecuteStmtNonQuery(sqlStmt); - } - } + foreach ( string insertValue in itemList ) + { - #region dbsettings - static public string ReadSetting(string Key) - { - string sqlStmt = string.Empty; - string keyValue = string.Empty; - sqlStmt = @" + paramCollection[0].Value = insertValue; + ExecuteStmtNonQuery( sqlStmt, paramCollection ); + } + } + + #region dbsettings + static public string ReadSetting(string Key) + { + string sqlStmt = string.Empty; + + string keyValue = string.Empty; + sqlStmt = @" SELECT value @@ -290,19 +298,19 @@ key ='" + Key + "'"; - object o = ExecuteStmtScalar(sqlStmt); - if (o != null) - { - keyValue = o.ToString(); - } - return keyValue; - } + object o = ExecuteStmtScalar( sqlStmt ); + if ( o != null ) + { + keyValue = o.ToString(); + } + return keyValue; + } - static int CountKey(string Key) - { - string sqlStmt = string.Empty; - int keyValue = 0; - sqlStmt = @" + static int CountKey(string Key) + { + string sqlStmt = string.Empty; + int keyValue = 0; + sqlStmt = @" SELECT COUNT(*) @@ -311,22 +319,22 @@ WHERE key ='" + Key + "'"; - keyValue = Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); - return keyValue; - } + keyValue = Convert.ToInt32( ExecuteStmtScalar( sqlStmt ) ); + return keyValue; + } - static public bool KeyExists(string Key) - { - return (CountKey(Key) > 0); - } + static public bool KeyExists(string Key) + { + return ( CountKey( Key ) > 0 ); + } - static public void WriteSetting(string Key, string Value) - { - string sqlStmt = string.Empty; + static public void WriteSetting(string Key, string Value) + { + string sqlStmt = string.Empty; - if (KeyExists(Key)) - { - sqlStmt = @" + if ( KeyExists( Key ) ) + { + sqlStmt = @" UPDATE tblSetting @@ -336,30 +344,34 @@ WHERE key = '" + Key + "'"; - } - else - { - sqlStmt = @" + } + else + { + sqlStmt = @" INSERT INTO tblSetting (key, value) VALUES('" + Key + "', '" + Value + "')"; - } - ExecuteStmtNonQuery(sqlStmt); - } + } + ExecuteStmtNonQuery( sqlStmt ); + } - static public void DeleteSetting(string Key) - { + static public void DeleteSetting(string Key) + { - string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; - ExecuteStmtNonQuery(sqlStmt); - } - #endregion dbsettings + string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; + ExecuteStmtNonQuery( sqlStmt ); + } + #endregion dbsettings - public static int LexiconDataExists(string tableName, string columnName, string fieldValue) - { + public static int LexiconDataExists(string tableName, string columnName, string fieldValue) + { - string sqlStmt = @" + SQLiteParameter[] parameterArray = new SQLiteParameter[1]; + parameterArray[0] = GetParameter<string>( fieldValue, "@fieldValue", DbType.String ); + + + string sqlStmt = @" SELECT " + columnName + @"id @@ -367,9 +379,9 @@ " + tableName + @" WHERE - " + columnName + @" LIKE '" + ProgramUtils.Encode(fieldValue) + "'"; + " + columnName + @" LIKE @fieldValue"; - string sqlStmtInsert = @" + string sqlStmtInsert = @" INSERT INTO " + tableName + @" ( @@ -377,167 +389,227 @@ ) VALUES ( - '" + ProgramUtils.Encode(fieldValue) + @"' + @fieldValue );"; - try - { + try + { - object o = ExecuteStmtScalar(sqlStmt); + int lexiconId= ExecuteStmtScalar<Int32>( sqlStmt, parameterArray); - //lexion didnt exist, we save it - if (o == null) - { - ExecuteStmtNonQuery(sqlStmtInsert); - return Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); - } - else - { - return Convert.ToInt32(o); - } - } - catch (SQLiteException ex) - { - throw ex; - } - } + //lexion didnt exist, we save it + if ( lexiconId == 0 ) + { + ExecuteStmtNonQuery( sqlStmtInsert,parameterArray ); + return ExecuteStmtScalar<Int32>( sqlStmt,parameterArray ); + } + else + { + return lexiconId; + } + } + catch ( SQLiteException ex ) + { + throw ex; + } + } - #region default lexiconvalues - private static List<string> CreateGenreLexiconList() - { - List<string> genreList = new List<string>(); + #region default lexiconvalues + private static List<string> CreateGenreLexiconList() + { + List<string> genreList = new List<string>(); - genreList.Add("Shooter"); - genreList.Add("Platform"); - genreList.Add("Adventure"); + genreList.Add( "Shooter" ); + genreList.Add( "Platform" ); + genreList.Add( "Adventure" ); - return genreList; - } + return genreList; + } - private static List<string> CreateManufacturerLexiconList() - { - List<string> manufacturerList = new List<string>(); + private static List<string> CreateManufacturerLexiconList() + { + List<string> manufacturerList = new List<string>(); - manufacturerList.Add("Sega"); - manufacturerList.Add("Nintendo"); - manufacturerList.Add("Konami"); + manufacturerList.Add( "Sega" ); + manufacturerList.Add( "Nintendo" ); + manufacturerList.Add( "Konami" ); - return manufacturerList; - } + return manufacturerList; + } - private static List<string> CreateSystemLexiconList() - { - List<string> systemList = new List<string>(); + private static List<string> CreateSystemLexiconList() + { + List<string> systemList = new List<string>(); - systemList.Add("Sega Mastersystem"); - systemList.Add("Arcade"); - systemList.Add("PC"); - return systemList; - } + systemList.Add( "Sega Mastersystem" ); + systemList.Add( "Arcade" ); + systemList.Add( "PC" ); + return systemList; + } - #endregion default lexiconvalues + #endregion default lexiconvalues - static public List<ApplicationItem> ApplicationItemList - { - get - { - return globalApplicationItemList; - } - } + static public List<ApplicationItem> ApplicationItemList + { + get + { + return globalApplicationItemList; + } + } - static public ItemType GetItemType(string columnName, string tableName, int id) - { - ItemType itemType = ItemType.UNKNOWN; + static public ItemType GetItemType(string columnName, string tableName, int id) + { + ItemType itemType = ItemType.UNKNOWN; - string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; + string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; - itemType = ProgramUtils.StringToSourceType(ExecuteStmtScalar(sqlStmt).ToString()); - return itemType; - } + itemType = ProgramUtils.StringToSourceType( ExecuteStmtScalar( sqlStmt ).ToString() ); + return itemType; + } + #region dataaccess help methods - public static DataTable ExecuteStmtDataTable(string stmt) - { - DataTable dataTable = new DataTable(); + public static DataTable ExecuteStmtDataTable(string stmt) + { + DataTable dataTable = new DataTable(); - try - { + try + { - using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) - { - command.CommandText = stmt; - using (SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(command)) - { - dataAdapter.Fill(dataTable); - } - } - } - catch (Exception exception) - { - throw exception; - } - return dataTable; - } + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + using ( SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter( command ) ) + { + dataAdapter.Fill( dataTable ); + } + } + } + catch ( Exception exception ) + { + throw exception; + } + return dataTable; + } - public static void ExecuteStmtNonQuery(string stmt) - { - try - { - using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) - { - command.CommandText = stmt; - command.ExecuteNonQuery(); - } - } - catch (Exception exception) - { - throw exception; - } - } + public static void ExecuteStmtNonQuery(string stmt) + { + try + { + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + command.ExecuteNonQuery(); + } + } + catch ( Exception exception ) + { + throw exception; + } + } + public static void ExecuteStmtNonQuery(string stmt, SQLiteParameter[] paramcollection) + { + try + { + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + command.Parameters.AddRange( paramcollection ); + command.ExecuteNonQuery(); + } + } + catch ( Exception exception ) + { + throw exception; + } + } - public static object ExecuteStmtScalar(string stmt) - { + public static T ExecuteStmtScalar<T>(string stmt, SQLiteParameter[] paramcollection) + { + object o = null; - try - { - using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) - { - command.CommandText = stmt; - o = command.ExecuteScalar(); - } - } - catch (Exception exception) - { - throw exception; - } - return o; - } + try + { + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + command.Parameters.AddRange( paramcollection ); + o = command.ExecuteScalar(); - public static void LoadAllApplicationItems() - { - try - { - globalApplicationItemList.Clear(); + if (o != null) + { + return (T) Convert.ChangeType(o, typeof(T)); + } + return default(T); + + } + } + catch ( Exception exception ) + { + throw exception; + } + } - string sqlStmt = "select * from tblApplicationItem order by iposition"; - DataTable dataTable = ExecuteStmtDataTable(sqlStmt); - foreach (DataRow row in dataTable.Rows) - { - ApplicationItem applicationItem = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(GetItemType("applicationItemType", "tblApplicationItem", Convert.ToInt32(row["applicationId"])), row); - // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); - globalApplicationItemList.Add(applicationItem); - } - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - } + + public static object ExecuteStmtScalar(string stmt) + { + object o = null; + try + { + using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) + { + command.CommandText = stmt; + o = command.ExecuteScalar(); + } + } + catch ( Exception exception ) + { + throw exception; + } + return o; + } + + public static SQLiteParameter GetParameter<G>(G value, string parameterName, DbType type) + { + SQLiteParameter parameter = new SQLiteParameter(parameterName,type); + parameter.Value = value; + + return parameter; + } + + #endregion dataaccess help methods + + public static void LoadAllApplicationItems() + { + try + { + globalApplicationItemList.Clear(); + + using ( SQLiteCommand command = SqlLiteConn.CreateCommand() ) + { + command.CommandText = "SELECT * FROM tblApplicationItem order by iposition"; + using ( SQLiteDataReader dataReader = command.ExecuteReader() ) + { + while ( dataReader.Read() ) + { + ApplicationItem applicationItem = ( ApplicationItem ) ApplicationItemFactory.AppFactory.GetApplicationItem( GetItemType( "applicationItemType", "tblApplicationItem", Convert.ToInt32( dataReader["applicationId"] ) ), dataReader ); + // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); + globalApplicationItemList.Add( applicationItem ); + } + + } + } + } + catch ( SQLiteException ex ) + { + Log.Info( "programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace ); + } + } + } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -111,14 +111,14 @@ FileItem file = (FileItem)item; ListViewItem curItem = new ListViewItem(file.Title); curItem.Tag = file; - if (file.IsFolder) + /* if (file.IsFolder) { curItem.ImageIndex = 0; } else - { + {*/ curItem.ImageIndex = 1; - } + // } fileListView.Items.Add(curItem); } } @@ -146,12 +146,12 @@ FileItem file = (FileItem)fileListView.SelectedItems[0].Tag; if (file != null) { - if (!file.IsFolder) - { + // if (!file.IsFolder) + //{ editButton.Enabled = true; deleteButton.Enabled = true; launchButton.Enabled = (file.Filename != ""); - } + //} } } else if (fileListView.SelectedItems.Count > 1) @@ -519,14 +519,14 @@ FileItem file = (FileItem)fileListView.SelectedItems[0].Tag; if (file != null) { - if (file.IsFolder) - { - ChangeFilePath(file.Filename); // filename becomes filepath in next view... :) - } - else - { + // if (file.IsFolder) + //{ + //ChangeFilePath(file.Filename); // filename becomes filepath in next view... :) + //} + //else + //{ EditItem(); - } + //} } } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -87,14 +87,9 @@ FileItemToGenre(); manufacturerComboBox.SelectedValue = CurFile.ManufacturerId; //txtManufacturer.Text = m_CurFile.Manufacturer; - if (m_CurFile.Year > 1900) - { + txtYear.Text = m_CurFile.Year.ToString(); - } - else - { - txtYear.Text = ""; - } + cbRating.SelectedIndex = m_CurFile.Rating; txtCountry.Text = m_CurFile.Country; // txtSystem.Text = m_CurFile.Platform; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -260,11 +260,11 @@ ListViewItem curItem = new ListViewItem(file.Title); file.ToFileInfoFavourite(); curItem.Tag = file; - if (!file.IsFolder) - { + // if (!file.IsFolder) + //{ ListViewItem newItem = listViewFileList.Items.Add(curItem); newItem.SubItems.Add("<unknown>"); - } + //} } } finally Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-08-01 14:33:47 UTC (rev 782) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-08-02 00:09:20 UTC (rev 783) @@ -28,439 +28,440 @@ /// </summary> private void InitializeComponent() { - System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Applications"); - this.menuStrip = new System.Windows.Forms.MenuStrip(); - this.addDeleteApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.applicationWithFiledirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.addGroupnodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.extendedApplicationItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.mameImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importGamebaseItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.deleteApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.premadeConfigurationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.emulatorSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.treeView = new System.Windows.Forms.TreeView(); - this.tabControl = new System.Windows.Forms.TabControl(); - this.detailsTabPage = new System.Windows.Forms.TabPage(); - this.directoryTabPage = new System.Windows.Forms.TabPage(); - this.viewTabPage = new System.Windows.Forms.TabPage(); - this.dbOptionsTabPage = new System.Windows.Forms.TabPage(); - this.generalFileItemOptionsGroupBox = new System.Windows.Forms.GroupBox(); - this.removePlatformComboBox = new System.Windows.Forms.ComboBox(); - this.removePlatformLabel = new System.Windows.Forms.Label(); - this.removePlatformButton = new System.Windows.Forms.Button(); - this.addPlatformLabel = new System.Windows.Forms.Label(); - this.addPlatformTextBox = new System.Windows.Forms.TextBox(); - this.addPlatformButton = new System.Windows.Forms.Button(); - this.removeManufacturerComboBox = new System.Windows.Forms.ComboBox(); - this.removeManufacturerLabel = new System.Windows.Forms.Label(); - this.removeManufacturerButton = new System.Windows.Forms.Button(); - this.addManufacturerLabel = new System.Windows.Forms.Label(); - this.addManufacturerTextBox = new System.Windows.Forms.TextBox(); - this.addManufacturerButton = new System.Windows.Forms.Button(); - this.removeGenreComboBox = new System.Windows.Forms.ComboBox(); - this.removeGenreLabel = new System.Windows.Forms.Label(); - this.removeGenreButton = new System.Windows.Forms.Button(); - this.addGenreLabel = new System.Windows.Forms.Label(); - this.addGenreTextBox = new System.Windows.Forms.TextBox(); - this.addGenreButton = new System.Windows.Forms.Button(); - this.menuStrip.SuspendLayout(); - this.tabControl.SuspendLayout(); - this.dbOptionsTabPage.SuspendLayout(); - this.generalFileItemOptionsGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip - // - this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode( "Applications" ); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.addDeleteApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.applicationWithFiledirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addGroupnodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.extendedApplicationItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.mameImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.importGamebaseItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteApplicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.premadeConfigurationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.emulatorSetupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.treeView = new System.Windows.Forms.TreeView(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.detailsTabPage = new System.Windows.Forms.TabPage(); + this.directoryTabPage = new System.Windows.Forms.TabPage(); + this.viewTabPage = new System.Windows.Forms.TabPage(); + this.dbOptionsTabPage = new System.Windows.Forms.TabPage(); + this.generalFileItemOptionsGroupBox = new System.Windows.Forms.GroupBox(); + this.removePlatformComboBox = new System.Windows.Forms.ComboBox(); + this.removePlatformLabel = new System.Windows.Forms.Label(); + this.removePlatformButton = new System.Windows.Forms.Button(); + this.addPlatformLabel = new System.Windows.Forms.Label(); + this.addPlatformTextBox = new System.Windows.Forms.TextBox(); + this.addPlatformButton = new System.Windows.Forms.Button(); + this.removeManufacturerComboBox = new System.Windows.Forms.ComboBox(); + this.removeManufacturerLabel = new System.Windows.Forms.Label(); + this.removeManufacturerButton = new System.Windows.Forms.Button(); + this.addManufacturerLabel = new System.Windows.Forms.Label(); + this.addManufacturerTextBox = new System.Windows.Forms.TextBox(); + this.addManufacturerButton = new System.Windows.Forms.Button(); + this.removeGenreComboBox = new System.Windows.Forms.ComboBox(); + this.removeGenreLabel = new System.Windows.Forms.Label(); + this.removeGenreButton = new System.Windows.Forms.Button(); + this.addGenreLabel = new System.Windows.Forms.Label(); + this.addGenreTextBox = new System.Windows.Forms.TextBox(); + this.addGenreButton = new System.Windows.Forms.Button(); + this.menuStrip.SuspendLayout(); + this.tabControl.SuspendLayout(); + this.dbOptionsTabPage.SuspendLayout(); + this.generalFileItemOptionsGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip + // + this.menuStrip.Items.AddRange( new System.Windows.Forms.ToolStripItem[] { this.addDeleteApplicationsToolStripMenuItem, - this.toolsStripMenuItem}); - this.menuStrip.Location = new System.Drawing.Point(0, 0); - this.menuStrip.Name = "menuStrip"; - this.menuStrip.Size = new System.Drawing.Size(747, 24); - this.menuStrip.TabIndex = 0; - this.menuStrip.Text = "menuStrip"; - // - // addDeleteApplicationsToolStripMenuItem - // - this.addDeleteApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolsStripMenuItem} ); + this.menuStrip.Location = new System.Drawing.Point( 0, 0 ); + this.menuStrip.Name = "menuStrip"; + this.menuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; + this.menuStrip.Size = new System.Drawing.Size( 747, 24 ); + this.menuStrip.TabIndex = 0; + this.menuStrip.Text = "menuStrip"; + // + // addDeleteApplicationsToolStripMenuItem + // + this.addDeleteApplicationsToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { this.addApplicationToolStripMenuItem, - this.deleteApplicationToolStripMenuItem}); - this.addDeleteApplicationsToolStripMenuItem.Name = "addDeleteApplicationsToolStripMenuItem"; - this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size(146, 20); - this.addDeleteApplicationsToolStripMenuItem.Text = "Add/Delete applications"; - // - // addApplicationToolStripMenuItem - // - this.addApplicationToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.deleteApplicationToolStripMenuItem} ); + this.addDeleteApplicationsToolStripMenuItem.Name = "addDeleteApplicationsToolStripMenuItem"; + this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size( 132, 20 ); + this.addDeleteApplicationsToolStripMenuItem.Text = "Add/Delete applications"; + // + // addApplicationToolStripMenuItem + // + this.addApplicationToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { this.applicationWithFiledirectoryToolStripMenuItem, this.addGroupnodeToolStripMenuItem, - this.extendedApplicationItemToolStripMenuItem}); - this.addApplicationToolStripMenuItem.Name = "addApplicationToolStripMenuItem"; - this.addApplicationToolStripMenuItem.Size = new System.Drawing.Size(169, 22); - this.addApplicationToolStripMenuItem.Text = "Add application"; - // - // applicationWithFiledirectoryToolStripMenuItem - // - this.applicationWithFiledirectoryToolStripMenuItem.Name = "applicationWithFiledirectoryToolStripMenuItem"; - this.applicationWithFiledirectoryToolStripMenuItem.Size = new System.Drawing.Size(208, 22); - this.applicationWithFiledirectoryToolStripMenuItem.Text = "Applicationitem"; - this.applicationWithFiledirectoryToolStripMenuItem.Click += new System.EventHandler(this.applicationWithFiledirectoryToolStripMenuItem_Click); - // - // addGroupnodeToolStripMenuItem - // - this.addGroupnodeToolStripMenuItem.Name = "addGroupnodeToolStripMenuItem"; - this.addGroupnodeToolStripMenuItem.Size = new System.Drawing.Size(208, 22); - this.addGroupnodeToolStripMenuItem.Text = "Groupingtem"; - this.addGroupnodeToolStripMenuItem.Click += new System.EventHandler(this.addGroupnodeToolStripMenuItem_Click); - // - // extendedApplicationItemToolStripMenuItem - // - this.extendedApplicationItemToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.extendedApplicationItemToolStripMenuItem} ); + this.addApplicationToolStripMenuItem.Name = "addApplicationToolStripMenuItem"; + this.addApplicationToolStripMenuItem.Size = new System.Drawing.Size( 170, 22 ); + this.addApplicationToolStripMenuItem.Text = "Add application"; + // + // applicationWithFiledirectoryToolStripMenuItem + // + this.applicationWithFiledirectoryToolStripMenuItem.Name = "applicationWithFiledirectoryToolStripMenuItem"; + this.applicationWithFiledirectoryToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); + this.applicationWithFiledirectoryToolStripMenuItem.Text = "Applicationitem"; + this.applicationWithFiledirectoryToolStripMenuItem.Click += new System.EventHandler( this.applicationWithFiledirectoryToolStripMenuItem_Click ); + // + // addGroupnodeToolStripMenuItem + // + this.addGroupnodeToolStripMenuItem.Name = "addGroupnodeToolStripMenuItem"; + this.addGroupnodeToolStripMenuItem.Size = new System.Drawing.Size( 207, 22 ); + this.addGroupnodeToolStripMenuItem.Text = "Groupingtem"; + this.addGroupnodeToolStripMenuItem.Click += new System.EventHandler( this.addGroupnodeToolStripMenuItem_Click ); + // + // extendedApplicationItemToolStripMenuItem + // + this.extendedApplicationItemToolStripMenuItem.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] { this.mameImportToolStripMenuItem, - this.importGamebaseItemToolStripMenuItem}); - this.extendedApplicationItemToolStripMenuItem.Name = "extendedApplicationItemToolStripMenuItem"; - this.extendedApplicationItemToolStripMenuItem.Size = new System.Drawing.Size(208, 22); - this.extendedApplicationItemToolStripMenuItem.Text = "Extended applicationItem"; - // - // mameImportToolStripMenuItem - // - this.mameImportToolStripMenuItem.Name = "mameImportToolStripMenuItem"; - this.mameImportToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.mameImportToolStripMenuItem.Text = "Import Mame"; - this.mameImportToolStripMenuItem.Click += new System.EventHandler(this.mameImportToolStripMenuItem_Click); - // - // importGamebaseItemToolStripMenuItem - // - this.importGamebaseItemToolStripMenuItem.Name = "importGamebaseItemToolStripMenuItem"; - this.importGamebaseItemToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.importGamebaseItemToolStripMenuItem.Text = "Import Gamebase"; - this.importGamebaseItemToolStripMenuItem.Click += new System.EventHandler(this.importGamebaseItemToolStripMenuItem_Click); - // - // deleteApplicationToolStripMenuItem - // - this.deleteApplicationToolStripMenuItem.Image = global::GUIPrograms.Properties.Resources.deleteButton_Image; - this.deleteApplicationToolStripMenuItem.Name = "deleteApplicationToolStripMenuItem"; - this.deleteApplicationToolStripMenuItem.Size = new System.Drawing.Size(169, 22); - this.deleteApplicationToolStripMenuItem.Text = "Delete application"; - this.deleteApplicationToolStripMenuItem.Click += new System.EventHandler(this.deleteApplicationToolStripMenuItem_Click); - // - // toolsStripMenuItem - // - this.toolsStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.premadeConfigurationsToolStripMenuItem}); - this.toolsStripMenuItem.Name = "toolsStripMenuItem"; - this.toolsStripMenuItem.Size = new System.Drawing.Size(48, 20); - this.toolsStripMenuItem.Text = "Tools"; - // - // premadeConfigurationsToolStripMenuItem - // - this.premadeConfigurationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.emulatorSetupToolStripMenuItem}); - this.premadeConfigurationsToolStripMenuItem.Name = "premadeConfigurationsToolStripMenuItem"; - this.premadeConfigurationsToolStripMenuItem.Size = new System.Drawing.Size(153, 22); - this.premadeConfigurationsToolStripMenuItem.Text = "Configurations"; - // - // emulatorSetupToolStripMenuItem - // - this.emulatorSetupToolStripMenuItem.Name = "emulatorSetupToolStripMenuItem"; - this.emulatorSetupToolStripMenuItem.Size = new System.Drawing.Size(155, 22); - this.emulatorSetupToolStripMenuItem.Text = "Emulator Setup"; - // - // treeView - // - this.treeView.AllowDrop = true; - this.treeView.HideSelection = false; - this.treeView.HotTracking = true; - this.treeView.LabelEdit = true; - this.treeView.Location = new System.Drawing.Point(0, 27); - this.treeView.Name = "treeView"; - treeNode3.Name = "applicationNode"; - treeNode3.Text = "Applications"; - this.treeView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode3}); - this.treeView.Size = new System.Drawing.Size(224, 576); - this.treeView.TabIndex = 8; - this.treeView.DragDrop += new System.Windows.Forms.DragEventHandler(this.treeView_DragDrop); - this.treeView.DragOver += new System.Windows.Forms.DragEventHandler(this.treeView_DragOver); - this.treeView.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.treeView_AfterLabelEdit); - this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect); - this.treeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView_NodeMouseClick); - this.treeView.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView_DragEnter); - this.treeView.BeforeLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.treeView_BeforeLabelEdit); - this.treeView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeView_BeforeSelect); - this.treeView.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.treeView_ItemDrag); - // - // tabControl - // - this.tabControl.Controls.Add(this.detailsTabPage); - this.tabControl.Controls.Add(this.directoryTabPage); - this.tabControl.Controls.Add(this.viewTabPage); - this.tabControl.Controls.Add(this.dbOptionsTabPage); - this.tabControl.Location = new System.Drawing.Point(230, 27); - this.tabControl.Name = "tabControl"; - this.tabControl.SelectedIndex = 0; - this.tabControl.ShowToolTips = true; - this.tabControl.Size = new System.Drawing.Size(505, 577); - this.tabControl.TabIndex = 2; - this.tabControl.Click += new System.EventHandler(this.dbOptionsTabPage_Click); - this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); - // - // detailsTabPage - // - this.detailsTabPage.BackColor = System.Drawing.SystemColors.Control; - this.detailsTabPage.Location = new System.Drawing.Point(4, 22); - this.detailsTabPage.Name = "detailsTabPage"; - this.detailsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.detailsTabPage.Size = new System.Drawing.Size(497, 551); - this.detailsTabPage.TabIndex = 0; - this.detailsTabPage.Text = "Details"; - // - // directoryTabPage - // - this.directoryTabPage.BackColor = System.Drawing.SystemColors.Control; - this.directoryTabPage.Location = new System.Drawing.Point(4, 22); - this.directoryTabPage.Name = "directoryTabPage"; - this.directoryTabPage.Padding = new System.Windows.Forms.Padding(3); - this.directoryTabPage.Size = new System.Drawing.Size(497, 551); - this.directoryTabPage.TabIndex = 1; - this.directoryTabPage.Text = "Files"; - // - // viewTabPage - // - this.viewTabPage.BackColor = System.Drawing.SystemColors.Control; - this.viewTabPage.Location = new System.Drawing.Point(4, 22); - this.viewTabPage.Name = "viewTabPage"; - this.viewTabPage.Padding = new System.Windows.Forms.Padding(3); - this.viewTabPage.Size = new System.Drawing.Size(497, 551); - this.viewTabPage.TabIndex = 2; - this.viewTabPage.Text = "Views"; - // - // dbOptionsTabPage - // - this.dbOptionsTabPage.Controls.Add(this.generalFileItemOptionsGroupBox); - this.dbOptionsTabPage.Location = new System.Drawing.Point(4, 22); - this.dbOptionsTabPage.Name = "dbOptionsTabPage"; - this.dbOptionsTabPage.Padding = new System.Windows.Forms.Padding(3); - this.dbOptionsTabPage.Size = new System.Drawing.Size(497, 551); - this.dbOptionsTabPage.TabIndex = 3; - this.dbOptionsTabPage.Text = "DB options"; - this.dbOptionsTabPage.UseVisualStyleBackColor = true; - this.dbOptionsTabPage.Click += new System.EventHandler(this.dbOptionsTabPage_Click); - // - // generalFileItemOptionsGroupBox - // - this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformComboBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removePlatformButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformTextBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addPlatformButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerComboBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerTextBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreComboBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreButton); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreLabel); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreTextBox); - this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreButton); - this.generalFileItemOptionsGroupBox.Location = new System.Drawing.Point(3, 6); - this.generalFileItemOptionsGroupBox.Name = "generalFileItemOptionsGroupBox"; - this.generalFileItemOptionsGroupBox.Size = new System.Drawing.Size(488, 496); - this.generalFileItemOptionsGroupBox.TabIndex = 79; - this.generalFileItemOptionsGroupBox.TabStop = false; - // - // removePlatformComboBox - // - this.removePlatformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removePlatformComboBox.FormattingEnabled = true; - this.removePlatformComboBox.Location = new System.Drawing.Point(99, 249); - this.removePlatformComboBox.Name = "removePlatformComboBox"; - this.removePlatformComboBox.Size = new System.Drawing.Size(306, 21); - this.removePlatformComboBox.TabIndex = 92; - // - // removePlatformLabel - // - this.removePlatformLabel.AutoSize = true; - this.removePlatformLabel.Location = new System.Drawing.Point(6, 252); - this.removePlatformLabel.Name = "removePlatformLabel"; - this.removePlatformLabel.Size = new System.Drawing.Size(87, 13); - this.removePlatformLabel.TabIndex = 91; - this.removePlatformLabel.Text = "Remove platform"; - // - // removePlatformButton - // - this.removePlatformButton.Location = new System.Drawing.Point(411, 249); - this.removePlatformButton.Name = "removePlatformButton"; - this.removePlatformButton.Size = new System.Drawing.Size(62, 23); - this.removePlatformButton.TabIndex = 90; - this.removePlatformButton.Text = "Remove.."; - this.removePlatformButton.UseVisualStyleBackColor = true; - this.removePlatformButton.Click += new System.EventHandler(this.removePlatformButton_Click); - // - // addPlatformLabel - // - this.addPlatformLabel.AutoSize = true; - this.addPlatformLabel.Location = new System.Drawing.Point(6, 216); - this.addPlatformLabel.Name = "addPlatformLabel"; - this.addPlatformLabel.Size = new System.Drawing.Size(72, 13); - this.addPlatformLabel.TabIndex = 87; - this.addPlatformLabel.Text = "Add platform.."; - // - // addPlatformTextBox - // - this.addPlatformTextBox.Location = new System.Drawing.Point(99, 213); - this.addPlatformTextBox.Name = "addPlatformTextBox"; - this.addPlatformTextBox.Size = new System.Drawing.Size(306, 20); - this.addPlatformTextBox.TabIndex = 88; - // - // addPlatformButton - // - this.addPlatformButton.Location = new System.Drawing.Point(411, 213); - this.addPlatformButton.Name = "addPlatformButton"; - this.addPlatformButton.Size = new System.Drawing.Size(62, 23); - this.addPlatformButton.TabIndex = 89; - this.addPlatformButton.Text = "Add.."; - this.addPlatformButton.UseVisualStyleBackColor = true; - this.addPlatformButton.Click += new System.EventHandler(this.addPlatformButton_Click); - // - // removeManufacturerComboBox - // - this.removeManufacturerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removeManufacturerComboBox.FormattingEnabled = true; - this.removeManufacturerComboBox.Location = new System.Drawing.Point(99, 165); - this.removeManufacturerComboBox.Name = "removeManufacturerComboBox"; - this.removeManufacturerComboBox.Size = new System.Drawing.Size(306, 21); - this.removeManufacturerComboBox.TabIndex = 86; - // - // removeManufacturerLabel - // - this.removeManufacturerLabel.Location = new System.Drawing.Point(6, 157); - this.removeManufacturerLabel.Name = "removeManufacturerLabel"; - this.removeManufacturerLabel.Size = new System.Drawing.Size(82, 29); - this.removeManufacturerLabel.TabIndex = 85; - this.removeManufacturerLabel.Text = "Remove Manufacturer"; - // - // removeManufacturerButton - // - this.removeManufacturerButton.Location = new System.Drawing.Point(411, 165); - this.removeManufacturerButton.Name = "removeManufacturerButton"; - this.removeManufacturerButton.Size = new System.Drawing.Size(62, 23); - this.removeManufacturerButton.TabIndex = 84; - this.removeManufacturerButton.Text = "Remove.."; - this.removeManufacturerButton.UseVisualStyleBackColor = true; - this.removeManufacturerButton.Click += new System.EventHandler(this.removeManufacturerButton_Click); - // - // addManufacturerLabel - // - this.addManufacturerLabel.Location = new System.Drawing.Point(6, 121); - this.addManufacturerLabel.Name = "addManufacturerLabel"; - this.addManufacturerLabel.Size = new System.Drawing.Size(82, 36); - this.addManufacturerLabel.TabIndex = 81; - this.addManufacturerLabel.Text = "Add Manufacturer.."; - // - // addManufacturerTextBox - // - this.addManufacturerTextBox.Location = new System.Drawing.Point(99, 129); - this.addManufacturerTextBox.Name = "addManufacturerTextBox"; - this.addManufacturerTextBox.Size = new System.Drawing.Size(306, 20); - this.addManufacturerTextBox.TabIndex = 82; - // - // addManufacturerButton - // - this.addManufacturerButton.Location = new System.Drawing.Point(411, 129); - this.addManufacturerButton.Name = "addManufacturerButton"; - this.addManufacturerButton.Size = new System.Drawing.Size(62, 23); - this.addManufacturerButton.TabIndex = 83; - this.addManufacturerButton.Text = "Add.."; - this.addManufacturerButton.UseVisualStyleBackColor = true; - this.addManufacturerButton.Click += new System.EventHandler(this.addManufacturerButton_Click); - // - // removeGenreComboBox - // - this.removeGenreComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.removeGenreComboBox.FormattingEnabled = true; - this.removeGenreComboBox.Location = new System.Drawing.Point(99, 70); - this.removeGenreComboBox.Name = "removeGenreComboBox"; - this.removeGenreComboBox.Size = new System.Drawing.Size(306, 21); - this.removeGenreComboBox.TabIndex = 80; - // - // removeGenreLabel - // - this.removeGenreLabel.AutoSize = true; - this.removeGenreLabel.Location = new System.Drawing.Point(6, 73); - this.removeGenreLabel.Name = "removeGenreLabel"; - this.removeGenreLabel.Size = new System.Drawing.Size(77, 13); - this.removeGenreLabel.TabIndex = 79; - this.removeGenreLabel.Text = "Remove genre"; - // - // removeGenreButton - // - this.removeGenreButton.Location = new System.Drawing.Point(411, 70); - this.removeGenreButton.Name = "removeGenreButton"; - this.removeGenreButton.Size = new System.Drawing.Size(62, 23); - this.removeGenreButton.TabIndex = 78; - this.removeGenreButton.Text = "Remove.."; - this.removeGenreButton.UseVisualStyleBackColor = true; - this.removeGenreButton.Click += new System.EventHandler(this.removeGenreButton_Click); - // - // addGenreLabel - // - this.addGenreLabel.AutoSize = true; - this.addGenreLabel.Location = new System.Drawing.Point(6, 37); - this.addGenreLabel.Name = "addGenreLabel"; - this.addGenreLabel.Size = new System.Drawing.Size(62, 13); - this.addGenreLabel.TabIndex = 74; - this.addGenreLabel.Text = "Add genre.."; - // - // addGenreTextBox - // - this.addGenreTextBox.Location = new System.Drawing.Point(99, 34); - this.addGenreTextBox.Name = "addGenreTextBox"; - this.addGenreTextBox.Size = new System.Drawing.Size(306, 20); - this.addGenreTextBox.TabIndex = 75; - // - // addGenreButton - // - this.addGenreButton.Location = new System.Drawing.Point(411, 34); - this.addGenreButton.Name = "addGenreButton"; - this.addGenreButton.Size = new System.Drawing.Size(62, 23); - this.addGenreButton.TabIndex = 76; - this.addGenreButton.Text = "Add.."; - this.addGenreButton.UseVisualStyleBackColor = true; - this.addGenreButton.Click += new System.EventHandler(this.addGenreButton_Click); - // ... [truncated message content] |
From: <nor...@us...> - 2007-08-03 08:07:23
|
Revision: 786 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=786&view=rev Author: northern_sky Date: 2007-08-03 01:07:10 -0700 (Fri, 03 Aug 2007) Log Message: ----------- replaced SystemDefault with mapping to PlatformId Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -24,6 +24,7 @@ #endregion using System; + using System.Collections; using System.Collections.Generic; using System.IO; @@ -38,97 +39,97 @@ namespace GUIPrograms.Database { - /// <summary> - /// DBhandling methods - /// </summary> - public class DatabaseHandler - { + /// <summary> + /// DBhandling methods + /// </summary> + public class DatabaseHandler + { - private static SQLiteConnection sqlLiteConn = null; + private static SQLiteConnection sqlLiteConn = null; - static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); - private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; + static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); + private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; - public static bool useMPsThumbDirectory = false; + public static bool useMPsThumbDirectory = false; - // singleton. Dont allow any instance of this class - private DatabaseHandler() { } + // singleton. Dont allow any instance of this class + private DatabaseHandler() { } - static DatabaseHandler() - { - string DatabasePath = Config.GetFile( Config.Dir.Database, DATABASEFILE ); + static DatabaseHandler() + { + string DatabasePath = Config.GetFile(Config.Dir.Database, DATABASEFILE); - try - { + try + { - //check if database exists - if ( !File.Exists( DatabasePath ) ) - { - SQLiteConnection.CreateFile( Config.GetFile( Config.Dir.Database, DATABASEFILE ) ); - string connString = "Data Source=" + Config.GetFile( Config.Dir.Database, DATABASEFILE ); - sqlLiteConn = new SQLiteConnection( connString ); + //check if database exists + if (!File.Exists(DatabasePath)) + { + SQLiteConnection.CreateFile(DatabasePath); + string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE); + sqlLiteConn = new SQLiteConnection(connString); - SetPragmas(); + SetPragmas(); - // make sure the DB-structure is complete - CreateDBTables(); + // make sure the DB-structure is complete + CreateDBTables(); - //fill upp some default lexicon values - InsertDefaultDBValues(); - } - else - { - string connString = "Data Source=" + Config.GetFile( Config.Dir.Database, DATABASEFILE ) + ";Version=3"; - sqlLiteConn = new SQLiteConnection( connString ); - } - //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); - LoadAllApplicationItems(); - } - catch ( SQLiteException ex ) - { - Log.Info( "programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace ); - } - } - static private void SetPragmas() - { - ExecuteStmtNonQuery( "PRAGMA default_cache_size=3000" ); - ExecuteStmtNonQuery( "PRAGMA count_changes=1" ); - ExecuteStmtNonQuery( "PRAGMA short_column_names=1" ); - ExecuteStmtNonQuery( "PRAGMA auto_vacuum=1" ); + //fill upp some default lexicon values + InsertDefaultDBValues(); + } + else + { + string connString = "Data Source=" + Config.GetFile(Config.Dir.Database, DATABASEFILE) + ";Version=3"; + sqlLiteConn = new SQLiteConnection(connString); + } + //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); + LoadAllApplicationItems(); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + static private void SetPragmas() + { + ExecuteStmtNonQuery("PRAGMA default_cache_size=3000"); + ExecuteStmtNonQuery("PRAGMA count_changes=1"); + ExecuteStmtNonQuery("PRAGMA short_column_names=1"); + ExecuteStmtNonQuery("PRAGMA auto_vacuum=1"); - } + } - /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) - { - ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); - if (targetApp != null) - { - targetApp.LaunchFile(curLink, MPGUIMode); - } - }*/ + /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + { + ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); + if (targetApp != null) + { + targetApp.LaunchFile(curLink, MPGUIMode); + } + }*/ - // we can always keep an connection open in sqllite.. - //to expensive closing it - public static SQLiteConnection SqlLiteConn - { - get - { - if ( sqlLiteConn.State == ConnectionState.Closed ) - { - sqlLiteConn.Open(); - } - return sqlLiteConn; - } - } + // we can always keep an connection open in sqllite.. + //to expensive closing it + public static SQLiteConnection SqlLiteConn + { + get + { + if (sqlLiteConn.State == ConnectionState.Closed) + { + sqlLiteConn.Open(); + } + return sqlLiteConn; + } + } - /// <summary> - /// Create db tables etc,if not already exist - /// </summary> - /// <returns></returns> - static bool CreateDBTables() - { - string sqlStmt = @"CREATE TABLE + /// <summary> + /// Create db tables etc,if not already exist + /// </summary> + /// <returns></returns> + static bool CreateDBTables() + { + string sqlStmt = @"CREATE TABLE tblApplicationItem ( applicationId INTEGER PRIMARY KEY, @@ -150,63 +151,63 @@ importValidImagesOnly BOOL, iposition INTEGER, refreshGUIAllowed BOOL, - systemdefault TEXT, + platformId INTEGER, waitForExit BOOL, preLaunch TEXT, postLaunch TEXT )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, categorydata TEXT, gameInfoUrl TEXT)"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; - ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, categorydata TEXT, gameInfoUrl TEXT)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE + sqlStmt = @"CREATE TABLE tblGenre ( genreId INTEGER PRIMARY KEY, genre TEXT )"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblPlatform ( platformId INTEGER PRIMARY KEY, platform TEXT )"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE TABLE + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE TABLE tblManufacturer ( manufacturerId INTEGER PRIMARY KEY, manufacturer TEXT )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; - ExecuteStmtNonQuery( sqlStmt ); - sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; - ExecuteStmtNonQuery( sqlStmt ); + sqlStmt = @"CREATE INDEX idxFile1 ON tblFileItem(applicationId)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; + ExecuteStmtNonQuery(sqlStmt); + sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; + ExecuteStmtNonQuery(sqlStmt); - return true; - } + return true; + } - /// <summary> - /// Inserting some default values so that the db is preloaded - /// Should always be there. - /// </summary> - private static void InsertDefaultDBValues() - { + /// <summary> + /// Inserting some default values so that the db is preloaded + /// Should always be there. + /// </summary> + private static void InsertDefaultDBValues() + { - string sqlStmt = @"INSERT INTO + string sqlStmt = @"INSERT INTO tblGenre ( genre @@ -216,9 +217,9 @@ 'Unknown' )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"INSERT INTO + sqlStmt = @"INSERT INTO tblManufacturer ( manufacturer @@ -229,9 +230,9 @@ )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"INSERT INTO + sqlStmt = @"INSERT INTO tblPlatform ( platform @@ -241,27 +242,27 @@ 'Unknown' )"; - ExecuteStmtNonQuery( sqlStmt ); + ExecuteStmtNonQuery(sqlStmt); - using ( SQLiteTransaction transaction = SqlLiteConn.BeginTransaction() ) - { - FillDefaultDBLexiconHelper( "tblPlatform", "platform", CreateSystemLexiconList() ); - FillDefaultDBLexiconHelper( "tblManufacturer", "manufacturer", CreateManufacturerLexiconList() ); - FillDefaultDBLexiconHelper( "tblGenre", "genre", CreateGenreLexiconList() ); + using (SQLiteTransaction transaction = SqlLiteConn.BeginTransaction()) + { + FillDefaultDBLexiconHelper("tblPlatform", "platform", CreateSystemLexiconList()); + FillDefaultDBLexiconHelper("tblManufacturer", "manufacturer", CreateManufacturerLexiconList()); + FillDefaultDBLexiconHelper("tblGenre", "genre", CreateGenreLexiconList()); - transaction.Commit(); - } + transaction.Commit(); + } - } + } - private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) - { - SQLiteParameter[] paramCollection = new SQLiteParameter[1]; - SQLiteParameter paramInsertValue = new SQLiteParameter( "@insertValue", DbType.String ); - paramCollection[0] = paramInsertValue; + private static void FillDefaultDBLexiconHelper(string tableName, string columnName, List<string> itemList) + { + SQLiteParameter[] paramCollection = new SQLiteParameter[1]; + SQLiteParameter paramInsertValue = new SQLiteParameter("@insertValue", DbType.String); + paramCollection[0] = paramInsertValue; - string sqlStmt = @" + string sqlStmt = @" INSERT INTO " + tableName + @" ( @@ -272,22 +273,22 @@ @insertValue );"; - foreach ( string insertValue in itemList ) - { + foreach (string insertValue in itemList) + { - paramCollection[0].Value = insertValue; - ExecuteStmtNonQuery( sqlStmt, paramCollection ); - } - } + paramCollection[0].Value = insertValue; + ExecuteStmtNonQuery(sqlStmt, paramCollection); + } + } - #region dbsettings - static public string ReadSetting(string Key) - { - string sqlStmt = string.Empty; + #region dbsettings + static public string ReadSetting(string Key) + { + string sqlStmt = string.Empty; - string keyValue = string.Empty; - sqlStmt = @" + string keyValue = string.Empty; + sqlStmt = @" SELECT value @@ -298,19 +299,19 @@ key ='" + Key + "'"; - object o = ExecuteStmtScalar( sqlStmt ); - if ( o != null ) - { - keyValue = o.ToString(); - } - return keyValue; - } + object o = ExecuteStmtScalar(sqlStmt); + if (o != null) + { + keyValue = o.ToString(); + } + return keyValue; + } - static int CountKey(string Key) - { - string sqlStmt = string.Empty; - int keyValue = 0; - sqlStmt = @" + static int CountKey(string Key) + { + string sqlStmt = string.Empty; + int keyValue = 0; + sqlStmt = @" SELECT COUNT(*) @@ -319,22 +320,22 @@ WHERE key ='" + Key + "'"; - keyValue = Convert.ToInt32( ExecuteStmtScalar( sqlStmt ) ); - return keyValue; - } + keyValue = Convert.ToInt32(ExecuteStmtScalar(sqlStmt)); + return keyValue; + } - static public bool KeyExists(string Key) - { - return ( CountKey( Key ) > 0 ); - } + static public bool KeyExists(string Key) + { + return (CountKey(Key) > 0); + } - static public void WriteSetting(string Key, string Value) - { - string sqlStmt = string.Empty; + static public void WriteSetting(string Key, string Value) + { + string sqlStmt = string.Empty; - if ( KeyExists( Key ) ) - { - sqlStmt = @" + if (KeyExists(Key)) + { + sqlStmt = @" UPDATE tblSetting @@ -344,34 +345,34 @@ WHERE key = '" + Key + "'"; - } - else - { - sqlStmt = @" + } + else + { + sqlStmt = @" INSERT INTO tblSetting (key, value) VALUES('" + Key + "', '" + Value + "')"; - } - ExecuteStmtNonQuery( sqlStmt ); - } + } + ExecuteStmtNonQuery(sqlStmt); + } - static public void DeleteSetting(string Key) - { + static public void DeleteSetting(string Key) + { - string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; - ExecuteStmtNonQuery( sqlStmt ); - } - #endregion dbsettings + string sqlStmt = "DELETE FROM tblSetting WHERE key = '" + Key + "'"; + ExecuteStmtNonQuery(sqlStmt); + } + #endregion dbsettings - public static int LexiconDataExists(string tableName, string columnName, string fieldValue) - { + public static int LexiconDataExists(string tableName, string columnName, string fieldValue) + { - SQLiteParameter[] parameterArray = new SQLiteParameter[1]; - parameterArray[0] = GetParameter<string>( fieldValue, "@fieldValue", DbType.String ); + SQLiteParameter[] parameterArray = new SQLiteParameter[1]; + parameterArray[0] = GetParameter<string>(fieldValue, "@fieldValue", DbType.String); - string sqlStmt = @" + string sqlStmt = @" SELECT " + columnName + @"id @@ -381,7 +382,7 @@ WHERE " + columnName + @" LIKE @fieldValue"; - string sqlStmtInsert = @" + string sqlStmtInsert = @" INSERT INTO " + tableName + @" ( @@ -392,224 +393,243 @@ @fieldValue );"; - try - { + try + { - int lexiconId= ExecuteStmtScalar<Int32>( sqlStmt, parameterArray); + int lexiconId = ExecuteStmtScalar<Int32>(sqlStmt, parameterArray); - //lexion didnt exist, we save it - if ( lexiconId == 0 ) - { - ExecuteStmtNonQuery( sqlStmtInsert,parameterArray ); - return ExecuteStmtScalar<Int32>( sqlStmt,parameterArray ); - } - else - { - return lexiconId; - } - } - catch ( SQLiteException ex ) - { - throw ex; - } - } + //lexion didnt exist, we save it + if (lexiconId == 0) + { + ExecuteStmtNonQuery(sqlStmtInsert, parameterArray); + return ExecuteStmtScalar<Int32>(sqlStmt, parameterArray); + } + else + { + return lexiconId; + } + } + catch (SQLiteException ex) + { + throw ex; + } + } - #region default lexiconvalues - private static List<string> CreateGenreLexiconList() - { - List<string> genreList = new List<string>(); + #region default lexiconvalues + private static List<string> CreateGenreLexiconList() + { + List<string> genreList = new List<string>(); - genreList.Add( "Shooter" ); - genreList.Add( "Platform" ); - genreList.Add( "Adventure" ); + genreList.Add("Shooter"); + genreList.Add("Platform"); + genreList.Add("Adventure"); - return genreList; - } + return genreList; + } - private static List<string> CreateManufacturerLexiconList() - { - List<string> manufacturerList = new List<string>(); + private static List<string> CreateManufacturerLexiconList() + { + List<string> manufacturerList = new List<string>(); - manufacturerList.Add( "Sega" ); - manufacturerList.Add( "Nintendo" ); - manufacturerList.Add( "Konami" ); + manufacturerList.Add("Sega"); + manufacturerList.Add("Nintendo"); + manufacturerList.Add("Konami"); - return manufacturerList; - } + return manufacturerList; + } - private static List<string> CreateSystemLexiconList() - { - List<string> systemList = new List<string>(); + private static List<string> CreateSystemLexiconList() + { + List<string> systemList = new List<string>(); + systemList.Add(""); + systemList.Add("Atari 5200"); + systemList.Add("Atari 7800"); + systemList.Add("Atari Lynx"); + systemList.Add("Atari ST"); + systemList.Add("Atari Video Computer System"); + systemList.Add("Commodore 64/128"); + systemList.Add("Commodore Amiga"); + systemList.Add("Game Boy"); + systemList.Add("Game Boy Advance"); + systemList.Add("Game Boy Color"); + systemList.Add("Neo Geo"); + systemList.Add("Nintendo 64"); + systemList.Add("Nintendo Entertainment System"); + systemList.Add("PlayStation"); + systemList.Add("Sega Dreamcast"); + systemList.Add("Sega Game Gear"); + systemList.Add("Sega Genesis"); + systemList.Add("Sega Master System"); + systemList.Add("Super NES"); + systemList.Add("TurboGrafx-16"); + systemList.Add("Arcade"); + systemList.Add("PC"); + return systemList; + } - systemList.Add( "Sega Mastersystem" ); - systemList.Add( "Arcade" ); - systemList.Add( "PC" ); - return systemList; - } + #endregion default lexiconvalues - #endregion default lexiconvalues + static public List<ApplicationItem> ApplicationItemList + { + get + { + return globalApplicationItemList; + } + } - static public List<ApplicationItem> ApplicationItemList - { - get - { - return globalApplicationItemList; - } - } + static public ItemType GetItemType(string columnName, string tableName, int id) + { + ItemType itemType = ItemType.UNKNOWN; - static public ItemType GetItemType(string columnName, string tableName, int id) - { - ItemType itemType = ItemType.UNKNOWN; + string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; - string sqlStmt = "select " + columnName + " from " + tableName + " where applicationid = " + id; + itemType = ProgramUtils.StringToSourceType(ExecuteStmtScalar(sqlStmt).ToString()); + return itemType; + } - itemType = ProgramUtils.StringToSourceType( ExecuteStmtScalar( sqlStmt ).ToString() ); - return itemType; - } + #region dataaccess help methods - #region dataaccess help methods + public static DataTable ExecuteStmtDataTable(string stmt) + { + DataTable dataTable = new DataTable(); - public static DataTable ExecuteStmtDataTable(string stmt) - { - DataTable dataTable = new DataTable(); + try + { - try - { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + using (SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(command)) + { + dataAdapter.Fill(dataTable); + } + } + } + catch (Exception exception) + { + throw exception; + } + return dataTable; + } - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - using ( SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter( command ) ) - { - dataAdapter.Fill( dataTable ); - } - } - } - catch ( Exception exception ) - { - throw exception; - } - return dataTable; - } + public static void ExecuteStmtNonQuery(string stmt) + { + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + command.ExecuteNonQuery(); + } + } + catch (Exception exception) + { + throw exception; + } + } - public static void ExecuteStmtNonQuery(string stmt) - { - try - { - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - command.ExecuteNonQuery(); - } - } - catch ( Exception exception ) - { - throw exception; - } - } + public static void ExecuteStmtNonQuery(string stmt, SQLiteParameter[] paramcollection) + { + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + command.Parameters.AddRange(paramcollection); + command.ExecuteNonQuery(); + } + } + catch (Exception exception) + { + throw exception; + } + } - public static void ExecuteStmtNonQuery(string stmt, SQLiteParameter[] paramcollection) - { - try - { - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - command.Parameters.AddRange( paramcollection ); - command.ExecuteNonQuery(); - } - } - catch ( Exception exception ) - { - throw exception; - } - } + public static T ExecuteStmtScalar<T>(string stmt, SQLiteParameter[] paramcollection) + { - public static T ExecuteStmtScalar<T>(string stmt, SQLiteParameter[] paramcollection) - { - object o = null; - try - { - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - command.Parameters.AddRange( paramcollection ); - o = command.ExecuteScalar(); + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + command.Parameters.AddRange(paramcollection); + o = command.ExecuteScalar(); - if (o != null) - { - return (T) Convert.ChangeType(o, typeof(T)); - } - return default(T); - - } - } - catch ( Exception exception ) - { - throw exception; - } - } + if (o != null) + { + return (T)Convert.ChangeType(o, typeof(T)); + } + return default(T); + } + } + catch (Exception exception) + { + throw exception; + } + } - public static object ExecuteStmtScalar(string stmt) - { - object o = null; - try - { - using ( SQLiteCommand command = new SQLiteCommand( SqlLiteConn ) ) - { - command.CommandText = stmt; - o = command.ExecuteScalar(); - } - } - catch ( Exception exception ) - { - throw exception; - } - return o; - } - public static SQLiteParameter GetParameter<G>(G value, string parameterName, DbType type) - { - SQLiteParameter parameter = new SQLiteParameter(parameterName,type); - parameter.Value = value; + public static object ExecuteStmtScalar(string stmt) + { + object o = null; + try + { + using (SQLiteCommand command = new SQLiteCommand(SqlLiteConn)) + { + command.CommandText = stmt; + o = command.ExecuteScalar(); + } + } + catch (Exception exception) + { + throw exception; + } + return o; + } - return parameter; - } + public static SQLiteParameter GetParameter<G>(G value, string parameterName, DbType type) + { + SQLiteParameter parameter = new SQLiteParameter(parameterName, type); + parameter.Value = value; - #endregion dataaccess help methods + return parameter; + } - public static void LoadAllApplicationItems() - { - try - { - globalApplicationItemList.Clear(); + #endregion dataaccess help methods - using ( SQLiteCommand command = SqlLiteConn.CreateCommand() ) - { - command.CommandText = "SELECT * FROM tblApplicationItem order by iposition"; - using ( SQLiteDataReader dataReader = command.ExecuteReader() ) - { - while ( dataReader.Read() ) - { - ApplicationItem applicationItem = ( ApplicationItem ) ApplicationItemFactory.AppFactory.GetApplicationItem( GetItemType( "applicationItemType", "tblApplicationItem", Convert.ToInt32( dataReader["applicationId"] ) ), dataReader ); - // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); - globalApplicationItemList.Add( applicationItem ); - } + public static void LoadAllApplicationItems() + { + try + { + globalApplicationItemList.Clear(); - } - } - } - catch ( SQLiteException ex ) - { - Log.Info( "programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace ); - } - } - } + using (SQLiteCommand command = SqlLiteConn.CreateCommand()) + { + command.CommandText = "SELECT * FROM tblApplicationItem order by iposition"; + using (SQLiteDataReader dataReader = command.ExecuteReader()) + { + while (dataReader.Read()) + { + ApplicationItem applicationItem = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(GetItemType("applicationItemType", "tblApplicationItem", Convert.ToInt32(dataReader["applicationId"])), dataReader); + // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); + globalApplicationItemList.Add(applicationItem); + } + + } + } + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -863,6 +863,8 @@ } } + + private void gamebaseDBButton_Click(object sender, EventArgs e) { openFileDialog.FileName = this.gamebaseDBTextBox.Text; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -72,7 +72,7 @@ this.enabledCheckbox.AutoSize = true; this.enabledCheckbox.Location = new System.Drawing.Point(427, 17); this.enabledCheckbox.Name = "enabledCheckbox"; - this.enabledCheckbox.Size = new System.Drawing.Size(64, 17); + this.enabledCheckbox.Size = new System.Drawing.Size(65, 17); this.enabledCheckbox.TabIndex = 1; this.enabledCheckbox.Text = "Enabled"; this.enabledCheckbox.UseVisualStyleBackColor = true; @@ -100,7 +100,7 @@ this.titleTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.titleTextBox.Location = new System.Drawing.Point(94, 44); this.titleTextBox.Name = "titleTextBox"; - this.titleTextBox.Size = new System.Drawing.Size(325, 21); + this.titleTextBox.Size = new System.Drawing.Size(325, 20); this.titleTextBox.TabIndex = 4; // // applicationExeButton @@ -118,7 +118,7 @@ this.shellexecuteCheckBox.AutoSize = true; this.shellexecuteCheckBox.Location = new System.Drawing.Point(7, 322); this.shellexecuteCheckBox.Name = "shellexecuteCheckBox"; - this.shellexecuteCheckBox.Size = new System.Drawing.Size(87, 17); + this.shellexecuteCheckBox.Size = new System.Drawing.Size(88, 17); this.shellexecuteCheckBox.TabIndex = 7; this.shellexecuteCheckBox.Text = "ShellExecute"; this.shellexecuteCheckBox.UseVisualStyleBackColor = true; @@ -129,7 +129,7 @@ this.waitExitCheckBox.AutoSize = true; this.waitExitCheckBox.Location = new System.Drawing.Point(7, 368); this.waitExitCheckBox.Name = "waitExitCheckBox"; - this.waitExitCheckBox.Size = new System.Drawing.Size(86, 17); + this.waitExitCheckBox.Size = new System.Drawing.Size(82, 17); this.waitExitCheckBox.TabIndex = 8; this.waitExitCheckBox.Text = "Wait for exit"; this.waitExitCheckBox.UseVisualStyleBackColor = true; @@ -157,7 +157,7 @@ this.applicationImageTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.applicationImageTextBox.Location = new System.Drawing.Point(94, 97); this.applicationImageTextBox.Name = "applicationImageTextBox"; - this.applicationImageTextBox.Size = new System.Drawing.Size(325, 21); + this.applicationImageTextBox.Size = new System.Drawing.Size(325, 20); this.applicationImageTextBox.TabIndex = 13; // // applicationArgumentsTextBox @@ -165,7 +165,7 @@ this.applicationArgumentsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.applicationArgumentsTextBox.Location = new System.Drawing.Point(94, 123); this.applicationArgumentsTextBox.Name = "applicationArgumentsTextBox"; - this.applicationArgumentsTextBox.Size = new System.Drawing.Size(325, 21); + this.applicationArgumentsTextBox.Size = new System.Drawing.Size(325, 20); this.applicationArgumentsTextBox.TabIndex = 14; // // winStyleLabel @@ -206,7 +206,7 @@ this.quoteCheckBox.AutoSize = true; this.quoteCheckBox.Location = new System.Drawing.Point(7, 299); this.quoteCheckBox.Name = "quoteCheckBox"; - this.quoteCheckBox.Size = new System.Drawing.Size(104, 17); + this.quoteCheckBox.Size = new System.Drawing.Size(102, 17); this.quoteCheckBox.TabIndex = 19; this.quoteCheckBox.Text = "Quote filenames"; this.quoteCheckBox.UseVisualStyleBackColor = true; @@ -236,7 +236,7 @@ this.allowRefreshCheckBox.AutoSize = true; this.allowRefreshCheckBox.Location = new System.Drawing.Point(7, 345); this.allowRefreshCheckBox.Name = "allowRefreshCheckBox"; - this.allowRefreshCheckBox.Size = new System.Drawing.Size(159, 17); + this.allowRefreshCheckBox.Size = new System.Drawing.Size(154, 17); this.allowRefreshCheckBox.TabIndex = 30; this.allowRefreshCheckBox.Text = "Allow refresh in mediaportal"; this.allowRefreshCheckBox.UseVisualStyleBackColor = true; @@ -257,7 +257,7 @@ this.applicationExeTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.applicationExeTextBox.Location = new System.Drawing.Point(94, 71); this.applicationExeTextBox.Name = "applicationExeTextBox"; - this.applicationExeTextBox.Size = new System.Drawing.Size(325, 21); + this.applicationExeTextBox.Size = new System.Drawing.Size(325, 20); this.applicationExeTextBox.TabIndex = 32; this.applicationExeTextBox.TextChanged += new System.EventHandler(this.applicationExeTextBox_TextChanged); // Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -140,6 +140,7 @@ toolTip.SetToolTip(applicationExeTextBox, "Program you wish to execute, include the full path (mandatory if ShellExecute is " + "OFF)"); toolTip.SetToolTip(allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal."); toolTip.SetToolTip(prePostButton, "Configure an command to run as pre or post of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); + } protected void applicationExeButton_Click(object sender, EventArgs e) @@ -214,5 +215,10 @@ if (File.Exists(applicationExeTextBox.Text)) startupDirComboBox.Items.Add(Path.GetDirectoryName(applicationExeTextBox.Text)); } + + + + + } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -28,6 +28,8 @@ /// </summary> private void InitializeComponent() { + this.platformComboBox = new System.Windows.Forms.ComboBox(); + this.platformLabel = new System.Windows.Forms.Label(); this.SuspendLayout(); // // enabledCheckbox @@ -53,16 +55,17 @@ // this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); // + // applicationArgumentsTextBox + // + this.toolTip.SetToolTip(this.applicationArgumentsTextBox, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + + "%FILE% if the filename needs to be placed in some specific place between several" + + " arguments)"); + // // winStyleComboBox // this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + "gration in MediaPortal"); // - // startupDirTextBox - // - this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + - "EDIR% if you want to use the directory where the launched file is stored)"); - // // quoteCheckBox // this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + @@ -72,14 +75,59 @@ // this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + ""); - // + // platformComboBox + // + this.platformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.platformComboBox.FormattingEnabled = true; + this.platformComboBox.Location = new System.Drawing.Point(94, 204); + this.platformComboBox.Name = "platformComboBox"; + this.platformComboBox.Size = new System.Drawing.Size(325, 21); + this.platformComboBox.TabIndex = 42; + // + // platformLabel + // + this.platformLabel.AutoSize = true; + this.platformLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.platformLabel.Location = new System.Drawing.Point(3, 207); + this.platformLabel.Name = "platformLabel"; + this.platformLabel.Size = new System.Drawing.Size(84, 13); + this.platformLabel.TabIndex = 41; + this.platformLabel.Text = "Default platform:"; + // // AppSettingsDirCache // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.platformComboBox); + this.Controls.Add(this.platformLabel); this.Name = "AppSettingsDirCache"; this.Load += new System.EventHandler(this.AppSettingsDirCache_Load); + this.Controls.SetChildIndex(this.winTypeLabel, 0); + this.Controls.SetChildIndex(this.enabledCheckbox, 0); + this.Controls.SetChildIndex(this.titleLabel, 0); + this.Controls.SetChildIndex(this.applicationExeLabel, 0); + this.Controls.SetChildIndex(this.titleTextBox, 0); + this.Controls.SetChildIndex(this.applicationExeButton, 0); + this.Controls.SetChildIndex(this.shellexecuteCheckBox, 0); + this.Controls.SetChildIndex(this.waitExitCheckBox, 0); + this.Controls.SetChildIndex(this.applicationImageLabel, 0); + this.Controls.SetChildIndex(this.applicationArgumentsLabel, 0); + this.Controls.SetChildIndex(this.applicationImageTextBox, 0); + this.Controls.SetChildIndex(this.applicationArgumentsTextBox, 0); + this.Controls.SetChildIndex(this.winStyleLabel, 0); + this.Controls.SetChildIndex(this.winStyleComboBox, 0); + this.Controls.SetChildIndex(this.startupDirLabel, 0); + this.Controls.SetChildIndex(this.quoteCheckBox, 0); + this.Controls.SetChildIndex(this.applicationImageButton, 0); + this.Controls.SetChildIndex(this.startupDirButton, 0); + this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); + this.Controls.SetChildIndex(this.informationLabel, 0); + this.Controls.SetChildIndex(this.applicationExeTextBox, 0); + this.Controls.SetChildIndex(this.prePostButton, 0); + this.Controls.SetChildIndex(this.startupDirComboBox, 0); + this.Controls.SetChildIndex(this.platformLabel, 0); + this.Controls.SetChildIndex(this.platformComboBox, 0); this.ResumeLayout(false); this.PerformLayout(); @@ -87,5 +135,8 @@ #endregion + protected System.Windows.Forms.ComboBox platformComboBox; + protected System.Windows.Forms.Label platformLabel; + } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -47,6 +47,7 @@ public override bool AppItemToForm(ApplicationItem curApp) { + ProgramUtils.FillComboBox("tblPlatform", "platform", platformComboBox); base.AppItemToForm(curApp); enabledCheckbox.Checked = curApp.Enabled; titleTextBox.Text = curApp.Title; @@ -59,6 +60,9 @@ waitExitCheckBox.Checked = (curApp.WaitForExit); applicationImageTextBox.Text = curApp.Imagefile; allowRefreshCheckBox.Checked = curApp.RefreshGUIAllowed; + if(curApp.PlatformId != 0){ + platformComboBox.SelectedValue = curApp.PlatformId; + } return true; } @@ -77,6 +81,7 @@ curApp.SourceType = ItemType.DIRCACHE; curApp.Imagefile = applicationImageTextBox.Text; curApp.RefreshGUIAllowed = (allowRefreshCheckBox.Checked); + curApp.PlatformId =(int) platformComboBox.SelectedValue; } @@ -120,6 +125,10 @@ //untiil we really do something with this option in appdircache.. allowRefreshCheckBox.Checked = false; + + + + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -335,28 +335,7 @@ this.filterComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.filterComboBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.filterComboBox.Items.AddRange(new object[] { - "Arcade", - "Atari 5200", - "Atari 7800", - "Atari Lynx", - "Atari ST", - "Atari Video Computer System", - "Commodore 64/128", - "Commodore Amiga", - "Game Boy", - "Game Boy Advance", - "Game Boy Color", - "Neo Geo", - "Nintendo 64", - "Nintendo Entertainment System", - "PlayStation", - "Sega Dreamcast", - "Sega Game Gear", - "Sega Genesis", - "Sega Master System", - "Super NES", - "TurboGrafx-16"}); + this.filterComboBox.Location = new System.Drawing.Point(63, 22); this.filterComboBox.Name = "filterComboBox"; this.filterComboBox.Size = new System.Drawing.Size(132, 21); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -32,6 +32,7 @@ using System.Text; using System.Threading; using System.Windows.Forms; +using System.Data.SQLite; using GUIPrograms; using GUIPrograms.Database; @@ -63,17 +64,20 @@ } } + + void SetCurApp(ApplicationItem value) { curApp = value; if (curApp != null) { - filterComboBox.Text = curApp.SystemDefault; + filterComboBox.SelectedValue = curApp.PlatformId; } } public void Setup() { + SyncFileList(); UpdateButtonStates(); ChangeScraperSaveType(ScraperSaveType.DataAndImages); @@ -82,6 +86,7 @@ public FileInfoScraperForm() { InitializeComponent(); + ProgramUtils.FillComboBox("tblPlatform", "platform", filterComboBox); } #endregion @@ -122,6 +127,8 @@ return result; } + + private void SelectBestMatch(ListViewItem curItem) { if (curItem.Tag == null) return; @@ -438,7 +445,7 @@ { if ((curApp != null) && (filterComboBox.Text != "")) { - curApp.SystemDefault = filterComboBox.Text; + curApp.PlatformId = (int) filterComboBox.SelectedValue; //m_CurApp.Write(); } this.Close(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -70,6 +70,7 @@ private bool profilesIsLoaded = false; private const string ROOTNODENAME = "Applications"; private const int POSITIONHOLDER = 10; + #endregion @@ -1027,50 +1028,12 @@ private void UpdateComboBoxes() { - FillComboBox("tblPlatform", "platform", removePlatformComboBox); - FillComboBox("tblManufacturer", "manufacturer", removeManufacturerComboBox); - FillComboBox("tblGenre", "genre", removeGenreComboBox); + ProgramUtils.FillComboBox("tblPlatform", "platform", removePlatformComboBox); + ProgramUtils.FillComboBox("tblManufacturer", "manufacturer", removeManufacturerComboBox); + ProgramUtils.FillComboBox("tblGenre", "genre", removeGenreComboBox); } - private void FillComboBox(string tableName, string orderBy, ComboBox comboBox) - { - List<ListItem> listItemList = new List<ListItem>(); - - string sqlStmt = @" - SELECT - * - - FROM - " + tableName + @" - - ORDER BY " + orderBy; - - try - { - - SQLiteCommand command = new SQLiteCommand(DatabaseHandler.SqlLiteConn); - - command.CommandText = sqlStmt; - using (SQLiteDataReader dataReader = command.ExecuteReader()) - { - while (dataReader.Read()) - { - ListItem listItem = new ListItem(dataReader[1].ToString(), Convert.ToInt32(dataReader[0])); - listItemList.Add(listItem); - } - } - } - catch (Exception exception) - { - throw exception; - } - - comboBox.DataSource = listItemList; - comboBox.ValueMember = "Value"; - comboBox.DisplayMember = "Text"; - - } - + private void mameImportToolStripMenuItem_Click(object sender, EventArgs e) { AddApplication(ItemType.MAMEDIRECT); @@ -1125,6 +1088,7 @@ { DeleteData("tblPlatform", "platformId", this.removePlatformComboBox.SelectedValue.ToString()); UpdateFileItems("platformId", this.removePlatformComboBox.SelectedValue.ToString()); + UpdateApplicationItem("platformId", this.removePlatformComboBox.SelectedValue.ToString()); UpdateComboBoxes(); } @@ -1177,7 +1141,31 @@ } } + //if something was removed that is in a fileitem + //set it to as default value (unknown) + private void UpdateApplicationItem(string removedField, string removedValue) + { + string sqlStmt = @" + UPDATE + tblApplicationItem + + SET + " + removedField + @" = 1 + + WHERE + " + removedField + @" = " + removedValue; + try + { + DatabaseHandler.ExecuteStmtNonQuery(sqlStmt); + } + catch (Exception exception) + { + throw exception; + } + } + + private void DeleteData(string tableName, string column, string uniqueValue) { //never remove 1 (unknown) @@ -1205,28 +1193,6 @@ UpdateComboBoxes(); } - public class ListItem - { - private string text; - - public string Text - { - get { return text; } - set { text = value; } - } - private int value; - - public int Value - { - get { return this.value; } - set { this.value = value; } - } - - public ListItem(string label, int data) - { - text = label; - value = data; - } - } + } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -87,7 +87,7 @@ string validExtensions; bool importValidImagesOnly; - string systemDefault; + int platformId; string launchErrorMsg; // two magic image-slideshow counters @@ -259,10 +259,10 @@ set { importValidImagesOnly = value; } } - public string SystemDefault + public int PlatformId { - get { return systemDefault; } - set { systemDefault = value; } + get { return platformId; } + set { platformId = value; } } public string LaunchErrorMsg { @@ -307,7 +307,7 @@ validExtensions = ""; appPosition = 0; importValidImagesOnly = false; - systemDefault = ""; + platformId = 0; waitForExit = true; filesAreLoaded = false; preLaunch = ""; @@ -727,7 +727,7 @@ parameterArray[16] = DatabaseHandler.GetParameter<int>( Position, "@position", DbType.Int32 ); parameterArray[17] = DatabaseHandler.GetParameter<bool>( Enabled, "@enabled", DbType.Boolean); parameterArray[18] = DatabaseHandler.GetParameter<bool>( RefreshGUIAllowed, "@refreshGUIAllowed", DbType.Boolean ); - parameterArray[19] = DatabaseHandler.GetParameter<string>( SystemDefault, "@systemDefault", DbType.String); + parameterArray[19] = DatabaseHandler.GetParameter<int>( PlatformId, "@platformId", DbType.Int32); parameterArray[20] = DatabaseHandler.GetParameter<bool>( WaitForExit, "@waitForExit", DbType.Boolean); parameterArray[21] = DatabaseHandler.GetParameter<string>( PreLaunch, "@preLaunch", DbType.String); parameterArray[22] = DatabaseHandler.GetParameter<string>( PostLaunch, "@postLaunch", DbType.String); @@ -765,7 +765,7 @@ iposition, enabled, refreshGUIAllowed, - systemDefault, + platformId, waitForExit, preLaunch, postLaunch @@ -791,7 +791,7 @@ @position, @enabled, @refreshGUIAllowed, - @systemDefault, + @platformId, @waitForExit, @preLaunch, @postLaunch @@ -832,7 +832,7 @@ parameterArray[16] = DatabaseHandler.GetParameter<int>( Position, "@position", DbType.Int32); parameterArray[17] = DatabaseHandler.GetParameter<bool>( Enabled, "@enabled", DbType.Boolean); parameterArray[18] = DatabaseHandler.GetParameter<bool>( RefreshGUIAllowed, "@refreshGUIAllowed", DbType.Boolean ); - parameterArray[19] = DatabaseHandler.GetParameter<string>( SystemDefault, "@systemDefault", DbType.String ); + parameterArray[19] = DatabaseHandler.GetParameter<int>( PlatformId, "@platformId", DbType.Int32 ); parameterArray[20] = DatabaseHandler.GetParameter<bool>( WaitForExit, "@waitForExit", DbType.Boolean ); parameterArray[21] = DatabaseHandler.GetParameter<string>( PreLaunch, "@preLaunch", DbType.String ); parameterArray[22] = DatabaseHandler.GetParameter<string>( PostLaunch, "@postLaunch", DbType.String ); @@ -861,7 +861,7 @@ iposition = @position, enabled = @enabled, refreshGUIAllowed = @refreshGUIAllowed, - systemDefault = @systemDefault, + platformId = @platformId, waitForExit = @waitForExit, preLaunch = @preLaunch, postLaunch = @postLaunch @@ -1030,7 +1030,7 @@ this.WaitForExit = sourceApp.WaitForExit; this.PreLaunch = sourceApp.PreLaunch; this.PostLaunch = sourceApp.PostLaunch; - this.SystemDefault = sourceApp.SystemDefault; + this.PlatformId = sourceApp.PlatformId; } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -122,7 +122,7 @@ item.ImportValidImagesOnly =(bool) dataReader["importvalidimagesonly"]; item.Position = Convert.ToInt32(dataReader["iposition"]); item.RefreshGUIAllowed = (bool) dataReader["refreshGUIAllowed"]; - item.SystemDefault = (string) dataReader["systemdefault"]; + item.PlatformId = Convert.ToInt32(dataReader["platformId"]); item.WaitForExit =(bool) dataReader["waitforexit"]; item.PreLaunch = (string) dataReader["preLaunch"]; item.PostLaunch =(string) dataReader["postLaunch"]; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-08-03 08:07:10 UTC (rev 786) @@ -28,6 +28,7 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Data.SQLite; using System.Drawing; using System.Drawing.Imaging; using System.IO; @@ -45,6 +46,8 @@ using MediaPortal.GUI.Library; using MediaPortal.Util; +using GUIPrograms.Database; + namespace GUIPrograms { #region enums @@ -325,5 +328,67 @@ return Result; } + + public class ListItem + { + private string text; + + public string Text + { + get { return text; } + set { text = value; } + } + private int value; + + public int Value + { + get { return this.value; } + set { this.value = value; } + } + + public ListItem(string label, int data) + { + text = label; + value = data; + } + } + public static void FillComboBox(string tableName, string orderBy, ComboBox comboBox) + { + List<ListItem> listItemList = new List<ListItem>(); + + string sqlStmt = @" + SELECT + * + + FROM + " + tableName + @" + + ORDER BY " + orderBy; + + try + { + + SQLiteCommand command = new SQLiteCommand(DatabaseHandler.SqlLiteConn); + + command.CommandText = sqlStmt; + using (SQLiteDataReader dataReader = command.ExecuteReader()) + { + while (dataReader.Read()) + { + ListItem listItem = new ListItem(dataReader[1].ToString(), Convert.ToInt32(dataReader[0])); + listItemList.Add(listItem); + } + } + } + catch (Exception exception) + { + throw exception; + } + + comboBox.DataSource = listItemList; + comboBox.ValueMember = "Value"; + comboBox.DisplayMember = "Text"; + + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-08-02 15:43:42 UTC (rev 785) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-08-03 08:07:10 UTC (rev 786) @@ -19,7 +19,7 @@ Database/views: grouping added, fileinfodetails -Allgamesupport updated. +Allgamesupport updated./thanks chefkoch Fileinfoscraper reworked Mame, Gamebase support partially rewritten. @@ -46,16 +46,14 @@ - Appsettingsrootform: do not use inheritance, make this individual, so we easily can add global-options etc. - Dynamic checkbox list in the different filesview, allow us to "plugin" as many options we want for a special appitem -DB - - - add platformid instead of system default..application item - ThumbnailSupport: - [low] genre: thumbs for genre, for example it could be created on AllGame lookup, for first file with this genre - - ....... +Genre: + - Change to genre/categoryinstead. + --------------------- .: Things to clear :. --------------------- @@ -97,23 +95,20 @@ -> 2. can be renamed by plugin, when renaming the appItem -> 3. there could be a msgBox, which asks the user what to do, 1. or 2. ? go for two!! -------------------------------------------------------------------------------------- -Above: mabey add an advanced option for the user. In short, allowing a merge between "easy setup" (as above) +Above: maybe add an advanced option for the user. In short, allowing a merge between "easy setup" (as above) and total control filepaths etc. -MyEmu... +MyEmu...i think Add some more specific emulator support.. - - using emulator ids??? can be used for - - filter in fileinfoscraperForm.. we got system id's now.. so feel free to implement.Will add emulator table at some point. - - - easier application image assigning together with thumbsdir -> we also could provide icons for most common system + - using emulator ids??? yes at some point. this could benefit automatic downloads etc + - easier application image assigning together with thumbsdir -> we also could provide icons for most common system ConfigurationTool redesign: - - saving the path to file for import - - saving the path to image dir, or using thumbsDir of MP, are there any pros? + - saving the path to file for import. ????? what??? + - saving the path to image dir, or using thumbsDir of MP, are there any pros? - Iso moun... [truncated message content] |
From: <nor...@us...> - 2007-08-10 10:44:22
|
Revision: 824 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=824&view=rev Author: northern_sky Date: 2007-08-10 03:44:20 -0700 (Fri, 10 Aug 2007) Log Message: ----------- added dbstuff,renamed genre, some minor change.please reinit views xmlfiles and db,recopy skin Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/skin/BlueTwo/myProgramsAltFileInfo.xml trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -159,9 +159,9 @@ ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, mainGenreId INTEGER, subGenreId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, categorydata TEXT, gameInfoUrl TEXT)"; + sqlStmt = @"CREATE TABLE tblFileItem (fileid INTEGER PRIMARY KEY, applicationId INTEGER, title TEXT, filename TEXT, imagefile TEXT, genreId INTEGER, genreStyleId INTEGER, country TEXT, manufacturerId INTEGER, year INTEGER, rating INTEGER, overview TEXT, platformId INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, categorydata TEXT, gameInfoUrl TEXT)"; ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE TABLE tblFilterItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, tag INTEGER)"; + sqlStmt = @"CREATE TABLE tblFileLinkItem (applicationId INTEGER, grouperAppID INTEGER, fileID INTEGER, filename TEXT, updateFlag INTEGER)"; ExecuteStmtNonQuery(sqlStmt); sqlStmt = @"CREATE TABLE tblSetting (settingid INTEGER PRIMARY KEY, key TEXT, value TEXT)"; ExecuteStmtNonQuery(sqlStmt); @@ -192,7 +192,7 @@ ExecuteStmtNonQuery(sqlStmt); sqlStmt = @"CREATE INDEX idxApp1 ON tblApplicationItem(fatherNodeId)"; ExecuteStmtNonQuery(sqlStmt); - sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(applicationId, fileID, grouperAppID)"; + sqlStmt = @"CREATE UNIQUE INDEX idxFilterItem1 ON tblFileLinkItem(applicationId, fileID, grouperAppID)"; ExecuteStmtNonQuery(sqlStmt); return true; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -107,7 +107,6 @@ this.Name = "AppSettingsFilesImportProgress"; this.Load += new System.EventHandler(this.AppFilesImportProgress_Load); this.Controls.SetChildIndex(this.prePostButton, 0); - this.Controls.SetChildIndex(this.winTypeLabel, 0); this.Controls.SetChildIndex(this.enabledCheckbox, 0); this.Controls.SetChildIndex(this.titleLabel, 0); this.Controls.SetChildIndex(this.applicationExeLabel, 0); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -51,7 +51,7 @@ private void AppFilesImportProgress_Load(object sender, EventArgs e) { enabledCheckbox.Visible = false; - winTypeLabel.Text = "Import running....."; + informationLabel.Text = "Import running....."; titleLabel.Visible = false; titleTextBox.Visible = false; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -227,7 +227,7 @@ private void AddItem() { FileItem file = new FileItem(); - file.AppID = currentApplication.AppID; // CRUCIAL!! :-) + file.AppID = currentApplication.ApplicationItemId; // CRUCIAL!! :-) FileDetailsForm frmFileDetails = new FileDetailsForm(); frmFileDetails.CurApp = currentApplication; frmFileDetails.CurFile = file; @@ -235,14 +235,14 @@ if (dialogResult == DialogResult.OK) { file.Write(); - currentApplication.ItemLoad(currentApplication.AppID, ""); + currentApplication.ItemLoad(currentApplication.ApplicationItemId, ""); SyncListView(); } } private void ChangeFilePath(string NewPath) { - currentApplication.ItemLoad(currentApplication.AppID, NewPath); + currentApplication.ItemLoad(currentApplication.ApplicationItemId, NewPath); SyncListView(); } @@ -260,7 +260,7 @@ if (dialogResult == DialogResult.OK) { file.Write(); - currentApplication.ItemLoad(currentApplication.AppID, ""); + currentApplication.ItemLoad(currentApplication.ApplicationItemId, ""); SyncListView(); } } @@ -311,7 +311,7 @@ } } } - currentApplication.ItemLoad(currentApplication.AppID, ""); + currentApplication.ItemLoad(currentApplication.ApplicationItemId, ""); SyncListView(); } @@ -550,7 +550,7 @@ if (app is ApplicationItemGrouper) { ApplicationItemGrouper appi = (ApplicationItemGrouper) app; - if (appi.AppID == GrouperAppID) + if (appi.ApplicationItemId == GrouperAppID) { appi.LoadFiles(); } @@ -567,7 +567,7 @@ if (app.SourceType == ItemType.GROUPER) { ToolStripMenuItem newMenu = new ToolStripMenuItem(app.Title); - newMenu.Tag = app.AppID; + newMenu.Tag = app.ApplicationItemId; newMenu.Click += new EventHandler(this.FavouriteGrouperItem_Click); this.contextFavouritesMenuStrip.Items.Add(newMenu); } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -29,7 +29,6 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - this.winTypeLabel = new System.Windows.Forms.Label(); this.enabledCheckbox = new System.Windows.Forms.CheckBox(); this.titleLabel = new System.Windows.Forms.Label(); this.applicationExeLabel = new System.Windows.Forms.Label(); @@ -59,29 +58,19 @@ ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); this.SuspendLayout(); // - // winTypeLabel - // - this.winTypeLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.winTypeLabel.Location = new System.Drawing.Point(3, 6); - this.winTypeLabel.Name = "winTypeLabel"; - this.winTypeLabel.Size = new System.Drawing.Size(331, 35); - this.winTypeLabel.TabIndex = 0; - this.winTypeLabel.Text = "WindowType"; - this.winTypeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // enabledCheckbox // this.enabledCheckbox.AutoSize = true; this.enabledCheckbox.Location = new System.Drawing.Point(427, 17); this.enabledCheckbox.Name = "enabledCheckbox"; - this.enabledCheckbox.Size = new System.Drawing.Size(64, 17); + this.enabledCheckbox.Size = new System.Drawing.Size(65, 17); this.enabledCheckbox.TabIndex = 1; this.enabledCheckbox.Text = "Enabled"; this.enabledCheckbox.UseVisualStyleBackColor = true; // // titleLabel // - this.titleLabel.Location = new System.Drawing.Point(3, 44); + this.titleLabel.Location = new System.Drawing.Point(2, 71); this.titleLabel.Name = "titleLabel"; this.titleLabel.Size = new System.Drawing.Size(93, 20); this.titleLabel.TabIndex = 2; @@ -90,7 +79,7 @@ // // applicationExeLabel // - this.applicationExeLabel.Location = new System.Drawing.Point(3, 70); + this.applicationExeLabel.Location = new System.Drawing.Point(2, 97); this.applicationExeLabel.Name = "applicationExeLabel"; this.applicationExeLabel.Size = new System.Drawing.Size(93, 20); this.applicationExeLabel.TabIndex = 3; @@ -100,16 +89,16 @@ // titleTextBox // this.titleTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.titleTextBox.Location = new System.Drawing.Point(94, 44); + this.titleTextBox.Location = new System.Drawing.Point(93, 71); this.titleTextBox.Name = "titleTextBox"; - this.titleTextBox.Size = new System.Drawing.Size(325, 21); + this.titleTextBox.Size = new System.Drawing.Size(325, 20); this.titleTextBox.TabIndex = 4; this.titleTextBox.TextChanged += new System.EventHandler(this.titleTextBox_TextChanged); // // applicationExeButton // this.applicationExeButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; - this.applicationExeButton.Location = new System.Drawing.Point(427, 69); + this.applicationExeButton.Location = new System.Drawing.Point(426, 96); this.applicationExeButton.Name = "applicationExeButton"; this.applicationExeButton.Size = new System.Drawing.Size(31, 23); this.applicationExeButton.TabIndex = 6; @@ -121,7 +110,7 @@ this.shellexecuteCheckBox.AutoSize = true; this.shellexecuteCheckBox.Location = new System.Drawing.Point(7, 322); this.shellexecuteCheckBox.Name = "shellexecuteCheckBox"; - this.shellexecuteCheckBox.Size = new System.Drawing.Size(87, 17); + this.shellexecuteCheckBox.Size = new System.Drawing.Size(88, 17); this.shellexecuteCheckBox.TabIndex = 7; this.shellexecuteCheckBox.Text = "ShellExecute"; this.shellexecuteCheckBox.UseVisualStyleBackColor = true; @@ -132,14 +121,14 @@ this.waitExitCheckBox.AutoSize = true; this.waitExitCheckBox.Location = new System.Drawing.Point(7, 368); this.waitExitCheckBox.Name = "waitExitCheckBox"; - this.waitExitCheckBox.Size = new System.Drawing.Size(86, 17); + this.waitExitCheckBox.Size = new System.Drawing.Size(82, 17); this.waitExitCheckBox.TabIndex = 8; this.waitExitCheckBox.Text = "Wait for exit"; this.waitExitCheckBox.UseVisualStyleBackColor = true; // // applicationImageLabel // - this.applicationImageLabel.Location = new System.Drawing.Point(3, 97); + this.applicationImageLabel.Location = new System.Drawing.Point(2, 124); this.applicationImageLabel.Name = "applicationImageLabel"; this.applicationImageLabel.Size = new System.Drawing.Size(93, 20); this.applicationImageLabel.TabIndex = 11; @@ -148,7 +137,7 @@ // // applicationArgumentsLabel // - this.applicationArgumentsLabel.Location = new System.Drawing.Point(3, 123); + this.applicationArgumentsLabel.Location = new System.Drawing.Point(2, 150); this.applicationArgumentsLabel.Name = "applicationArgumentsLabel"; this.applicationArgumentsLabel.Size = new System.Drawing.Size(93, 20); this.applicationArgumentsLabel.TabIndex = 12; @@ -158,24 +147,23 @@ // applicationImageTextBox // this.applicationImageTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.applicationImageTextBox.Location = new System.Drawing.Point(94, 97); + this.applicationImageTextBox.Location = new System.Drawing.Point(93, 124); this.applicationImageTextBox.Name = "applicationImageTextBox"; - this.applicationImageTextBox.Size = new System.Drawing.Size(325, 21); + this.applicationImageTextBox.Size = new System.Drawing.Size(325, 20); this.applicationImageTextBox.TabIndex = 13; - this.applicationImageTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; this.applicationImageTextBox.TextChanged += new System.EventHandler(this.applicationImageTextBox_TextChanged); // // applicationArgumentsTextBox // this.applicationArgumentsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.applicationArgumentsTextBox.Location = new System.Drawing.Point(94, 123); + this.applicationArgumentsTextBox.Location = new System.Drawing.Point(93, 150); this.applicationArgumentsTextBox.Name = "applicationArgumentsTextBox"; - this.applicationArgumentsTextBox.Size = new System.Drawing.Size(325, 21); + this.applicationArgumentsTextBox.Size = new System.Drawing.Size(325, 20); this.applicationArgumentsTextBox.TabIndex = 14; // // winStyleLabel // - this.winStyleLabel.Location = new System.Drawing.Point(3, 150); + this.winStyleLabel.Location = new System.Drawing.Point(2, 177); this.winStyleLabel.Name = "winStyleLabel"; this.winStyleLabel.Size = new System.Drawing.Size(93, 20); this.winStyleLabel.TabIndex = 15; @@ -192,14 +180,14 @@ "Hidden", "Minimized", "Maximized"}); - this.winStyleComboBox.Location = new System.Drawing.Point(94, 150); + this.winStyleComboBox.Location = new System.Drawing.Point(93, 177); this.winStyleComboBox.Name = "winStyleComboBox"; this.winStyleComboBox.Size = new System.Drawing.Size(325, 21); this.winStyleComboBox.TabIndex = 16; // // startupDirLabel // - this.startupDirLabel.Location = new System.Drawing.Point(3, 177); + this.startupDirLabel.Location = new System.Drawing.Point(2, 204); this.startupDirLabel.Name = "startupDirLabel"; this.startupDirLabel.Size = new System.Drawing.Size(85, 20); this.startupDirLabel.TabIndex = 18; @@ -211,7 +199,7 @@ this.quoteCheckBox.AutoSize = true; this.quoteCheckBox.Location = new System.Drawing.Point(7, 299); this.quoteCheckBox.Name = "quoteCheckBox"; - this.quoteCheckBox.Size = new System.Drawing.Size(104, 17); + this.quoteCheckBox.Size = new System.Drawing.Size(102, 17); this.quoteCheckBox.TabIndex = 19; this.quoteCheckBox.Text = "Quote filenames"; this.quoteCheckBox.UseVisualStyleBackColor = true; @@ -219,7 +207,7 @@ // applicationImageButton // this.applicationImageButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; - this.applicationImageButton.Location = new System.Drawing.Point(427, 94); + this.applicationImageButton.Location = new System.Drawing.Point(426, 121); this.applicationImageButton.Name = "applicationImageButton"; this.applicationImageButton.Size = new System.Drawing.Size(31, 23); this.applicationImageButton.TabIndex = 26; @@ -229,7 +217,7 @@ // startupDirButton // this.startupDirButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; - this.startupDirButton.Location = new System.Drawing.Point(427, 174); + this.startupDirButton.Location = new System.Drawing.Point(426, 201); this.startupDirButton.Name = "startupDirButton"; this.startupDirButton.Size = new System.Drawing.Size(31, 23); this.startupDirButton.TabIndex = 27; @@ -241,16 +229,17 @@ this.allowRefreshCheckBox.AutoSize = true; this.allowRefreshCheckBox.Location = new System.Drawing.Point(7, 345); this.allowRefreshCheckBox.Name = "allowRefreshCheckBox"; - this.allowRefreshCheckBox.Size = new System.Drawing.Size(159, 17); + this.allowRefreshCheckBox.Size = new System.Drawing.Size(154, 17); this.allowRefreshCheckBox.TabIndex = 30; this.allowRefreshCheckBox.Text = "Allow refresh in mediaportal"; this.allowRefreshCheckBox.UseVisualStyleBackColor = true; // // informationLabel // - this.informationLabel.Location = new System.Drawing.Point(6, 388); + this.informationLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.informationLabel.Location = new System.Drawing.Point(4, 6); this.informationLabel.Name = "informationLabel"; - this.informationLabel.Size = new System.Drawing.Size(384, 57); + this.informationLabel.Size = new System.Drawing.Size(396, 57); this.informationLabel.TabIndex = 31; // // openFileDialog @@ -260,9 +249,9 @@ // applicationExeTextBox // this.applicationExeTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.applicationExeTextBox.Location = new System.Drawing.Point(94, 71); + this.applicationExeTextBox.Location = new System.Drawing.Point(93, 98); this.applicationExeTextBox.Name = "applicationExeTextBox"; - this.applicationExeTextBox.Size = new System.Drawing.Size(325, 21); + this.applicationExeTextBox.Size = new System.Drawing.Size(325, 20); this.applicationExeTextBox.TabIndex = 32; this.applicationExeTextBox.TextChanged += new System.EventHandler(this.applicationExeTextBox_TextChanged); // @@ -279,7 +268,7 @@ // startupDirComboBox // this.startupDirComboBox.FormattingEnabled = true; - this.startupDirComboBox.Location = new System.Drawing.Point(94, 177); + this.startupDirComboBox.Location = new System.Drawing.Point(93, 204); this.startupDirComboBox.Name = "startupDirComboBox"; this.startupDirComboBox.Size = new System.Drawing.Size(325, 21); this.startupDirComboBox.TabIndex = 36; @@ -287,7 +276,8 @@ // pictureBox // this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.pictureBox.Location = new System.Drawing.Point(324, 203); + this.pictureBox.InitialImage = null; + this.pictureBox.Location = new System.Drawing.Point(248, 299); this.pictureBox.Name = "pictureBox"; this.pictureBox.Size = new System.Drawing.Size(170, 170); this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -321,7 +311,6 @@ this.Controls.Add(this.applicationExeLabel); this.Controls.Add(this.titleLabel); this.Controls.Add(this.enabledCheckbox); - this.Controls.Add(this.winTypeLabel); this.Name = "AppSettingsBase"; ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); this.ResumeLayout(false); @@ -331,7 +320,6 @@ #endregion - protected System.Windows.Forms.Label winTypeLabel; protected System.Windows.Forms.CheckBox enabledCheckbox; protected System.Windows.Forms.Label titleLabel; protected System.Windows.Forms.Label applicationExeLabel; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -80,7 +80,7 @@ // this.platformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.platformComboBox.FormattingEnabled = true; - this.platformComboBox.Location = new System.Drawing.Point(94, 204); + this.platformComboBox.Location = new System.Drawing.Point(93, 231); this.platformComboBox.Name = "platformComboBox"; this.platformComboBox.Size = new System.Drawing.Size(325, 21); this.platformComboBox.TabIndex = 42; @@ -89,7 +89,7 @@ // this.platformLabel.AutoSize = true; this.platformLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.platformLabel.Location = new System.Drawing.Point(3, 207); + this.platformLabel.Location = new System.Drawing.Point(2, 234); this.platformLabel.Name = "platformLabel"; this.platformLabel.Size = new System.Drawing.Size(84, 13); this.platformLabel.TabIndex = 41; @@ -103,7 +103,6 @@ this.Controls.Add(this.platformLabel); this.Name = "AppSettingsDirCache"; this.Load += new System.EventHandler(this.AppSettingsDirCache_Load); - this.Controls.SetChildIndex(this.winTypeLabel, 0); this.Controls.SetChildIndex(this.enabledCheckbox, 0); this.Controls.SetChildIndex(this.titleLabel, 0); this.Controls.SetChildIndex(this.applicationExeLabel, 0); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -111,14 +111,11 @@ private void AppSettingsDirCache_Load(object sender, EventArgs e) { - winTypeLabel.Text = "Directory Cache"; + informationLabel.Text = "Directory Cache"; //untiil we really do something with this option in appdircache.. allowRefreshCheckBox.Checked = false; - - - - + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -59,16 +59,17 @@ // this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); // + // applicationArgumentsTextBox + // + this.toolTip.SetToolTip(this.applicationArgumentsTextBox, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + + "%FILE% if the filename needs to be placed in some specific place between several" + + " arguments)"); + // // winStyleComboBox // this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + "gration in MediaPortal"); // - // startupDirTextBox - // - this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + - "EDIR% if you want to use the directory where the launched file is stored)"); - // // quoteCheckBox // this.quoteCheckBox.Location = new System.Drawing.Point(7, 315); @@ -85,8 +86,8 @@ // this.informationLabel.Image = ((System.Drawing.Image)(resources.GetObject("informationLabel.Image"))); this.informationLabel.ImageAlign = System.Drawing.ContentAlignment.BottomLeft; - this.informationLabel.Location = new System.Drawing.Point(4, 220); - this.informationLabel.Size = new System.Drawing.Size(314, 73); + this.informationLabel.Location = new System.Drawing.Point(2, 0); + this.informationLabel.Size = new System.Drawing.Size(314, 68); this.informationLabel.MouseLeave += new System.EventHandler(this.informationLabel_MouseLeave); this.informationLabel.Click += new System.EventHandler(this.informationLabel_Click); this.informationLabel.MouseEnter += new System.EventHandler(this.informationLabel_MouseEnter); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -74,7 +74,6 @@ // this.validImagesCheckBox.Checked = true; this.enabledCheckbox.Checked = true; this.titleTextBox.Text = "GameBase ..."; - this.winTypeLabel.Text = "GameBase direct importer"; this.applicationExeTextBox.Text = "<yourpath>gamebase database"; this.quoteCheckBox.Visible = false; this.shellexecuteCheckBox.Visible = false; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -59,7 +59,7 @@ private void AppSettingsGrouper_Load(object sender, EventArgs e) { - winTypeLabel.Text = "Grouper."; + this.informationLabel.Text = "Grouper."; titleLabel.Text = "Title"; titleTextBox.Text = "Write your title"; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -31,11 +31,11 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AppSettingsMame)); this.historyDatLink = new System.Windows.Forms.LinkLabel(); this.catverLink = new System.Windows.Forms.LinkLabel(); - this.labelBestResults = new System.Windows.Forms.LinkLabel(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // + // enabledCheckbox // this.toolTip.SetToolTip(this.enabledCheckbox, "Only enabled items will appear in MediaPortal"); @@ -59,16 +59,17 @@ // this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); // + // applicationArgumentsTextBox + // + this.toolTip.SetToolTip(this.applicationArgumentsTextBox, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + + "%FILE% if the filename needs to be placed in some specific place between several" + + " arguments)"); + // // winStyleComboBox // this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + "gration in MediaPortal"); // - // startupDirTextBox - // - this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + - "EDIR% if you want to use the directory where the launched file is stored)"); - // // quoteCheckBox // this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + @@ -83,8 +84,7 @@ // this.informationLabel.Image = ((System.Drawing.Image)(resources.GetObject("informationLabel.Image"))); this.informationLabel.ImageAlign = System.Drawing.ContentAlignment.TopLeft; - this.informationLabel.Location = new System.Drawing.Point(4, 222); - this.informationLabel.Size = new System.Drawing.Size(239, 85); + this.informationLabel.Size = new System.Drawing.Size(248, 62); this.informationLabel.TextAlign = System.Drawing.ContentAlignment.BottomRight; this.informationLabel.MouseLeave += new System.EventHandler(this.informationLabel_MouseLeave); this.informationLabel.Click += new System.EventHandler(this.informationLabel_Click); @@ -114,21 +114,12 @@ this.catverLink.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.catverLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.catverLink_LinkClicked); // - // labelBestResults - // - this.labelBestResults.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.labelBestResults.Location = new System.Drawing.Point(0, 0); - this.labelBestResults.Name = "labelBestResults"; - this.labelBestResults.Size = new System.Drawing.Size(189, 23); - this.labelBestResults.TabIndex = 32; - this.labelBestResults.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // + // groupBox1 // this.groupBox1.Controls.Add(this.historyDatLink); this.groupBox1.Controls.Add(this.catverLink); - this.groupBox1.Location = new System.Drawing.Point(249, 222); + this.groupBox1.Location = new System.Drawing.Point(232, 405); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(226, 117); this.groupBox1.TabIndex = 82; @@ -140,13 +131,10 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.groupBox1); - this.Controls.Add(this.labelBestResults); this.Name = "AppSettingsMame"; this.Load += new System.EventHandler(this.AppSettingsMameDirect_Load); this.Controls.SetChildIndex(this.prePostButton, 0); this.Controls.SetChildIndex(this.informationLabel, 0); - this.Controls.SetChildIndex(this.labelBestResults, 0); - this.Controls.SetChildIndex(this.winTypeLabel, 0); this.Controls.SetChildIndex(this.enabledCheckbox, 0); this.Controls.SetChildIndex(this.titleLabel, 0); this.Controls.SetChildIndex(this.applicationExeLabel, 0); @@ -178,7 +166,6 @@ private System.Windows.Forms.LinkLabel historyDatLink; private System.Windows.Forms.LinkLabel catverLink; - private System.Windows.Forms.LinkLabel labelBestResults; private System.Windows.Forms.GroupBox groupBox1; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -43,9 +43,9 @@ this.gbFileDetails = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.systemComboBox = new System.Windows.Forms.ComboBox(); this.manufacturerComboBox = new System.Windows.Forms.ComboBox(); - this.subGenreComboBox = new System.Windows.Forms.ComboBox(); + this.genreStyleComboBox = new System.Windows.Forms.ComboBox(); this.genreComboBox = new System.Windows.Forms.ComboBox(); - this.subGenreLabel = new System.Windows.Forms.Label(); + this.genreStyleLabel = new System.Windows.Forms.Label(); this.txtYear = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lblYear = new MediaPortal.UserInterface.Controls.MPLabel(); this.lblManufacturer = new MediaPortal.UserInterface.Controls.MPLabel(); @@ -199,9 +199,9 @@ | System.Windows.Forms.AnchorStyles.Right))); this.gbFileDetails.Controls.Add(this.systemComboBox); this.gbFileDetails.Controls.Add(this.manufacturerComboBox); - this.gbFileDetails.Controls.Add(this.subGenreComboBox); + this.gbFileDetails.Controls.Add(this.genreStyleComboBox); this.gbFileDetails.Controls.Add(this.genreComboBox); - this.gbFileDetails.Controls.Add(this.subGenreLabel); + this.gbFileDetails.Controls.Add(this.genreStyleLabel); this.gbFileDetails.Controls.Add(this.gameinfoURLTextBox); this.gbFileDetails.Controls.Add(this.gameInfoURLLabel); this.gbFileDetails.Controls.Add(this.buttonViewImg); @@ -249,14 +249,14 @@ this.manufacturerComboBox.Size = new System.Drawing.Size(162, 21); this.manufacturerComboBox.TabIndex = 70; // - // subGenreComboBox + // genreStyleComboBox // - this.subGenreComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.subGenreComboBox.FormattingEnabled = true; - this.subGenreComboBox.Location = new System.Drawing.Point(97, 129); - this.subGenreComboBox.Name = "subGenreComboBox"; - this.subGenreComboBox.Size = new System.Drawing.Size(162, 21); - this.subGenreComboBox.TabIndex = 69; + this.genreStyleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.genreStyleComboBox.FormattingEnabled = true; + this.genreStyleComboBox.Location = new System.Drawing.Point(97, 129); + this.genreStyleComboBox.Name = "genreStyleComboBox"; + this.genreStyleComboBox.Size = new System.Drawing.Size(162, 21); + this.genreStyleComboBox.TabIndex = 69; // // genreComboBox // @@ -267,14 +267,14 @@ this.genreComboBox.Size = new System.Drawing.Size(162, 21); this.genreComboBox.TabIndex = 68; // - // subGenreLabel + // genreStyleLabel // - this.subGenreLabel.AutoSize = true; - this.subGenreLabel.Location = new System.Drawing.Point(8, 132); - this.subGenreLabel.Name = "subGenreLabel"; - this.subGenreLabel.Size = new System.Drawing.Size(61, 13); - this.subGenreLabel.TabIndex = 67; - this.subGenreLabel.Text = "Sub Genre:"; + this.genreStyleLabel.AutoSize = true; + this.genreStyleLabel.Location = new System.Drawing.Point(8, 132); + this.genreStyleLabel.Name = "genreStyleLabel"; + this.genreStyleLabel.Size = new System.Drawing.Size(62, 13); + this.genreStyleLabel.TabIndex = 67; + this.genreStyleLabel.Text = "GenreStyle:"; // // txtYear // @@ -479,8 +479,8 @@ private MediaPortal.UserInterface.Controls.MPTabPage tabPage1; private System.Windows.Forms.OpenFileDialog openFileDialog1; private MediaPortal.UserInterface.Controls.MPButton btnCancel; - private System.Windows.Forms.Label subGenreLabel; - private System.Windows.Forms.ComboBox subGenreComboBox; + private System.Windows.Forms.Label genreStyleLabel; + private System.Windows.Forms.ComboBox genreStyleComboBox; private System.Windows.Forms.ComboBox genreComboBox; private System.Windows.Forms.ComboBox systemComboBox; private System.Windows.Forms.ComboBox manufacturerComboBox; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -153,7 +153,7 @@ FillComboBox("tblPlatform", "platform", systemComboBox); FillComboBox("tblManufacturer", "manufacturer", manufacturerComboBox); FillComboBox("tblGenre", "genre",genreComboBox); - FillComboBox("tblGenre", "genre", subGenreComboBox); + FillComboBox("tblGenre", "genre", genreStyleComboBox); updateDisplay(); } @@ -228,8 +228,8 @@ void FileItemToGenre() { - genreComboBox.SelectedValue = CurFile.MainGenreId; - subGenreComboBox.SelectedValue = CurFile.SubGenreId; + genreComboBox.SelectedValue = CurFile.GenreId; + genreStyleComboBox.SelectedValue = CurFile.GenreStyleId; manufacturerComboBox.SelectedValue = CurFile.ManufacturerId; systemComboBox.SelectedValue = CurFile.PlatformId; } @@ -240,10 +240,10 @@ CurFile.Filename = txtFilename.Text; if (!ProgramUtils.UseThumbsDir()) CurFile.Imagefile = txtImageFile.Text; - // CurFile.MainGenre = genreComboBox.SelectedText; - CurFile.MainGenreId = (int)genreComboBox.SelectedValue; - //CurFile.SubGenre = subGenreComboBox.SelectedText; - CurFile.SubGenreId = (int)subGenreComboBox.SelectedValue; + // CurFile.Genre = genreComboBox.SelectedText; + CurFile.GenreId = (int)genreComboBox.SelectedValue; + //CurFile.GenreStyle = genreStyleComboBox.SelectedText; + CurFile.GenreStyleId = (int)genreStyleComboBox.SelectedValue; CurFile.ManufacturerId = (int)manufacturerComboBox.SelectedValue; CurFile.Year = ProgramUtils.StringToInteger(txtYear.Text, -1); CurFile.Rating = cbRating.SelectedIndex; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -61,6 +61,10 @@ this.buttonClose = new System.Windows.Forms.Button(); this.buttonSaveSearch = new System.Windows.Forms.Button(); this.buttonStartSearch = new System.Windows.Forms.Button(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.titleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.allOthersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip.SuspendLayout(); this.splitContainer.Panel1.SuspendLayout(); this.splitContainer.Panel2.SuspendLayout(); @@ -70,6 +74,7 @@ this.bottomPanel.SuspendLayout(); this.groupBoxFilter.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.MinRelevanceNum)).BeginInit(); + this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // // statusStrip @@ -88,7 +93,7 @@ // this.toolStripStatusLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripStatusLabel.Name = "toolStripStatusLabel"; - this.toolStripStatusLabel.Size = new System.Drawing.Size(338, 17); + this.toolStripStatusLabel.Size = new System.Drawing.Size(333, 17); this.toolStripStatusLabel.Spring = true; this.toolStripStatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -106,7 +111,7 @@ this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; - this.toolStripDropDownButton1.Size = new System.Drawing.Size(57, 20); + this.toolStripDropDownButton1.Size = new System.Drawing.Size(62, 20); this.toolStripDropDownButton1.Text = "Options"; // // scraperSaveTypeToolStripMenuItem @@ -116,27 +121,27 @@ this.dataToolStripMenuItem, this.imagesToolStripMenuItem}); this.scraperSaveTypeToolStripMenuItem.Name = "scraperSaveTypeToolStripMenuItem"; - this.scraperSaveTypeToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.scraperSaveTypeToolStripMenuItem.Size = new System.Drawing.Size(163, 22); this.scraperSaveTypeToolStripMenuItem.Text = "ScraperSaveType"; // // dataAndImagesToolStripMenuItem // this.dataAndImagesToolStripMenuItem.Name = "dataAndImagesToolStripMenuItem"; - this.dataAndImagesToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.dataAndImagesToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.dataAndImagesToolStripMenuItem.Text = "DataAndImages"; this.dataAndImagesToolStripMenuItem.Click += new System.EventHandler(this.dataAndImagesToolStripMenuItem_Click); // // dataToolStripMenuItem // this.dataToolStripMenuItem.Name = "dataToolStripMenuItem"; - this.dataToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.dataToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.dataToolStripMenuItem.Text = "Data"; this.dataToolStripMenuItem.Click += new System.EventHandler(this.dataToolStripMenuItem_Click); // // imagesToolStripMenuItem // this.imagesToolStripMenuItem.Name = "imagesToolStripMenuItem"; - this.imagesToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.imagesToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.imagesToolStripMenuItem.Text = "Images"; this.imagesToolStripMenuItem.Click += new System.EventHandler(this.imagesToolStripMenuItem_Click); // @@ -144,14 +149,14 @@ // this.cancelSearchToolStripMenuItem.Name = "cancelSearchToolStripMenuItem"; this.cancelSearchToolStripMenuItem.ShowShortcutKeys = false; - this.cancelSearchToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.cancelSearchToolStripMenuItem.Size = new System.Drawing.Size(163, 22); this.cancelSearchToolStripMenuItem.Text = "Cancel Search"; this.cancelSearchToolStripMenuItem.Click += new System.EventHandler(this.cancelSearchToolStripMenuItem_Click); // // splitContainer // this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer.Location = new System.Drawing.Point(0, 0); + this.splitContainer.Location = new System.Drawing.Point(0, 24); this.splitContainer.Name = "splitContainer"; // // splitContainer.Panel1 @@ -161,7 +166,7 @@ // splitContainer.Panel2 // this.splitContainer.Panel2.Controls.Add(this.groupBoxMatchList); - this.splitContainer.Size = new System.Drawing.Size(712, 443); + this.splitContainer.Size = new System.Drawing.Size(712, 419); this.splitContainer.SplitterDistance = 354; this.splitContainer.TabIndex = 20; // @@ -173,7 +178,7 @@ this.groupBoxFileList.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.groupBoxFileList.Location = new System.Drawing.Point(0, 0); this.groupBoxFileList.Name = "groupBoxFileList"; - this.groupBoxFileList.Size = new System.Drawing.Size(354, 443); + this.groupBoxFileList.Size = new System.Drawing.Size(354, 419); this.groupBoxFileList.TabIndex = 16; this.groupBoxFileList.TabStop = false; this.groupBoxFileList.Text = "FileList"; @@ -183,9 +188,9 @@ this.checkboxFileList.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkboxFileList.AutoSize = true; this.checkboxFileList.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkboxFileList.Location = new System.Drawing.Point(6, 420); + this.checkboxFileList.Location = new System.Drawing.Point(6, 396); this.checkboxFileList.Name = "checkboxFileList"; - this.checkboxFileList.Size = new System.Drawing.Size(116, 17); + this.checkboxFileList.Size = new System.Drawing.Size(118, 17); this.checkboxFileList.TabIndex = 14; this.checkboxFileList.Text = "Select / deselect all"; this.checkboxFileList.UseVisualStyleBackColor = true; @@ -206,7 +211,7 @@ this.listViewFileList.HideSelection = false; this.listViewFileList.Location = new System.Drawing.Point(6, 20); this.listViewFileList.Name = "listViewFileList"; - this.listViewFileList.Size = new System.Drawing.Size(342, 394); + this.listViewFileList.Size = new System.Drawing.Size(342, 370); this.listViewFileList.TabIndex = 13; this.listViewFileList.UseCompatibleStateImageBehavior = false; this.listViewFileList.View = System.Windows.Forms.View.Details; @@ -231,7 +236,7 @@ this.groupBoxMatchList.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.groupBoxMatchList.Location = new System.Drawing.Point(0, 0); this.groupBoxMatchList.Name = "groupBoxMatchList"; - this.groupBoxMatchList.Size = new System.Drawing.Size(354, 443); + this.groupBoxMatchList.Size = new System.Drawing.Size(354, 419); this.groupBoxMatchList.TabIndex = 16; this.groupBoxMatchList.TabStop = false; this.groupBoxMatchList.Text = "MatchList"; @@ -240,7 +245,7 @@ // this.labelLaunchUrlInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.labelLaunchUrlInfo.AutoSize = true; - this.labelLaunchUrlInfo.Location = new System.Drawing.Point(10, 422); + this.labelLaunchUrlInfo.Location = new System.Drawing.Point(10, 398); this.labelLaunchUrlInfo.Name = "labelLaunchUrlInfo"; this.labelLaunchUrlInfo.Size = new System.Drawing.Size(153, 13); this.labelLaunchUrlInfo.TabIndex = 15; @@ -261,7 +266,7 @@ this.listViewMatchList.Location = new System.Drawing.Point(6, 20); this.listViewMatchList.MultiSelect = false; this.listViewMatchList.Name = "listViewMatchList"; - this.listViewMatchList.Size = new System.Drawing.Size(342, 394); + this.listViewMatchList.Size = new System.Drawing.Size(342, 370); this.listViewMatchList.TabIndex = 14; this.listViewMatchList.UseCompatibleStateImageBehavior = false; this.listViewMatchList.View = System.Windows.Forms.View.Details; @@ -299,7 +304,7 @@ this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(555, 4); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(154, 13); + this.label2.Size = new System.Drawing.Size(148, 13); this.label2.TabIndex = 28; this.label2.Text = "The data is brought to you by:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -326,7 +331,7 @@ this.labelPlatform.AutoSize = true; this.labelPlatform.Location = new System.Drawing.Point(6, 25); this.labelPlatform.Name = "labelPlatform"; - this.labelPlatform.Size = new System.Drawing.Size(51, 13); + this.labelPlatform.Size = new System.Drawing.Size(48, 13); this.labelPlatform.TabIndex = 30; this.labelPlatform.Text = "Platform:"; // @@ -335,7 +340,6 @@ this.filterComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.filterComboBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.filterComboBox.Location = new System.Drawing.Point(63, 22); this.filterComboBox.Name = "filterComboBox"; this.filterComboBox.Size = new System.Drawing.Size(132, 21); @@ -365,7 +369,7 @@ 0}); this.MinRelevanceNum.Location = new System.Drawing.Point(117, 49); this.MinRelevanceNum.Name = "MinRelevanceNum"; - this.MinRelevanceNum.Size = new System.Drawing.Size(78, 21); + this.MinRelevanceNum.Size = new System.Drawing.Size(78, 20); this.MinRelevanceNum.TabIndex = 24; this.MinRelevanceNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.MinRelevanceNum.Value = new decimal(new int[] { @@ -380,7 +384,7 @@ this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(6, 51); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(84, 13); + this.label1.Size = new System.Drawing.Size(85, 13); this.label1.TabIndex = 25; this.label1.Text = "Min. Relevance:"; // @@ -390,7 +394,7 @@ this.linkLabelAllGame.AutoSize = true; this.linkLabelAllGame.Location = new System.Drawing.Point(583, 24); this.linkLabelAllGame.Name = "linkLabelAllGame"; - this.linkLabelAllGame.Size = new System.Drawing.Size(126, 13); + this.linkLabelAllGame.Size = new System.Drawing.Size(124, 13); this.linkLabelAllGame.TabIndex = 3; this.linkLabelAllGame.TabStop = true; this.linkLabelAllGame.Text = "http://www.allgame.com"; @@ -430,6 +434,41 @@ this.buttonStartSearch.UseVisualStyleBackColor = true; this.buttonStartSearch.Click += new System.EventHandler(this.buttonStartSearch_Click); // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem1}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(712, 24); + this.menuStrip1.TabIndex = 21; + this.menuStrip1.Text = "menuStrip1"; + // + // toolStripMenuItem1 + // + this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.titleToolStripMenuItem, + this.allOthersToolStripMenuItem}); + this.toolStripMenuItem1.Name = "toolStripMenuItem1"; + this.toolStripMenuItem1.Size = new System.Drawing.Size(86, 20); + this.toolStripMenuItem1.Text = "Import fields"; + // + // titleToolStripMenuItem + // + this.titleToolStripMenuItem.CheckOnClick = true; + this.titleToolStripMenuItem.Name = "titleToolStripMenuItem"; + this.titleToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.titleToolStripMenuItem.Text = "Title"; + this.titleToolStripMenuItem.Click += new System.EventHandler(this.titleToolStripMenuItem_Click); + // + // allOthersToolStripMenuItem + // + this.allOthersToolStripMenuItem.Checked = true; + this.allOthersToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.allOthersToolStripMenuItem.Name = "allOthersToolStripMenuItem"; + this.allOthersToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.allOthersToolStripMenuItem.Text = "All others"; + // // FileInfoScraperForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -438,11 +477,14 @@ this.Controls.Add(this.splitContainer); this.Controls.Add(this.bottomPanel); this.Controls.Add(this.statusStrip); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; this.Name = "FileInfoScraperForm"; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Import Info"; + this.Load += new System.EventHandler(this.FileInfoScraperForm_Load); this.statusStrip.ResumeLayout(false); this.statusStrip.PerformLayout(); this.splitContainer.Panel1.ResumeLayout(false); @@ -457,6 +499,8 @@ this.groupBoxFilter.ResumeLayout(false); this.groupBoxFilter.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.MinRelevanceNum)).EndInit(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -496,6 +540,10 @@ private System.Windows.Forms.ToolStripMenuItem dataAndImagesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem dataToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem imagesToolStripMenuItem; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem titleToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem allOthersToolStripMenuItem; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -49,6 +49,7 @@ bool isSearching = false; bool stopSearching = false; + bool importTitle; ScraperSaveType saveType = ScraperSaveType.DataAndImages; @@ -505,47 +506,6 @@ ChangeScraperSaveType(ScraperSaveType.Images); } - #region oldMenu - /* - private void mnu22CheckWithoutImages_Click(object sender, EventArgs e) - { - FileItem curFile; - foreach (ListViewItem curItem in listViewFileList.Items) - { - curFile = (FileItem)curItem.Tag; - if (curFile != null) - { - curItem.Checked = (curFile.Imagefile == ""); - } - else - { - curItem.Checked = false; - } - } - buttonStartSearch.Enabled = (listViewFileList.CheckedItems.Count > 0); - UpdateButtonStates(); - } - private void mnu22CheckWithoutOverview_Click(object sender, EventArgs e) - { - FileItem curFile; - foreach (ListViewItem curItem in listViewFileList.Items) - { - curFile = (FileItem)curItem.Tag; - if (curFile != null) - { - curItem.Checked = (curFile.Overview == ""); - } - else - { - curItem.Checked = false; - } - } - buttonStartSearch.Enabled = (listViewFileList.CheckedItems.Count > 0); - UpdateButtonStates(); - } - */ -#endregion oldMenu - #endregion #endregion @@ -629,6 +589,7 @@ isSearching = true; UpdateButtonStates(); + int numberOfSearches = 0; InitProgressBar("Starting search"); ListViewItem nextItem = null; @@ -659,7 +620,7 @@ curItem.SubItems[1].Text = String.Format("<searching...>"); file.FindFileInfoDetail(curApp, file.FileInfoFavourite, ScraperType.ALLGAME, saveType); if ((saveType == ScraperSaveType.DataAndImages) || (saveType == ScraperSaveType.Data)) - file.SaveFromFileInfoFavourite(); + file.SaveFromFileInfoFavourite(importTitle); curItem.SubItems[1].Text = String.Format("<saved>"); } } @@ -675,5 +636,16 @@ } #endregion + + private void titleToolStripMenuItem_Click(object sender, EventArgs e) + { + + importTitle = this.titleToolStripMenuItem.Checked; + } + + private void FileInfoScraperForm_Load(object sender, EventArgs e) + { + importTitle = titleToolStripMenuItem.Checked; + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.resx 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.resx 2007-08-10 10:44:20 UTC (rev 824) @@ -136,6 +136,9 @@ s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC </value> </data> + <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>126, 17</value> + </metadata> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>40</value> </metadata> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -165,8 +165,8 @@ "rating", "launchcount", "lastTimeLaunched", - "mainGenre", - "subGenre", + "genre", + "genreStyle", }; string[] sqloperators = new string[] Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-10 06:05:54 UTC (rev 823) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-08-10 10:44:20 UTC (rev 824) @@ -207,7 +207,7 @@ currentNode.Tag = applicationItem; Parent.Nodes.Add(currentNode); - AttachChildNodes(currentNode, applicationItem.AppI... [truncated message content] |
From: <nor...@us...> - 2007-08-13 08:55:33
|
Revision: 828 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=828&view=rev Author: northern_sky Date: 2007-08-13 01:55:30 -0700 (Mon, 13 Aug 2007) Log Message: ----------- some minor designstuff, dynamic checkboxes in fileview, removed prepostbutton/form and inc it in regular appitemsettings Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/README.txt Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.resx Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -106,7 +106,7 @@ this.Controls.Add(this.progressBar); this.Name = "AppSettingsFilesImportProgress"; this.Load += new System.EventHandler(this.AppFilesImportProgress_Load); - this.Controls.SetChildIndex(this.prePostButton, 0); + this.Controls.SetChildIndex(this.enabledCheckbox, 0); this.Controls.SetChildIndex(this.titleLabel, 0); this.Controls.SetChildIndex(this.applicationExeLabel, 0); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -75,7 +75,10 @@ waitExitCheckBox.Visible = false; shellexecuteCheckBox.Visible = false; informationLabel.Visible = false; - prePostButton.Visible = false; + preCommandsLabel.Visible = false; + preCommandTextBox.Visible = false; + postCommandsLabel.Visible = false; + postCommandTextBox.Visible = false; } public void RunImport() Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -53,10 +53,7 @@ this.imageDirsLabel = new System.Windows.Forms.Label(); this.fileDirLabel = new System.Windows.Forms.Label(); this.filesGroupBox = new System.Windows.Forms.GroupBox(); - this.importPlaychoiceCheckBox = new System.Windows.Forms.CheckBox(); - this.importMahjongCheckBox = new System.Windows.Forms.CheckBox(); - this.validImagesCheckBox = new System.Windows.Forms.CheckBox(); - this.importOriginalsCheckBox = new System.Windows.Forms.CheckBox(); + this.importOptionsCheckedListBox = new System.Windows.Forms.CheckedListBox(); this.FileSettingsGroupBox = new System.Windows.Forms.GroupBox(); this.gamebaseDBTextBox = new System.Windows.Forms.TextBox(); this.gamebaseLabel = new System.Windows.Forms.Label(); @@ -77,13 +74,13 @@ this.fileListView.HideSelection = false; this.fileListView.Location = new System.Drawing.Point(8, 19); this.fileListView.Name = "fileListView"; - this.fileListView.Size = new System.Drawing.Size(276, 343); + this.fileListView.Size = new System.Drawing.Size(276, 352); this.fileListView.SmallImageList = this.smallImageList; this.fileListView.TabIndex = 1; this.fileListView.UseCompatibleStateImageBehavior = false; this.fileListView.View = System.Windows.Forms.View.Details; - this.fileListView.SelectedIndexChanged += new System.EventHandler(this.fileListView_SelectedIndexChanged); this.fileListView.DoubleClick += new System.EventHandler(this.fileListView_DoubleClick); + this.fileListView.SelectedIndexChanged += new System.EventHandler(this.fileListView_SelectedIndexChanged); // // fileTitle // @@ -183,13 +180,13 @@ this.contextFavouritesMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.grouperToolStripMenuItem}); this.contextFavouritesMenuStrip.Name = "contextFavouritesMenuStrip"; - this.contextFavouritesMenuStrip.Size = new System.Drawing.Size(125, 26); + this.contextFavouritesMenuStrip.Size = new System.Drawing.Size(118, 26); this.contextFavouritesMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextFavouritesMenuStrip_Opening); // // grouperToolStripMenuItem // this.grouperToolStripMenuItem.Name = "grouperToolStripMenuItem"; - this.grouperToolStripMenuItem.Size = new System.Drawing.Size(124, 22); + this.grouperToolStripMenuItem.Size = new System.Drawing.Size(117, 22); this.grouperToolStripMenuItem.Text = "Grouper"; // // fileExtensionsTextBox @@ -197,7 +194,7 @@ this.fileExtensionsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.fileExtensionsTextBox.Location = new System.Drawing.Point(85, 71); this.fileExtensionsTextBox.Name = "fileExtensionsTextBox"; - this.fileExtensionsTextBox.Size = new System.Drawing.Size(330, 21); + this.fileExtensionsTextBox.Size = new System.Drawing.Size(330, 20); this.fileExtensionsTextBox.TabIndex = 28; // // imageDirsTextBox @@ -205,7 +202,7 @@ this.imageDirsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.imageDirsTextBox.Location = new System.Drawing.Point(85, 45); this.imageDirsTextBox.Name = "imageDirsTextBox"; - this.imageDirsTextBox.Size = new System.Drawing.Size(330, 21); + this.imageDirsTextBox.Size = new System.Drawing.Size(330, 20); this.imageDirsTextBox.TabIndex = 27; // // fileDirTextBox @@ -213,7 +210,7 @@ this.fileDirTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.fileDirTextBox.Location = new System.Drawing.Point(85, 19); this.fileDirTextBox.Name = "fileDirTextBox"; - this.fileDirTextBox.Size = new System.Drawing.Size(330, 21); + this.fileDirTextBox.Size = new System.Drawing.Size(330, 20); this.fileDirTextBox.TabIndex = 26; // // fileDirButton @@ -276,10 +273,7 @@ // filesGroupBox // this.filesGroupBox.BackColor = System.Drawing.SystemColors.Control; - this.filesGroupBox.Controls.Add(this.importPlaychoiceCheckBox); - this.filesGroupBox.Controls.Add(this.importMahjongCheckBox); - this.filesGroupBox.Controls.Add(this.validImagesCheckBox); - this.filesGroupBox.Controls.Add(this.importOriginalsCheckBox); + this.filesGroupBox.Controls.Add(this.importOptionsCheckedListBox); this.filesGroupBox.Controls.Add(this.fileListView); this.filesGroupBox.Controls.Add(this.newButton); this.filesGroupBox.Controls.Add(this.editButton); @@ -297,46 +291,20 @@ this.filesGroupBox.TabStop = false; this.filesGroupBox.Text = "Files"; // - // importPlaychoiceCheckBox + // importOptionsCheckedListBox // - this.importPlaychoiceCheckBox.AutoSize = true; - this.importPlaychoiceCheckBox.Location = new System.Drawing.Point(299, 345); - this.importPlaychoiceCheckBox.Name = "importPlaychoiceCheckBox"; - this.importPlaychoiceCheckBox.Size = new System.Drawing.Size(160, 17); - this.importPlaychoiceCheckBox.TabIndex = 87; - this.importPlaychoiceCheckBox.Text = "Import Playchoice/Vs games"; - this.importPlaychoiceCheckBox.UseVisualStyleBackColor = true; + this.importOptionsCheckedListBox.BackColor = System.Drawing.SystemColors.Control; + this.importOptionsCheckedListBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.importOptionsCheckedListBox.CheckOnClick = true; + this.importOptionsCheckedListBox.FormattingEnabled = true; + this.importOptionsCheckedListBox.HorizontalScrollbar = true; + this.importOptionsCheckedListBox.Location = new System.Drawing.Point(290, 234); + this.importOptionsCheckedListBox.Name = "importOptionsCheckedListBox"; + this.importOptionsCheckedListBox.ScrollAlwaysVisible = true; + this.importOptionsCheckedListBox.Size = new System.Drawing.Size(176, 137); + this.importOptionsCheckedListBox.Sorted = true; + this.importOptionsCheckedListBox.TabIndex = 88; // - // importMahjongCheckBox - // - this.importMahjongCheckBox.AutoSize = true; - this.importMahjongCheckBox.Location = new System.Drawing.Point(299, 321); - this.importMahjongCheckBox.Name = "importMahjongCheckBox"; - this.importMahjongCheckBox.Size = new System.Drawing.Size(136, 17); - this.importMahjongCheckBox.TabIndex = 86; - this.importMahjongCheckBox.Text = "Import Mahjong games"; - this.importMahjongCheckBox.UseVisualStyleBackColor = true; - // - // validImagesCheckBox - // - this.validImagesCheckBox.AutoSize = true; - this.validImagesCheckBox.Location = new System.Drawing.Point(299, 275); - this.validImagesCheckBox.Name = "validImagesCheckBox"; - this.validImagesCheckBox.Size = new System.Drawing.Size(154, 17); - this.validImagesCheckBox.TabIndex = 84; - this.validImagesCheckBox.Text = "Only files with valid images"; - this.validImagesCheckBox.UseVisualStyleBackColor = true; - // - // importOriginalsCheckBox - // - this.importOriginalsCheckBox.AutoSize = true; - this.importOriginalsCheckBox.Location = new System.Drawing.Point(299, 298); - this.importOriginalsCheckBox.Name = "importOriginalsCheckBox"; - this.importOriginalsCheckBox.Size = new System.Drawing.Size(123, 17); - this.importOriginalsCheckBox.TabIndex = 85; - this.importOriginalsCheckBox.Text = "Only import originals"; - this.importOriginalsCheckBox.UseVisualStyleBackColor = true; - // // FileSettingsGroupBox // this.FileSettingsGroupBox.BackColor = System.Drawing.SystemColors.Control; @@ -365,7 +333,7 @@ this.gamebaseDBTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.gamebaseDBTextBox.Location = new System.Drawing.Point(85, 96); this.gamebaseDBTextBox.Name = "gamebaseDBTextBox"; - this.gamebaseDBTextBox.Size = new System.Drawing.Size(330, 21); + this.gamebaseDBTextBox.Size = new System.Drawing.Size(330, 20); this.gamebaseDBTextBox.TabIndex = 89; this.toolTip.SetToolTip(this.gamebaseDBTextBox, "Select a gamebase (*.mdb) file to import\r\n"); // @@ -402,7 +370,6 @@ this.Load += new System.EventHandler(this.AppFilesView_Load); this.contextFavouritesMenuStrip.ResumeLayout(false); this.filesGroupBox.ResumeLayout(false); - this.filesGroupBox.PerformLayout(); this.FileSettingsGroupBox.ResumeLayout(false); this.FileSettingsGroupBox.PerformLayout(); this.ResumeLayout(false); @@ -437,13 +404,10 @@ private System.Windows.Forms.GroupBox FileSettingsGroupBox; private System.Windows.Forms.ToolTip toolTip; private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; - private System.Windows.Forms.CheckBox importPlaychoiceCheckBox; - private System.Windows.Forms.CheckBox importMahjongCheckBox; - private System.Windows.Forms.CheckBox validImagesCheckBox; - private System.Windows.Forms.CheckBox importOriginalsCheckBox; private System.Windows.Forms.TextBox gamebaseDBTextBox; private System.Windows.Forms.Label gamebaseLabel; private System.Windows.Forms.Button gamebaseDBButton; private System.Windows.Forms.OpenFileDialog openFileDialog; + private System.Windows.Forms.CheckedListBox importOptionsCheckedListBox; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -45,6 +45,25 @@ private ApplicationItem currentApplication = null; public event EventHandler OnImageFolderSearch; + + + public string ImportOptionToString(ImportOption importOption) + { + switch (importOption) + { + case ImportOption.OnlyImportValidImages: + return "Only import files with valid images"; + case ImportOption.OnlyImportOriginals: + return "Only import originals"; + case ImportOption.ImportMahjongGames: + return "Import Mahjong games"; + case ImportOption.ImportPlaychoiceGames: + return "Import Playchoice/Vs games"; + default: + return ""; + } + } + public AppSettingsFilesView() { InitializeComponent(); @@ -574,6 +593,45 @@ } } + private bool IsItemChecked(string itemString) + { + foreach (object item in importOptionsCheckedListBox.CheckedItems) + { + if (itemString == item.ToString()) + { + + return true; + } + } + return false; + } + + private void CheckImportOption(ApplicationItem applicationItem) + { + if (applicationItem.ImportValidImagesOnly) + { + importOptionsCheckedListBox.SetItemChecked(importOptionsCheckedListBox.Items.IndexOf(ImportOptionToString(ImportOption.OnlyImportValidImages)),true); + } + if (applicationItem.ImportMameMahjong) + { + importOptionsCheckedListBox.SetItemChecked(importOptionsCheckedListBox.Items.IndexOf(ImportOptionToString(ImportOption.ImportMahjongGames)), true); + + } + if (applicationItem.ImportMamePlaychoice10) + { + importOptionsCheckedListBox.SetItemChecked(importOptionsCheckedListBox.Items.IndexOf(ImportOptionToString(ImportOption.ImportPlaychoiceGames)), true); + } + if (applicationItem is ApplicationItemMame) + { + if (((ApplicationItemMame)applicationItem).ImportOriginalsOnly) + { + importOptionsCheckedListBox.SetItemChecked(importOptionsCheckedListBox.Items.IndexOf(ImportOptionToString(ImportOption.OnlyImportOriginals)), true); + + } + } + + } + public void FillApplicationItem(ApplicationItem applicationItem) { if (applicationItem == null) return; @@ -585,36 +643,34 @@ applicationItem.FileDirectory = fileDirTextBox.Text; applicationItem.ValidExtensions = fileExtensionsTextBox.Text; + if ((currentApplication is ApplicationItemMame) || ((currentApplication is ApplicationItemGameBase))) { - applicationItem.ImportValidImagesOnly = this.validImagesCheckBox.Checked; + applicationItem.ImportValidImagesOnly = IsItemChecked(ImportOptionToString(ImportOption.OnlyImportValidImages)); } if ((currentApplication is ApplicationItemMame)) { - ((ApplicationItemMame)applicationItem).ImportOriginalsOnly = this.importOriginalsCheckBox.Checked; - applicationItem.ImportMameMahjong = this.importMahjongCheckBox.Checked; - applicationItem.ImportMamePlaychoice10 = this.importPlaychoiceCheckBox.Checked; + ((ApplicationItemMame)applicationItem).ImportOriginalsOnly = IsItemChecked(ImportOptionToString(ImportOption.OnlyImportOriginals)); + applicationItem.ImportMameMahjong = IsItemChecked(ImportOptionToString(ImportOption.ImportMahjongGames)); + applicationItem.ImportMamePlaychoice10 = IsItemChecked(ImportOptionToString(ImportOption.ImportPlaychoiceGames)); } if ((currentApplication is ApplicationItemGameBase)) { applicationItem.Source = this.gamebaseDBTextBox.Text; } + } private void AppFilesView_Load(object sender, EventArgs e) { - - toolTip.SetToolTip(fileDirTextBox, "Directorys to display in MediaPortal,seperate with ; \r\n(mandatory)"); toolTip.SetToolTip(fileExtensionsTextBox, "Only files with matching extensions will be displayed. \r\nSeparate several extension" + "s by a ; (.zip;.txt)\r\n(mandatory)"); toolTip.SetToolTip(imageDirsTextBox, "Optional directory where MediaPortal searches for matching images. \r\n MediaPort" + "al will cycle through all the directories and display a mini-slideshow of all matching images.Separate with a ;"); - - } protected void imageDirButton_Click(object sender, EventArgs e) @@ -645,10 +701,7 @@ { //by default "dont show these... - this.validImagesCheckBox.Visible = false; - this.importOriginalsCheckBox.Visible = false; - this.importMahjongCheckBox.Visible = false; - this.importPlaychoiceCheckBox.Visible = false; + this.gamebaseDBTextBox.Visible = false; this.gamebaseDBButton.Visible = false; this.gamebaseLabel.Visible = false; @@ -671,21 +724,19 @@ fileExtensionsTextBox.Text = currentApplication.ValidExtensions; - if ((currentApplication is ApplicationItemMame) || ((currentApplication is ApplicationItemGameBase))) + if ((currentApplication.ImportOptionList != null) && (currentApplication.ImportOptionList.Count > 0)) { - this.validImagesCheckBox.Visible = true; - this.validImagesCheckBox.Checked = currentApplication.ImportValidImagesOnly; + importOptionsCheckedListBox.Items.Clear(); + importOptionsCheckedListBox.Visible = true; + foreach (ImportOption importOption in currentApplication.ImportOptionList) + { + importOptionsCheckedListBox.Items.Add(ImportOptionToString(importOption)); + } + CheckImportOption(currentApplication); } - - if ((currentApplication is ApplicationItemMame)) + else { - this.importOriginalsCheckBox.Visible = true; - this.importMahjongCheckBox.Visible = true; - this.importPlaychoiceCheckBox.Visible = true; - - this.importOriginalsCheckBox.Checked = ((ApplicationItemMame)currentApplication).ImportOriginalsOnly; - this.importMahjongCheckBox.Checked = currentApplication.ImportMameMahjong; - this.importPlaychoiceCheckBox.Checked = currentApplication.ImportMamePlaychoice10; + importOptionsCheckedListBox.Visible = false; } if ((currentApplication is ApplicationItemGameBase)) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx 2007-08-13 08:55:30 UTC (rev 828) @@ -175,6 +175,9 @@ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>353, 17</value> </metadata> + <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>353, 17</value> + </metadata> <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>443, 17</value> </metadata> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -52,9 +52,12 @@ this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); this.applicationExeTextBox = new System.Windows.Forms.TextBox(); - this.prePostButton = new System.Windows.Forms.Button(); this.startupDirComboBox = new System.Windows.Forms.ComboBox(); this.pictureBox = new System.Windows.Forms.PictureBox(); + this.postCommandsLabel = new System.Windows.Forms.Label(); + this.preCommandTextBox = new System.Windows.Forms.TextBox(); + this.preCommandsLabel = new System.Windows.Forms.Label(); + this.postCommandTextBox = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); this.SuspendLayout(); // @@ -108,7 +111,7 @@ // shellexecuteCheckBox // this.shellexecuteCheckBox.AutoSize = true; - this.shellexecuteCheckBox.Location = new System.Drawing.Point(7, 322); + this.shellexecuteCheckBox.Location = new System.Drawing.Point(5, 345); this.shellexecuteCheckBox.Name = "shellexecuteCheckBox"; this.shellexecuteCheckBox.Size = new System.Drawing.Size(88, 17); this.shellexecuteCheckBox.TabIndex = 7; @@ -119,7 +122,7 @@ // waitExitCheckBox // this.waitExitCheckBox.AutoSize = true; - this.waitExitCheckBox.Location = new System.Drawing.Point(7, 368); + this.waitExitCheckBox.Location = new System.Drawing.Point(5, 391); this.waitExitCheckBox.Name = "waitExitCheckBox"; this.waitExitCheckBox.Size = new System.Drawing.Size(82, 17); this.waitExitCheckBox.TabIndex = 8; @@ -197,7 +200,7 @@ // quoteCheckBox // this.quoteCheckBox.AutoSize = true; - this.quoteCheckBox.Location = new System.Drawing.Point(7, 299); + this.quoteCheckBox.Location = new System.Drawing.Point(5, 322); this.quoteCheckBox.Name = "quoteCheckBox"; this.quoteCheckBox.Size = new System.Drawing.Size(102, 17); this.quoteCheckBox.TabIndex = 19; @@ -227,7 +230,7 @@ // allowRefreshCheckBox // this.allowRefreshCheckBox.AutoSize = true; - this.allowRefreshCheckBox.Location = new System.Drawing.Point(7, 345); + this.allowRefreshCheckBox.Location = new System.Drawing.Point(5, 368); this.allowRefreshCheckBox.Name = "allowRefreshCheckBox"; this.allowRefreshCheckBox.Size = new System.Drawing.Size(154, 17); this.allowRefreshCheckBox.TabIndex = 30; @@ -255,16 +258,6 @@ this.applicationExeTextBox.TabIndex = 32; this.applicationExeTextBox.TextChanged += new System.EventHandler(this.applicationExeTextBox_TextChanged); // - // prePostButton - // - this.prePostButton.Location = new System.Drawing.Point(7, 448); - this.prePostButton.Name = "prePostButton"; - this.prePostButton.Size = new System.Drawing.Size(85, 56); - this.prePostButton.TabIndex = 34; - this.prePostButton.Text = "Configure pre/post commands"; - this.prePostButton.UseVisualStyleBackColor = true; - this.prePostButton.Click += new System.EventHandler(this.prePostButton_Click); - // // startupDirComboBox // this.startupDirComboBox.FormattingEnabled = true; @@ -277,20 +270,57 @@ // this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pictureBox.InitialImage = null; - this.pictureBox.Location = new System.Drawing.Point(248, 299); + this.pictureBox.Location = new System.Drawing.Point(248, 322); this.pictureBox.Name = "pictureBox"; this.pictureBox.Size = new System.Drawing.Size(170, 170); this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox.TabIndex = 37; this.pictureBox.TabStop = false; // + // postCommandsLabel + // + this.postCommandsLabel.Location = new System.Drawing.Point(2, 257); + this.postCommandsLabel.Name = "postCommandsLabel"; + this.postCommandsLabel.Size = new System.Drawing.Size(85, 20); + this.postCommandsLabel.TabIndex = 40; + this.postCommandsLabel.Text = "PostCommands"; + this.postCommandsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // preCommandTextBox + // + this.preCommandTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.preCommandTextBox.Location = new System.Drawing.Point(93, 231); + this.preCommandTextBox.Name = "preCommandTextBox"; + this.preCommandTextBox.Size = new System.Drawing.Size(325, 20); + this.preCommandTextBox.TabIndex = 39; + // + // preCommandsLabel + // + this.preCommandsLabel.Location = new System.Drawing.Point(2, 231); + this.preCommandsLabel.Name = "preCommandsLabel"; + this.preCommandsLabel.Size = new System.Drawing.Size(93, 20); + this.preCommandsLabel.TabIndex = 38; + this.preCommandsLabel.Text = "PreCommands:"; + this.preCommandsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // postCommandTextBox + // + this.postCommandTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.postCommandTextBox.Location = new System.Drawing.Point(93, 257); + this.postCommandTextBox.Name = "postCommandTextBox"; + this.postCommandTextBox.Size = new System.Drawing.Size(325, 20); + this.postCommandTextBox.TabIndex = 41; + // // AppSettingsBase // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.postCommandTextBox); + this.Controls.Add(this.postCommandsLabel); + this.Controls.Add(this.preCommandTextBox); + this.Controls.Add(this.preCommandsLabel); this.Controls.Add(this.pictureBox); this.Controls.Add(this.startupDirComboBox); - this.Controls.Add(this.prePostButton); this.Controls.Add(this.applicationExeTextBox); this.Controls.Add(this.informationLabel); this.Controls.Add(this.allowRefreshCheckBox); @@ -343,8 +373,11 @@ protected System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; protected System.Windows.Forms.OpenFileDialog openFileDialog; protected System.Windows.Forms.TextBox applicationExeTextBox; - protected System.Windows.Forms.Button prePostButton; protected System.Windows.Forms.ComboBox startupDirComboBox; private System.Windows.Forms.PictureBox pictureBox; + protected System.Windows.Forms.Label postCommandsLabel; + protected System.Windows.Forms.TextBox preCommandTextBox; + protected System.Windows.Forms.Label preCommandsLabel; + protected System.Windows.Forms.TextBox postCommandTextBox; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -43,9 +43,6 @@ { public partial class AppSettingsBase : SettingsBase { - string preLaunch = string.Empty; - string postLaunch = string.Empty; - public AppSettingsBase() { InitializeComponent(); @@ -62,8 +59,8 @@ applicationExeTextBox.Text = curApp.Filename; applicationArgumentsTextBox.Text = curApp.Arguments; // Pre-Post-Launch - preLaunch = curApp.PreLaunch; - postLaunch = curApp.PostLaunch; + preCommandTextBox.Text = curApp.PreLaunch; + postCommandTextBox.Text = curApp.PostLaunch; // ProcessWindowStyle // The enumerator ProcessWindowStyle has these items: //Normal = 0, @@ -92,8 +89,8 @@ curApp.Filename = applicationExeTextBox.Text; curApp.Arguments = applicationArgumentsTextBox.Text; // Pre-Post-Launch - curApp.PreLaunch = preLaunch; - curApp.PostLaunch = postLaunch; + curApp.PreLaunch = preCommandTextBox.Text; + curApp.PostLaunch = postCommandTextBox.Text; // ProcessWindowStyle curApp.WindowStyle = (ProcessWindowStyle)winStyleComboBox.SelectedIndex; @@ -127,7 +124,9 @@ toolTip.SetToolTip(enabledCheckbox, "Only enabled items will appear in MediaPortal"); toolTip.SetToolTip(applicationExeTextBox, "Program you wish to execute, include the full path (mandatory if ShellExecute is " + "OFF)"); toolTip.SetToolTip(allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal."); - toolTip.SetToolTip(prePostButton, "Configure an command to run as pre or post of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); + toolTip.SetToolTip(this.preCommandTextBox, "Configure an command to run as pre of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); + toolTip.SetToolTip(postCommandTextBox, "Configure an command to run as post of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); + } @@ -161,22 +160,6 @@ } } - private void prePostButton_Click(object sender, EventArgs e) - { - using (AppSettingsPrePost prePostForm = new AppSettingsPrePost()) - { - prePostForm.Title = titleTextBox.Text; - prePostForm.PreLaunch = this.preLaunch; - prePostForm.PostLaunch = this.postLaunch; - DialogResult dialogResult = prePostForm.ShowDialog(this); - if (dialogResult == DialogResult.OK) - { - this.preLaunch = prePostForm.PreLaunch; - this.postLaunch = prePostForm.PostLaunch; - } - } - } - private void shellexecuteCheckBox_CheckedChanged(object sender, EventArgs e) { if (this.shellexecuteCheckBox.Checked) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -80,7 +80,7 @@ // this.platformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.platformComboBox.FormattingEnabled = true; - this.platformComboBox.Location = new System.Drawing.Point(93, 231); + this.platformComboBox.Location = new System.Drawing.Point(93, 286); this.platformComboBox.Name = "platformComboBox"; this.platformComboBox.Size = new System.Drawing.Size(325, 21); this.platformComboBox.TabIndex = 42; @@ -89,7 +89,7 @@ // this.platformLabel.AutoSize = true; this.platformLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.platformLabel.Location = new System.Drawing.Point(2, 234); + this.platformLabel.Location = new System.Drawing.Point(2, 289); this.platformLabel.Name = "platformLabel"; this.platformLabel.Size = new System.Drawing.Size(84, 13); this.platformLabel.TabIndex = 41; @@ -103,6 +103,10 @@ this.Controls.Add(this.platformLabel); this.Name = "AppSettingsDirCache"; this.Load += new System.EventHandler(this.AppSettingsDirCache_Load); + this.Controls.SetChildIndex(this.preCommandsLabel, 0); + this.Controls.SetChildIndex(this.preCommandTextBox, 0); + this.Controls.SetChildIndex(this.postCommandsLabel, 0); + this.Controls.SetChildIndex(this.postCommandTextBox, 0); this.Controls.SetChildIndex(this.enabledCheckbox, 0); this.Controls.SetChildIndex(this.titleLabel, 0); this.Controls.SetChildIndex(this.applicationExeLabel, 0); @@ -123,7 +127,6 @@ this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); this.Controls.SetChildIndex(this.informationLabel, 0); this.Controls.SetChildIndex(this.applicationExeTextBox, 0); - this.Controls.SetChildIndex(this.prePostButton, 0); this.Controls.SetChildIndex(this.startupDirComboBox, 0); this.Controls.SetChildIndex(this.platformLabel, 0); this.Controls.SetChildIndex(this.platformComboBox, 0); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -45,20 +45,26 @@ InitializeComponent(); } - public override void LoadSettings(ApplicationItem curApp) + public override void LoadSettings(ApplicationItem applicationItem) { ProgramUtils.FillComboBox("tblPlatform", "platform", platformComboBox); - base.LoadSettings(curApp); + base.LoadSettings(applicationItem); - startupDirComboBox.Text = curApp.StartupDir; - shellexecuteCheckBox.Checked = curApp.UseShellExecute; - quoteCheckBox.Checked = curApp.UseQuotes; - waitExitCheckBox.Checked = (curApp.WaitForExit); - allowRefreshCheckBox.Checked = curApp.RefreshGUIAllowed; - if (curApp.PlatformId != 0) + startupDirComboBox.Text = applicationItem.StartupDir; + shellexecuteCheckBox.Checked = applicationItem.UseShellExecute; + quoteCheckBox.Checked = applicationItem.UseQuotes; + waitExitCheckBox.Checked = (applicationItem.WaitForExit); + allowRefreshCheckBox.Checked = applicationItem.RefreshGUIAllowed; + if (applicationItem.PlatformId != 0) { - platformComboBox.SelectedValue = curApp.PlatformId; + platformComboBox.SelectedValue = applicationItem.PlatformId; } + + if((applicationItem.Title != "") && (applicationItem.Title != "New item")) + { + informationLabel.Text = applicationItem.Title; + + } } public override void SaveSettings(ApplicationItem curApp) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -92,10 +92,7 @@ this.informationLabel.Click += new System.EventHandler(this.informationLabel_Click); this.informationLabel.MouseEnter += new System.EventHandler(this.informationLabel_MouseEnter); // - // prePostButton // - this.prePostButton.Location = new System.Drawing.Point(4, 419); - // // AppSettingsGamebase // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -51,7 +51,7 @@ base.LoadSettings(curApp); this.startupDirComboBox.Text = curApp.StartupDir; - this.quoteCheckBox.Checked = true; //(curApp.UseQuotes); + this.quoteCheckBox.Checked = true; //(applicationItem.UseQuotes); this.waitExitCheckBox.Checked = (curApp.WaitForExit); this.allowRefreshCheckBox.Checked = curApp.RefreshGUIAllowed; } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -80,8 +80,10 @@ waitExitCheckBox.Visible = false; shellexecuteCheckBox.Visible = false; informationLabel.Visible = false; - - prePostButton.Visible = false; + preCommandsLabel.Visible = false; + preCommandTextBox.Visible = false; + postCommandsLabel.Visible = false; + postCommandTextBox.Visible = false; } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -35,7 +35,6 @@ this.groupBox1.SuspendLayout(); this.SuspendLayout(); // - // enabledCheckbox // this.toolTip.SetToolTip(this.enabledCheckbox, "Only enabled items will appear in MediaPortal"); @@ -114,14 +113,13 @@ this.catverLink.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.catverLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.catverLink_LinkClicked); // - // groupBox1 // this.groupBox1.Controls.Add(this.historyDatLink); this.groupBox1.Controls.Add(this.catverLink); - this.groupBox1.Location = new System.Drawing.Point(232, 405); + this.groupBox1.Location = new System.Drawing.Point(5, 448); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(226, 117); + this.groupBox1.Size = new System.Drawing.Size(226, 87); this.groupBox1.TabIndex = 82; this.groupBox1.TabStop = false; this.groupBox1.Text = "Add CATVER.INI and HISTORY.DAT in your mame.exe folder for full dataimport"; @@ -133,7 +131,10 @@ this.Controls.Add(this.groupBox1); this.Name = "AppSettingsMame"; this.Load += new System.EventHandler(this.AppSettingsMameDirect_Load); - this.Controls.SetChildIndex(this.prePostButton, 0); + this.Controls.SetChildIndex(this.preCommandsLabel, 0); + this.Controls.SetChildIndex(this.preCommandTextBox, 0); + this.Controls.SetChildIndex(this.postCommandsLabel, 0); + this.Controls.SetChildIndex(this.postCommandTextBox, 0); this.Controls.SetChildIndex(this.informationLabel, 0); this.Controls.SetChildIndex(this.enabledCheckbox, 0); this.Controls.SetChildIndex(this.titleLabel, 0); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs 2007-08-13 08:55:30 UTC (rev 828) @@ -92,7 +92,11 @@ shellexecuteCheckBox.Visible = false; this.enabledCheckbox.Checked = true; - this.prePostButton.Visible = false; + + preCommandsLabel.Visible = false; + preCommandTextBox.Visible = false; + postCommandsLabel.Visible = false; + postCommandTextBox.Visible = false; } private void informationLabel_Click(object sender, EventArgs e) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.resx 2007-08-11 06:03:06 UTC (rev 827) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.resx 2007-08-13 08:55:30 UTC (rev 828) @@ -123,97 +123,384 @@ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="informationLabel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - /9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAAAAgAAAAAAAD/2wBDAAUDBAQEAwUEBAQF - BQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUF - BQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e - Hh7/wAARCABLAOEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA - AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRol - JicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZ - mqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QA - HwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx - BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RV - VldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPE - xcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD4yooooAKKKKACiiig - AorpJPCN/beCz4nvT5EMkqJbRFfmlDZ+f2Xjj1+grm6ucJQtzLciFSM78rvbQKK6PwH4S1DxZq32S0/c - 20eDc3TD5IVJ/Vj0C9z7AkYV7GsV3NEmSqOygnqQDQ6clFTa0YKpFzcE9UQ0UUVBYUV1HhvwdfaroGpa - 9KxttPs4JHR2XJndR91R6A4yeg6dTXL1cqcopNrciNSM21F7bhRRRUFhRWz4Q8Oaj4n1hNO05BnG6WZ+ - EhTPLMfT9ScAcmqniCyXTdbvtPSQyrbXDwhyuCwViM47dKv2cuXntoR7SLnyX13KNFORWdgqgsxOAB1J - ro/F3hK+8M6XpdxqbbLu+8xmt8cwqu3AY/3jk5HbjvkAjCUk5JaLcJVIxkot6vY5qiiioLCitbwp4f1D - xJqq2Fgqggb5pnOI4Yx1dz2A/XgDJIFdhL8PdEjdl/4Si8cA43LpYwfcfvq6KOErVleEbo5q2Mo0Jcs5 - Wfz/AEPOaK9CPgLQh18TX3/gqX/49TD4H8Pjr4ovv/BUP/j1a/2dif5fxX+Zj/aeF/m/B/5HAUV6NB8P - NDk0+61BvFV1DaWq5lml0xVUHso/fcsfQVxN3baWll5trqM8tx5pXyXttg2c4bduPPC8Y7nnjnGrhqlH - 41b5o3o4qlXv7N3+T/yM+iiisDoCiiigAooooAK9a+C3wwuNfu4NU1S23WpAkt7eQYWQf89JPSP0HVzx - 0yaPgr8MLnxBeQanqdtutjh7eCQfLIP+ekn/AEz9B1c+2TX1ZpWm22k2Qt7cZJ5kkI+ZzjGT6egHQDgV - 7mW5bz2q1Vp0R85m+b+yvRovXq+39f15eL/tPabb6Z8NbOCAZJvFLyEDLnHU46egA4A4FeBeB/Ct94p1 - M29ufJtYsNdXTLlYVPTjux6BRyT7ZI+of2gNBl8S+HtO0yKdLdWvA8srjOxAOSB1ZuwA6kj61d8A+D7H - w9pdvFFa+SkXzQwtywYjmSQ/xSH8lHArsxOXvE4q7+FJHDhM0WEwXKtZNsh8GeEbHw9oQhhtvIjiidoo - W5bcVOZJD3kP5KOBXx/qn/ISuf8Ars/8zX3TdnNvP/1yf/0E18Lap/yErn/rs/8AM1z51CMIU4xVlr+h - 1cP1JVJ1ZSd27fqVq7r4Y+BZ/Edyl9fJKmlI+0BeHuXHVEPYD+JugHvR8MPAs/iS6S9vo5U0tX2gLw9y - 46oh7AfxN0A96+jtK02DTbWOKOOJCiBFWNcJGg6Io7AfmTya5suy51n7Sp8P5nZmmaKgnSpfF+X/AATn - /GGnw6f8M9fijjjTZpjRoka7UjQEYRR2A/Mnk18r19afEQ5+H3iP/sHv/MV8l1edJKcEuxnkDbpzb7/o - FbHhPw9f+JNVFjYqqhRvnnk4jgjHV2PYfqTwOaTwn4ev/EmqixsVVQo3zzycRwRjq7HsP1J4HNe/+GtD - sNC0pLCwjZYAQ7u64kuJB/y0f0/2V6KPfJrlwOBliJXfwnbmGYRwseWOsmTeC9F0/Q47HTtOjZbcXEby - SOuJLmQH/WP6f7K9FHuSa+ffGis/jPV1UFmN/MAB1J3mvpOyYDUbYkgATIST2+YVxejeFrfSvEeoa7de - XPqc91JLbAYZLRGYlX9DKQcj+7169PYxuDdWEKdNWSf3I8PL8aqM6lWo7tr72Znw+8HDw4qanqUYbW2A - aKJhkWIPRiO8voP4Op56Uvj3/wAgnwsck5iuck9T+9613D4UEA+5J6k1w3x6/wCQR4W/65XP/o2oxVCF - DCShDy/NF4OvOvjoTm+/5M8nrW8K+H9Q8R6qthYIoIG+WV+I4UHV3PYD9eAMkgUeFdAv/EeqrYWCqCBv - llc4jhQdXc9gP14AySK9dtbaw0XSho2jBhbZDXE7DEl24/ib0Uc7V7e5JJ8nBYKWId38KPbx+OWGjyx1 - k/6uxsEOn6LpP9iaKG+zZDXFwwxJduP4m9FH8K9vckktSxZ9Pl1K5urWwsY3EZuLpyqM5/hXAJJ78Dio - 9yCVTKGMe4bgpwSO+Ks+K9O0TxTE1/qF/qWm6TpsWEiURrBB7L1LOx+pNfQyTp07U1t02PmoNVKl6j33 - e7Mxzox6eLNA/wC/0n/xFMjXQBIHuvFuj+QvzSCB3eQgc4UFACT9a8q1H7ILyUWPnfZgx8ozY3le2ccZ - qtXjPNprTlR7iyeFvif4HUeOfFcmuyx2dnEbPSLUkW1sD/4+/wDec9zXL0UV5lWrKrJyk9T1aVKFKKhB - WSCiiiszQKKKKACvWvgp8L7rxDewalqVtutjiSCCQfK6/wDPST/pn6Dq59smj4J/C668R30Go6jbbrY4 - kggkHyuv/PST/pn6Dq59smvrXRtKtNHsRbWwyTzJIR80jep/oOgHAr3Mty32lqtVadEfOZvm/sr0aL97 - q+xFo+mWukWQtrcZJ5kkIG6RvU/yA6AcCsHUvGWkw+KovDUUonv2QPIiH/VqZETn3y449q5D47fFi28I - 2j6Po8iT61KuMg5FuD3Pv7V4t+z7d3N/8S57y8meaeWJHkdzksftMFerWx0YVo0IatvXyPFw+WTqUJYi - poktPP8A4B9YTYJyQDg5HHSqd1PFEF82RU3MFGT1JIA/UgfjVLxf4j0vwxo02q6rcCKGMfKufmkbsoHc - 14R4H8c6n42+Kct1dMYrSOBRbWwPyxr9ph/M+9b1sVClOMHuzlw2CqV4SqL4Y9f0Pe7k5gm94n/9BNfK - XgTwLP4l1ua9vY5V0xbl1AXh7lwTlEPYD+JugHvX1TOco6g43KVz9RisfS9Lt9MhCxhC23YCqbVVR0VR - 2H8zyayxOEjiJRc9kdGCxssLCahvK3yIdH0uDS7WOOOOJGVBGqxrhI0HREHYD8yeTU85K7d3y787Qepx - WJ8QPF+m+D9IN7elZrqQEWtqD80h9T6LXCfCDX9S8R3Go6rqk5lnkvRgfwoPKbCqOwFW8RThVjRW7/AU - MLVnSlXey/E7P4gn/i3/AIj/AOwe/wDNa+ZfCnh+/wDEmqCxsVVQo3zTPxHAg6ux7D9SeBzX1B4ntTqP - hfV9NWaOF7u1MKu+dqksvJx2HX8Kw/Cnh6w0PSksrOJlgBDs0gxJcOP+Wknp/sr0Ue+TXHjME8TWi38K - Wp34HHrCUJpfE3p9wzwvoNhoekx2NjEywAh3dxiS4cf8tH9P9leij3JNakzwQ2017e3CW1nbrummfoo9 - PcnsKluJLe3tZr29uFtrO3XdNM/RR6D1J7CvBfib46uPFF0LOzD22jwMfJhzzIf77+pP6VpicTTwdOy+ - SMsLhauOqtt6dX/XU9qkmgl/eWzO0LqrxlxglWUMM/garqkk0ywwoXdzhVUck0zS0kls7OKJC7vbW4VR - 1P7lK4/4l+OItFim0HQJ1kv3BS8vEOREO8cZ9fU1pVxEKVPnmZ0cNOtV9nTR1moQyWtzJby7fMjOG2nI - 6Z6j61zPxP0G/wDEcXhOwsFUEQXLyyvxHCgl5dz2A/XgDJIrZhYmxsyTybK25/7YR0tzfXL2S2bTN5C9 - EHA6k8+vJJ/GlVpxr0+R7P8A4cqjUlQqqcd1f8rGfY2thoukjSNIDC2yGnncYkunH8Teijnavb6kmlmt - hDpv9o3t3a2Foz+Wkty5USN3CgAk49aWOSJLmN54zJErAugOCw7jPaqfjHS9H8Tagt1qGs6tHHGoSG3i - tYxHCvoo30pp06dqUb9lsVBqrUvVla+73ZEt14e37rnxRpawjl/KdnfA7KNvJPauC8eeLZdfmS0tI2tN - Itifs1sD19Xc93Pr+FdGfA/hEddZ1n/wEj/+LpB4J8IM4RdY1tmY4CrZxkk+n3683ERxlePLypL1/wCC - ephZ4GhLn5m35p6fgeZ0V2/xE8MeH/DAS0ttTvbnU2wz28kaAQr/ALZUn5vb864ivFq0pUpcstz3aNaN - aCnDZhRRRWZqFFFFABXcfDLR/Dct2upeJtYsLeCNwIrWV87z/ecDnaP7vVunA5rh67zXfBGjad8PNM8T - w+LLW6u72SCOTT0VfMgLrI0hbDk4UCLBxyXYcbedKU1TmpNXMq1N1IOKla/VH0xoXxP+F2jWAtbXxHbk - nmSVlO6RvU8fgB0A4Fcx8WPjpolloRg8I3qX2oXAKiVQdsI9T7+leGat4CitfEMmi2mswXtwtjcXUYQp - 87JPIkaAhyPnjRJBz0ccHqcEaZpn/CJDUzfzDUjffZja+Wu0Jt3b927Pt93HvXqTzqs48sUkeLT4ew8Z - qUpN+TMq/u7m/vJbu8meaeVi0kjnJYmu2+CGr2OheJr3VdQmWKC3shJyeXKzwttX1JxVXU/C3h+w0jxB - cyeKo2u9P1KWysLdLff9uVHUeZuUkICpLZPHGATmpNK8EW1x4003RLzWEtbG/wBPF4l9sDDP2XzigUE5 - O/8Ad+ue2eK8ylVdOoqm7R7NajGrSdN6JlX4meOdU8ba013ds0dpGSLa3B+WNf6n3rqv2edE1Ftek1cQ - N9kZVhRzxvYTRu231CqpyegyB1IFZfw/+Hdxr+vzLKJTpdvcPEGA2NclWxtX0HTc3bPc4FfTGh6Ta6PY - x21vFGm1AnyLhVUdFUdlH68k5JJr2MvwtSvV+sVX/wAH/gHhZnjKWGo/VaK/4H/BLshrk/iH4x0zwdpB - u7wiW7kB+y2oPMh9T6LUnxG8aab4N0c3V0VmvJQRbWwPLn1PotfO8EF58QZPEXiHWtetrW5srUy28U0i - L57/ADMIUDMD9xJMbQx3bRj5sjvzDHrDrlj8X5HmZXlksU+eekF+JzninX9S8SaxNqmqTmWeQ8D+FB2U - DsBXpHwI1XSdPsLtdR1WysT9qDgXEoTI8sjj15NctdeENFj8LeH9Vi8VWpu9SuEivLZkwLFWZwHc56YT - PT16Y5sWHgSxvfHNx4f/ALfhsLWK1M32q+eBPnICxodszJ80jIPvZCkttJGD85QxMqVX2r1Z9ZiMJCtR - 9itF5HuL+J/CpH/I06N/4Ef/AFqrS+JvCiqXfxRpWxQS2ybc2B6DHJrwaPwvZN8PZfEj6sI7uOZ4xaMq - bWw8a7Qd+7eRIzY242xtzUfxG8N2fhjWLeysdVGpxS2qTGcR7F3EnKj1xjqCR716X9tT/lR5X9gU/wCd - mh8TvHdx4puxaWge20eBj5MGeXP99/Un9K4iu+8Q+BNL0/wHpPiGx8UWt/f6hJbRNpqBQ8DSxu7bjvPC - 7YxnAzvOcbeXz+AdMh8c3egDxRbXlnFaLcQXdo0LfaiWRGVN0qplSzk5cfLEx4ryKtWdabnN6ntUaMKE - FCCskbXjPx7Hp2hwaNoEoN7NZwrd3anPlDylBjQ+vHJ/CvMNLs21LUYbQXNvbmV8Ga5lCRp6szHoP88m - t2y8M6fP4FvfEL+ILSK8tpJVTTWUmWYJJaqGUjjBFw565/d8AjcV1dH8DaRfvriS+LbK1bToIpbcSBf9 - LLW0kzIp3YBXy9vuTj7xVTpXxMq8k57LoZ4fCww8XGG76neJq3hryY4h4p0pRDFHAC7sC3loqbuFIGdu - eveo31Hw6enizRf+/kn/AMRXmGt+G7LT/A2heIINVFzc6n5nn2ojx9m2ySIAW6EkIGxwcN06ErH4as3+ - GzeKv7UH2xdRe0+wiPJCBY2EhbsCZCADj7pxnnHes3mlblX4nnPJKbd+d/gekPeeH26eLdD/AO/kn/xF - QPPoLdPFuhf9/JP/AIisLxZ8OdD0fWdAsLLxpZakurTyxSSxqgFtsEe3d85GWZ2HJA+UHPPHP6j4REEe - si11CO6m0pbZpI125IkiLS/xf8s2G04zz6Uf2vU/lX4h/YtP+d/gdu76G3TxdoP/AH9l/wDjdVtT8UaP - 4X04y6PfW2q63MCI54cmK0XpuG4Alz9OK4/U/DFlp3h7w7rE2tQT/wBpM3261t2jeayXI2ZXfyXQ7hnb - 0wa0rHwXot5r3iKwj8ShbbSrkwQTtHGPOUeZmdgZABEDGASpY/vEwDUTzWrKLSSRcMnpRknKTa7HEXM8 - 1zO89xI0ksjFndjksT3NRV1l74Z0mD4d2fiOLxDFNqc0qiXSwg3xIzzoHLZ/6YjtxvXOMqW5OvLbueul - YKKKKACiiigAooooAKKKKACtDQDpQ1OJta+1GyU5kS3ALv8A7IJIAz61n0U4uzuKSurHv+gfGjwfo1kl - taeH9SUKgQbfLUKo6KozwB/iSSSTVq7+PuhfZpDa6HqBn2ny/NdNu7tnHavnaivSWbYhKyt9x5LyTCN3 - af3mp4o17UvEesTapqk7SzyH14UdlA7CsuiivOlJyfNJ6nqwhGEVGKskFFFFSUFFFFABRRRQAUUUUAFF - FFABRRRQAUUUUAFFFFABRRRQAUUUUAf/2Q== + Qk1+WAAAAAAAADYAAAAoAAAAlgAAADIAAAABABgAAAAAAAAAAAATCwAAEwsAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB + AAABAAABAAAAAAAAAAAAAAAAAgAAAwAAAwAABAEAAwEAAwEAAwEAAwEAAwEAAwEAAQEAAQEAAQAAAAEB + AAEAAAIAAAIAAQEABAEABgAACQAACAAABQAABAACAgAEAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAEAAAACAAADAQAEAQAE + AQABAAABAAEBAAECAAACAAABAAAAAAEAAAIAAAIAAAQAAAIAAQEAAAIBAAIEAAEGAAAIAAAHAAAFAAAD + AAEBAAQAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAQAAAQEBAgICAgIAAAcEAgcBAAoFAQMBAwMCBAQDAwYDAQsHBwYDAgUCBAQCAwIC + BQEABQICBQABBQAABwEBCwEACAMABQMAAAMBAAEBAAAAAAAAAgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAABAAACAQECAQEBBQMBBQEA + Ew0IEAkEFAkAGg0AFwYAHgwAHgsBHgsBGwgAHwwAGwsAGgsADAQBAgIBAQAFAQALAAALAAAHAAABAAIA + AAIAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAABAAABAAAAAAAAAAEAAAIBAQMCAgIFAgELBgJEPDOBc2GRdEWlg02vilKqg0ayiUqyh0iyh0eu + hUapgEOddjpELAkTCQALAwAHAQQDAQsBAQoAAQIAAwAABAAAAgABAAABAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAQAAAgEBAwICAgQB + AAsFARcOB1lKM6SCQ7qSRteqXN6uXN+uV96rU9yoUOCsVN2rVdqqVZd1Mz4uCBQHABAEAQMABAABBwAA + AgACAAACAAEAAAQAAQMAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAEAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAQAAAQAAAAABAAABAAAAAAAAAAAAAAEAAAEA + AAAAAAAAAAAAAQAAAQAAAAAAAAACAAADAAEDAQECBQMBBwIBDgYAEwcAblUgmnw1s49A06xY2KxU2axS + 2KpP16pP1KdN06dPzapaoIhEQCsKFwcACAIBAQAEAAEBAAIAAQIABAAABwACAwABAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAABAACAQADAAECAAIAAAIYGBkh + ISEcHBoEAwERDQ86Nz4ODBMAAAMhJSM8QTsDCwIBBgAUGhQHCQcCBAUYGhkCAwITFRcIChEBBAkCAgQq + KSk8OTMRDQkcGBBEPzY2LR1kUCqhgEC2j0LSqFbVq1bYrFXWqE7WqE3XqVLQo03Vp1OadjtDLAoQBgAG + AQEDAAQEAQQRDw8TEg8XGBIICgUSFRELDQshJCEBAwEQERAvLy8DAQMHBQkhHiMbGR0HCAoICQo7PT4V + FxgAAQIWFxg6PD0eICEAAAEBAgMBAAIfGh4aGR0rLC0BAgMVFxkMDA8hISQBAAEEBQIwNC4NDQoHAwIg + Hx8NDg8LDhAGCQkTFhUBAgEZGRgUFBQTExQCAwEnJyQ5OjcODw0AAQAAAQADBQQoKSc7PDoNDgwODwwe + HhsmJSIQDw4EAwElJCIwMC0FBQQODQw4ODUlJSIDAgEfHh8KCwwSFBcAAQERExEODwsCAwEGCQg1OTsN + DhIAAQMYGhoICQoYGRoAAAEAAAEAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAFAAEDAQQBAQUAAgMABAUFB3t/frK5tHp8eAoKBk1KSWNgY3d0dwMDBGRnZkRKRAUL + BAQIAlxgWSAfHwgGCXx8ewYFBFRVV1haXxscIAgJC4B/fSgmIAsKBkdJQoKEfjEuKw8FAGRMKp99Q7SL + QdapV9WmTtqqUdinTtOiS+CpT9+lStaoWaWERjwoCRYJAAkAAQYABTY0N5KUknqBeQMGA1haWI+RjkdH + RQcHBXBwb11dXSYmJwMDBJeVmaalqAcHBywsLXZ3dn9/fwICA1dXWHp7eyAhIQYHBwMCAwYEBmliZ6Ge + oq+xsgUHByQmJ7Sztm1qbQYDBHV1ck9SSjU1MAQDAoOEhWdpaj5AQhcYF2ptaAICAHt8eoSGiV1eZAME + BYuMjFBTUxIVFgQGBwECBQMFBo6Rk1BSUxESEzk7O5iamqyurjg6ORgZGnV2dmRlZSssLTU3N2JjYxsb + GwgFBXNwcK6usSIkKAQFB0hHRTo5NQYEAHJzbkpNTWZrbAECAnl7fG9xckFDRAQFBgICAwAAAQAAAQAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAgAGBAAGBAAFAgADBAYG + iJGMfIeBm6KeCQoJTE1HPD4zf395BAQCXFpcHx0fAgEBHBkYlZCRR0FECgQIgHp5CAUCXFtapKSlUVFT + CQkKd3V1CQgHAAABREZGmJmZQDkyDwgBGQ8FXUoorIZFuYk43qxS2ahQ1aZP2qhO3apN1qRJ06ZPz6ha + lHc8PSgKDwIABwADExEalJOXPD06BgQGY19mp6SpV1NWCAUGaWhnc3RzICMfAgYCYGVidnl2BgQELCgo + lZGQfXp5BQICWldWl5OSLisqBgICBgICBQECZWJip6ims7i0AAMABgcGnpqbRT5BCAMEZWFgaWlnLjAy + AgQIgIOIZWdoPT8/GRkUaGdgBQMAeXl4h4mOR0pSAgMHkJGWbG1yFxgcAQIHAQIIAwMIj5CWaGluFhYb + Nzg8paermZufPj9CGhsfYmRnTU9TKywwMDI2R0lNAgIFAwMCS0lGnJqbAQEFDAoPiIKEaWFeCgIAaWNd + cW9pZmZhAQECdnh5m52eS01OAgIDAAABAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAACAA0DAAsFAAYEAAQBAAEAAgAIEgwECwcRFRcCAQcJCQgGCwQOEQoAAQEOChQI + Aw4FAQoLBg0eGR4UDxQGAgUVEg8HBQAOCwcbGBULCQgEAgMQDQ8BAQMDBQkICxAbHSAWDgsIBAMEBAMQ + CgBmTiamfzy8izfcqlPbqFDcqU7TpEvTqE3WqUnUp0bTq1SnhkY9KQwRBgIFAQUSDhUHAgUGAggQCxMg + GiAKBQkEAAEOCwsXFxYFBQQAAwAGCQYHCwkDAQEKBQYeGRoOCQoGAQILBwgiHR4TDg8GAQIFAAEFBAMK + DAkIDQgNFA4FCgQDAwESDAsPBQUKAQMHAgQXFRkDAwsAAAgREhgHBwgKCAYNCgYQDAcJBQMSDw8ICQ0I + Cg4LBgYUDg4eGRkMBwcLBgUIAgEMBQUZEhEfGhkLBQYLBgYTDg0VEA8QCwoNCAYQCwsPCgoMBwYOCQgL + BgYHAwEDAwADBQQKCw8EBAwCAgodGCAdFBgMAgILAwEdGRYIBwUFBgUQEBAWFhYHBwcDAwMCAgMAAAEA + AAEAAAEAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEABgMABAQAAgQBAAEB + AAADAAEFAwIGBQMCBQoCCAcCAgMEAQcHCAcDCgQCCwUBCwMBBwICBQIBAgMFBgABAgECAQUEAQgGAwoG + BAgEAwUBAgYDBQEBBAEBBAMDBQUEBgUEBgUFCAUGBgcEAhwPBWlQKaqDQLyMO+CrUtimTNirVdCmTtan + RtyqRNipR8+nVZJ3QTspDhAFAQcAAgsGCQQDBAICAwEBAgQCAwUCAgUCAgcDAwoGBgUCAgcEAgcEAwcD + AwkFBAQAAAgEBAUBAQcDAggEAwgEAwYCAgYBAgQDAgIFAwMGAwEDAQEFAwMDAQcDAAoDAgoCAwUAAQMC + BgEBBgEBBAMDBAUEBAUDAgYDAgcGBQUCAgoGBwYDAwUCAQQCBAMCBQMCBAUDBAYCAwkFBQYCAg4JCgQB + AwMBBAMBAwgHCAIAAgcGCAQCAwUFBgMBAwMBAgYGBgMBAwcGBwEBAAIFBAECBQEDCQIDCQYDCAYBAwkE + BQQBBAEBBQEDCAAAAgMDAwMDAwICAgcHBwAAAAAAAAAAAQAAAQAAAQAAAQAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAIAAAMAAQMAAgMAAgIAAwQDAwEBBwEAEwYCFgIAFwUAEAUAEgUBDwIA + EAQBDgUACgYABQcAAgUAAgUAAAQDAAMDAAEBAQAABQIBBAEBAwACAwECBgIDCAMBGBAJCQMAAAAHAQEH + CAUFBgMDBgUDDAUAZ1AspH9Au4o42qhT0qRN1adQ2ahN2KVD26hG06RGzaZXp4lOOSUKFAkABwIAAgMB + AAMAAAEAAQMCAAICAwEBBgEADQIBEwUAGQcBFQMAEwcAFAkAFgwAEggAGA0CEwgAEQcAEwgAEgcAFAkA + CwYAAgIBAgQEAgMGAAIFAAECBAIBBAEACAQDAwECAgIFCgYCEAkDCQMABwMAAQEBAQIHAQMJAAEGBQEB + EAUBDwMABwMABQIBCAQACQQACwUBCgIADQUCCgUCCQMACAIACQUCBgQCBwMBBQIACQYDBgMBBgIACAQC + BQMBBgMBBgIACAMACgMADgkFBgQACwkCCQYACQYACQUCAwIDAQILAAALAgIEAgEBBQQEAwICAQEBAQEB + AAAAAAABAAABAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAABAAC + AgACAAADAQEbFBJANCpMOiBWPhxSOBNMNBVRNxdSORdOOBFNPBFJPRRFPhglIgsJCAAEAgAAAQMAAQQA + AAEEAgICAAECAQMDAgMHAgETCAFlUzwoGAgEAwQBAQQEAwEEAQEAAQMDAwQZEAZkTSmthUK/jz7ap07a + pk/YpU/XpU3VpUnWpUXTpEbQqFWRdTg7KQkMBgADBAEAAwEAAgIAAQQAAQQFAgUJAwEeDwdTPidrUDVw + UjJrUi1qUyxqUyxpUitpUStpUitlTiloUSlnTypkTSUsHAgJBAACAAEBAwcAAAcAAQYAAAEBAgABAgAA + AQABAAEqHxFPPSQZCgAPBgAIBQUAAAgAAAsCAwwGAwUsHRNoVUNIOSBAMBdFNBZFMhNNORtMNxlKNRdJ + NRZINBdHNBhGNBhGNBlGNBlHNRpHNRpHNRpGNBlGNBlGNBlGNBlINRpHMRlHMBhFMhdDNRRCNhJBNg5C + NxQ1KxEUDQEJBggAAAcCAQEFAwIEAgEDAQEBAQEBAQEAAAAAAAAAAAEAAAEAAAEAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAAABAAAAAAAAAgUCBA0FAT8yIZiFVZqCP9S0ZeK8beK6 + aOG3YuW+ZOG9YNq6YdO3a5+GTU41FR8IAAkBAQAAAwEAAQEAAAECBAAABQAAAgcDABcIAaOHXYBjNCQW + AwsGAAQBAAEAAAABAgABBQQEBA4HAW9VK55xJ9+nS92nTtikUtSiVNKjUNSlSdelQdGiP9CqWKSHST8u + DhAGAAcDBAEABAAACQAACgIBBQkEAC4fDopxQ6qJScKaUsidU8idU8idU8ecUsabUcWZUMKXTcSZUL6T + ScSZUJp5QzolDxQHAgkDAgECBwECBwAAAgACAAADAAABAAIBATQkCaSIWV5EISAOAA8GAAICBgABCwAB + DAMBBBcMA1xGLZ97Qpx2NbGJRbiMRrOGPrSIPraJQLSIP7GGQK+GQK+FQK+GQa+GQa+FQK2FQK2EP6yD + PqyCPauCPaqBPKqAPKp+Q6h+RaZ/QqOAPqKCPKKFPJ2BPaaKU... [truncated message content] |
From: <nor...@us...> - 2007-08-21 23:00:32
|
Revision: 851 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=851&view=rev Author: northern_sky Date: 2007-08-21 16:00:30 -0700 (Tue, 21 Aug 2007) Log Message: ----------- Code cleanups, bugfixes,Dynamic filesettings added Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/DirectoryImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/README.txt Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileSettingsBox.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileSettingsBox.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileSettingsBox.resx Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -42,7 +42,7 @@ // // shellexecuteCheckBox // - this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + + this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific fileItem-" + "extension.\r\nYou can omit the \"Launching Application\" in this case."); // // applicationArgumentsLabel @@ -69,7 +69,7 @@ // startupDirTextBox // this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + - "EDIR% if you want to use the directory where the launched file is stored)"); + "EDIR% if you want to use the directory where the launched fileItem is stored)"); // // quoteCheckBox // Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -43,27 +43,14 @@ this.updateDatabaseButton = new System.Windows.Forms.Button(); this.contextFavouritesMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.grouperToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.fileExtensionsTextBox = new System.Windows.Forms.TextBox(); - this.imageDirsTextBox = new System.Windows.Forms.TextBox(); - this.fileDirTextBox = new System.Windows.Forms.TextBox(); - this.fileDirButton = new System.Windows.Forms.Button(); - this.fileExtensionsbutton = new System.Windows.Forms.Button(); - this.imageDirButton = new System.Windows.Forms.Button(); - this.fileExtensionsLabel = new System.Windows.Forms.Label(); - this.imageDirsLabel = new System.Windows.Forms.Label(); - this.fileDirLabel = new System.Windows.Forms.Label(); this.filesGroupBox = new System.Windows.Forms.GroupBox(); this.importOptionsCheckedListBox = new System.Windows.Forms.CheckedListBox(); - this.FileSettingsGroupBox = new System.Windows.Forms.GroupBox(); - this.gamebaseDBTextBox = new System.Windows.Forms.TextBox(); - this.gamebaseLabel = new System.Windows.Forms.Label(); - this.gamebaseDBButton = new System.Windows.Forms.Button(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.filesettingsPanel = new System.Windows.Forms.Panel(); this.contextFavouritesMenuStrip.SuspendLayout(); this.filesGroupBox.SuspendLayout(); - this.FileSettingsGroupBox.SuspendLayout(); this.SuspendLayout(); // // fileListView @@ -92,7 +79,7 @@ this.smallImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("smallImageList.ImageStream"))); this.smallImageList.TransparentColor = System.Drawing.Color.Transparent; this.smallImageList.Images.SetKeyName(0, "folder.ico"); - this.smallImageList.Images.SetKeyName(1, "file.ico"); + this.smallImageList.Images.SetKeyName(1, "fileItem.ico"); this.smallImageList.Images.SetKeyName(2, "shortcut.ico"); // // newButton @@ -189,87 +176,6 @@ this.grouperToolStripMenuItem.Size = new System.Drawing.Size(117, 22); this.grouperToolStripMenuItem.Text = "Grouper"; // - // fileExtensionsTextBox - // - this.fileExtensionsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.fileExtensionsTextBox.Location = new System.Drawing.Point(85, 71); - this.fileExtensionsTextBox.Name = "fileExtensionsTextBox"; - this.fileExtensionsTextBox.Size = new System.Drawing.Size(330, 20); - this.fileExtensionsTextBox.TabIndex = 28; - // - // imageDirsTextBox - // - this.imageDirsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.imageDirsTextBox.Location = new System.Drawing.Point(85, 45); - this.imageDirsTextBox.Name = "imageDirsTextBox"; - this.imageDirsTextBox.Size = new System.Drawing.Size(330, 20); - this.imageDirsTextBox.TabIndex = 27; - // - // fileDirTextBox - // - this.fileDirTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.fileDirTextBox.Location = new System.Drawing.Point(85, 19); - this.fileDirTextBox.Name = "fileDirTextBox"; - this.fileDirTextBox.Size = new System.Drawing.Size(330, 20); - this.fileDirTextBox.TabIndex = 26; - // - // fileDirButton - // - this.fileDirButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; - this.fileDirButton.Location = new System.Drawing.Point(426, 16); - this.fileDirButton.Name = "fileDirButton"; - this.fileDirButton.Size = new System.Drawing.Size(31, 23); - this.fileDirButton.TabIndex = 39; - this.fileDirButton.UseVisualStyleBackColor = true; - this.fileDirButton.Click += new System.EventHandler(this.fileDirButton_Click); - // - // fileExtensionsbutton - // - this.fileExtensionsbutton.Image = global::GUIPrograms.Properties.Resources.searchButton_Image; - this.fileExtensionsbutton.Location = new System.Drawing.Point(426, 68); - this.fileExtensionsbutton.Name = "fileExtensionsbutton"; - this.fileExtensionsbutton.Size = new System.Drawing.Size(31, 23); - this.fileExtensionsbutton.TabIndex = 38; - this.fileExtensionsbutton.UseVisualStyleBackColor = true; - this.fileExtensionsbutton.Click += new System.EventHandler(this.fileExtensionsbutton_Click); - // - // imageDirButton - // - this.imageDirButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; - this.imageDirButton.Location = new System.Drawing.Point(426, 42); - this.imageDirButton.Name = "imageDirButton"; - this.imageDirButton.Size = new System.Drawing.Size(31, 23); - this.imageDirButton.TabIndex = 37; - this.imageDirButton.UseVisualStyleBackColor = true; - this.imageDirButton.Click += new System.EventHandler(this.imageDirButton_Click); - // - // fileExtensionsLabel - // - this.fileExtensionsLabel.Location = new System.Drawing.Point(2, 71); - this.fileExtensionsLabel.Name = "fileExtensionsLabel"; - this.fileExtensionsLabel.Size = new System.Drawing.Size(93, 20); - this.fileExtensionsLabel.TabIndex = 36; - this.fileExtensionsLabel.Text = "Fileextensions:"; - this.fileExtensionsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // imageDirsLabel - // - this.imageDirsLabel.Location = new System.Drawing.Point(2, 43); - this.imageDirsLabel.Name = "imageDirsLabel"; - this.imageDirsLabel.Size = new System.Drawing.Size(93, 20); - this.imageDirsLabel.TabIndex = 35; - this.imageDirsLabel.Text = "Image Dir:"; - this.imageDirsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // fileDirLabel - // - this.fileDirLabel.Location = new System.Drawing.Point(2, 19); - this.fileDirLabel.Name = "fileDirLabel"; - this.fileDirLabel.Size = new System.Drawing.Size(93, 20); - this.fileDirLabel.TabIndex = 34; - this.fileDirLabel.Text = "File Directory(s):"; - this.fileDirLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // filesGroupBox // this.filesGroupBox.BackColor = System.Drawing.SystemColors.Control; @@ -305,73 +211,30 @@ this.importOptionsCheckedListBox.Sorted = true; this.importOptionsCheckedListBox.TabIndex = 88; // - // FileSettingsGroupBox - // - this.FileSettingsGroupBox.BackColor = System.Drawing.SystemColors.Control; - this.FileSettingsGroupBox.Controls.Add(this.fileDirTextBox); - this.FileSettingsGroupBox.Controls.Add(this.gamebaseDBTextBox); - this.FileSettingsGroupBox.Controls.Add(this.gamebaseLabel); - this.FileSettingsGroupBox.Controls.Add(this.fileDirLabel); - this.FileSettingsGroupBox.Controls.Add(this.gamebaseDBButton); - this.FileSettingsGroupBox.Controls.Add(this.fileDirButton); - this.FileSettingsGroupBox.Controls.Add(this.fileExtensionsbutton); - this.FileSettingsGroupBox.Controls.Add(this.imageDirsTextBox); - this.FileSettingsGroupBox.Controls.Add(this.imageDirButton); - this.FileSettingsGroupBox.Controls.Add(this.fileExtensionsTextBox); - this.FileSettingsGroupBox.Controls.Add(this.fileExtensionsLabel); - this.FileSettingsGroupBox.Controls.Add(this.imageDirsLabel); - this.FileSettingsGroupBox.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.FileSettingsGroupBox.Location = new System.Drawing.Point(6, 397); - this.FileSettingsGroupBox.Name = "FileSettingsGroupBox"; - this.FileSettingsGroupBox.Size = new System.Drawing.Size(478, 150); - this.FileSettingsGroupBox.TabIndex = 41; - this.FileSettingsGroupBox.TabStop = false; - this.FileSettingsGroupBox.Text = "Filesettings"; - // - // gamebaseDBTextBox - // - this.gamebaseDBTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.gamebaseDBTextBox.Location = new System.Drawing.Point(85, 96); - this.gamebaseDBTextBox.Name = "gamebaseDBTextBox"; - this.gamebaseDBTextBox.Size = new System.Drawing.Size(330, 20); - this.gamebaseDBTextBox.TabIndex = 89; - this.toolTip.SetToolTip(this.gamebaseDBTextBox, "Select a gamebase (*.mdb) file to import\r\n"); - // - // gamebaseLabel - // - this.gamebaseLabel.Location = new System.Drawing.Point(2, 96); - this.gamebaseLabel.Name = "gamebaseLabel"; - this.gamebaseLabel.Size = new System.Drawing.Size(93, 20); - this.gamebaseLabel.TabIndex = 88; - this.gamebaseLabel.Text = "Gamebase DB"; - // - // gamebaseDBButton - // - this.gamebaseDBButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; - this.gamebaseDBButton.Location = new System.Drawing.Point(426, 93); - this.gamebaseDBButton.Name = "gamebaseDBButton"; - this.gamebaseDBButton.Size = new System.Drawing.Size(31, 23); - this.gamebaseDBButton.TabIndex = 90; - this.gamebaseDBButton.UseVisualStyleBackColor = true; - this.gamebaseDBButton.Click += new System.EventHandler(this.gamebaseDBButton_Click); - // // openFileDialog // this.openFileDialog.FileName = "openFileDialog1"; // + // filesettingsPanel + // + this.filesettingsPanel.AutoScroll = true; + this.filesettingsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.filesettingsPanel.Location = new System.Drawing.Point(3, 397); + this.filesettingsPanel.Name = "filesettingsPanel"; + this.filesettingsPanel.Size = new System.Drawing.Size(481, 162); + this.filesettingsPanel.TabIndex = 42; + // // AppSettingsFilesView // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.FileSettingsGroupBox); + this.Controls.Add(this.filesettingsPanel); this.Controls.Add(this.filesGroupBox); this.Name = "AppSettingsFilesView"; this.Size = new System.Drawing.Size(521, 574); this.Load += new System.EventHandler(this.AppFilesView_Load); this.contextFavouritesMenuStrip.ResumeLayout(false); this.filesGroupBox.ResumeLayout(false); - this.FileSettingsGroupBox.ResumeLayout(false); - this.FileSettingsGroupBox.PerformLayout(); this.ResumeLayout(false); } @@ -391,23 +254,11 @@ private System.Windows.Forms.ContextMenuStrip contextFavouritesMenuStrip; private System.Windows.Forms.ToolStripMenuItem grouperToolStripMenuItem; private System.Windows.Forms.ImageList smallImageList; - protected System.Windows.Forms.TextBox fileExtensionsTextBox; - protected System.Windows.Forms.TextBox imageDirsTextBox; - protected System.Windows.Forms.TextBox fileDirTextBox; - protected System.Windows.Forms.Button fileDirButton; - protected System.Windows.Forms.Button fileExtensionsbutton; - protected System.Windows.Forms.Button imageDirButton; - protected System.Windows.Forms.Label fileExtensionsLabel; - protected System.Windows.Forms.Label imageDirsLabel; - protected System.Windows.Forms.Label fileDirLabel; private System.Windows.Forms.GroupBox filesGroupBox; - private System.Windows.Forms.GroupBox FileSettingsGroupBox; private System.Windows.Forms.ToolTip toolTip; private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; - private System.Windows.Forms.TextBox gamebaseDBTextBox; - private System.Windows.Forms.Label gamebaseLabel; - private System.Windows.Forms.Button gamebaseDBButton; private System.Windows.Forms.OpenFileDialog openFileDialog; private System.Windows.Forms.CheckedListBox importOptionsCheckedListBox; + private System.Windows.Forms.Panel filesettingsPanel; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -32,6 +32,7 @@ using System.Text; using System.Windows.Forms; +using Core.Util; using GUIPrograms; using GUIPrograms.Items; using GUIPrograms.Database; @@ -42,11 +43,18 @@ { private List<ApplicationItem> apps = DatabaseHandler.DBHandlerInstance.ApplicationItemList; public event EventHandler OnRefreshClick; - private ApplicationItem currentApplication = null; + private ApplicationItem currentApplicationItem = null; public event EventHandler OnImageFolderSearch; + private ConditionChecker conditionChecker = new ConditionChecker(); - + //globals,, should match enum fileSettings! + TextBox fileDirTextBox = null; + TextBox imageDirsTextBox = null; + TextBox gamebaseDBTextBox = null; + TextBox fileExtensionsTextBox = null; + + public string ImportOptionToString(ImportOption importOption) { switch (importOption) @@ -93,25 +101,24 @@ { if (curApp == null) return; - currentApplication = curApp; - if (!currentApplication.filesAreLoaded) + currentApplicationItem = curApp; + if (!currentApplicationItem.filesAreLoaded) { - currentApplication.LoadFiles(); + currentApplicationItem.LoadFiles(); } SyncListView(); } private void SyncListView() { - if (currentApplication == null) return; - - fileListView.BeginUpdate(); + if (currentApplicationItem == null) return; + try { + fileListView.BeginUpdate(); fileListView.Items.Clear(); - - foreach (object item in currentApplication.ItemList) + foreach (object item in currentApplicationItem.ItemList) { // add all filelinks, // or add all files @@ -123,19 +130,14 @@ curItem.ImageIndex = 2; fileListView.Items.Add(curItem); } - else if(item is FileItem) + else if (item is FileItem) { FileItem file = (FileItem)item; ListViewItem curItem = new ListViewItem(file.Title); curItem.Tag = file; - /* if (file.IsFolder) - { - curItem.ImageIndex = 0; - } - else - {*/ - curItem.ImageIndex = 1; - // } + + curItem.ImageIndex = 1; + fileListView.Items.Add(curItem); } } @@ -147,7 +149,7 @@ } SetupFileView(); SyncListViewButtons(); - SyncFilePath(); + SetFileSettingsTextBoxes(); } private void SyncListViewButtons() @@ -162,13 +164,14 @@ if (fileListView.SelectedItems.Count == 1) { FileItem file = (FileItem)fileListView.SelectedItems[0].Tag; + if (file != null) { - // if (!file.IsFolder) + // if (!file.IsFolder) //{ - editButton.Enabled = true; - deleteButton.Enabled = true; - launchButton.Enabled = (file.Filename != ""); + editButton.Enabled = true; + deleteButton.Enabled = true; + launchButton.Enabled = (file.Filename != ""); //} } } @@ -178,108 +181,85 @@ } - if (currentApplication != null) + if (currentApplicationItem != null) { - newButton.Enabled = currentApplication.FileAddAllowed(); - addFavouriteButton.Enabled = currentApplication.FilesCanBeFavourites() && (fileListView.SelectedItems.Count > 0); - + newButton.Enabled = currentApplicationItem.FileAddAllowed(); + addFavouriteButton.Enabled = currentApplicationItem.FilesCanBeFavourites() && (fileListView.SelectedItems.Count > 0); } } - private void SyncFilePath() + private void SetFileSettingsTextBoxes() { - this.fileDirTextBox.Text = currentApplication.FileDirectory; + if (fileDirTextBox != null) + { + fileDirTextBox.Text = currentApplicationItem.FileDirectory; + } - if (ProgramUtils.UseThumbsDir()) + if(imageDirsTextBox != null) { - ProgramUtils.GetApplicationImageFolder(currentApplication); + if (ProgramUtils.UseThumbsDir()) + { + ProgramUtils.GetApplicationImageFolder(currentApplicationItem); } else { - string imageDirectorys = string.Join(";", currentApplication.ImageDirsSplitted); - this.imageDirsTextBox.Text = imageDirectorys; + imageDirsTextBox.Text = currentApplicationItem.ImageDirectory; } - - this.fileExtensionsTextBox.Text = currentApplication.ValidExtensions; - // filePathsLabel.Text = currentApplication.CurrentFilePath().Replace("&", "&&"); + } + if (fileExtensionsTextBox != null) + { + fileExtensionsTextBox.Text = currentApplicationItem.ValidExtensions; + } + if (gamebaseDBTextBox != null) + { + gamebaseDBTextBox.Text = currentApplicationItem.ApplicationItemSource; + } + + //filePathsLabel.Text = currentApplicationItem.CurrentFilePath().Replace("&", "&&"); } public string FileExtensionsText { - get { return fileExtensionsTextBox.Text; } - set { fileExtensionsTextBox.Text = value; } + get { return fileExtensionsTextBox.Text; } + set { fileExtensionsTextBox.Text = value; } } - public bool EntriesOK() - {//to do - return true; - - /* string error = "The following entries are invalid: \r\n\r\n"; - bool isOk = true; - - if(this.fileDirTextBox.Text == "") - { - error += System.Environment.NewLine + "No filedirectory entered!"; - isOk = false; - } - if (FileExtensionsText == "") - { - error += System.Environment.NewLine + "No file extensions entered!"; - isOk = false; - } - - if ((gamebaseDBTextBox.Text == "") && (gamebaseDBTextBox.Visible)) - { - error += System.Environment.NewLine + "No sourcefile entered!"; - isOk = false; - } - - - if (!isOk) - { - string strFooter = "\r\n\r\n(Click DELETE to remove this item)"; - MessageBox.Show(error + strFooter, "Invalid Entries"); - } - return isOk; - */ - } - private void AddItem() { - FileItem file = new FileItem(); - file.AppID = currentApplication.ApplicationItemId; // CRUCIAL!! :-) - FileDetailsForm frmFileDetails = new FileDetailsForm(); - frmFileDetails.CurApp = currentApplication; - frmFileDetails.CurFile = file; - DialogResult dialogResult = frmFileDetails.ShowDialog(this); + FileItem fileItem = new FileItem(); + fileItem.ApplicationItemId = currentApplicationItem.ApplicationItemId; + + FileDetailsForm fileDetailsForm = new FileDetailsForm(); + fileDetailsForm.CurrentApplicationItem = currentApplicationItem; + fileDetailsForm.CurrentFileItem = fileItem; + DialogResult dialogResult = fileDetailsForm.ShowDialog(this); if (dialogResult == DialogResult.OK) { - file.Write(); - currentApplication.LoadFiles(); + fileItem.Write(); + currentApplicationItem.LoadFiles(); SyncListView(); } } - private void EditItem() { if (fileListView.SelectedItems.Count == 1) { - FileItem file = (FileItem)fileListView.SelectedItems[0].Tag; - if (file != null) + FileItem fileItem = (FileItem)fileListView.SelectedItems[0].Tag; + + if (fileItem != null) { - FileDetailsForm frmFileDetails = new FileDetailsForm(); - frmFileDetails.CurApp = currentApplication; - frmFileDetails.CurFile = file; - DialogResult dialogResult = frmFileDetails.ShowDialog(this); + FileDetailsForm fileDetailsForm = new FileDetailsForm(); + fileDetailsForm.CurrentApplicationItem = currentApplicationItem; + fileDetailsForm.CurrentFileItem = fileItem; + DialogResult dialogResult = fileDetailsForm.ShowDialog(this); if (dialogResult == DialogResult.OK) { - file.Write(); - currentApplication.LoadFiles(); + fileItem.Write(); + currentApplicationItem.LoadFiles(); SyncListView(); } } - } } @@ -287,13 +267,15 @@ { if (fileListView.SelectedItems.Count == 1) { - FileItem file = (FileItem)fileListView.SelectedItems[0].Tag; - if (file != null) + FileItem fileItem = (FileItem)fileListView.SelectedItems[0].Tag; + + if (fileItem != null) { - currentApplication.LaunchFile(file, false); //launch in non-blocking mode - if ((currentApplication.LaunchErrorMsg != null) && (currentApplication.LaunchErrorMsg != "")) + currentApplicationItem.LaunchFile(fileItem, false); //launch in non-blocking mode + + if ((currentApplicationItem.LaunchErrorMsg != null) && (currentApplicationItem.LaunchErrorMsg != "")) { - MessageBox.Show(currentApplication.LaunchErrorMsg, "Launch Error: (check LOG for details)"); + MessageBox.Show(currentApplicationItem.LaunchErrorMsg, "Launch Error: (check LOG for details)"); } } } @@ -307,10 +289,11 @@ MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { - foreach (ListViewItem curItem in fileListView.SelectedItems) - if (curItem.Tag is FilelinkItem) + foreach (ListViewItem listViewItem in fileListView.SelectedItems) + + if (listViewItem.Tag is FilelinkItem) { - FilelinkItem filelink = (FilelinkItem)curItem.Tag; + FilelinkItem filelink = (FilelinkItem)listViewItem.Tag; if (filelink != null) { filelink.Delete(); @@ -318,7 +301,7 @@ } else { - FileItem file = (FileItem)curItem.Tag; + FileItem file = (FileItem)listViewItem.Tag; if (file != null) { file.Delete(); @@ -326,7 +309,7 @@ } } } - currentApplication.LoadFiles(); + currentApplicationItem.LoadFiles(); SyncListView(); } @@ -339,29 +322,33 @@ this.addFavouriteButton.Enabled = enabled; this.internetSearchButton.Enabled = enabled; this.updateDatabaseButton.Enabled = enabled; - } public bool FirstImageDirectoryValid() { if (ProgramUtils.UseThumbsDir()) return true; - if (this.imageDirsTextBox.Text.Length == 0) + if (imageDirsTextBox != null) { - return false; - } - else - { - string firstDirectory = (this.imageDirsTextBox.Text.Split(';'))[0]; - if (firstDirectory == "") + if (imageDirsTextBox.Text.Length == 0) { return false; } else { - return System.IO.Directory.Exists(firstDirectory); + string firstDirectory = (this.imageDirsTextBox.Text.Split(';'))[0]; + if (firstDirectory == "") + { + return false; + } + else + { + return System.IO.Directory.Exists(firstDirectory); + } } } + else + return false; } //scans all files in the fileviewlist @@ -383,81 +370,71 @@ { OnImageFolderSearch(this, null); } - //get all imagedirs - /* for (int i = 0; i < currentApplication.imageDirsSplitted.Length; i++) - { - if (!currentApplication.imageDirsSplitted[i].ToString().Equals("")) - { - imageDirsList.Add(currentApplication.imageDirsSplitted[i]); - } - } - */ - if (this.imageDirsTextBox.Text != string.Empty) - { - string[] imageDirs = this.imageDirsTextBox.Text.Split(';'); - //get all imagedirs - for (int i = 0; i < imageDirs.Length; i++) - { - if (!imageDirs[i].ToString().Equals("")) - { - imageDirsList.Add(imageDirs[i]); - } - } + { + string[] imageDirs = this.imageDirsTextBox.Text.Split(';'); + //get all imagedirs + for (int i = 0; i < imageDirs.Length; i++) + { + if (!imageDirs[i].ToString().Equals("")) + { + imageDirsList.Add(imageDirs[i]); + } + } + + try + { + //if any imagedirs given + if (imageDirsList.Count > 0) + { + //for every dir fiven... + foreach (string directory in imageDirsList) + { - try - { - //if any imagedirs given - if (imageDirsList.Count > 0) - { - //for every dir fiven... - foreach (string directory in imageDirsList) - { + DirectoryInfo directoryInfo = new DirectoryInfo(directory); + //and for each file in dir + if (directoryInfo.Exists) + { + System.IO.FileInfo[] files = directoryInfo.GetFiles(); - DirectoryInfo directoryInfo = new DirectoryInfo(directory); - //and for each file in dir - if (directoryInfo.Exists) - { - System.IO.FileInfo[] files = directoryInfo.GetFiles(); + for (int z = 0; z < currentApplicationItem.ItemList.Count; z++) + { + bool imageFound = false; + string foundImagePath = string.Empty; + FileItem fileItem = (FileItem)currentApplicationItem.ItemList[z]; + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileItem.Filename); - for (int z = 0; z < currentApplication.ItemList.Count; z++) - { - bool imageFound = false; - string foundImagePath = string.Empty; - FileItem fileItem = (FileItem)currentApplication.ItemList[z]; - string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileItem.Filename); + //check all files if same name can be found + int i = 0; + while ((imageFound == false) && (i < files.Length)) + { + if (fileNameWithoutExtension.Equals(Path.GetFileNameWithoutExtension(files[i].ToString()))) + { + //found + imageFound = true; + foundImagePath = Path.Combine(directory, files[i].ToString()); + } + i++; + } - //check all files if same name can be found - int i = 0; - while ((imageFound == false) && (i < files.Length)) - { - if (fileNameWithoutExtension.Equals(Path.GetFileNameWithoutExtension(files[i].ToString()))) - { - //found - imageFound = true; - foundImagePath = Path.Combine(directory, files[i].ToString()); - } - i++; - } + // if an image with same name as file was found + if (foundImagePath != string.Empty) + { + fileItem.Imagefile = foundImagePath; + fileItem.Write(); - // if an image with same name as file was found - if (foundImagePath != string.Empty) - { - fileItem.Imagefile = foundImagePath; - fileItem.Write(); - - } - } - } - } - } - } - catch (Exception ee) - { - MessageBox.Show(ee.ToString()); - SetEnabledComponents(true); - } + } + } + } + } + } + } + catch (Exception ee) + { + MessageBox.Show(ee.ToString()); + SetEnabledComponents(true); + } } scanImageDirsButton.Enabled = true; @@ -485,7 +462,7 @@ if (FirstImageDirectoryValid()) { FileInfoScraperForm frmScraper = new FileInfoScraperForm(); - frmScraper.CurApp = currentApplication; + frmScraper.CurApp = currentApplicationItem; frmScraper.Setup(); frmScraper.ShowDialog(this); SyncListView(); @@ -525,13 +502,13 @@ FileItem file = (FileItem)fileListView.SelectedItems[0].Tag; if (file != null) { - // if (file.IsFolder) + // if (file.IsFolder) //{ - //ChangeFilePath(file.Executable); // executable becomes filepath in next view... :) + //ChangeFilePath(file.Executable); // executable becomes filepath in next view... :) //} //else //{ - EditItem(); + EditItem(); //} } } @@ -539,7 +516,7 @@ private void FavouriteGrouperItem_Click(object sender, EventArgs e) { - if (currentApplication == null) + if (currentApplicationItem == null) { return; } @@ -552,19 +529,19 @@ // 'MAME' : targetAppID // 'r-type': fileid // 'top 20 shooters': GrouperAppID; - newLink.AppID = GrouperAppID; // the applicationItem where the link belongs + newLink.ApplicationItemId = GrouperAppID; // the applicationItem where the link belongs newLink.FileID = curFile.FileID; - newLink.TargetAppID = curFile.AppID; // the applicationItem where the launch will effectively happen.... + newLink.TargetAppID = curFile.ApplicationItemId; // the applicationItem where the launch will effectively happen.... newLink.Filename = curFile.Filename; newLink.Write(); - // Log.Info("Add to Favourites groupAppID:{0} Title:{1} fileID:{2} appID:{3}", GrouperAppID, currentFileItem.Title, currentFileItem.FileID, currentFileItem.applicationId); + // Log.Info("Add to Favourites groupAppID:{0} Title:{1} fileID:{2} applicationItemId:{3}", GrouperAppID, currentFileItem.Title, currentFileItem.FileID, currentFileItem.applicationId); } foreach (object app in apps) { if (app is ApplicationItemGrouper) { - ApplicationItemGrouper appi = (ApplicationItemGrouper) app; + ApplicationItemGrouper appi = (ApplicationItemGrouper)app; if (appi.ApplicationItemId == GrouperAppID) { appi.LoadFiles(); @@ -595,7 +572,6 @@ { if (itemString == item.ToString()) { - return true; } } @@ -606,12 +582,12 @@ { if (applicationItem.ImportValidImagesOnly) { - importOptionsCheckedListBox.SetItemChecked(importOptionsCheckedListBox.Items.IndexOf(ImportOptionToString(ImportOption.OnlyImportValidImages)),true); + importOptionsCheckedListBox.SetItemChecked(importOptionsCheckedListBox.Items.IndexOf(ImportOptionToString(ImportOption.OnlyImportValidImages)), true); } if (applicationItem.ImportMameMahjong) { importOptionsCheckedListBox.SetItemChecked(importOptionsCheckedListBox.Items.IndexOf(ImportOptionToString(ImportOption.ImportMahjongGames)), true); - + } if (applicationItem.ImportMamePlaychoice10) { @@ -625,7 +601,6 @@ } } - } public void FillApplicationItem(ApplicationItem applicationItem) @@ -634,29 +609,24 @@ if (!ProgramUtils.UseThumbsDir()) { - applicationItem.ImageDirectory = imageDirsTextBox.Text; + applicationItem.ImageDirectory = (imageDirsTextBox == null) ? "" : imageDirsTextBox.Text; } - applicationItem.FileDirectory = fileDirTextBox.Text; - applicationItem.ValidExtensions = fileExtensionsTextBox.Text; + applicationItem.FileDirectory = (fileDirTextBox == null) ? "" : fileDirTextBox.Text; + applicationItem.ValidExtensions = (fileExtensionsTextBox == null) ? "" : fileExtensionsTextBox.Text; - - if ((currentApplication is ApplicationItemMame) || ((currentApplication is ApplicationItemGameBase))) - { - applicationItem.ImportValidImagesOnly = IsItemChecked(ImportOptionToString(ImportOption.OnlyImportValidImages)); - } + applicationItem.ApplicationItemSource = (gamebaseDBTextBox == null) ? "" : gamebaseDBTextBox.Text; - if ((currentApplication is ApplicationItemMame)) + + applicationItem.ImportValidImagesOnly = IsItemChecked(ImportOptionToString(ImportOption.OnlyImportValidImages)); + + if ((currentApplicationItem is ApplicationItemMame)) { ((ApplicationItemMame)applicationItem).ImportOriginalsOnly = IsItemChecked(ImportOptionToString(ImportOption.OnlyImportOriginals)); applicationItem.ImportMameMahjong = IsItemChecked(ImportOptionToString(ImportOption.ImportMahjongGames)); applicationItem.ImportMamePlaychoice10 = IsItemChecked(ImportOptionToString(ImportOption.ImportPlaychoiceGames)); } - if ((currentApplication is ApplicationItemGameBase)) - { - applicationItem.ApplicationItemSource = this.gamebaseDBTextBox.Text; - } - + } private void AppFilesView_Load(object sender, EventArgs e) @@ -665,13 +635,18 @@ toolTip.SetToolTip(fileDirTextBox, "Directorys where to look for files ,seperate with ; \r\n(mandatory)"); toolTip.SetToolTip(fileExtensionsTextBox, "Only files with matching extensions will be displayed. \r\nSeparate several extension" + "s by a ; (.zip;.txt)\r\n(mandatory)"); + toolTip.SetToolTip(imageDirsTextBox, "Optional directory where MediaPortal searches for matching images. \r\n MediaPort" + "al will cycle through all the directories and display a mini-slideshow of all matching images.Separate with a ;"); + + if(gamebaseDBTextBox != null) + { + toolTip.SetToolTip(gamebaseDBTextBox, "Set the path to your gamebaseDB here"); + } } protected void imageDirButton_Click(object sender, EventArgs e) { - if (imageDirsTextBox.Text != "") { folderBrowserDialog.SelectedPath = imageDirsTextBox.Lines[0]; @@ -696,76 +671,109 @@ public void SetupFileView() { - //by default "dont show these... - - this.gamebaseDBTextBox.Visible = false; - this.gamebaseDBButton.Visible = false; - this.gamebaseLabel.Visible = false; - - //but these.. - + //by default show these... this.scanImageDirsButton.Visible = true; - this.FileSettingsGroupBox.Visible = true; + this.filesettingsPanel.Visible = true; - if (currentApplication != null) + if (currentApplicationItem != null) { - if (ProgramUtils.UseThumbsDir()) - imageDirsTextBox.Text = ProgramUtils.GetApplicationImageFolder(currentApplication); - else - imageDirsTextBox.Text = currentApplication.ImageDirectory; - imageDirsTextBox.ReadOnly = ProgramUtils.UseThumbsDir(); - imageDirButton.Visible = !ProgramUtils.UseThumbsDir(); - - fileDirTextBox.Text = currentApplication.FileDirectory; - fileExtensionsTextBox.Text = currentApplication.ValidExtensions; - - - if ((currentApplication.ImportOptionList != null) && (currentApplication.ImportOptionList.Count > 0)) + //fill import options + if ((currentApplicationItem.ImportOptionList != null) && (currentApplicationItem.ImportOptionList.Count > 0)) { importOptionsCheckedListBox.Items.Clear(); importOptionsCheckedListBox.Visible = true; - foreach (ImportOption importOption in currentApplication.ImportOptionList) + foreach (ImportOption importOption in currentApplicationItem.ImportOptionList) { importOptionsCheckedListBox.Items.Add(ImportOptionToString(importOption)); } - CheckImportOption(currentApplication); + CheckImportOption(currentApplicationItem); } else { importOptionsCheckedListBox.Visible = false; } - if ((currentApplication is ApplicationItemGameBase)) + //fill filesettings// just add them + int yPosition = 10; + if ((currentApplicationItem.FileSettingList != null) && (currentApplicationItem.FileSettingList.Count > 0)) { - this.gamebaseDBTextBox.Visible = true; - this.gamebaseDBButton.Visible = true; - this.gamebaseLabel.Visible = true; - this.gamebaseDBTextBox.Text = currentApplication.ApplicationItemSource; + filesettingsPanel.Controls.Clear(); + filesettingsPanel.Visible = true; + + foreach (FileSettingOption fileSetting in currentApplicationItem.FileSettingList) + { + FileSettingsBox fileSettingBox = new FileSettingsBox(fileSetting); + fileSettingBox.Location = new Point(0, yPosition); + this.filesettingsPanel.Controls.Add(fileSettingBox); + yPosition += 32; + } + SetUpFileSettingsBoxButtonEvents(); } + else + { + filesettingsPanel.Visible = false; + } - if ((currentApplication is ApplicationItemGrouper)) + if (ProgramUtils.UseThumbsDir()) { + imageDirsTextBox.Text = ProgramUtils.GetApplicationImageFolder(currentApplicationItem); + ((FileSettingsBox)imageDirsTextBox.Parent).Button.Visible = !ProgramUtils.UseThumbsDir(); + } + else + imageDirsTextBox.Text = currentApplicationItem.ImageDirectory; + + fileDirTextBox.Text = currentApplicationItem.FileDirectory; + fileExtensionsTextBox.Text = currentApplicationItem.ValidExtensions; + + if ((currentApplicationItem is ApplicationItemGrouper)) + { this.scanImageDirsButton.Visible = false; - this.FileSettingsGroupBox.Visible = false; + this.filesettingsPanel.Visible = false; } + } + } + private void SetUpFileSettingsBoxButtonEvents() + { + foreach (FileSettingsBox fileSettingBox in filesettingsPanel.Controls) + { + switch (fileSettingBox.Button.Name) + { + case "Filefolder(s)" + "Button": + fileDirTextBox = fileSettingBox.TextBox; + fileSettingBox.Button.Click += new EventHandler(fileDirButton_Click); + break; + case "Fileextension(s)" + "Button": + fileExtensionsTextBox = fileSettingBox.TextBox; + fileSettingBox.Button.Click += new EventHandler(this.fileExtensionsbutton_Click); + break; + case "Gamebase DB" + "Button": + gamebaseDBTextBox = fileSettingBox.TextBox; + fileSettingBox.Button.Click += new EventHandler(this.gamebaseDBButton_Click); + break; + case "Imagefolder(s)" + "Button": + imageDirsTextBox = fileSettingBox.TextBox; + fileSettingBox.Button.Click += new EventHandler(this.imageDirButton_Click); + break; + default: + break; + } } - } protected void fileDirButton_Click(object sender, EventArgs e) { - folderBrowserDialog.SelectedPath = this.fileDirTextBox.Text; + folderBrowserDialog.SelectedPath = fileDirTextBox.Text; + if (folderBrowserDialog.ShowDialog(null) == DialogResult.OK) { if (fileDirTextBox.Text == "") { - this.fileDirTextBox.Text = folderBrowserDialog.SelectedPath; - + fileDirTextBox.Text = folderBrowserDialog.SelectedPath; } else { - this.fileDirTextBox.Text = fileDirTextBox.Text + ";" + folderBrowserDialog.SelectedPath; + fileDirTextBox.Text = fileDirTextBox.Text + ";" + folderBrowserDialog.SelectedPath; } } } @@ -828,13 +836,11 @@ List<string> pathIniList = new List<string>(); string line; - if (File.Exists(this.gamebaseDBTextBox.Text)) + if (File.Exists(gamebaseDBTextBox.Text)) { string pathIniFile = Path.GetDirectoryName(gamebaseDBTextBox.Text) + "\\Paths.ini"; if (File.Exists(pathIniFile)) { - - using (StreamReader streamReader = File.OpenText(pathIniFile)) { while ((line = streamReader.ReadLine()) != null) @@ -911,8 +917,8 @@ { gamebaseDBTextBox.Text = openFileDialog.FileName; } + SetSourceDirectories(); - } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx 2007-08-21 23:00:30 UTC (rev 851) @@ -175,13 +175,13 @@ <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>353, 17</value> </metadata> - <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>353, 17</value> - </metadata> <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>443, 17</value> </metadata> <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>606, 17</value> </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>52</value> + </metadata> </root> \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -112,21 +112,21 @@ // set tooltip-stuff..... toolTip.SetToolTip(titleTextBox, "This text will appear in the listitem of MediaPortal\r\n(mandatory)"); - toolTip.SetToolTip(shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + + toolTip.SetToolTip(shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific fileItem-" + "extension.\r\n Omit the \"Launching Application\" in this case."); toolTip.SetToolTip(quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid double" + " quotes though!"); toolTip.SetToolTip(startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FILEDIR" + - "% if you want to use the directory where the launched file is stored)"); + "% if you want to use the directory where the launched fileItem is stored)"); toolTip.SetToolTip(winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless integr" + "ation in MediaPortal"); toolTip.SetToolTip(applicationArgumentsTextBox, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use %FIL" + "E% if the filename needs to be placed in some specific place between several arg" + "uments)"); toolTip.SetToolTip(applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); toolTip.SetToolTip(enabledCheckbox, "Only enabled items will appear in MediaPortal"); toolTip.SetToolTip(applicationExeTextBox, "Program you wish to execute, include the full path (mandatory if ShellExecute is " + "OFF)"); - toolTip.SetToolTip(allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal."); - toolTip.SetToolTip(this.preCommandTextBox, "Configure an command to run as pre of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); + toolTip.SetToolTip(allowRefreshCheckBox, "If you want to be able to run the import through the REFRESH button in MediaPortal."); + toolTip.SetToolTip(preCommandTextBox, "Configure an command to run as pre of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); toolTip.SetToolTip(postCommandTextBox, "Configure an command to run as post of the main filelaunching ie explorer; joy2key; etc .Separate with ;."); - + toolTip.SetToolTip(waitExitCheckBox, "If you want mediaportal to wait for exit while running application."); } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -42,7 +42,7 @@ // // shellexecuteCheckBox // - this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + + this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific fileItem-" + "extension.\r\nYou can omit the \"Launching Application\" in this case."); // // applicationArgumentsLabel Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -42,7 +42,7 @@ // shellexecuteCheckBox // this.shellexecuteCheckBox.Location = new System.Drawing.Point(7, 338); - this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + + this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific fileItem-" + "extension.\r\nYou can omit the \"Launching Application\" in this case."); // // waitExitCheckBox Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.Designer.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.Designer.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -40,7 +40,7 @@ // // shellexecuteCheckBox // - this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + + this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific fileItem-" + "extension.\r\nYou can omit the \"Launching Application\" in this case."); // // applicationArgumentsLabel @@ -61,7 +61,7 @@ // startupDirTextBox // this.toolTip.SetToolTip(this.startupDirComboBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + - "EDIR% if you want to use the directory where the launched file is stored)"); + "EDIR% if you want to use the directory where the launched fileItem is stored)"); // // quoteCheckBox // Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -45,7 +45,7 @@ // // shellexecuteCheckBox // - this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + + this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific fileItem-" + "extension.\r\nYou can omit the \"Launching Application\" in this case."); // // applicationArgumentsLabel Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -94,7 +94,7 @@ this.buttonViewImg.Name = "buttonViewImg"; this.buttonViewImg.Size = new System.Drawing.Size(31, 23); this.buttonViewImg.TabIndex = 64; - this.toolTip1.SetToolTip(this.buttonViewImg, "View the default image for this file"); + this.toolTip1.SetToolTip(this.buttonViewImg, "View the default image for this fileItem"); this.buttonViewImg.UseVisualStyleBackColor = true; this.buttonViewImg.Click += new System.EventHandler(this.buttonViewImg_Click); // Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -46,13 +46,13 @@ private ConditionChecker conditionChecker; - public ApplicationItem CurApp + public ApplicationItem CurrentApplicationItem { get { return m_CurApp; } set { m_CurApp = value; } } - public FileItem CurFile + public FileItem CurrentFileItem { get { return m_CurFile; } set { m_CurFile = value; } @@ -68,13 +68,13 @@ private void updateDisplay() { - gbFileDetails.Text = CurApp.Title + ": " + CurFile.Title; + gbFileDetails.Text = CurrentApplicationItem.Title + ": " + CurrentFileItem.Title; txtTitle.Text = m_CurFile.Title; txtFilename.Text = m_CurFile.Filename; if (ProgramUtils.UseThumbsDir()) { - txtImageFile.Text = ProgramUtils.GetFileImage(CurApp, CurFile); + txtImageFile.Text = ProgramUtils.GetFileImage(CurrentApplicationItem, CurrentFileItem); } else { @@ -82,7 +82,7 @@ } FileItemToGenre(); - manufacturerComboBox.SelectedValue = CurFile.ManufacturerId; + manufacturerComboBox.SelectedValue = CurrentFileItem.ManufacturerId; //txtManufacturer.Text = m_CurFile.Manufacturer; txtYear.Text = m_CurFile.Year.ToString(); @@ -215,7 +215,7 @@ private bool EntriesOK() { conditionChecker.Clear(); - conditionChecker.DoCheck(CurFile.Title != "", "No title entered!"); + conditionChecker.DoCheck(CurrentFileItem.Title != "", "No title entered!"); //01.04.05 no executable is FINE :-) conditionChecker.DoCheck(CurFile.Executable != "", "No executable entered!"); if (!conditionChecker.IsOk) { @@ -228,29 +228,29 @@ void FileItemToGenre() { - genreComboBox.SelectedValue = CurFile.GenreId; - genreStyleComboBox.SelectedValue = CurFile.GenreStyleId; - manufacturerComboBox.SelectedValue = CurFile.ManufacturerId; - systemComboBox.SelectedValue = CurFile.PlatformId; + genreComboBox.SelectedValue = CurrentFileItem.GenreId; + genreStyleComboBox.SelectedValue = CurrentFileItem.GenreStyleId; + manufacturerComboBox.SelectedValue = CurrentFileItem.ManufacturerId; + systemComboBox.SelectedValue = CurrentFileItem.PlatformId; } private void btnOk_Click(object sender, EventArgs e) { - CurFile.Title = txtTitle.Text; - CurFile.Filename = txtFilename.Text; + CurrentFileItem.Title = txtTitle.Text; + CurrentFileItem.Filename = txtFilename.Text; if (!ProgramUtils.UseThumbsDir()) - CurFile.Imagefile = txtImageFile.Text; + CurrentFileItem.Imagefile = txtImageFile.Text; // CurFile.Genre = genreComboBox.SelectedText; - CurFile.GenreId = (int)genreComboBox.SelectedValue; + CurrentFileItem.GenreId = (int)genreComboBox.SelectedValue; //CurFile.GenreStyle = genreStyleComboBox.SelectedText; - CurFile.GenreStyleId = (int)genreStyleComboBox.SelectedValue; - CurFile.ManufacturerId = (int)manufacturerComboBox.SelectedValue; - CurFile.Year = ProgramUtils.StringToInteger(txtYear.Text, -1); - CurFile.Rating = cbRating.SelectedIndex; - CurFile.Country = txtCountry.Text; - CurFile.PlatformId = (int)systemComboBox.SelectedValue; - CurFile.Overview = txtOverview.Text; - CurFile.GameInfoURL = this.gameinfoURLTextBox.Text; + CurrentFileItem.GenreStyleId = (int)genreStyleComboBox.SelectedValue; + CurrentFileItem.ManufacturerId = (int)manufacturerComboBox.SelectedValue; + CurrentFileItem.Year = ProgramUtils.StringToInteger(txtYear.Text, -1); + CurrentFileItem.Rating = cbRating.SelectedIndex; + CurrentFileItem.Country = txtCountry.Text; + CurrentFileItem.PlatformId = (int)systemComboBox.SelectedValue; + CurrentFileItem.Overview = txtOverview.Text; + CurrentFileItem.GameInfoURL = this.gameinfoURLTextBox.Text; if (EntriesOK()) { this.DialogResult = DialogResult.OK; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-21 18:41:02 UTC (rev 850) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-08-21 23:00:30 UTC (rev 851) @@ -347,7 +347,7 @@ strTimeRemaining = String.Format(" ({0}m {1}s remaining)", nMinutesRemaining, nSecondsRemaining); } - toolStripStatusLabel... [truncated message content] |
From: <nor...@us...> - 2007-08-28 11:15:31
|
Revision: 874 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=874&view=rev Author: northern_sky Date: 2007-08-28 04:15:21 -0700 (Tue, 28 Aug 2007) Log Message: ----------- Fixed sort for appitems, updated readme with final to-do's Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-27 23:31:18 UTC (rev 873) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-08-28 11:15:21 UTC (rev 874) @@ -54,7 +54,7 @@ shellexecuteCheckBox.Checked = applicationItem.UseShellExecute; quoteCheckBox.Checked = applicationItem.UseQuotes; waitExitCheckBox.Checked = (applicationItem.WaitForExit); - allowGUIImportCheckBox.Checked = applicationItem.RefreshGUIAllowed; + allowGUIImportCheckBox.Checked = applicationItem.ReimportFromGUIAllowed; if (applicationItem.PlatformId != 0) { platformComboBox.SelectedValue = applicationItem.PlatformId; @@ -76,7 +76,7 @@ curApp.UseQuotes = quoteCheckBox.Checked; curApp.WaitForExit = waitExitCheckBox.Checked; curApp.Item_Type = ItemType.DIRCACHE; - curApp.RefreshGUIAllowed = allowGUIImportCheckBox.Checked; + curApp.ReimportFromGUIAllowed = allowGUIImportCheckBox.Checked; curApp.PlatformId = (int)platformComboBox.SelectedValue; } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-27 23:31:18 UTC (rev 873) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-08-28 11:15:21 UTC (rev 874) @@ -53,7 +53,7 @@ this.startupDirComboBox.Text = curApp.StartupDir; this.quoteCheckBox.Checked = true; //(applicationItem.UseQuotes); this.waitExitCheckBox.Checked = (curApp.WaitForExit); - this.allowGUIImportCheckBox.Checked = curApp.RefreshGUIAllowed; + this.allowGUIImportCheckBox.Checked = curApp.ReimportFromGUIAllowed; } public override void SaveSettings(ApplicationItem curApp) @@ -65,7 +65,7 @@ curApp.UseQuotes = this.quoteCheckBox.Checked; curApp.WaitForExit = this.waitExitCheckBox.Checked; curApp.Item_Type = ItemType.GAMEBASE; - curApp.RefreshGUIAllowed = this.allowGUIImportCheckBox.Checked; + curApp.ReimportFromGUIAllowed = this.allowGUIImportCheckBox.Checked; } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs 2007-08-27 23:31:18 UTC (rev 873) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs 2007-08-28 11:15:21 UTC (rev 874) @@ -56,7 +56,7 @@ base.SaveSettings(curApp); curApp.Item_Type = ItemType.MAMEDIRECT; - curApp.RefreshGUIAllowed = true; + curApp.ReimportFromGUIAllowed = true; } public override bool ValidateEntries(ApplicationItem curApp) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-08-27 23:31:18 UTC (rev 873) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-08-28 11:15:21 UTC (rev 874) @@ -61,7 +61,7 @@ { #region Variables - + bool currentSortAsc = true; ProgramViewHandler viewHandler = ProgramViewHandler.Instance; List<ApplicationItem> globalApplicationList;// dbHandlerInstance.ApplicationItemList; @@ -74,7 +74,7 @@ ProgramSort.SortMethod currentSortMethod = ProgramSort.SortMethod.Title; DatabaseHandler dbHandlerInstance = DatabaseHandler.DBHandlerInstance; - ApplicationItem currentApplicationItem = null; + ApplicationItem currentApplicationItem = null; string prevFilepath = ""; int selectedItemIndex = -1; Layout currentLayout = Layout.List; @@ -95,8 +95,8 @@ [SkinControl(50)] protected GUIFacadeControl facadeView = null; - + #endregion Variables #region Constructor / Destructor @@ -267,10 +267,10 @@ if (currentApplicationItem == null) {//create a fake tmpappitem so it's not null - currentApplicationItem = new ApplicationItemGrouper(); + currentApplicationItem = new ApplicationItemGrouper(); } currentApplicationItem.ApplicationItemId = xmlreader.GetValueAsInt("myProgramsAlt", "applicationItemId", -1); - + ViewHandler.CurrentLevel = xmlreader.GetValueAsInt("myProgramsAlt", "lastViewLevel", -1); CurrentSortAsc = xmlreader.GetValueAsBool("myProgramsAlt", "sortASC", true); ViewHandler.CurrentView = xmlreader.GetValueAsString("myProgramsAlt", "view", ""); @@ -297,7 +297,7 @@ } else { - btnReimport.IsVisible = currentApplicationItem.RefreshGUIAllowed; + btnReimport.IsVisible = currentApplicationItem.ReimportFromGUIAllowed; } facadeView.IsVisible = true; @@ -351,6 +351,7 @@ case ProgramSort.SortMethod.Platform: sortBy = "Sort by: Platform"; //tmp break; + } if (btnSortBy != null) @@ -402,7 +403,7 @@ // some preconditions... if (selectedGUIListItem == null) return; if (currentApplicationItem == null) return; - + ThumbnailPath = ""; if (selectedGUIListItem.ThumbnailImage != "" && selectedGUIListItem.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png" @@ -803,6 +804,27 @@ } } + + bool DoesListOnlyContainsItemOfType<T>() + { + bool onlyContainsType = true; + + GUIListItem item = null; + if (facadeView != null) + { + for (int i = 0; i < facadeView.Count; ++i) + { + item = facadeView[i]; + if ((item.MusicTag != null) && !(item.MusicTag is T)) + { + return (onlyContainsType = false); + } + + } + } + return onlyContainsType; + } + void SelectSortMethod() { GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); @@ -812,14 +834,18 @@ dlg.Reset(); dlg.SetHeading(495); + dlg.AddLocalizedString(268); // title - dlg.AddLocalizedString(363); // filename - dlg.AddLocalizedString(367); // rating - dlg.Add("Sort by: Times launched");//"LaunchCount"//whats the mapping to these??? - dlg.Add("Sort by: Date launched"); - dlg.Add("Sort by: Platform"); + + if (DoesListOnlyContainsItemOfType<FileItem>()) + { + dlg.AddLocalizedString(363); // filename + dlg.AddLocalizedString(367); // rating + dlg.Add("Sort by: Times launched");//"LaunchCount"//whats the mapping to these??? + dlg.Add("Sort by: Date launched"); + dlg.Add("Sort by: Platform"); + } - dlg.DoModal(GetID); if (dlg.SelectedLabel == -1) @@ -937,11 +963,11 @@ ViewHandler.CurrentView = selectedView.Name; - if (facadeView.Count <= 0) - { - GUIControl.FocusControl(GetID, btnViewAs.GetID); - } - + if (facadeView.Count <= 0) + { + GUIControl.FocusControl(GetID, btnViewAs.GetID); + } + } UpdateButtonStates(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-27 23:31:18 UTC (rev 873) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-08-28 11:15:21 UTC (rev 874) @@ -204,7 +204,7 @@ set { enabled = value; } } - public bool RefreshGUIAllowed + public bool ReimportFromGUIAllowed { get { return refreshGUIAllowed; } set { refreshGUIAllowed = value; } @@ -757,7 +757,7 @@ parameterArray[15] = dbHandlerInstance.GetParameter<bool>(ImportValidImagesOnly, "@importValidImagesOnly", DbType.Boolean); parameterArray[16] = dbHandlerInstance.GetParameter<int>(Position, "@position", DbType.Int32); parameterArray[17] = dbHandlerInstance.GetParameter<bool>(Enabled, "@enabled", DbType.Boolean); - parameterArray[18] = dbHandlerInstance.GetParameter<bool>(RefreshGUIAllowed, "@refreshGUIAllowed", DbType.Boolean); + parameterArray[18] = dbHandlerInstance.GetParameter<bool>(ReimportFromGUIAllowed, "@refreshGUIAllowed", DbType.Boolean); parameterArray[19] = dbHandlerInstance.GetParameter<int>(PlatformId, "@platformId", DbType.Int32); parameterArray[20] = dbHandlerInstance.GetParameter<bool>(WaitForExit, "@waitForExit", DbType.Boolean); parameterArray[21] = dbHandlerInstance.GetParameter<string>(PreLaunch, "@preLaunch", DbType.String); @@ -855,7 +855,7 @@ parameterArray[15] = dbHandlerInstance.GetParameter<bool>(ImportValidImagesOnly, "@importValidImagesOnly", DbType.Boolean); parameterArray[16] = dbHandlerInstance.GetParameter<int>(Position, "@position", DbType.Int32); parameterArray[17] = dbHandlerInstance.GetParameter<bool>(Enabled, "@enabled", DbType.Boolean); - parameterArray[18] = dbHandlerInstance.GetParameter<bool>(RefreshGUIAllowed, "@refreshGUIAllowed", DbType.Boolean); + parameterArray[18] = dbHandlerInstance.GetParameter<bool>(ReimportFromGUIAllowed, "@refreshGUIAllowed", DbType.Boolean); parameterArray[19] = dbHandlerInstance.GetParameter<int>(PlatformId, "@platformId", DbType.Int32); parameterArray[20] = dbHandlerInstance.GetParameter<bool>(WaitForExit, "@waitForExit", DbType.Boolean); parameterArray[21] = dbHandlerInstance.GetParameter<string>(PreLaunch, "@preLaunch", DbType.String); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs 2007-08-27 23:31:18 UTC (rev 873) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs 2007-08-28 11:15:21 UTC (rev 874) @@ -122,7 +122,7 @@ item.ValidExtensions = (string)dataReader["validextensions"]; item.ImportValidImagesOnly =(bool) dataReader["importvalidimagesonly"]; item.Position = Convert.ToInt32(dataReader["iposition"]); - item.RefreshGUIAllowed = (bool) dataReader["refreshGUIAllowed"]; + item.ReimportFromGUIAllowed = (bool) dataReader["refreshGUIAllowed"]; item.PlatformId = Convert.ToInt32(dataReader["platformId"]); item.WaitForExit =(bool) dataReader["waitforexit"]; item.PreLaunch = (string) dataReader["preLaunch"]; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs 2007-08-27 23:31:18 UTC (rev 873) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs 2007-08-28 11:15:21 UTC (rev 874) @@ -68,66 +68,86 @@ if (item2 == null) return -1; if (item1.MusicTag == null) return -1; if (item2.MusicTag == null) return -1; - - - - if (item1.MusicTag.GetType().BaseType.Name == "ApplicationItem") return -1;//quick fix for not allowing applicationsitems... - if (item2.MusicTag.GetType().BaseType.Name == "ApplicationItem") return -1;//quick fix for not allowing applicationsitems... - if (item1.MusicTag.GetType().Name == "FilterItem") return -1;//quick fix for not allowing filteritems... if (item2.MusicTag.GetType().Name == "FilterItem") return -1;//quick fix for not allowing filteritems... - + if (item1.Label == "..") return -1; // if the .. item has no musicTag then, it is already catched at the beginning of this method if (item2.Label == "..") return -1; + + //applicationitem sort only allows by title for now + if ((item1.MusicTag is ApplicationItem) && (item2.MusicTag is ApplicationItem)) + + { + ApplicationItem Item1 = item1.MusicTag as ApplicationItem; + ApplicationItem Item2 = item2.MusicTag as ApplicationItem; + + switch (currentSortMethod) + { + case SortMethod.Title: + if (sortAscending) + return String.Compare(Item1.Title, Item2.Title, true); + else + return String.Compare(Item2.Title, Item1.Title, true); + default: + return -1; + } + } + + + string strSize1 = ""; string strSize2 = ""; if (item1.FileInfo != null) strSize1 = MediaPortal.Util.Utils.GetSize(item1.FileInfo.Length); if (item2.FileInfo != null) strSize2 = MediaPortal.Util.Utils.GetSize(item2.FileInfo.Length); + //fileitem sort + if ((item1.MusicTag is FileItem) && (item2.MusicTag is FileItem)) + { + FileItem fileItem1 = item1.MusicTag as FileItem; + FileItem fileItem2 = item2.MusicTag as FileItem; + if (fileItem1 == null) return -1; + if (fileItem2 == null) return -1; - FileItem fileItem1 = item1.MusicTag as FileItem; - FileItem fileItem2 = item2.MusicTag as FileItem; - if (fileItem1 == null) return -1; - if (fileItem2 == null) return -1; + switch (currentSortMethod) + { + case SortMethod.Title: + if (sortAscending) + return String.Compare(fileItem1.Title, fileItem2.Title, true); + else + return String.Compare(fileItem2.Title, fileItem1.Title, true); - switch (currentSortMethod) - { - case SortMethod.Title: - if (sortAscending) - return String.Compare(fileItem1.Title, fileItem2.Title, true); - else - return String.Compare(fileItem2.Title, fileItem1.Title, true); + case SortMethod.Filename: + if (sortAscending) + return String.Compare(fileItem1.filePath, fileItem2.filePath, true); + else + return String.Compare(fileItem2.filePath, fileItem1.filePath, true); - case SortMethod.Filename: - if (sortAscending) - return String.Compare(fileItem1.filePath, fileItem2.filePath, true); - else - return String.Compare(fileItem2.filePath, fileItem1.filePath, true); + case SortMethod.Rating: + if (sortAscending) + return fileItem1.Rating.CompareTo(fileItem2.Rating); + else + return fileItem2.Rating.CompareTo(fileItem1.Rating); - case SortMethod.Rating: - if (sortAscending) - return fileItem1.Rating.CompareTo(fileItem2.Rating); - else - return fileItem2.Rating.CompareTo(fileItem1.Rating); + case SortMethod.LaunchCount: + if (sortAscending) + return fileItem1.LaunchCount.CompareTo(fileItem2.LaunchCount); + else + return fileItem2.LaunchCount.CompareTo(fileItem1.LaunchCount); - case SortMethod.LaunchCount: - if (sortAscending) - return fileItem1.LaunchCount.CompareTo(fileItem2.LaunchCount); - else - return fileItem2.LaunchCount.CompareTo(fileItem1.LaunchCount); + case SortMethod.LastTimeLaunched: + if (sortAscending) + return DateTime.Compare(fileItem1.LastTimeLaunched, fileItem2.LastTimeLaunched); + else + return DateTime.Compare(fileItem2.LastTimeLaunched, fileItem1.LastTimeLaunched); - case SortMethod.LastTimeLaunched: - if (sortAscending) - return DateTime.Compare(fileItem1.LastTimeLaunched, fileItem2.LastTimeLaunched); - else - return DateTime.Compare(fileItem2.LastTimeLaunched, fileItem1.LastTimeLaunched); - - case SortMethod.Platform: - if (sortAscending) - return String.Compare(fileItem1.Platform, fileItem2.Platform, true); - else - return String.Compare(fileItem2.Platform, fileItem1.Platform, true); + case SortMethod.Platform: + if (sortAscending) + return String.Compare(fileItem1.Platform, fileItem2.Platform, true); + else + return String.Compare(fileItem2.Platform, fileItem1.Platform, true); + } + return 0; } return 0; } Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-08-27 23:31:18 UTC (rev 873) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-08-28 11:15:21 UTC (rev 874) @@ -32,9 +32,18 @@ ---------------- Testing,bugfixing,codecleanup -Optimize some things if possibly -- for example, try gamebase with 10000 items.. +-Optimize some things if possibly +-Change graphics for fileinfobackground (it says mymovies...) + +-Add sort for filteritems too. + +-Fix brokenprogressdialogs in gui reimport + +-Allow the amg best match update from fileinfo window for fileitem + + BUGS: - Just add em... @@ -49,10 +58,7 @@ .: Things to clear :. --------------------- -Name: -MyEmu...? - Add some more specific emulator support.. - using emulator ids??? yes at some point. this could benefit automatic downloads etc - easier application image assigning together with thumbsdir -> we also could provide icons for most common system This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-09-03 19:59:19
|
Revision: 890 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=890&view=rev Author: northern_sky Date: 2007-09-03 12:59:11 -0700 (Mon, 03 Sep 2007) Log Message: ----------- fixed import from gui and progressDialog Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/DirectoryImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/ImportBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/README.txt Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/FileReadEventArgs.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -353,6 +353,7 @@ } public object ExecuteStmtScalar(string stmt) + { object o = null; try Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -89,7 +89,7 @@ this.progressTextBox.Text = ""; System.Windows.Forms.Application.DoEvents(); // make sure the title caption appears.... - CurApp.OnRefreshInfo += new ApplicationItem.RefreshInfoEventHandler(RefreshInfo); + //----------- CurApp.OnRefreshInfoEvent += new ApplicationItem.RefreshInfoEventHandler(RefreshInfo); //backgroundWorker.ReportProgress(10); try { @@ -99,7 +99,7 @@ } finally { - CurApp.OnRefreshInfo -= new ApplicationItem.RefreshInfoEventHandler(RefreshInfo); + //--------- CurApp.OnRefreshInfoEvent -= new ApplicationItem.RefreshInfoEventHandler(RefreshInfo); this.Text = "Import finished."; progressTextBox.Text = importFinishedText; isImportRunning = false; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -1086,11 +1086,9 @@ { if (currentApplicationItem != null) { + currentApplicationItem.ImportFinishedEvent += new ApplicationItem.ImportFinishedEventHandler(currentApplicationItem_ImportFinishedEvent); currentApplicationItem.Refresh(true); - prevFilepath = currentApplicationItem.DefaultFilepath(); - // todo: reset viewHandler - UpdateButtonStates(); - UpdateListControl(); + } } else if (control == btnViews) @@ -1111,6 +1109,14 @@ } } + void currentApplicationItem_ImportFinishedEvent(object sender, EventArgs e) + { + prevFilepath = currentApplicationItem.DefaultFilepath(); + // todo: reset viewHandler + UpdateButtonStates(); + UpdateListControl(); + } + protected override void OnShowContextMenu() { GUIListItem item = facadeView.SelectedListItem; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-09-03 19:59:11 UTC (rev 890) @@ -144,6 +144,7 @@ <Compile Include="GUIProgramsAltFileInfo.cs" /> <Compile Include="Imports\AllGameScraper.cs" /> <Compile Include="Imports\DirectoryImport.cs" /> + <Compile Include="Imports\FileReadEventArgs.cs" /> <Compile Include="Imports\GamebaseImport.cs" /> <Compile Include="Imports\ImportBase.cs" /> <Compile Include="Imports\MameImport.cs" /> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/DirectoryImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/DirectoryImport.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/DirectoryImport.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -22,15 +22,9 @@ public DirectoryImport(ApplicationItem objApp) { applicationItem = objApp; - OnReadNewFile += new MyEventHandler(applicationItem.ReadNewFile); } - public void DeInit() - { - OnReadNewFile -= new MyEventHandler(applicationItem.ReadNewFile); - } - private void ImportFileItem(FileInfo fileInfo) { FileItem curFile = new FileItem(); @@ -55,48 +49,57 @@ private void DeleteOrphaned() { - string TheFileName; - foreach (FileItem DBfile in applicationItem.ItemList) + + for (int i = 0; i < applicationItem.ItemList.Count; i++) { + FileItem fileItem = null; - TheFileName = DBfile.Filename; + if (applicationItem.ItemList[i] is FileItem) + { + fileItem = (FileItem) applicationItem.ItemList[i]; + if (!File.Exists(fileItem.Filename)) + { + fileItem.Delete(); + } - //if (!DBfile.IsFolder) - //{ - if (!File.Exists(TheFileName)) { DBfile.Delete(); } - //} - //else - //{ - //if (!Directory.Exists(TheFileName)) { DBfile.Delete(); } - - //} - + } } } - private void ImportFile(string dirPath, bool mpGuiMode) + private void ImportFile(string dirPath) { - + double total = 0; FileInfo fileInDir = null; if (Directory.Exists(dirPath)) { DirectoryInfo directoryInfo = new DirectoryInfo(dirPath); FileSystemInfo[] allUnderLyingFiles = directoryInfo.GetFileSystemInfos(); - + total = allUnderLyingFiles.Length; + for (int i = 0; i < allUnderLyingFiles.Length; i++) { + + OnReadNewFileEvent(this, new FileReadEventArgs((int)(100 * (((double) i ) / total)), "Importing from directory " + dirPath)); + if (allUnderLyingFiles[i] is FileInfo) { Boolean FileExists = false; fileInDir = (FileInfo)allUnderLyingFiles[i]; - foreach (FileItem DBfile in applicationItem.ItemList) + for (int j = 0; j < applicationItem.ItemList.Count; j++) { - if (DBfile.Filename == fileInDir.FullName) + FileItem fileItem = null; + + if (applicationItem.ItemList[j] is FileItem) { - FileExists = true; - break;//ugly + fileItem = (FileItem)applicationItem.ItemList[j]; + if(fileItem.Filename == fileInDir.FullName) + { + + FileExists = true; + break;//ugly + } } } if (!FileExists) @@ -108,23 +111,26 @@ else if (allUnderLyingFiles[i] is DirectoryInfo) { DirectoryInfo directory = (DirectoryInfo)allUnderLyingFiles[i]; - ImportFile(directory.FullName, mpGuiMode); + ImportFile(directory.FullName); } } } } - public void StartImport(string[] fileDirPaths, bool mpGuiMode) + public void StartImport() { + string[] fileDirPaths = this.applicationItem.FileDirectory.Split(';'); + using (SQLiteTransaction transaction = dbHandlerInstance.SqlLiteConn.BeginTransaction()) { DeleteOrphaned(); //get all maindirs foreach (string dirPath in fileDirPaths) { - ImportFile(dirPath, mpGuiMode); + ImportFile(dirPath); } transaction.Commit(); + OnReadNewFileEvent(this, new FileReadEventArgs(100, "Import done...................")); } } } Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/FileReadEventArgs.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/FileReadEventArgs.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/FileReadEventArgs.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace GUIProgramsAlt.Imports +{ + public class FileReadEventArgs + { + + public FileReadEventArgs(int ctr, string message) + { + this.ctr = ctr; + this.message = message; + } + public readonly int ctr; + public readonly string message; + } +} Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -47,15 +47,9 @@ public GamebaseImport(ApplicationItem objApp) { applicationItem = objApp; - OnReadNewFile += new MyEventHandler(applicationItem.ReadNewFile); } - public void DeInit() - { - OnReadNewFile -= new MyEventHandler(applicationItem.ReadNewFile); - } - void DBImportGamebaseItem(OleDbDataReader myReader, string romFilename, string imgFilename, int curPos, int maxGames) { @@ -95,10 +89,7 @@ curFile.LastTimeLaunched = DateTime.MinValue; curFile.LaunchCount = 0; curFile.Write(); - //this.OnReadNewFile(curFile.Title, curPos, maxGames); // send event to whom it may concern.... - //this.OnReadNewFile(curFile.Title, (int)(100 * (((double)curPos) / maxGames))); - SendDisplayText(curFile.Title, (int)(100 * (((double)curPos) / maxGames))); - return; + return; } public void StartImport() @@ -198,9 +189,13 @@ { Log.Info("*missing* gamebase game {0}", curRomname); } + OnReadNewFileEvent(this, new FileReadEventArgs((int)(100 * (((double)i) / maxGames)), "Importing " + curRomname)); + } } transaction.Commit(); + OnReadNewFileEvent(this, new FileReadEventArgs(100, "Import done")); + } } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/ImportBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/ImportBase.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/ImportBase.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -4,24 +4,33 @@ using System.IO; using GUIProgramsAlt.Items; +using GUIProgramsAlt; + namespace GUIProgramsAlt.Imports { public abstract class ImportBase { // event: read new file - protected delegate void MyEventHandler(string informationMessage, int progressBarCtr); + public delegate void ReadNewFileEventHandler(object sender, FileReadEventArgs e); + public event ReadNewFileEventHandler ReadNewFileEvent = null; - protected event MyEventHandler OnReadNewFile = null; - protected void SendDisplayText(string displayText, int progressBarCtr) + protected void OnReadNewFileEvent(object sender,FileReadEventArgs e) { - if (OnReadNewFile != null) + if (ReadNewFileEvent != null) { - OnReadNewFile(displayText, progressBarCtr); + ReadNewFileEvent(sender,e); } } + public virtual void startImport() + { + + //override + + } + protected string ImportImageFiles(string fileName, string fileTitle,ApplicationItem applicationItem) { string thumb = ""; @@ -71,6 +80,5 @@ } return thumb; } - } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -74,20 +74,14 @@ public MameImport(ApplicationItem applicationItem) { currentApplication = applicationItem; - OnReadNewFile += new MyEventHandler(currentApplication.ReadNewFile); } - public void DeInit() - { - OnReadNewFile -= new MyEventHandler(currentApplication.ReadNewFile); - } - void ReadListFull() { fullRomListDictionary.Clear(); string line = string.Empty; - SendDisplayText("generating mame list (full)", 10); + OnReadNewFileEvent(this,new FileReadEventArgs(10,"generating mame list (full)")); using (Process process = new Process()) { @@ -120,7 +114,7 @@ string line; if (((ApplicationItemMame)currentApplication).ImportOriginalsOnly) { - SendDisplayText("generating mame list (clones)", 20); + OnReadNewFileEvent(this,new FileReadEventArgs(20,"generating mame list (clones)")); using (Process process = new Process()) { @@ -251,18 +245,18 @@ if (conditionChecker.IsOk) { - SendDisplayText("Generating lists...", 0); + OnReadNewFileEvent(this,new FileReadEventArgs(0,"Generating lists...")); ReadListFull(); - SendDisplayText("Generating lists.....", 0); + OnReadNewFileEvent(this,new FileReadEventArgs(0,"Generating lists.....")); ReadListClones(); if (System.IO.File.Exists(catverIniFile)) { - SendDisplayText("Reading catver.ini.......", 0); + OnReadNewFileEvent(this,new FileReadEventArgs(0,"Reading catver.ini.......")); ReadCatverIni(); } if (System.IO.File.Exists(historyDatFile)) { - SendDisplayText("Reading history.dat............", 0); + OnReadNewFileEvent(this,new FileReadEventArgs(0,"Reading history.dat............")); ReadHistoryDat(); } @@ -286,7 +280,7 @@ { if (!CheckPrerequisites()) { - SendDisplayText(conditionChecker.Problems, 0); + OnReadNewFileEvent(this,new FileReadEventArgs(0,conditionChecker.Problems)); Log.Info("MameImporter: import failed! Details: {0}", conditionChecker.Problems); return; } @@ -304,7 +298,7 @@ transaction.Commit(); } - SendDisplayText("Import done...................", 100); + OnReadNewFileEvent(this,new FileReadEventArgs(100,"Import done...................")); } @@ -354,7 +348,7 @@ if ((curFile.Imagefile == "") && (currentApplication.ImportValidImagesOnly)) { - SendDisplayText("", (int)(100 * (((double)count) / total))); + OnReadNewFileEvent(this,new FileReadEventArgs( (int)(100 * (((double)count) / total)),"")); return; } if (this.fullRomListDictionary.ContainsKey(curRomname)) @@ -409,8 +403,8 @@ curFile.Rating = 5; curFile.Write(); - // OnReadNewFile(curFile.Title, count, localRomNames.Length); - SendDisplayText(curFile.Title, (int)(100 * (((double)count) / total))); + // OnReadNewFileEvent(curFile.Title, count, localRomNames.Length); + OnReadNewFileEvent(this,new FileReadEventArgs((int)(100 * (((double)count) / total)),curFile.Title) ); } } @@ -418,7 +412,7 @@ } else { - SendDisplayText("", (int)(100 * (((double)count) / total))); + OnReadNewFileEvent(this,new FileReadEventArgs((int)(100 * (((double)count) / total)),"") ); } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -41,6 +41,7 @@ using MediaPortal.Util; using GUIProgramsAlt; +using GUIProgramsAlt.Imports; using GUIProgramsAlt.Database; using GUIProgramsAlt.Items; @@ -52,13 +53,44 @@ { #region Events/Delegates - public delegate void FilelinkLaunchEventHandler(FilelinkItem curLink, bool mpGuiMode); - public event FilelinkLaunchEventHandler OnLaunchFilelink = null; + // public delegate void FilelinkLaunchEventHandler(FilelinkItem curLink, bool mpGuiMode); + // public event FilelinkLaunchEventHandler OnLaunchFilelink = null; // event: read new file - public delegate void RefreshInfoEventHandler(string informationMessage, int progressBarProgess); - public event RefreshInfoEventHandler OnRefreshInfo = null; + public delegate void RefreshInfoEventHandler(object sender ,FileReadEventArgs e) ; + public event RefreshInfoEventHandler OnRefreshInfoEvent = null; + + public delegate void ImportFinishedEventHandler(object sender,EventArgs e); + public event ImportFinishedEventHandler ImportFinishedEvent; + + public delegate void ImportDelegate(); + protected ImportDelegate importDelegate = null; + + public virtual void OnImportFinished(object sender, EventArgs e) + { + if (ImportFinishedEvent != null) + { + ImportFinishedEvent(this,e); + } + } + + protected void ImportEnded(IAsyncResult result) + { + filesAreLoaded = false; + if (progressDialog != null) + { + progressDialog.Close(); + } + OnImportFinished(this, null); + if (progressDialog != null) + { + progressDialog.Close(); + progressDialog.ShowWaitCursor = false; + + } + } + #endregion Events/Delegates #region Variables @@ -302,7 +334,7 @@ public ApplicationItem() { - // .. init member variables ... + // .. init member variables ... appID = -1; fatherID = -1; title = ""; @@ -337,7 +369,6 @@ protected void ShowProgressDialog(string headerText) { progressDialog = (GUIDialogProgress)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_PROGRESS); - progressDialog.ShowWaitCursor = true; progressDialog.SetHeading(headerText); progressDialog.SetLine(0,headerText); progressDialog.SetLine(1, ""); @@ -346,30 +377,26 @@ progressDialog.Progress(); } - public void ReadNewFile(string informationMessage, int progressBarCtr) + public void SetGUIProgressDialog(string informationMessage, int progressBarCtr) { + if (progressDialog != null) { + + progressDialog.ShowProgressBar(true); + progressDialog.ShowWaitCursor = true; + progressDialog.SetLine(2, String.Format("{0} {1}", GUILocalizeStrings.Get(13005), informationMessage)); // "last imported file {0}" - /* if ((curPos > 0) && (maxPos > 0)) - { - int perc = 100 * curPos / maxPos; - guiDialogProgress.SetPercentage(perc); - }*/ + progressDialog.SetPercentage(progressBarCtr); progressDialog.Progress(); + + } - SendRefreshInfo(String.Format("{0} {1}", GUILocalizeStrings.Get(13005), informationMessage), progressBarCtr); + // SendRefreshInfo(String.Format("{0} {1}", GUILocalizeStrings.Get(13005), informationMessage), progressBarCtr); } - protected void SendRefreshInfo(string informationMessage, int progressBarCtr) - { - if (OnRefreshInfo != null) - { - OnRefreshInfo(informationMessage, progressBarCtr); - } - } + - protected void DoPreLaunch() { if (waitForExit && (preLaunch != "")) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -87,31 +87,29 @@ { if (mpGUIMode) { - ShowProgressDialog("Import directory"); + ShowProgressDialog("Importing from folders.."); } DirectoryImport directoryImport = null; - try - { - directoryImport = new DirectoryImport(this); - + + if (!File.Exists(this.Executable)) // no "mame.exe" + return; + + ValidExtensions = ValidExtensions.Replace(" ", ""); - string[] fileDirPaths = this.FileDirectory.Split(';'); - directoryImport.StartImport(fileDirPaths, mpGUIMode); + - } - finally - { - if (directoryImport != null) - { - directoryImport.DeInit(); - } + directoryImport = new DirectoryImport(this); + directoryImport.ReadNewFileEvent += new ImportBase.ReadNewFileEventHandler(directoryImport_ReadNewFileEvent); + importDelegate = new ImportDelegate(directoryImport.StartImport); + importDelegate.BeginInvoke(new AsyncCallback(ImportEnded), null); - if (mpGUIMode) - { - progressDialog.Close(); - } - } + #endregion ApplicationItem Overloads } + + void directoryImport_ReadNewFileEvent(object sender, FileReadEventArgs e) + { + this.SetGUIProgressDialog(e.message, e.ctr); + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -62,30 +62,27 @@ GamebaseImport gameBaseImport = null; - // show progress dialog and run the import... if (mpGUIMode) { - ShowProgressDialog("Import gamebase"); + ShowProgressDialog("Importing from gameBase.."); } - try - { - gameBaseImport = new GamebaseImport(this); - gameBaseImport.StartImport(); - } - finally - { - if (gameBaseImport != null) - { - gameBaseImport.DeInit(); - } - if (mpGUIMode) - { - progressDialog.Close(); - } - } + if (!File.Exists(this.Executable)) // no "mame.exe" + return; + + + gameBaseImport = new GamebaseImport(this); + gameBaseImport.ReadNewFileEvent += new ImportBase.ReadNewFileEventHandler(gameBaseImport_ReadNewFileEvent); + importDelegate = new ImportDelegate(gameBaseImport.StartImport); + importDelegate.BeginInvoke(new AsyncCallback(ImportEnded), null); + } + void gameBaseImport_ReadNewFileEvent(object sender, FileReadEventArgs e) + { + this.SetGUIProgressDialog(e.message, e.ctr); + } + public override void Refresh(bool bGUIMode) { DeleteFiles(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs 2007-09-03 19:59:11 UTC (rev 890) @@ -30,6 +30,7 @@ using System.Diagnostics; using System.IO; using SQLite.NET; +using System.Threading; using MediaPortal.Dialogs; using MediaPortal.GUI.Library; @@ -54,6 +55,7 @@ public ApplicationItemMame() { + // some nice working mame defaults... Title = "MAME"; Executable = "..Your path to mame.exe goes here..."; @@ -113,26 +115,20 @@ if (mpGUIMode) { - ShowProgressDialog("Import mame"); + ShowProgressDialog("Importing Mameitems.."); } - try - { - mameImport = new MameImport(this); - mameImport.StartImport(); - } - finally - { - if (mameImport != null) - { - mameImport.DeInit(); - } + mameImport = new MameImport(this); + mameImport.ReadNewFileEvent += new ImportBase.ReadNewFileEventHandler(mameImport_OnReadNewFileEvent); + importDelegate = new ImportDelegate(mameImport.StartImport); + importDelegate.BeginInvoke(new AsyncCallback(ImportEnded),null); - if (mpGUIMode) - { - progressDialog.Close(); - } - } } + + void mameImport_OnReadNewFileEvent(object sender,FileReadEventArgs e) + { + this.SetGUIProgressDialog(e.message, e.ctr); + } + #endregion ApplicationItem Overloads } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-09-03 15:38:01 UTC (rev 889) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-09-03 19:59:11 UTC (rev 890) @@ -5,7 +5,7 @@ chefkoch is doing stuff on this to,Great,it will for sure speed-up development! :--INSTALLATION -Copy contents of metadata-folder to MP root folder ,skin to relevant folder, and the GUIPrograms.dll to MP/windowsplugins to run. +Copy contents of metadata-folder to MP root folder ,skin to relevant folder, and the GUIProgramsAlt.dll to MP/windowsplugins to run. Copy SQLite.Dll to same folder as plugin .. Copy skin to relevant folder. There will possibly be db-changes and xml-changes between versions, so always make sure that you have a clean install between updates. @@ -33,7 +33,7 @@ Testing,bugfixing,codecleanup --Optimize some things if possibly +-Optimize some things if possible -Change graphics for fileinfobackground (it says mymovies...) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-09-09 09:59:33
|
Revision: 908 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=908&view=rev Author: northern_sky Date: 2007-09-09 02:59:29 -0700 (Sun, 09 Sep 2007) Log Message: ----------- added basic support for allgame lookup from gui Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs trunk/plugins/myGUIProgramsAlt/README.txt Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ClassDiagram1.cd Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ClassDiagram1.cd =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ClassDiagram1.cd (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ClassDiagram1.cd 2007-09-09 09:59:29 UTC (rev 908) @@ -0,0 +1,314 @@ +<?xml version="1.0" encoding="utf-8"?> +<ClassDiagram MajorVersion="1" MinorVersion="1"> + <Font Name="Segoe UI" Size="9" /> + <Class Name="GUIProgramsAlt.Database.DatabaseHandler" Collapsed="true"> + <Position X="18" Y="0.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Database\DatabaseHandler.cs</FileName> + <HashCode>AKIYAABCAAEaMAEwAAAAAAAAAFlAAAEACEACAABEoAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.AppSettingsFilesImportProgress" Collapsed="true"> + <Position X="3" Y="3.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\AppFilesImportProgress.cs</FileName> + <HashCode>gQAAAAAQAKAQCAAAAACAAQACgAAAAAAAQABAAIAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.AppSettingsFilesView" Collapsed="true"> + <Position X="16.25" Y="0.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\AppFilesView.cs</FileName> + <HashCode>oAANBAJFSCBB8ECgSJCCQIRigVMQACQBQmSUgUQRCNE=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.AppSettingsBase" Collapsed="true"> + <Position X="5.25" Y="2" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\AppSettingsBase.cs</FileName> + <HashCode>AhoIgAAAADQAAJAgCUCFQCgSQiHAAUIgAICACAAQABg=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.AppSettingsDirCache" Collapsed="true"> + <Position X="5.25" Y="3.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\AppSettingsDirCache.cs</FileName> + <HashCode>AAAAQAAAACAAEIAgACCAAAICQAAAAAAAAAAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.AppSettingsGamebase" Collapsed="true"> + <Position X="7.5" Y="3.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\AppSettingsGamebase.cs</FileName> + <HashCode>AAAAAAAAACAAAIAoACCAAEACAAAAAAAAAQAAAAAIAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.AppSettingsGrouper" Collapsed="true"> + <Position X="9.75" Y="3.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\AppSettingsGrouper.cs</FileName> + <HashCode>AAAAAAAAACABAIAgAACAAAACAAAAAAAAAAAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.AppSettingsMame" Collapsed="true"> + <Position X="0.75" Y="3.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\AppSettingsMame.cs</FileName> + <HashCode>AAAAgAAAACAAAIAgQCCABEACAAAAAAgAASABAAAIBAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.FileDetailsForm" Collapsed="true"> + <Position X="19.75" Y="0.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\FileDetailsForm.cs</FileName> + <HashCode>AABAAcAxCaFiEIcCKKGBwAACIgERBiAABQCABAABAAQ=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.FileInfoScraperForm" Collapsed="true"> + <Position X="21.5" Y="0.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\FileInfoScraperForm.cs</FileName> + <HashCode>qQYYAAAAGSSQcJRDDMOAACcSD8AC1SgCkEChMIC7xEk=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.FileSettingsBox" Collapsed="true"> + <Position X="18" Y="1.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\FileSettingsBox.cs</FileName> + <HashCode>AEAAAAAAECIAAAAAAACAAAASAAAAAAAAAAAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.ProgramViews" Collapsed="true"> + <Position X="14.5" Y="3.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\ProgramViews.cs</FileName> + <HashCode>AIAAAQAAADBABhQgAECEAAACAAAgEBAIAAACgQIAAWQ=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.SettingsBase" Collapsed="true"> + <Position X="6.25" Y="0.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\SettingsBase.cs</FileName> + <HashCode>AAAAAAAAACAAAIAgACCAAAACAAAQAAEAAgAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.SettingsRoot" Collapsed="true"> + <Position X="12" Y="2" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\SettingsRoot.cs</FileName> + <HashCode>AAAAACAAACAAAIAhIACDAAACAACAQAQAAAAAAACgCAg=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Design.SetupForm" Collapsed="true"> + <Position X="18" Y="3.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Design\SetupForm.cs</FileName> + <HashCode>xqnowBGYG3JKfJwlBOCIEETiVZM6QmVoVEie0NAzAXM=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.GUIProgramsAlt" Collapsed="true" BaseTypeListCollapsed="true"> + <Position X="21.5" Y="1.5" Width="1.5" /> + <TypeIdentifier> + <FileName>GUIProgramsAlt.cs</FileName> + <HashCode>IPJEILBSQgAlAIR4ggEgCBMAAQBFb0FBKFGCZhAAZSg=</HashCode> + </TypeIdentifier> + <Lollipop Position="0.2" Collapsed="true" /> + </Class> + <Class Name="GUIProgramsAlt.GUIProgramsAltFileInfo" Collapsed="true" BaseTypeListCollapsed="true"> + <Position X="14.5" Y="2.5" Width="1.5" /> + <TypeIdentifier> + <FileName>GUIProgramsAltFileInfo.cs</FileName> + <HashCode>AEQIAQEBggFRANBACAgRCAgMBUAIAEBBgACLYAYEBAA=</HashCode> + </TypeIdentifier> + <Lollipop Position="0.2" Collapsed="true" /> + </Class> + <Class Name="GUIProgramsAlt.ProgramSort" Collapsed="true" BaseTypeListCollapsed="true"> + <Position X="18" Y="2.5" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramSort.cs</FileName> + <HashCode>AAAACAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAAAAAAA=</HashCode> + </TypeIdentifier> + <Lollipop Position="0.2" Collapsed="true" /> + </Class> + <Class Name="GUIProgramsAlt.ProgramUtils" Collapsed="true"> + <Position X="19.75" Y="2.5" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramUtils.cs</FileName> + <HashCode>AABQIAAAhAAgQAAIAAAAg6AAGAAgAQABAAAWAAgCjCA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.ProgramViewHandler" Collapsed="true"> + <Position X="21.5" Y="2.5" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramViewHandler.cs</FileName> + <HashCode>AgAAAAACgRAAAgAAAAgVBCAAgAjFEAIARAAAAAIgAGA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Imports.AllGameScraper" Collapsed="true"> + <Position X="14.5" Y="0.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Imports\AllGameScraper.cs</FileName> + <HashCode>AhzAAAGgAAITAAAAAAAAAAAAAABQAAAAgIAAEQAAABA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Imports.DirectoryImport" Collapsed="true"> + <Position X="0.5" Y="8.75" Width="1.5" /> + <TypeIdentifier> + <FileName>Imports\DirectoryImport.cs</FileName> + <HashCode>AAAAAAAAAAAAAAABAgAgAAAAAAAAAAAAAAAAAAEAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Imports.FileReadEventArgs" Collapsed="true"> + <Position X="16.25" Y="1.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Imports\FileReadEventArgs.cs</FileName> + <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAACA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Imports.GamebaseImport" Collapsed="true"> + <Position X="2.75" Y="8.75" Width="1.5" /> + <TypeIdentifier> + <FileName>Imports\GamebaseImport.cs</FileName> + <HashCode>ABAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAEAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Imports.ImportBase" Collapsed="true"> + <Position X="2.75" Y="7.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Imports\ImportBase.cs</FileName> + <HashCode>AAAAAQBAAAAAAAgAAAAAgAAAAAAAAAEAAAAAAAEAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Imports.MameImport" Collapsed="true"> + <Position X="5" Y="8.75" Width="1.5" /> + <TypeIdentifier> + <FileName>Imports\MameImport.cs</FileName> + <HashCode>qACAgAEAGAAAEAABAAAEAAgCgAASABAAGwAQBIEAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.ApplicationItem" Collapsed="true"> + <Position X="3.75" Y="4.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\ApplicationItem.cs</FileName> + <HashCode>hD6AAsRiQzNHIuPwpIiN4gIAmZcqBAkYqGVmCZkEpYA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.ApplicationItemDirectoryCache" Collapsed="true"> + <Position X="7.25" Y="5.75" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\ApplicationItemDirectoryCache.cs</FileName> + <HashCode>AAAAAAAAAABAAAAAIAAAIAAAAAAAAAAAAAAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.ItemFactory" Collapsed="true"> + <Position X="16.25" Y="2.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\ApplicationItemFactory.cs</FileName> + <HashCode>AAAAAAACAAAAAEAgAAQAIAAAAQAAAAAAAAAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.ApplicationItemGameBase" Collapsed="true"> + <Position X="0.5" Y="5.75" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\ApplicationItemGameBase.cs</FileName> + <HashCode>AAAAAAAAAABAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.ApplicationItemGrouper" Collapsed="true"> + <Position X="2.75" Y="5.75" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\ApplicationItemGrouper.cs</FileName> + <HashCode>AAAAAAAAAAACAAAAAAAAAAAAAAAABAAAAGAAAAAABAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.ApplicationItemMame" Collapsed="true"> + <Position X="5" Y="5.75" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\ApplicationItemMame.cs</FileName> + <HashCode>AAAAAAAIAABAAAAAIAAAAAAIgAAAAAAAAAAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.FileItem" Collapsed="true"> + <Position X="8.25" Y="7.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\FileItem.cs</FileName> + <HashCode>hAwEAcRuRAEAZkAAACYIQAIGCQPCAEECjgBAAo9AQAI=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.FileItemInfo" Collapsed="true"> + <Position X="14.5" Y="1.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\FileItemInfo.cs</FileName> + <HashCode>AggEAAAqRAEBIsAAJAYICQIGCQEGAAEALAAAAAkAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.FilelinkItem" Collapsed="true"> + <Position X="8.25" Y="8.75" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\FilelinkItem.cs</FileName> + <HashCode>AAQAAEAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAEQAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Items.FilterItem" Collapsed="true"> + <Position X="19.75" Y="1.5" Width="1.5" /> + <TypeIdentifier> + <FileName>Items\FilterItem.cs</FileName> + <HashCode>AAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Class> + <Class Name="GUIProgramsAlt.Properties.Resources" Collapsed="true"> + <Position X="16.25" Y="3.5" Width="1.5" /> + <TypeIdentifier> + <HashCode>AAAAAAAAAAAAAAAAAAABEEAAQQAAAAIAAAAAAAAgAIA=</HashCode> + </TypeIdentifier> + </Class> + <Enum Name="GUIProgramsAlt.Layout" Collapsed="true"> + <Position X="19.75" Y="4.75" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramUtils.cs</FileName> + <HashCode>AAAAAAAAQAAAACAAAAAAAAAAAAAAAAAAEAAAAAAAAAI=</HashCode> + </TypeIdentifier> + </Enum> + <Enum Name="GUIProgramsAlt.ItemType" Collapsed="true"> + <Position X="18" Y="4.75" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramUtils.cs</FileName> + <HashCode>AAAAQAAAABAAAAAQCAAEABAAAAAAAAABAAAgAAAABAA=</HashCode> + </TypeIdentifier> + </Enum> + <Enum Name="GUIProgramsAlt.ScraperType" Collapsed="true"> + <Position X="16.25" Y="5.5" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramUtils.cs</FileName> + <HashCode>AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAA=</HashCode> + </TypeIdentifier> + </Enum> + <Enum Name="GUIProgramsAlt.ScraperSaveType" Collapsed="true"> + <Position X="14.5" Y="5.5" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramUtils.cs</FileName> + <HashCode>AAAAAAAAAAAAIAAAAAAAAAAAAAAAABAAAAAAAAAAAAA=</HashCode> + </TypeIdentifier> + </Enum> + <Enum Name="GUIProgramsAlt.ProgramInfoAction" Collapsed="true"> + <Position X="21.5" Y="4.75" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramUtils.cs</FileName> + <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAgAA=</HashCode> + </TypeIdentifier> + </Enum> + <Enum Name="GUIProgramsAlt.ImportOption" Collapsed="true"> + <Position X="16.25" Y="4.75" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramUtils.cs</FileName> + <HashCode>AAAAMAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAAAA=</HashCode> + </TypeIdentifier> + </Enum> + <Enum Name="GUIProgramsAlt.FileSettingOption" Collapsed="true"> + <Position X="14.5" Y="4.75" Width="1.5" /> + <TypeIdentifier> + <FileName>ProgramUtils.cs</FileName> + <HashCode>AAAAAAAAAgAAAAAAAACAAAAAAAAAAAAAAAAQAAIAAAA=</HashCode> + </TypeIdentifier> + </Enum> +</ClassDiagram> \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-09-08 16:12:18 UTC (rev 907) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-09-09 09:59:29 UTC (rev 908) @@ -63,9 +63,10 @@ #region Variables bool currentSortAsc = true; + ProgramViewHandler viewHandler = ProgramViewHandler.Instance; List<ApplicationItem> globalApplicationList;// dbHandlerInstance.ApplicationItemList; - DirectoryHistory itemHistory = new DirectoryHistory(); + int slideSpeed = 3000; // speed in milliseconds between two slides long slideTime = 0; static string _thumbnailPath = string.Empty; @@ -158,7 +159,6 @@ return facadeView.SelectedListItemIndex; } - bool ApplicationItemSubItemsAllowed() { if (currentApplicationItem == null) @@ -176,8 +176,6 @@ return (currentApplicationItem != null); // all globalApplicationList can have files except the root } - #endregion - string GetViewLayoutAsText() { string result; @@ -203,6 +201,8 @@ return result; } + #endregion Properties / Helper Routines + public void SwitchToNextViewLayout() { switch (CurrentLayout) @@ -591,89 +591,10 @@ - //TO DO - //Fix this method//move it - void ImportFileItemInfo(FileItem curFile) - { - int minRelevance = 30; - bool bSuccess = false; - ScraperSaveType saveType = ScraperSaveType.DataAndImages; - GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); - GUIDialogProgress dlgProgress = (GUIDialogProgress)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_PROGRESS); - dlgProgress.ShowWaitCursor = false; - dlgProgress.ShowProgressBar(false); - dlgProgress.SetHeading("Lookup Gameinfo"); - dlgProgress.SetLine(1, curFile.Title); - dlgProgress.SetLine(2, curFile.Platform); - dlgProgress.SetLine(3, ""); - dlgProgress.StartModal(GetID); - // dlgProgress.SetPercentage(60); - dlgProgress.Progress(); - bSuccess = curFile.FindFileInfo(ScraperType.ALLGAME); - if ((bSuccess && curFile.FileInfoList.Count > 0) && ((FileItemInfo)(curFile.FileInfoList[0])).RelevanceNorm >= minRelevance) - { - GUIDialogSelect pDlg = (GUIDialogSelect)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_SELECT); - if (null != pDlg) - { - pDlg.Reset(); - pDlg.SetHeading("Select Title"); - foreach (FileItemInfo item in curFile.FileInfoList) - { - if (item.RelevanceNorm >= minRelevance) - { - pDlg.Add(String.Format("{0} ({1})", item.Title, item.Platform)); - } - } - pDlg.DoModal(GetID); - // and wait till user selects one - int iSelectedGame = pDlg.SelectedLabel; - if (iSelectedGame < 0) return; - dlgProgress.StartModal(GetID); - dlgProgress.Progress(); - dlgProgress.ShowProgressBar(false); - curFile.FileInfoFavourite = (FileItemInfo)curFile.FileInfoList[iSelectedGame]; - curFile.FindFileInfoDetail(currentApplicationItem, curFile.FileInfoFavourite, ScraperType.ALLGAME, saveType); - if ((saveType == ScraperSaveType.DataAndImages) || (saveType == ScraperSaveType.Data)) - { - // dlgProgress.SetPercentage(60); - dlgProgress.Progress(); - curFile.SaveFromFileInfoFavourite(false); - } - // dlgProgress.SetPercentage(100); - dlgProgress.Progress(); - dlgProgress.Close(); - dlgProgress = null; - } - ShowInfoWindow(); - } - else - { - string strMsg = ""; - if (!bSuccess) - { - strMsg = "Connection failed"; - Log.Info("myPrograms: RefreshData failed"); - } - else - { - strMsg = String.Format("No match for '{0}'", curFile.Title); - Log.Info("myPrograms: No data found for '{0}'", curFile.Title); - } - if (null != dlgOk) - { - dlgOk.SetHeading(187); - dlgOk.SetLine(1, strMsg); - dlgOk.SetLine(2, String.Empty); - dlgOk.DoModal(GetID); - } - } - } - - void SetItemThumb(GUIListItem item, GUIControl parent) { ThumbnailPath = ""; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-09-08 16:12:18 UTC (rev 907) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-09-09 09:59:29 UTC (rev 908) @@ -237,6 +237,9 @@ <LastGenOutput>Resources.Designer.cs</LastGenOutput> </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/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-09-08 16:12:18 UTC (rev 907) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-09-09 09:59:29 UTC (rev 908) @@ -85,7 +85,7 @@ } string folderForThumbs = string.Empty; string[] coverArtUrls = new string[1]; - string imdbCoverArtUrl = String.Empty; + string amgCoverArtUrl = String.Empty; Thread imageSearchThread = null; @@ -99,7 +99,87 @@ return Load(GUIGraphicsContext.Skin + @"\myProgramsAltFileInfo.xml"); } + //TO DO + //Fix this method//move it + void ImportFileItemInfo(FileItem curFile) + { + int minRelevance = 40; + bool bSuccess = false; + ScraperSaveType saveType = ScraperSaveType.DataAndImages; + GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); + GUIDialogProgress dlgProgress = (GUIDialogProgress)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_PROGRESS); + dlgProgress.ShowWaitCursor = false; + dlgProgress.ShowProgressBar(false); + dlgProgress.SetHeading("Lookup Gameinfo"); + dlgProgress.SetLine(1, curFile.Title); + dlgProgress.SetLine(2, curFile.Platform); + dlgProgress.SetLine(3, ""); + dlgProgress.StartModal(GetID); + // dlgProgress.SetPercentage(60); + dlgProgress.Progress(); + bSuccess = curFile.FindFileInfo(ScraperType.ALLGAME); + if ((bSuccess && curFile.FileInfoList.Count > 0) && ((FileItemInfo)(curFile.FileInfoList[0])).RelevanceNorm >= minRelevance) + { + GUIDialogSelect pDlg = (GUIDialogSelect)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_SELECT); + if (null != pDlg) + { + pDlg.Reset(); + pDlg.SetHeading("Select Title"); + foreach (FileItemInfo item in curFile.FileInfoList) + { + if (item.RelevanceNorm >= minRelevance) + { + pDlg.Add(String.Format("{0} ({1})", item.Title, item.Platform)); + } + } + pDlg.DoModal(GetID); + // and wait till user selects one + int iSelectedGame = pDlg.SelectedLabel; + if (iSelectedGame < 0) return; + + dlgProgress.StartModal(GetID); + dlgProgress.Progress(); + dlgProgress.ShowProgressBar(false); + curFile.FileInfoFavourite = (FileItemInfo)curFile.FileInfoList[iSelectedGame]; + + curFile.FindFileInfoDetail(currentApplicationItem, curFile.FileInfoFavourite, ScraperType.ALLGAME, saveType); + if ((saveType == ScraperSaveType.DataAndImages) || (saveType == ScraperSaveType.Data)) + { + // dlgProgress.SetPercentage(60); + dlgProgress.Progress(); + curFile.SaveFromFileInfoFavourite(false); + } + // dlgProgress.SetPercentage(100); + dlgProgress.Progress(); + dlgProgress.Close(); + dlgProgress = null; + } + //ShowInfoWindow(); + } + else + { + string strMsg = ""; + if (!bSuccess) + { + strMsg = "Connection failed"; + Log.Info("myPrograms: RefreshData failed"); + } + else + { + strMsg = String.Format("No match for '{0}'", curFile.Title); + Log.Info("myPrograms: No data found for '{0}'", curFile.Title); + } + if (null != dlgOk) + { + dlgOk.SetHeading(187); + dlgOk.SetLine(1, strMsg); + dlgOk.SetLine(2, String.Empty); + dlgOk.DoModal(GetID); + } + } + } + protected override void OnPageLoad() { base.OnPageLoad(); @@ -110,9 +190,9 @@ return; } // Default picture - imdbCoverArtUrl = currentFileItem.Imagefile; + amgCoverArtUrl = currentFileItem.Imagefile; coverArtUrls = new string[1]; - coverArtUrls[0] = imdbCoverArtUrl; + coverArtUrls[0] = amgCoverArtUrl; ResetSpinControl(); @@ -137,7 +217,8 @@ base.OnClicked(controlId, control, actionType); if (control == btnRefresh) { - + ImportFileItemInfo(this.CurrentFileItem); + Update(); return; } @@ -248,33 +329,25 @@ { if (currentFileItem == null) return; // Search for more pictures - FileItem movie = currentFileItem; - IMPawardsSearch impSearch = new IMPawardsSearch(); - impSearch.Search(movie.Title); + FileItem fileItem = currentFileItem; + AmazonImageSearch amazonSearch = new AmazonImageSearch(); - amazonSearch.Search(movie.Title); + amazonSearch.Search(fileItem.Title); int thumb = 0; - if (movie.Imagefile != string.Empty) + if (fileItem.Imagefile != string.Empty) thumb = 1; - int pictureCount = amazonSearch.Count + impSearch.Count + thumb; + int pictureCount = amazonSearch.Count + thumb; if (pictureCount == 0) return; int pictureIndex = 0; coverArtUrls = new string[pictureCount]; - if (movie.Imagefile != string.Empty) - coverArtUrls[pictureIndex++] = movie.Imagefile; + if (fileItem.Imagefile != string.Empty) + coverArtUrls[pictureIndex++] = fileItem.Imagefile; - if ((impSearch.Count > 0) && (impSearch[0] != string.Empty)) - { - for (int i = 0; i < impSearch.Count; ++i) - { - coverArtUrls[pictureIndex++] = impSearch[i]; - } - } if (amazonSearch.Count > 0) { @@ -389,7 +462,7 @@ public bool OnDetailsStarting(IMDBFetcher fetcher) { GUIDialogProgress pDlgProgress = (GUIDialogProgress)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_PROGRESS); - // show dialog that we're downloading the movie info + // show dialog that we're downloading the fileItem info pDlgProgress.Reset(); pDlgProgress.SetHeading(198); pDlgProgress.SetLine(1, fetcher.MovieName); @@ -461,9 +534,9 @@ public bool OnSelectMovie(IMDBFetcher fetcher, out int selectedMovie) { GUIDialogSelect pDlgSelect = (GUIDialogSelect)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_SELECT); - // more then 1 movie found + // more then 1 fileItem found // ask user to select 1 - pDlgSelect.SetHeading(196);//select movie + pDlgSelect.SetHeading(196);//select fileItem pDlgSelect.Reset(); for (int i = 0; i < fetcher.Count; ++i) { @@ -533,6 +606,7 @@ { Render(timePassed); } + #endregion } } Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-09-08 16:12:18 UTC (rev 907) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-09-09 09:59:29 UTC (rev 908) @@ -39,14 +39,10 @@ -Add sort for filteritems too. --Fix brokenprogressdialogs in gui reimport --Allow the amg best match update from fileinfo window for fileitem - - BUGS: -- Just add em... +- Just add em.... FEATURES: Add some more specific emulator support.. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-09-10 19:28:58
|
Revision: 911 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=911&view=rev Author: northern_sky Date: 2007-09-10 12:28:56 -0700 (Mon, 10 Sep 2007) Log Message: ----------- fixed some sort stuff for filteritems Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-09-10 16:07:01 UTC (rev 910) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-09-10 19:28:56 UTC (rev 911) @@ -194,7 +194,7 @@ { "Name", "Title", - "Filename", + "Filepath", "Rating", "LaunchCount", "LastTimeLaunched", Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-09-10 16:07:01 UTC (rev 910) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-09-10 19:28:56 UTC (rev 911) @@ -331,12 +331,18 @@ btnViewAs.Label = GetViewLayoutAsText(); + //as for now only title are availble for appitems/filteritem + if ((DoesListOnlyContainsItemOfType<FilterItem>()) || (DoesListOnlyContainsItemOfType<ApplicationItem>())) + { + CurrentSortMethod = ProgramSort.SortMethod.Title; + } + switch (CurrentSortMethod) { case ProgramSort.SortMethod.Title: sortBy = GUILocalizeStrings.Get(268); break; - case ProgramSort.SortMethod.Filename: + case ProgramSort.SortMethod.Filepath: sortBy = GUILocalizeStrings.Get(363); break; case ProgramSort.SortMethod.Rating: @@ -760,7 +766,7 @@ if (DoesListOnlyContainsItemOfType<FileItem>()) { - dlg.AddLocalizedString(363); // filename + dlg.AddLocalizedString(363); // filepath dlg.AddLocalizedString(367); // rating dlg.Add("Sort by: Times launched");//"LaunchCount"//whats the mapping to these??? dlg.Add("Sort by: Date launched"); @@ -778,7 +784,7 @@ CurrentSortMethod = ProgramSort.SortMethod.Title; break; case 363: - CurrentSortMethod = ProgramSort.SortMethod.Filename; + CurrentSortMethod = ProgramSort.SortMethod.Filepath; break; case 367: CurrentSortMethod = ProgramSort.SortMethod.Rating; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-09-10 16:07:01 UTC (rev 910) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs 2007-09-10 19:28:56 UTC (rev 911) @@ -99,8 +99,6 @@ return Load(GUIGraphicsContext.Skin + @"\myProgramsAltFileInfo.xml"); } - //TO DO - //Fix this method//move it void ImportFileItemInfo(FileItem curFile) { int minRelevance = 40; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs 2007-09-10 16:07:01 UTC (rev 910) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs 2007-09-10 19:28:56 UTC (rev 911) @@ -44,7 +44,7 @@ public enum SortMethod { Title = 0, - Filename = 1, + Filepath = 1, Rating = 2, LaunchCount = 3, LastTimeLaunched = 4, @@ -64,17 +64,11 @@ public int Compare(GUIListItem item1, GUIListItem item2) { if (item1 == item2) return 0; - if (item1 == null) return -1; - if (item2 == null) return -1; - if (item1.MusicTag == null) return -1; - if (item2.MusicTag == null) return -1; - if (item1.MusicTag.GetType().Name == "FilterItem") return -1;//quick fix for not allowing filteritems... - if (item2.MusicTag.GetType().Name == "FilterItem") return -1;//quick fix for not allowing filteritems... + if ((item1 == null) || (item2 == null)) return -1; + if ((item1.MusicTag == null) || (item2.MusicTag == null)) return -1; + if ((item1.Label == "..") || (item2.Label == "..")) return -1; // if the .. item has no musicTag then, it is already catched at the beginning of this method - if (item1.Label == "..") return -1; // if the .. item has no musicTag then, it is already catched at the beginning of this method - if (item2.Label == "..") return -1; - //applicationitem sort only allows by title for now if ((item1.MusicTag is ApplicationItem) && (item2.MusicTag is ApplicationItem)) @@ -94,15 +88,26 @@ } } + //filteritem sort only allows by title for now + else if ((item1.MusicTag is FilterItem) && (item2.MusicTag is FilterItem)) + { + FilterItem Item1 = item1.MusicTag as FilterItem; + FilterItem Item2 = item2.MusicTag as FilterItem; + switch (currentSortMethod) + { + case SortMethod.Title: + if (sortAscending) + return String.Compare(Item1.Title, Item2.Title, true); + else + return String.Compare(Item2.Title, Item1.Title, true); + default: + return -1; + } + } - string strSize1 = ""; - string strSize2 = ""; - if (item1.FileInfo != null) strSize1 = MediaPortal.Util.Utils.GetSize(item1.FileInfo.Length); - if (item2.FileInfo != null) strSize2 = MediaPortal.Util.Utils.GetSize(item2.FileInfo.Length); - //fileitem sort - if ((item1.MusicTag is FileItem) && (item2.MusicTag is FileItem)) + else if ((item1.MusicTag is FileItem) && (item2.MusicTag is FileItem)) { FileItem fileItem1 = item1.MusicTag as FileItem; FileItem fileItem2 = item2.MusicTag as FileItem; @@ -117,7 +122,7 @@ else return String.Compare(fileItem2.Title, fileItem1.Title, true); - case SortMethod.Filename: + case SortMethod.Filepath: if (sortAscending) return String.Compare(fileItem1.filePath, fileItem2.filePath, true); else Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-09-10 16:07:01 UTC (rev 910) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-09-10 19:28:56 UTC (rev 911) @@ -37,12 +37,9 @@ -Change graphics for fileinfobackground (it says mymovies...) --Add sort for filteritems too. - - BUGS: -- Just add em.... +- goes here.. FEATURES: Add some more specific emulator support.. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-11-04 12:27:38
|
Revision: 1023 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1023&view=rev Author: chef_koch Date: 2007-11-04 04:27:37 -0800 (Sun, 04 Nov 2007) Log Message: ----------- fixed: context menu used old windowID 9999 for fileinfo Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-11-04 12:20:05 UTC (rev 1022) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-11-04 12:27:37 UTC (rev 1023) @@ -837,11 +837,12 @@ if (item.MusicTag is FileItem) { curFile = (FileItem)item.MusicTag; - GUIProgramsAltFileInfo fileInfo = (GUIProgramsAltFileInfo)GUIWindowManager.GetWindow(9999); + int windowID = ProgramUtils.GetIDFileInfo; + GUIProgramsAltFileInfo fileInfo = (GUIProgramsAltFileInfo)GUIWindowManager.GetWindow(windowID); fileInfo.CurrentFileItem = curFile; fileInfo.CurrentApplicationItem = currentApplicationItem; fileInfo.FolderForThumbs = string.Empty; - GUIWindowManager.ActivateWindow(9999); + GUIWindowManager.ActivateWindow(windowID); } } Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-04 12:20:05 UTC (rev 1022) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-04 12:27:37 UTC (rev 1023) @@ -30,6 +30,13 @@ --------------- -- ChangeLog -- --------------- + + +changed: plugin uses now it's own WindowsIDs (not Window.Files anymore) to prevent problems with old MyPrograms PluginName +fixed: if default title "My Programs Alt." was used, "My Programs" was displayed in GUI + +fixed exception when no profiles config file was found + 2007-10-09: chefkoch : new readme layout 2007-10-09: chefkoch : fixed navigation in bluetwo skin file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-11-04 18:09:43
|
Revision: 1026 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1026&view=rev Author: chef_koch Date: 2007-11-04 10:09:40 -0800 (Sun, 04 Nov 2007) Log Message: ----------- changed: remember last used application is now optional sleepTime and pluginTitle are stored now in xml, not in db anymore Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/README.txt trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs 2007-11-04 18:06:02 UTC (rev 1025) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.Designer.cs 2007-11-04 18:09:40 UTC (rev 1026) @@ -38,6 +38,7 @@ this.sleepTimeLabel = new System.Windows.Forms.Label(); this.sleepTimeResetButton = new System.Windows.Forms.Button(); this.sleepTimeNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.checkBoxRememberLastApp = new System.Windows.Forms.CheckBox(); this.titleGroupBox.SuspendLayout(); this.groupBoxThumbs.SuspendLayout(); this.sleepTimeGroupBox.SuspendLayout(); @@ -51,7 +52,7 @@ this.titleTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.titleTextBox.Location = new System.Drawing.Point(88, 23); this.titleTextBox.Name = "titleTextBox"; - this.titleTextBox.Size = new System.Drawing.Size(316, 20); + this.titleTextBox.Size = new System.Drawing.Size(316, 21); this.titleTextBox.TabIndex = 46; // // titleLabel @@ -59,7 +60,7 @@ this.titleLabel.AutoSize = true; this.titleLabel.Location = new System.Drawing.Point(6, 28); this.titleLabel.Name = "titleLabel"; - this.titleLabel.Size = new System.Drawing.Size(30, 13); + this.titleLabel.Size = new System.Drawing.Size(31, 13); this.titleLabel.TabIndex = 45; this.titleLabel.Text = "Title:"; this.titleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -69,7 +70,7 @@ this.checkBoxUseThumbsDir.AutoSize = true; this.checkBoxUseThumbsDir.Location = new System.Drawing.Point(9, 20); this.checkBoxUseThumbsDir.Name = "checkBoxUseThumbsDir"; - this.checkBoxUseThumbsDir.Size = new System.Drawing.Size(182, 17); + this.checkBoxUseThumbsDir.Size = new System.Drawing.Size(189, 17); this.checkBoxUseThumbsDir.TabIndex = 44; this.checkBoxUseThumbsDir.Text = "Only use default thumbs directory"; this.checkBoxUseThumbsDir.UseVisualStyleBackColor = true; @@ -128,7 +129,7 @@ this.sleepTimeLabel.AutoSize = true; this.sleepTimeLabel.Location = new System.Drawing.Point(6, 25); this.sleepTimeLabel.Name = "sleepTimeLabel"; - this.sleepTimeLabel.Size = new System.Drawing.Size(66, 13); + this.sleepTimeLabel.Size = new System.Drawing.Size(68, 13); this.sleepTimeLabel.TabIndex = 2; this.sleepTimeLabel.Text = "Time (in ms):"; // @@ -159,7 +160,7 @@ 0, 0}); this.sleepTimeNumericUpDown.Name = "sleepTimeNumericUpDown"; - this.sleepTimeNumericUpDown.Size = new System.Drawing.Size(316, 20); + this.sleepTimeNumericUpDown.Size = new System.Drawing.Size(316, 21); this.sleepTimeNumericUpDown.TabIndex = 0; this.sleepTimeNumericUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.sleepTimeNumericUpDown.Value = new decimal(new int[] { @@ -168,10 +169,21 @@ 0, 0}); // + // checkBoxRememberLastApp + // + this.checkBoxRememberLastApp.AutoSize = true; + this.checkBoxRememberLastApp.Location = new System.Drawing.Point(12, 198); + this.checkBoxRememberLastApp.Name = "checkBoxRememberLastApp"; + this.checkBoxRememberLastApp.Size = new System.Drawing.Size(175, 17); + this.checkBoxRememberLastApp.TabIndex = 50; + this.checkBoxRememberLastApp.Text = "remember last used Application"; + this.checkBoxRememberLastApp.UseVisualStyleBackColor = true; + // // SettingsRoot // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.checkBoxRememberLastApp); this.Controls.Add(this.sleepTimeGroupBox); this.Controls.Add(this.groupBoxThumbs); this.Controls.Add(this.titleGroupBox); @@ -184,6 +196,7 @@ this.sleepTimeGroupBox.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.sleepTimeNumericUpDown)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -199,5 +212,6 @@ private System.Windows.Forms.Button sleepTimeResetButton; private System.Windows.Forms.NumericUpDown sleepTimeNumericUpDown; private System.Windows.Forms.Button titleResetButton; + private System.Windows.Forms.CheckBox checkBoxRememberLastApp; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs 2007-11-04 18:06:02 UTC (rev 1025) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SettingsRoot.cs 2007-11-04 18:09:40 UTC (rev 1026) @@ -34,6 +34,8 @@ using GUIProgramsAlt; using GUIProgramsAlt.Items; using GUIProgramsAlt.Database; +using MediaPortal.Profile; +using MediaPortal.Configuration; namespace GUIProgramsAlt.Design { @@ -52,19 +54,16 @@ { base.LoadSettings(curApp); - // plugin title - titleTextBox.Text = dbHandlerInstance.ReadSetting(ProgramUtils.cPLUGINTITLE); - if (titleTextBox.Text == "") - { - titleTextBox.Text = ProgramUtils.cDefaultPluginTitle; - } - - // sleep time - sleepTimeNumericUpDown.Value = ProgramUtils.GetSleepTime(); - // use mp thumbs dir checkBoxUseThumbsDir.Checked = ProgramUtils.UseThumbsDir(); + using (Settings xmlreader = new Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + titleTextBox.Text = xmlreader.GetValueAsString("myProgramsAlt", "PluginTitle", ProgramUtils.cDefaultPluginTitle); + sleepTimeNumericUpDown.Value = xmlreader.GetValueAsInt("myProgramsAlt", "slideSpeed", ProgramUtils.cDefaultSleepTime); + checkBoxRememberLastApp.Checked = xmlreader.GetValueAsBool("myProgramsAlt", "rememberLastApp", false); + } + loaded = true; } @@ -74,17 +73,12 @@ base.SaveSettings(curApp); - // plugin title - if (titleTextBox.Text == ProgramUtils.cDefaultPluginTitle || titleTextBox.Text == "") - dbHandlerInstance.DeleteSetting(ProgramUtils.cPLUGINTITLE); - else - dbHandlerInstance.WriteSetting(ProgramUtils.cPLUGINTITLE, titleTextBox.Text); - - // sleep time - dbHandlerInstance.WriteSetting(ProgramUtils.cSLIDESPEED, sleepTimeNumericUpDown.Value.ToString()); - - // use mp thumbs dir - dbHandlerInstance.WriteSetting(ProgramUtils.cUSE_MP_THUMBS_DIR, checkBoxUseThumbsDir.Checked.ToString()); + using (Settings xmlwriter = new Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + xmlwriter.SetValue("myProgramsAlt", "PluginTitle", titleTextBox.Text); + xmlwriter.SetValue("myProgramsAlt", "slideSpeed", sleepTimeNumericUpDown.Value); + xmlwriter.SetValueAsBool("myProgramsAlt", "rememberLastApp", checkBoxRememberLastApp.Checked); + } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-11-04 18:06:02 UTC (rev 1025) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.cs 2007-11-04 18:09:40 UTC (rev 1026) @@ -67,7 +67,12 @@ ProgramViewHandler viewHandler = ProgramViewHandler.Instance; List<ApplicationItem> globalApplicationList;// dbHandlerInstance.ApplicationItemList; - int slideSpeed = 3000; // speed in milliseconds between two slides + //settings begin + static string pluginTitle = string.Empty; + static int slideSpeed = 3000; // speed in milliseconds between two slides + static bool rememberLastApp = false; + //settings end + long slideTime = 0; static string _thumbnailPath = string.Empty; static string _lastThumbnailPath = string.Empty; @@ -258,10 +263,12 @@ void LoadSettings() { - slideSpeed = ProgramUtils.GetSleepTime(); - using (Settings xmlreader = new Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { + pluginTitle = xmlreader.GetValueAsString("myProgramsAlt", "PluginTitle", ProgramUtils.cDefaultPluginTitle); + slideSpeed = xmlreader.GetValueAsInt("myProgramsAlt", "slideSpeed", 3000); + rememberLastApp = xmlreader.GetValueAsBool("myProgramsAlt", "rememberLastApp", false); + CurrentSortMethod = (ProgramSort.SortMethod)xmlreader.GetValueAsInt("myProgramsAlt", "sortMethod", (int)ProgramSort.SortMethod.Title); CurrentLayout = (Layout)xmlreader.GetValueAsInt("myProgramsAlt", "viewLayout", (int)Layout.List); @@ -269,7 +276,10 @@ {//create a fake tmpappitem so it's not null currentApplicationItem = new ApplicationItemGrouper(); } - currentApplicationItem.ApplicationItemId = xmlreader.GetValueAsInt("myProgramsAlt", "applicationItemId", -1); + if (rememberLastApp) + currentApplicationItem.ApplicationItemId = xmlreader.GetValueAsInt("myProgramsAlt", "applicationItemId", -1); + else + currentApplicationItem.ApplicationItemId = -1; ViewHandler.CurrentLevel = xmlreader.GetValueAsInt("myProgramsAlt", "lastViewLevel", -1); CurrentSortAsc = xmlreader.GetValueAsBool("myProgramsAlt", "sortASC", true); @@ -318,15 +328,7 @@ } else { - string strText = dbHandlerInstance.ReadSetting(ProgramUtils.cPLUGINTITLE); - if ((strText != "") && (strText != null)) - { - GUIPropertyManager.SetProperty("#curheader", strText); - } - else - { - GUIPropertyManager.SetProperty("#curheader", GUILocalizeStrings.Get(0)); - } + GUIPropertyManager.SetProperty("#curheader", pluginTitle); } btnViewAs.Label = GetViewLayoutAsText(); @@ -1112,16 +1114,10 @@ /// false : plugin does not need its own button on home</returns> public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { - string strText = dbHandlerInstance.ReadSetting(ProgramUtils.cPLUGINTITLE); - if ((strText != "") && (strText != null)) + using (Settings xmlreader = new Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { - strButtonText = strText; + strButtonText = xmlreader.GetValueAsString("myProgramsAlt", "PluginTitle", ProgramUtils.cDefaultPluginTitle); } - else - { - strButtonText = ProgramUtils.cDefaultPluginTitle; - } - strButtonImage = ""; strButtonImageFocus = ""; strPictureImage = ""; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-11-04 18:06:02 UTC (rev 1025) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-11-04 18:09:40 UTC (rev 1026) @@ -135,8 +135,6 @@ public const string cGAMEBASE = "GAMEBASE"; // Settings - public const string cPLUGINTITLE = "PLUGINTITLE"; - public const string cSLIDESPEED = "SLIDESPEED"; public const string cUSE_MP_THUMBS_DIR = "USE_MP_THUMBS_DIR"; @@ -422,16 +420,6 @@ #region Thumb/Image stuff - public static int GetSleepTime() - { - int sleepTime; - - if (int.TryParse(DatabaseHandler.DBHandlerInstance.ReadSetting(ProgramUtils.cSLIDESPEED), out sleepTime)) - return sleepTime; - else - return cDefaultSleepTime; - } - public static bool UseThumbsDir() { bool useThumbsDir; Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-04 18:06:02 UTC (rev 1025) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-04 18:09:40 UTC (rev 1026) @@ -30,6 +30,7 @@ --------------- -- ChangeLog -- --------------- +2007-11-04: chefkoch : changed: remember last used application is now optional 2007-11-04: chefkoch : plugin is distributed as MPI package from now on 2007-11-04: chefkoch : changed: plugin uses now it's own WindowsIDs (not Window.Files anymore) to prevent problems with old MyPrograms PluginName 2007-11-04: chefkoch : fixed: if default title "My Programs Alt." was used, "My Programs" was displayed in GUI @@ -39,10 +40,6 @@ 2007-10-09: chefkoch : fixed navigation in bluetwo skin file - - - - ---------------- -- more infos -- ---------------- @@ -86,7 +83,7 @@ -Change graphics for fileinfobackground (it says mymovies...) BUGS: - - When starting the configuration and the "myProgramsAltPreconfiguration.xml" is missing, it will throw an exception. +[fixed] When starting the configuration and the "myProgramsAltPreconfiguration.xml" is missing, it will throw an exception. - Exception when opening the plugin in GUI, something with currentapplication == null, catched it with try{}catch{}-statement Modified: trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp =================================================================== --- trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp 2007-11-04 18:06:02 UTC (rev 1025) +++ trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp 2007-11-04 18:09:40 UTC (rev 1026) @@ -8,7 +8,7 @@ <Source>GUIProgramsAlt\bin\Release\GUIProgramsAlt.dll</Source> <Id>01010</Id> <Option /> - <Guid>591a053f-dbfd-42d5-8662-3e506d59c7fc</Guid> + <Guid>71910bfb-9ee2-445d-9c76-b93aba6bced3</Guid> </File> <File> <FileName>myProgramsAlt.xml</FileName> @@ -17,7 +17,7 @@ <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAlt.xml</Source> <Id>02010</Id> <Option>OutputFileName=|DefaultFile=True|</Option> - <Guid>46a7fbc9-a28e-47a1-a27b-fab318f79c05</Guid> + <Guid>062d6b00-83c7-4876-8f0b-debb2bed6c5b</Guid> </File> <File> <FileName>myProgramsAltFileInfo.xml</FileName> @@ -26,7 +26,7 @@ <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAltFileInfo.xml</Source> <Id>02010</Id> <Option>OutputFileName=|DefaultFile=True|</Option> - <Guid>1fa8dd2b-5119-4363-8600-c0a89858cd02</Guid> + <Guid>7dde964f-674f-4b41-923e-cb2c5d00c12c</Guid> </File> <File> <FileName>myProgramsAltPreconfiguration.xml</FileName> @@ -35,7 +35,7 @@ <Source>GUIProgramsAlt\MetaData\myProgramsAltPreconfiguration.xml</Source> <Id>02010</Id> <Option /> - <Guid>6b4a0879-a870-42c0-8c81-ca997efa4825</Guid> + <Guid>da68b967-88fd-4509-b0d1-16a9f6c435ab</Guid> </File> <File> <FileName>README.txt</FileName> @@ -44,7 +44,7 @@ <Source>README.txt</Source> <Id>04010</Id> <Option>OutputFileName=MyPrograms2_ReadMe|DefaultFile=False|</Option> - <Guid>475f4b9d-b611-437e-8214-4a48afcdf6c6</Guid> + <Guid>418d38f1-3fb9-4d12-b190-d9e4315f6f3a</Guid> </File> <File> <FileName>System.Data.SQLite.DLL</FileName> @@ -53,7 +53,7 @@ <Source>GUIProgramsAlt\bin\Release\System.Data.SQLite.DLL</Source> <Id>04010</Id> <Option /> - <Guid>b6192c05-5345-407e-8410-33b26a2513f6</Guid> + <Guid>b4d409d8-4fbd-43f3-81d7-5062f19ee48a</Guid> </File> </FileList> <StringList /> @@ -68,7 +68,7 @@ <ProiectName>MyPrograms2</ProiectName> <Author>chefkoch,northern</Author> <UpdateURL>http://www.team-mediaportal.com</UpdateURL> - <Version>0.1.0.8</Version> + <Version>0.1.0.9</Version> <Description>myprograms2 is a complete rewrite of weabeard's MyPrograms plugin. it's able to start apps and games.</Description> <Group>Games</Group> <Release>Test</Release> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-11-19 22:45:33
|
Revision: 1078 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1078&view=rev Author: chef_koch Date: 2007-11-19 14:45:30 -0800 (Mon, 19 Nov 2007) Log Message: ----------- added: option to set an application item as root, is now possible to set up in configuration Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.resx trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-11-19 17:42:47 UTC (rev 1077) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-11-19 22:45:30 UTC (rev 1078) @@ -64,44 +64,49 @@ // enabledCheckbox // this.enabledCheckbox.AutoSize = true; - this.enabledCheckbox.Location = new System.Drawing.Point(427, 17); + this.enabledCheckbox.Location = new System.Drawing.Point(8, 60); this.enabledCheckbox.Name = "enabledCheckbox"; - this.enabledCheckbox.Size = new System.Drawing.Size(65, 17); + this.enabledCheckbox.Size = new System.Drawing.Size(64, 17); this.enabledCheckbox.TabIndex = 1; this.enabledCheckbox.Text = "Enabled"; this.enabledCheckbox.UseVisualStyleBackColor = true; // // titleLabel // - this.titleLabel.Location = new System.Drawing.Point(2, 71); + this.titleLabel.AutoSize = true; + this.titleLabel.Location = new System.Drawing.Point(5, 82); this.titleLabel.Name = "titleLabel"; - this.titleLabel.Size = new System.Drawing.Size(93, 20); + this.titleLabel.Size = new System.Drawing.Size(31, 13); this.titleLabel.TabIndex = 2; this.titleLabel.Text = "Title:"; this.titleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // applicationExeLabel // - this.applicationExeLabel.Location = new System.Drawing.Point(2, 97); + this.applicationExeLabel.AutoSize = true; + this.applicationExeLabel.Location = new System.Drawing.Point(5, 109); this.applicationExeLabel.Name = "applicationExeLabel"; - this.applicationExeLabel.Size = new System.Drawing.Size(93, 20); + this.applicationExeLabel.Size = new System.Drawing.Size(63, 13); this.applicationExeLabel.TabIndex = 3; this.applicationExeLabel.Text = "Application:"; this.applicationExeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // titleTextBox // + this.titleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.titleTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.titleTextBox.Location = new System.Drawing.Point(93, 71); + this.titleTextBox.Location = new System.Drawing.Point(100, 80); this.titleTextBox.Name = "titleTextBox"; - this.titleTextBox.Size = new System.Drawing.Size(325, 20); + this.titleTextBox.Size = new System.Drawing.Size(357, 21); this.titleTextBox.TabIndex = 4; this.titleTextBox.TextChanged += new System.EventHandler(this.titleTextBox_TextChanged); // // applicationExeButton // + this.applicationExeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.applicationExeButton.Image = global::GUIProgramsAlt.Properties.Resources.browseButtonImage; - this.applicationExeButton.Location = new System.Drawing.Point(426, 96); + this.applicationExeButton.Location = new System.Drawing.Point(463, 107); this.applicationExeButton.Name = "applicationExeButton"; this.applicationExeButton.Size = new System.Drawing.Size(31, 23); this.applicationExeButton.TabIndex = 6; @@ -111,9 +116,9 @@ // shellexecuteCheckBox // this.shellexecuteCheckBox.AutoSize = true; - this.shellexecuteCheckBox.Location = new System.Drawing.Point(5, 345); + this.shellexecuteCheckBox.Location = new System.Drawing.Point(8, 354); this.shellexecuteCheckBox.Name = "shellexecuteCheckBox"; - this.shellexecuteCheckBox.Size = new System.Drawing.Size(88, 17); + this.shellexecuteCheckBox.Size = new System.Drawing.Size(87, 17); this.shellexecuteCheckBox.TabIndex = 7; this.shellexecuteCheckBox.Text = "ShellExecute"; this.shellexecuteCheckBox.UseVisualStyleBackColor = true; @@ -122,59 +127,68 @@ // waitExitCheckBox // this.waitExitCheckBox.AutoSize = true; - this.waitExitCheckBox.Location = new System.Drawing.Point(5, 391); + this.waitExitCheckBox.Location = new System.Drawing.Point(8, 400); this.waitExitCheckBox.Name = "waitExitCheckBox"; - this.waitExitCheckBox.Size = new System.Drawing.Size(82, 17); + this.waitExitCheckBox.Size = new System.Drawing.Size(86, 17); this.waitExitCheckBox.TabIndex = 8; this.waitExitCheckBox.Text = "Wait for exit"; this.waitExitCheckBox.UseVisualStyleBackColor = true; // // applicationImageLabel // - this.applicationImageLabel.Location = new System.Drawing.Point(2, 124); + this.applicationImageLabel.AutoSize = true; + this.applicationImageLabel.Location = new System.Drawing.Point(5, 136); this.applicationImageLabel.Name = "applicationImageLabel"; - this.applicationImageLabel.Size = new System.Drawing.Size(93, 20); + this.applicationImageLabel.Size = new System.Drawing.Size(70, 13); this.applicationImageLabel.TabIndex = 11; this.applicationImageLabel.Text = "App. Picture:"; this.applicationImageLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // applicationArgumentsLabel // - this.applicationArgumentsLabel.Location = new System.Drawing.Point(2, 150); + this.applicationArgumentsLabel.AutoSize = true; + this.applicationArgumentsLabel.Location = new System.Drawing.Point(5, 163); this.applicationArgumentsLabel.Name = "applicationArgumentsLabel"; - this.applicationArgumentsLabel.Size = new System.Drawing.Size(93, 20); + this.applicationArgumentsLabel.Size = new System.Drawing.Size(89, 13); this.applicationArgumentsLabel.TabIndex = 12; this.applicationArgumentsLabel.Text = "App. Arguments:"; this.applicationArgumentsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // applicationImageTextBox // + this.applicationImageTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.applicationImageTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.applicationImageTextBox.Location = new System.Drawing.Point(93, 124); + this.applicationImageTextBox.Location = new System.Drawing.Point(100, 134); this.applicationImageTextBox.Name = "applicationImageTextBox"; - this.applicationImageTextBox.Size = new System.Drawing.Size(325, 20); + this.applicationImageTextBox.Size = new System.Drawing.Size(357, 21); this.applicationImageTextBox.TabIndex = 13; this.applicationImageTextBox.TextChanged += new System.EventHandler(this.applicationImageTextBox_TextChanged); // // applicationArgumentsTextBox // + this.applicationArgumentsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.applicationArgumentsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.applicationArgumentsTextBox.Location = new System.Drawing.Point(93, 150); + this.applicationArgumentsTextBox.Location = new System.Drawing.Point(100, 161); this.applicationArgumentsTextBox.Name = "applicationArgumentsTextBox"; - this.applicationArgumentsTextBox.Size = new System.Drawing.Size(325, 20); + this.applicationArgumentsTextBox.Size = new System.Drawing.Size(357, 21); this.applicationArgumentsTextBox.TabIndex = 14; // // winStyleLabel // - this.winStyleLabel.Location = new System.Drawing.Point(2, 177); + this.winStyleLabel.AutoSize = true; + this.winStyleLabel.Location = new System.Drawing.Point(5, 191); this.winStyleLabel.Name = "winStyleLabel"; - this.winStyleLabel.Size = new System.Drawing.Size(93, 20); + this.winStyleLabel.Size = new System.Drawing.Size(56, 13); this.winStyleLabel.TabIndex = 15; this.winStyleLabel.Text = "Win Style:"; this.winStyleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // winStyleComboBox // + this.winStyleComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.winStyleComboBox.BackColor = System.Drawing.SystemColors.Window; this.winStyleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.winStyleComboBox.FormattingEnabled = true; @@ -183,16 +197,17 @@ "Hidden", "Minimized", "Maximized"}); - this.winStyleComboBox.Location = new System.Drawing.Point(93, 177); + this.winStyleComboBox.Location = new System.Drawing.Point(100, 188); this.winStyleComboBox.Name = "winStyleComboBox"; - this.winStyleComboBox.Size = new System.Drawing.Size(325, 21); + this.winStyleComboBox.Size = new System.Drawing.Size(357, 21); this.winStyleComboBox.TabIndex = 16; // // startupDirLabel // - this.startupDirLabel.Location = new System.Drawing.Point(2, 204); + this.startupDirLabel.AutoSize = true; + this.startupDirLabel.Location = new System.Drawing.Point(5, 218); this.startupDirLabel.Name = "startupDirLabel"; - this.startupDirLabel.Size = new System.Drawing.Size(85, 20); + this.startupDirLabel.Size = new System.Drawing.Size(64, 13); this.startupDirLabel.TabIndex = 18; this.startupDirLabel.Text = "StartUp Dir:"; this.startupDirLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -200,17 +215,18 @@ // quoteCheckBox // this.quoteCheckBox.AutoSize = true; - this.quoteCheckBox.Location = new System.Drawing.Point(5, 322); + this.quoteCheckBox.Location = new System.Drawing.Point(8, 331); this.quoteCheckBox.Name = "quoteCheckBox"; - this.quoteCheckBox.Size = new System.Drawing.Size(102, 17); + this.quoteCheckBox.Size = new System.Drawing.Size(104, 17); this.quoteCheckBox.TabIndex = 19; this.quoteCheckBox.Text = "Quote filenames"; this.quoteCheckBox.UseVisualStyleBackColor = true; // // applicationImageButton // + this.applicationImageButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.applicationImageButton.Image = global::GUIProgramsAlt.Properties.Resources.browseButtonImage; - this.applicationImageButton.Location = new System.Drawing.Point(426, 121); + this.applicationImageButton.Location = new System.Drawing.Point(463, 134); this.applicationImageButton.Name = "applicationImageButton"; this.applicationImageButton.Size = new System.Drawing.Size(31, 23); this.applicationImageButton.TabIndex = 26; @@ -219,8 +235,9 @@ // // startupDirButton // + this.startupDirButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.startupDirButton.Image = global::GUIProgramsAlt.Properties.Resources.browseButtonImage; - this.startupDirButton.Location = new System.Drawing.Point(426, 201); + this.startupDirButton.Location = new System.Drawing.Point(463, 215); this.startupDirButton.Name = "startupDirButton"; this.startupDirButton.Size = new System.Drawing.Size(31, 23); this.startupDirButton.TabIndex = 27; @@ -230,20 +247,23 @@ // allowGUIImportCheckBox // this.allowGUIImportCheckBox.AutoSize = true; - this.allowGUIImportCheckBox.Location = new System.Drawing.Point(5, 368); + this.allowGUIImportCheckBox.Location = new System.Drawing.Point(8, 377); this.allowGUIImportCheckBox.Name = "allowGUIImportCheckBox"; - this.allowGUIImportCheckBox.Size = new System.Drawing.Size(201, 17); + this.allowGUIImportCheckBox.Size = new System.Drawing.Size(209, 17); this.allowGUIImportCheckBox.TabIndex = 30; this.allowGUIImportCheckBox.Text = "Allow reimport from within mediaportal"; this.allowGUIImportCheckBox.UseVisualStyleBackColor = true; // // informationLabel // + this.informationLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.informationLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 19F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.informationLabel.Location = new System.Drawing.Point(4, 6); + this.informationLabel.Location = new System.Drawing.Point(3, 0); this.informationLabel.Name = "informationLabel"; - this.informationLabel.Size = new System.Drawing.Size(396, 57); + this.informationLabel.Size = new System.Drawing.Size(491, 57); this.informationLabel.TabIndex = 31; + this.informationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // openFileDialog // @@ -251,26 +271,30 @@ // // applicationExeTextBox // + this.applicationExeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.applicationExeTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.applicationExeTextBox.Location = new System.Drawing.Point(93, 98); + this.applicationExeTextBox.Location = new System.Drawing.Point(100, 107); this.applicationExeTextBox.Name = "applicationExeTextBox"; - this.applicationExeTextBox.Size = new System.Drawing.Size(325, 20); + this.applicationExeTextBox.Size = new System.Drawing.Size(357, 21); this.applicationExeTextBox.TabIndex = 32; this.applicationExeTextBox.TextChanged += new System.EventHandler(this.applicationExeTextBox_TextChanged); // // startupDirComboBox // + this.startupDirComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.startupDirComboBox.FormattingEnabled = true; - this.startupDirComboBox.Location = new System.Drawing.Point(93, 204); + this.startupDirComboBox.Location = new System.Drawing.Point(100, 215); this.startupDirComboBox.Name = "startupDirComboBox"; - this.startupDirComboBox.Size = new System.Drawing.Size(325, 21); + this.startupDirComboBox.Size = new System.Drawing.Size(357, 21); this.startupDirComboBox.TabIndex = 36; // // pictureBox // this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pictureBox.InitialImage = null; - this.pictureBox.Location = new System.Drawing.Point(248, 322); + this.pictureBox.Location = new System.Drawing.Point(251, 331); this.pictureBox.Name = "pictureBox"; this.pictureBox.Size = new System.Drawing.Size(170, 170); this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -279,36 +303,42 @@ // // postCommandsLabel // - this.postCommandsLabel.Location = new System.Drawing.Point(2, 257); + this.postCommandsLabel.AutoSize = true; + this.postCommandsLabel.Location = new System.Drawing.Point(5, 271); this.postCommandsLabel.Name = "postCommandsLabel"; - this.postCommandsLabel.Size = new System.Drawing.Size(85, 20); + this.postCommandsLabel.Size = new System.Drawing.Size(80, 13); this.postCommandsLabel.TabIndex = 40; this.postCommandsLabel.Text = "PostCommands"; this.postCommandsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // preCommandTextBox // + this.preCommandTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.preCommandTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.preCommandTextBox.Location = new System.Drawing.Point(93, 231); + this.preCommandTextBox.Location = new System.Drawing.Point(100, 242); this.preCommandTextBox.Name = "preCommandTextBox"; - this.preCommandTextBox.Size = new System.Drawing.Size(325, 20); + this.preCommandTextBox.Size = new System.Drawing.Size(357, 21); this.preCommandTextBox.TabIndex = 39; // // preCommandsLabel // - this.preCommandsLabel.Location = new System.Drawing.Point(2, 231); + this.preCommandsLabel.AutoSize = true; + this.preCommandsLabel.Location = new System.Drawing.Point(5, 244); this.preCommandsLabel.Name = "preCommandsLabel"; - this.preCommandsLabel.Size = new System.Drawing.Size(93, 20); + this.preCommandsLabel.Size = new System.Drawing.Size(79, 13); this.preCommandsLabel.TabIndex = 38; this.preCommandsLabel.Text = "PreCommands:"; this.preCommandsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // postCommandTextBox // + this.postCommandTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.postCommandTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.postCommandTextBox.Location = new System.Drawing.Point(93, 257); + this.postCommandTextBox.Location = new System.Drawing.Point(100, 269); this.postCommandTextBox.Name = "postCommandTextBox"; - this.postCommandTextBox.Size = new System.Drawing.Size(325, 20); + this.postCommandTextBox.Size = new System.Drawing.Size(357, 21); this.postCommandTextBox.TabIndex = 41; // // AppSettingsBase @@ -374,10 +404,10 @@ protected System.Windows.Forms.OpenFileDialog openFileDialog; protected System.Windows.Forms.TextBox applicationExeTextBox; protected System.Windows.Forms.ComboBox startupDirComboBox; - private System.Windows.Forms.PictureBox pictureBox; protected System.Windows.Forms.Label postCommandsLabel; protected System.Windows.Forms.TextBox preCommandTextBox; protected System.Windows.Forms.Label preCommandsLabel; protected System.Windows.Forms.TextBox postCommandTextBox; + protected System.Windows.Forms.PictureBox pictureBox; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-11-19 17:42:47 UTC (rev 1077) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs 2007-11-19 22:45:30 UTC (rev 1078) @@ -30,6 +30,7 @@ { this.platformComboBox = new System.Windows.Forms.ComboBox(); this.platformLabel = new System.Windows.Forms.Label(); + this.rootCheckBox = new System.Windows.Forms.CheckBox(); this.SuspendLayout(); // // enabledCheckbox @@ -42,9 +43,13 @@ // // shellexecuteCheckBox // - this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific fileItem-" + - "extension.\r\nYou can omit the \"Launching Application\" in this case."); + this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific fileI" + + "tem-extension.\r\nYou can omit the \"Launching Application\" in this case."); // + // waitExitCheckBox + // + this.toolTip.SetToolTip(this.waitExitCheckBox, "If you want mediaportal to wait for exit while running application."); + // // applicationArgumentsLabel // this.toolTip.SetToolTip(this.applicationArgumentsLabel, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + @@ -78,31 +83,48 @@ // // platformComboBox // + this.platformComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.platformComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.platformComboBox.FormattingEnabled = true; - this.platformComboBox.Location = new System.Drawing.Point(93, 286); + this.platformComboBox.Location = new System.Drawing.Point(100, 296); this.platformComboBox.Name = "platformComboBox"; - this.platformComboBox.Size = new System.Drawing.Size(325, 21); + this.platformComboBox.Size = new System.Drawing.Size(357, 21); this.platformComboBox.TabIndex = 42; // // platformLabel // this.platformLabel.AutoSize = true; this.platformLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.platformLabel.Location = new System.Drawing.Point(2, 289); + this.platformLabel.Location = new System.Drawing.Point(5, 299); this.platformLabel.Name = "platformLabel"; - this.platformLabel.Size = new System.Drawing.Size(84, 13); + this.platformLabel.Size = new System.Drawing.Size(89, 13); this.platformLabel.TabIndex = 41; this.platformLabel.Text = "Default platform:"; // + // rootCheckBox + // + this.rootCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.rootCheckBox.AutoSize = true; + this.rootCheckBox.Location = new System.Drawing.Point(346, 60); + this.rootCheckBox.Name = "rootCheckBox"; + this.rootCheckBox.Size = new System.Drawing.Size(148, 17); + this.rootCheckBox.TabIndex = 43; + this.rootCheckBox.Text = "show files in ROOT-folder"; + this.rootCheckBox.UseVisualStyleBackColor = true; + this.rootCheckBox.CheckedChanged += new System.EventHandler(this.rootCheckBox_CheckedChanged); + // // AppSettingsDirCache // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.rootCheckBox); this.Controls.Add(this.platformComboBox); this.Controls.Add(this.platformLabel); this.Name = "AppSettingsDirCache"; this.Load += new System.EventHandler(this.AppSettingsDirCache_Load); + this.Controls.SetChildIndex(this.platformLabel, 0); + this.Controls.SetChildIndex(this.platformComboBox, 0); this.Controls.SetChildIndex(this.preCommandsLabel, 0); this.Controls.SetChildIndex(this.preCommandTextBox, 0); this.Controls.SetChildIndex(this.postCommandsLabel, 0); @@ -128,8 +150,7 @@ this.Controls.SetChildIndex(this.informationLabel, 0); this.Controls.SetChildIndex(this.applicationExeTextBox, 0); this.Controls.SetChildIndex(this.startupDirComboBox, 0); - this.Controls.SetChildIndex(this.platformLabel, 0); - this.Controls.SetChildIndex(this.platformComboBox, 0); + this.Controls.SetChildIndex(this.rootCheckBox, 0); this.ResumeLayout(false); this.PerformLayout(); @@ -139,6 +160,7 @@ protected System.Windows.Forms.ComboBox platformComboBox; protected System.Windows.Forms.Label platformLabel; + protected System.Windows.Forms.CheckBox rootCheckBox; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-11-19 17:42:47 UTC (rev 1077) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-11-19 22:45:30 UTC (rev 1078) @@ -51,6 +51,11 @@ ProgramUtils.FillComboBox("tblPlatform", "platform", platformComboBox); base.LoadSettings(applicationItem); + if (applicationItem.Title == "@ROOT@") + rootCheckBox.Checked = true; + else + rootCheckBox.Checked = false; + startupDirComboBox.Text = applicationItem.StartupDir; shellexecuteCheckBox.Checked = applicationItem.UseShellExecute; quoteCheckBox.Checked = applicationItem.UseQuotes; @@ -105,18 +110,15 @@ public override void LoadFromAppItem(ApplicationItem applicationItem) { - informationLabel.Text = applicationItem.Title; + informationLabel.Text = applicationItem.Title; titleTextBox.Text = applicationItem.Title; - applicationExeTextBox.Text = applicationItem.Executable; - + applicationExeTextBox.Text = applicationItem.Executable; applicationArgumentsTextBox.Text = applicationItem.Arguments; startupDirComboBox.Text = applicationItem.StartupDir; - shellexecuteCheckBox.Checked = applicationItem.UseShellExecute; quoteCheckBox.Checked = applicationItem.UseQuotes; waitExitCheckBox.Checked = applicationItem.WaitForExit; platformComboBox.SelectedValue = applicationItem.PlatformId; - } private void AppSettingsDirCache_Load(object sender, EventArgs e) @@ -127,5 +129,29 @@ allowGUIImportCheckBox.Checked = false; } + + private void rootCheckBox_CheckedChanged(object sender, EventArgs e) + { + if (this.rootCheckBox.Checked) + { + this.titleTextBox.Text = @"@ROOT@"; + this.titleTextBox.Enabled = false; + + this.shellexecuteCheckBox.Checked = true; + + this.allowGUIImportCheckBox.Checked = false; + this.allowGUIImportCheckBox.Enabled = false; + + this.pictureBox.Visible = false; + } + else + { + this.titleTextBox.Enabled = true; + + this.allowGUIImportCheckBox.Enabled = true; + + this.pictureBox.Visible = true; + } + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.resx 2007-11-19 17:42:47 UTC (rev 1077) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.resx 2007-11-19 22:45:30 UTC (rev 1078) @@ -118,10 +118,10 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>313, 17</value> + <value>292, 17</value> </metadata> <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>150, 17</value> + <value>141, 17</value> </metadata> <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> Modified: trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp =================================================================== --- trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp 2007-11-19 17:42:47 UTC (rev 1077) +++ trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp 2007-11-19 22:45:30 UTC (rev 1078) @@ -8,7 +8,7 @@ <Source>GUIProgramsAlt\bin\Release\GUIProgramsAlt.dll</Source> <Id>01010</Id> <Option /> - <Guid>57893c55-dcc4-4a2f-bc23-b05c7c653c7e</Guid> + <Guid>525634c1-4fad-4e93-b0c4-9ac1856fca7d</Guid> </File> <File> <FileName>myProgramsAlt.xml</FileName> @@ -17,7 +17,7 @@ <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAlt.xml</Source> <Id>02010</Id> <Option>OutputFileName=|DefaultFile=True|</Option> - <Guid>972438e5-d3cc-4e34-9aaa-6ae9cf39b023</Guid> + <Guid>9eda7ceb-1bd1-444c-80d6-1ae34ab369c8</Guid> </File> <File> <FileName>myProgramsAltFileInfo.xml</FileName> @@ -26,7 +26,7 @@ <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAltFileInfo.xml</Source> <Id>02010</Id> <Option>OutputFileName=|DefaultFile=True|</Option> - <Guid>58a988af-5557-4ec9-a0b7-2b862c6f9887</Guid> + <Guid>86600492-8319-4dfe-9584-83747e174f86</Guid> </File> <File> <FileName>myProgramsAltPreconfiguration.xml</FileName> @@ -35,7 +35,7 @@ <Source>GUIProgramsAlt\MetaData\myProgramsAltPreconfiguration.xml</Source> <Id>02010</Id> <Option /> - <Guid>1a909c22-67c5-4915-8c92-e7464d416e0a</Guid> + <Guid>6f29ab27-c903-4292-883b-927ee42b0512</Guid> </File> <File> <FileName>README.txt</FileName> @@ -44,7 +44,7 @@ <Source>README.txt</Source> <Id>04010</Id> <Option>OutputFileName=MyPrograms2_ReadMe|DefaultFile=False|</Option> - <Guid>1d7ab3ca-a21a-4953-ac24-ffd485215ae1</Guid> + <Guid>d4fd583e-a581-42e7-9e84-6cd8a2e7dec2</Guid> </File> <File> <FileName>System.Data.SQLite.DLL</FileName> @@ -53,12 +53,13 @@ <Source>GUIProgramsAlt\bin\Release\System.Data.SQLite.DLL</Source> <Id>04010</Id> <Option /> - <Guid>17cf81f6-0105-42f2-aaa4-9246a856d21a</Guid> + <Guid>8ce8bd92-3c7d-4721-908d-29bc440d5ab4</Guid> </File> </FileList> <StringList /> <Actions> <Action Place="POSTSETUP" Id="1" Command="GUIProgramsAlt.dll" /> + <Action Place="POSTSETUP" Id="1" Command="GUIProgramsAlt.dll" /> </Actions> <SetupGroups /> <SetupGroupMappings /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-11-28 22:59:54
|
Revision: 1101 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1101&view=rev Author: chef_koch Date: 2007-11-28 14:59:51 -0800 (Wed, 28 Nov 2007) Log Message: ----------- fixed: it is possible to change the imagefile in file details dialog, even if default folder/filenames were used Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-11-28 19:34:14 UTC (rev 1100) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-11-28 22:59:51 UTC (rev 1101) @@ -74,13 +74,11 @@ txtFilename.Text = m_CurFile.Filename; if (ProgramUtils.UseThumbsDir()) - { txtImageFile.Text = ProgramUtils.GetFileImage(CurrentApplicationItem, CurrentFileItem); - } else - { txtImageFile.Text = m_CurFile.Imagefile; - } + txtImageFile.ReadOnly = ProgramUtils.UseThumbsDir(); + btnImageFile.Visible = !ProgramUtils.UseThumbsDir(); FileItemToGenre(); manufacturerComboBox.SelectedValue = CurrentFileItem.ManufacturerId; Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-28 19:34:14 UTC (rev 1100) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-28 22:59:51 UTC (rev 1101) @@ -25,11 +25,17 @@ ------------------ -- Known Issues -- ------------------ + - When adding a new Application item, a new folder called "new item" in thumbs\MyProgramsAlt is created. + - bei mame werden auch die Konsolen-roms importiert (quasi die betriebssystem images der konsolen), das m\xFCsste auch noch raus... schau mal in den thread, ich habe eine anleitung verfasst, da siehst du was ich meine + --------------- -- ChangeLog -- --------------- +v0.1.0.11 +2007-11-28: chefkoch : fixed: it is possible to change the imagefile in file details dialog, even if default folder/filenames were used + v0.1.0.10 2007-11-18: chefkoch : added: option to set an application item as root, so it is possible to show it's files in root view together with other application items This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-11-28 23:04:44
|
Revision: 1102 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1102&view=rev Author: chef_koch Date: 2007-11-28 15:04:42 -0800 (Wed, 28 Nov 2007) Log Message: ----------- fixed: it is possible to edit the imagedirectory on FilesViewTab, even if default folder/filenames were used Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-11-28 22:59:51 UTC (rev 1101) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-11-28 23:04:42 UTC (rev 1102) @@ -782,6 +782,7 @@ if (ProgramUtils.UseThumbsDir()) { imageDirsTextBox.Text = ProgramUtils.GetApplicationImageFolder(currentApplicationItem); + imageDirsTextBox.ReadOnly = ProgramUtils.UseThumbsDir(); ((FileSettingsBox)imageDirsTextBox.Parent).Button.Visible = !ProgramUtils.UseThumbsDir(); } else Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-28 22:59:51 UTC (rev 1101) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-11-28 23:04:42 UTC (rev 1102) @@ -35,6 +35,7 @@ --------------- v0.1.0.11 2007-11-28: chefkoch : fixed: it is possible to change the imagefile in file details dialog, even if default folder/filenames were used +2007-11-28: chefkoch : fixed: it is possible to edit the imagedirectory on FilesViewTab, even if default folder/filenames were used v0.1.0.10 2007-11-18: chefkoch : added: option to set an application item as root, so it is possible to show it's files in root view together with other application items This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2008-01-26 00:02:51
|
Revision: 1313 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1313&view=rev Author: chef_koch Date: 2008-01-25 16:02:47 -0800 (Fri, 25 Jan 2008) Log Message: ----------- updated with latest infos Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2008-01-25 23:53:33 UTC (rev 1312) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2008-01-26 00:02:47 UTC (rev 1313) @@ -36,6 +36,11 @@ --------------- -- ChangeLog -- --------------- +v0.1.0.12 +2007-01-25: chefkoch : fixed/changed: complete rework for the "display files as root"-feature, can be activated multiple times now, also working within grouper items +2007-01-25: chefkoch : fixed/changed: clean up for the thumbs methods, so it should be less checks in "working code" whether we use thumbs dir or db entries, it's now done global by ProgramUtils +2007-01-25: chefkoch : fixed: filesView tabPage was displayed for an grouper-item, which throws an exception + v0.1.0.11 2007-11-28: chefkoch : fixed: it is possible to change the imagefile in file details dialog, even if default folder/filenames were used 2007-11-28: chefkoch : fixed: it is possible to edit the imagedirectory on FilesViewTab, even if default folder/filenames were used Modified: trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp =================================================================== --- trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp 2008-01-25 23:53:33 UTC (rev 1312) +++ trunk/plugins/myGUIProgramsAlt/myProgramsAlt.xmp 2008-01-26 00:02:47 UTC (rev 1313) @@ -8,7 +8,7 @@ <Source>GUIProgramsAlt\bin\Release\GUIProgramsAlt.dll</Source> <Id>01010</Id> <Option /> - <Guid>84d94cae-da4f-4f4e-b472-f592db35dafc</Guid> + <Guid>8d76c257-470f-4dc6-9bda-34fce25b1364</Guid> </File> <File> <FileName>myProgramsAlt.xml</FileName> @@ -17,7 +17,7 @@ <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAlt.xml</Source> <Id>02010</Id> <Option>OutputFileName=|DefaultFile=True|</Option> - <Guid>0adb9bba-cce3-4bd9-aed3-8c98711fe9e2</Guid> + <Guid>6339c648-e00b-4289-9de8-d66506d7eab4</Guid> </File> <File> <FileName>myProgramsAltFileInfo.xml</FileName> @@ -26,7 +26,7 @@ <Source>GUIProgramsAlt\skin\BlueTwo\myProgramsAltFileInfo.xml</Source> <Id>02010</Id> <Option>OutputFileName=|DefaultFile=True|</Option> - <Guid>36bf36b2-020b-4bcb-956a-c24da608b712</Guid> + <Guid>7ce0d828-b831-4cae-b6f7-ef38a25dd8c5</Guid> </File> <File> <FileName>myProgramsAltPreconfiguration.xml</FileName> @@ -35,7 +35,7 @@ <Source>GUIProgramsAlt\MetaData\myProgramsAltPreconfiguration.xml</Source> <Id>02010</Id> <Option /> - <Guid>cd26ed80-2a56-4256-bf6f-84a8d6c1b3e9</Guid> + <Guid>828a7a89-961f-4dda-a102-0e94483c943c</Guid> </File> <File> <FileName>System.Data.SQLite.DLL</FileName> @@ -44,7 +44,7 @@ <Source>GUIProgramsAlt\bin\Release\System.Data.SQLite.DLL</Source> <Id>04010</Id> <Option /> - <Guid>d1db7f11-dd44-40c7-8dfc-a549fb951c65</Guid> + <Guid>5a280f99-c8e5-413d-8d3f-342465640a79</Guid> </File> </FileList> <StringList /> @@ -60,7 +60,7 @@ <ProiectName>myProgramsAlt</ProiectName> <Author>northern,chefkoch</Author> <UpdateURL>http://www.team-mediaportal.com</UpdateURL> - <Version>0.1.0.11</Version> + <Version>0.1.0.12</Version> <Description>myProgramsAlt is a complete rewrite of weabeard's MyPrograms plugin. it's able to start apps and games.</Description> <Group>Games</Group> <Release>Test</Release> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |