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] |