From: <nor...@us...> - 2007-07-01 13:47:39
|
Revision: 659 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=659&view=rev Author: northern_sky Date: 2007-07-01 06:47:34 -0700 (Sun, 01 Jul 2007) Log Message: ----------- DB: moved System,Manufacturer, Genre to own enttis. Added basic support for config of these, NOTE: tested around, but still some more work to do + remove redunant code. Slowed down gamebase import and mame, as we also import genres,manufacturer etc to lexicon tables. Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-07-01 07:49:46 UTC (rev 658) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-07-01 13:47:34 UTC (rev 659) @@ -851,7 +851,7 @@ // won't work in multiuser environment :) SQLiteResultSet results; int res = 0; - results = sqlDB.Execute("SELECT MAX(APPID) FROM tblApplicationItem"); + results = sqlDB.Execute("SELECT MAX(applicationId) FROM tblApplicationItem"); SQLiteResultSet.Row arr = results.Rows[0]; if (arr.fields[0] != null) { @@ -878,8 +878,8 @@ INSERT INTO tblApplicationItem ( - appid, - fatherID, + applicationId, + fatherNodeId, title, filename, arguments, @@ -973,7 +973,7 @@ importvalidimagesonly = '" + ProgramUtils.BooleanToStr(importValidImagesOnly) + @"', iposition = " + Position + @", enabled = '" + ProgramUtils.BooleanToStr(Enabled) + @"', - fatherID = '" + FatherID + @"', + fatherNodeId = '" + FatherID + @"', enableGUIRefresh = '" + ProgramUtils.BooleanToStr(EnableGUIRefresh) + @"', GUIRefreshPossible = '" + ProgramUtils.BooleanToStr(GUIRefreshPossible) +@"', contentID = '" + ContentID + @"', @@ -982,7 +982,7 @@ preLaunch = '" + ProgramUtils.Encode(PreLaunch) + @"', postLaunch = '" + ProgramUtils.Encode(PostLaunch) + @"' - WHERE appID = " + AppID); + WHERE applicationId = " + AppID); sqlDB.Execute(sql); } catch (SQLiteException ex) @@ -1001,7 +1001,7 @@ { DeleteFiles(); DeleteFileLinks(); - sqlDB.Execute(String.Format("delete from tblApplicationItem where appid = {0}", AppID)); + sqlDB.Execute(String.Format("delete from tblApplicationItem where applicationId = {0}", AppID)); } catch (SQLiteException ex) { @@ -1017,7 +1017,7 @@ try { - sqlDB.Execute(String.Format("delete from tblFileItem where appid = {0}", AppID)); + sqlDB.Execute(String.Format("delete from tblFileItem where applicationId = {0}", AppID)); } catch (SQLiteException ex) { @@ -1032,7 +1032,7 @@ try { - sqlDB.Execute(String.Format("delete from tblFilterItem where appid = {0} or grouperappid = {0}", AppID)); + sqlDB.Execute(String.Format("delete from tblFilterItem where applicationId = {0} or grouperappid = {0}", AppID)); } catch (SQLiteException ex) { @@ -1086,10 +1086,10 @@ // are out of sync... fix this here! // query with data to fix - string sqlSelectDataToFix = String.Format("select fi.appid, fi.fileid as oldfileid, f.fileid as newfileid, fi.filename as filename from tblFilterItem fi, tblFileItem f where fi.appID = f.appid and fi.filename = f.filename and fi.appID = {0}", AppID); + 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); // update command to fix one single link - string sqlFixOneLink = "update tblFilterItem set fileID = {0}, tag = 0 where appID = {1} and filename = '{2}'"; + string sqlFixOneLink = "update tblFilterItem set fileID = {0}, tag = 0 where applicationId = {1} and filename = '{2}'"; SQLiteResultSet rows2fix; @@ -1097,7 +1097,7 @@ try { // 1) initialize TAG - sqlDB.Execute(String.Format("update tblFilterItem set tag = 1234 where appid = {0}", AppID)); + sqlDB.Execute(String.Format("update tblFilterItem set tag = 1234 where applicationId = {0}", AppID)); // 2) fix all fileids of the newly imported files rows2fix = sqlDB.Execute(sqlSelectDataToFix); @@ -1112,7 +1112,7 @@ } // 3) delete untouched links ( they were not imported anymore ) - sqlDB.Execute(String.Format("delete from tblFilterItem where appid = {0} and tag = 1234", AppID)); + sqlDB.Execute(String.Format("delete from tblFilterItem where applicationId = {0} and tag = 1234", AppID)); } catch (SQLiteException ex) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-07-01 07:49:46 UTC (rev 658) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-07-01 13:47:34 UTC (rev 659) @@ -58,8 +58,8 @@ ApplicationItem newApp = appFactory.GetApplicationItem(sqlDB, ProgramUtils.GetSourceType(results, recordIndex, "source_type")); newApp.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); newApp.Enabled = ProgramUtils.GetBool(results, recordIndex, "enabled"); - newApp.AppID = ProgramUtils.GetIntDef(results, recordIndex, "appid", -1); - newApp.FatherID = ProgramUtils.GetIntDef(results, recordIndex, "fatherID", -1); + newApp.AppID = ProgramUtils.GetIntDef(results, recordIndex, "applicationId", -1); + newApp.FatherID = ProgramUtils.GetIntDef(results, recordIndex, "fatherNodeId", -1); newApp.Title = ProgramUtils.Get(results, recordIndex, "title"); newApp.Filename = ProgramUtils.Get(results, recordIndex, "filename"); newApp.Arguments = ProgramUtils.Get(results, recordIndex, "arguments"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-07-01 07:49:46 UTC (rev 658) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-07-01 13:47:34 UTC (rev 659) @@ -57,21 +57,28 @@ static DatabaseHandler() { + string DatabasePath = Config.GetFile(Config.Dir.Database, DATABASEFILE); + try { - // Open database - try + + //check if database exists + if (!File.Exists(DatabasePath)) { - Directory.CreateDirectory(Config.GetFolder(Config.Dir.Database)); - } - catch (Exception) { } + sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, DATABASEFILE)); + DatabaseUtility.SetPragmas(sqlDB); - sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, DATABASEFILE )); - DatabaseUtility.SetPragmas(sqlDB); + // make sure the DB-structure is complete + CreateDBTables(); - // make sure the DB-structure is complete - CreateDBTables(); + //fill upp some default lexicon values + InsertDefaultDBValues(); + } + else + { + sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, DATABASEFILE)); + } } catch (SQLiteException ex) { @@ -99,18 +106,140 @@ if (sqlDB == null) return false; - DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, filename text, arguments text, windowstyle text, startupdir text, useshellexecute text, usequotes text, source_type text, source text, imagefile text, filedirectory text, imagedirectory text, validextensions text, enabled text, importvalidimagesonly text, iposition integer, enableGUIRefresh text, GUIRefreshPossible text, contentID integer, systemdefault text, waitforexit text, preLaunch text, postLaunch text)"); - DatabaseUtility.AddTable(sqlDB, "tblFileItem", "CREATE TABLE tblFileItem (fileid integer primary key, appid integer, title text, filename text, imagefile text, mainGenre text, subGenre text, country text, manufacturer text, year integer, rating integer, overview text, system text, import_flag integer, lastTimeLaunched text, launchcount integer, isfolder text, uppertitle text, tagdata text, categorydata text, gameInfoUrl text)"); - DatabaseUtility.AddTable(sqlDB, "tblFilterItem", "CREATE TABLE tblFilterItem (appid integer, grouperAppID integer, fileID integer, filename text, tag integer)"); - DatabaseUtility.AddTable(sqlDB, "tblSetting", "CREATE TABLE tblSetting (settingid integer primary key, key text, value text)"); + + DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", @"CREATE TABLE + tblApplicationItem + ( + applicationId INTEGER PRIMARY KEY, + fatherNodeId INTEGER, + title TEXT, + filename TEXT, + arguments TEXT, + windowstyle TEXT, + startupdir TEXT, + useshellexecute TEXT, + usequotes TEXT, + source_type TEXT, + source TEXT, + imagefile TEXT, + filedirectory TEXT, + imagedirectory TEXT, + validextensions TEXT, + enabled TEXT, + importvalidimagesonly TEXT, + iposition INTEGER, + enableGUIRefresh TEXT, + GUIRefreshPossible TEXT, + contentID INTEGER, + systemdefault TEXT, + waitforexit TEXT, + 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, systemId INTEGER, import_flag INTEGER, lastTimeLaunched TEXT, launchcount INTEGER, isfolder TEXT, uppertitle TEXT, tagdata 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)"); - DatabaseUtility.AddIndex(sqlDB, "idxFile1", "CREATE INDEX idxFile1 ON tblFileItem(appid)"); - DatabaseUtility.AddIndex(sqlDB, "idxApp1", "CREATE INDEX idxApp1 ON tblApplicationItem(fatherID)"); - DatabaseUtility.AddIndex(sqlDB, "idxFilterItem1", "CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(appID, fileID, grouperAppID)"); + DatabaseUtility.AddTable(sqlDB, "tblGenre", @"CREATE TABLE + tblGenre + ( + genreId INTEGER PRIMARY KEY, + genre TEXT + )"); + + DatabaseUtility.AddTable(sqlDB, "tblSystem", @"CREATE TABLE + tblSystem + ( + systemId INTEGER PRIMARY KEY, + system TEXT + )"); + DatabaseUtility.AddTable(sqlDB, "tblManufacturer", @"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)"); + return true; } + /// <summary> + /// Inserting some default values so that the db is preloaded + /// Should always be there. + /// </summary> + private static void InsertDefaultDBValues() + { + //Insert these + + sqlDB.Execute(@"INSERT INTO + tblGenre + ( + genre + ) + VALUES + ( + 'Unknown' + )"); + + sqlDB.Execute(@"INSERT INTO + tblManufacturer + ( + manufacturer + ) + VALUES + ( + 'Unknown' + )"); + + + sqlDB.Execute(@"INSERT INTO + tblSystem + ( + system + ) + VALUES + ( + 'Unknown' + )"); + + FillDefaultDBLexiconHelper("tblSystem","system",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 + string sqlStmt = ""; + + foreach (string insertValue in itemList) + { + sqlStmt = @" + INSERT INTO + " + tableName + @" + ( + " + columnName + @" + ) + VALUES + ( + '" + insertValue + @"' + );"; + + sqlDB.Execute(sqlStmt); + } + + + } + #region dbsettings static public string ReadSetting(string Key) { @@ -193,6 +322,88 @@ } #endregion dbsettings + public static int LexiconDataExists(string tableName, string columnName, string fieldValue) + { + SQLiteResultSet result = null; + + string sqlStmt = @" + SELECT + * + + FROM + " + tableName + @" + + WHERE + " + columnName + @" LIKE '" + fieldValue + "'"; + + string sqlStmtInsert = @" + INSERT INTO + " + tableName + @" + ( + " + columnName + @" + ) + VALUES + ( + '" + fieldValue + @"' + )"; + + try + { + result = sqlDB.Execute(sqlStmt); + if (result.Rows.Count > 0) + { + return Convert.ToInt32(result.Rows[0].fields[0]); + } + else + {//lexion didnt exist, we save it + + sqlDB.Execute(sqlStmtInsert); + return sqlDB.LastInsertID(); + } + } + catch (SQLiteException ex) + { + throw ex; + } + } + + + #region default lexiconvalues + private static List<string> CreateGenreLexiconList() + { + List<string> genreList = new List<string>(); + + + genreList.Add("Shooter"); + genreList.Add("Platform"); + genreList.Add("Adventure"); + + return genreList; + } + + private static List<string> CreateManufacturerLexiconList() + { + List<string> manufacturerList = new List<string>(); + + manufacturerList.Add("Sega"); + manufacturerList.Add("Nintendo"); + manufacturerList.Add("Konami"); + + return manufacturerList; + } + + private static List<string> CreateSystemLexiconList() + { + List<string> systemList = new List<string>(); + + systemList.Add("Sega Mastersystem"); + systemList.Add("Arcade"); + systemList.Add("PC"); + return systemList; + } + + #endregion default lexiconvalues + public static ProgramViewHandler ViewHandler { get { return viewHandler; } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-07-01 07:49:46 UTC (rev 658) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-07-01 13:47:34 UTC (rev 659) @@ -555,7 +555,7 @@ newLink.TargetAppID = curFile.AppID; // 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.AppID); + // Log.Info("Add to Favourites groupAppID:{0} Title:{1} fileID:{2} appID:{3}", GrouperAppID, currentFileItem.Title, currentFileItem.FileID, currentFileItem.applicationId); } foreach (ApplicationItem app in apps) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs 2007-07-01 07:49:46 UTC (rev 658) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs 2007-07-01 13:47:34 UTC (rev 659) @@ -36,24 +36,20 @@ this.cbRating = new MediaPortal.UserInterface.Controls.MPComboBox(); this.txtOverview = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lblOverview = new MediaPortal.UserInterface.Controls.MPLabel(); - this.txtSystem = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lblSystem = new MediaPortal.UserInterface.Controls.MPLabel(); this.txtCountry = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lblCountry = new MediaPortal.UserInterface.Controls.MPLabel(); - this.txtCategoryData = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lblCategoryData = new MediaPortal.UserInterface.Controls.MPLabel(); - this.gbExtended = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.txtTagData = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lblTagData = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tabPage2 = new MediaPortal.UserInterface.Controls.MPTabPage(); this.lblRating = new MediaPortal.UserInterface.Controls.MPLabel(); 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.genreComboBox = new System.Windows.Forms.ComboBox(); + this.subGenreLabel = new System.Windows.Forms.Label(); this.txtYear = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lblYear = new MediaPortal.UserInterface.Controls.MPLabel(); - this.txtManufacturer = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lblManufacturer = new MediaPortal.UserInterface.Controls.MPLabel(); - this.txtGenre = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lblGenre = new MediaPortal.UserInterface.Controls.MPLabel(); + this.genreLabel = new MediaPortal.UserInterface.Controls.MPLabel(); this.lblImageFile = new MediaPortal.UserInterface.Controls.MPLabel(); this.btnImageFile = new MediaPortal.UserInterface.Controls.MPButton(); this.txtFilename = new MediaPortal.UserInterface.Controls.MPTextBox(); @@ -65,13 +61,33 @@ this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.tcFileItemData = new MediaPortal.UserInterface.Controls.MPTabControl(); this.tabPage1 = new MediaPortal.UserInterface.Controls.MPTabPage(); + this.generalFileOptionsTab = new System.Windows.Forms.TabPage(); + this.generalFileItemOptionsGroupBox = new System.Windows.Forms.GroupBox(); + this.editSystemComboBox = new System.Windows.Forms.ComboBox(); + this.removeSystemLabel = new System.Windows.Forms.Label(); + this.removeSystemButton = new System.Windows.Forms.Button(); + this.addSystemLabel = new System.Windows.Forms.Label(); + this.editSystemTextBox = new System.Windows.Forms.TextBox(); + this.addSystemButton = new System.Windows.Forms.Button(); + this.editManufacturerComboBox = 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.editManufacturerTextBox = new System.Windows.Forms.TextBox(); + this.addManufacturerButton = new System.Windows.Forms.Button(); + this.editGenreComboBox = new System.Windows.Forms.ComboBox(); + this.removeGenreLabel = new System.Windows.Forms.Label(); + this.removeGenreButton = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.editGenreTextBox = new System.Windows.Forms.TextBox(); + this.addGenreButton = new System.Windows.Forms.Button(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.btnCancel = new MediaPortal.UserInterface.Controls.MPButton(); - this.gbExtended.SuspendLayout(); - this.tabPage2.SuspendLayout(); this.gbFileDetails.SuspendLayout(); this.tcFileItemData.SuspendLayout(); this.tabPage1.SuspendLayout(); + this.generalFileOptionsTab.SuspendLayout(); + this.generalFileItemOptionsGroupBox.SuspendLayout(); this.SuspendLayout(); // // gameinfoURLTextBox @@ -80,7 +96,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.gameinfoURLTextBox.Location = new System.Drawing.Point(97, 267); this.gameinfoURLTextBox.Name = "gameinfoURLTextBox"; - this.gameinfoURLTextBox.Size = new System.Drawing.Size(365, 21); + this.gameinfoURLTextBox.Size = new System.Drawing.Size(365, 20); this.gameinfoURLTextBox.TabIndex = 66; // // gameInfoURLLabel @@ -88,7 +104,7 @@ this.gameInfoURLLabel.AutoSize = true; this.gameInfoURLLabel.Location = new System.Drawing.Point(8, 270); this.gameInfoURLLabel.Name = "gameInfoURLLabel"; - this.gameInfoURLLabel.Size = new System.Drawing.Size(78, 13); + this.gameInfoURLLabel.Size = new System.Drawing.Size(80, 13); this.gameInfoURLLabel.TabIndex = 65; this.gameInfoURLLabel.Text = "Gameinfo URL:"; // @@ -156,26 +172,16 @@ this.lblOverview.AutoSize = true; this.lblOverview.Location = new System.Drawing.Point(8, 294); this.lblOverview.Name = "lblOverview"; - this.lblOverview.Size = new System.Drawing.Size(57, 13); + this.lblOverview.Size = new System.Drawing.Size(55, 13); this.lblOverview.TabIndex = 61; this.lblOverview.Text = "Overview:"; // - // txtSystem - // - this.txtSystem.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSystem.BorderColor = System.Drawing.Color.Empty; - this.txtSystem.Location = new System.Drawing.Point(97, 240); - this.txtSystem.Name = "txtSystem"; - this.txtSystem.Size = new System.Drawing.Size(365, 21); - this.txtSystem.TabIndex = 10; - // // lblSystem // this.lblSystem.AutoSize = true; this.lblSystem.Location = new System.Drawing.Point(8, 243); this.lblSystem.Name = "lblSystem"; - this.lblSystem.Size = new System.Drawing.Size(46, 13); + this.lblSystem.Size = new System.Drawing.Size(44, 13); this.lblSystem.TabIndex = 59; this.lblSystem.Text = "System:"; // @@ -186,7 +192,7 @@ this.txtCountry.BorderColor = System.Drawing.Color.Empty; this.txtCountry.Location = new System.Drawing.Point(97, 213); this.txtCountry.Name = "txtCountry"; - this.txtCountry.Size = new System.Drawing.Size(365, 21); + this.txtCountry.Size = new System.Drawing.Size(365, 20); this.txtCountry.TabIndex = 9; // // lblCountry @@ -194,84 +200,17 @@ this.lblCountry.AutoSize = true; this.lblCountry.Location = new System.Drawing.Point(8, 216); this.lblCountry.Name = "lblCountry"; - this.lblCountry.Size = new System.Drawing.Size(50, 13); + this.lblCountry.Size = new System.Drawing.Size(46, 13); this.lblCountry.TabIndex = 57; this.lblCountry.Text = "Country:"; // - // txtCategoryData - // - this.txtCategoryData.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtCategoryData.BorderColor = System.Drawing.Color.Empty; - this.txtCategoryData.Location = new System.Drawing.Point(8, 241); - this.txtCategoryData.Multiline = true; - this.txtCategoryData.Name = "txtCategoryData"; - this.txtCategoryData.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtCategoryData.Size = new System.Drawing.Size(489, 200); - this.txtCategoryData.TabIndex = 64; - // - // lblCategoryData - // - this.lblCategoryData.Location = new System.Drawing.Point(8, 215); - this.lblCategoryData.Name = "lblCategoryData"; - this.lblCategoryData.Size = new System.Drawing.Size(100, 18); - this.lblCategoryData.TabIndex = 65; - this.lblCategoryData.Text = "Category-Data:"; - // - // gbExtended - // - this.gbExtended.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.gbExtended.Controls.Add(this.txtCategoryData); - this.gbExtended.Controls.Add(this.lblCategoryData); - this.gbExtended.Controls.Add(this.txtTagData); - this.gbExtended.Controls.Add(this.lblTagData); - this.gbExtended.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbExtended.Location = new System.Drawing.Point(8, 9); - this.gbExtended.Name = "gbExtended"; - this.gbExtended.Size = new System.Drawing.Size(505, 449); - this.gbExtended.TabIndex = 0; - this.gbExtended.TabStop = false; - // - // txtTagData - // - this.txtTagData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtTagData.BorderColor = System.Drawing.Color.Empty; - this.txtTagData.Location = new System.Drawing.Point(8, 34); - this.txtTagData.Multiline = true; - this.txtTagData.Name = "txtTagData"; - this.txtTagData.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtTagData.Size = new System.Drawing.Size(489, 156); - this.txtTagData.TabIndex = 62; - // - // lblTagData - // - this.lblTagData.Location = new System.Drawing.Point(8, 17); - this.lblTagData.Name = "lblTagData"; - this.lblTagData.Size = new System.Drawing.Size(100, 17); - this.lblTagData.TabIndex = 63; - this.lblTagData.Text = "Tag-Data:"; - // - // tabPage2 - // - this.tabPage2.Controls.Add(this.gbExtended); - this.tabPage2.Location = new System.Drawing.Point(4, 22); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Size = new System.Drawing.Size(521, 466); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "Extended"; - this.tabPage2.UseVisualStyleBackColor = true; - // // lblRating // this.lblRating.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.lblRating.AutoSize = true; this.lblRating.Location = new System.Drawing.Point(229, 189); this.lblRating.Name = "lblRating"; - this.lblRating.Size = new System.Drawing.Size(42, 13); + this.lblRating.Size = new System.Drawing.Size(41, 13); this.lblRating.TabIndex = 55; this.lblRating.Text = "Rating:"; // @@ -280,23 +219,25 @@ this.gbFileDetails.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | 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.genreComboBox); + this.gbFileDetails.Controls.Add(this.subGenreLabel); this.gbFileDetails.Controls.Add(this.gameinfoURLTextBox); this.gbFileDetails.Controls.Add(this.gameInfoURLLabel); this.gbFileDetails.Controls.Add(this.buttonViewImg); this.gbFileDetails.Controls.Add(this.cbRating); this.gbFileDetails.Controls.Add(this.txtOverview); this.gbFileDetails.Controls.Add(this.lblOverview); - this.gbFileDetails.Controls.Add(this.txtSystem); this.gbFileDetails.Controls.Add(this.lblSystem); this.gbFileDetails.Controls.Add(this.txtCountry); this.gbFileDetails.Controls.Add(this.lblCountry); this.gbFileDetails.Controls.Add(this.lblRating); this.gbFileDetails.Controls.Add(this.txtYear); this.gbFileDetails.Controls.Add(this.lblYear); - this.gbFileDetails.Controls.Add(this.txtManufacturer); this.gbFileDetails.Controls.Add(this.lblManufacturer); - this.gbFileDetails.Controls.Add(this.txtGenre); - this.gbFileDetails.Controls.Add(this.lblGenre); + this.gbFileDetails.Controls.Add(this.genreLabel); this.gbFileDetails.Controls.Add(this.lblImageFile); this.gbFileDetails.Controls.Add(this.btnImageFile); this.gbFileDetails.Controls.Add(this.txtFilename); @@ -312,13 +253,58 @@ this.gbFileDetails.TabIndex = 1; this.gbFileDetails.TabStop = false; // + // systemComboBox + // + this.systemComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.systemComboBox.FormattingEnabled = true; + this.systemComboBox.Location = new System.Drawing.Point(97, 240); + this.systemComboBox.Name = "systemComboBox"; + this.systemComboBox.Size = new System.Drawing.Size(162, 21); + this.systemComboBox.TabIndex = 71; + // + // manufacturerComboBox + // + this.manufacturerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.manufacturerComboBox.FormattingEnabled = true; + this.manufacturerComboBox.Location = new System.Drawing.Point(97, 159); + this.manufacturerComboBox.Name = "manufacturerComboBox"; + this.manufacturerComboBox.Size = new System.Drawing.Size(162, 21); + this.manufacturerComboBox.TabIndex = 70; + // + // subGenreComboBox + // + 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; + // + // genreComboBox + // + this.genreComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.genreComboBox.FormattingEnabled = true; + this.genreComboBox.Location = new System.Drawing.Point(97, 103); + this.genreComboBox.Name = "genreComboBox"; + this.genreComboBox.Size = new System.Drawing.Size(162, 21); + this.genreComboBox.TabIndex = 68; + // + // subGenreLabel + // + 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:"; + // // txtYear // this.txtYear.BorderColor = System.Drawing.Color.Empty; this.txtYear.Location = new System.Drawing.Point(97, 186); this.txtYear.MaxLength = 4; this.txtYear.Name = "txtYear"; - this.txtYear.Size = new System.Drawing.Size(60, 21); + this.txtYear.Size = new System.Drawing.Size(60, 20); this.txtYear.TabIndex = 7; // // lblYear @@ -326,56 +312,34 @@ this.lblYear.AutoSize = true; this.lblYear.Location = new System.Drawing.Point(8, 189); this.lblYear.Name = "lblYear"; - this.lblYear.Size = new System.Drawing.Size(33, 13); + this.lblYear.Size = new System.Drawing.Size(32, 13); this.lblYear.TabIndex = 53; this.lblYear.Text = "Year:"; // - // txtManufacturer - // - this.txtManufacturer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtManufacturer.BorderColor = System.Drawing.Color.Empty; - this.txtManufacturer.Location = new System.Drawing.Point(97, 159); - this.txtManufacturer.Name = "txtManufacturer"; - this.txtManufacturer.Size = new System.Drawing.Size(365, 21); - this.txtManufacturer.TabIndex = 6; - // // lblManufacturer // this.lblManufacturer.AutoSize = true; this.lblManufacturer.Location = new System.Drawing.Point(8, 162); this.lblManufacturer.Name = "lblManufacturer"; - this.lblManufacturer.Size = new System.Drawing.Size(76, 13); + this.lblManufacturer.Size = new System.Drawing.Size(73, 13); this.lblManufacturer.TabIndex = 51; this.lblManufacturer.Text = "Manufacturer:"; // - // txtGenre + // genreLabel // - this.txtGenre.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtGenre.BorderColor = System.Drawing.Color.Empty; - this.txtGenre.Location = new System.Drawing.Point(97, 101); - this.txtGenre.Multiline = true; - this.txtGenre.Name = "txtGenre"; - this.txtGenre.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtGenre.Size = new System.Drawing.Size(365, 52); - this.txtGenre.TabIndex = 5; + this.genreLabel.AutoSize = true; + this.genreLabel.Location = new System.Drawing.Point(8, 103); + this.genreLabel.Name = "genreLabel"; + this.genreLabel.Size = new System.Drawing.Size(39, 13); + this.genreLabel.TabIndex = 49; + this.genreLabel.Text = "Genre:"; // - // lblGenre - // - this.lblGenre.AutoSize = true; - this.lblGenre.Location = new System.Drawing.Point(8, 104); - this.lblGenre.Name = "lblGenre"; - this.lblGenre.Size = new System.Drawing.Size(40, 13); - this.lblGenre.TabIndex = 49; - this.lblGenre.Text = "Genre:"; - // // lblImageFile // this.lblImageFile.AutoSize = true; this.lblImageFile.Location = new System.Drawing.Point(8, 77); this.lblImageFile.Name = "lblImageFile"; - this.lblImageFile.Size = new System.Drawing.Size(55, 13); + this.lblImageFile.Size = new System.Drawing.Size(52, 13); this.lblImageFile.TabIndex = 47; this.lblImageFile.Text = "Imagefile:"; // @@ -397,7 +361,7 @@ this.txtFilename.BorderColor = System.Drawing.Color.Empty; this.txtFilename.Location = new System.Drawing.Point(97, 47); this.txtFilename.Name = "txtFilename"; - this.txtFilename.Size = new System.Drawing.Size(365, 21); + this.txtFilename.Size = new System.Drawing.Size(365, 20); this.txtFilename.TabIndex = 1; // // txtImageFile @@ -407,7 +371,7 @@ this.txtImageFile.BorderColor = System.Drawing.Color.Empty; this.txtImageFile.Location = new System.Drawing.Point(97, 74); this.txtImageFile.Name = "txtImageFile"; - this.txtImageFile.Size = new System.Drawing.Size(328, 21); + this.txtImageFile.Size = new System.Drawing.Size(328, 20); this.txtImageFile.TabIndex = 3; // // txtTitle @@ -417,7 +381,7 @@ this.txtTitle.BorderColor = System.Drawing.Color.Empty; this.txtTitle.Location = new System.Drawing.Point(97, 20); this.txtTitle.Name = "txtTitle"; - this.txtTitle.Size = new System.Drawing.Size(365, 21); + this.txtTitle.Size = new System.Drawing.Size(365, 20); this.txtTitle.TabIndex = 0; // // lblTitle @@ -425,7 +389,7 @@ this.lblTitle.AutoSize = true; this.lblTitle.Location = new System.Drawing.Point(8, 23); this.lblTitle.Name = "lblTitle"; - this.lblTitle.Size = new System.Drawing.Size(31, 13); + this.lblTitle.Size = new System.Drawing.Size(30, 13); this.lblTitle.TabIndex = 46; this.lblTitle.Text = "Title:"; // @@ -434,7 +398,7 @@ this.lblFilename.AutoSize = true; this.lblFilename.Location = new System.Drawing.Point(8, 50); this.lblFilename.Name = "lblFilename"; - this.lblFilename.Size = new System.Drawing.Size(53, 13); + this.lblFilename.Size = new System.Drawing.Size(52, 13); this.lblFilename.TabIndex = 45; this.lblFilename.Text = "Filename:"; // @@ -455,7 +419,7 @@ | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.tcFileItemData.Controls.Add(this.tabPage1); - this.tcFileItemData.Controls.Add(this.tabPage2); + this.tcFileItemData.Controls.Add(this.generalFileOptionsTab); this.tcFileItemData.Location = new System.Drawing.Point(4, 8); this.tcFileItemData.Name = "tcFileItemData"; this.tcFileItemData.SelectedIndex = 0; @@ -472,6 +436,203 @@ this.tabPage1.Text = "Properties"; this.tabPage1.UseVisualStyleBackColor = true; // + // generalFileOptionsTab + // + this.generalFileOptionsTab.Controls.Add(this.generalFileItemOptionsGroupBox); + this.generalFileOptionsTab.Location = new System.Drawing.Point(4, 22); + this.generalFileOptionsTab.Name = "generalFileOptionsTab"; + this.generalFileOptionsTab.Padding = new System.Windows.Forms.Padding(3); + this.generalFileOptionsTab.Size = new System.Drawing.Size(521, 466); + this.generalFileOptionsTab.TabIndex = 2; + this.generalFileOptionsTab.Text = "General FileItem Options"; + this.generalFileOptionsTab.UseVisualStyleBackColor = true; + // + // generalFileItemOptionsGroupBox + // + this.generalFileItemOptionsGroupBox.Controls.Add(this.editSystemComboBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeSystemLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeSystemButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addSystemLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.editSystemTextBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addSystemButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.editManufacturerComboBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeManufacturerButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.editManufacturerTextBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addManufacturerButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.editGenreComboBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreLabel); + this.generalFileItemOptionsGroupBox.Controls.Add(this.removeGenreButton); + this.generalFileItemOptionsGroupBox.Controls.Add(this.label1); + this.generalFileItemOptionsGroupBox.Controls.Add(this.editGenreTextBox); + this.generalFileItemOptionsGroupBox.Controls.Add(this.addGenreButton); + this.generalFileItemOptionsGroupBox.Location = new System.Drawing.Point(6, 6); + this.generalFileItemOptionsGroupBox.Name = "generalFileItemOptionsGroupBox"; + this.generalFileItemOptionsGroupBox.Size = new System.Drawing.Size(509, 454); + this.generalFileItemOptionsGroupBox.TabIndex = 78; + this.generalFileItemOptionsGroupBox.TabStop = false; + // + // editSystemComboBox + // + this.editSystemComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.editSystemComboBox.FormattingEnabled = true; + this.editSystemComboBox.Location = new System.Drawing.Point(91, 249); + this.editSystemComboBox.Name = "editSystemComboBox"; + this.editSystemComboBox.Size = new System.Drawing.Size(312, 21); + this.editSystemComboBox.TabIndex = 92; + // + // removeSystemLabel + // + this.removeSystemLabel.AutoSize = true; + this.removeSystemLabel.Location = new System.Drawing.Point(6, 252); + this.removeSystemLabel.Name = "removeSystemLabel"; + this.removeSystemLabel.Size = new System.Drawing.Size(82, 13); + this.removeSystemLabel.TabIndex = 91; + this.removeSystemLabel.Text = "Remove system"; + // + // removeSystemButton + // + this.removeSystemButton.Location = new System.Drawing.Point(436, 249); + this.removeSystemButton.Name = "removeSystemButton"; + this.removeSystemButton.Size = new System.Drawing.Size(62, 23); + this.removeSystemButton.TabIndex = 90; + this.removeSystemButton.Text = "Remove.."; + this.removeSystemButton.UseVisualStyleBackColor = true; + this.removeSystemButton.Click += new System.EventHandler(this.removeSystemButton_Click); + // + // addSystemLabel + // + this.addSystemLabel.AutoSize = true; + this.addSystemLabel.Location = new System.Drawing.Point(6, 216); + this.addSystemLabel.Name = "addSystemLabel"; + this.addSystemLabel.Size = new System.Drawing.Size(69, 13); + this.addSystemLabel.TabIndex = 87; + this.addSystemLabel.Text = "Add System.."; + // + // editSystemTextBox + // + this.editSystemTextBox.Location = new System.Drawing.Point(91, 213); + this.editSystemTextBox.Name = "editSystemTextBox"; + this.editSystemTextBox.Size = new System.Drawing.Size(312, 20); + this.editSystemTextBox.TabIndex = 88; + // + // addSystemButton + // + this.addSystemButton.Location = new System.Drawing.Point(436, 213); + this.addSystemButton.Name = "addSystemButton"; + this.addSystemButton.Size = new System.Drawing.Size(62, 23); + this.addSystemButton.TabIndex = 89; + this.addSystemButton.Text = "Add.."; + this.addSystemButton.UseVisualStyleBackColor = true; + this.addSystemButton.Click += new System.EventHandler(this.addSystemButton_Click); + // + // editManufacturerComboBox + // + this.editManufacturerComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.editManufacturerComboBox.FormattingEnabled = true; + this.editManufacturerComboBox.Location = new System.Drawing.Point(91, 165); + this.editManufacturerComboBox.Name = "editManufacturerComboBox"; + this.editManufacturerComboBox.Size = new System.Drawing.Size(312, 21); + this.editManufacturerComboBox.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(436, 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.."; + // + // editManufacturerTextBox + // + this.editManufacturerTextBox.Location = new System.Drawing.Point(91, 129); + this.editManufacturerTextBox.Name = "editManufacturerTextBox"; + this.editManufacturerTextBox.Size = new System.Drawing.Size(312, 20); + this.editManufacturerTextBox.TabIndex = 82; + // + // addManufacturerButton + // + this.addManufacturerButton.Location = new System.Drawing.Point(436, 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); + // + // editGenreComboBox + // + this.editGenreComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.editGenreComboBox.FormattingEnabled = true; + this.editGenreComboBox.Location = new System.Drawing.Point(91, 70); + this.editGenreComboBox.Name = "editGenreComboBox"; + this.editGenreComboBox.Size = new System.Drawing.Size(312, 21); + this.editGenreComboBox.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(436, 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); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 37); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(64, 13); + this.label1.TabIndex = 74; + this.label1.Text = "Add Genre.."; + // + // editGenreTextBox + // + this.editGenreTextBox.Location = new System.Drawing.Point(91, 34); + this.editGenreTextBox.Name = "editGenreTextBox"; + this.editGenreTextBox.Size = new System.Drawing.Size(312, 20); + this.editGenreTextBox.TabIndex = 75; + // + // addGenreButton + // + this.addGenreButton.Location = new System.Drawing.Point(436, 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); + // // btnCancel // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -499,13 +660,13 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "File-Details"; this.Load += new System.EventHandler(this.FileDetailsForm_Load); - this.gbExtended.ResumeLayout(false); - this.gbExtended.PerformLayout(); - this.tabPage2.ResumeLayout(false); this.gbFileDetails.ResumeLayout(false); this.gbFileDetails.PerformLayout(); this.tcFileItemData.ResumeLayout(false); this.tabPage1.ResumeLayout(false); + this.generalFileOptionsTab.ResumeLayout(false); + this.generalFileItemOptionsGroupBox.ResumeLayout(false); + this.generalFileItemOptionsGroupBox.PerformLayout(); this.ResumeLayout(false); } @@ -520,24 +681,15 @@ private MediaPortal.UserInterface.Controls.MPComboBox cbRating; private MediaPortal.UserInterface.Controls.MPTextBox txtOverview; private MediaPortal.UserInterface.Controls.MPLabel lblOverview; - private MediaPortal.UserInterface.Controls.MPTextBox txtSystem; private MediaPortal.UserInterface.Controls.MPLabel lblSystem; private MediaPortal.UserInterface.Controls.MPTextBox txtCountry; private MediaPortal.UserInterface.Controls.MPLabel lblCountry; - private MediaPortal.UserInterface.Controls.MPTextBox txtCategoryData; - private MediaPortal.UserInterface.Controls.MPLabel lblCategoryData; - private MediaPortal.UserInterface.Controls.MPGroupBox gbExtended; - private MediaPortal.UserInterface.Controls.MPTextBox txtTagData; - private MediaPortal.UserInterface.Controls.MPLabel lblTagData; - private MediaPortal.UserInterface.Controls.MPTabPage tabPage2; private MediaPortal.UserInterface.Controls.MPLabel lblRating; private MediaPortal.UserInterface.Controls.MPGroupBox gbFileDetails; private MediaPortal.UserInterface.Controls.MPTextBox txtYear; private MediaPortal.UserInterface.Controls.MPLabel lblYear; - private MediaPortal.UserInterface.Controls.MPTextBox txtManufacturer; private MediaPortal.UserInterface.Controls.MPLabel lblManufacturer; - private MediaPortal.UserInterface.Controls.MPTextBox txtGenre; - private MediaPortal.UserInterface.Controls.MPLabel lblGenre; + private MediaPortal.UserInterface.Controls.MPLabel genreLabel; private MediaPortal.UserInterface.Controls.MPLabel lblImageFile; private MediaPortal.UserInterface.Controls.MPButton btnImageFile; private MediaPortal.UserInterface.Controls.MPTextBox txtFilename; @@ -550,5 +702,30 @@ 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.ComboBox genreComboBox; + private System.Windows.Forms.TabPage generalFileOptionsTab; + private System.Windows.Forms.GroupBox generalFileItemOptionsGroupBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox editGenreTextBox; + private System.Windows.Forms.Button addGenreButton; + private System.Windows.Forms.Label removeGenreLabel; + private System.Windows.Forms.Button removeGenreButton; + private System.Windows.Forms.ComboBox editGenreComboBox; + private System.Windows.Forms.ComboBox systemComboBox; + private System.Windows.Forms.ComboBox manufacturerComboBox; + private System.Windows.Forms.ComboBox editSystemComboBox; + private System.Windows.Forms.Label removeSystemLabel; + private System.Windows.Forms.Button removeSystemButton; + private System.Windows.Forms.Label addSystemLabel; + private System.Windows.Forms.TextBox editSystemTextBox; + private System.Windows.Forms.Button addSystemButton; + private System.Windows.Forms.ComboBox editManufacturerComboBox; + private System.Windows.Forms.Label removeManufacturerLabel; + private System.Windows.Forms.Button removeManufacturerButton; + private System.Windows.Forms.Label addManufacturerLabel; + private System.Windows.Forms.TextBox editManufacturerTextBox; + private System.Windows.Forms.Button addManufacturerButton; } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-07-01 07:49:46 UTC (rev 658) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-07-01 13:47:34 UTC (rev 659) @@ -24,6 +24,7 @@ #endregion using System; +using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; @@ -33,6 +34,7 @@ using GUIPrograms; using GUIPrograms.ApplicationItems; using GUIPrograms.Database; +using SQLite.NET; using GUIPrograms.FileItems; namespace GUIPrograms.Design @@ -43,6 +45,7 @@ private FileItem m_CurFile; private ConditionChecker conditionChecker; + public ApplicationItem CurApp { get @@ -82,7 +85,8 @@ txtFilename.Text = m_CurFile.Filename; txtImageFile.Text = m_CurFile.Imagefile; FileItemToGenre(); - txtManufacturer.Text = m_CurFile.Manufacturer; + manufacturerComboBox.SelectedValue = CurFile.ManufacturerId; + //txtManufacturer.Text = m_CurFile.Manufacturer; if (m_CurFile.Year > 1900) { txtYear.Text = m_CurFile.Year.ToString(); @@ -93,19 +97,104 @@ } cbRating.SelectedIndex = m_CurFile.Rating; txtCountry.Text = m_CurFile.Country; - txtSystem.Text = m_CurFile.System_; + // txtSystem.Text = m_CurFile.System_; + systemComboBox.SelectedValue = m_CurFile.SystemId; txtOverview.Text = m_CurFile.Overview; - txtTagData.Text = m_CurFile.TagData; - txtCategoryData.Text = m_CurFile.CategoryData; gameinfoURLTextBox.Text = m_CurFile.GameInfoURL; } private void FileDetailsForm_Load(object sender, EventArgs e) { + UpdateComboBoxes(); tcFileItemData.TabIndex = 0; updateDisplay(); + } + private void FillComboBox(string tableName,string orderBy,ComboBox comboBox ) + { + + + List<ListItem> listItemList = new List<ListItem>(); + SQLiteResultSet resultSet = null; + + string sqlStmt = @" + SELECT + * + + FROM + " + tableName + @" + + ORDER BY " + orderBy; + + try + { + resultSet = DatabaseHandler.sqlDB.Execute(sqlStmt); + } + 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... [truncated message content] |