From: <nor...@us...> - 2007-06-03 17:31:56
|
Revision: 486 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=486&view=rev Author: northern_sky Date: 2007-06-03 10:31:54 -0700 (Sun, 03 Jun 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/bin/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/obj/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-09 08:11:48
|
Revision: 494 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=494&view=rev Author: northern_sky Date: 2007-06-09 01:11:46 -0700 (Sat, 09 Jun 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseSettings.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 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/GUIFileDetailsInfoParser.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramFilterItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs 2007-06-08 17:14:57 UTC (rev 493) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs 2007-06-09 08:11:46 UTC (rev 494) @@ -40,1244 +40,1244 @@ namespace GUIPrograms.ApplicationItems { - /// <summary> - /// Summary description for Application. - /// </summary> - public class ApplicationItem + /// <summary> + /// Summary description for Application. + /// </summary> + public class ApplicationItem + { + protected static SQLiteClient sqlDB = null; + private DatabaseSorter dbPc = new DatabaseSorter(); + + public delegate void FilelinkLaunchEventHandler(FilelinkItem curLink, bool mpGuiMode); + + public event FilelinkLaunchEventHandler OnLaunchFilelink = null; + + int appID; + int fatherID; + string title; + string shortTitle; + string filename; + string arguments; + ProcessWindowStyle windowStyle; + Process proc; + string startupDir; + bool useShellExecute; + bool useQuotes; + ApplicationType sourceType; + string sourceFile; + string imageFile; + string imageDirectories; // in one string for sqlite db field + public string[] imageDirs; // imageDirectories splitted + string fileDirectory; + string validExtensions; + bool importValidImagesOnly; + int appPosition; + bool enabled; + bool enableGUIRefresh; + int pincode; + int contentID; + string systemDefault; + bool waitForExit; + string preLaunch; + string postLaunch; + bool importMamePlaychoice10 = false; + + public bool ImportMamePlaychoice10 { - protected static SQLiteClient sqlDB = null; - private DatabaseSorter dbPc = new DatabaseSorter(); + get { return importMamePlaychoice10; } + set { importMamePlaychoice10 = value; } + } + bool importMameMahjong = false; - public delegate void FilelinkLaunchEventHandler(FilelinkItem curLink, bool mpGuiMode); + public bool ImportMameMahjong + { + get { return importMameMahjong; } + set { importMameMahjong = value; } + } - public event FilelinkLaunchEventHandler OnLaunchFilelink = null; - int appID; - int fatherID; - string title; - string shortTitle; - string filename; - string arguments; - ProcessWindowStyle windowStyle; - Process proc; - string startupDir; - bool useShellExecute; - bool useQuotes; - ApplicationType sourceType; - string sourceFile; - string imageFile; - string imageDirectories; // in one string for sqlite db field - public string[] imageDirs; // imageDirectories splitted - string fileDirectory; - string validExtensions; - bool importValidImagesOnly; - int appPosition; - bool enabled; - bool enableGUIRefresh; - int pincode; - int contentID; - string systemDefault; - bool waitForExit; - string preLaunch; - string postLaunch; - bool importMamePlaychoice10 = false; + string launchErrorMsg; - public bool ImportMamePlaychoice10 - { - get { return importMamePlaychoice10; } - set { importMamePlaychoice10 = value; } - } - bool importMameMahjong = false; - public bool ImportMameMahjong - { - get { return importMameMahjong; } - set { importMameMahjong = value; } - } + // two magic image-slideshow counters + int thumbIndex = 0; + int thumbFolderIndex = -1; + string lastFilepath = ""; // cached path - string launchErrorMsg; + public bool filesAreLoaded = false; // load on demand.... + protected FileItemList fileList = null; + public bool linksAreLoaded = false; + protected FilelinkItemList fileLinks = null; - // two magic image-slideshow counters - int thumbIndex = 0; - int thumbFolderIndex = -1; + // event: read new file + public delegate void RefreshInfoEventHandler(string informationMessage, int progressBarProgess); - string lastFilepath = ""; // cached path + public event RefreshInfoEventHandler OnRefreshInfo = null; - public bool filesAreLoaded = false; // load on demand.... - protected FileItemList fileList = null; + protected void SendRefreshInfo(string informationMessage, int progressBarCtr) + { + if (OnRefreshInfo != null) + { + OnRefreshInfo(informationMessage, progressBarCtr); + } + } - public bool linksAreLoaded = false; - protected FilelinkItemList fileLinks = null; + protected int GetID = ProgramUtils.GetID; - // event: read new file - public delegate void RefreshInfoEventHandler(string informationMessage, int progressBarProgess); + public ApplicationItem(SQLiteClient initSqlDB) + { - public event RefreshInfoEventHandler OnRefreshInfo = null; + // constructor: save SQLiteDB object + sqlDB = initSqlDB; + // .. init member variables ... + appID = -1; + fatherID = -1; + title = ""; + shortTitle = ""; + filename = ""; + arguments = ""; + windowStyle = ProcessWindowStyle.Normal; + startupDir = "%FILEDIR%"; + useShellExecute = false; + useQuotes = true; + enabled = true; + sourceType = ApplicationType.UNKNOWN; + sourceFile = ""; + imageFile = ""; + fileDirectory = ""; + imageDirectories = ""; + validExtensions = ""; + appPosition = 0; + importValidImagesOnly = false; + enableGUIRefresh = false; + pincode = -1; + contentID = 100; + systemDefault = ""; + waitForExit = true; + filesAreLoaded = false; + preLaunch = ""; + postLaunch = ""; - protected void SendRefreshInfo(string informationMessage, int progressBarCtr) - { - if (OnRefreshInfo != null) - { - OnRefreshInfo(informationMessage, progressBarCtr); - } - } + } - protected int GetID = ProgramUtils.GetID; + public SQLiteClient db + { + get { return sqlDB; } + } - public ApplicationItem(SQLiteClient initSqlDB) - { + public int CurrentSortIndex + { + get { return GetCurrentSortIndex(); } + set { SetCurrentSortIndex(value); } + } - // constructor: save SQLiteDB object - sqlDB = initSqlDB; - // .. init member variables ... - appID = -1; - fatherID = -1; - title = ""; - shortTitle = ""; - filename = ""; - arguments = ""; - windowStyle = ProcessWindowStyle.Normal; - startupDir = "%FILEDIR%"; - useShellExecute = false; - useQuotes = true; - enabled = true; - sourceType = ApplicationType.UNKNOWN; - sourceFile = ""; - imageFile = ""; - fileDirectory = ""; - imageDirectories = ""; - validExtensions = ""; - appPosition = 0; - importValidImagesOnly = false; - enableGUIRefresh = false; - pincode = -1; - contentID = 100; - systemDefault = ""; - waitForExit = true; - filesAreLoaded = false; - preLaunch = ""; - postLaunch = ""; + public bool CurrentSortIsAscending + { + get { return GetCurrentSortIsAscending(); } + set { SetCurrentSortIsAscending(value); } + } - } - public SQLiteClient db + public FileItem PrevFile(FileItem curFile) + { + if (Files == null) + { + return null; + } + if (Files.Count == 0) + { + return null; + } + int index = this.Files.IndexOf(curFile); + index = index - 1; + if (index < 0) + index = Files.Count - 1; + return (FileItem)Files[index]; + } + + public FileItem NextFile(FileItem curFile) + { + if (Files == null) + { + return null; + } + if (Files.Count == 0) + { + return null; + } + int index = this.Files.IndexOf(curFile); + index = index + 1; + if (index > Files.Count - 1) + index = 0; + return (FileItem)Files[index]; + } + + + public virtual void LaunchFile(FileItem curFile, bool mpGuiMode) + { + string curFilename = curFile.Filename; + if (curFilename == "") + { + return; + } + + // Launch File by item + if (mpGuiMode) + { + curFile.UpdateLaunchInfo(); + } + ProcessStartInfo procStart = new ProcessStartInfo(); + + if (Filename != "") + { + // use the APPLICATION launcher and add current file information + procStart.FileName = Filename; // filename of the application + // set the arguments: one of the arguments is the fileitem-filename + procStart.Arguments = " " + this.Arguments + " "; + if (UseQuotes) { - get { return sqlDB; } + // avoid double quotes around the filename-argument..... + curFilename = "\"" + (curFile.Filename.TrimStart('\"')).TrimEnd('\"') + "\""; } - public int CurrentSortIndex + if (procStart.Arguments.IndexOf("%FILEnoPATHnoEXT%") >= 0) { - get { return GetCurrentSortIndex(); } - set { SetCurrentSortIndex(value); } + // ex. kawaks: + // winkawaks.exe alpham2 + // => filename without path and extension is necessary! + string filenameNoPathNoExt = curFile.ExtractFileName(); + filenameNoPathNoExt = (filenameNoPathNoExt.TrimStart('\"')).TrimEnd('\"'); + filenameNoPathNoExt = Path.GetFileNameWithoutExtension(filenameNoPathNoExt); + procStart.Arguments = procStart.Arguments.Replace("%FILEnoPATHnoEXT%", filenameNoPathNoExt); } - - public bool CurrentSortIsAscending + else { - get { return GetCurrentSortIsAscending(); } - set { SetCurrentSortIsAscending(value); } + // the fileitem-argument can be positioned anywhere in the argument string... + if (procStart.Arguments.IndexOf("%FILE%") == -1) + { + // no placeholder found => default handling: add the fileitem as the last argument + procStart.Arguments = procStart.Arguments + curFilename; + } + else + { + // placeholder found => replace the placeholder by the correct filename + procStart.Arguments = procStart.Arguments.Replace("%FILE%", curFilename); + } } - - - public FileItem PrevFile(FileItem curFile) + procStart.WorkingDirectory = Startupdir; + if (procStart.WorkingDirectory.IndexOf("%FILEDIR%") != -1) { - if (Files == null) - { - return null; - } - if (Files.Count == 0) - { - return null; - } - int index = this.Files.IndexOf(curFile); - index = index - 1; - if (index < 0) - index = Files.Count - 1; - return (FileItem)Files[index]; + procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); } + procStart.UseShellExecute = UseShellExecute; + } + else + { + // application has no launch-file + // => try to make a correct launch using the current FILE object + procStart.FileName = curFile.Filename; + procStart.WorkingDirectory = Path.GetFullPath(curFile.Filename); - public FileItem NextFile(FileItem curFile) + + if (Startupdir != "") { - if (Files == null) - { - return null; - } - if (Files.Count == 0) - { - return null; - } - int index = this.Files.IndexOf(curFile); - index = index + 1; - if (index > Files.Count - 1) - index = 0; - return (FileItem)Files[index]; + if (Startupdir.Contains("%FILEDIR%")) + { + procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); + } + else + { + procStart.WorkingDirectory = Startupdir; + } } + procStart.UseShellExecute = UseShellExecute; + } + procStart.WindowStyle = this.WindowStyle; - public virtual void LaunchFile(FileItem curFile, bool mpGuiMode) + this.LaunchErrorMsg = ""; + try + { + DoPreLaunch(); + + + if (mpGuiMode) { - string curFilename = curFile.Filename; - if (curFilename == "") - { - return; - } + AutoPlay.StopListening(); + if (g_Player.Playing) + { + g_Player.Stop(); + } + } - // Launch File by item - if (mpGuiMode) - { - curFile.UpdateLaunchInfo(); - } - ProcessStartInfo procStart = new ProcessStartInfo(); + proc = new Process(); + proc.EnableRaisingEvents = true; + proc.Exited += new EventHandler(proc_Exited); - if (Filename != "") - { - // use the APPLICATION launcher and add current file information - procStart.FileName = Filename; // filename of the application - // set the arguments: one of the arguments is the fileitem-filename - procStart.Arguments = " " + this.Arguments + " "; - if (UseQuotes) - { - // avoid double quotes around the filename-argument..... - curFilename = "\"" + (curFile.Filename.TrimStart('\"')).TrimEnd('\"') + "\""; - } + proc.StartInfo = procStart; + ProgramUtils.StartProcess(proc, WaitForExit); - if (procStart.Arguments.IndexOf("%FILEnoPATHnoEXT%") >= 0) - { - // ex. kawaks: - // winkawaks.exe alpham2 - // => filename without path and extension is necessary! - string filenameNoPathNoExt = curFile.ExtractFileName(); - filenameNoPathNoExt = (filenameNoPathNoExt.TrimStart('\"')).TrimEnd('\"'); - filenameNoPathNoExt = Path.GetFileNameWithoutExtension(filenameNoPathNoExt); - procStart.Arguments = procStart.Arguments.Replace("%FILEnoPATHnoEXT%", filenameNoPathNoExt); - } - else - { - // the fileitem-argument can be positioned anywhere in the argument string... - if (procStart.Arguments.IndexOf("%FILE%") == -1) - { - // no placeholder found => default handling: add the fileitem as the last argument - procStart.Arguments = procStart.Arguments + curFilename; - } - else - { - // placeholder found => replace the placeholder by the correct filename - procStart.Arguments = procStart.Arguments.Replace("%FILE%", curFilename); - } - } - procStart.WorkingDirectory = Startupdir; - if (procStart.WorkingDirectory.IndexOf("%FILEDIR%") != -1) - { - procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); - } - procStart.UseShellExecute = UseShellExecute; - } - else - { - // application has no launch-file - // => try to make a correct launch using the current FILE object - procStart.FileName = curFile.Filename; - procStart.WorkingDirectory = Path.GetFullPath(curFile.Filename); - - - if (Startupdir != "") - { - if (Startupdir.Contains("%FILEDIR%")) - { - procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); - } - else - { - procStart.WorkingDirectory = Startupdir; - } - } - procStart.UseShellExecute = UseShellExecute; - } - procStart.WindowStyle = this.WindowStyle; + if (mpGuiMode) + { + //GUIGraphicsContext.DX9Device.Reset(GUIGraphicsContext.DX9Device.PresentationParameters); + AutoPlay.StartListening(); + } - this.LaunchErrorMsg = ""; - try - { - DoPreLaunch(); + } + catch (Exception ex) + { + string ErrorString = String.Format("myPrograms: error launching program\n filename: {0}\n arguments: {1}\n WorkingDirectory: {2}\n stack: {3} {4} {5}", + procStart.FileName, + procStart.Arguments, + procStart.WorkingDirectory, + ex.Message, + ex.Source, + ex.StackTrace); + Log.Info(ErrorString); + this.LaunchErrorMsg = ErrorString; + } + finally + { + DoPostLaunch(); + } + } + void proc_Exited(object sender, EventArgs e) + { - if (mpGuiMode) - { - AutoPlay.StopListening(); - if (g_Player.Playing) - { - g_Player.Stop(); - } - } + if (proc != null) + { + proc.Dispose(); + proc = null; + } + } - proc = new Process(); - proc.EnableRaisingEvents = true; - proc.Exited += new EventHandler(proc_Exited); + protected void DoPreLaunch() + { + if (waitForExit && (preLaunch != "")) + { + LaunchCmd(preLaunch); + } + } - proc.StartInfo = procStart; - ProgramUtils.StartProcess(proc, WaitForExit); + protected void DoPostLaunch() + { + if (waitForExit && (preLaunch != "")) + { + LaunchCmd(postLaunch); + } + } + protected void LaunchCmd(string commands) + { + string results = ""; + string errors = ""; + string[] script; + string curLine; + Process p = new Process(); + StreamWriter sw; + StreamReader sr; + StreamReader err; - if (mpGuiMode) - { - //GUIGraphicsContext.DX9Device.Reset(GUIGraphicsContext.DX9Device.PresentationParameters); - AutoPlay.StartListening(); - } + script = commands.Split(';'); + if (script.Length > 0) + { + ProcessStartInfo psI = new ProcessStartInfo("cmd"); + psI.UseShellExecute = false; + psI.RedirectStandardInput = true; + psI.RedirectStandardOutput = true; + psI.RedirectStandardError = true; + psI.CreateNoWindow = true; + p.StartInfo = psI; - } - catch (Exception ex) - { - string ErrorString = String.Format("myPrograms: error launching program\n filename: {0}\n arguments: {1}\n WorkingDirectory: {2}\n stack: {3} {4} {5}", - procStart.FileName, - procStart.Arguments, - procStart.WorkingDirectory, - ex.Message, - ex.Source, - ex.StackTrace); - Log.Info(ErrorString); - this.LaunchErrorMsg = ErrorString; - } - finally - { - DoPostLaunch(); - } - } + p.Start(); + sw = p.StandardInput; + sr = p.StandardOutput; + err = p.StandardError; - void proc_Exited(object sender, EventArgs e) - { + sw.AutoFlush = true; - if (proc != null) - { - proc.Dispose(); - proc = null; - } - } - - protected void DoPreLaunch() + for (int i = 0; i < script.Length; i++) { - if (waitForExit && (preLaunch != "")) - { - LaunchCmd(preLaunch); - } + curLine = script[i].Trim(); + curLine = curLine.TrimStart('\n'); + if (curLine != "") + sw.WriteLine(curLine); } + sw.Close(); - protected void DoPostLaunch() + results += sr.ReadToEnd(); + errors += err.ReadToEnd(); + + if (errors.Trim() != "") { - if (waitForExit && (preLaunch != "")) - { - LaunchCmd(postLaunch); - } + Log.Info("Application PrePost errors: {0}", errors); } + } + } - protected void LaunchCmd(string commands) - { - string results = ""; - string errors = ""; - string[] script; - string curLine; - Process p = new Process(); - StreamWriter sw; - StreamReader sr; - StreamReader err; + public virtual void LaunchFile(GUIListItem item) + { + // Launch File by GUILISTITEM + // => look for FileItem and launch it using the found object + if (item.MusicTag == null) + { + return; + } + FileItem curFile = (FileItem)item.MusicTag; - script = commands.Split(';'); - if (script.Length > 0) - { - ProcessStartInfo psI = new ProcessStartInfo("cmd"); - psI.UseShellExecute = false; - psI.RedirectStandardInput = true; - psI.RedirectStandardOutput = true; - psI.RedirectStandardError = true; - psI.CreateNoWindow = true; - p.StartInfo = psI; + if (curFile == null) + { + return; + } + this.LaunchFile(curFile, true); + } - p.Start(); - sw = p.StandardInput; - sr = p.StandardOutput; - err = p.StandardError; + protected virtual void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + { + this.OnLaunchFilelink(curLink, MPGUIMode); + } - sw.AutoFlush = true; + public virtual string DefaultFilepath() + { + return ""; // override this if the appitem can have subfolders + } - for (int i = 0; i < script.Length; i++) - { - curLine = script[i].Trim(); - curLine = curLine.TrimStart('\n'); - if (curLine != "") - sw.WriteLine(curLine); - } - sw.Close(); + public virtual int DisplayFiles(string filePath, GUIFacadeControl facadeView) + { + int totalItems = 0; + if (filePath != lastFilepath) + { + Files.Load(AppID, filePath); + Filelinks.Load(AppID, filePath); + } + totalItems = totalItems + DisplayArrayList(filePath, this.Files, facadeView); + totalItems = totalItems + DisplayArrayList(filePath, this.Filelinks, facadeView); + lastFilepath = filePath; + return totalItems; + } - results += sr.ReadToEnd(); - errors += err.ReadToEnd(); - - if (errors.Trim() != "") - { - Log.Info("Application PrePost errors: {0}", errors); - } - } + protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) + { + int totalItems = 0; + //foreach (FileItem currentFileItem in dbItems) + foreach (object obj in dbItems) + { + totalItems = totalItems + 1; + if (obj is FileItem) + { + FileItem curFile = obj as FileItem; + GUIListItem gli = new GUIListItem(curFile.Title); + gli.Label2 = curFile.Title2; + gli.MusicTag = curFile; + gli.IsFolder = curFile.IsFolder; + gli.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); + gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); + facadeView.Add(gli); } - - public virtual void LaunchFile(GUIListItem item) + else if (obj is ProgramFilterItem) { - // Launch File by GUILISTITEM - // => look for FileItem and launch it using the found object - if (item.MusicTag == null) - { - return; - } - FileItem curFile = (FileItem)item.MusicTag; + ProgramFilterItem curFilter = obj as ProgramFilterItem; + GUIListItem gli = new GUIListItem(curFilter.Title); + gli.Label2 = curFilter.Title2; // some filters may have more than one text + gli.MusicTag = curFilter; + gli.IsFolder = true; + //ck + gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); - if (curFile == null) - { - return; - } - this.LaunchFile(curFile, true); + + facadeView.Add(gli); + } + } + return totalItems; + } - protected virtual void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + + void OnRetrieveCoverArt(GUIListItem gli) + { + if ((gli.MusicTag != null) && (gli.MusicTag is FileItem)) + { + FileItem curFile = (FileItem)gli.MusicTag; + if (curFile.Imagefile != "") { - this.OnLaunchFilelink(curLink, MPGUIMode); + gli.ThumbnailImage = curFile.Imagefile; + gli.IconImageBig = curFile.Imagefile; + gli.IconImage = curFile.Imagefile; } - - public virtual string DefaultFilepath() + else { - return ""; // override this if the appitem can have subfolders + gli.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + gli.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + gli.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; } + } + } - public virtual int DisplayFiles(string filePath, GUIFacadeControl facadeView) - { - int totalItems = 0; - if (filePath != lastFilepath) + /* private void OnItemSelected(GUIListItem item, GUIControl parent) + { + GUIFilmstripControl filmstrip = parent as GUIFilmstripControl; + if (filmstrip == null) return; + if (item == null) return; + if ((item.MusicTag != null) && (item.MusicTag is FileItem) && (!item.IsFolder)) + { + filmstrip.InfoImageFileName = item.ThumbnailImage; + } + else + { + filmstrip.InfoImageFileName = ""; + } + }*/ + private void OnItemSelected(GUIListItem item, GUIControl parent) + { + GUIPrograms.ThumbnailPath = ""; + if (item.ThumbnailImage != "" + && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png" + && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultAlbum.png" + ) + { + // only show big thumb if there is really one.... + GUIPrograms.ThumbnailPath = item.ThumbnailImage; + } + } + + public virtual void OnSort(GUIFacadeControl view, bool doSwitchState) + { + /* + * if (!filesAreLoaded) { - Files.Load(AppID, filePath); - Filelinks.Load(AppID, filePath); + LoadFiles(); } - totalItems = totalItems + DisplayArrayList(filePath, this.Files, facadeView); - totalItems = totalItems + DisplayArrayList(filePath, this.Filelinks, facadeView); - lastFilepath = filePath; - return totalItems; - } - protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) - { - int totalItems = 0; - //foreach (FileItem currentFileItem in dbItems) - foreach (object obj in dbItems) + if (doSwitchState) { - totalItems = totalItems + 1; - if (obj is FileItem) - { - FileItem curFile = obj as FileItem; - GUIListItem gli = new GUIListItem(curFile.Title); - gli.Label2 = curFile.Title2; - gli.MusicTag = curFile; - gli.IsFolder = curFile.IsFolder; - gli.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); - gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); - facadeView.Add(gli); - } - else if (obj is ProgramFilterItem) - { - ProgramFilterItem curFilter = obj as ProgramFilterItem; - GUIListItem gli = new GUIListItem(curFilter.Title); - gli.Label2 = curFilter.Title2; // some filters may have more than one text - gli.MusicTag = curFilter; - gli.IsFolder = true; - //ck - gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); + dbPc.UpdateState(); + } + view.Sort(dbPc); + */ + } + public virtual void OnSortToggle(GUIFacadeControl view) + { + dbPc.sortAscending = (!dbPc.sortAscending); + view.Sort(dbPc); + } - facadeView.Add(gli); + public virtual int GetCurrentSortIndex() + { + return dbPc.CurrentSortMethodIndex; + } - } - } - return totalItems; - } + public virtual void SetCurrentSortIndex(int newValue) + { + dbPc.CurrentSortMethodIndex = newValue; + } + public virtual string CurrentSortTitle() + { + return dbPc.CurrentSortMethodAsText; + } - void OnRetrieveCoverArt(GUIListItem gli) - { - if ((gli.MusicTag != null) && (gli.MusicTag is FileItem)) - { - FileItem curFile = (FileItem)gli.MusicTag; - if (curFile.Imagefile != "") - { - gli.ThumbnailImage = curFile.Imagefile; - gli.IconImageBig = curFile.Imagefile; - gli.IconImage = curFile.Imagefile; - } - else - { - gli.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - gli.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - gli.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; - } - } - } + public virtual bool GetCurrentSortIsAscending() + { + return dbPc.sortAscending; + } - /* private void OnItemSelected(GUIListItem item, GUIControl parent) - { - GUIFilmstripControl filmstrip = parent as GUIFilmstripControl; - if (filmstrip == null) return; - if (item == null) return; - if ((item.MusicTag != null) && (item.MusicTag is FileItem) && (!item.IsFolder)) - { - filmstrip.InfoImageFileName = item.ThumbnailImage; - } - else - { - filmstrip.InfoImageFileName = ""; - } - }*/ - private void OnItemSelected(GUIListItem item, GUIControl parent) - { - GUIPrograms.ThumbnailPath = ""; - if (item.ThumbnailImage != "" - && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png" - && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultAlbum.png" - ) - { - // only show big thumb if there is really one.... - GUIPrograms.ThumbnailPath = item.ThumbnailImage; - } - } + public virtual void SetCurrentSortIsAscending(bool newValue) + { + dbPc.sortAscending = newValue; + } - public virtual void OnSort(GUIFacadeControl view, bool doSwitchState) - { - /* - * if (!filesAreLoaded) - { - LoadFiles(); - } + public virtual bool RefreshButtonVisible() + { + return false; // otherwise, override this in child class + } - if (doSwitchState) - { - dbPc.UpdateState(); - } - view.Sort(dbPc); - */ - } + public virtual bool FileEditorAllowed() + { + return true; // otherwise, override this in child class + } - public virtual void OnSortToggle(GUIFacadeControl view) - { - dbPc.sortAscending = (!dbPc.sortAscending); - view.Sort(dbPc); - } + public virtual bool FileAddAllowed() + { + return true; // otherwise, override this in child class + } - public virtual int GetCurrentSortIndex() - { - return dbPc.CurrentSortMethodIndex; - } + public virtual bool FilesCanBeFavourites() + { + return true; // otherwise, override this in child class + } - public virtual void SetCurrentSortIndex(int newValue) - { - dbPc.CurrentSortMethodIndex = newValue; - } + public virtual bool FileBrowseAllowed() + { + // set this to true, if SUBDIRECTORIES are allowed + // (example: possible for DIRECTORY-CACHE) + return false; // otherwise, override this in child class + } - public virtual string CurrentSortTitle() - { - return dbPc.CurrentSortMethodAsText; - } + public virtual bool SubItemsAllowed() + { + return false; + } - public virtual bool GetCurrentSortIsAscending() - { - return dbPc.sortAscending; - } + public virtual bool ProfileLoadingAllowed() + { + return false; + } - public virtual void SetCurrentSortIsAscending(bool newValue) - { - dbPc.sortAscending = newValue; - } + public virtual void Refresh(bool mpGuiMode) + { + // descendant classes do that! + } - public virtual bool RefreshButtonVisible() - { - return false; // otherwise, override this in child class - } - public virtual bool FileEditorAllowed() + public virtual void OnInfo(GUIListItem item, ref bool isOverviewVisible, ref ProgramInfoAction modalResult, ref int selectedFileID) + { + GUIFileInfo fileInfoDialog = (GUIFileInfo)GUIWindowManager.GetWindow(ProgramUtils.ProgramInfoID); + if (null != fileInfoDialog) + { + if (item.MusicTag == null) { - return true; // otherwise, override this in child class + return; } + FileItem curFile = (FileItem)item.MusicTag; + fileInfoDialog.App = this; + fileInfoDialog.File = curFile; + fileInfoDialog.IsOverviewVisible = isOverviewVisible; + fileInfoDialog.DoModal(GetID); + isOverviewVisible = fileInfoDialog.IsOverviewVisible; + modalResult = fileInfoDialog.ModalResult; + selectedFileID = fileInfoDialog.SelectedFileID; + return; + } + } - public virtual bool FileAddAllowed() - { - return true; // otherwise, override this in child class - } + public int AppID + { + get { return appID; } + set { appID = value; } + } - public virtual bool FilesCanBeFavourites() - { - return true; // otherwise, override this in child class - } + public int FatherID + { + get { return fatherID; } + set { fatherID = value; } + } - public virtual bool FileBrowseAllowed() - { - // set this to true, if SUBDIRECTORIES are allowed - // (example: possible for DIRECTORY-CACHE) - return false; // otherwise, override this in child class - } + public string Title + { + get { return title; } + set { title = value; } + } - public virtual bool SubItemsAllowed() - { - return false; - } + public string ShortTitle + { + get { return shortTitle; } + set { shortTitle = value; } + } - public virtual bool ProfileLoadingAllowed() - { - return false; - } + public string Filename + { + get { return filename; } + set { filename = value; } + } - public virtual void Refresh(bool mpGuiMode) - { - // descendant classes do that! - } + public string Arguments + { + get { return arguments; } + set { arguments = value; } + } + public bool UseQuotes + { + get { return useQuotes; } + set { useQuotes = value; } + } - public virtual void OnInfo(GUIListItem item, ref bool isOverviewVisible, ref ProgramInfoAction modalResult, ref int selectedFileID) - { - GUIFileInfo fileInfoDialog = (GUIFileInfo)GUIWindowManager.GetWindow(ProgramUtils.ProgramInfoID); - if (null != fileInfoDialog) - { - if (item.MusicTag == null) - { - return; - } - FileItem curFile = (FileItem)item.MusicTag; - fileInfoDialog.App = this; - fileInfoDialog.File = curFile; - fileInfoDialog.IsOverviewVisible = isOverviewVisible; - fileInfoDialog.DoModal(GetID); - isOverviewVisible = fileInfoDialog.IsOverviewVisible; - modalResult = fileInfoDialog.ModalResult; - selectedFileID = fileInfoDialog.SelectedFileID; - return; - } - } + public bool UseShellExecute + { + get { return useShellExecute; } + set { useShellExecute = value; } + } - public int AppID - { - get { return appID; } - set { appID = value; } - } + public bool Enabled + { + get { return enabled; } + set { enabled = value; } + } - public int FatherID - { - get { return fatherID; } - set { fatherID = value; } - } + public ProcessWindowStyle WindowStyle + { + get { return windowStyle; } + set { windowStyle = value; } + } - public string Title - { - get { return title; } - set { title = value; } - } + public string Startupdir + { + get { return startupDir; } + set { startupDir = value; } + } - public string ShortTitle - { - get { return shortTitle; } - set { shortTitle = value; } - } + public string FileDirectory + { + get { return fileDirectory; } + set { fileDirectory = value; } + } - public string Filename - { - get { return filename; } - set { filename = value; } - } + public string ImageDirectory + { + get { return imageDirectories; } + set { SetImageDirectory(value); } + } - public string Arguments - { - get { return arguments; } - set { arguments = value; } - } + private void SetImageDirectory(string value) + { + imageDirectories = value; + imageDirs = imageDirectories.Split(';'); + for (int i = 0; i < imageDirs.Length; i++) + { + imageDirs[i] = imageDirs[i].Trim(); + // hack the \n away.... + // imageDirs[i] = imageDirs[i].TrimStart('\n'); + // hack trailing backslashes away + imageDirs[i] = imageDirs[i].TrimEnd('\\'); + } + } - public bool UseQuotes - { - get { return useQuotes; } - set { useQuotes = value; } - } + public string Imagefile + { + get { return imageFile; } + set { imageFile = value; } + } - public bool UseShellExecute - { - get { return useShellExecute; } - set { useShellExecute = value; } - } + public string Source + { + get { return sourceFile; } + set { sourceFile = value; } + } - public bool Enabled - { - get { return enabled; } - set { enabled = value; } - } + public ApplicationType SourceType + { + get { return sourceType; } + set { sourceType = value; } + } - public ProcessWindowStyle WindowStyle - { - get { return windowStyle; } - set { windowStyle = value; } - } + public string ValidExtensions + { + get { return validExtensions; } + set { validExtensions = value; } + } - public string Startupdir - { - get { return startupDir; } - set { startupDir = value; } - } + public bool ImportValidImagesOnly + { + get { return importValidImagesOnly; } + set { importValidImagesOnly = value; } + } - public string FileDirectory - { - get { return fileDirectory; } - set { fileDirectory = value; } - } + public int Position + { + get { return appPosition; } + set { appPosition = value; } + } - public string ImageDirectory - { - get { return imageDirectories; } - set { SetImageDirectory(value); } - } + public int ContentID + { + get { return contentID; } + set { contentID = value; } + } - private void SetImageDirectory(string value) - { - imageDirectories = value; - imageDirs = imageDirectories.Split(';'); - for (int i = 0; i < imageDirs.Length; i++) - { - imageDirs[i] = imageDirs[i].Trim(); - // hack the \n away.... - // imageDirs[i] = imageDirs[i].TrimStart('\n'); - // hack trailing backslashes away - imageDirs[i] = imageDirs[i].TrimEnd('\\'); - } - } + public string SystemDefault + { + get { return systemDefault; } + set { systemDefault = value; } + } - public string Imagefile - { - get { return imageFile; } - set { imageFile = value; } - } + public bool WaitForExit + { + get { return waitForExit; } + set { waitForExit = value; } + } - public string Source - { - get { return sourceFile; } - set { sourceFile = value; } - } - public ApplicationType SourceType - { - get { return sourceType; } - set { sourceType = value; } - } + public bool GUIRefreshPossible + { + get { return RefreshButtonVisible(); } + } - public string ValidExtensions - { - get { return validExtensions; } - set { validExtensions = value; } - } + public bool EnableGUIRefresh + { + get { return enableGUIRefresh; } + set { enableGUIRefresh = value; } + } - public bool ImportValidImagesOnly - { - get { return importValidImagesOnly; } - set { importValidImagesOnly = value; } - } + public string LaunchErrorMsg + { + get { return launchErrorMsg; } + set { launchErrorMsg = value; } + } - public int Position + public string PreLaunch + { + get { return preLaunch; } + set { preLaunch = value; } + } + + public string PostLaunch + { + get { return postLaunch; } + set { postLaunch = value; } + } + + + public FileItemList Files + { + // load on demand.... + get + { + if (!filesAreLoaded) { - get { return appPosition; } - set { appPosition = value; } + LoadFiles(); } + return fileList; + } + } - public int ContentID + + public FilelinkItemList Filelinks + { + // load on demand.... + get + { + if (!linksAreLoaded) { - get { return contentID; } - set { contentID = value; } + LoadFileLinks(); } + return fileLinks; + } + } - public string SystemDefault + + private int GetNewAppID() + { + // get an unused SQL application KEY-number + if (sqlDB != null) + { + // won't work in multiuser environment :) + SQLiteResultSet results; + int res = 0; + results = sqlDB.Execute("SELECT MAX(APPID) FROM application"); + SQLiteResultSet.Row arr = results.Rows[0]; + if (arr.fields[0] != null) { - get { return systemDefault; } - set { systemDefault = value; } + if (arr.fields[0] != "") + { + res = Int32.Parse(arr.fields[0]); + } } + return res + 1; + } + else return -1; + } - public bool WaitForExit + private void Insert() + { + if (sqlDB != null) + { + try { - get { return waitForExit; } - set { waitForExit = value; } + if (ContentID <= 0) + { + ContentID = 100; + } + //to remove + string Pincode = ""; + AppID = GetNewAppID(); // important to avoid subsequent inserts! + string sql = String.Format("insert into application (appid, fatherID, title, shorttitle, filename, arguments, windowstyle, startupdir, useshellexecute, usequotes, source_type, source, imagefile, filedirectory, imagedirectory, validextensions, importvalidimagesonly, iposition, enabled, enableGUIRefresh, GUIRefreshPossible, pincode, contentID, systemDefault, WaitForExit, preLaunch, postLaunch) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}', '{17}', '{18}', '{19}', '{20}', '{21}', '{22}', '{23}', '{24}', '{25}', '{26}')", + AppID, FatherID, ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), + ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(Startupdir), ProgramUtils.BooleanToStr(UseShellExecute), + ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), + ProgramUtils.Encode(FileDirectory), ProgramUtils.Encode(ImageDirectory), ProgramUtils.Encode(ValidExtensions), ProgramUtils.BooleanToStr(importValidImagesOnly), Position, + ProgramUtils.BooleanToStr(Enabled), ProgramUtils.BooleanToStr(EnableGUIRefresh), ProgramUtils.BooleanToStr(GUIRefreshPossible), Pincode, + ContentID, ProgramUtils.Encode(SystemDefault), ProgramUtils.BooleanToStr(WaitForExit), ProgramUtils.Encode(PreLaunch), ProgramUtils.Encode(PostLaunch) + ); + sqlDB.Execute(sql); } - - - public bool GUIRefreshPossible + catch (SQLiteException ex) { - get { return RefreshButtonVisible(); } + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } + } + } - public bool EnableGUIRefresh + private void Update() + { + string sql = ""; + //to remove + string Pincode = ""; + if ((AppID >= 0) && (sqlDB != null)) + { + if (ContentID <= 0) { - get { return enableGUIRefresh; } - set { enableGUIRefresh = value; } + ContentID = 100; } - - public string LaunchErrorMsg + try { - get { return launchErrorMsg; } - set { launchErrorMsg = value; } + sql = String.Format("update application set title = '{0}', shorttitle = '{1}', filename = '{2}', arguments = '{3}', windowstyle = '{4}', startupdir = '{5}', useshellexecute = '{6}', usequotes = '{7}', source_type = '{8}', source = '{9}', imagefile = '{10}',filedirectory = '{11}',imagedirectory = '{12}',validextensions = '{13}',importvalidimagesonly = '{14}',iposition = {15}, enabled = '{16}', fatherID = '{17}', enableGUIRefresh = '{18}', GUIRefreshPossible = '{19}', pincode = '{20}', contentID = '{21}', systemDefault = '{22}', WaitForExit = '{23}', preLaunch = '{24}', postLaunch = '{25}' where appID = {26}", + ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), + ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(Startupdir), ProgramUtils.BooleanToStr(UseShellExecute), + ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), + ProgramUtils.Encode(FileDirectory), ProgramUtils.Encode(ImageDirectory), ProgramUtils.Encode(ValidExtensions), ProgramUtils.BooleanToStr(importValidImagesOnly), Position, + ProgramUtils.BooleanToStr(Enabled), FatherID, ProgramUtils.BooleanToStr(EnableGUIRefresh), ProgramUtils.BooleanToStr(GUIRefreshPossible), + Pincode, ContentID, ProgramUtils.Encode(SystemDefault), ProgramUtils.BooleanToStr(WaitForExit), ProgramUtils.Encode(PreLaunch), ProgramUtils.Encode(PostLaunch), + AppID); + sqlDB.Execute(sql); } - - public string PreLaunch + catch (SQLiteException ex) { - get { return preLaunch; } - set { preLaunch = value; } + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + Log.Info("sql \n{0}", sql); } + } + } - public string PostLaunch + public void Delete() + { + if ((AppID >= 0) && (sqlDB != null)) + { + try { - get { return postLaunch; } - set { postLaunch = value; } + DeleteFiles(); + DeleteFileLinks(); + sqlDB.Execute(String.Format("delete from application where appid = {0}", AppID)); } - - - public FileItemList Files + catch (SQLiteException ex) { - // load on demand.... - get - { - if (!filesAreLoaded) - { - LoadFiles(); - } - return fileList; - } + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } + } + } - public FilelinkItemList Filelinks - { - // load on demand.... - get - { - if (!linksAreLoaded) - { - LoadFileLinks(); - } - return fileLinks; - } - } - private int GetNewAppID() + protected void DeleteFiles() + { + if ((AppID >= 0) && (sqlDB != null)) + { + try { - // get an unused SQL application KEY-number - if (sqlDB != null) - { - // won't work in multiuser environment :) - SQLiteResultSet results; - int res = 0; - results = sqlDB.Execute("SELECT MAX(APPID) FROM application"); - SQLiteResultSet.Row arr = results.Rows[0]; - if (arr.fields[0] != null) - { - if (arr.fields[0] != "") - { - res = Int32.Parse(arr.fields[0]); - } - } - return res + 1; - } - else return -1; + sqlDB.Execute(String.Format("delete from tblfile where appid = {0}", AppID)); } - - private void Insert() + catch (SQLiteException ex) { - if (sqlDB != null) - { - try - { - if (ContentID <= 0) - { - ContentID = 100; - } - //to remove - string Pincode = ""; - AppID = GetNewAppID(); // important to avoid subsequent inserts! - string sql = String.Format("insert into application (appid, fatherID, title, shorttitle, filename, arguments, windowstyle, startupdir, useshellexecute, usequotes, source_type, source, imagefile, filedirectory, imagedirectory, validextensions, importvalidimagesonly, iposition, enabled, enableGUIRefresh, GUIRefreshPossible, pincode, contentID, systemDefault, WaitForExit, preLaunch, postLaunch) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}', '{17}', '{18}', '{19}', '{20}', '{21}', '{22}', '{23}', '{24}', '{25}', '{26}')", - AppID, FatherID, ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), - ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(Startupdir), ProgramUtils.BooleanToStr(UseShellExecute), - ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), - ProgramUtils.Encode(FileDirectory), ProgramUtils.Encode(ImageDirectory), ProgramUtils.Encode(ValidExtensions), ProgramUtils.BooleanToStr(importValidImagesOnly), Position, - ProgramUtils.BooleanToStr(Enabled), ProgramUtils.BooleanToStr(EnableGUIRefresh), ProgramUtils.BooleanToStr(GUIRefreshPossible),Pincode , - ContentID, ProgramUtils.Encode(SystemDefault), ProgramUtils.BooleanToStr(WaitForExit), ProgramUtils.Encode(PreLaunch), ProgramUtils.Encode(PostLaunch) - ); - sqlDB.Execute(sql); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } + } + } - private void Update() + protected void DeleteFileLinks() + { + if ((AppID >= 0) && (sqlDB != null)) + { + try { - string sql = ""; - //to remove - string Pincode = ""; - if ((AppID >= 0) && (sqlDB != null)) - { - if (ContentID <= 0) - { - ContentID = 100; - } - try - { - sql = String.Format("update application set title = '{0}', shorttitle = '{1}', filename = '{2}', arguments = '{3}', windowstyle = '{4}', startupdir = '{5}', useshellexecute = '{6}', usequotes = '{7}', source_type = '{8}', source = '{9}', imagefile = '{10}',filedirectory = '{11}',imagedirectory = '{12}',validextensions = '{13}',importvalidimagesonly = '{14}',iposition = {15}, enabled = '{16}', fatherID = '{17}', enableGUIRefresh = '{18}', GUIRefreshPossible = '{19}', pincode = '{20}', contentID = '{21}', systemDefault = '{22}', WaitForExit = '{23}', preLaunc... [truncated message content] |
From: <che...@us...> - 2007-06-09 17:38:54
|
Revision: 497 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=497&view=rev Author: chef_koch Date: 2007-06-09 10:38:49 -0700 (Sat, 09 Jun 2007) Log Message: ----------- just some very minor formatting changes Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramInfo.cs 2007-06-09 16:50:16 UTC (rev 496) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramInfo.cs 2007-06-09 17:38:49 UTC (rev 497) @@ -24,13 +24,14 @@ #endregion using System; +using Microsoft.DirectX.Direct3D; + using MediaPortal.Dialogs; -using Microsoft.DirectX.Direct3D; using MediaPortal.GUI.Library; using MediaPortal.Util; +using GUIPrograms.ApplicationItems; using GUIPrograms.Database; -using GUIPrograms.ApplicationItems; using GUIPrograms.FileItems; namespace GUIPrograms @@ -550,4 +551,4 @@ } #endregion } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-09 16:50:16 UTC (rev 496) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-09 17:38:49 UTC (rev 497) @@ -24,27 +24,27 @@ #endregion using System; +using System.Drawing; using System.IO; +using System.Threading; using System.Xml.Serialization; +using Microsoft.DirectX; +using Microsoft.DirectX.Direct3D; +using Direct3D = Microsoft.DirectX.Direct3D; + +using MediaPortal.Configuration; using MediaPortal.Database; using MediaPortal.Dialogs; using MediaPortal.GUI.Library; using MediaPortal.GUI.View; using MediaPortal.Profile; using MediaPortal.Util; -using MediaPortal.Configuration; -using Microsoft.DirectX.Direct3D; -using Microsoft.DirectX; -using System.Drawing; -using System.Threading; -using Direct3D = Microsoft.DirectX.Direct3D; +using GUIPrograms.ApplicationItems; using GUIPrograms.Database; using GUIPrograms.Design; using GUIPrograms.FileItems; -using GUIPrograms.ApplicationItems; - namespace GUIPrograms { /// <summary> @@ -137,7 +137,6 @@ #endregion defaultOverrides - #region Serialisation [Serializable] @@ -560,8 +559,6 @@ #endregion - - #region Overrides public override bool Init() @@ -1367,8 +1364,5 @@ } #endregion - - - } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-06-09 16:50:16 UTC (rev 496) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-06-09 17:38:49 UTC (rev 497) @@ -24,12 +24,9 @@ #endregion using System; +using System.Collections; using System.Collections.Generic; -using System.Collections; using System.Diagnostics; -using MediaPortal.GUI.Library; -using MediaPortal.Util; -using SQLite.NET; using System.Drawing; using System.Drawing.Imaging; @@ -44,47 +41,57 @@ using System.Runtime.InteropServices; using System.Xml; using System.Windows.Forms; +using SQLite.NET; +using MediaPortal.GUI.Library; +using MediaPortal.Util; + namespace GUIPrograms { + #region enums - - public enum ApplicationType { - //Directory (Browse-Mode) - //Directory (DBCache-Mode) - //my-Files (myGames my-File output / kino.de scraper output, etc.) - //MyGames Meedio output - //Mame direct input - //File-Editor based launcher - //Item-Grouper - //Gamebase - UNKNOWN = 0, DIRBROWSE = 1, DIRCACHE = 2, MYFILEINI = 3, MYFILEMEEDIO = 4, MAMEDIRECT = 5, FILELAUNCHER = 6, GROUPER = 7, GAMEBASE = 8 - }; + UNKNOWN = 0, + DIRBROWSE = 1, //Directory (Browse-Mode) + DIRCACHE = 2, //Directory (DBCache-Mode) + MYFILEINI = 3, //my-Files (myGames my-File output / kino.de scraper output, etc.) + MYFILEMEEDIO = 4, //MyGames Meedio output + MAMEDIRECT = 5, //Mame direct input + FILELAUNCHER = 6, //File-Editor based launcher + GROUPER = 7, //Item-Grouper + GAMEBASE = 8, //Gamebase + } public enum ScraperType { - UNKNOWN = 0, ALLGAME = 1 + UNKNOWN = 0, + ALLGAME = 1, // VGMUSEUM / AMAZON etc. etc. etc. :) } public enum ScraperSaveType { - Data = 0, Images = 1, DataAndImages = 2 + Data = 0, + Images = 1, + DataAndImages = 2, } public enum ProgramInfoAction { - None = 0, LookupFileInfo = 1 + None = 0, + LookupFileInfo = 1, } + #endregion /// <summary> /// Summary description for ProgramUtils. /// </summary> public class ProgramUtils { + #region Variables + public delegate void UtilEventHandler(Process proc, bool waitForExit); static public event UtilEventHandler OnStartExternal = null; // Event: Start external process / waeberd & mPod static public event UtilEventHandler OnStopExternal = null; @@ -93,7 +100,6 @@ public const int ProgramInfoID = 1206; // some magic number, sync with DialogAppInfo.xml public const string cBackLabel = ".."; - public const string cMAMEDIRECT = "MAME_DIRECT"; public const string cDIRCACHE = "DIR_CACHE"; public const string cGROUPER = "GROUPER"; @@ -105,11 +111,16 @@ public const string cGENRE_PATCH = "GENREPATCH"; public const string cPREPOST_PATCH = "PREPOSTPATCH"; + #endregion Variables + + #region Constructor + // singleton. Dont allow any instance of this class private ProgramUtils() { } - static ProgramUtils() { } + #endregion Constructor + static public string Encode(string strValue) { return strValue.Replace("'", "''"); @@ -181,7 +192,6 @@ return nResult; } - static public DateTime StrToDateDef(string strVal, DateTime dteDefValue) { DateTime dteResult = dteDefValue; @@ -196,7 +206,6 @@ return dteResult; } - static public DateTime GetDateDef(SQLiteResultSet results, int iRecord, string strColumn, DateTime dteDefValue) { DateTime dteResult = dteDefValue; @@ -208,7 +217,6 @@ return dteResult; } - static public bool GetBool(SQLiteResultSet results, int iRecord, string strColumn) { return (Get(results, iRecord, strColumn) == "T"); @@ -245,7 +253,6 @@ return res; } - static public ProcessWindowStyle StringToWindowStyle(string strValue) { if (strValue.ToLower().Trim() == "hidden") @@ -288,7 +295,6 @@ return res; } - static public ApplicationType StringToSourceType(string strValue) { @@ -314,7 +320,6 @@ return ApplicationType.UNKNOWN; } - //ck static public void RemoveInvalidChars(ref string strTxt) { @@ -429,8 +434,6 @@ GUIPrograms.ThumbnailPath = ""; } - - static public string GetAvailableExtensions(string curDirectory) { char separator = ';'; @@ -497,7 +500,5 @@ } return strRes; } - - } -} +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-10 17:37:19
|
Revision: 505 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=505&view=rev Author: northern_sky Date: 2007-06-10 10:37:16 -0700 (Sun, 10 Jun 2007) Log Message: ----------- genres changed to main/subgenre + small db-tblrename 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/Database/DatabaseSettings.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 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/GUIFileDetailsInfoParser.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs 2007-06-10 17:37:16 UTC (rev 505) @@ -868,7 +868,7 @@ // won't work in multiuser environment :) SQLiteResultSet results; int res = 0; - results = sqlDB.Execute("SELECT MAX(APPID) FROM application"); + results = sqlDB.Execute("SELECT MAX(APPID) FROM tblApplicationItem"); SQLiteResultSet.Row arr = results.Rows[0]; if (arr.fields[0] != null) { @@ -895,7 +895,7 @@ //to remove string Pincode = ""; AppID = GetNewAppID(); // important to avoid subsequent inserts! - string sql = String.Format("insert into application (appid, fatherID, title, shorttitle, filename, arguments, windowstyle, startupdir, useshellexecute, usequotes, source_type, source, imagefile, filedirectory, imagedirectory, validextensions, importvalidimagesonly, iposition, enabled, enableGUIRefresh, GUIRefreshPossible, pincode, contentID, systemDefault, WaitForExit, preLaunch, postLaunch) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}', '{17}', '{18}', '{19}', '{20}', '{21}', '{22}', '{23}', '{24}', '{25}', '{26}')", + string sql = String.Format("insert into tblApplicationItem (appid, fatherID, title, shorttitle, filename, arguments, windowstyle, startupdir, useshellexecute, usequotes, source_type, source, imagefile, filedirectory, imagedirectory, validextensions, importvalidimagesonly, iposition, enabled, enableGUIRefresh, GUIRefreshPossible, pincode, contentID, systemDefault, WaitForExit, preLaunch, postLaunch) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}', '{17}', '{18}', '{19}', '{20}', '{21}', '{22}', '{23}', '{24}', '{25}', '{26}')", AppID, FatherID, ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(Startupdir), ProgramUtils.BooleanToStr(UseShellExecute), ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), @@ -925,7 +925,7 @@ } try { - sql = String.Format("update application set title = '{0}', shorttitle = '{1}', filename = '{2}', arguments = '{3}', windowstyle = '{4}', startupdir = '{5}', useshellexecute = '{6}', usequotes = '{7}', source_type = '{8}', source = '{9}', imagefile = '{10}',filedirectory = '{11}',imagedirectory = '{12}',validextensions = '{13}',importvalidimagesonly = '{14}',iposition = {15}, enabled = '{16}', fatherID = '{17}', enableGUIRefresh = '{18}', GUIRefreshPossible = '{19}', pincode = '{20}', contentID = '{21}', systemDefault = '{22}', WaitForExit = '{23}', preLaunch = '{24}', postLaunch = '{25}' where appID = {26}", + sql = String.Format("update tblApplicationItem set title = '{0}', shorttitle = '{1}', filename = '{2}', arguments = '{3}', windowstyle = '{4}', startupdir = '{5}', useshellexecute = '{6}', usequotes = '{7}', source_type = '{8}', source = '{9}', imagefile = '{10}',filedirectory = '{11}',imagedirectory = '{12}',validextensions = '{13}',importvalidimagesonly = '{14}',iposition = {15}, enabled = '{16}', fatherID = '{17}', enableGUIRefresh = '{18}', GUIRefreshPossible = '{19}', pincode = '{20}', contentID = '{21}', systemDefault = '{22}', WaitForExit = '{23}', preLaunch = '{24}', postLaunch = '{25}' where appID = {26}", ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(Startupdir), ProgramUtils.BooleanToStr(UseShellExecute), ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), @@ -951,7 +951,7 @@ { DeleteFiles(); DeleteFileLinks(); - sqlDB.Execute(String.Format("delete from application where appid = {0}", AppID)); + sqlDB.Execute(String.Format("delete from tblApplicationItem where appid = {0}", AppID)); } catch (SQLiteException ex) { @@ -969,7 +969,7 @@ { try { - sqlDB.Execute(String.Format("delete from tblfile where appid = {0}", AppID)); + sqlDB.Execute(String.Format("delete from tblFileItem where appid = {0}", AppID)); } catch (SQLiteException ex) { @@ -984,7 +984,7 @@ { try { - sqlDB.Execute(String.Format("delete from filteritem where appid = {0} or grouperappid = {0}", AppID)); + sqlDB.Execute(String.Format("delete from tblFilterItem where appid = {0} or grouperappid = {0}", AppID)); } catch (SQLiteException ex) { @@ -1038,10 +1038,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 filteritem fi, tblfile f where fi.appID = f.appid and fi.filename = f.filename and fi.appID = {0}", AppID); + 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); // update command to fix one single link - string sqlFixOneLink = "update filteritem set fileID = {0}, tag = 0 where appID = {1} and filename = '{2}'"; + string sqlFixOneLink = "update tblFilterItem set fileID = {0}, tag = 0 where appID = {1} and filename = '{2}'"; SQLiteResultSet rows2fix; @@ -1049,7 +1049,7 @@ try { // 1) initialize TAG - sqlDB.Execute(String.Format("update filteritem set tag = 1234 where appid = {0}", AppID)); + sqlDB.Execute(String.Format("update tblFilterItem set tag = 1234 where appid = {0}", AppID)); // 2) fix all fileids of the newly imported files rows2fix = sqlDB.Execute(sqlSelectDataToFix); @@ -1064,7 +1064,7 @@ } // 3) delete untouched links ( they were not imported anymore ) - sqlDB.Execute(String.Format("delete from filteritem where appid = {0} and tag = 1234", AppID)); + sqlDB.Execute(String.Format("delete from tblFilterItem where appid = {0} and tag = 1234", AppID)); } catch (SQLiteException ex) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -161,7 +161,7 @@ if (null == sqlDB) return; SQLiteResultSet results; - results = sqlDB.Execute("select * from application order by iposition"); + results = sqlDB.Execute("select * from tblApplicationItem order by iposition"); if (results.Rows.Count == 0) return; for (int row = 0; row < results.Rows.Count; row++) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -132,7 +132,8 @@ FROM sqlite_temp_master - WHERE type='" + strType + @"' + WHERE + type='" + strType + @"' ORDER BY name"); @@ -181,14 +182,14 @@ if (sqlDB == null) return false; - skipPrePostPatch = DatabaseUtility.AddTable(sqlDB, "application", "CREATE TABLE application (appid integer primary key, fatherID integer, title text, shorttitle 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, pincode integer, preLaunch text, postLaunch text)"); - DatabaseUtility.AddTable(sqlDB, "tblfile", "CREATE TABLE tblfile (fileid integer primary key, appid integer, title text, filename text, filepath text, imagefile text, genre text, genre2 text, genre3 text, genre4 text, genre5 text, country text, manufacturer text, year integer, rating integer, overview text, system text, import_flag integer, manualfilename text, lastTimeLaunched text, launchcount integer, isfolder text, external_id integer, uppertitle text, tagdata text, categorydata text)"); - DatabaseUtility.AddTable(sqlDB, "filterItem", "CREATE TABLE filterItem (appid integer, grouperAppID integer, fileID integer, filename text, tag integer)"); - DatabaseUtility.AddTable(sqlDB, "setting", "CREATE TABLE setting (settingid integer primary key, key text, value text)"); - DatabaseUtility.AddIndex(sqlDB, "idxFile1", "CREATE INDEX idxFile1 ON tblfile(appid)"); - DatabaseUtility.AddIndex(sqlDB, "idxFile2", "CREATE INDEX idxFile2 ON tblfile(filepath, uppertitle)"); - DatabaseUtility.AddIndex(sqlDB, "idxApp1", "CREATE INDEX idxApp1 ON application(fatherID)"); - DatabaseUtility.AddIndex(sqlDB, "idxFilterItem1", "CREATE UNIQUE INDEX idxFilterItem1 ON filterItem(appID, fileID, grouperAppID)"); + skipPrePostPatch = DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, shorttitle 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, pincode integer, preLaunch text, postLaunch text)"); + DatabaseUtility.AddTable(sqlDB, "tblFileItem", "CREATE TABLE tblFileItem (fileid integer primary key, appid integer, title text, filename text, filepath text, imagefile text, mainGenre text, subGenre text, country text, manufacturer text, year integer, rating integer, overview text, system text, import_flag integer, manualfilename text, lastTimeLaunched text, launchcount integer, isfolder text, external_id integer, uppertitle text, tagdata text, categorydata 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.AddIndex(sqlDB, "idxFile1", "CREATE INDEX idxFile1 ON tblFileItem(appid)"); + DatabaseUtility.AddIndex(sqlDB, "idxFile2", "CREATE INDEX idxFile2 ON tblFileItem(filepath, uppertitle)"); + DatabaseUtility.AddIndex(sqlDB, "idxApp1", "CREATE INDEX idxApp1 ON tblApplicationItem(fatherID)"); + DatabaseUtility.AddIndex(sqlDB, "idxFilterItem1", "CREATE UNIQUE INDEX idxFilterItem1 ON tblFilterItem(appID, fileID, grouperAppID)"); if (skipPrePostPatch) { @@ -207,8 +208,8 @@ if (!DatabaseSettings.KeyExists(ProgramUtils.cCONTENT_PATCH)) { Log.Info("myPrograms: applying contentID-patch"); - sqlDB.Execute("UPDATE application SET contentID = 100 WHERE contentID IS NULL"); - sqlDB.Execute("UPDATE application SET contentID = 100 WHERE contentID <= 0"); + sqlDB.Execute("UPDATE tblApplicationItem SET contentID = 100 WHERE contentID IS NULL"); + sqlDB.Execute("UPDATE tblApplicationItem SET contentID = 100 WHERE contentID <= 0"); DatabaseSettings.WriteSetting(ProgramUtils.cCONTENT_PATCH, "DONE"); } } @@ -219,9 +220,9 @@ return; Log.Info("myPrograms: applying empty-value-patch"); - sqlDB.Execute("UPDATE tblfile SET launchcount = 0 WHERE launchcount = ''"); - sqlDB.Execute("UPDATE tblfile SET launchcount = 0 WHERE launchcount <= 0"); - sqlDB.Execute("UPDATE tblfile SET lastTimeLaunched = '01.01.0001 00:00:00' WHERE lastTimeLaunched = ''"); + sqlDB.Execute("UPDATE tblFileItem SET launchcount = 0 WHERE launchcount = ''"); + sqlDB.Execute("UPDATE tblFileItem SET launchcount = 0 WHERE launchcount <= 0"); + sqlDB.Execute("UPDATE tblFileItem SET lastTimeLaunched = '01.01.0001 00:00:00' WHERE lastTimeLaunched = ''"); } static void PatchGenreValues() @@ -231,11 +232,8 @@ if (!DatabaseSettings.KeyExists(ProgramUtils.cGENRE_PATCH)) { Log.Info("myPrograms: applying genre-patch"); - sqlDB.Execute("UPDATE tblfile SET genre = '' WHERE genre IS NULL"); - sqlDB.Execute("UPDATE tblfile SET genre2 = '' WHERE genre2 IS NULL"); - sqlDB.Execute("UPDATE tblfile SET genre3 = '' WHERE genre3 IS NULL"); - sqlDB.Execute("UPDATE tblfile SET genre4 = '' WHERE genre4 IS NULL"); - sqlDB.Execute("UPDATE tblfile SET genre5 = '' WHERE genre5 IS NULL"); + sqlDB.Execute("UPDATE tblFileItem SET mainGenre = '' WHERE mainGenre IS NULL"); + sqlDB.Execute("UPDATE tblFileItem SET subGenre = '' WHERE subGenre IS NULL"); DatabaseSettings.WriteSetting(ProgramUtils.cGENRE_PATCH, "DONE"); } } @@ -267,8 +265,8 @@ try { Log.Info("myPrograms: adding preLaunch / postLaunch fields"); - sqlDB.Execute("ALTER TABLE application ADD COLUMN preLaunch TEXT"); - sqlDB.Execute("ALTER TABLE application ADD COLUMN postLaunch TEXT"); + sqlDB.Execute("ALTER TABLE tblApplicationItem ADD COLUMN preLaunch TEXT"); + sqlDB.Execute("ALTER TABLE tblApplicationItem ADD COLUMN postLaunch TEXT"); DatabaseSettings.WriteSetting(ProgramUtils.cPREPOST_PATCH, "DONE"); } catch (SQLiteException ex) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseSettings.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseSettings.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseSettings.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -52,7 +52,7 @@ value FROM - setting + tblSetting WHERE key ='" + Key + "'"; @@ -77,7 +77,7 @@ COUNT(*) FROM - setting + tblSetting WHERE key ='" + Key + "'"); @@ -100,7 +100,7 @@ { sqlDB.Execute(@" UPDATE - setting + tblSetting SET value = '" + Value + @"' @@ -112,7 +112,7 @@ { sqlDB.Execute(@" INSERT INTO - setting (key, value) + tblSetting (key, value) VALUES('" + Key + "', '" + Value + "')"); } @@ -120,7 +120,7 @@ static public void DeleteSetting(string Key) { - sqlDB.Execute("DELETE FROM setting WHERE key = '" + Key + "'"); + sqlDB.Execute("DELETE FROM tblSetting WHERE key = '" + Key + "'"); } } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -673,47 +673,28 @@ void GenreToFileItem() { - CurFile.Genre = ""; - CurFile.Genre2 = ""; - CurFile.Genre3 = ""; - CurFile.Genre4 = ""; - CurFile.Genre5 = ""; - if (txtGenre.Lines.Length > 0) { CurFile.Genre = txtGenre.Lines[0]; } - if (txtGenre.Lines.Length > 1) { CurFile.Genre2 = txtGenre.Lines[1]; } - if (txtGenre.Lines.Length > 2) { CurFile.Genre3 = txtGenre.Lines[2]; } - if (txtGenre.Lines.Length > 3) { CurFile.Genre4 = txtGenre.Lines[3]; } - if (txtGenre.Lines.Length > 4) { CurFile.Genre5 = txtGenre.Lines[4]; } + CurFile.MainGenre = ""; + CurFile.SubGenre = ""; + if (txtGenre.Lines.Length > 0) { CurFile.MainGenre = txtGenre.Lines[0]; } + if (txtGenre.Lines.Length > 1) { CurFile.SubGenre = txtGenre.Lines[1]; } + } void FileItemToGenre() { string sep = ""; txtGenre.Text = ""; - if (CurFile.Genre != "") + if (CurFile.MainGenre != "") { - txtGenre.Text = txtGenre.Text + sep + CurFile.Genre; + txtGenre.Text = txtGenre.Text + sep + CurFile.MainGenre; sep = "\r\n"; } - if (CurFile.Genre2 != "") + if (CurFile.SubGenre != "") { - txtGenre.Text = txtGenre.Text + sep + CurFile.Genre2; + txtGenre.Text = txtGenre.Text + sep + CurFile.SubGenre; sep = "\r\n"; } - if (CurFile.Genre3 != "") - { - txtGenre.Text = txtGenre.Text + sep + CurFile.Genre3; - sep = "\r\n"; - } - if (CurFile.Genre4 != "") - { - txtGenre.Text = txtGenre.Text + sep + CurFile.Genre4; - sep = "\r\n"; - } - if (CurFile.Genre5 != "") - { - txtGenre.Text = txtGenre.Text + sep + CurFile.Genre5; - sep = "\r\n"; - } + } private void btnOk_Click(object sender, EventArgs e) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -49,11 +49,8 @@ string filename; string filepath; string imagefile; - string genre; - string genre2; - string genre3; - string genre4; - string genre5; + string mainGenre; + string subGenre; string country; string manufacturer; int year; @@ -87,11 +84,8 @@ filename = ""; filepath = ""; imagefile = ""; - genre = ""; - genre2 = ""; - genre3 = ""; - genre4 = ""; - genre5 = ""; + mainGenre = ""; + subGenre = ""; country = ""; manufacturer = ""; year = -1; @@ -225,70 +219,34 @@ } } - public string Genre + public string MainGenre { get { - return genre; + return mainGenre; } set { - genre = value; + mainGenre = value; } } - public string Genre2 + public string SubGenre { get { - return genre2; + return subGenre; } set { - genre2 = value; + subGenre = value; } } - public string Genre3 + public string Country { get { - return genre3; - } - set - { - genre3 = value; - } - } - - public string Genre4 - { - get - { - return genre4; - } - set - { - genre4 = value; - } - } - - public string Genre5 - { - get - { - return genre5; - } - set - { - genre5 = value; - } - } - - public string Country - { - get - { return country; } set @@ -615,18 +573,15 @@ string strSQL = String.Format( @" INSERT INTO - tblfile ( + tblFileItem ( fileid, appid, title, filename, filepath, imagefile, - genre, - genre2, - genre3, - genre4, - genre5, + mainGenre, + subGenre, country, manufacturer, year, @@ -665,21 +620,15 @@ '{17}', '{18}', '{19}', - '{20}', - '{21}', - '{22}', - '{23}' + '{20}' )", AppID, ProgramUtils.Encode(Title), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Filepath), ProgramUtils.Encode(Imagefile), - ProgramUtils.Encode(Genre), - ProgramUtils.Encode(Genre2), - ProgramUtils.Encode(Genre3), - ProgramUtils.Encode(Genre4), - ProgramUtils.Encode(Genre5), + ProgramUtils.Encode(MainGenre), + ProgramUtils.Encode(SubGenre), Country, ProgramUtils.Encode(Manufacturer), strYear, @@ -726,7 +675,7 @@ string strSQL = String.Format( @" INSERT INTO - tblfile ( + tblFileItem ( fileid, appid, title, @@ -826,7 +775,7 @@ try { string strSQL = String.Format( - "UPDATE tblfile SET title = '{1}', filename = '{2}', filepath = '{3}', imagefile = '{4}', genre = '{5}', genre2 = '{6}', genre3 = '{7}', genre4 = '{8}', genre5 = '{9}', country = '{10}', manufacturer = '{11}', year = '{12}', rating = '{13}', overview = '{14}', system = '{15}', uppertitle = '{16}', tagdata = '{17}', categorydata = '{18}' where fileid = {0}", FileID, ProgramUtils.Encode(Title), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Filepath), ProgramUtils.Encode(Imagefile), ProgramUtils.Encode(Genre), ProgramUtils.Encode(Genre2), ProgramUtils.Encode(Genre3), ProgramUtils.Encode(Genre4), ProgramUtils.Encode(Genre5), ProgramUtils.Encode(Country), ProgramUtils.Encode(Manufacturer), strYear, Rating, ProgramUtils.Encode(Overview), ProgramUtils.Encode(System_), ProgramUtils.Encode(Title.ToUpper()), ProgramUtils.Encode(TagData), ProgramUtils.Encode(CategoryData)); + "UPDATE tblFileItem SET title = '{1}', filename = '{2}', filepath = '{3}', imagefile = '{4}', mainGenre = '{5}', subGenre = '{6}', country = '{7}', manufacturer = '{8}', year = '{9}', rating = '{10}', overview = '{11}', system = '{12}', uppertitle = '{13}', tagdata = '{14}', categorydata = '{15}' where fileid = {0}", FileID, ProgramUtils.Encode(Title), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Filepath), ProgramUtils.Encode(Imagefile), ProgramUtils.Encode(MainGenre), ProgramUtils.Encode(SubGenre), ProgramUtils.Encode(Country), ProgramUtils.Encode(Manufacturer), strYear, Rating, ProgramUtils.Encode(Overview), ProgramUtils.Encode(System_), ProgramUtils.Encode(Title.ToUpper()), ProgramUtils.Encode(TagData), ProgramUtils.Encode(CategoryData)); sqlDB.Execute(strSQL); } catch (SQLiteException ex) @@ -841,7 +790,7 @@ { LastTimeLaunched = DateTime.Now; LaunchCount = LaunchCount + 1; - string strSQL = String.Format("UPDATE tblfile SET lastTimeLaunched = '{0}', launchcount = {1} WHERE fileid = {2}", LastTimeLaunched, LaunchCount, FileID); + string strSQL = String.Format("UPDATE tblFileItem SET lastTimeLaunched = '{0}', launchcount = {1} WHERE fileid = {2}", LastTimeLaunched, LaunchCount, FileID); sqlDB.Execute(strSQL); } catch (SQLiteException ex) @@ -868,8 +817,8 @@ { try { - string strSQL1 = String.Format("DELETE FROM filteritem WHERE fileid = {0}", this.FileID); - string strSQL2 = String.Format("DELETE FROM tblfile WHERE fileid = {0}", this.FileID); + string strSQL1 = String.Format("DELETE FROM tblFilterItem WHERE fileid = {0}", this.FileID); + string strSQL2 = String.Format("DELETE FROM tblFileItem WHERE fileid = {0}", this.FileID); sqlDB.Execute(strSQL1); sqlDB.Execute(strSQL2); } @@ -957,11 +906,8 @@ FileInfoFavourite.Title = this.Title; //FileInfoFavourite.GameURL = this.mGameURL; - FileInfoFavourite.Genre = this.Genre; - FileInfoFavourite.Genre2 = this.Genre2; - FileInfoFavourite.Genre3 = this.Genre3; - FileInfoFavourite.Genre4 = this.Genre4; - FileInfoFavourite.Genre5 = this.Genre5; + FileInfoFavourite.MainGenre = this.MainGenre; + FileInfoFavourite.SubGenre = this.SubGenre; FileInfoFavourite.Manufacturer = this.Manufacturer; FileInfoFavourite.Year = this.Year.ToString(); FileInfoFavourite.Overview = this.Overview; @@ -974,11 +920,8 @@ if (this.FileInfoFavourite != null) { // DON'T overwrite title! this.Title = FileInfoFavourite.Title; - this.Genre = FileInfoFavourite.Genre; - this.Genre2 = FileInfoFavourite.Genre2; - this.Genre3 = FileInfoFavourite.Genre3; - this.Genre4 = FileInfoFavourite.Genre4; - this.Genre5 = FileInfoFavourite.Genre5; + this.MainGenre = FileInfoFavourite.MainGenre; + this.SubGenre = FileInfoFavourite.SubGenre; this.Manufacturer = FileInfoFavourite.Manufacturer; this.Year = ProgramUtils.StringToInteger(FileInfoFavourite.Year, -1); this.Overview = FileInfoFavourite.Overview; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -45,11 +45,8 @@ string year; string gameURL; string title; - string genre; - string genre2; - string genre3; - string genre4; - string genre5; + string mainGenre; + string subGenre; string style; string platform; string rating; @@ -69,11 +66,8 @@ year = ""; gameURL = ""; title = ""; - genre = ""; - genre2 = ""; - genre3 = ""; - genre4 = ""; - genre5 = ""; + mainGenre = ""; + subGenre = ""; style = ""; platform = ""; rating = ""; @@ -152,66 +146,31 @@ } } - public string Genre + public string MainGenre { get { - return genre; + return mainGenre; } set { - genre = value; + mainGenre = value; } } - public string Genre2 + public string SubGenre { get { - return genre2; + return subGenre + ; } set { - genre2 = value; + subGenre = value; } } - public string Genre3 - { - get - { - return genre3; - } - set - { - genre3 = value; - } - } - - public string Genre4 - { - get - { - return genre4; - } - set - { - genre4 = value; - } - } - - public string Genre5 - { - get - { - return genre5; - } - set - { - genre5 = value; - } - } - public string Style { get Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -82,11 +82,8 @@ newFile.Filename = ProgramUtils.Get(results, iRecord, "filename"); newFile.Filepath = ProgramUtils.Get(results, iRecord, "filepath"); newFile.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); - newFile.Genre = ProgramUtils.Get(results, iRecord, "genre"); - newFile.Genre2 = ProgramUtils.Get(results, iRecord, "genre2"); - newFile.Genre3 = ProgramUtils.Get(results, iRecord, "genre3"); - newFile.Genre4 = ProgramUtils.Get(results, iRecord, "genre4"); - newFile.Genre5 = ProgramUtils.Get(results, iRecord, "genre5"); + newFile.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); + newFile.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); newFile.Country = ProgramUtils.Get(results, iRecord, "country"); newFile.Manufacturer = ProgramUtils.Get(results, iRecord, "manufacturer"); newFile.Year = ProgramUtils.GetIntDef(results, iRecord, "year", -1); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -79,7 +79,7 @@ try { //sqliteClient.Execute("begin"); - string strSQL2 = String.Format(String.Format("DELETE FROM filterItem WHERE appid = {0} AND grouperAppID = {1} AND fileID = {2}", this.TargetAppID, + string strSQL2 = String.Format(String.Format("DELETE FROM tblFilterItem WHERE appid = {0} AND grouperAppID = {1} AND fileID = {2}", this.TargetAppID, this.AppID, this.FileID)); sqlDB.Execute(strSQL2); //sqliteClient.Execute("commit"); @@ -96,7 +96,7 @@ { SQLiteResultSet results; int res = 0; - results = sqlDB.Execute(String.Format("SELECT COUNT(*) FROM filterItem WHERE appid = {0} AND grouperAppID = {1} AND fileID = {2}", this.TargetAppID, + results = sqlDB.Execute(String.Format("SELECT COUNT(*) FROM tblFilterItem WHERE appid = {0} AND grouperAppID = {1} AND fileID = {2}", this.TargetAppID, this.AppID, this.FileID)); if (results != null && results.Rows.Count > 0) { @@ -111,7 +111,7 @@ try { //sqliteClient.Execute("begin"); - string strSQL2 = String.Format(String.Format("INSERT INTO filterItem (appid, grouperAppID, fileID, filename) VALUES ({0}, {1}, {2}, '{3}')", + string strSQL2 = String.Format(String.Format("INSERT INTO tblFilterItem (appid, grouperAppID, fileID, filename) VALUES ({0}, {1}, {2}, '{3}')", this.TargetAppID, this.AppID, this.FileID, ProgramUtils.Encode(Filename))); // Log.Info("hi from filelinkiteminsert: {0}", strSQL2); sqlDB.Execute(strSQL2); @@ -127,7 +127,7 @@ private void Update() { // nothing to update (yet) - //...... as all FILTERITEM fields are primary key fields... + //...... as all tblFilterItem fields are primary key fields... } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -56,11 +56,8 @@ newLink.Filename = ProgramUtils.Get(results, iRecord, "filename"); newLink.Filepath = ProgramUtils.Get(results, iRecord, "filepath"); newLink.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); - newLink.Genre = ProgramUtils.Get(results, iRecord, "genre"); - newLink.Genre2 = ProgramUtils.Get(results, iRecord, "genre2"); - newLink.Genre3 = ProgramUtils.Get(results, iRecord, "genre3"); - newLink.Genre4 = ProgramUtils.Get(results, iRecord, "genre4"); - newLink.Genre5 = ProgramUtils.Get(results, iRecord, "genre5"); + newLink.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); + newLink.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); newLink.Country = ProgramUtils.Get(results, iRecord, "country"); newLink.Manufacturer = ProgramUtils.Get(results, iRecord, "manufacturer"); newLink.Year = ProgramUtils.GetIntDef(results, iRecord, "year", -1); @@ -90,7 +87,7 @@ // applicationItem. // SPECIAL: the current application IS NOT the application with the launchinfo! strSQL = String.Format( - "SELECT fi.appid AS targetappid, fi.grouperappid AS grouperappid, f.fileid AS fileid, title, uppertitle, f.filename as filename, filepath, imagefile, genre, genre2, genre3, genre4, genre5, country, manufacturer, YEAR, rating, overview, SYSTEM, import_flag, manualfilename, lasttimelaunched, launchcount, isfolder, external_id FROM tblFILE f, filteritem fi WHERE f.fileid = fi.fileid AND grouperappid = {0} ORDER BY filepath, uppertitle", nAppID); + "SELECT fi.appid AS targetappid, fi.grouperappid AS grouperappid, f.fileid AS fileid, title, uppertitle, f.filename as filename, filepath, imagefile, genre, genre2, genre3, genre4, genre5, country, manufacturer, YEAR, rating, overview, SYSTEM, import_flag, manualfilename, lasttimelaunched, launchcount, isfolder, external_id FROM tblFileItem f, tblFilterItem fi WHERE f.fileid = fi.fileid AND grouperappid = {0} ORDER BY filepath, uppertitle", nAppID); results = sqlDB.Execute(strSQL); if (results.Rows.Count == 0) return; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIFileDetailsInfoParser.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIFileDetailsInfoParser.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIFileDetailsInfoParser.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -210,31 +210,16 @@ case "genre": { string sep = ""; - if (curFile.Genre != "") + if (curFile.MainGenre != "") { - result = curFile.Genre; + result = curFile.MainGenre; sep = " / "; } - if (curFile.Genre2 != "") + if (curFile.SubGenre != "") { - result = result + sep + curFile.Genre2; + result = result + sep + curFile.SubGenre; sep = " / "; } - if (curFile.Genre3 != "") - { - result = result + sep + curFile.Genre3; - sep = " / "; - } - if (curFile.Genre4 != "") - { - result = result + sep + curFile.Genre4; - sep = " / "; - } - if (curFile.Genre5 != "") - { - result = result + sep + curFile.Genre5; - sep = " / "; - } break; } case "overview": Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -173,7 +173,7 @@ newGame.Style = match.Groups["style"].Value; match = Regex.Match(tableData[6], regexpGenre, RegexOptions.IgnoreCase); - newGame.Genre = match.Groups["genre"].Value; + newGame.MainGenre = match.Groups["genre"].Value; match = Regex.Match(tableData[7], regexpPlatform, RegexOptions.IgnoreCase); newGame.Platform = match.Groups["platform"].Value; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -71,8 +71,8 @@ string strGenre1 = myReader["ParentGenre"].ToString(); string strGenre2 = myReader["Genre"].ToString(); - curFile.Genre = strGenre1; - curFile.Genre2 = strGenre2; + curFile.MainGenre = strGenre1; + curFile.SubGenre = strGenre2; // todo: country curFile.Country = ""; curFile.Manufacturer = myReader["Publisher"].ToString(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -466,7 +466,7 @@ void ProcessGenreEntry(FileItem curFile, string genreEntry) { - string[] genres = new string[5]; + string[] genres = new string[2]; string[] tmpArr = genreEntry.Split('/'); if (tmpArr.Length > 0) @@ -480,20 +480,18 @@ } //then fill genres with real val - for (int z = 0; z < tmpArr.Length; z++) + for (int z = 0; ((z < genres.Length) && (z < tmpArr.Length)); z++) { genres[z] = tmpArr[z]; } - curFile.Genre = genres[0]; - curFile.Genre2 = genres[1]; - curFile.Genre3 = genres[2]; - curFile.Genre4 = genres[3]; - curFile.Genre5 = genres[4]; + curFile.MainGenre = genres[0]; + curFile.SubGenre = genres[1]; + } // mspacman=Maze } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-10 17:28:47 UTC (rev 504) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-10 17:37:16 UTC (rev 505) @@ -277,7 +277,7 @@ SQLSelectBuilder sqlSelect = new SQLSelectBuilder(); // build the SQL query respecting all the filters and let // the query be executed from outside (this is different from MusicViewHandler) - sqlSelect.AddTable("tblfile"); + sqlSelect.AddTable("tblFileItem"); sqlSelect.AddWhereCond(String.Format("appid = {0}", appID)); if (currentView == null) { @@ -286,7 +286,7 @@ // a: "select file.*, '' as title2, '' as fieldtype2 from file where appid = {0} order by isfolder desc, uppertitle" // b: "select file.*, '' as title2, '' as fieldtype2 from file where appid = {0} and filepath = '{1}' order by isfolder desc, uppertitle" - sqlSelect.AddField("tblfile.*"); + sqlSelect.AddField("tblFileItem.*"); sqlSelect.AddField("'' as title2"); sqlSelect.AddField("'' as fieldtype2"); if (pathSubfolders != "") @@ -334,7 +334,7 @@ { return @"SELECT UPPER(SUBSTR(" + currentViewFilterFieldVariable + ",1," + currentViewFilterFieldRestriction + @")) AS title, - COUNT(*) FROM tblfile WHERE appid = " + appID + @" + COUNT(*) FROM tblFileItem WHERE appid = " + appID + @" GROUP BY UPPER(SUBSTR(title,1," + currentViewFilterFieldRestriction + @")) @@ -365,7 +365,7 @@ UPPER(SUBSTR(" + currentViewFilterFieldVariable + ",1," + currentViewFilterFieldRestriction + @")) AS title, Count(*) - FROM tblfile + FROM tblFileItem WHERE appid = " + appID + @" @@ -376,7 +376,7 @@ UPPER(SUBSTR(" + prevViewFilterFieldVariable + ",1," + prevViewFilterRestriciton + @")) AS title FROM - tblfile + tblFileItem WHERE appid = " + appID + @" @@ -397,11 +397,11 @@ else { return @"SELECT - tblfile.*, + tblFileItem.*, 'STR' AS fieldtype FROM - tblfile + tblFileItem WHERE UPPER(SUBSTR(" + prevViewFilterFieldVariable + ",1," + prevViewFilterRestriciton + @")) LIKE '" + prevViewFilterFieldSelectedValue + @"%' @@ -569,18 +569,18 @@ string res = ""; if (where == "launchcount") { - res = "tblfile.*"; + res = "tblFileItem.*"; } else if (where == "lastTimeLaunched") { - res = "tblfile.*"; + res = "tblFileItem.*"; } else { res = GetFieldName(where); if (res == "") { - res = "tblfile.*"; + res = "tblFileItem.*"; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-10 20:11:33
|
Revision: 509 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=509&view=rev Author: chef_koch Date: 2007-06-10 13:11:31 -0700 (Sun, 10 Jun 2007) Log Message: ----------- merged "mew"-view code from old-plugin known issue: - changing view in one appitem, and switching to new appitem, shows previous view for new item - CurrentView in GUIPrograms could be obsolete, not sure, whether we could use it, just implemented it from music, to get views working for first time Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-06-10 17:45:25 UTC (rev 508) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-06-10 20:11:31 UTC (rev 509) @@ -26,15 +26,16 @@ using System; using System.Collections; using System.ComponentModel; +using System.Data; using System.Drawing; -using System.Data; using System.IO; using System.Runtime.Serialization.Formatters.Soap; using System.Windows.Forms; + +using MediaPortal.Configuration; using MediaPortal.GUI.Library; using MediaPortal.GUI.View; using MediaPortal.Util; -using MediaPortal.Configuration; namespace GUIPrograms.Design { @@ -43,12 +44,14 @@ /// </summary> public class ProgramViews : UserControl { + #region Helper Classes + // two classes ripped from frodos MusicViews.cs public class SyncedCheckBox : CheckBox { - DataGrid grid; int cell; + public int Cell { get { return cell; } @@ -60,6 +63,7 @@ get { return grid; } set { grid = value; } } + protected override void OnLayout(LayoutEventArgs levent) { DataGridCell currentCell = Grid.CurrentCell; @@ -79,11 +83,19 @@ base.OnLayout(levent); } } - public class SyncedComboBox : ComboBox { DataGrid grid; int cell; + + public SyncedComboBox(string name) + { + this.Cursor = System.Windows.Forms.Cursors.Arrow; + this.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.Dock = DockStyle.Fill; + this.DisplayMember = name; + } + public int Cell { get { return cell; } @@ -95,6 +107,7 @@ get { return grid; } set { grid = value; } } + protected override void OnLayout(LayoutEventArgs levent) { try @@ -132,112 +145,37 @@ } } - private MediaPortal.UserInterface.Controls.MPTextBox tbViewName; - private MediaPortal.UserInterface.Controls.MPLabel label2; - private MediaPortal.UserInterface.Controls.MPButton btnDelete; - private MediaPortal.UserInterface.Controls.MPButton btnSave; - private MediaPortal.UserInterface.Controls.MPComboBox cbViews; - private MediaPortal.UserInterface.Controls.MPLabel label1; - private System.Windows.Forms.DataGrid dataGrid1; - private MediaPortal.UserInterface.Controls.MPLabel label3; - /// <summary> + #endregion Helper Classes + + #region Designer Code + + /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; - - ViewDefinition currentView; - ArrayList views; - DataSet ds = new DataSet(); - bool updating = false; - - string[] selections = new string[] - { - "title", - "filename", - "country", - "genre", - "year", - "manufacturer", - "rating", - "launchcount", - "lastTimeLaunched", - "genre2", - "genre3", - "genre4", - "genre5" - }; - string[] sqloperators = new string[] - { - "", - "=", - ">", - "<", - ">=", - "<=", - "<>", - "like", - "group", - }; - - public ProgramViews() - : this("Program Views") - { - } - string defaultProgramViews = Config.GetFile(Config.Dir.Base, "defaultMyProgramsAltViews.xml"); - string customProgramViews = Config.GetFile(Config.Dir.Config, "myProgramsAltViews.xml"); - public ProgramViews(string name) - { - - // This call is required by the Windows Form Designer. - InitializeComponent(); - views = new ArrayList(); - if (System.IO.File.Exists(customProgramViews)) - { - using (FileStream fileStream = new FileStream(customProgramViews, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) - { - try - { - SoapFormatter formatter = new SoapFormatter(); - views = (ArrayList)formatter.Deserialize(fileStream); - fileStream.Close(); - } - catch - { - } - } - } - else - { - Log.Info("Warning: customProgramViews not found!"); - } - LoadViews(); - } - - - /// <summary> + /// <summary> /// Clean up any resources being used. /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { - if (disposing) + if (disposing && (components != null)) { - if (components != null) - { - components.Dispose(); - } + components.Dispose(); } base.Dispose(disposing); } #region Component Designer generated code - /// <summary> - /// Required method for Designer support - do not modify + + /// <summary> + /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { - this.dataGrid1 = new System.Windows.Forms.DataGrid(); + this.dataGrid = new System.Windows.Forms.DataGrid(); this.label3 = new MediaPortal.UserInterface.Controls.MPLabel(); this.tbViewName = new MediaPortal.UserInterface.Controls.MPTextBox(); this.label2 = new MediaPortal.UserInterface.Controls.MPLabel(); @@ -245,39 +183,39 @@ this.btnSave = new MediaPortal.UserInterface.Controls.MPButton(); this.cbViews = new MediaPortal.UserInterface.Controls.MPComboBox(); this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); - ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGrid)).BeginInit(); this.SuspendLayout(); // - // dataGrid1 + // dataGrid // - this.dataGrid1.AlternatingBackColor = System.Drawing.Color.Lavender; - this.dataGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.dataGrid.AlternatingBackColor = System.Drawing.Color.Lavender; + this.dataGrid.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.dataGrid1.BackColor = System.Drawing.Color.WhiteSmoke; - this.dataGrid1.BackgroundColor = System.Drawing.Color.LightGray; - this.dataGrid1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.dataGrid1.CaptionBackColor = System.Drawing.Color.LightSteelBlue; - this.dataGrid1.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.dataGrid1.CaptionForeColor = System.Drawing.Color.MidnightBlue; - this.dataGrid1.DataMember = ""; - this.dataGrid1.FlatMode = true; - this.dataGrid1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.dataGrid1.ForeColor = System.Drawing.Color.MidnightBlue; - this.dataGrid1.GridLineColor = System.Drawing.Color.Gainsboro; - this.dataGrid1.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None; - this.dataGrid1.HeaderBackColor = System.Drawing.Color.MidnightBlue; - this.dataGrid1.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.dataGrid1.HeaderForeColor = System.Drawing.Color.WhiteSmoke; - this.dataGrid1.LinkColor = System.Drawing.Color.Teal; - this.dataGrid1.Location = new System.Drawing.Point(8, 112); - this.dataGrid1.Name = "dataGrid1"; - this.dataGrid1.ParentRowsBackColor = System.Drawing.Color.Gainsboro; - this.dataGrid1.ParentRowsForeColor = System.Drawing.Color.MidnightBlue; - this.dataGrid1.SelectionBackColor = System.Drawing.Color.CadetBlue; - this.dataGrid1.SelectionForeColor = System.Drawing.Color.WhiteSmoke; - this.dataGrid1.Size = new System.Drawing.Size(426, 256); - this.dataGrid1.TabIndex = 14; + this.dataGrid.BackColor = System.Drawing.Color.WhiteSmoke; + this.dataGrid.BackgroundColor = System.Drawing.Color.LightGray; + this.dataGrid.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.dataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue; + this.dataGrid.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.dataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue; + this.dataGrid.DataMember = ""; + this.dataGrid.FlatMode = true; + this.dataGrid.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.dataGrid.ForeColor = System.Drawing.Color.MidnightBlue; + this.dataGrid.GridLineColor = System.Drawing.Color.Gainsboro; + this.dataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None; + this.dataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue; + this.dataGrid.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.dataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke; + this.dataGrid.LinkColor = System.Drawing.Color.Teal; + this.dataGrid.Location = new System.Drawing.Point(8, 112); + this.dataGrid.Name = "dataGrid"; + this.dataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro; + this.dataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue; + this.dataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue; + this.dataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke; + this.dataGrid.Size = new System.Drawing.Size(426, 256); + this.dataGrid.TabIndex = 14; // // label3 // @@ -294,7 +232,7 @@ this.tbViewName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.tbViewName.Location = new System.Drawing.Point(72, 80); this.tbViewName.Name = "tbViewName"; - this.tbViewName.Size = new System.Drawing.Size(168, 20); + this.tbViewName.Size = new System.Drawing.Size(168, 21); this.tbViewName.TabIndex = 20; // // label2 @@ -330,6 +268,7 @@ // cbViews // this.cbViews.BorderColor = System.Drawing.SystemColors.ActiveCaptionText; + this.cbViews.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbViews.Location = new System.Drawing.Point(72, 48); this.cbViews.Name = "cbViews"; this.cbViews.Size = new System.Drawing.Size(168, 21); @@ -346,7 +285,7 @@ // // ProgramViews // - this.Controls.Add(this.dataGrid1); + this.Controls.Add(this.dataGrid); this.Controls.Add(this.cbViews); this.Controls.Add(this.label3); this.Controls.Add(this.tbViewName); @@ -356,15 +295,130 @@ this.Controls.Add(this.label1); this.Name = "ProgramViews"; this.Size = new System.Drawing.Size(437, 408); - ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGrid)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } + #endregion + private MediaPortal.UserInterface.Controls.MPTextBox tbViewName; + private MediaPortal.UserInterface.Controls.MPLabel label2; + private MediaPortal.UserInterface.Controls.MPButton btnDelete; + private MediaPortal.UserInterface.Controls.MPButton btnSave; + private MediaPortal.UserInterface.Controls.MPComboBox cbViews; + private MediaPortal.UserInterface.Controls.MPLabel label1; + private System.Windows.Forms.DataGrid dataGrid; + private MediaPortal.UserInterface.Controls.MPLabel label3; + #endregion Designer Code + #region Variables + + ViewDefinition currentView; + ArrayList views; + DataSet ds = new DataSet(); + DataTable datasetFilters; //Data Table var + bool updating = false; + + string defaultProgramViews = Config.GetFile(Config.Dir.Base, "defaultMyProgramsAltViews.xml"); + string customProgramViews = Config.GetFile(Config.Dir.Config, "myProgramsAltViews.xml"); + + string[] selections = new string[] + { + "title", + "filename", + "country", + "genre", + "year", + "manufacturer", + "rating", + "launchcount", + "lastTimeLaunched", + "genre2", + "genre3", + "genre4", + "genre5", + }; + + string[] sqloperators = new string[] + { + "", + "=", + ">", + "<", + ">=", + "<=", + "<>", + "like", + "group", + }; + + string[] viewsAs = new string[] + { + "List", + "Icons", + "Big Icons", + "Filmstrip", + }; + + string[] sortBy = new string[] + { + "Name", + "Title", + "Filename", + "Rating", + "LaunchCount", + "LastTimeLaunched", + }; + + #endregion Variables + + #region Constructors + + public ProgramViews() + : this("Program Views") { } + + public ProgramViews(string name) + { + // This call is required by the Windows Form Designer. + InitializeComponent(); + + if (!File.Exists(customProgramViews)) + { + Log.Info("Warning: customProgramViews not found!"); + if (File.Exists(defaultProgramViews)) + { + Log.Info("Warning: defaultProgramViews will be restored!"); + File.Copy(defaultProgramViews, customProgramViews); + } + else + { + Log.Info("Warning: defaultProgramViews not found, please reinstall this plugin!"); + return; + } + } + + views = new ArrayList(); + using (FileStream fileStream = new FileStream(customProgramViews, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + { + try + { + SoapFormatter formatter = new SoapFormatter(); + views = (ArrayList)formatter.Deserialize(fileStream); + fileStream.Close(); + } + catch + { + } + } + + LoadViews(); + } + + #endregion Constructors + void LoadViews() { updating = true; @@ -373,10 +427,12 @@ { if (view.Name != String.Empty) { - cbViews.Items.Add(view.Name); + cbViews.Items.Add(view); } } - cbViews.Items.Add("new..."); + ViewDefinition newDef = new ViewDefinition(); + newDef.Name = "new..."; + cbViews.Items.Add(newDef); if (cbViews.Items.Count > 0) cbViews.SelectedIndex = 0; @@ -400,43 +456,54 @@ tbViewName.Text = currentView.Name; //Declare and initialize local variables used - DataColumn dtCol = null;//Data Column variable - string[] arrColumnNames = null;//string array variable - SyncedComboBox cbSelection, cbOperators; //combo box var - DataTable datasetFilters;//Data Table var + DataColumn dtCol = null; //Data Column variable + string[] arrColumnNames = null; //string array variable //Create the combo box object and set its properties - cbSelection = new SyncedComboBox(); - cbSelection.Cursor = System.Windows.Forms.Cursors.Arrow; - cbSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - cbSelection.Dock = DockStyle.Fill; - cbSelection.DisplayMember = "Selection"; + SyncedComboBox cbSelection = new SyncedComboBox("Selection"); foreach (string strText in selections) cbSelection.Items.Add(strText); - cbSelection.Grid = dataGrid1; + cbSelection.Grid = dataGrid; cbSelection.Cell = 0; //Event that will be fired when selected index in the combo box is changed - cbSelection.SelectionChangeCommitted += new EventHandler(cbSelection_SelectionChangeCommitted); + cbSelection.SelectionChangeCommitted += new EventHandler(ComboBox_SelectionChangeCommitted); //Create the combo box object and set its properties - cbOperators = new SyncedComboBox(); - cbOperators.Cursor = System.Windows.Forms.Cursors.Arrow; - cbOperators.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - cbOperators.Dock = DockStyle.Fill; - cbOperators.DisplayMember = "Operator"; + SyncedComboBox cbOperators = new SyncedComboBox("Operator"); foreach (string strText in sqloperators) cbOperators.Items.Add(strText); - cbOperators.Grid = dataGrid1; + cbOperators.Grid = dataGrid; cbOperators.Cell = 1; - cbOperators.SelectionChangeCommitted += new EventHandler(cbOperators_SelectionChangeCommitted); + //Event that will be fired when selected index in the combo box is changed + cbOperators.SelectionChangeCommitted += new EventHandler(ComboBox_SelectionChangeCommitted); + //Create the combo box object and set its properties + SyncedComboBox cbView = new SyncedComboBox("ViewAs"); + foreach (string strText in viewsAs) + cbView.Items.Add(strText); + cbView.Grid = dataGrid; + cbView.Cell = 4; + //Event that will be fired when selected index in the combo box is changed + cbView.SelectionChangeCommitted += new EventHandler(ComboBox_SelectionChangeCommitted); + + //Create the combo box object and set its properties + SyncedComboBox cbSort = new SyncedComboBox("SortBy"); + foreach (string strText in sortBy) + cbSort.Items.Add(strText); + cbSort.Grid = dataGrid; + cbSort.Cell = 5; + //Event that will be fired when selected index in the combo box is changed + cbSort.SelectionChangeCommitted += new EventHandler(ComboBox_SelectionChangeCommitted); + //Create the String array object, initialize the array with the column //names to be displayed - arrColumnNames = new string[4]; + arrColumnNames = new string[6]; arrColumnNames[0] = "Selection"; arrColumnNames[1] = "Operator"; arrColumnNames[2] = "Restriction"; arrColumnNames[3] = "Limit"; + arrColumnNames[4] = "ViewAs"; + arrColumnNames[5] = "SortBy"; //Create the Data Table object which will then be used to hold //columns and rows @@ -459,27 +526,44 @@ dtcCheck.ColumnName = "Sort Ascending"; datasetFilters.Columns.Add(dtcCheck);//Add the above column to the //Data Table + // Add the Action column + dtCol = new DataColumn("Act"); + dtCol.DataType = Type.GetType("System.String"); + dtCol.DefaultValue = ""; + datasetFilters.Columns.Add(dtCol); + //fill in all rows... for (int i = 0; i < currentView.Filters.Count; ++i) { FilterDefinition def = (FilterDefinition)currentView.Filters[i]; string limit = def.Limit.ToString(); if (def.Limit < 0) limit = ""; - datasetFilters.Rows.Add(new object[] { def.Where, def.SqlOperator, def.Restriction, limit, def.SortAscending }); + datasetFilters.Rows.Add( + new object[] { + def.Where, + def.SqlOperator, + def.Restriction, + limit, + def.DefaultView, + def.DefaultSort, + def.SortAscending, + "" + } + ); } //Set the Data Grid Source as the Data Table created above - dataGrid1.CaptionText = String.Empty; - dataGrid1.DataSource = datasetFilters; + dataGrid.CaptionText = String.Empty; + dataGrid.DataSource = datasetFilters; //set style property when first time the grid loads, next time onwards it //will maintain its property - if (!dataGrid1.TableStyles.Contains("Selection")) + if (!dataGrid.TableStyles.Contains("Selection")) { //Create a DataGridTableStyle object DataGridTableStyle dgdtblStyle = new DataGridTableStyle(); //Set its properties dgdtblStyle.MappingName = datasetFilters.TableName;//its table name of dataset - dataGrid1.TableStyles.Add(dgdtblStyle); + dataGrid.TableStyles.Add(dgdtblStyle); dgdtblStyle.RowHeadersVisible = false; dgdtblStyle.HeaderBackColor = Color.LightSteelBlue; dgdtblStyle.AllowSorting = false; @@ -489,18 +573,25 @@ dgdtblStyle.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); dgdtblStyle.GridLineColor = Color.DarkGray; dgdtblStyle.PreferredRowHeight = 22; - dataGrid1.BackgroundColor = Color.White; + dataGrid.BackgroundColor = Color.White; //Take the columns in a GridColumnStylesCollection object and set //the size of the //individual columns GridColumnStylesCollection colStyle; - colStyle = dataGrid1.TableStyles[0].GridColumnStyles; + colStyle = dataGrid.TableStyles[0].GridColumnStyles; colStyle[0].Width = 100; colStyle[1].Width = 80; colStyle[2].Width = 70; colStyle[3].Width = 70; - colStyle[4].Width = 102; + colStyle[4].Width = 80; + colStyle[5].Width = 80; + colStyle[6].Width = 102; + colStyle[7].Width = 30; + // Set an eventhandler to be fired, when entering something in the action column + DataGridTextBoxColumn tbAction = (DataGridTextBoxColumn)dgdtblStyle.GridColumnStyles[7]; + tbAction.TextBox.KeyPress += new KeyPressEventHandler(tbAction_KeyPress); + /* DataGridColumnStyle boolCol = new FormattableBooleanColumn(); boolCol.MappingName = "Sort Ascending"; @@ -509,92 +600,79 @@ dgdtblStyle.GridColumnStyles.Add(boolCol); */ } - DataGridTextBoxColumn dgtb = (DataGridTextBoxColumn)dataGrid1.TableStyles[0].GridColumnStyles[0]; + + DataGridTextBoxColumn dgtb = null; //Add the combo box to the text box taken in the above step + dgtb = (DataGridTextBoxColumn)dataGrid.TableStyles[0].GridColumnStyles[0]; dgtb.TextBox.Controls.Add(cbSelection); - - dgtb = (DataGridTextBoxColumn)dataGrid1.TableStyles[0].GridColumnStyles[1]; + dgtb = (DataGridTextBoxColumn)dataGrid.TableStyles[0].GridColumnStyles[1]; dgtb.TextBox.Controls.Add(cbOperators); + dgtb = (DataGridTextBoxColumn)dataGrid.TableStyles[0].GridColumnStyles[4]; + dgtb.TextBox.Controls.Add(cbView); + dgtb = (DataGridTextBoxColumn)dataGrid.TableStyles[0].GridColumnStyles[5]; + dgtb.TextBox.Controls.Add(cbSort); - DataGridBoolColumn boolColumn = (DataGridBoolColumn)dataGrid1.TableStyles[0].GridColumnStyles[4]; + DataGridBoolColumn boolColumn = (DataGridBoolColumn)dataGrid.TableStyles[0].GridColumnStyles[6]; boolColumn.AllowNull = false; - updating = false; } - - - private void cbViews_SelectedIndexChanged(object sender, System.EventArgs e) + void cbViews_SelectedIndexChanged(object sender, System.EventArgs e) { if (updating) return; StoreGridInView(); + dataGrid.DataSource = null; UpdateView(); } - private void cbSelection_SelectionChangeCommitted(object sender, EventArgs e) + void ComboBox_SelectionChangeCommitted(object sender, System.EventArgs e) { if (updating) return; SyncedComboBox box = sender as SyncedComboBox; if (box == null) return; - DataGridCell currentCell = dataGrid1.CurrentCell; - DataTable table = dataGrid1.DataSource as DataTable; + DataGridCell currentCell = dataGrid.CurrentCell; + DataTable table = dataGrid.DataSource as DataTable; if (currentCell.RowNumber == table.Rows.Count) - table.Rows.Add(new object[] { "", "", "", "" }); + table.Rows.Add(new object[] { "", "", "", "", "", "" }); table.Rows[currentCell.RowNumber][currentCell.ColumnNumber] = (string)box.SelectedItem; } - - private void cbOperators_SelectionChangeCommitted(object sender, EventArgs e) + void tbAction_KeyPress(object sender, KeyPressEventArgs e) { - if (updating) return; - SyncedComboBox box = sender as SyncedComboBox; - if (box == null) return; - DataGridCell currentCell = dataGrid1.CurrentCell; - DataTable table = dataGrid1.DataSource as DataTable; + DataRow row = datasetFilters.NewRow(); + row[0] = row[1] = row[2] = row[3] = row[4] = row[5] = row[7] = ""; + row[6] = false; - if (currentCell.RowNumber == table.Rows.Count) - table.Rows.Add(new object[] { "", "", "", "" }); - table.Rows[currentCell.RowNumber][currentCell.ColumnNumber] = (string)box.SelectedItem; + e.Handled = true; - } + int rowSelected = dataGrid.CurrentRowIndex; + if (rowSelected == -1) return; + if (rowSelected == datasetFilters.Rows.Count) return; - - private void btnSave_Click(object sender, System.EventArgs e) - { - StoreGridInView(); - try + switch (e.KeyChar) { - using (FileStream fileStream = new FileStream(customProgramViews, FileMode.Create, FileAccess.Write, FileShare.Read)) - { - SoapFormatter formatter = new SoapFormatter(); - formatter.Serialize(fileStream, views); - fileStream.Close(); - } + case 'a': + datasetFilters.Rows.InsertAt(row, rowSelected + 1); + break; + case 'b': + datasetFilters.Rows.InsertAt(row, rowSelected); + break; + case 'd': + datasetFilters.Rows.RemoveAt(rowSelected); + break; } - catch (Exception) - { - } - } void StoreGridInView() { if (updating) return; - if (dataGrid1.DataSource == null) return; + if (dataGrid.DataSource == null) return; if (currentView == null) return; - ViewDefinition view = null; - for (int i = 0; i < views.Count; ++i) - { - ViewDefinition tmp = views[i] as ViewDefinition; - if (tmp.Name == currentView.Name) - { - view = tmp; - break; - } - } - DataTable dt = dataGrid1.DataSource as DataTable; + + ViewDefinition view = currentView; + DataTable dt = dataGrid.DataSource as DataTable; if (view == null) { if (dt.Rows.Count == 0) return; @@ -602,23 +680,21 @@ view.Name = tbViewName.Text; views.Add(view); currentView = view; - cbViews.Items.Insert(cbViews.Items.Count - 1, view.Name); + cbViews.Items.Insert(cbViews.Items.Count - 1, view); updating = true; - cbViews.SelectedItem = view.Name; + cbViews.SelectedItem = view; updating = false; } else { updating = true; - for (int i = 0; i < cbViews.Items.Count; ++i) + view.Name = tbViewName.Text; + int index = cbViews.Items.IndexOf(view); + if (index >= 0) { - string label = (string)cbViews.Items[i]; - if (label == currentView.Name) - { - cbViews.Items[i] = tbViewName.Text; - break; - } + cbViews.Items[index] = view; } + cbViews.Update(); updating = false; } view.Name = tbViewName.Text; @@ -639,13 +715,33 @@ { def.Limit = -1; } - def.SortAscending = (bool)row[4]; + def.DefaultView = row[4].ToString(); + def.DefaultSort = row[5].ToString(); + def.SortAscending = (bool)row[6]; view.Filters.Add(def); } } - private void btnDelete_Click(object sender, System.EventArgs e) + void btnSave_Click(object sender, System.EventArgs e) { + StoreGridInView(); + try + { + using (FileStream fileStream = new FileStream(customProgramViews, FileMode.Create, FileAccess.Write, FileShare.Read)) + { + SoapFormatter formatter = new SoapFormatter(); + formatter.Serialize(fileStream, views); + fileStream.Close(); + } + } + catch (Exception) + { + } + + } + + void btnDelete_Click(object sender, System.EventArgs e) + { string viewName = cbViews.SelectedItem as string; if (viewName == null) return; for (int i = 0; i < views.Count; ++i) @@ -660,4 +756,4 @@ LoadViews(); } } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-10 17:45:25 UTC (rev 508) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-10 20:11:31 UTC (rev 509) @@ -24,6 +24,7 @@ #endregion using System; +using System.Collections.Generic; using System.Drawing; using System.IO; using System.Threading; @@ -499,6 +500,10 @@ bool skipInit = false; + View[,] views; + bool[,] sortasc; + ProgramSort.SortMethod[,] sortby; + static string _thumbnailPath = string.Empty; static string _lastThumbnailPath = string.Empty; @@ -555,6 +560,117 @@ set { view = value; } } + View CurrentView + {//maybe we can remove this property, not sure if we would need it + get + { + if (DatabaseSettings.viewHandler.View == null) + return View.List; + + if (views == null) + { + views = new View[DatabaseSettings.viewHandler.Views.Count, 50]; + + List<String> viewStrings = new List<String>(); + viewStrings.Add("List"); + viewStrings.Add("Icons"); + viewStrings.Add("Big Icons"); + viewStrings.Add("Filmstrip"); + + for (int i = 0; i < DatabaseSettings.viewHandler.Views.Count; ++i) + { + for (int j = 0; j < DatabaseSettings.viewHandler.Views[i].Filters.Count; ++j) + { + FilterDefinition def = (FilterDefinition)DatabaseSettings.viewHandler.Views[i].Filters[j]; + int defaultView = viewStrings.IndexOf(def.DefaultView); + + if (defaultView != -1) + views[i, j] = (View)defaultView; + else + views[i, j] = View.List; + } + } + } + + return views[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel]; + } + set + { + views[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel] = value; + } + } + + bool CurrentSortAsc + { + get + { + if (DatabaseSettings.viewHandler.View == null) + return true; + + if (sortasc == null) + { + sortasc = new bool[DatabaseSettings.viewHandler.Views.Count, 50]; + + for (int i = 0; i < DatabaseSettings.viewHandler.Views.Count; ++i) + { + for (int j = 0; j < DatabaseSettings.viewHandler.Views[i].Filters.Count; ++j) + { + FilterDefinition def = (FilterDefinition)DatabaseSettings.viewHandler.Views[i].Filters[j]; + sortasc[i, j] = def.SortAscending; + } + } + } + + return sortasc[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel]; + } + set + { + sortasc[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel] = value; + } + } + + ProgramSort.SortMethod CurrentSortMethod + { + get + { + if (DatabaseSettings.viewHandler.View == null) + return ProgramSort.SortMethod.Name; + + if (sortby == null) + { + sortby = new ProgramSort.SortMethod[DatabaseSettings.viewHandler.Views.Count, 50]; + + List<String> sortStrings = new List<String>(); + sortStrings.Add("Name"); + sortStrings.Add("Title"); + sortStrings.Add("Filename"); + sortStrings.Add("Rating"); + sortStrings.Add("LaunchCount"); + sortStrings.Add("LastTimeLaunched"); + + for (int i = 0; i < DatabaseSettings.viewHandler.Views.Count; ++i) + { + for (int j = 0; j < DatabaseSettings.viewHandler.Views[i].Filters.Count; ++j) + { + FilterDefinition def = (FilterDefinition)DatabaseSettings.viewHandler.Views[i].Filters[j]; + int defaultSort = sortStrings.IndexOf(def.DefaultSort); + + if (defaultSort != -1) + sortby[i, j] = (ProgramSort.SortMethod)defaultSort; + else + sortby[i, j] = ProgramSort.SortMethod.Name; + } + } + } + + return sortby[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel]; + } + set + { + sortby[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel] = value; + } + } + #endregion #region Overrides @@ -764,11 +880,11 @@ GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); if (dlg == null) return; dlg.Reset(); - dlg.SetHeading(924); // menu - dlg.Add("Files"); + dlg.SetHeading(499); // Actions + dlg.Add(GUILocalizeStrings.Get(100000 + GetID)); // Files foreach (ViewDefinition view in DatabaseSettings.viewHandler.Views) { - dlg.Add(view.Name); //play + dlg.Add(view.LocalizedName); } dlg.DoModal(GetID); if (dlg.SelectedLabel == -1) return; @@ -902,7 +1018,8 @@ void UpdateButtons() { - GUIPropertyManager.SetProperty("#view", DatabaseSettings.viewHandler.CurrentView); + GUIPropertyManager.SetProperty("#view", DatabaseSettings.viewHandler.LocalizedCurrentView); + btnViewAs.Label = mapSettings.ViewAsText; btnRefresh.IsVisible = RefreshButtonVisible(); // display apptitle if available..... @@ -910,7 +1027,7 @@ { if ((DatabaseSettings.viewHandler.CurrentView != null) && (DatabaseSettings.viewHandler.MaxLevels > 0)) { - GUIPropertyManager.SetProperty("#curheader", ActualView); + GUIPropertyManager.SetProperty("#curheader", DatabaseSettings.viewHandler.LocalizedCurrentView); } else { @@ -929,7 +1046,6 @@ GUIPropertyManager.SetProperty("#curheader", GUILocalizeStrings.Get(0)); } } - btnViewAs.Label = mapSettings.ViewAsText; } void ShowThumbPanel() @@ -1063,10 +1179,9 @@ if (lastApp != null) { - lastApp.OnSort(facadeView, false); + facadeView.Sort(new ProgramSort(CurrentSortMethod, CurrentSortAsc)); } - string itemCountText = String.Format("{0} {1}", TotalItems, GUILocalizeStrings.Get(632)); GUIPropertyManager.SetProperty("#itemcount", itemCountText); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-10 17:45:25 UTC (rev 508) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-10 20:11:31 UTC (rev 509) @@ -141,6 +141,7 @@ <Compile Include="Imports\AllGameScraper.cs" /> <Compile Include="Imports\GamebaseImport.cs" /> <Compile Include="Imports\MameImport.cs" /> + <Compile Include="ProgramSort.cs" /> <Compile Include="ProgramFilterItem.cs" /> <Compile Include="ProgramUtils.cs" /> <Compile Include="ProgramViewHandler.cs" /> Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs 2007-06-10 20:11:31 UTC (rev 509) @@ -0,0 +1,163 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Globalization; + +using MediaPortal.GUI.Library; +using MediaPortal.Util; + +using GUIPrograms.Database; +using GUIPrograms.FileItems; + +namespace GUIPrograms +{ + /// <summary> + /// Summary description for ProgramSort. + /// </summary> + public class ProgramSort : IComparer<GUIListItem> + { + public enum SortMethod + { + Name = 0, + Title = 1, + Filename = 2, + Rating = 3, + LaunchCount = 4, + LastTimeLaunched = 5 + } + + SortMethod currentSortMethod; + bool sortAscending = true; + + public ProgramSort(SortMethod method, bool ascending) + { + currentSortMethod = method; + sortAscending = ascending; + } + + public int Compare(GUIListItem item1, GUIListItem item2) + { + if (item1 == item2) return 0; + if (item1 == null) return -1; + if (item2 == null) return -1; + if (item1.IsFolder && item1.Label == "..") return -1; + if (item2.IsFolder && item2.Label == "..") return -1; + if (item1.IsFolder && !item2.IsFolder) return -1; + else if (!item1.IsFolder && item2.IsFolder) return 1; + + string strSize1 = ""; + string strSize2 = ""; + if (item1.FileInfo != null) strSize1 = MediaPortal.Util.Utils.GetSize(item1.FileInfo.Length); + if (item2.FileInfo != null) strSize2 = MediaPortal.Util.Utils.GetSize(item2.FileInfo.Length); + + SortMethod method = currentSortMethod; + bool bAscending = sortAscending; + + switch (method) + { + case SortMethod.Name: + if (bAscending) + { + return String.Compare(item1.Label, item2.Label, true); + } + else + { + return String.Compare(item2.Label, item1.Label, true); + } + + case SortMethod.Title: + string strTitle1 = item1.Label; + string strTitle2 = item2.Label; + if (item1.MusicTag != null) strTitle1 = ((FileItem)item1.MusicTag).Title; + if (item2.MusicTag != null) strTitle2 = ((FileItem)item2.MusicTag).Title; + if (bAscending) + { + return String.Compare(strTitle1, strTitle2, true); + } + else + { + return String.Compare(strTitle2, strTitle1, true); + } + + case SortMethod.Filename: + string strFile1 = MediaPortal.Util.Utils.GetFilename(item1.Path); + string strFile2 = MediaPortal.Util.Utils.GetFilename(item2.Path); + if (bAscending) + { + return String.Compare(strFile1, strFile2, true); + } + else + { + return String.Compare(strFile2, strFile1, true); + } + + case SortMethod.Rating: + int iRating1 = 0; + int iRating2 = 0; + if (item1.MusicTag != null) iRating1 = ((FileItem)item1.MusicTag).Rating; + if (item2.MusicTag != null) iRating2 = ((FileItem)item2.MusicTag).Rating; + if (bAscending) + { + return (int)(iRating1 - iRating2); + } + else + { + return (int)(iRating2 - iRating1); + } + + case SortMethod.LaunchCount: + int iLaunchCount1 = 0; + int iLaunchCount2 = 0; + if (item1.MusicTag != null) iLaunchCount1 = ((FileItem)item1.MusicTag).LaunchCount; + if (item2.MusicTag != null) iLaunchCount2 = ((FileItem)item2.MusicTag).LaunchCount; + if (bAscending) + { + return (int)(iLaunchCount1 - iLaunchCount2); + } + else + { + return (int)(iLaunchCount2 - iLaunchCount1); + } + + case SortMethod.LastTimeLaunched: + DateTime dateLastTimeLaunched1 = DateTime.MinValue; + DateTime dateLastTimeLaunched2 = DateTime.MinValue; + if (item1.MusicTag != null) dateLastTimeLaunched1 = ((FileItem)item1.MusicTag).LastTimeLaunched; + if (item2.MusicTag != null) dateLastTimeLaunched2 = ((FileItem)item2.MusicTag).LastTimeLaunched; + if (bAscending) + { + return DateTime.Compare(dateLastTimeLaunched1, dateLastTimeLaunched2); + } + else + { + return DateTime.Compare(dateLastTimeLaunched2, dateLastTimeLaunched1); + } + } + return 0; + } + } +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-10 17:45:25 UTC (rev 508) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-10 20:11:31 UTC (rev 509) @@ -24,18 +24,19 @@ #endregion using System; +using System.Collections; using System.Collections.Generic; -using System.Collections; using System.IO; using System.Runtime.Serialization.Formatters.Soap; +using SQLite.NET; + +using MediaPortal.Configuration; +using MediaPortal.Database; using MediaPortal.GUI.Library; +using MediaPortal.GUI.View; using MediaPortal.Util; -using MediaPortal.GUI.View; -using MediaPortal.Database; using GUIPrograms.Database; -using SQLite.NET; -using MediaPortal.Configuration; namespace GUIPrograms { @@ -44,17 +45,21 @@ /// </summary> public class ProgramViewHandler { + #region Variables string defaultProgramViews = Config.GetFile(Config.Dir.Base, "defaultMyProgramsAltViews.xml"); string customProgramViews = Config.GetFile(Config.Dir.Config, "myProgramsAltViews.xml"); + int currentLevel = 0; ViewDefinition currentView = null; - int currentLevel = 0; - ArrayList views = new ArrayList(); + List<ViewDefinition> views = new List<ViewDefinition>(); + #endregion Variables + + #region Constructor + public ProgramViewHandler() { - //create default views if file not exist if (!System.IO.File.Exists(defaultProgramViews)) { @@ -143,11 +148,21 @@ formatter.Serialize(fileStream, listViews); fileStream.Close(); } + } - } if (!File.Exists(customProgramViews)) { - File.Copy(defaultProgramViews, customProgramViews); + Log.Info("Warning: customProgramViews not found!"); + if (File.Exists(defaultProgramViews)) + { + Log.Info("Warning: defaultProgramViews will be restored!"); + File.Copy(defaultProgramViews, customProgramViews); + } + else + { + Log.Info("Warning: defaultProgramViews not found, please reinstall this plugin!"); + return; + } } if (System.IO.File.Exists(customProgramViews)) @@ -157,8 +172,9 @@ try { SoapFormatter formatter = new SoapFormatter(); - views = (ArrayList)formatter.Deserialize(fileStream); - fileStream.Close(); + ArrayList viewlist = (ArrayList)formatter.Deserialize(fileStream); + foreach (ViewDefinition view in viewlist) + views.Add(view); } catch { @@ -167,19 +183,32 @@ } } + #endregion Constructor + + #region Properties / Helper Routines + public ViewDefinition View { get { return currentView; } set { currentView = value; } } - - public ArrayList Views + public List<ViewDefinition> Views { get { return views; } set { views = value; } } + public string LocalizedCurrentView + { + get + { + if (currentView == null) + return String.Empty; + return currentView.LocalizedName; + } + } + public string CurrentView { get @@ -247,6 +276,8 @@ } } + #endregion Properties / Helper Routines + public bool AddFilterItem(ProgramFilterItem filterItem) { bool res = false; @@ -271,13 +302,12 @@ return res; } - public string BuildQuery(int appID, string pathSubfolders) { SQLSelectBuilder sqlSelect = new SQLSelectBuilder(); // build the SQL query respecting all the filters and let // the query be executed from outside (this is different from MusicViewHandler) - sqlSelect.AddTable("tblFileItem"); + sqlSelect.AddTable("tblfile"); sqlSelect.AddWhereCond(String.Format("appid = {0}", appID)); if (currentView == null) { @@ -286,7 +316,7 @@ // a: "select file.*, '' as title2, '' as fieldtype2 from file where appid = {0} order by isfolder desc, uppertitle" // b: "select file.*, '' as title2, '' as fieldtype2 from file where appid = {0} and filepath = '{1}' order by isfolder desc, uppertitle" - sqlSelect.AddField("tblFileItem.*"); + sqlSelect.AddField("tblfile.*"); sqlSelect.AddField("'' as title2"); sqlSelect.AddField("'' as fieldtype2"); if (pathSubfolders != "") @@ -334,7 +364,7 @@ { return @"SELECT UPPER(SUBSTR(" + currentViewFilterFieldVariable + ",1," + currentViewFilterFieldRestriction + @")) AS title, - COUNT(*) FROM tblFileItem WHERE appid = " + appID + @" + COUNT(*) FROM tblfile WHERE appid = " + appID + @" GROUP BY UPPER(SUBSTR(title,1," + currentViewFilterFieldRestriction + @")) @@ -365,7 +395,7 @@ UPPER(SUBSTR(" + currentViewFilterFieldVariable + ",1," + currentViewFilterFieldRestriction + @")) AS title, Count(*) - FROM tblFileItem + FROM tblfile WHERE appid = " + appID + @" @@ -376,7 +406,7 @@ UPPER(SUBSTR(" + prevViewFilterFieldVariable + ",1," + prevViewFilterRestriciton + @")) AS title FROM - tblFileItem + tblfile WHERE appid = " + appID + @" @@ -397,11 +427,11 @@ else { return @"SELECT - tblFileItem.*, + tblfile.*, 'STR' AS fieldtype FROM - tblFileItem + tblfile WHERE UPPER(SUBSTR(" + prevViewFilterFieldVariable + ",1," + prevViewFilterRestriciton + @")) LIKE '" + prevViewFilterFieldSelectedValue + @"%' @@ -419,7 +449,6 @@ void BuildGroup(FilterDefinition filter, SQLSelectBuilder sqlSelect) { - sqlSelect.AddGroupField(" UPPER(SUBSTR(title,1,1)), Count(*) "); } @@ -494,7 +523,6 @@ } } - void BuildOrder(FilterDefinition filter, SQLSelectBuilder sqlSelect) { string orderClause = GetField(filter.Where); @@ -569,18 +597,18 @@ string res = ""; if (where == "launchcount") { - res = "tblFileItem.*"; + res = "tblfile.*"; } else if (where == "lastTimeLaunched") { - res = "tblFileItem.*"; + res = "tblfile.*"; } else { res = GetFieldName(where); if (res == "") { - res = "tblFileItem.*"; + res = "tblfile.*"; } else { @@ -650,7 +678,6 @@ else return false; } - string GetFieldValue(ProgramFilterItem filterItem, string where) { return filterItem.Title; @@ -665,7 +692,6 @@ */ } - public void SetLabel(ProgramFilterItem filterItem, ref GUIListItem guiListItem) { if (filterItem == null) return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-11 19:57:43
|
Revision: 515 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=515&view=rev Author: northern_sky Date: 2007-06-11 12:57:40 -0700 (Mon, 11 Jun 2007) Log Message: ----------- harmonized group to group by Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-06-11 19:36:49 UTC (rev 514) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-06-11 19:57:40 UTC (rev 515) @@ -352,7 +352,7 @@ "<=", "<>", "like", - "group", + "group by", }; string[] viewsAs = new string[] Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-11 19:36:49 UTC (rev 514) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-11 19:57:40 UTC (rev 515) @@ -351,12 +351,6 @@ - if (currentViewFilterSqloperator.Equals("group")) - { - currentViewFilterSqloperator = "group by"; - - } - //if at level 0 (and is a group by)-- if (CurrentLevel == 0) { @@ -371,7 +365,7 @@ "; } }//...or has a parent group by... - else if (((FilterDefinition)currentView.Filters[CurrentLevel - 1]).SqlOperator.Contains("group")) + else if (((FilterDefinition)currentView.Filters[CurrentLevel - 1]).SqlOperator.Contains("group by")) { string prevViewFilterRestriciton = ((FilterDefinition)currentView.Filters[CurrentLevel - 1]).Restriction; string prevViewFilterFieldVariable = ((FilterDefinition)currentView.Filters[CurrentLevel - 1]).Where; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-12 14:41:14
|
Revision: 518 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=518&view=rev Author: chef_koch Date: 2007-06-12 07:41:04 -0700 (Tue, 12 Jun 2007) Log Message: ----------- removed unnecessary parameter 'game' in FindFileInfo() Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-12 13:45:04 UTC (rev 517) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-12 14:41:04 UTC (rev 518) @@ -733,7 +733,7 @@ curItem.SubItems[1].Text = String.Format("searching..."); curItem.Font = new Font(curItem.Font, curItem.Font.Style | FontStyle.Bold); System.Windows.Forms.Application.DoEvents(); - bSuccess = file.FindFileInfo(curItem.Text, ScraperType.ALLGAME); + bSuccess = file.FindFileInfo(ScraperType.ALLGAME); curItem.SubItems[1].Text = String.Format("{0} matches", file.FileInfoList.Count); StepProgressBar(); buttonSelectBestMatch.Enabled = true; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-12 13:45:04 UTC (rev 517) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-12 14:41:04 UTC (rev 518) @@ -847,7 +847,7 @@ } } - public bool FindFileInfo(string game, ScraperType ScraperType) + public bool FindFileInfo(ScraperType ScraperType) { int iRetries = 0; bool bSuccess = false; @@ -857,12 +857,11 @@ { AllGameScraper scraper = new AllGameScraper(); // string strTitle = TitleNormalized; - string strTitle = TitleOptimized; while ((!bSuccess) && (iRetries < 5)) { // brute force! Try five times.... sometimes I get // a PostHTTP false result... don't know why! - bSuccess = scraper.FindGameinfo(game); + bSuccess = scraper.FindGameinfo(Title); if (!bSuccess) { iRetries++; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-12 13:45:04 UTC (rev 517) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-12 14:41:04 UTC (rev 518) @@ -784,7 +784,7 @@ dlgProgress.StartModal(GetID); // dlgProgress.SetPercentage(60); dlgProgress.Progress(); - bSuccess = curFile.FindFileInfo(curFile.Title, ScraperType.ALLGAME); + bSuccess = curFile.FindFileInfo(ScraperType.ALLGAME); if ((bSuccess && curFile.FileInfoList.Count > 0) && ((FileItemInfo)(curFile.FileInfoList[0])).RelevanceNorm >= minRelevance) { GUIDialogSelect pDlg = (GUIDialogSelect)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_SELECT); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-12 21:02:29
|
Revision: 522 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=522&view=rev Author: chef_koch Date: 2007-06-12 14:02:26 -0700 (Tue, 12 Jun 2007) Log Message: ----------- next try for the FileInfoScraperForm ;) Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.Designer.cs 2007-06-12 21:02:26 UTC (rev 522) @@ -0,0 +1,524 @@ +namespace GUIPrograms.Design +{ + partial class FileInfoScraperForm + { + /// <summary> + /// Erforderliche Designervariable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Verwendete Ressourcen bereinigen. + /// </summary> + /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// <summary> + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// </summary> + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileInfoScraperForm)); + this.statusStrip = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripProgressBar = new System.Windows.Forms.ToolStripProgressBar(); + this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); + this.scraperSaveTypeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.dataAndImagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.dataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.imagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.cancelSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.splitContainer = new System.Windows.Forms.SplitContainer(); + this.groupBoxFileList = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.checkboxFileList = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.listViewFileList = new MediaPortal.UserInterface.Controls.MPListView(); + this.FileTitle = new System.Windows.Forms.ColumnHeader(); + this.status = new System.Windows.Forms.ColumnHeader(); + this.groupBoxMatchList = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.labelLaunchUrlInfo = new MediaPortal.UserInterface.Controls.MPLabel(); + this.listViewMatchList = new MediaPortal.UserInterface.Controls.MPListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.bottomPanel = new System.Windows.Forms.Panel(); + this.label2 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.groupBoxFilter = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.labelPlatform = new MediaPortal.UserInterface.Controls.MPLabel(); + this.filterComboBox = new MediaPortal.UserInterface.Controls.MPComboBox(); + this.ResetFilterButton = new MediaPortal.UserInterface.Controls.MPButton(); + this.MinRelevanceNum = new System.Windows.Forms.NumericUpDown(); + this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.linkLabelAllGame = new System.Windows.Forms.LinkLabel(); + this.buttonClose = new MediaPortal.UserInterface.Controls.MPButton(); + this.buttonSaveSearch = new MediaPortal.UserInterface.Controls.MPButton(); + this.buttonStartSearch = new MediaPortal.UserInterface.Controls.MPButton(); + this.statusStrip.SuspendLayout(); + this.splitContainer.Panel1.SuspendLayout(); + this.splitContainer.Panel2.SuspendLayout(); + this.splitContainer.SuspendLayout(); + this.groupBoxFileList.SuspendLayout(); + this.groupBoxMatchList.SuspendLayout(); + this.bottomPanel.SuspendLayout(); + this.groupBoxFilter.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.MinRelevanceNum)).BeginInit(); + this.SuspendLayout(); + // + // statusStrip + // + this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabel, + this.toolStripProgressBar, + this.toolStripDropDownButton1}); + this.statusStrip.Location = new System.Drawing.Point(0, 529); + this.statusStrip.Name = "statusStrip"; + this.statusStrip.Size = new System.Drawing.Size(712, 22); + this.statusStrip.TabIndex = 19; + this.statusStrip.Text = "statusStrip1"; + // + // toolStripStatusLabel + // + this.toolStripStatusLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripStatusLabel.Name = "toolStripStatusLabel"; + this.toolStripStatusLabel.Size = new System.Drawing.Size(338, 17); + this.toolStripStatusLabel.Spring = true; + this.toolStripStatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // toolStripProgressBar + // + this.toolStripProgressBar.Name = "toolStripProgressBar"; + this.toolStripProgressBar.Size = new System.Drawing.Size(300, 16); + // + // toolStripDropDownButton1 + // + this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.scraperSaveTypeToolStripMenuItem, + this.cancelSearchToolStripMenuItem}); + this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); + this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; + this.toolStripDropDownButton1.Size = new System.Drawing.Size(57, 20); + this.toolStripDropDownButton1.Text = "Options"; + // + // scraperSaveTypeToolStripMenuItem + // + this.scraperSaveTypeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.dataAndImagesToolStripMenuItem, + this.dataToolStripMenuItem, + this.imagesToolStripMenuItem}); + this.scraperSaveTypeToolStripMenuItem.Name = "scraperSaveTypeToolStripMenuItem"; + this.scraperSaveTypeToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.scraperSaveTypeToolStripMenuItem.Text = "ScraperSaveType"; + // + // dataAndImagesToolStripMenuItem + // + this.dataAndImagesToolStripMenuItem.Name = "dataAndImagesToolStripMenuItem"; + this.dataAndImagesToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.dataAndImagesToolStripMenuItem.Text = "DataAndImages"; + this.dataAndImagesToolStripMenuItem.Click += new System.EventHandler(this.dataAndImagesToolStripMenuItem_Click); + // + // dataToolStripMenuItem + // + this.dataToolStripMenuItem.Name = "dataToolStripMenuItem"; + this.dataToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.dataToolStripMenuItem.Text = "Data"; + this.dataToolStripMenuItem.Click += new System.EventHandler(this.dataToolStripMenuItem_Click); + // + // imagesToolStripMenuItem + // + this.imagesToolStripMenuItem.Name = "imagesToolStripMenuItem"; + this.imagesToolStripMenuItem.Size = new System.Drawing.Size(162, 22); + this.imagesToolStripMenuItem.Text = "Images"; + this.imagesToolStripMenuItem.Click += new System.EventHandler(this.imagesToolStripMenuItem_Click); + // + // cancelSearchToolStripMenuItem + // + this.cancelSearchToolStripMenuItem.Name = "cancelSearchToolStripMenuItem"; + this.cancelSearchToolStripMenuItem.ShowShortcutKeys = false; + this.cancelSearchToolStripMenuItem.Size = new System.Drawing.Size(170, 22); + this.cancelSearchToolStripMenuItem.Text = "Cancel Search"; + this.cancelSearchToolStripMenuItem.Click += new System.EventHandler(this.cancelSearchToolStripMenuItem_Click); + // + // splitContainer + // + this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer.Location = new System.Drawing.Point(0, 0); + this.splitContainer.Name = "splitContainer"; + // + // splitContainer.Panel1 + // + this.splitContainer.Panel1.Controls.Add(this.groupBoxFileList); + // + // splitContainer.Panel2 + // + this.splitContainer.Panel2.Controls.Add(this.groupBoxMatchList); + this.splitContainer.Size = new System.Drawing.Size(712, 443); + this.splitContainer.SplitterDistance = 354; + this.splitContainer.TabIndex = 20; + // + // groupBoxFileList + // + this.groupBoxFileList.Controls.Add(this.checkboxFileList); + this.groupBoxFileList.Controls.Add(this.listViewFileList); + this.groupBoxFileList.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBoxFileList.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.groupBoxFileList.Location = new System.Drawing.Point(0, 0); + this.groupBoxFileList.Name = "groupBoxFileList"; + this.groupBoxFileList.Size = new System.Drawing.Size(354, 443); + this.groupBoxFileList.TabIndex = 16; + this.groupBoxFileList.TabStop = false; + this.groupBoxFileList.Text = "FileList"; + // + // checkboxFileList + // + this.checkboxFileList.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.checkboxFileList.AutoSize = true; + this.checkboxFileList.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkboxFileList.Location = new System.Drawing.Point(6, 420); + this.checkboxFileList.Name = "checkboxFileList"; + this.checkboxFileList.Size = new System.Drawing.Size(116, 17); + this.checkboxFileList.TabIndex = 14; + this.checkboxFileList.Text = "Select / deselect all"; + this.checkboxFileList.UseVisualStyleBackColor = true; + this.checkboxFileList.CheckedChanged += new System.EventHandler(this.checkboxFileList_CheckedChanged); + // + // listViewFileList + // + this.listViewFileList.AllowDrop = true; + this.listViewFileList.AllowRowReorder = false; + this.listViewFileList.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.listViewFileList.CheckBoxes = true; + this.listViewFileList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.FileTitle, + this.status}); + this.listViewFileList.FullRowSelect = true; + this.listViewFileList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.listViewFileList.HideSelection = false; + this.listViewFileList.Location = new System.Drawing.Point(6, 20); + this.listViewFileList.Name = "listViewFileList"; + this.listViewFileList.Size = new System.Drawing.Size(342, 394); + this.listViewFileList.TabIndex = 13; + this.listViewFileList.UseCompatibleStateImageBehavior = false; + this.listViewFileList.View = System.Windows.Forms.View.Details; + this.listViewFileList.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.listViewFileList_ItemChecked); + this.listViewFileList.SelectedIndexChanged += new System.EventHandler(this.listViewFileList_SelectedIndexChanged); + // + // FileTitle + // + this.FileTitle.Text = "Title"; + this.FileTitle.Width = 188; + // + // status + // + this.status.Text = "Status"; + this.status.Width = 102; + // + // groupBoxMatchList + // + this.groupBoxMatchList.Controls.Add(this.labelLaunchUrlInfo); + this.groupBoxMatchList.Controls.Add(this.listViewMatchList); + this.groupBoxMatchList.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBoxMatchList.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.groupBoxMatchList.Location = new System.Drawing.Point(0, 0); + this.groupBoxMatchList.Name = "groupBoxMatchList"; + this.groupBoxMatchList.Size = new System.Drawing.Size(354, 443); + this.groupBoxMatchList.TabIndex = 16; + this.groupBoxMatchList.TabStop = false; + this.groupBoxMatchList.Text = "MatchList"; + // + // labelLaunchUrlInfo + // + this.labelLaunchUrlInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.labelLaunchUrlInfo.AutoSize = true; + this.labelLaunchUrlInfo.Location = new System.Drawing.Point(10, 422); + this.labelLaunchUrlInfo.Name = "labelLaunchUrlInfo"; + this.labelLaunchUrlInfo.Size = new System.Drawing.Size(153, 13); + this.labelLaunchUrlInfo.TabIndex = 15; + this.labelLaunchUrlInfo.Text = "Click on item to launch website"; + // + // listViewMatchList + // + this.listViewMatchList.AllowDrop = true; + this.listViewMatchList.AllowRowReorder = false; + this.listViewMatchList.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.listViewMatchList.CheckBoxes = true; + this.listViewMatchList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.listViewMatchList.FullRowSelect = true; + this.listViewMatchList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.listViewMatchList.Location = new System.Drawing.Point(6, 20); + this.listViewMatchList.MultiSelect = false; + this.listViewMatchList.Name = "listViewMatchList"; + this.listViewMatchList.Size = new System.Drawing.Size(342, 394); + this.listViewMatchList.TabIndex = 14; + this.listViewMatchList.UseCompatibleStateImageBehavior = false; + this.listViewMatchList.View = System.Windows.Forms.View.Details; + this.listViewMatchList.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.listViewMatchList_ItemChecked); + this.listViewMatchList.SelectedIndexChanged += new System.EventHandler(this.listViewMatchList_SelectedIndexChanged); + this.listViewMatchList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.listViewMatchList_ItemCheck); + // + // columnHeader1 + // + this.columnHeader1.Text = "Title (Platform)"; + this.columnHeader1.Width = 179; + // + // columnHeader2 + // + this.columnHeader2.Text = "Relevance"; + this.columnHeader2.Width = 80; + // + // bottomPanel + // + this.bottomPanel.Controls.Add(this.label2); + this.bottomPanel.Controls.Add(this.groupBoxFilter); + this.bottomPanel.Controls.Add(this.linkLabelAllGame); + this.bottomPanel.Controls.Add(this.buttonClose); + this.bottomPanel.Controls.Add(this.buttonSaveSearch); + this.bottomPanel.Controls.Add(this.buttonStartSearch); + this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom; + this.bottomPanel.Location = new System.Drawing.Point(0, 443); + this.bottomPanel.Name = "bottomPanel"; + this.bottomPanel.Size = new System.Drawing.Size(712, 86); + this.bottomPanel.TabIndex = 16; + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(555, 4); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(154, 13); + this.label2.TabIndex = 28; + this.label2.Text = "The data is brought to you by:"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // groupBoxFilter + // + this.groupBoxFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.groupBoxFilter.Controls.Add(this.labelPlatform); + this.groupBoxFilter.Controls.Add(this.filterComboBox); + this.groupBoxFilter.Controls.Add(this.ResetFilterButton); + this.groupBoxFilter.Controls.Add(this.MinRelevanceNum); + this.groupBoxFilter.Controls.Add(this.label1); + this.groupBoxFilter.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.groupBoxFilter.Location = new System.Drawing.Point(3, 4); + this.groupBoxFilter.Name = "groupBoxFilter"; + this.groupBoxFilter.Size = new System.Drawing.Size(247, 79); + this.groupBoxFilter.TabIndex = 29; + this.groupBoxFilter.TabStop = false; + this.groupBoxFilter.Text = "Filter:"; + // + // labelPlatform + // + this.labelPlatform.AutoSize = true; + this.labelPlatform.Location = new System.Drawing.Point(6, 25); + this.labelPlatform.Name = "labelPlatform"; + this.labelPlatform.Size = new System.Drawing.Size(51, 13); + this.labelPlatform.TabIndex = 30; + this.labelPlatform.Text = "Platform:"; + // + // filterComboBox + // + this.filterComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.filterComboBox.BorderColor = System.Drawing.Color.Empty; + this.filterComboBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.filterComboBox.Items.AddRange(new object[] { + "Arcade", + "Atari 5200", + "Atari 7800", + "Atari Lynx", + "Atari ST", + "Atari Video Computer System", + "Commodore 64/128", + "Commodore Amiga", + "Game Boy", + "Game Boy Advance", + "Game Boy Color", + "Neo Geo", + "Nintendo 64", + "Nintendo Entertainment System", + "PlayStation", + "Sega Dreamcast", + "Sega Game Gear", + "Sega Genesis", + "Sega Master System", + "Super NES", + "TurboGrafx-16"}); + this.filterComboBox.Location = new System.Drawing.Point(63, 22); + this.filterComboBox.Name = "filterComboBox"; + this.filterComboBox.Size = new System.Drawing.Size(132, 21); + this.filterComboBox.TabIndex = 22; + this.filterComboBox.SelectedIndexChanged += new System.EventHandler(this.filterComboBox_SelectedIndexChanged); + this.filterComboBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.filterComboBox_KeyUp); + // + // ResetFilterButton + // + this.ResetFilterButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.ResetFilterButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ResetFilterButton.Location = new System.Drawing.Point(201, 20); + this.ResetFilterButton.Name = "ResetFilterButton"; + this.ResetFilterButton.Size = new System.Drawing.Size(40, 23); + this.ResetFilterButton.TabIndex = 23; + this.ResetFilterButton.Text = "Clear"; + this.ResetFilterButton.UseVisualStyleBackColor = true; + this.ResetFilterButton.Click += new System.EventHandler(this.ResetFilterButton_Click); + // + // MinRelevanceNum + // + this.MinRelevanceNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.MinRelevanceNum.Increment = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.MinRelevanceNum.Location = new System.Drawing.Point(117, 49); + this.MinRelevanceNum.Name = "MinRelevanceNum"; + this.MinRelevanceNum.Size = new System.Drawing.Size(78, 21); + this.MinRelevanceNum.TabIndex = 24; + this.MinRelevanceNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.MinRelevanceNum.Value = new decimal(new int[] { + 70, + 0, + 0, + 0}); + this.MinRelevanceNum.ValueChanged += new System.EventHandler(this.MinRelevanceNum_ValueChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 51); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(84, 13); + this.label1.TabIndex = 25; + this.label1.Text = "Min. Relevance:"; + // + // linkLabelAllGame + // + this.linkLabelAllGame.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.linkLabelAllGame.AutoSize = true; + this.linkLabelAllGame.Location = new System.Drawing.Point(583, 24); + this.linkLabelAllGame.Name = "linkLabelAllGame"; + this.linkLabelAllGame.Size = new System.Drawing.Size(126, 13); + this.linkLabelAllGame.TabIndex = 3; + this.linkLabelAllGame.TabStop = true; + this.linkLabelAllGame.Text = "http://www.allgame.com"; + this.linkLabelAllGame.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.linkLabelAllGame.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelAllGame_LinkClicked); + // + // buttonClose + // + this.buttonClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonClose.Location = new System.Drawing.Point(586, 49); + this.buttonClose.Name = "buttonClose"; + this.buttonClose.Size = new System.Drawing.Size(114, 30); + this.buttonClose.TabIndex = 2; + this.buttonClose.Text = "Close"; + this.buttonClose.UseVisualStyleBackColor = true; + this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click); + // + // buttonSaveSearch + // + this.buttonSaveSearch.Enabled = false; + this.buttonSaveSearch.Location = new System.Drawing.Point(256, 49); + this.buttonSaveSearch.Name = "buttonSaveSearch"; + this.buttonSaveSearch.Size = new System.Drawing.Size(160, 30); + this.buttonSaveSearch.TabIndex = 1; + this.buttonSaveSearch.Text = "2) Download && Save Details"; + this.buttonSaveSearch.UseVisualStyleBackColor = true; + this.buttonSaveSearch.Click += new System.EventHandler(this.buttonSaveSearch_Click); + // + // buttonStartSearch + // + this.buttonStartSearch.Enabled = false; + this.buttonStartSearch.Location = new System.Drawing.Point(256, 17); + this.buttonStartSearch.Name = "buttonStartSearch"; + this.buttonStartSearch.Size = new System.Drawing.Size(160, 30); + this.buttonStartSearch.TabIndex = 0; + this.buttonStartSearch.Text = "1) Start Search"; + this.buttonStartSearch.UseVisualStyleBackColor = true; + this.buttonStartSearch.Click += new System.EventHandler(this.buttonStartSearch_Click); + // + // FileInfoScraperForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(712, 551); + this.Controls.Add(this.splitContainer); + this.Controls.Add(this.bottomPanel); + this.Controls.Add(this.statusStrip); + this.Name = "FileInfoScraperForm"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Import Info"; + this.statusStrip.ResumeLayout(false); + this.statusStrip.PerformLayout(); + this.splitContainer.Panel1.ResumeLayout(false); + this.splitContainer.Panel2.ResumeLayout(false); + this.splitContainer.ResumeLayout(false); + this.groupBoxFileList.ResumeLayout(false); + this.groupBoxFileList.PerformLayout(); + this.groupBoxMatchList.ResumeLayout(false); + this.groupBoxMatchList.PerformLayout(); + this.bottomPanel.ResumeLayout(false); + this.bottomPanel.PerformLayout(); + this.groupBoxFilter.ResumeLayout(false); + this.groupBoxFilter.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.MinRelevanceNum)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.StatusStrip statusStrip; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel; + private System.Windows.Forms.ToolStripProgressBar toolStripProgressBar; + private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1; + private System.Windows.Forms.ToolStripMenuItem cancelSearchToolStripMenuItem; + private System.Windows.Forms.SplitContainer splitContainer; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxFileList; + private MediaPortal.UserInterface.Controls.MPCheckBox checkboxFileList; + private MediaPortal.UserInterface.Controls.MPListView listViewFileList; + private System.Windows.Forms.ColumnHeader FileTitle; + private System.Windows.Forms.ColumnHeader status; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxMatchList; + private MediaPortal.UserInterface.Controls.MPLabel labelLaunchUrlInfo; + private MediaPortal.UserInterface.Controls.MPListView listViewMatchList; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.Panel bottomPanel; + private MediaPortal.UserInterface.Controls.MPLabel label2; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxFilter; + private MediaPortal.UserInterface.Controls.MPLabel labelPlatform; + private MediaPortal.UserInterface.Controls.MPComboBox filterComboBox; + private MediaPortal.UserInterface.Controls.MPButton ResetFilterButton; + private System.Windows.Forms.NumericUpDown MinRelevanceNum; + private MediaPortal.UserInterface.Controls.MPLabel label1; + private System.Windows.Forms.LinkLabel linkLabelAllGame; + private MediaPortal.UserInterface.Controls.MPButton buttonClose; + private MediaPortal.UserInterface.Controls.MPButton buttonSaveSearch; + private MediaPortal.UserInterface.Controls.MPButton buttonStartSearch; + private System.Windows.Forms.ToolStripMenuItem scraperSaveTypeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem dataAndImagesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem dataToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem imagesToolStripMenuItem; + + } +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-12 17:50:28 UTC (rev 521) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-12 21:02:26 UTC (rev 522) @@ -24,9 +24,13 @@ #endregion using System; +using System.Collections.Generic; using System.ComponentModel; +using System.Data; using System.Diagnostics; using System.Drawing; +using System.Text; +using System.Threading; using System.Windows.Forms; using GUIPrograms; @@ -34,60 +38,35 @@ using GUIPrograms.ApplicationItems; using GUIPrograms.FileItems; - namespace GUIPrograms.Design { - /// <summary> - /// Summary description for Form1. - /// </summary> - public class FileInfoScraperForm : Form + public partial class FileInfoScraperForm : Form { - private ApplicationItem m_CurApp; - private Panel leftPanel; - private Panel rightPanel; - private Splitter splitterVert; - private ListView FileList; - private ColumnHeader FileTitle; - private ColumnHeader columnHeader1; - private ColumnHeader status; - private ColumnHeader columnHeader2; - private ListView MatchList; - private Label lblFiles; - private Label lblMatches; - private Button btnStartSearch; - private Button btnSaveSearch; - private Button btnCancel; - private LinkLabel allGameLink; - private Button checkAllButton; + #region InitControls + private ToolTip toolTip1; - private Button uncheckAllButton; - private Button buttonSelectBestMatch; - private Label filterLabel; - private ComboBox filterComboBox; - private Button ResetFilterButton; - private NumericUpDown MinRelevanceNum; - private Label label1; - private Button LaunchURLButton; - private Panel bottomPanel; private ContextMenu menuFileList; private MenuItem mnuCheckWithoutImages; private MenuItem mnuCheckWithoutOverview; - private ProgressBar progressBar; - private Panel progressPanel; - private Label progressStatusLabel; - private Button cancelButton; - private IContainer components; - - int mStartTime = 0; // timer stuff private ContextMenu menuSaveDetails; private MenuItem menuItem4; private MenuItem menuDataAndImages; private MenuItem menuData; private MenuItem menuImages; - private MediaPortal.UserInterface.Controls.MPLabel label2; + + #endregion + + #region Variables / Init + + int mStartTime = 0; + ApplicationItem m_CurApp; + + bool isSearching = false; bool stopSearching = false; + ScraperSaveType saveType = ScraperSaveType.DataAndImages; + public ApplicationItem CurApp { get @@ -109,576 +88,238 @@ } } + public void Setup() + { + SyncFileList(); + UpdateButtonStates(); + ChangeScraperSaveType(ScraperSaveType.DataAndImages); + } + public FileInfoScraperForm() { - // - // Required for Windows Form Designer support - // InitializeComponent(); + } - // - // TODO: Add any constructor code after InitializeComponent call - // + #endregion + + #region Properties / Helper Routines + + private FileItem GetSelectedFileItem() + { + if (listViewFileList.FocusedItem == null) return null; + if (listViewFileList.FocusedItem.Tag == null) return null; + + return listViewFileList.FocusedItem.Tag as FileItem; } - /// <summary> - /// Clean up any resources being used. - /// </summary> - protected override void Dispose(bool disposing) + private FileItemInfo GetSelectedMatchItem() { - if (disposing) + if (listViewMatchList.CheckedItems == null) return null; + if (listViewMatchList.CheckedItems[0] == null) return null; + if (listViewMatchList.CheckedItems[0].Tag == null) return null; + + return listViewMatchList.CheckedItems[0].Tag as FileItemInfo; + } + + private bool IsGoodMatch(FileItemInfo info) + { + bool result = (filterComboBox.Text == "") || (info.Platform.ToLower().IndexOf(filterComboBox.Text.ToLower()) == 0); + if (result) { - if (components != null) - { - components.Dispose(); - } + result = (info.RelevanceNorm >= MinRelevanceNum.Value); } - base.Dispose(disposing); + return result; } - #region Windows Form Designer generated code - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() + private void SelectBestMatch(ListViewItem curItem) { - this.components = new System.ComponentModel.Container(); - System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FileInfoScraperForm)); - this.bottomPanel = new System.Windows.Forms.Panel(); - this.label2 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.progressPanel = new System.Windows.Forms.Panel(); - this.cancelButton = new MediaPortal.UserInterface.Controls.MPButton(); - this.progressStatusLabel = new MediaPortal.UserInterface.Controls.MPLabel(); - this.progressBar = new System.Windows.Forms.ProgressBar(); - this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.MinRelevanceNum = new System.Windows.Forms.NumericUpDown(); - this.ResetFilterButton = new MediaPortal.UserInterface.Controls.MPButton(); - this.filterComboBox = new MediaPortal.UserInterface.Controls.MPComboBox(); - this.filterLabel = new MediaPortal.UserInterface.Controls.MPLabel(); - this.buttonSelectBestMatch = new MediaPortal.UserInterface.Controls.MPButton(); - this.allGameLink = new System.Windows.Forms.LinkLabel(); - this.btnCancel = new MediaPortal.UserInterface.Controls.MPButton(); - this.btnSaveSearch = new MediaPortal.UserInterface.Controls.MPButton(); - this.btnStartSearch = new MediaPortal.UserInterface.Controls.MPButton(); - this.leftPanel = new System.Windows.Forms.Panel(); - this.uncheckAllButton = new MediaPortal.UserInterface.Controls.MPButton(); - this.checkAllButton = new MediaPortal.UserInterface.Controls.MPButton(); - this.lblFiles = new MediaPortal.UserInterface.Controls.MPLabel(); - this.FileList = new System.Windows.Forms.ListView(); - this.FileTitle = new System.Windows.Forms.ColumnHeader(); - this.status = new System.Windows.Forms.ColumnHeader(); - this.menuFileList = new System.Windows.Forms.ContextMenu(); - this.mnuCheckWithoutImages = new System.Windows.Forms.MenuItem(); - this.mnuCheckWithoutOverview = new System.Windows.Forms.MenuItem(); - this.splitterVert = new System.Windows.Forms.Splitter(); - this.rightPanel = new System.Windows.Forms.Panel(); - this.LaunchURLButton = new MediaPortal.UserInterface.Controls.MPButton(); - this.lblMatches = new MediaPortal.UserInterface.Controls.MPLabel(); - this.MatchList = new System.Windows.Forms.ListView(); - this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); - this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.menuSaveDetails = new System.Windows.Forms.ContextMenu(); - this.menuDataAndImages = new System.Windows.Forms.MenuItem(); - this.menuItem4 = new System.Windows.Forms.MenuItem(); - this.menuData = new System.Windows.Forms.MenuItem(); - this.menuImages = new System.Windows.Forms.MenuItem(); - this.bottomPanel.SuspendLayout(); - this.progressPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.MinRelevanceNum)).BeginInit(); - this.leftPanel.SuspendLayout(); - this.rightPanel.SuspendLayout(); - this.SuspendLayout(); - // - // bottomPanel - // - this.bottomPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.bottomPanel.Controls.Add(this.label2); - this.bottomPanel.Controls.Add(this.progressPanel); - this.bottomPanel.Controls.Add(this.label1); - this.bottomPanel.Controls.Add(this.MinRelevanceNum); - this.bottomPanel.Controls.Add(this.ResetFilterButton); - this.bottomPanel.Controls.Add(this.filterComboBox); - this.bottomPanel.Controls.Add(this.filterLabel); - this.bottomPanel.Controls.Add(this.buttonSelectBestMatch); - this.bottomPanel.Controls.Add(this.allGameLink); - this.bottomPanel.Controls.Add(this.btnCancel); - this.bottomPanel.Controls.Add(this.btnSaveSearch); - this.bottomPanel.Controls.Add(this.btnStartSearch); - this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bottomPanel.Location = new System.Drawing.Point(0, 422); - this.bottomPanel.Name = "bottomPanel"; - this.bottomPanel.Size = new System.Drawing.Size(752, 112); - this.bottomPanel.TabIndex = 0; - // - // label2 - // - this.label2.Location = new System.Drawing.Point(520, 8); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(224, 40); - this.label2.TabIndex = 28; - this.label2.Text = "Warning: Don\'t overuse the allgame scraper! Do lookups with small sets of games (" + - "max. 20 games)."; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // progressPanel - // - this.progressPanel.Controls.Add(this.cancelButton); - this.progressPanel.Controls.Add(this.progressStatusLabel); - this.progressPanel.Controls.Add(this.progressBar); - this.progressPanel.Enabled = false; - this.progressPanel.Location = new System.Drawing.Point(8, 69); - this.progressPanel.Name = "progressPanel"; - this.progressPanel.Size = new System.Drawing.Size(480, 40); - this.progressPanel.TabIndex = 27; - // - // cancelButton - // - this.cancelButton.Location = new System.Drawing.Point(392, 16); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(88, 23); - this.cancelButton.TabIndex = 29; - this.cancelButton.Text = "Cancel Search"; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // progressStatusLabel - // - this.progressStatusLabel.Location = new System.Drawing.Point(0, 20); - this.progressStatusLabel.Name = "progressStatusLabel"; - this.progressStatusLabel.Size = new System.Drawing.Size(392, 16); - this.progressStatusLabel.TabIndex = 28; - this.progressStatusLabel.Text = "Progress status"; - // - // progressBar - // - this.progressBar.Location = new System.Drawing.Point(0, 0); - this.progressBar.Name = "progressBar"; - this.progressBar.Size = new System.Drawing.Size(480, 16); - this.progressBar.TabIndex = 27; - // - // label1 - // - this.label1.Location = new System.Drawing.Point(344, 6); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(88, 14); - this.label1.TabIndex = 25; - this.label1.Text = "Min. Relevance"; - // - // MinRelevanceNum - // - this.MinRelevanceNum.Increment = new System.Decimal(new int[] { - 10, - 0, - 0, - 0}); - this.MinRelevanceNum.Location = new System.Drawing.Point(432, 3); - this.MinRelevanceNum.Name = "MinRelevanceNum"; - this.MinRelevanceNum.Size = new System.Drawing.Size(56, 20); - this.MinRelevanceNum.TabIndex = 24; - this.toolTip1.SetToolTip(this.MinRelevanceNum, "This is the minimal RELEVANCE value to autoselect a match"); - this.MinRelevanceNum.Value = new System.Decimal(new int[] { - 70, - 0, - 0, - 0}); - this.MinRelevanceNum.ValueChanged += new System.EventHandler(this.MinRelevanceNum_ValueChanged); - // - // ResetFilterButton - // - this.ResetFilterButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.ResetFilterButton.Location = new System.Drawing.Point(282, 3); - this.ResetFilterButton.Name = "ResetFilterButton"; - this.ResetFilterButton.Size = new System.Drawing.Size(40, 21); - this.ResetFilterButton.TabIndex = 23; - this.ResetFilterButton.Text = "Clear"; - this.toolTip1.SetToolTip(this.ResetFilterButton, "Reset Filter"); - this.ResetFilterButton.Click += new System.EventHandler(this.ResetFilterButton_Click); - // - // filterComboBox - // - this.filterComboBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.filterComboBox.Items.AddRange(new object[] { - "Arcade", - "Atari 5200", - "Atari 7800", - "Atari Lynx", - "Atari ST", - "Atari Video Computer System", - "Commodore 64/128", - "Commodore Amiga", - "Game Boy", - "Game Boy Advance", - "Game Boy Color", - "Neo Geo", - "Nintendo 64", - "Nintendo Entertainment System", - "PlayStation", - "Sega Dreamcast", - "Sega Game Gear", - "Sega Genesis", - "Sega Master System", - "Super NES", - "TurboGrafx-16"}); - this.filterComboBox.Location = new System.Drawing.Point(72, 3); - this.filterComboBox.Name = "filterComboBox"; - this.filterComboBox.Size = new System.Drawing.Size(208, 21); - this.filterComboBox.TabIndex = 22; - this.toolTip1.SetToolTip(this.filterComboBox, "Enter platform to filter results"); - this.filterComboBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.filterComboBox_KeyUp); - this.filterComboBox.SelectedIndexChanged += new System.EventHandler(this.filterComboBox_SelectedIndexChanged); - // - // filterLabel - // - this.filterLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.filterLabel.Location = new System.Drawing.Point(8, 5); - this.filterLabel.Name = "filterLabel"; - this.filterLabel.Size = new System.Drawing.Size(80, 16); - this.filterLabel.TabIndex = 21; - this.filterLabel.Text = "Platform:"; - // - // buttonSelectBestMatch - // - this.buttonSelectBestMatch.Enabled = false; - this.buttonSelectBestMatch.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.buttonSelectBestMatch.Location = new System.Drawing.Point(168, 32); - this.buttonSelectBestMatch.Name = "buttonSelectBestMatch"; - this.buttonSelectBestMatch.Size = new System.Drawing.Size(160, 32); - this.buttonSelectBestMatch.TabIndex = 20; - this.buttonSelectBestMatch.Text = "2) Select Best Match"; - this.toolTip1.SetToolTip(this.buttonSelectBestMatch, "Select the best match for all checked files ("); - this.buttonSelectBestMatch.Click += new System.EventHandler(this.buttonSelectBestMatch_Click); - // - // allGameLink - // - this.allGameLink.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.allGameLink.Location = new System.Drawing.Point(616, 56); - this.allGameLink.Name = "allGameLink"; - this.allGameLink.Size = new System.Drawing.Size(128, 16); - this.allGameLink.TabIndex = 3; - this.allGameLink.TabStop = true; - this.allGameLink.Text = "http://www.allgame.com"; - this.allGameLink.TextAlign = System.Drawing.ContentAlignment.TopRight; - this.allGameLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.allGameLink_LinkClicked); - // - // btnCancel - // - this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnCancel.Location = new System.Drawing.Point(668, 76); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.TabIndex = 2; - this.btnCancel.Text = "Close"; - this.btnCancel.Click += new System.EventHandler(this.button3_Click); - // - // btnSaveSearch - // - this.btnSaveSearch.Enabled = false; - this.btnSaveSearch.Location = new System.Drawing.Point(328, 32); - this.btnSaveSearch.Name = "btnSaveSearch"; - this.btnSaveSearch.Size = new System.Drawing.Size(160, 32); - this.btnSaveSearch.TabIndex = 1; - this.btnSaveSearch.Text = "3) Download && Save Details"; - this.toolTip1.SetToolTip(this.btnSaveSearch, "Download selected matches and save results to MediaPortal!"); - this.btnSaveSearch.Click += new System.EventHandler(this.btnSaveSearch_Click); - // - // btnStartSearch - // - this.btnStartSearch.Enabled = false; - this.btnStartSearch.Location = new System.Drawing.Point(8, 32); - this.btnStartSearch.Name = "btnStartSearch"; - this.btnStartSearch.Size = new System.Drawing.Size(160, 32); - this.btnStartSearch.TabIndex = 0; - this.btnStartSearch.Text = "1) Start Search"; - this.toolTip1.SetToolTip(this.btnStartSearch, "Search Details for all the checked files"); - this.btnStartSearch.Click += new System.EventHandler(this.btnStartSearch_Click); - // - // leftPanel - // - this.leftPanel.Controls.Add(this.uncheckAllButton); - this.leftPanel.Controls.Add(this.checkAllButton); - this.leftPanel.Controls.Add(this.lblFiles); - this.leftPanel.Controls.Add(this.FileList); - this.leftPanel.Dock = System.Windows.Forms.DockStyle.Left; - this.leftPanel.Location = new System.Drawing.Point(0, 0); - this.leftPanel.Name = "leftPanel"; - this.leftPanel.Size = new System.Drawing.Size(360, 422); - this.leftPanel.TabIndex = 5; - // - // uncheckAllButton - // - this.uncheckAllButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.uncheckAllButton.Image = ((System.Drawing.Image)(resources.GetObject("uncheckAllButton.Image"))); - this.uncheckAllButton.Location = new System.Drawing.Point(320, 8); - this.uncheckAllButton.Name = "uncheckAllButton"; - this.uncheckAllButton.Size = new System.Drawing.Size(32, 32); - this.uncheckAllButton.TabIndex = 16; - this.toolTip1.SetToolTip(this.uncheckAllButton, "Uncheck all"); - this.uncheckAllButton.Click += new System.EventHandler(this.uncheckAllButton_Click); - // - // checkAllButton - // - this.checkAllButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.checkAllButton.Image = ((System.Drawing.Image)(resources.GetObject("checkAllButton.Image"))); - this.checkAllButton.Location = new System.Drawing.Point(288, 8); - this.checkAllButton.Name = "checkAllButton"; - this.checkAllButton.Size = new System.Drawing.Size(32, 32); - this.checkAllButton.TabIndex = 15; - this.toolTip1.SetToolTip(this.checkAllButton, "Check all"); - this.checkAllButton.Click += new System.EventHandler(this.checkAllButton_Click); - // - // lblFiles - // - this.lblFiles.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.lblFiles.Location = new System.Drawing.Point(8, 16); - this.lblFiles.Name = "lblFiles"; - this.lblFiles.Size = new System.Drawing.Size(200, 16); - this.lblFiles.TabIndex = 14; - this.lblFiles.Text = "Files"; - // - // FileList - // - this.FileList.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.FileList.CheckBoxes = true; - this.FileList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.FileTitle, - this.status}); - this.FileList.ContextMenu = this.menuFileList; - this.FileList.FullRowSelect = true; - this.FileList.HideSelection = false; - this.FileList.LabelEdit = true; - this.FileList.Location = new System.Drawing.Point(8, 40); - this.FileList.Name = "FileList"; - this.FileList.Size = new System.Drawing.Size(344, 368); - this.FileList.TabIndex = 13; - this.FileList.View = System.Windows.Forms.View.Details; - this.FileList.MouseUp += new System.Windows.Forms.MouseEventHandler(this.FileList_MouseUp); - this.FileList.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.FileList_AfterLabelEdit); - this.FileList.SelectedIndexChanged += new System.EventHandler(this.FileList_SelectedIndexChanged); - // - // FileTitle - // - this.FileTitle.Text = "Title"; - this.FileTitle.Width = 218; - // - // status - // - this.status.Text = "Status"; - this.status.Width = 102; - // - // menuFileList - // - this.menuFileList.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { - this.mnuCheckWithoutImages, - this.mnuCheckWithoutOverview}); - // - // mnuCheckWithoutImages - // - this.mnuCheckWithoutImages.Index = 0; - this.mnuCheckWithoutImages.Text = "Check all files without images"; - this.mnuCheckWithoutImages.Click += new System.EventHandler(this.mnuCheckWithoutImages_Click); - // - // mnuCheckWithoutOverview - // - this.mnuCheckWithoutOverview.Index = 1; - this.mnuCheckWithoutOverview.Text = "Check all files without an overview"; - this.mnuCheckWithoutOverview.Click += new System.EventHandler(this.mnuCheckWithoutOverview_Click); - // - // splitterVert - // - this.splitterVert.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.splitterVert.Location = new System.Drawing.Point(360, 0); - this.splitterVert.Name = "splitterVert"; - this.splitterVert.Size = new System.Drawing.Size(5, 422); - this.splitterVert.TabIndex = 6; - this.splitterVert.TabStop = false; - // - // rightPanel - // - this.rightPanel.Controls.Add(this.LaunchURLButton); - this.rightPanel.Controls.Add(this.lblMatches); - this.rightPanel.Controls.Add(this.MatchList); - this.rightPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.rightPanel.Location = new System.Drawing.Point(365, 0); - this.rightPanel.Name = "rightPanel"; - this.rightPanel.Size = new System.Drawing.Size(387, 422); - this.rightPanel.TabIndex = 7; - // - // LaunchURLButton - // - this.LaunchURLButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.LaunchURLButton.Enabled = false; - this.LaunchURLButton.Location = new System.Drawing.Point(272, 12); - this.LaunchURLButton.Name = "LaunchURLButton"; - this.LaunchURLButton.Size = new System.Drawing.Size(104, 24); - this.LaunchURLButton.TabIndex = 16; - this.LaunchURLButton.Text = "Launch URL"; - this.toolTip1.SetToolTip(this.LaunchURLButton, "Show allgame-page in your browser"); - this.LaunchURLButton.Click += new System.EventHandler(this.LaunchURLButton_Click); - // - // lblMatches - // - this.lblMatches.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.lblMatches.Location = new System.Drawing.Point(16, 18); - this.lblMatches.Name = "lblMatches"; - this.lblMatches.Size = new System.Drawing.Size(56, 16); - this.lblMatches.TabIndex = 15; - this.lblMatches.Text = "Matches:"; - // - // MatchList - // - this.MatchList.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.MatchList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2}); - this.MatchList.FullRowSelect = true; - this.MatchList.HideSelection = false; - this.MatchList.Location = new System.Drawing.Point(16, 40); - this.MatchList.MultiSelect = false; - this.MatchList.Name = "MatchList"; - this.MatchList.Size = new System.Drawing.Size(358, 368); - this.MatchList.TabIndex = 14; - this.MatchList.View = System.Windows.Forms.View.Details; - this.MatchList.DoubleClick += new System.EventHandler(this.MatchList_DoubleClick); - this.MatchList.SelectedIndexChanged += new System.EventHandler(this.MatchList_SelectedIndexChanged); - // - // columnHeader1 - // - this.columnHeader1.Text = "Title (Platform)"; - this.columnHeader1.Width = 247; - // - // columnHeader2 - // - this.columnHeader2.Text = "Relevance"; - this.columnHeader2.Width = 80; - // - // menuSaveDetails - // - this.menuSaveDetails.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { - this.menuDataAndImages, - this.menuItem4, - this.menuData, - this.menuImages}); - // - // menuDataAndImages - // - this.menuDataAndImages.Index = 0; - this.menuDataAndImages.Text = "Save Data and download images"; - this.menuDataAndImages.Click += new System.EventHandler(this.menuDataAndImages_Click); - // - // menuItem4 - // - this.menuItem4.Index = 1; - this.menuItem4.Text = "-"; - // - // menuData - // - this.menuData.Index = 2; - this.menuData.Text = "Save Data only"; - this.menuData.Click += new System.EventHandler(this.menuData_Click); - // - // menuImages - // - this.menuImages.Index = 3; - this.menuImages.Text = "Download images only"; - this.menuImages.Click += new System.EventHandler(this.menuImages_Click); - // - // FileInfoScraperForm - // - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(752, 534); - this.Controls.Add(this.rightPanel); - this.Controls.Add(this.splitterVert); - this.Controls.Add(this.leftPanel); - this.Controls.Add(this.bottomPanel); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "FileInfoScraperForm"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Search fileinfo"; - this.bottomPanel.ResumeLayout(false); - this.progressPanel.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.MinRelevanceNum)).EndInit(); - this.leftPanel.ResumeLayout(false); - this.rightPanel.ResumeLayout(false); - this.ResumeLayout(false); + if (curItem.Tag == null) return; + FileItem file = curItem.Tag as FileItem; + if (file == null) return; + if (file.FileInfoList == null) return; + + foreach (FileItemInfo info in file.FileInfoList) + { + // check if + // - info is from platform, which is set in combobox + // - has minimum relevance + if (!IsGoodMatch(info)) continue; + + // if file has no favourite yet + if (file.FileInfoFavourite == null) + { + file.FileInfoFavourite = info; + continue; + } + + /* + // prevously selected infoitem + if (file.GameURL == info.GameURL) + { + file.FileInfoFavourite = info; + continue; + } + */ + + // file has already a favourite + // is info's relevance better than current favourite's relevance + if (info.RelevanceNorm > file.FileInfoFavourite.RelevanceNorm) + file.FileInfoFavourite = info; + } + + if (file.FileInfoFavourite != null) + { + curItem.SubItems[1].Text = String.Format("best: {0}%", file.FileInfoFavourite.RelevanceNorm); + } + else + { + curItem.SubItems[1].Text = "no match"; + } } + #endregion + #region Display - public void Setup() + private void UpdateButtonStates() { - SyncListView(); - SyncFileLabel(); + // labels to update + groupBoxFileList.Text = String.Format("Files ({0} of {1} selected)", listViewFileList.CheckedItems.Count, listViewFileList.Items.Count); + + // button states to update + buttonStartSearch.Enabled = (listViewFileList.CheckedItems.Count > 0); + + if (!buttonStartSearch.Enabled) + buttonSaveSearch.Enabled = false; + + // when search is active, only cancel button should be enabled + groupBoxFileList.Enabled = (!isSearching); + groupBoxMatchList.Enabled = (!isSearching); + groupBoxFilter.Enabled = (!isSearching); + buttonStartSearc... [truncated message content] |
From: <che...@us...> - 2007-06-14 12:08:40
|
Revision: 545 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=545&view=rev Author: chef_koch Date: 2007-06-14 05:08:38 -0700 (Thu, 14 Jun 2007) Log Message: ----------- code cleanup Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.Designer.cs Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.Designer.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.Designer.cs 2007-06-14 12:08:38 UTC (rev 545) @@ -0,0 +1,170 @@ +namespace GUIPrograms.Design +{ + partial class ProgramViews + { + /// <summary> + /// Erforderliche Designervariable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Verwendete Ressourcen bereinigen. + /// </summary> + /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Komponenten-Designer generierter Code + + /// <summary> + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// </summary> + private void InitializeComponent() + { + this.dataGrid = new System.Windows.Forms.DataGrid(); + this.cbViews = new MediaPortal.UserInterface.Controls.MPComboBox(); + this.label3 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.tbViewName = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.label2 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.btnDelete = new MediaPortal.UserInterface.Controls.MPButton(); + this.btnSave = new MediaPortal.UserInterface.Controls.MPButton(); + this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); + ((System.ComponentModel.ISupportInitialize)(this.dataGrid)).BeginInit(); + this.SuspendLayout(); + // + // dataGrid + // + this.dataGrid.AlternatingBackColor = System.Drawing.Color.Lavender; + this.dataGrid.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.dataGrid.BackColor = System.Drawing.Color.WhiteSmoke; + this.dataGrid.BackgroundColor = System.Drawing.Color.LightGray; + this.dataGrid.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.dataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue; + this.dataGrid.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.dataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue; + this.dataGrid.DataMember = ""; + this.dataGrid.FlatMode = true; + this.dataGrid.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.dataGrid.ForeColor = System.Drawing.Color.MidnightBlue; + this.dataGrid.GridLineColor = System.Drawing.Color.Gainsboro; + this.dataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None; + this.dataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue; + this.dataGrid.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.dataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke; + this.dataGrid.LinkColor = System.Drawing.Color.Teal; + this.dataGrid.Location = new System.Drawing.Point(5, 113); + this.dataGrid.Name = "dataGrid"; + this.dataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro; + this.dataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue; + this.dataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue; + this.dataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke; + this.dataGrid.Size = new System.Drawing.Size(426, 256); + this.dataGrid.TabIndex = 83; + // + // cbViews + // + this.cbViews.BorderColor = System.Drawing.SystemColors.ActiveCaptionText; + this.cbViews.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbViews.Location = new System.Drawing.Point(69, 49); + this.cbViews.Name = "cbViews"; + this.cbViews.Size = new System.Drawing.Size(168, 21); + this.cbViews.TabIndex = 85; + this.cbViews.SelectedIndexChanged += new System.EventHandler(this.cbViews_SelectedIndexChanged); + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(5, 9); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(216, 32); + this.label3.TabIndex = 90; + this.label3.Text = "Program Views"; + // + // tbViewName + // + this.tbViewName.BorderColor = System.Drawing.Color.Empty; + this.tbViewName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tbViewName.Location = new System.Drawing.Point(69, 81); + this.tbViewName.Name = "tbViewName"; + this.tbViewName.Size = new System.Drawing.Size(168, 21); + this.tbViewName.TabIndex = 89; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(13, 81); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(40, 20); + this.label2.TabIndex = 88; + this.label2.Text = "Name:"; + // + // btnDelete + // + this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnDelete.Location = new System.Drawing.Point(370, 377); + this.btnDelete.Name = "btnDelete"; + this.btnDelete.Size = new System.Drawing.Size(48, 23); + this.btnDelete.TabIndex = 87; + this.btnDelete.Text = "Delete"; + this.btnDelete.UseVisualStyleBackColor = true; + this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); + // + // btnSave + // + this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnSave.Location = new System.Drawing.Point(314, 377); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(48, 23); + this.btnSave.TabIndex = 86; + this.btnSave.Text = "Save"; + this.btnSave.UseVisualStyleBackColor = true; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(13, 54); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(40, 16); + this.label1.TabIndex = 84; + this.label1.Text = "View:"; + // + // ProgramViews + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.dataGrid); + this.Controls.Add(this.cbViews); + this.Controls.Add(this.label3); + this.Controls.Add(this.tbViewName); + this.Controls.Add(this.label2); + this.Controls.Add(this.btnDelete); + this.Controls.Add(this.btnSave); + this.Controls.Add(this.label1); + this.Name = "ProgramViews"; + this.Size = new System.Drawing.Size(437, 408); + ((System.ComponentModel.ISupportInitialize)(this.dataGrid)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.DataGrid dataGrid; + private MediaPortal.UserInterface.Controls.MPComboBox cbViews; + private MediaPortal.UserInterface.Controls.MPLabel label3; + private MediaPortal.UserInterface.Controls.MPTextBox tbViewName; + private MediaPortal.UserInterface.Controls.MPLabel label2; + private MediaPortal.UserInterface.Controls.MPButton btnDelete; + private MediaPortal.UserInterface.Controls.MPButton btnSave; + private MediaPortal.UserInterface.Controls.MPLabel label1; + } +} Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-06-14 11:48:46 UTC (rev 544) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ProgramViews.cs 2007-06-14 12:08:38 UTC (rev 545) @@ -39,10 +39,7 @@ namespace GUIPrograms.Design { - /// <summary> - /// Summary description for ProgramViews. - /// </summary> - public class ProgramViews : UserControl + public partial class ProgramViews : UserControl { #region Helper Classes @@ -147,173 +144,6 @@ #endregion Helper Classes - #region Designer Code - - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.Container components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.dataGrid = new System.Windows.Forms.DataGrid(); - this.label3 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tbViewName = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.label2 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.btnDelete = new MediaPortal.UserInterface.Controls.MPButton(); - this.btnSave = new MediaPortal.UserInterface.Controls.MPButton(); - this.cbViews = new MediaPortal.UserInterface.Controls.MPComboBox(); - this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); - ((System.ComponentModel.ISupportInitialize)(this.dataGrid)).BeginInit(); - this.SuspendLayout(); - // - // dataGrid - // - this.dataGrid.AlternatingBackColor = System.Drawing.Color.Lavender; - this.dataGrid.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.dataGrid.BackColor = System.Drawing.Color.WhiteSmoke; - this.dataGrid.BackgroundColor = System.Drawing.Color.LightGray; - this.dataGrid.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.dataGrid.CaptionBackColor = System.Drawing.Color.LightSteelBlue; - this.dataGrid.CaptionFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.dataGrid.CaptionForeColor = System.Drawing.Color.MidnightBlue; - this.dataGrid.DataMember = ""; - this.dataGrid.FlatMode = true; - this.dataGrid.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.dataGrid.ForeColor = System.Drawing.Color.MidnightBlue; - this.dataGrid.GridLineColor = System.Drawing.Color.Gainsboro; - this.dataGrid.GridLineStyle = System.Windows.Forms.DataGridLineStyle.None; - this.dataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue; - this.dataGrid.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); - this.dataGrid.HeaderForeColor = System.Drawing.Color.WhiteSmoke; - this.dataGrid.LinkColor = System.Drawing.Color.Teal; - this.dataGrid.Location = new System.Drawing.Point(8, 112); - this.dataGrid.Name = "dataGrid"; - this.dataGrid.ParentRowsBackColor = System.Drawing.Color.Gainsboro; - this.dataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue; - this.dataGrid.SelectionBackColor = System.Drawing.Color.CadetBlue; - this.dataGrid.SelectionForeColor = System.Drawing.Color.WhiteSmoke; - this.dataGrid.Size = new System.Drawing.Size(426, 256); - this.dataGrid.TabIndex = 14; - // - // label3 - // - this.label3.Font = new System.Drawing.Font("Verdana", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(8, 8); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(216, 32); - this.label3.TabIndex = 82; - this.label3.Text = "Program Views"; - // - // tbViewName - // - this.tbViewName.BorderColor = System.Drawing.Color.Empty; - this.tbViewName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tbViewName.Location = new System.Drawing.Point(72, 80); - this.tbViewName.Name = "tbViewName"; - this.tbViewName.Size = new System.Drawing.Size(168, 21); - this.tbViewName.TabIndex = 20; - // - // label2 - // - this.label2.Location = new System.Drawing.Point(16, 80); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(40, 20); - this.label2.TabIndex = 19; - this.label2.Text = "Name:"; - // - // btnDelete - // - this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnDelete.Location = new System.Drawing.Point(373, 376); - this.btnDelete.Name = "btnDelete"; - this.btnDelete.Size = new System.Drawing.Size(48, 23); - this.btnDelete.TabIndex = 18; - this.btnDelete.Text = "Delete"; - this.btnDelete.UseVisualStyleBackColor = true; - this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); - // - // btnSave - // - this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnSave.Location = new System.Drawing.Point(317, 376); - this.btnSave.Name = "btnSave"; - this.btnSave.Size = new System.Drawing.Size(48, 23); - this.btnSave.TabIndex = 17; - this.btnSave.Text = "Save"; - this.btnSave.UseVisualStyleBackColor = true; - this.btnSave.Click += new System.EventHandler(this.btnSave_Click); - // - // cbViews - // - this.cbViews.BorderColor = System.Drawing.SystemColors.ActiveCaptionText; - this.cbViews.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbViews.Location = new System.Drawing.Point(72, 48); - this.cbViews.Name = "cbViews"; - this.cbViews.Size = new System.Drawing.Size(168, 21); - this.cbViews.TabIndex = 16; - this.cbViews.SelectedIndexChanged += new System.EventHandler(this.cbViews_SelectedIndexChanged); - // - // label1 - // - this.label1.Location = new System.Drawing.Point(16, 53); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(40, 16); - this.label1.TabIndex = 15; - this.label1.Text = "View:"; - // - // ProgramViews - // - this.Controls.Add(this.dataGrid); - this.Controls.Add(this.cbViews); - this.Controls.Add(this.label3); - this.Controls.Add(this.tbViewName); - this.Controls.Add(this.label2); - this.Controls.Add(this.btnDelete); - this.Controls.Add(this.btnSave); - this.Controls.Add(this.label1); - this.Name = "ProgramViews"; - this.Size = new System.Drawing.Size(437, 408); - ((System.ComponentModel.ISupportInitialize)(this.dataGrid)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private MediaPortal.UserInterface.Controls.MPTextBox tbViewName; - private MediaPortal.UserInterface.Controls.MPLabel label2; - private MediaPortal.UserInterface.Controls.MPButton btnDelete; - private MediaPortal.UserInterface.Controls.MPButton btnSave; - private MediaPortal.UserInterface.Controls.MPComboBox cbViews; - private MediaPortal.UserInterface.Controls.MPLabel label1; - private System.Windows.Forms.DataGrid dataGrid; - private MediaPortal.UserInterface.Controls.MPLabel label3; - - #endregion Designer Code - #region Variables ViewDefinition currentView; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-14 11:48:46 UTC (rev 544) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-14 12:08:38 UTC (rev 545) @@ -124,15 +124,18 @@ <Compile Include="Design\FileInfoScraperForm.Designer.cs"> <DependentUpon>FileInfoScraperForm.cs</DependentUpon> </Compile> - <Compile Include="Design\ProgramViews.cs"> - <SubType>UserControl</SubType> - </Compile> <Compile Include="Design\SetupForm.cs"> <SubType>Form</SubType> </Compile> <Compile Include="Design\SetupForm.Designer.cs"> <DependentUpon>SetupForm.cs</DependentUpon> </Compile> + <Compile Include="Design\ProgramViews.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="Design\ProgramViews.Designer.cs"> + <DependentUpon>ProgramViews.cs</DependentUpon> + </Compile> <Compile Include="FileItems\FileItem.cs" /> <Compile Include="FileItems\FileItemInfo.cs" /> <Compile Include="FileItems\FileItemList.cs" /> @@ -199,14 +202,14 @@ <SubType>Designer</SubType> <DependentUpon>FileInfoScraperForm.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Design\ProgramViews.resx"> - <DependentUpon>ProgramViews.cs</DependentUpon> - <SubType>Designer</SubType> - </EmbeddedResource> <EmbeddedResource Include="Design\SetupForm.resx"> <DependentUpon>SetupForm.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> + <EmbeddedResource Include="Design\ProgramViews.resx"> + <SubType>Designer</SubType> + <DependentUpon>ProgramViews.cs</DependentUpon> + </EmbeddedResource> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-14 12:34:00
|
Revision: 546 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=546&view=rev Author: chef_koch Date: 2007-06-14 05:33:58 -0700 (Thu, 14 Jun 2007) Log Message: ----------- code cleanup Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs 2007-06-14 12:33:58 UTC (rev 546) @@ -0,0 +1,564 @@ +namespace GUIPrograms.Design +{ + partial class FileDetailsForm + { + /// <summary> + /// Erforderliche Designervariable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Verwendete Ressourcen bereinigen. + /// </summary> + /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// <summary> + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileDetailsForm)); + this.gameinfoURLTextBox = new System.Windows.Forms.TextBox(); + this.gameInfoURLLabel = new System.Windows.Forms.Label(); + this.buttonViewImg = new MediaPortal.UserInterface.Controls.MPButton(); + this.txtFilepath = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.btnOk = new MediaPortal.UserInterface.Controls.MPButton(); + 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.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.lblImageFile = new MediaPortal.UserInterface.Controls.MPLabel(); + this.btnImageFile = new MediaPortal.UserInterface.Controls.MPButton(); + this.txtFilename = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.txtImageFile = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.txtTitle = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.lblTitle = new MediaPortal.UserInterface.Controls.MPLabel(); + this.lblFilename = new MediaPortal.UserInterface.Controls.MPLabel(); + this.btnFilename = new MediaPortal.UserInterface.Controls.MPButton(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.tcFileItemData = new MediaPortal.UserInterface.Controls.MPTabControl(); + this.tabPage1 = new MediaPortal.UserInterface.Controls.MPTabPage(); + 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.SuspendLayout(); + // + // gameinfoURLTextBox + // + this.gameinfoURLTextBox.Location = new System.Drawing.Point(96, 295); + this.gameinfoURLTextBox.Name = "gameinfoURLTextBox"; + this.gameinfoURLTextBox.Size = new System.Drawing.Size(372, 21); + this.gameinfoURLTextBox.TabIndex = 66; + // + // gameInfoURLLabel + // + this.gameInfoURLLabel.Location = new System.Drawing.Point(8, 295); + this.gameInfoURLLabel.Name = "gameInfoURLLabel"; + this.gameInfoURLLabel.Size = new System.Drawing.Size(82, 22); + this.gameInfoURLLabel.TabIndex = 65; + this.gameInfoURLLabel.Text = "Gameinfo URL:"; + // + // buttonViewImg + // + this.buttonViewImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonViewImg.Image = ((System.Drawing.Image)(resources.GetObject("buttonViewImg.Image"))); + this.buttonViewImg.Location = new System.Drawing.Point(440, 103); + this.buttonViewImg.Name = "buttonViewImg"; + this.buttonViewImg.Size = new System.Drawing.Size(20, 22); + this.buttonViewImg.TabIndex = 64; + this.toolTip1.SetToolTip(this.buttonViewImg, "View the default image for this file"); + this.buttonViewImg.UseVisualStyleBackColor = true; + this.buttonViewImg.Click += new System.EventHandler(this.buttonViewImg_Click); + // + // txtFilepath + // + this.txtFilepath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtFilepath.BorderColor = System.Drawing.Color.Empty; + this.txtFilepath.Location = new System.Drawing.Point(96, 78); + this.txtFilepath.Name = "txtFilepath"; + this.txtFilepath.ReadOnly = true; + this.txtFilepath.Size = new System.Drawing.Size(373, 21); + this.txtFilepath.TabIndex = 62; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(8, 80); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(64, 17); + this.label1.TabIndex = 63; + this.label1.Text = "Filepath:"; + // + // btnOk + // + this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnOk.Location = new System.Drawing.Point(349, 517); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(80, 25); + this.btnOk.TabIndex = 4; + this.btnOk.Text = "OK"; + this.btnOk.UseVisualStyleBackColor = true; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // cbRating + // + this.cbRating.BorderColor = System.Drawing.Color.Empty; + this.cbRating.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbRating.Items.AddRange(new object[] { + "0 - poor", + "1", + "2", + "3", + "4", + "5 - average", + "6", + "7", + "8", + "9", + "10 - perfect"}); + this.cbRating.Location = new System.Drawing.Point(276, 206); + this.cbRating.Name = "cbRating"; + this.cbRating.Size = new System.Drawing.Size(192, 21); + this.cbRating.TabIndex = 8; + // + // txtOverview + // + this.txtOverview.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.txtOverview.BorderColor = System.Drawing.Color.Empty; + this.txtOverview.Location = new System.Drawing.Point(8, 339); + this.txtOverview.Multiline = true; + this.txtOverview.Name = "txtOverview"; + this.txtOverview.ScrollBars = System.Windows.Forms.ScrollBars.Both; + this.txtOverview.Size = new System.Drawing.Size(489, 99); + this.txtOverview.TabIndex = 11; + this.txtOverview.Text = "txtOverview"; + // + // lblOverview + // + this.lblOverview.Location = new System.Drawing.Point(8, 319); + this.lblOverview.Name = "lblOverview"; + this.lblOverview.Size = new System.Drawing.Size(100, 17); + 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(96, 261); + this.txtSystem.Name = "txtSystem"; + this.txtSystem.Size = new System.Drawing.Size(373, 21); + this.txtSystem.TabIndex = 10; + // + // lblSystem + // + this.lblSystem.Location = new System.Drawing.Point(8, 265); + this.lblSystem.Name = "lblSystem"; + this.lblSystem.Size = new System.Drawing.Size(64, 17); + this.lblSystem.TabIndex = 59; + this.lblSystem.Text = "System:"; + // + // txtCountry + // + this.txtCountry.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtCountry.BorderColor = System.Drawing.Color.Empty; + this.txtCountry.Location = new System.Drawing.Point(96, 235); + this.txtCountry.Name = "txtCountry"; + this.txtCountry.Size = new System.Drawing.Size(373, 21); + this.txtCountry.TabIndex = 9; + // + // lblCountry + // + this.lblCountry.Location = new System.Drawing.Point(8, 239); + this.lblCountry.Name = "lblCountry"; + this.lblCountry.Size = new System.Drawing.Size(72, 17); + 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.Location = new System.Drawing.Point(223, 209); + this.lblRating.Name = "lblRating"; + this.lblRating.Size = new System.Drawing.Size(47, 17); + this.lblRating.TabIndex = 55; + this.lblRating.Text = "Rating:"; + // + // gbFileDetails + // + 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.gameinfoURLTextBox); + this.gbFileDetails.Controls.Add(this.gameInfoURLLabel); + this.gbFileDetails.Controls.Add(this.buttonViewImg); + this.gbFileDetails.Controls.Add(this.txtFilepath); + this.gbFileDetails.Controls.Add(this.label1); + 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.lblImageFile); + this.gbFileDetails.Controls.Add(this.btnImageFile); + this.gbFileDetails.Controls.Add(this.txtFilename); + this.gbFileDetails.Controls.Add(this.txtImageFile); + this.gbFileDetails.Controls.Add(this.txtTitle); + this.gbFileDetails.Controls.Add(this.lblTitle); + this.gbFileDetails.Controls.Add(this.lblFilename); + this.gbFileDetails.Controls.Add(this.btnFilename); + this.gbFileDetails.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.gbFileDetails.Location = new System.Drawing.Point(8, 9); + this.gbFileDetails.Name = "gbFileDetails"; + this.gbFileDetails.Size = new System.Drawing.Size(505, 449); + this.gbFileDetails.TabIndex = 1; + this.gbFileDetails.TabStop = false; + // + // txtYear + // + this.txtYear.BorderColor = System.Drawing.Color.Empty; + this.txtYear.Location = new System.Drawing.Point(96, 209); + this.txtYear.MaxLength = 4; + this.txtYear.Name = "txtYear"; + this.txtYear.Size = new System.Drawing.Size(48, 21); + this.txtYear.TabIndex = 7; + // + // lblYear + // + this.lblYear.Location = new System.Drawing.Point(8, 209); + this.lblYear.Name = "lblYear"; + this.lblYear.Size = new System.Drawing.Size(64, 17); + 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(96, 183); + this.txtManufacturer.Name = "txtManufacturer"; + this.txtManufacturer.Size = new System.Drawing.Size(373, 21); + this.txtManufacturer.TabIndex = 6; + // + // lblManufacturer + // + this.lblManufacturer.Location = new System.Drawing.Point(8, 183); + this.lblManufacturer.Name = "lblManufacturer"; + this.lblManufacturer.Size = new System.Drawing.Size(80, 17); + this.lblManufacturer.TabIndex = 51; + this.lblManufacturer.Text = "Manufacturer:"; + // + // txtGenre + // + 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(96, 129); + this.txtGenre.Multiline = true; + this.txtGenre.Name = "txtGenre"; + this.txtGenre.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.txtGenre.Size = new System.Drawing.Size(373, 52); + this.txtGenre.TabIndex = 5; + // + // lblGenre + // + this.lblGenre.Location = new System.Drawing.Point(8, 134); + this.lblGenre.Name = "lblGenre"; + this.lblGenre.Size = new System.Drawing.Size(64, 17); + this.lblGenre.TabIndex = 49; + this.lblGenre.Text = "Genre:"; + // + // lblImageFile + // + this.lblImageFile.Location = new System.Drawing.Point(8, 108); + this.lblImageFile.Name = "lblImageFile"; + this.lblImageFile.Size = new System.Drawing.Size(64, 17); + this.lblImageFile.TabIndex = 47; + this.lblImageFile.Text = "Imagefile:"; + // + // btnImageFile + // + this.btnImageFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnImageFile.Image = ((System.Drawing.Image)(resources.GetObject("btnImageFile.Image"))); + this.btnImageFile.Location = new System.Drawing.Point(476, 103); + this.btnImageFile.Name = "btnImageFile"; + this.btnImageFile.Size = new System.Drawing.Size(20, 22); + this.btnImageFile.TabIndex = 4; + this.btnImageFile.UseVisualStyleBackColor = true; + this.btnImageFile.Click += new System.EventHandler(this.btnImageFile_Click); + // + // txtFilename + // + this.txtFilename.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtFilename.BorderColor = System.Drawing.Color.Empty; + this.txtFilename.Location = new System.Drawing.Point(96, 52); + this.txtFilename.Name = "txtFilename"; + this.txtFilename.Size = new System.Drawing.Size(373, 21); + this.txtFilename.TabIndex = 1; + // + // txtImageFile + // + this.txtImageFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtImageFile.BorderColor = System.Drawing.Color.Empty; + this.txtImageFile.Location = new System.Drawing.Point(96, 103); + this.txtImageFile.Name = "txtImageFile"; + this.txtImageFile.Size = new System.Drawing.Size(351, 21); + this.txtImageFile.TabIndex = 3; + // + // txtTitle + // + this.txtTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtTitle.BorderColor = System.Drawing.Color.Empty; + this.txtTitle.Location = new System.Drawing.Point(96, 26); + this.txtTitle.Name = "txtTitle"; + this.txtTitle.Size = new System.Drawing.Size(373, 21); + this.txtTitle.TabIndex = 0; + // + // lblTitle + // + this.lblTitle.Location = new System.Drawing.Point(8, 30); + this.lblTitle.Name = "lblTitle"; + this.lblTitle.Size = new System.Drawing.Size(56, 17); + this.lblTitle.TabIndex = 46; + this.lblTitle.Text = "Title:"; + // + // lblFilename + // + this.lblFilename.Location = new System.Drawing.Point(8, 54); + this.lblFilename.Name = "lblFilename"; + this.lblFilename.Size = new System.Drawing.Size(64, 17); + this.lblFilename.TabIndex = 45; + this.lblFilename.Text = "Filename:"; + // + // btnFilename + // + this.btnFilename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnFilename.Image = ((System.Drawing.Image)(resources.GetObject("btnFilename.Image"))); + this.btnFilename.Location = new System.Drawing.Point(476, 52); + this.btnFilename.Name = "btnFilename"; + this.btnFilename.Size = new System.Drawing.Size(20, 21); + this.btnFilename.TabIndex = 2; + this.btnFilename.UseVisualStyleBackColor = true; + this.btnFilename.Click += new System.EventHandler(this.btnFilename_Click); + // + // tcFileItemData + // + this.tcFileItemData.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.tcFileItemData.Controls.Add(this.tabPage1); + this.tcFileItemData.Controls.Add(this.tabPage2); + this.tcFileItemData.Location = new System.Drawing.Point(4, 8); + this.tcFileItemData.Name = "tcFileItemData"; + this.tcFileItemData.SelectedIndex = 0; + this.tcFileItemData.Size = new System.Drawing.Size(529, 492); + this.tcFileItemData.TabIndex = 6; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.gbFileDetails); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Size = new System.Drawing.Size(521, 466); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Properties"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // btnCancel + // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(437, 517); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 25); + this.btnCancel.TabIndex = 5; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + // + // Form1 + // + this.AcceptButton = this.btnOk; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(537, 551); + this.Controls.Add(this.btnOk); + this.Controls.Add(this.tcFileItemData); + this.Controls.Add(this.btnCancel); + this.Name = "Form1"; + this.ShowIcon = false; + 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.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TextBox gameinfoURLTextBox; + private System.Windows.Forms.Label gameInfoURLLabel; + private MediaPortal.UserInterface.Controls.MPButton buttonViewImg; + private System.Windows.Forms.ToolTip toolTip1; + private MediaPortal.UserInterface.Controls.MPTextBox txtFilepath; + private MediaPortal.UserInterface.Controls.MPLabel label1; + private MediaPortal.UserInterface.Controls.MPButton btnOk; + 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 lblImageFile; + private MediaPortal.UserInterface.Controls.MPButton btnImageFile; + private MediaPortal.UserInterface.Controls.MPTextBox txtFilename; + private MediaPortal.UserInterface.Controls.MPTextBox txtImageFile; + private MediaPortal.UserInterface.Controls.MPTextBox txtTitle; + private MediaPortal.UserInterface.Controls.MPLabel lblTitle; + private MediaPortal.UserInterface.Controls.MPLabel lblFilename; + private MediaPortal.UserInterface.Controls.MPButton btnFilename; + private MediaPortal.UserInterface.Controls.MPTabControl tcFileItemData; + private MediaPortal.UserInterface.Controls.MPTabPage tabPage1; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private MediaPortal.UserInterface.Controls.MPButton btnCancel; + } +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-06-14 12:08:38 UTC (rev 545) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs 2007-06-14 12:33:58 UTC (rev 546) @@ -30,64 +30,18 @@ using System.Windows.Forms; using Core.Util; - using GUIPrograms; -using GUIPrograms.Database; using GUIPrograms.ApplicationItems; +using GUIPrograms.Database; using GUIPrograms.FileItems; - namespace GUIPrograms.Design { - /// <summary> - /// Summary description for FileDetailsForm. - /// </summary> - public class FileDetailsForm : Form + public partial class FileDetailsForm : Form { private ApplicationItem m_CurApp; private FileItem m_CurFile; private ConditionChecker conditionChecker; - private OpenFileDialog openFileDialog1; - private ToolTip toolTip1; - private MediaPortal.UserInterface.Controls.MPButton btnOk; - private MediaPortal.UserInterface.Controls.MPButton btnCancel; - private MediaPortal.UserInterface.Controls.MPTabPage tabPage1; - private MediaPortal.UserInterface.Controls.MPTabPage tabPage2; - private MediaPortal.UserInterface.Controls.MPTabControl tcFileItemData; - private MediaPortal.UserInterface.Controls.MPGroupBox gbFileDetails; - private MediaPortal.UserInterface.Controls.MPButton buttonViewImg; - private MediaPortal.UserInterface.Controls.MPTextBox txtFilepath; - private MediaPortal.UserInterface.Controls.MPLabel label1; - 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.MPLabel lblRating; - 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 lblImageFile; - private MediaPortal.UserInterface.Controls.MPButton btnImageFile; - private MediaPortal.UserInterface.Controls.MPTextBox txtFilename; - private MediaPortal.UserInterface.Controls.MPTextBox txtImageFile; - private MediaPortal.UserInterface.Controls.MPTextBox txtTitle; - private MediaPortal.UserInterface.Controls.MPLabel lblTitle; - private MediaPortal.UserInterface.Controls.MPLabel lblFilename; - private MediaPortal.UserInterface.Controls.MPButton btnFilename; - private MediaPortal.UserInterface.Controls.MPGroupBox gbExtended; - private MediaPortal.UserInterface.Controls.MPLabel lblTagData; - private MediaPortal.UserInterface.Controls.MPLabel lblCategoryData; - private MediaPortal.UserInterface.Controls.MPTextBox txtTagData; - private MediaPortal.UserInterface.Controls.MPTextBox txtCategoryData; - private TextBox gameinfoURLTextBox; - private Label gameInfoURLLabel; - private IContainer components; public ApplicationItem CurApp { @@ -115,525 +69,12 @@ public FileDetailsForm() { - // // Required for Windows Form Designer support - // InitializeComponent(); - conditionChecker = new ConditionChecker(); + conditionChecker = new ConditionChecker(); } - /// <summary> - /// Clean up any resources being used. - /// </summary> - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (components != null) - { - components.Dispose(); - } - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileDetailsForm)); - this.btnOk = new MediaPortal.UserInterface.Controls.MPButton(); - this.btnCancel = new MediaPortal.UserInterface.Controls.MPButton(); - this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.buttonViewImg = new MediaPortal.UserInterface.Controls.MPButton(); - this.tcFileItemData = new MediaPortal.UserInterface.Controls.MPTabControl(); - this.tabPage1 = new MediaPortal.UserInterface.Controls.MPTabPage(); - this.gbFileDetails = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.gameinfoURLTextBox = new System.Windows.Forms.TextBox(); - this.gameInfoURLLabel = new System.Windows.Forms.Label(); - this.txtFilepath = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); - 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.lblRating = new MediaPortal.UserInterface.Controls.MPLabel(); - 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.lblImageFile = new MediaPortal.UserInterface.Controls.MPLabel(); - this.btnImageFile = new MediaPortal.UserInterface.Controls.MPButton(); - this.txtFilename = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.txtImageFile = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.txtTitle = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lblTitle = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lblFilename = new MediaPortal.UserInterface.Controls.MPLabel(); - this.btnFilename = new MediaPortal.UserInterface.Controls.MPButton(); - this.tabPage2 = new MediaPortal.UserInterface.Controls.MPTabPage(); - this.gbExtended = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.txtCategoryData = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lblCategoryData = new MediaPortal.UserInterface.Controls.MPLabel(); - this.txtTagData = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lblTagData = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tcFileItemData.SuspendLayout(); - this.tabPage1.SuspendLayout(); - this.gbFileDetails.SuspendLayout(); - this.tabPage2.SuspendLayout(); - this.gbExtended.SuspendLayout(); - this.SuspendLayout(); - // - // btnOk - // - this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOk.Location = new System.Drawing.Point(353, 521); - this.btnOk.Name = "btnOk"; - this.btnOk.Size = new System.Drawing.Size(80, 23); - this.btnOk.TabIndex = 1; - this.btnOk.Text = "OK"; - this.btnOk.UseVisualStyleBackColor = true; - this.btnOk.Click += new System.EventHandler(this.btnOk_Click); - // - // btnCancel - // - this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(441, 521); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 2; - this.btnCancel.Text = "Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - // - // buttonViewImg - // - this.buttonViewImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonViewImg.Image = ((System.Drawing.Image)(resources.GetObject("buttonViewImg.Image"))); - this.buttonViewImg.Location = new System.Drawing.Point(440, 96); - this.buttonViewImg.Name = "buttonViewImg"; - this.buttonViewImg.Size = new System.Drawing.Size(20, 20); - this.buttonViewImg.TabIndex = 64; - this.toolTip1.SetToolTip(this.buttonViewImg, "View the default image for this file"); - this.buttonViewImg.UseVisualStyleBackColor = true; - this.buttonViewImg.Click += new System.EventHandler(this.buttonViewImg_Click); - // - // tcFileItemData - // - this.tcFileItemData.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.tcFileItemData.Controls.Add(this.tabPage1); - this.tcFileItemData.Controls.Add(this.tabPage2); - this.tcFileItemData.Location = new System.Drawing.Point(8, 8); - this.tcFileItemData.Name = "tcFileItemData"; - this.tcFileItemData.SelectedIndex = 0; - this.tcFileItemData.Size = new System.Drawing.Size(529, 497); - this.tcFileItemData.TabIndex = 3; - // - // tabPage1 - // - this.tabPage1.Controls.Add(this.gbFileDetails); - this.tabPage1.Location = new System.Drawing.Point(4, 22); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.Size = new System.Drawing.Size(521, 471); - this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Properties"; - this.tabPage1.UseVisualStyleBackColor = true; - // - // gbFileDetails - // - 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.gameinfoURLTextBox); - this.gbFileDetails.Controls.Add(this.gameInfoURLLabel); - this.gbFileDetails.Controls.Add(this.buttonViewImg); - this.gbFileDetails.Controls.Add(this.txtFilepath); - this.gbFileDetails.Controls.Add(this.label1); - 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.lblImageFile); - this.gbFileDetails.Controls.Add(this.btnImageFile); - this.gbFileDetails.Controls.Add(this.txtFilename); - this.gbFileDetails.Controls.Add(this.txtImageFile); - this.gbFileDetails.Controls.Add(this.txtTitle); - this.gbFileDetails.Controls.Add(this.lblTitle); - this.gbFileDetails.Controls.Add(this.lblFilename); - this.gbFileDetails.Controls.Add(this.btnFilename); - this.gbFileDetails.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbFileDetails.Location = new System.Drawing.Point(8, 8); - this.gbFileDetails.Name = "gbFileDetails"; - this.gbFileDetails.Size = new System.Drawing.Size(505, 457); - this.gbFileDetails.TabIndex = 1; - this.gbFileDetails.TabStop = false; - // - // gameinfoURLTextBox - // - this.gameinfoURLTextBox.Location = new System.Drawing.Point(96, 274); - this.gameinfoURLTextBox.Name = "gameinfoURLTextBox"; - this.gameinfoURLTextBox.Size = new System.Drawing.Size(372, 20); - this.gameinfoURLTextBox.TabIndex = 66; - // - // gameInfoURLLabel - // - this.gameInfoURLLabel.Location = new System.Drawing.Point(8, 274); - this.gameInfoURLLabel.Name = "gameInfoURLLabel"; - this.gameInfoURLLabel.Size = new System.Drawing.Size(82, 20); - this.gameInfoURLLabel.TabIndex = 65; - this.gameInfoURLLabel.Text = "Gameinfo URL:"; - // - // txtFilepath - // - this.txtFilepath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtFilepath.BorderColor = System.Drawing.Color.Empty; - this.txtFilepath.Location = new System.Drawing.Point(96, 72); - this.txtFilepath.Name = "txtFilepath"; - this.txtFilepath.ReadOnly = true; - this.txtFilepath.Size = new System.Drawing.Size(373, 20); - this.txtFilepath.TabIndex = 62; - // - // label1 - // - this.label1.Location = new System.Drawing.Point(8, 74); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(64, 16); - this.label1.TabIndex = 63; - this.label1.Text = "Filepath:"; - // - // cbRating - // - this.cbRating.BorderColor = System.Drawing.Color.Empty; - this.cbRating.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbRating.Items.AddRange(new object[] { - "0 - poor", - "1", - "2", - "3", - "4", - "5 - average", - "6", - "7", - "8", - "9", - "10 - perfect"}); - this.cbRating.Location = new System.Drawing.Point(276, 191); - this.cbRating.Name = "cbRating"; - this.cbRating.Size = new System.Drawing.Size(192, 21); - this.cbRating.TabIndex = 8; - // - // txtOverview - // - this.txtOverview.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.txtOverview.BorderColor = System.Drawing.Color.Empty; - this.txtOverview.Location = new System.Drawing.Point(8, 315); - this.txtOverview.Multiline = true; - this.txtOverview.Name = "txtOverview"; - this.txtOverview.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtOverview.Size = new System.Drawing.Size(489, 132); - this.txtOverview.TabIndex = 11; - this.txtOverview.Text = "txtOverview"; - // - // lblOverview - // - this.lblOverview.Location = new System.Drawing.Point(8, 296); - this.lblOverview.Name = "lblOverview"; - this.lblOverview.Size = new System.Drawing.Size(100, 16); - 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(96, 242); - this.txtSystem.Name = "txtSystem"; - this.txtSystem.Size = new System.Drawing.Size(373, 20); - this.txtSystem.TabIndex = 10; - // - // lblSystem - // - this.lblSystem.Location = new System.Drawing.Point(8, 246); - this.lblSystem.Name = "lblSystem"; - this.lblSystem.Size = new System.Drawing.Size(64, 16); - this.lblSystem.TabIndex = 59; - this.lblSystem.Text = "System:"; - // - // txtCountry - // - this.txtCountry.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtCountry.BorderColor = System.Drawing.Color.Empty; - this.txtCountry.Location = new System.Drawing.Point(96, 218); - this.txtCountry.Name = "txtCountry"; - this.txtCountry.Size = new System.Drawing.Size(373, 20); - this.txtCountry.TabIndex = 9; - // - // lblCountry - // - this.lblCountry.Location = new System.Drawing.Point(8, 222); - this.lblCountry.Name = "lblCountry"; - this.lblCountry.Size = new System.Drawing.Size(72, 16); - this.lblCountry.TabIndex = 57; - this.lblCountry.Text = "Country:"; - // - // lblRating - // - this.lblRating.Location = new System.Drawing.Point(223, 194); - this.lblRating.Name = "lblRating"; - this.lblRating.Size = new System.Drawing.Size(47, 16); - this.lblRating.TabIndex = 55; - this.lblRating.Text = "Rating:"; - // - // txtYear - // - this.txtYear.BorderColor = System.Drawing.Color.Empty; - this.txtYear.Location = new System.Drawing.Point(96, 194); - this.txtYear.MaxLength = 4; - this.txtYear.Name = "txtYear"; - this.txtYear.Size = new System.Drawing.Size(48, 20); - this.txtYear.TabIndex = 7; - // - // lblYear - // - this.lblYear.Location = new System.Drawing.Point(8, 194); - this.lblYear.Name = "lblYear"; - this.lblYear.Size = new System.Drawing.Size(64, 16); - 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(96, 170); - this.txtManufacturer.Name = "txtManufacturer"; - this.txtManufacturer.Size = new System.Drawing.Size(373, 20); - this.txtManufacturer.TabIndex = 6; - // - // lblManufacturer - // - this.lblManufacturer.Location = new System.Drawing.Point(8, 170); - this.lblManufacturer.Name = "lblManufacturer"; - this.lblManufacturer.Size = new System.Drawing.Size(80, 16); - this.lblManufacturer.TabIndex = 51; - this.lblManufacturer.Text = "Manufacturer:"; - // - // txtGenre - // - 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(96, 120); - this.txtGenre.Multiline = true; - this.txtGenre.Name = "txtGenre"; - this.txtGenre.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtGenre.Size = new System.Drawing.Size(373, 48); - this.txtGenre.TabIndex = 5; - // - // lblGenre - // - this.lblGenre.Location = new System.Drawing.Point(8, 124); - this.lblGenre.Name = "lblGenre"; - this.lblGenre.Size = new System.Drawing.Size(64, 16); - this.lblGenre.TabIndex = 49; - this.lblGenre.Text = "Genre:"; - // - // lblImageFile - // - this.lblImageFile.Location = new System.Drawing.Point(8, 100); - this.lblImageFile.Name = "lblImageFile"; - this.lblImageFile.Size = new System.Drawing.Size(64, 16); - this.lblImageFile.TabIndex = 47; - this.lblImageFile.Text = "Imagefile:"; - // - // btnImageFile - // - this.btnImageFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnImageFile.Image = ((System.Drawing.Image)(resources.GetObject("btnImageFile.Image"))); - this.btnImageFile.Location = new System.Drawing.Point(476, 96); - this.btnImageFile.Name = "btnImageFile"; - this.btnImageFile.Size = new System.Drawing.Size(20, 20); - this.btnImageFile.TabIndex = 4; - this.btnImageFile.UseVisualStyleBackColor = true; - this.btnImageFile.Click += new System.EventHandler(this.btnImageFile_Click); - // - // txtFilename - // - this.txtFilename.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtFilename.BorderColor = System.Drawing.Color.Empty; - this.txtFilename.Location = new System.Drawing.Point(96, 48); - this.txtFilename.Name = "txtFilename"; - this.txtFilename.Size = new System.Drawing.Size(373, 20); - this.txtFilename.TabIndex = 1; - // - // txtImageFile - // - this.txtImageFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtImageFile.BorderColor = System.Drawing.Color.Empty; - this.txtImageFile.Location = new System.Drawing.Point(96, 96); - this.txtImageFile.Name = "txtImageFile"; - this.txtImageFile.Size = new System.Drawing.Size(351, 20); - this.txtImageFile.TabIndex = 3; - // - // txtTitle - // - this.txtTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtTitle.BorderColor = System.Drawing.Color.Empty; - this.txtTitle.Location = new System.Drawing.Point(96, 24); - this.txtTitle.Name = "txtTitle"; - this.txtTitle.Size = new System.Drawing.Size(373, 20); - this.txtTitle.TabIndex = 0; - // - // lblTitle - // - this.lblTitle.Location = new System.Drawing.Point(8, 28); - this.lblTitle.Name = "lblTitle"; - this.lblTitle.Size = new System.Drawing.Size(56, 16); - this.lblTitle.TabIndex = 46; - this.lblTitle.Text = "Title:"; - // - // lblFilename - // - this.lblFilename.Location = new System.Drawing.Point(8, 50); - this.lblFilename.Name = "lblFilename"; - this.lblFilename.Size = new System.Drawing.Size(64, 16); - this.lblFilename.TabIndex = 45; - this.lblFilename.Text = "Filename:"; - // - // btnFilename - // - this.btnFilename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnFilename.Image = ((System.Drawing.Image)(resources.GetObject("btnFilename.Image"))); - this.btnFilename.Location = new System.Drawing.Point(476, 48); - this.btnFilename.Name = "btnFilename"; - this.btnFilename.Size = new System.Drawing.Size(20, 20); - this.btnFilename.TabIndex = 2; - this.btnFilename.UseVisualStyleBackColor = true; - this.btnFilename.Click += new System.EventHandler(this.btnFilename_Click); - // - // 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, 471); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "Extended"; - this.tabPage2.UseVisualStyleBackColor = true; - // - // 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, 8); - this.gbExtended.Name = "gbExtended"; - this.gbExtended.Size = new System.Drawing.Size(505, 457); - this.gbExtended.TabIndex = 0; - this.gbExtended.TabStop = false; - // - // 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, 224); - this.txtCategoryData.Multiline = true; - this.txtCategoryData.Name = "txtCategoryData"; - this.txtCategoryData.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtCategoryData.Size = new System.Drawing.Size(489, 225); - this.txtCategoryData.TabIndex = 64; - // - // lblCategoryData - // - this.lblCategoryData.Location = new System.Drawing.Point(8, 200); - this.lblCategoryData.Name = "lblCategoryData"; - this.lblCategoryData.Size = new System.Drawing.Size(100, 16); - this.lblCategoryData.TabIndex = 65; - this.lblCategoryData.Text = "Category-Data:"; - // - // 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, 32); - this.txtTagData.Multiline = true; - this.txtTagData.Name = "txtTagData"; - this.txtTagData.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtTagData.Size = new System.Drawing.Size(489, 144); - this.txtTagData.TabIndex = 62; - // - // lblTagData - // - this.lblTagData.Location = new System.Drawing.Point(8, 16); - this.lblTagData.Name = "lblTagData"; - this.lblTagData.Size = new System.Drawing.Size(100, 16); - this.lblTagData.TabIndex = 63; - this.lblTagData.Text = "Tag-Data:"; - // - // FileDetailsForm - // - this.AcceptButton = this.btnOk; - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(539, 553); - this.Controls.Add(this.tcFileItemData); - this.Controls.Add(this.btnOk); - this.Controls.Add(this.btnCancel); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "FileDetailsForm"; - this.Text = "File-Details"; - this.Load += new System.EventHandler(this.FileDetailsForm_Load); - this.tcFileItemData.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); - this.gbFileDetails.ResumeLayout(false); - this.gbFileDetails.PerformLayout(); - this.tabPage2.ResumeLayout(false); - this.gbExtended.ResumeLayout(false); - this.gbExtended.PerformLayout(); - this.ResumeLayout(false); - - } - #endregion - private void updateDisplay() { gbFileDetails.Text = CurApp.Title + ": " + CurFile.Title; @@ -693,7 +134,6 @@ } } - private bool EntriesOK() { conditionChecker.Clear(); @@ -772,6 +212,5 @@ // do nothing! } } - } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.resx 2007-06-14 12:08:38 UTC (rev 545) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.resx 2007-06-14 12:33:58 UTC (rev 546) @@ -117,33 +117,30 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>147, 17</value> - </metadata> <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="buttonViewImg.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> Qk2qAwAAAAAAADYAAAAoAAAAEQAAABEAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA2Ons2Ons - 2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2OnsANjp7ICAgAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjp7ADY6eyAgIAA//8AgAAAgAAA//8AAAAA - //8AgAAAAAAAgAAA//8AAAD//wAA//8AAADY6ewA2OnsgICAAAAAAP////8AAAAAAP//AIAAAAAA//8A - AP//AAAAAIAAAP//AAAAAAAA2OnsANjp7ICAgP//AAAAAAD//wCAAP//AACAAAD//wCAgAAAAACAAAD/ - /wAAAP//AAAAANjp7ADY6eyAgID//////wAAAAAA//8A//8AAAAAgAAAAAAA//8AgAAAAAD//wD///8A - AADY6ewA2OnsgICA//8A//////8AAAAA//8AAP//AAAA////AAAAAAAA//8A//////8AAAAA2OnsANjp - 7ICAgP//////AP//////AAAAAAAAAP//////AP//////AP//////AP///wAAANjp7ADY6eyAgID//wD/ - /////wD//////wD//////wD//////wD//////wD//////wAAAADY6ewA2OnsgICA//////8A//////8A - //////8A//////8A////AAAAAAAA//8A////AAAA2OnsANjp7ICAgP//AP//////AP... [truncated message content] |
From: <che...@us...> - 2007-06-14 12:46:14
|
Revision: 547 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=547&view=rev Author: chef_koch Date: 2007-06-14 05:46:12 -0700 (Thu, 14 Jun 2007) Log Message: ----------- yet another code cleanup ;) Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.Designer.cs Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.Designer.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.Designer.cs 2007-06-14 12:46:12 UTC (rev 547) @@ -0,0 +1,181 @@ +namespace GUIPrograms.Design +{ + partial class AppSettingsPrePost + { + /// <summary> + /// Erforderliche Designervariable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Verwendete Ressourcen bereinigen. + /// </summary> + /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// <summary> + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// </summary> + private void InitializeComponent() + { + this.lblPre = new MediaPortal.UserInterface.Controls.MPLabel(); + this.lblTitle = new MediaPortal.UserInterface.Controls.MPLabel(); + this.btnOk = new MediaPortal.UserInterface.Controls.MPButton(); + this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.gbData = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.tbPost = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.tbPre = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.btnCancel = new MediaPortal.UserInterface.Controls.MPButton(); + this.lblTitleData = new MediaPortal.UserInterface.Controls.MPLabel(); + this.gbData.SuspendLayout(); + this.SuspendLayout(); + // + // lblPre + // + this.lblPre.Location = new System.Drawing.Point(8, 26); + this.lblPre.Name = "lblPre"; + this.lblPre.Size = new System.Drawing.Size(100, 17); + this.lblPre.TabIndex = 2; + this.lblPre.Text = "Pre-Execute"; + // + // lblTitle + // + this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblTitle.Location = new System.Drawing.Point(16, 12); + this.lblTitle.Name = "lblTitle"; + this.lblTitle.Size = new System.Drawing.Size(72, 26); + this.lblTitle.TabIndex = 11; + this.lblTitle.Text = "Application: "; + // + // btnOk + // + this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; + this.btnOk.Location = new System.Drawing.Point(248, 369); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(80, 25); + this.btnOk.TabIndex = 9; + this.btnOk.Text = "OK"; + this.btnOk.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Location = new System.Drawing.Point(8, 151); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(112, 17); + this.label1.TabIndex = 3; + this.label1.Text = "Post-Execute"; + // + // gbData + // + this.gbData.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.gbData.Controls.Add(this.label1); + this.gbData.Controls.Add(this.lblPre); + this.gbData.Controls.Add(this.tbPost); + this.gbData.Controls.Add(this.tbPre); + this.gbData.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.gbData.Location = new System.Drawing.Point(8, 47); + this.gbData.Name = "gbData"; + this.gbData.Size = new System.Drawing.Size(408, 305); + this.gbData.TabIndex = 8; + this.gbData.TabStop = false; + this.gbData.Text = "Commands to execute before / after launching"; + // + // tbPost + // + this.tbPost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbPost.BorderColor = System.Drawing.Color.Empty; + this.tbPost.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tbPost.Location = new System.Drawing.Point(8, 176); + this.tbPost.Multiline = true; + this.tbPost.Name = "tbPost"; + this.tbPost.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.tbPost.Size = new System.Drawing.Size(392, 120); + this.tbPost.TabIndex = 1; + this.tbPost.Text = "tbPost"; + // + // tbPre + // + this.tbPre.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.tbPre.BorderColor = System.Drawing.Color.Empty; + this.tbPre.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tbPre.Location = new System.Drawing.Point(8, 52); + this.tbPre.Multiline = true; + this.tbPre.Name = "tbPre"; + this.tbPre.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.tbPre.Size = new System.Drawing.Size(392, 81); + this.tbPre.TabIndex = 0; + this.tbPre.Text = "tbPre"; + // + // btnCancel + // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(336, 369); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 25); + this.btnCancel.TabIndex = 10; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + // + // lblTitleData + // + this.lblTitleData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblTitleData.Location = new System.Drawing.Point(91, 12); + this.lblTitleData.Name = "lblTitleData"; + this.lblTitleData.Size = new System.Drawing.Size(309, 17); + this.lblTitleData.TabIndex = 12; + this.lblTitleData.Text = "Title"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(424, 406); + this.Controls.Add(this.lblTitle); + this.Controls.Add(this.btnOk); + this.Controls.Add(this.gbData); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.lblTitleData); + this.Name = "Form1"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Pre-Launch / Post-Launch Options"; + this.gbData.ResumeLayout(false); + this.gbData.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private MediaPortal.UserInterface.Controls.MPLabel lblPre; + private MediaPortal.UserInterface.Controls.MPLabel lblTitle; + private MediaPortal.UserInterface.Controls.MPButton btnOk; + private MediaPortal.UserInterface.Controls.MPLabel label1; + private MediaPortal.UserInterface.Controls.MPGroupBox gbData; + private MediaPortal.UserInterface.Controls.MPTextBox tbPost; + private MediaPortal.UserInterface.Controls.MPTextBox tbPre; + private MediaPortal.UserInterface.Controls.MPButton btnCancel; + private MediaPortal.UserInterface.Controls.MPLabel lblTitleData; + } +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.cs 2007-06-14 12:33:58 UTC (rev 546) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.cs 2007-06-14 12:46:12 UTC (rev 547) @@ -31,35 +31,11 @@ namespace GUIPrograms.Design { - /// <summary> - /// Summary description for AppSettingsPrePost. - /// </summary> - public class AppSettingsPrePost : System.Windows.Forms.Form + public partial class AppSettingsPrePost : Form { - private MediaPortal.UserInterface.Controls.MPButton btnOk; - private MediaPortal.UserInterface.Controls.MPButton btnCancel; - private MediaPortal.UserInterface.Controls.MPGroupBox gbData; - private MediaPortal.UserInterface.Controls.MPLabel lblTitle; - private MediaPortal.UserInterface.Controls.MPTextBox tbPre; - private MediaPortal.UserInterface.Controls.MPTextBox tbPost; - private MediaPortal.UserInterface.Controls.MPLabel lblPre; - private MediaPortal.UserInterface.Controls.MPLabel label1; - private MediaPortal.UserInterface.Controls.MPLabel lblTitleData; - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.Container components = null; - public AppSettingsPrePost() { - // - // Required for Windows Form Designer support - // InitializeComponent(); - - // - // TODO: Add any constructor code after InitializeComponent call - // } public string Title @@ -79,158 +55,5 @@ get { return tbPost.Text; } set { tbPost.Text = value; } } - - /// <summary> - /// Clean up any resources being used. - /// </summary> - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (components != null) - { - components.Dispose(); - } - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AppSettingsPrePost)); - this.btnOk = new MediaPortal.UserInterface.Controls.MPButton(); - this.btnCancel = new MediaPortal.UserInterface.Controls.MPButton(); - this.gbData = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.lblTitle = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tbPre = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.tbPost = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lblPre = new MediaPortal.UserInterface.Controls.MPLabel(); - this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lblTitleData = new MediaPortal.UserInterface.Controls.MPLabel(); - this.gbData.SuspendLayout(); - this.SuspendLayout(); - // - // btnOk - // - this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOk.Location = new System.Drawing.Point(248, 376); - this.btnOk.Name = "btnOk"; - this.btnOk.Size = new System.Drawing.Size(80, 23); - this.btnOk.TabIndex = 1; - this.btnOk.Text = "OK"; - // - // btnCancel - // - this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(336, 376); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.TabIndex = 2; - this.btnCancel.Text = "Cancel"; - // - // gbData - // - this.gbData.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.gbData.Controls.Add(this.label1); - this.gbData.Controls.Add(this.lblPre); - this.gbData.Controls.Add(this.tbPost); - this.gbData.Controls.Add(this.tbPre); - this.gbData.Location = new System.Drawing.Point(8, 48); - this.gbData.Name = "gbData"; - this.gbData.Size = new System.Drawing.Size(408, 312); - this.gbData.TabIndex = 0; - this.gbData.TabStop = false; - this.gbData.Text = "Commands to execute before / after launching"; - // - // lblTitle - // - this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.lblTitle.Location = new System.Drawing.Point(16, 16); - this.lblTitle.Name = "lblTitle"; - this.lblTitle.Size = new System.Drawing.Size(72, 24); - this.lblTitle.TabIndex = 6; - this.lblTitle.Text = "Application: "; - // - // tbPre - // - this.tbPre.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.tbPre.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.tbPre.Location = new System.Drawing.Point(8, 48); - this.tbPre.Multiline = true; - this.tbPre.Name = "tbPre"; - this.tbPre.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.tbPre.Size = new System.Drawing.Size(392, 104); - this.tbPre.TabIndex = 0; - this.tbPre.Text = "tbPre"; - // - // tbPost - // - this.tbPost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tbPost.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.tbPost.Location = new System.Drawing.Point(8, 192); - this.tbPost.Multiline = true; - this.tbPost.Name = "tbPost"; - this.tbPost.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.tbPost.Size = new System.Drawing.Size(392, 112); - this.tbPost.TabIndex = 1; - this.tbPost.Text = "tbPost"; - // - // lblPre - // - this.lblPre.Location = new System.Drawing.Point(8, 24); - this.lblPre.Name = "lblPre"; - this.lblPre.Size = new System.Drawing.Size(100, 16); - this.lblPre.TabIndex = 2; - this.lblPre.Text = "Pre-Execute"; - // - // label1 - // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.label1.Location = new System.Drawing.Point(8, 169); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(112, 16); - this.label1.TabIndex = 3; - this.label1.Text = "Post-Execute"; - // - // lblTitleData - // - this.lblTitleData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblTitleData.Location = new System.Drawing.Point(91, 16); - this.lblTitleData.Name = "lblTitleData"; - this.lblTitleData.Size = new System.Drawing.Size(309, 16); - this.lblTitleData.TabIndex = 7; - this.lblTitleData.Text = "Title"; - // - // AppSettingsPrePost - // - this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(424, 406); - this.Controls.Add(this.lblTitleData); - this.Controls.Add(this.lblTitle); - this.Controls.Add(this.gbData); - this.Controls.Add(this.btnOk); - this.Controls.Add(this.btnCancel); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "AppSettingsPrePost"; - this.Text = "Pre-Launch / Post-Launch Options"; - this.gbData.ResumeLayout(false); - this.ResumeLayout(false); - - } - #endregion } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.resx 2007-06-14 12:33:58 UTC (rev 546) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsPrePost.resx 2007-06-14 12:46:12 UTC (rev 547) @@ -3,7 +3,7 @@ <!-- Microsoft ResX Schema - Version 1.3 + Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the @@ -14,16 +14,17 @@ ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">1.3</resheader> + <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1">this is my long string</data> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - [base64 mime encoded serialized .NET Framework object] + <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - [base64 mime encoded string representing a byte array form of the .NET Framework object] + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple @@ -35,7 +36,7 @@ Classes that don't support this are serialized and stored with the mimetype set. - The mimetype is used forserialized objects, and tells the + The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: @@ -45,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -59,18 +60,37 @@ : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> @@ -89,424 +109,12 @@ <value>text/microsoft-resx</value> </resheader> <resheader name="version"> - <value>1.3</value> + <value>2.0</value> </resheader> <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <data name="btnOk.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="btnOk.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="btnOk.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="btnCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="gbData.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="gbData.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>8, 8</value> - </data> - <data name="gbData.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="gbData.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="gbData.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="gbData.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="lblTitle.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="lblTitle.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="lblTitle.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="tbPre.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="tbPre.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="tbPre.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="tbPost.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="tbPost.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="tbPost.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="lblPre.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="lblPre.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="lblPre.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="lblTitleData.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="lblTitleData.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="lblTitleData.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>(Default)</value> - </data> - <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </data> - <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>8, 8</value> - </data> - <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>80</value> - </data> - <data name="$this.Name"> - <value>AppSettingsPrePost</value> - </data> - <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </data> - <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>Private</value> - </data> - <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAABAAcAEBAQAAAAAAAoAQAAdgAAABAQAAABAAgAaAUAAJ4BAAAQEAAAAQAYAGgDAAAGBwAAICAQAAAA - AADoAgAAbgoAACAgAAABAAgAqAgAAFYNAAAwMAAAAQAYAKgcAAD+FQAAICAAAAEAIACoEAAApjIAACgA - AAAQAAAAIAAAAAEABAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAA - gACAgAAAwMDAAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8ACwCwCwCwAAALC7C7ALu7AAu7 - u7sAsAsAALsLsAC7uwAAAAAAAAAAAAiIiIiAAAAAiIiIiIgAAACIiIiIiAAAAIiIiIiIAAAAiIiIiIgA - CACIiIiIiAiIgIiIiIiIiIiIiIiIiIiI/4iIiIiIiIj3iIiIiIiAiIiHCIcAiHAIiHC23wAApMMAAIDb - AADJwwAA//8AAAB/AAAAPwAAAD8AAAA/AAAAIwAAAAEAAAAAAAAAAAAAAAAAAABAAACMYQAAKAAAABAA - AAAgAAAAAQAIAAAAAABAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABFRUUAS0tLAEZHSABAQEAATU1NADw9 - PQArKisASUlJAEpKSgBeXl4AqampAJ6engCsrKwAREREAFVWVgCrq6sAnZ2dAK6urgBLS0oAMTQ2ALS0 - tQCYl5YAmpqaAKioqABoaWkAbm5uAJWVlQCgn58APUJFAKCgnwCWlpYAn5+fAD1BQwCqqqkAi4qJAL/I - zACpqqsAkpGRAGxrawCfn54AREhKAJeXlwBZXF4AoaGgAJGRkQD///8AgYB/AERHSgCYl5cAoKCgADU3 - OQCtrKwAiYmIAMvP0gCxsLAAj4+PAJqamwCVlZYAnp2dAFdYVwBFSEoAsrGxAJGRkACpqKgAZ2lpAG1s - bQCql40Ap5KGAK+bkQBHOzYAmZeVAJWWlgBQT08ALyEbAH5vaAB9fn8AT1JUAHReUwAgs/8ADL3/ACax - /QAEsf8AlpCNAKeUiQClkogAoJ6cAGVVTgADSWgAD4TIABG2/wAYLz4AIKnoAAk6VwAagLQACF6QAFeR - swAkqvQAG7v/AJqBdAAps/8AHcX/ABR0qgAIM0QAEFyMACn5/wAVdqwAABwvAFLF/QAAJkAAYbHVAAM/ - YgAOdbIAGpTPAAZFaAAGZ6AAF6HfAAo5WQATfLoAGJfQACG2/wACAwoAIMf/AAInPwBS0P8AACpGAGO+ - 4wAGUX0AElB1ACLb/wAdsfYADDlVACPS/wAhyf8AD010ABqk3QASd6oAIb//AB29/wAsUmwACDFKAAAG - DgABBwwAAggMAAk2VQAWExIAAxkpAAo3UwAILkYABy1EAA5NdAADFSAAHcf/AB69/wANTGcAD1Z1ABBg - hAATco8ABB4yACTm/wANWXMAD1t8AA5MaAAQXoEABiY6ABJqhQAGJTgAGp7gABd6rgAdo/EAGJjeACLF - /wARaZ4AGqDqABdsmAAesf8AFFmDABNrnwAduP8AG6jtABFilAAQYnwABiU3AB+4/wANTnMADUBeABiC - tgAaqvQAF5DUAAw/XAAl5P8ABSQ6AAskNgAUbqQAGYzPABBjgAACDhUACjVLAA9ghgAKOVEABB4sAAcj - NAAHIzYAEnGSAAYlMgAHLEQAEGWEAAcqQAAHKjUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUgAAUgAAUgAAUgAAAAAAAFIAUlIA - UlIAAFJSUlIAAABSUlJSUlJSAABSAABSAAAAAFJSAFJSAAAAUlJSUgAAAAAAAAAAAAAAAAAAAAAAAEof - Hx9BAR8fHwAAAAAAAAAfHx8fKx8fHx8fAAAAAAAAHx8fHycfHx8fHwAAAAAAAB8fHx8nHx8fHx8AAAAA - AAAfHx8fJx8fHx8fAAAHBQAAHx8fHycfHx8fH5EfHx8fAB8fHx8nHx8fHwofHyY4HzkfHx8fJx8fHx8r - HyYuLhsfHx8fHycfHx8fCh8mLjYfHx8fHx8fJx8fHwAjHx8fHzYAHx8kAAAxHzYAADgfHzYAtt8AAKTD - AACA2wAAycMAAP//AAAAfwAAAD8AAAA/AAAAPwAAACMAAAABAAAAAAAAAAAAAAAAAAAAQAAAjGEAACgA - AAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAEsf8AAAAAAAAEsf8AAAAAAAAE - sf8AAAAAAAAEsf8AAAAAAAAAAAAAAAAAAAAAAAAEsf8AAAAEsf8Esf8AAAAEsf8Esf8AAAAAAAAEsf8E - sf8Esf8Esf8AAAAAAAAAAAAEsf8Esf8Esf8Esf8Esf8Esf8Esf8AAAAAAAAEsf8AAAAAAAAEsf8AAAAA - AAAAAAAAAAAEsf8Esf8AAAAEsf8Esf8AAAAAAAAAAAAEsf8Esf8Esf8Esf8AAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvIRuWlpaWlpaWlpZnaWlFRUWWlpaW - lpaWlpYAAAAAAAAAAAAAAAAAAAAAAAAAAACWlpaWlpaWlpaWlpZZXF6WlpaWlpaWlpaWlpaWlpYAAAAA - AAAAAAAAAAAAAAAAAACWlpaWlpaWlpaWlpZsa2uWlpaWlpaWlpaWlpaWlpYAAAAAAAAAAAAAAAAAAAAA - AACWlpaWlpaWlpaWlpZsa2uWlpaWlpaWlpaWlpaWlpYAAAAAAAAAAAAAAAAAAAAAAACWlpaWlpaWlpaW - lpZsa2uWlpaWlpaWlpaWlpaWlpYAAAAAAAArKitNTU0AAAAAAACWlpaWlpaWlpaWlpZsa2uWlpaWlpaW - lpaWlpaWlpYWExKWlpaWlpaWlpaWlpYAAACWlpaWlpaWlpaWlpZsa2uWlpaWlpaWlpaWlpZeXl6WlpaW - lpaSkZGPj4+WlpaampuWlpaWlpaWlpaWlpZsa2uWlpaWlpaWlpaWlpZZXF6WlpaSkZH///////+VlZWW - lpaWlpaWlpaWlpaWlpZsa2uWlpaWlpaWlpaWlpZeXl6WlpaSkZH////Lz9KWlpaWlpaWlpaWlpaWlpaW - lpaWlpaRkZGWlpaWlpaWlpYAAACLiomWlpaWlpaWlpaWlpbLz9IAAACWlpaWlpa/yMwAAAAAAACYl5eW - lpbLz9IAAAAAAACPj4+WlpaWlpbLz9IAAAC23wAApMMAAIDbAADJwwAA//8AAAB/AAAAPwAAAD8AAAA/ - AAAAIwAAAAEAAAAAAAAAAAAAAAAAAABAAACMYQAAKAAAACAAAABAAAAAAQAEAAAAAACAAgAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAIAAAIAAAACAgACAAAAAgACAAICAAADAwMAAgICAAAAA/wAA/wAAAP//AP8A - AAD/AP8A//8AAP///wAAAAAAAAAAAAAAAAAAAAAAA7AAALuzCzAAC7uwO7szsAOzAAOzuxswALszMLs7 - M7ADu7MDMDs7MAC7AAGzAzOwA7s7M7E7OzEQswAxszszsAOxC7O7uwu7szs7M7u7M7ADszuwO7MAuzO7 - u7M7swOwAbu7MAAAAAAAuwAAAAADsAADMwAAAAAAAAMAAAAAADAAOAEwAzADM4ADMwAxADMzA7gDuAsw - u7uwO7swswu7uwO4A7gLM7szMLs7MbM7M7sDuAO4CzOzAzOzA7OzOwC7A7gDuAszszsxszuzszszuwOz - A7MLuLu7iLu7s7M7u7ODsxOzO7iLuIiLO7AAA7swiLu7u7uIiIiIgwOzswAAAIiLu4uziIiIiIALsbMA - AACIiIiIgIiIiIiAAACIgzAAiIiIiICIiIiIgACIiIiIAIiIiIiAiIiIiIAIiIiIiICIiIiIgIiIiIiI - OIiIiIiIiIiIiICIiIiIgIiIh3iIiIiIiIiAiIiIiICIiP/3iIiIiIiIgIiIiIiIiIf//4iIiIiIiICI - iIiIg4iH//+IiIiIiIiAiIiIiICIiP/3iIiIiIiIgIiIiIiAiIiIiIiIiIiIiHCIiIiIcAiIiIiIiAiI - iIiACIiIh4AIeIiIiIAAiHd4AACId4gAAIh3d3gAAAAAAAAAAAAAAAAAAAAAAP////+PCcEBjgHAAYAB - jiGAAAABgAgAAYEMAAmB/8/54//v/cmQIzCIgAAgiIAAAIiAAACIgAAAgAAAAAAAAOEAAAg/AAAYPwAA - HgcAABwDAAAYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBAAAGAYAcDgPAP/////KAAAACAA - AABAAAAAAQAIAAAAAACABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEB - AQACAgIABAQEAAUGBwAFCQsABQoNAAQLDgAECw8ABQ0RAAUOEwAFDxUABRAXAAUSGQAHFBwACRYdAAsY - HwAOGSAAERshABMdIgAWHiMAGSAkABsiJQAcIycAGiQqABYlLQASJTAADiYzAAwnNQAKKToACSs/AAgu - QwAIMUcACTRNAAk2UAAKOVMACjxZAApAXgAMQWAAEENgABpEXAAjQ1YAKURTADFETwA7REkAP0RHAEFF - RgBERkcAR0hIAEtKSgBPTk4AVlVVAFxcWwBhYWAAZmVlAG1sbAB0dXUAd3p8AHh9gAB9gIIAhISFAIiH - hgCJiIcAiomIAIqKiQCLi4oAi4uLAIyMjACOjo4AkJCQAJKSkgCUk5MAlJSTAJWUlACXlZQAmJWTAJqV - kgCalZIAmpWSAJqVkgCalZIAmZWTAJiVlACWlpUAlpaVAJaWlQCWlpUAlpaVAJaVlQCWlpYAlpaWAJaW - lgCWlpYAl5eXAJeXlwCYmJgAmJiYAJiYmACYmJgAmZmZAJmZmQCampoAm5ubAJubmwCcnJwAnZ2dAJ6e - ngCgoKAAoKCgAKGhoQCioqIAoqKiAKOjowClpaUApaWmAKSlpgCgo6UAm6KmAJahpwCNn6kAgp2sAHub - rQB1ma8AbZiwAGeXtABjl7YAYpa0AGKTsABhkq4AX5CsAFqMqQBWiaYAUIWkAEqCoQBGfp8APHmcADBx - lgAoao8AIGOJABldgwAWWoAAElh/AA5WfwAOVn4ADVV9AA1WfwAOWIIADlqFAA9chwAPXYkAD16MABBg - jQAQYY8AEWSTABFmlgASaJkAEmqdABJtoQASb6QAEnKoABNzqwAUda0AFXiwABZ5sgAXe7QAGH64ABiA - uwAYgb4AGIK/ABeDwQAXhMIAGIXEABqHxgAaickAGovLABuNzgAaj9EAG5DUABuS1gAclNkAHJbcAByY - 3wAdmuEAHJvkACCf5wAen+kAG6DrABqg7AAaoO0AGqHuABmi7wAZovAAGqPyABqk8wAapfUAGqb2ABun - 9wAcqPcAHKn5ABuq+wAbqvsAG6v8ABus/QAbrP4AG63+ABut/gAbrv4AG6/+ABqv/gAbr/4AG7D+AByx - /gAbsv4AG7L+AByz/gAetP4AHrX+AB+2/gAgt/4AILj+AB+5/gAeuv4AHrr+AB67/gAeu/4AHrz+AB69 - /gAfvv4AH7/+ACDA/gAgwv4AIMP+ACDE/gAhxf4AIcX+ACHG/gAlxv0AK8b8ADLG+gBDyPgAXcz0AH7R - 8QCd1u4Aut/uANDm7wDe6vAA6O/yAPD09gD09vcA////APj4+AADAwMDAwMDAwMDAwMDAwMDAwMDAwMD - AwMDAwMDAwMDAwOU2iEDAwMDv+jglwPOtgMDAyK/6+vhAyvX5uqxlfADA5zcKwMDA6/nuM7TKs63AwMD - xemlqawf6dy32LSi6wMDmd/S17kJubwJleegy6kDAw/nvgMDAyjpnwO5taDrAwOc4ca04KmtySmz4J+/ - tycoH920FSIrJeauK9CwnuwDA5zeJxHC0Lrc09jpA8jb09+vvNy8vry5wtrY6JWU7wMDleOkntTrA7nr - 6rwDA/DqvCvQ0+jo7LW06uq8A5rvAwMn6eHh6LoDAwMDAwMDAwMDA/DrAwMDAwMDAwMDqPADAwMDpqks - AwMDAwMDAwMDAwMDA7EDAwMDAwMDAwMDqQMDA6s8AyiqAwOZKwMNnKWxiwsDlaivAwOxKgMDpqCgpgOe - 6oIDsOg+A821CsXj5eXHDrrl4eefI/CdA9Tj49jcA5vhggOs3j8Dw6ss5eCiq5Ei6tyq1Lkn6ZWi47es - 1NIDmuGCA6zePwPCsaHgkAOkqpXmngOuyCvmmbLhDQ7f0gOY4YIDrN4/A8GyluOmldq7KuevK8LCleid - qN+dptjYA5bjjAOq3DAIv706x93f14I5wt3m2NSh6qQr1N7c3rM6K+WmJbrak5XSv1+AvcqCVVV/yrbJ - yxMDAwO48PC8AzY70Nre2NLb39uDVVFTUVNPX28wA7HLlfCfAwMDAwMDNlWAytO9gs/UoEFiX11dWl9f - cwMD58kq26MDAwMDAwM2X1FTUVNTVUIZRGVfX19fX19zAwMDAwk0NTcyMgMDAzZfX11dWl9lRhxFZV9f - X19fX3UDAwM3Q2ptbU0+PQMDNl9fX19fX2VHHEVlX19fX19fawMDO3ZpX2JfYmprQgM2X19fX19fZUcc - RWVfX19fX2JIMzFtX19dSEtfX19uPjZfX19fX19lRxxFZV9fX19fZUUJXWVfTEx3ckldX19qNl9fX19f - X2VHHEVlX19fX19lQhxzX01I+v//d0lfX182X19fX19fZUccRWVfX19fX2VBM29fSnf////8R01fXzZf - X19fX19lRxxFZV9fX19fZUEyb19Kd/////tFTV9fNl9fX19fX2VHHEVlX19fX19lRRtzX11F+f37d0tf - X182Yl9fX19fZUgPR2lfX19fX2JdDkRqX11LYl1LX19fajZuX19fX19fcgM3a19fX19fX3gDHWViX11N - TV9fX28+A0duYl9fX29AAwM+b2JfX2VwQgMDN3dpX19fX19vQgMDA0FrdXN3QAMDAxw+anV4Sz0DAwMD - N0F3c3Nzd0IDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD/////48JwQGOAcABgAGOIYAA - AAGACAABgQwACYH/z/nj/+/9yZAjMIiAACCIgAAAiIAAAIiAAACAAAAAAAAA4QAACD8AABg/AAAeBwAA - HAMAABgBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAEAAAYBgBwOA8A/////8oAAAAMAAAAGAA - AAABABgAAAAAAIAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQMF - D1iBHaz+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACz9dGJDUHKb0GpvkF4nKAQkNAAAAD1qEFobFFobF - CTRNAAAAAAAAAAAAAAAAAAECByxBFoK/HKTyG6DsHKb0Haz9EWWVAAAAAQUIDU90GZffG6TxG5/qHaz9 - GpnhBBomDU91Ha3/Ha3/AAAAAAAAAgwRFX+7Ha3/F4jJBR8uAAAAAAAAAAAAAAAAAAAACThSG5/rHaz+ - Ha3/Ha3/G6HuDlV+AQcLFX66Ha3/Ha3/CTRNAAAAAAAAAAAAAAAABR4sGI7SHaz9Ha3/Ha3/Ha3/Ha3/ - FoTDAQcLC0JhHKXzHa3/Ha3/Ha3/Ha3/Haz+Cj5bFoTDHa3/Ha3/AAAAAAAAAg4UFoTCHa3/FYC8AxAX - AAAAAAAAAAAAAAAABRsoGZbdHa3/Ha3/Ha3/Ha3/Ha3/GJHVByxBFYC9Ha3/Ha3/CTRNAAAAAAAAAAAA - AgwSE3GnHa3/Ha3/Ha3/Ha3/Ha3/Ha3/EGCNBSEwG5/qHa3/Ha3/Ha3/Ha3/Ha3/Ha3/DElrF4vNHa3/ - Ha3/AAAAAAAAAg0TFoLAHa3/G6HuF4bGFoK/FHWtCDJKAAAAC0NjHKf2Ha3/G6DsCTNLFHixHa3/HKb1 - D1qEFX66Ha3/Ha3/CTRNAAAAAAAAAAEBBiU3Gp3oHa3/Ha3/AAAAAAAAAAAADUtvAAIDDlJ5Haz+Ha3/ - GZffCjtXFX66Ha3/Ha3/DEdoF4nKHa3/Ha3/AAAAAAAAAg0TFoPBHa3/Ha3/Ha3/Ha3/Ha3/GpvlBRwp - DU5zHKf2Ha3/Cj5bAAAABiExHaz9Ha3/E3ClFoLAHa3/GI7RCTRNAAAAAAAAAAEBCC1DHKf2Ha3/E2+j - AAAAAAAAAAAAAAAAAAAAEWiZHa3/G6HtCDJJAAAACjxZHav8Ha3/DEdpF4nKHa3/Ha3/AAAAAAAAAg0T - F4jIHa3/Ha3/HKr6G6LvHav8Ha3/FoK/DlF4G6PwHa3/EWOSAxMcD1qFHa3/Haz+EmqcFHmyHa3/G6Lv - CTRNAxEZBBonAw8WByxBHKTyHa3/EWOSAxQdAxAYBBomDU1yAQUHD1yHHa3/HKb0D1eAAxIaE3GmHa3/ - Ha3/C0JhF4rLHa3/Ha3/AAAAAAAAAg0TFobFHa3/Hav8EmiaCjpVGIzPHa3/Haz+EWOSGJHWHa3/Hav8 - GZbdHaz+Ha3/Ha3/E3GnEWSUHaz9Ha3/G6HuGIzPGpnhFX66DEZnGZffHa3/G5/rEWOSEWOSEWOSEWOS - EWOSDEptHKXzHa3/HKn5GpvlHaz+Ha3/G6HuBiIyF4fHHa3/Ha3/AAAAAAAAAg4UFoXEHa3/F4fHAgwR - AAAAEWaWHa3/Ha3/Ha3/GI7SHav8Ha3/Ha3/Ha3/Ha3/Ha3/AAAAF4jJGp7pHa3/Ha3/Ha3/Ha3/Ha3/ - FoPBGJLXHa3/Ha3/Ha3/Ha3/Ha3/Ha3/Ha3/Ha3/GJLXHaz+Ha3/Ha3/Ha3/Ha3/EWaXAQUHF4nKHa3/ - Ha3/AAAAAAAAAw8WFX24Ha3/GZffDEVmCC9FGZXbHa3/Ha3/Ha3/AAAAHa3/Ha3/Ha3/Ha3/Ha3/Ha3/ - AAAAAAAAHa3/Ha3/Ha3/Ha3/Har7F4rLD1qFGpvlHa3/Ha3/Ha3/Ha3/Ha3/Ha3/Ha3/Ha3/Ha3/Ha3/ - Ha3/Ha3/Ha3/Ha3/Ag4VAAAAF4rMHa3/Ha3/AAAAAAAAAxMcEWOSHa3/Ha3/HKTyG6PwHa3/Ha3/Ha3/ - Ha3/AAAAAAAAHa3/Ha3/Ha3/Ha3/AAAAAAAAAAAAAAAAHa3/Ha3/Ha3/F4vNByxBByg7HKj4Ha3/Ha3/ - Ha3/Ha3/Ha3/Ha3/Ha3/AAAAAAAAHa3/Ha3/Ha3/Ha3/AAAAAAAAAQMFGZTaHa3/Ha3/AAAAAAAAAAAA - DUtuGpniHa3/Ha3/Ha3/Ha3/Ha3/Ha3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAHa3/Ha3/Ha3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAHa3/Ha3/Ha3/AAAAAAAAAAAAAAAABSAvE3ClHKj3Ha3/F4jJD1iCCDJJAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHa3/Ha3/AAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHa3/Ha3/Ha3/AAAAAAAAAAAAAAAAAwMDHx8fOjo6 - ICAgAAAAGxsbGxsbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgICAgICBQUFAgICBAQEQkJCMzMzJCQk - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAIDDUdoHa3+TqLSdXZ3HR0dAxAXIIO8Iqr4Q4KlDxUXAAAABys/G5/qGIzPBBUfAwMD - AxAXD1yHGpvlHKXzG6PwHqn4LKryPl1vAQEBAgsQDlF3GpzmHaz+G6DsHa3/AxAYAAAAByk9G6TxHa3/ - CDBHAAAAAQkNDlJ5GpniHKf2G6LvHKj3Haz9Ha3/AAAAAg4UGIK+Ha3/MqntX4CTGRkZCTNLHpzkHa3/ - R6XbRE1TAQEBEF2JHa3/G6HtDDxXAQMFEmyfHav8Ha3/Ha3/Ha3/Ha3/Hq3+FGiYAAAAD1iBHav8Ha3/ - Ha3/Haz+Haz+FoPBAAAADlV+Ha3/Hav8C0FgAAAAEF6LHKn5Haz+Ha3/Ha3/Har7Ha3/Ha3/AAAAAg4V - GYbFHa3/L6rwXYKXGhoaCTdRHp7nHa3/RqXcV2BlBAQED1yIHa3/HKDrCThSC0FgHar6Ha3/Ha3+Hqz9 - Hqz9Hq3+H6v6C0NjBiMzHaz+Ha3/Haz+Hav8Haz+Ha3/HKj3Byk9DUtuHa3/HKf2CTRNCC5EG6PwHa3/ - Haz+Hav8Haz+HKn5Ha3/Ha3/AAAAAw4VGYXCHa3/MKnvXoGVGhoaCTdRHp7nHa3/R6XbWGBkBgYGEFuG - Ha3/HZ/pC0NjGXWpHa3/Hq3+PaXfJWCDEkViSIqwNWyMAQQGFWSRHa3/Ha3/G6TxD1yHF4jJHaz+Ha3/ - EWSTDEdoHa3/G6PwCj1aEWSTHa3/Ha3/GpvkC0JhFoTCHar7Haz+Ha3/AAAAAw4VGYXCHa3/MKnvXoGV - GhoaCTdRHp7nHa3/R6XbWGBkBwcHEFuGHa3/HqHrDU91GIK/Ha3/LKfuPVdlAgICAQYJJozHK5POBSEw - FnWrHa3/I6r3DlV+AAAACTRMG6TxHa3/E3SrDU90Ha3/G6TxDEhqE3OpHa3/HKn5C0JiAAAACjlUHKf2 - Haz+Ha3/AAAAAw4VGYTBHa3/MKnvXoGVGhoaCTdRHp7nHa3/R6XbWWBlCAgIEFyHHa3/IaPtDk90FX+7 - Ha3/HpnfDDBEAQcLEWWVHa3/Ha3/EF6KEWWVHa3/HKDrC0BeAQcKC0FgHKTyHa3/E3KoDU90Ha3/HKf2 - DElrE2+kHa3/Gp3oC0JiAxAYD1mDHKn5Ha3/Ha3/ODg4Aw4VGYO/Ha3/MKnvYoWZHBwcCTdRHp7nHa3/ - R6XbWGBkBgYGEFuGHa3/JafxH1RyEmmbHa3/Ha3/FoG+EWaWHaTxHa3/Ha3/J1t4DEdpHa3/Ha3/GI7S - EWSUGZPZHa3/Ha3/FHq0D1qEHa3/Haz9DU91D1mDHa3/Ha3/GZTaFHewG6TxHaz9Ha3/Ha3/JCQkAw4V - F4LAHa3/MKfrTm+CDg4OCTRMHJvjHa3/RJ/TNz1BAQEBD1mDHa3/JKn1WIWeJlJqHKb0Ha3/Ha3/Ha3/ - Ha3/Ha3/L6nveYOJLEdWG5/qHa3/Ha3/Ha3/Ha3/Ha3/Ha3/G6DsFXy3Ha3/Ha3/E3ClCThTGp3oHa3/ - Ha3/Ha3/Ha3/Ha3/Ha3/Ha3/JCQkAg0TFYC8Ha3/H53lGT1RAAAACjpWGp7pHa3/IInFCREWAAAAE2+j - Ha3/I6r2a567g4iLQ4mxH6v6Ha3/Ha3/Ha3/MKnvd5yxlpaWiY2PSoWmH6n4Ha3/Ha3/Ha3/Ha3/Ha3/ - GI7RBBYhF4vNHa3/AAAABic5FXu2HKn5Ha3/Ha3/Ha3/Ha3/Ha3/AAAAJCQkKS8yEWeYHa3/HKn5FXu1 - DVB2FoLAHav8Ha3/HKb0EWSTD1yIHaLuHa3/JKn2dZyylpaWkZebb524TKTXQqbfVaLOgJqplpaWlpaW - lpaWk5eZZ5++GZbdFHewFoPBHKn5Ha3/FHewAAECAAAAAAAAAAAAAAAAAAAAHa3/Ha3/Ha3/Ha3/Ha3/ - AAAAAAAAJCQkgICAK1RtHar7Ha3/HKn5Haj2Haz+Ha3/Ha3/Ha3/HKj4Hqr6Ha3/Ha3/Np/cjZidlpaW - lpaWlpaWj5ecjJifkZealpaWlpaWlpaWlpaWlpaWlpaWCThTAxAXCTdRG6PwHa3/E3KoCjpWHKb1Ha3/ - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJCQklpaWhIyQQY+8Ha3/Ha3/Ha3/Ha3/H6z9Iqf0 - Ha3/Ha3/Ha3/Ha3/Hp7nY4eblpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWAAAA - AAAADlV9Haz9Ha3/GZbdFHWtHa3/Haz+Gp3oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJCQklpaW - lpaWjpabZZ6+NKjrJav4Oqflb524gJimVKLOLKryKav1NZHGIz5NeXp7lpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWAAAAAAAAGJHVG6TxHKXzDElsBys/GZffF4rMBiIyAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAJCQklpaWlpaWlpaWlpaWkpeajJifkZealpaWlpaWlpaWjpedjZidXmBg - JCQkenp6lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWAAAAAAAAAAAAAAAAAAAA - AAAABwcHIiktLTM3MTExMDAwLy8vJCQkSkpKAAAAAAAAAAAAAAAAAAAAJCQklpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWX19fJCQkenp6lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWAAAAAAAAAAAAAAAABgYGMjIyXl5ef39/jo6OkZGRkJCQh4eHbGxsSkpKSkpKAAAAAAAA - AAAAAAAAJCQklpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWX19fJCQkenp6lpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlZWVAAAAAAAAAAAAFRUVWVlZjY2NlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWfHx8SkpKAAAAAAAAAAAAJCQklpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWX19fJCQkenp6lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWioqKAAAA - AAAAFRUVampqlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWjo6OSkpKAAAAAAAAJCQklpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWX19fJCQkenp6lpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWc3NzAAAABwcHXV1dlpaWlpaWlpaWlpaWlpaWlpaWl5eXlpaWlpaWlpaW - lpaWlpaWlpaWlJSUSkpKAAAAJCQklpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWX19f - JCQkenp6lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWY2NjSkpKNTU1kpKSlpaWlpaW - lpaWlpaWl5eXk5OTj4+PkZGRlpaWlpaWlpaWlpaWlpaWlpaWlpaWSkpKJCQklpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWX19fJCQkenp6lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaW - lpaWlZWVXV1dBAQEc3NzlpaWlpaWlpaWlpaWlpaWj4+PkpKSnp6elpaWjY2NlJSUlpaWlpaWlpaWlpaW - lpaWSkpKJCQklpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWX19fJCQkenp6lpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlZWVWVlZGRkZkpKSlpaWlpaWlpaWlpaWkJCQpaWl0dHR - 5OTk3d3dsrKykpKSlZWVlpaWlpaWlpaWlpaWlpaWJCQklpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWX19fJCQkenp6lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlJSUWFhYMzMz - lpaWlpaWlpaWlpaWkJCQn5+f3d3d/v7+////////8vLyr6+vkpKSlZWVlpaWlpaWlpaWlpaWJCQklpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWX19fJCQkenp6lpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlJSUW1tbRUVFlpaWlpaWlpaWlZWVkpKSu7u7+fn5////////////////1NTU - lZWVlJSUlpaWlpaWlpaWlpaWJCQklpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWX19f - JCQkenp6lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlJSUXl5eTExMlpaWlpaWlpaWlJSU - k5OTxMTE/v7+////////////////4ODgl5eXlJSUlpaWlpaWlpaWlpaWJCQklpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWX19fJCQkenp6lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaW - lpaWlZWVWVlZQEBAlpaWlpaWlpaWlpaWj4+Ps7Oz9/f3////////////////zs7OlJSUlJSUlpaWlpaW - lpaWlpaWJCQklpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWX19fJiYmenp6lpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlZWVXFxcLS0tlpaWlpaWlpaWlpaWkpKSlZWVzc3N//// - ////////5OTko6Ojk5OTlpaWlpaWlpaWlpaWlpaWJCQklpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWY2NjISEheXl5lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWaWlpDw8P - jo6OlpaWlpaWlpaWlpaWk5OTmJiYs7OzxMTEvb29oKCglJSUlpaWlpaWlpaWlpaWlpaWlpaWJCQklpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWYmJiBgYGcHBwlpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWenp6AQEBYmJilpaWlpaWlpaWlpaWlpaWlJSUkJCQj4+PkJCQk5OTlpaW - lpaWlpaWlpaWlpaWlpaWlpaWExMTlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWfn5+ - AAAAS0tLkZGRlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWi4uLAAAAIyMji4uLlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlZWVlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWExMTf39/lpaWlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWAAAAFhYWdHR0lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWAAAABwcHQkJClpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaW - lpaWAAAAAAAAExMTkpKSlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWAAAAAAAABQUFKysrfHx8 - lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWAAAAAAAAAAAAExMTUVFRlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWAAAAAAAAAAAAAAAASkpKgoKClpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWlpaWAAAAAAAAAAAAMjIyTk5OeXl5kpKSlpaWlpaWlpaWlpaWlpaWlpaWlpaWAAAAAAAAAAAA - AAAAAAAALi4uXV1dg4ODlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWAAAAAAAAAAAAAAAAAAAA - AAAASkpKSkpKlpaWlpaWlpaWlpaWlpaWlpaWAAAAAAAAAAAAAAAAAAAAAAAAAAAASkpKSkpKlpaWlpaW - lpaWlpaWlpaWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASkpKSkpKlpaWlpaWlpaWlpaWlpaWlpaW - lpaWlpaWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////+P8CHgEAH//4Pg - AeAAAf//g8ABwAAB//+AQAGDgAH//4AAAYPAAf//gAAAAAAB//+AAAAAAAH//4AAIAAAAf//gBAwAAAB - //+AGHgAGGH//8A//+P/8f//4D//8//x///gP8A//////4AIAAAhAP//gAAAACEA//+AAAAAAAD//4AA - AAAAAP//gAAAAAAA//+AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAgH//wAAAAAPg///AAAAAAP/ - //8AAAAGAf///wAAAAYB////AAAAB+Af//8AAAAHgA///wAAAAcAB///AAAABgAD//8AAAAEAAH//wAA - AAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA//8AAAAAAAD//wAAAAAAAP//AAAAAAAA - //8AAAAAAAD//wAAAAAAAP//AAIABAAA//8AAgAEAAH//4AGAA4AA///wAcAHwAH///gH8B/wA////// - ////////KAAAACAAAABAAAAAAQAgAAAAAACAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAbAAA - AJAAAABsAAAAJAAAAAAAAAAMAAAAPAAAAHgAAACQAAAAkAAAAJAAAACQAAAAkAAAAGwAAAAkAAAADAAA - ADwAAAB4AAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAABsAAAAAAAE - CP8dsv//BiU3/wAAAJwAAABUAAAAMAAAAEgbnur/IL7//x64//8OWIP/AxUe/xyr/P8YkdX/AAAAkAAA - ADAAAAAkBSY5/xqf6v8gwv//IMH//x+5//8EHCr/C0Ji/x2w//8fvP//IMD//xeHyP8NVHz/I9P//wAA - AJAAAAAAAAQI/x20//8MSWv/AAAAtAAAAJwAAACQFYTD/x+9//8ZlNv/HKv8/x2u//8KQF7/HKv9/xiT - 2P8AAACcAAAAVAAAAP8bo/H/IL///xNzqv8UerX/FoG//wUgMP8gv///HbT//xiR1v8dsf//F4zP/xFt - oP8gwv//AAAAkAAAAAAABAj/Hrf//x2t//8dsP//GJTc/wEFB/8Yldz/Gp3n/wAFB/8OVHz/H73//xFn - mP8cqfr/FHq0/wAAALQAAACcAg0U/x+9//8anun/AAAAtAAAAJwAAACQCTlV/x+///8QZpb/AAAB/xmV - 3P8XjtL/EWmb/yDC//8AAACQAAAAAAAECP8fuf//G6Xz/xiMz/8euP//FHy3/xaCv/8cpvf/Cj1a/xeK - y/8fuP//EWaW/xqg6/8Ykdf/CTZP/wk6Vv8FHi7/HrX//xeMzv8EGib/Bic5/wtDYv8HMEb/H7z//xWC - wf8KQ2P/Haz+/xaGxv8QZJP/IMP//wAAAJAAAAAAAAQI/x62//8JNlD/AxAY/xqh7f8crP7/GZff/x6z - //8drv//HbH//x+///8AAABsG6b0/x2z//8drv//Hrf//xWEw/8Zm+X/HrL//xqb5f8anej/Gpvl/xmW - 3f8boe3/HbL//x2x//8fvv//DU5z/w5Vfv8gxf//AAAAkAAAAAAABAj/H7r//xJxqP8RZJP/Ha///yDB - //8AAACQGZXc/yDB//8gwP//Gpzm/wAAACQAAAAMIcf//yDA//8am+X/DEZo/xys//8drv//H77//x++ - //8gw///GI/T/xeN0P8gwP//IMD//xqb5P8AAAD/D12K/yHF//8AAACEAAAAAAk2UP8fv///Hbn//x65 - //8fvv//GJjh/wAAAJwAAABIAAAAGAAAACQAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwItH//yDC - //8AAACEAAAAVAAAACQAAAAMAAAADAAAACQAAAAkAAAAGAAAACQUebP/Icr//wAAAIQAAAAAAAAAJAQP - FP8ed6r/GXuy/xBBXf8EAQD/AAAAtAAAAIQAAABgAAAAeAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAA - AJAAAACQFofH/wAAAKgAAACcAAAAeAAAAEgAAABIAAAAeAAAAGwAAABIAAAAbAAAAJAUerX/AAAAqAAA - AAAABAj/IYK5/2tra/8LAAD/EjxT/yp/sP8SHCD/AAAAtA9ch/8MSWz/AAAA/wILEP8RYI7/E3Ss/yWK - w/89f6b/Eg8N/wAAAP8NTnP/FHmz/xWEw/8AAAC0AAAAnBaHx/8KP13/AAAAnAQZJf8Uda7/EWma/xFp - m/8Tdq3/AAAAAAAECP8gwP//W5zC/wwLCv8VhcX/Kr7//1p4iv8ACxL/HKr8/xiO0f8BBwr/G6Pw/x26 - //8eu///G7v//xil9v8BDBL/GZfe/x+7//8fuf//H73//xFml/8GKz//Isr//xBikf8AAAC0HK///x+6 - //8fuv//HbH//x60//8AAAAAAAQI/x+5//9bl7z/DAsK/xSBvv8otv//YHyM/wAIEP8aou//FoC9/w9L - bf8cu///Mbj//x5vnv82i7v/IVNw/wcpPP8fwP//HrT//xV+uv8dr///GZbc/wk3UP8fv///DU91/xJu - ov8fuv//GJHW/xWBvv8dr///Ha3//wAAACQABAj/H7n//1uXuv8MCwn/FIG+/yi2//9ge4r/AAsR/xqh - 7v8ZiMb/EWqd/yG4//8zX3j/AAAA/xlzqP8dfrT/DVN7/yG8//8SY5H/AAAA/xWDv/8cpvX/DEpt/x+8 - //8PW4b/FonK/x65//8BChD/AgwR/x63//8drf//YGZq/wAECP8fuf//YJ3B/w8NDf8Ugb7/Kbb//2R/ - j/8AChH/GqDt/yCKyP8LVoD/Hbr//xJ1rv8NUnn/HLL//xeZ4v8IPlz/Hb3//xaExP8LRWb/G6Hu/xuh - 7f8NUHT/IL7//w9ikf8UebL/Hrf//xBikv8Td67/HbH//x2x//8lJSX/CFWC/yG6//8/dpX/AAAA/xR9 - uf8ntP//MUZS/wAECP8Wnuv/Oano/1Viaf8Zpfb/GLX//xq3//8UsP//Y6DE/2deWf8Zoe3/G7X//x+8 - //8dsf//HK///xJrn/8gwP//E3Ko/wtHav8dr///Hrb//x6z//8etv//F4vN/yUlJf8DRmz/Hbv//xV2 - rf8GMEj/GZjh/x2y//8OVn//DEtv/xmt//81quv/l5aW/3CUqv88p+X/LKrw/1ehzP+alpP/npeT/3KV - p/8nq/f/FpDW/xun9v8cqfr/AxMd/wAAALQAAACcAAAAbBiT2f8hyP//Icf//xmb5v8AAAAkJSUl/2Bm - av8Xq///GLL//x22//8Ysf//F63//xqz//8et///FLP//1+VtP+clpL/m5WS/5uUkP+alZL/nJSP/5eV - lf+Wlpb/p5+a/zE/R/8AAAD/FofH/xyp+v8OVHv/Is3//xFml/8AAACcAAAAVAAAADAAAAAkAAAADAAA - AAAlJSX/nJaT/2mWr/8qqvP/FK7//0ak2/9bncP/Iaz7/x2v//8YaZf/iYSC/5mXl/+Wlpb/lpWV/5aV - lf+WlpX/lpaW/5aWlv+ioqL/AAAAkAAAADAfvf//G6f3/whAYP8WtP//Cmyk/wAAALQAAACcAAAAkAAA - AHgAAAA8AAAADCUlJf+Wlpb/nJWR/5+Ujv+clZD/npSN/56Ujv+glpH/kIeC/ycdF/+KiYj/mJiY/5aW - lv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/6Kiov8AAACQAAAAPAAAACQAAABIEQkE/0U6Nf9QR0L/UVFR/0BA - QP89PT3/AAAAtAAAAIQAAAAAJSUl/5aWlv+Wlpb/lpWV/5aVlf+WlpX/lpaW/5iYl/+Li4r/JSUl/4qK - iv+YmJj/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/o6Oj/wAAAJwAAABsAAAAeFBQUP+IiIj/mpqZ/5yc - nP+cnJz/lJSU/3p6ev9xcXH/AAAAtAAAAAwlJSX/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/mJiY/4uL - i/8lJSX/ioqK/5iYmP+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+bm5v/AAAAtAAAAP9nZ2f/paWl/5mZ - mf+Wlpb/l5eX/5aWlv+Xl5f/mpqa/5ubm/+Hh4f/AAAADCUlJf+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aW - lv+YmJj/i4uL/yUlJf+Kior/mJiY/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/l5eX/4yMjP9BQUH/ODg4/5yc - nP+Wlpb/lpaW/5WVlf+NjY3/kZGR/5aWlv+Wlpb/lpaW/52dnf94eHj/JSUl/5aWlv+Wlpb/lpaW/5aW - lv+Wlpb/lpaW/5iYmP+Li4v/JSUl/4qKiv+YmJj/lpaW/5aWlv+Wlpb/lpaW/5aWlv+YmJj/ioqK/wgI - CP+VlZX/mJiY/5aWlv+Tk5P/k5OT/6+vr/+hoaH/j4+P/5WVlf+Wlpb/lpaW/5qamv8lJSX/lpaW/5aW - lv+Wlpb/lpaW/5aWlv+Wlpb/mJiY/4uLi/8lJSX/ioqK/5iYmP+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5iY - mP+Ghob/JCQk/6Kiov+Wlpb/lJSU/42Njf/d3d3///////j4+P+0tLT/jo6O/5aWlv+Wlpb/lpaW/yUl - Jf+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5aWlv+YmJj/i4uL/yUlJf+Kior/mJiY/5aWlv+Wlpb/lpaW/5aW - lv+Wlpb/mJiY/4WFhf9BQUH/n5+f/5aWlv+QkJD/rKys//////////////////Hx8f+Li4v/lJSU/5aW - lv+Wlpb/JSUl/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5iYmP+Li4v/JSUl/4qKiv+YmJj/lpaW/5aW - lv+Wlpb/lpaW/5aWlv+YmJj/hYWF/z09Pf+fn5//lpaW/5CQkP+mpqb/////////////////7u7u/4qK - iv+UlJT/lpaW/5aWlv8lJSX/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/mJiY/4uLi/8nJyf/ioqK/5iY - mP+Wlpb/lpaW/5aWlv+Wlpb/lpaW/5iYmP+Kior/ISEh/6Kiov+Wlpb/lZWV/4qKiv/MzMz/9fX1/+np - 6f+np6f/kZGR/5aWlv+Wlpb/lpaW/xMTE/+Li4v/mZmZ/5aWlv+Wlpb/lpaW/5aWlv+YmJj/jIyM/xMT - E/+Li4v/mZmZ/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/l5eX/5WVlf8RERH/iYmJ/5qamv+Wlpb/lZWV/5GR - kf+Xl5f/lZWV/5KSkv+Wlpb/lpaW/5aWlv+ampr/AAAAeFFRUf+bm5v/lpaW/5aWlv+Wlpb/lpaW/5aW - lv+hoaH/AAAAeFFRUf+bm5v/lpaW/5aWlv+Wlpb/lpaW/5aWlv+Wlpb/pKSk/wAAAHgrKyv/mJiY/5eX - l/+Wlpb/lZWV/5SUlP+UlJT/lpaW/5aWlv+Wlpb/np6e/3h4eP8AAAAAEBAQ/3h4eP+fn5//l5eX/5aW - lv+Wlpb/np6e/39/f/8AAAAAEBAQ/3h4eP+fn5//l5eX/5aWlv+Wlpb/mJiY/6CgoP+Hh4f/AAAAPAAA - AP9QUFD/p6en/5mZmf+Wlpb/lpaW/5aWlv+Wlpb/lpaW/56env+Hh4f/AAAAAAAAAAwAAAAAJycn/3h4 - eP+ampr/oqKi/6ampv9/f3//AAAAAAAAAAwAAAAAJycn/3h4eP+ampr/o6Oj/6SkpP+RkZH/cnJy/wAA - ACQAAAAMAAAAAAAAAABRUVH/goKC/6ampv+ioqL/oqKi/6Kiov+mpqb/h4eH/wAAAAAAAAAMAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AACCAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIBA - AAFAoAwC/////w== -</value> - </data> </root> \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-14 12:33:58 UTC (rev 546) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-14 12:46:12 UTC (rev 547) @@ -106,9 +106,6 @@ <Compile Include="Design\AppSettingsMame.Designer.cs"> <DependentUpon>AppSettingsMame.cs</DependentUpon> </Compile> - <Compile Include="Design\AppSettingsPrePost.cs"> - <SubType>Form</SubType> - </Compile> <Compile Include="Design\AppSettingsRoot.cs"> <SubType>UserControl</SubType> </Compile> @@ -127,6 +124,12 @@ <Compile Include="Design\FileDetailsForm.Designer.cs"> <DependentUpon>FileDetailsForm.cs</DependentUpon> </Compile> + <Compile Include="Design\AppSettingsPrePost.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Design\AppSettingsPrePost.Designer.cs"> + <DependentUpon>AppSettingsPrePost.cs</DependentUpon> + </Compile> <Compile Include="Design\SetupForm.cs"> <SubType>Form</SubType> </Compile> @@ -189,10 +192,6 @@ <DependentUpon>AppSettingsMame.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="Design\AppSettingsPrePost.resx"> - <DependentUpon>AppSettingsPrePost.cs</DependentUpon> - <SubType>Designer</SubType> - </EmbeddedResource> <EmbeddedResource Include="Design\AppSettingsRoot.resx"> <DependentUpon>AppSettingsRoot.cs</DependentUpon> <SubType>Designer</SubType> @@ -205,6 +204,10 @@ <SubType>Designer</SubType> <DependentUpon>FileDetailsForm.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="Design\AppSettingsPrePost.resx"> + <SubType>Designer</SubType> + <DependentUpon>AppSettingsPrePost.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Design\SetupForm.resx"> <DependentUpon>SetupForm.cs</DependentUpon> <SubType>Designer</SubType> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-15 23:36:26
|
Revision: 556 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=556&view=rev Author: chef_koch Date: 2007-06-15 16:36:24 -0700 (Fri, 15 Jun 2007) Log Message: ----------- removed obsolete space in filename Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs 2007-06-15 22:21:16 UTC (rev 555) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs 2007-06-15 23:36:24 UTC (rev 556) @@ -1,1283 +0,0 @@ -#region Copyright (C) 2005-2007 Team MediaPortal - -/* - * Copyright (C) 2005-2007 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#endregion - -using System; -using System.IO; -using System.Collections.Generic; -using System.Diagnostics; -using System.Xml; -using SQLite.NET; -using MediaPortal.Ripper; -using MediaPortal.Player; -using MediaPortal.GUI.Library; -using MediaPortal.Util; - -using GUIPrograms; -using GUIPrograms.Database; -using GUIPrograms.FileItems; - -namespace GUIPrograms.ApplicationItems -{ - /// <summary> - /// Summary description for Application. - /// </summary> - public class ApplicationItem - { - protected static SQLiteClient sqlDB = null; - private DatabaseSorter dbPc = new DatabaseSorter(); - - public delegate void FilelinkLaunchEventHandler(FilelinkItem curLink, bool mpGuiMode); - - public event FilelinkLaunchEventHandler OnLaunchFilelink = null; - - int appID; - int fatherID; - string title; - string shortTitle; - string filename; - string arguments; - ProcessWindowStyle windowStyle; - Process proc; - string startupDir; - bool useShellExecute; - bool useQuotes; - ApplicationType sourceType; - string sourceFile; - string imageFile; - string imageDirectories; // in one string for sqlite db field - public string[] imageDirs; // imageDirectories splitted - string fileDirectory; - string validExtensions; - bool importValidImagesOnly; - int appPosition; - bool enabled; - bool enableGUIRefresh; - int pincode; - int contentID; - string systemDefault; - bool waitForExit; - string preLaunch; - string postLaunch; - bool importMamePlaychoice10 = false; - - public bool ImportMamePlaychoice10 - { - get { return importMamePlaychoice10; } - set { importMamePlaychoice10 = value; } - } - bool importMameMahjong = false; - - public bool ImportMameMahjong - { - get { return importMameMahjong; } - set { importMameMahjong = value; } - } - - - string launchErrorMsg; - - - // two magic image-slideshow counters - int thumbIndex = 0; - int thumbFolderIndex = -1; - - string lastFilepath = ""; // cached path - - public bool filesAreLoaded = false; // load on demand.... - protected FileItemList fileList = null; - - public bool linksAreLoaded = false; - protected FilelinkItemList fileLinks = null; - - // event: read new file - public delegate void RefreshInfoEventHandler(string informationMessage, int progressBarProgess); - - public event RefreshInfoEventHandler OnRefreshInfo = null; - - protected void SendRefreshInfo(string informationMessage, int progressBarCtr) - { - if (OnRefreshInfo != null) - { - OnRefreshInfo(informationMessage, progressBarCtr); - } - } - - protected int GetID = ProgramUtils.GetID; - - public ApplicationItem(SQLiteClient initSqlDB) - { - - // constructor: save SQLiteDB object - sqlDB = initSqlDB; - // .. init member variables ... - appID = -1; - fatherID = -1; - title = ""; - shortTitle = ""; - filename = ""; - arguments = ""; - windowStyle = ProcessWindowStyle.Normal; - startupDir = "%FILEDIR%"; - useShellExecute = false; - useQuotes = true; - enabled = true; - sourceType = ApplicationType.UNKNOWN; - sourceFile = ""; - imageFile = ""; - fileDirectory = ""; - imageDirectories = ""; - validExtensions = ""; - appPosition = 0; - importValidImagesOnly = false; - enableGUIRefresh = false; - pincode = -1; - contentID = 100; - systemDefault = ""; - waitForExit = true; - filesAreLoaded = false; - preLaunch = ""; - postLaunch = ""; - - } - - public SQLiteClient db - { - get { return sqlDB; } - } - - public int CurrentSortIndex - { - get { return GetCurrentSortIndex(); } - set { SetCurrentSortIndex(value); } - } - - public bool CurrentSortIsAscending - { - get { return GetCurrentSortIsAscending(); } - set { SetCurrentSortIsAscending(value); } - } - - - public FileItem PrevFile(FileItem curFile) - { - if (Files == null) - { - return null; - } - if (Files.Count == 0) - { - return null; - } - int index = this.Files.IndexOf(curFile); - index = index - 1; - if (index < 0) - index = Files.Count - 1; - return (FileItem)Files[index]; - } - - public FileItem NextFile(FileItem curFile) - { - if (Files == null) - { - return null; - } - if (Files.Count == 0) - { - return null; - } - int index = this.Files.IndexOf(curFile); - index = index + 1; - if (index > Files.Count - 1) - index = 0; - return (FileItem)Files[index]; - } - - - public virtual void LaunchFile(FileItem curFile, bool mpGuiMode) - { - string curFilename = curFile.Filename; - if (curFilename == "") - { - return; - } - - // Launch File by item - if (mpGuiMode) - { - curFile.UpdateLaunchInfo(); - } - ProcessStartInfo procStart = new ProcessStartInfo(); - - if (Filename != "") - { - // use the APPLICATION launcher and add current file information - procStart.FileName = Filename; // filename of the application - // set the arguments: one of the arguments is the fileitem-filename - procStart.Arguments = " " + this.Arguments + " "; - if (UseQuotes) - { - // avoid double quotes around the filename-argument..... - curFilename = "\"" + (curFile.Filename.TrimStart('\"')).TrimEnd('\"') + "\""; - } - - if (procStart.Arguments.IndexOf("%FILEnoPATHnoEXT%") >= 0) - { - // ex. kawaks: - // winkawaks.exe alpham2 - // => filename without path and extension is necessary! - string filenameNoPathNoExt = curFile.ExtractFileName(); - filenameNoPathNoExt = (filenameNoPathNoExt.TrimStart('\"')).TrimEnd('\"'); - filenameNoPathNoExt = Path.GetFileNameWithoutExtension(filenameNoPathNoExt); - procStart.Arguments = procStart.Arguments.Replace("%FILEnoPATHnoEXT%", filenameNoPathNoExt); - } - else - { - // the fileitem-argument can be positioned anywhere in the argument string... - if (procStart.Arguments.IndexOf("%FILE%") == -1) - { - // no placeholder found => default handling: add the fileitem as the last argument - procStart.Arguments = procStart.Arguments + curFilename; - } - else - { - // placeholder found => replace the placeholder by the correct filename - procStart.Arguments = procStart.Arguments.Replace("%FILE%", curFilename); - } - } - procStart.WorkingDirectory = Startupdir; - if (procStart.WorkingDirectory.IndexOf("%FILEDIR%") != -1) - { - procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); - } - procStart.UseShellExecute = UseShellExecute; - } - else - { - // application has no launch-file - // => try to make a correct launch using the current FILE object - procStart.FileName = curFile.Filename; - procStart.WorkingDirectory = Path.GetFullPath(curFile.Filename); - - - if (Startupdir != "") - { - if (Startupdir.Contains("%FILEDIR%")) - { - procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); - } - else - { - procStart.WorkingDirectory = Startupdir; - } - } - - procStart.UseShellExecute = UseShellExecute; - } - procStart.WindowStyle = this.WindowStyle; - - this.LaunchErrorMsg = ""; - try - { - DoPreLaunch(); - - - if (mpGuiMode) - { - AutoPlay.StopListening(); - if (g_Player.Playing) - { - g_Player.Stop(); - } - } - - proc = new Process(); - proc.EnableRaisingEvents = true; - proc.Exited += new EventHandler(proc_Exited); - - proc.StartInfo = procStart; - ProgramUtils.StartProcess(proc, WaitForExit); - - - if (mpGuiMode) - { - //GUIGraphicsContext.DX9Device.Reset(GUIGraphicsContext.DX9Device.PresentationParameters); - AutoPlay.StartListening(); - } - - } - catch (Exception ex) - { - string ErrorString = String.Format("myPrograms: error launching program\n filename: {0}\n arguments: {1}\n WorkingDirectory: {2}\n stack: {3} {4} {5}", - procStart.FileName, - procStart.Arguments, - procStart.WorkingDirectory, - ex.Message, - ex.Source, - ex.StackTrace); - Log.Info(ErrorString); - this.LaunchErrorMsg = ErrorString; - } - finally - { - DoPostLaunch(); - } - } - - void proc_Exited(object sender, EventArgs e) - { - - if (proc != null) - { - proc.Dispose(); - proc = null; - } - } - - protected void DoPreLaunch() - { - if (waitForExit && (preLaunch != "")) - { - LaunchCmd(preLaunch); - } - } - - protected void DoPostLaunch() - { - if (waitForExit && (preLaunch != "")) - { - LaunchCmd(postLaunch); - } - } - - protected void LaunchCmd(string commands) - { - string results = ""; - string errors = ""; - string[] script; - string curLine; - Process p = new Process(); - StreamWriter sw; - StreamReader sr; - StreamReader err; - - script = commands.Split(';'); - if (script.Length > 0) - { - ProcessStartInfo psI = new ProcessStartInfo("cmd"); - psI.UseShellExecute = false; - psI.RedirectStandardInput = true; - psI.RedirectStandardOutput = true; - psI.RedirectStandardError = true; - psI.CreateNoWindow = true; - p.StartInfo = psI; - - p.Start(); - sw = p.StandardInput; - sr = p.StandardOutput; - err = p.StandardError; - - sw.AutoFlush = true; - - for (int i = 0; i < script.Length; i++) - { - curLine = script[i].Trim(); - curLine = curLine.TrimStart('\n'); - if (curLine != "") - sw.WriteLine(curLine); - } - sw.Close(); - - results += sr.ReadToEnd(); - errors += err.ReadToEnd(); - - if (errors.Trim() != "") - { - Log.Info("Application PrePost errors: {0}", errors); - } - } - } - - public virtual void LaunchFile(GUIListItem item) - { - // Launch File by GUILISTITEM - // => look for FileItem and launch it using the found object - if (item.MusicTag == null) - { - return; - } - FileItem curFile = (FileItem)item.MusicTag; - - if (curFile == null) - { - return; - } - this.LaunchFile(curFile, true); - } - - protected virtual void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) - { - this.OnLaunchFilelink(curLink, MPGUIMode); - } - - public virtual string DefaultFilepath() - { - return ""; // override this if the appitem can have subfolders - } - - public virtual int DisplayFiles(string filePath, GUIFacadeControl facadeView) - { - int totalItems = 0; - if (filePath != lastFilepath) - { - Files.Load(AppID, filePath); - Filelinks.Load(AppID, filePath); - } - totalItems = totalItems + DisplayArrayList(filePath, this.Files, facadeView); - totalItems = totalItems + DisplayArrayList(filePath, this.Filelinks, facadeView); - lastFilepath = filePath; - return totalItems; - } - - protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) - { - int totalItems = 0; - //foreach (FileItem currentFileItem in dbItems) - foreach (object obj in dbItems) - { - totalItems = totalItems + 1; - if (obj is FileItem) - { - FileItem curFile = obj as FileItem; - GUIListItem gli = new GUIListItem(curFile.Title); - gli.Label2 = curFile.Title2; - gli.MusicTag = curFile; - gli.IsFolder = curFile.IsFolder; - gli.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); - gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); - facadeView.Add(gli); - } - else if (obj is ProgramFilterItem) - { - ProgramFilterItem curFilter = obj as ProgramFilterItem; - GUIListItem gli = new GUIListItem(curFilter.Title); - gli.Label2 = curFilter.Title2; // some filters may have more than one text - gli.MusicTag = curFilter; - gli.IsFolder = true; - //ck - gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); - - - facadeView.Add(gli); - - } - } - return totalItems; - } - - - void OnRetrieveCoverArt(GUIListItem gli) - { - if ((gli.MusicTag != null) && (gli.MusicTag is FileItem)) - { - FileItem curFile = (FileItem)gli.MusicTag; - if (curFile.Imagefile != "") - { - gli.ThumbnailImage = curFile.Imagefile; - gli.IconImageBig = curFile.Imagefile; - gli.IconImage = curFile.Imagefile; - } - else - { - gli.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - gli.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - gli.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; - } - } - } - - /* private void OnItemSelected(GUIListItem item, GUIControl parent) - { - GUIFilmstripControl filmstrip = parent as GUIFilmstripControl; - if (filmstrip == null) return; - if (item == null) return; - if ((item.MusicTag != null) && (item.MusicTag is FileItem) && (!item.IsFolder)) - { - filmstrip.InfoImageFileName = item.ThumbnailImage; - } - else - { - filmstrip.InfoImageFileName = ""; - } - }*/ - private void OnItemSelected(GUIListItem item, GUIControl parent) - { - GUIPrograms.ThumbnailPath = ""; - if (item.ThumbnailImage != "" - && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png" - && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultAlbum.png" - ) - { - // only show big thumb if there is really one.... - GUIPrograms.ThumbnailPath = item.ThumbnailImage; - } - } - - public virtual void OnSort(GUIFacadeControl view, bool doSwitchState) - { - /* - * if (!filesAreLoaded) - { - LoadFiles(); - } - - if (doSwitchState) - { - dbPc.UpdateState(); - } - view.Sort(dbPc); - */ - } - - public virtual void OnSortToggle(GUIFacadeControl view) - { - dbPc.sortAscending = (!dbPc.sortAscending); - view.Sort(dbPc); - } - - public virtual int GetCurrentSortIndex() - { - return dbPc.CurrentSortMethodIndex; - } - - public virtual void SetCurrentSortIndex(int newValue) - { - dbPc.CurrentSortMethodIndex = newValue; - } - - public virtual string CurrentSortTitle() - { - return dbPc.CurrentSortMethodAsText; - } - - public virtual bool GetCurrentSortIsAscending() - { - return dbPc.sortAscending; - } - - public virtual void SetCurrentSortIsAscending(bool newValue) - { - dbPc.sortAscending = newValue; - } - - public virtual bool RefreshButtonVisible() - { - return false; // otherwise, override this in child class - } - - public virtual bool FileEditorAllowed() - { - return true; // otherwise, override this in child class - } - - public virtual bool FileAddAllowed() - { - return true; // otherwise, override this in child class - } - - public virtual bool FilesCanBeFavourites() - { - return true; // otherwise, override this in child class - } - - public virtual bool FileBrowseAllowed() - { - // set this to true, if SUBDIRECTORIES are allowed - // (example: possible for DIRECTORY-CACHE) - return false; // otherwise, override this in child class - } - - public virtual bool SubItemsAllowed() - { - return false; - } - - public virtual bool ProfileLoadingAllowed() - { - return false; - } - - public virtual void Refresh(bool mpGuiMode) - { - // descendant classes do that! - } - - - public virtual void OnInfo(GUIListItem item, ref bool isOverviewVisible, ref ProgramInfoAction modalResult, ref int selectedFileID) - { - GUIFileInfo fileInfoDialog = (GUIFileInfo)GUIWindowManager.GetWindow(ProgramUtils.ProgramInfoID); - if (null != fileInfoDialog) - { - if (item.MusicTag == null) - { - return; - } - FileItem curFile = (FileItem)item.MusicTag; - fileInfoDialog.App = this; - fileInfoDialog.File = curFile; - fileInfoDialog.IsOverviewVisible = isOverviewVisible; - fileInfoDialog.DoModal(GetID); - isOverviewVisible = fileInfoDialog.IsOverviewVisible; - modalResult = fileInfoDialog.ModalResult; - selectedFileID = fileInfoDialog.SelectedFileID; - return; - } - } - - public int AppID - { - get { return appID; } - set { appID = value; } - } - - public int FatherID - { - get { return fatherID; } - set { fatherID = value; } - } - - public string Title - { - get { return title; } - set { title = value; } - } - - public string ShortTitle - { - get { return shortTitle; } - set { shortTitle = value; } - } - - public string Filename - { - get { return filename; } - set { filename = value; } - } - - public string Arguments - { - get { return arguments; } - set { arguments = value; } - } - - public bool UseQuotes - { - get { return useQuotes; } - set { useQuotes = value; } - } - - public bool UseShellExecute - { - get { return useShellExecute; } - set { useShellExecute = value; } - } - - public bool Enabled - { - get { return enabled; } - set { enabled = value; } - } - - public ProcessWindowStyle WindowStyle - { - get { return windowStyle; } - set { windowStyle = value; } - } - - public string Startupdir - { - get { return startupDir; } - set { startupDir = value; } - } - - public string FileDirectory - { - get { return fileDirectory; } - set { fileDirectory = value; } - } - - public string ImageDirectory - { - get { return imageDirectories; } - set { SetImageDirectory(value); } - } - - private void SetImageDirectory(string value) - { - imageDirectories = value; - imageDirs = imageDirectories.Split(';'); - for (int i = 0; i < imageDirs.Length; i++) - { - imageDirs[i] = imageDirs[i].Trim(); - // hack the \n away.... - // imageDirs[i] = imageDirs[i].TrimStart('\n'); - // hack trailing backslashes away - imageDirs[i] = imageDirs[i].TrimEnd('\\'); - } - } - - public string Imagefile - { - get { return imageFile; } - set { imageFile = value; } - } - - public string Source - { - get { return sourceFile; } - set { sourceFile = value; } - } - - public ApplicationType SourceType - { - get { return sourceType; } - set { sourceType = value; } - } - - public string ValidExtensions - { - get { return validExtensions; } - set { validExtensions = value; } - } - - public bool ImportValidImagesOnly - { - get { return importValidImagesOnly; } - set { importValidImagesOnly = value; } - } - - public int Position - { - get { return appPosition; } - set { appPosition = value; } - } - - public int ContentID - { - get { return contentID; } - set { contentID = value; } - } - - public string SystemDefault - { - get { return systemDefault; } - set { systemDefault = value; } - } - - public bool WaitForExit - { - get { return waitForExit; } - set { waitForExit = value; } - } - - - public bool GUIRefreshPossible - { - get { return RefreshButtonVisible(); } - } - - public bool EnableGUIRefresh - { - get { return enableGUIRefresh; } - set { enableGUIRefresh = value; } - } - - public string LaunchErrorMsg - { - get { return launchErrorMsg; } - set { launchErrorMsg = value; } - } - - public string PreLaunch - { - get { return preLaunch; } - set { preLaunch = value; } - } - - public string PostLaunch - { - get { return postLaunch; } - set { postLaunch = value; } - } - - - public FileItemList Files - { - // load on demand.... - get - { - if (!filesAreLoaded) - { - LoadFiles(); - } - return fileList; - } - } - - - public FilelinkItemList Filelinks - { - // load on demand.... - get - { - if (!linksAreLoaded) - { - LoadFileLinks(); - } - return fileLinks; - } - } - - - private int GetNewAppID() - { - // get an unused SQL application KEY-number - if (sqlDB != null) - { - // won't work in multiuser environment :) - SQLiteResultSet results; - int res = 0; - results = sqlDB.Execute("SELECT MAX(APPID) FROM tblApplicationItem"); - SQLiteResultSet.Row arr = results.Rows[0]; - if (arr.fields[0] != null) - { - if (arr.fields[0] != "") - { - res = Int32.Parse(arr.fields[0]); - } - } - return res + 1; - } - else return -1; - } - - private void Insert() - { - if (sqlDB != null) - { - try - { - if (ContentID <= 0) - { - ContentID = 100; - } - //to remove - string Pincode = ""; - AppID = GetNewAppID(); // important to avoid subsequent inserts! - string sql = String.Format("insert into tblApplicationItem (appid, fatherID, title, shorttitle, filename, arguments, windowstyle, startupdir, useshellexecute, usequotes, source_type, source, imagefile, filedirectory, imagedirectory, validextensions, importvalidimagesonly, iposition, enabled, enableGUIRefresh, GUIRefreshPossible, pincode, contentID, systemDefault, WaitForExit, preLaunch, postLaunch) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}', '{17}', '{18}', '{19}', '{20}', '{21}', '{22}', '{23}', '{24}', '{25}', '{26}')", - AppID, FatherID, ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), - ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(Startupdir), ProgramUtils.BooleanToStr(UseShellExecute), - ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), - ProgramUtils.Encode(FileDirectory), ProgramUtils.Encode(ImageDirectory), ProgramUtils.Encode(ValidExtensions), ProgramUtils.BooleanToStr(importValidImagesOnly), Position, - ProgramUtils.BooleanToStr(Enabled), ProgramUtils.BooleanToStr(EnableGUIRefresh), ProgramUtils.BooleanToStr(GUIRefreshPossible), Pincode, - ContentID, ProgramUtils.Encode(SystemDefault), ProgramUtils.BooleanToStr(WaitForExit), ProgramUtils.Encode(PreLaunch), ProgramUtils.Encode(PostLaunch) - ); - sqlDB.Execute(sql); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - } - - private void Update() - { - string sql = ""; - //to remove - string Pincode = ""; - if ((AppID >= 0) && (sqlDB != null)) - { - if (ContentID <= 0) - { - ContentID = 100; - } - try - { - sql = String.Format("update tblApplicationItem set title = '{0}', shorttitle = '{1}', filename = '{2}', arguments = '{3}', windowstyle = '{4}', startupdir = '{5}', useshellexecute = '{6}', usequotes = '{7}', source_type = '{8}', source = '{9}', imagefile = '{10}',filedirectory = '{11}',imagedirectory = '{12}',validextensions = '{13}',importvalidimagesonly = '{14}',iposition = {15}, enabled = '{16}', fatherID = '{17}', enableGUIRefresh = '{18}', GUIRefreshPossible = '{19}', pincode = '{20}', contentID = '{21}', systemDefault = '{22}', WaitForExit = '{23}', preLaunch = '{24}', postLaunch = '{25}' where appID = {26}", - ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), - ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(Startupdir), ProgramUtils.BooleanToStr(UseShellExecute), - ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), - ProgramUtils.Encode(FileDirectory), ProgramUtils.Encode(ImageDirectory), ProgramUtils.Encode(ValidExtensions), ProgramUtils.BooleanToStr(importValidImagesOnly), Position, - ProgramUtils.BooleanToStr(Enabled), FatherID, ProgramUtils.BooleanToStr(EnableGUIRefresh), ProgramUtils.BooleanToStr(GUIRefreshPossible), - Pincode, ContentID, ProgramUtils.Encode(SystemDefault), ProgramUtils.BooleanToStr(WaitForExit), ProgramUtils.Encode(PreLaunch), ProgramUtils.Encode(PostLaunch), - AppID); - sqlDB.Execute(sql); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - Log.Info("sql \n{0}", sql); - } - } - } - - public void Delete() - { - if ((AppID >= 0) && (sqlDB != null)) - { - try - { - DeleteFiles(); - DeleteFileLinks(); - sqlDB.Execute(String.Format("delete from tblApplicationItem where appid = {0}", AppID)); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - } - - - - - protected void DeleteFiles() - { - if ((AppID >= 0) && (sqlDB != null)) - { - try - { - sqlDB.Execute(String.Format("delete from tblFileItem where appid = {0}", AppID)); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - } - - protected void DeleteFileLinks() - { - if ((AppID >= 0) && (sqlDB != null)) - { - try - { - sqlDB.Execute(String.Format("delete from tblFilterItem where appid = {0} or grouperappid = {0}", AppID)); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - } - - - public virtual void LoadFiles() - { - if (sqlDB != null) - { - // load Files and fill Files-List<string> here! - if (fileList == null) - { - fileList = new FileItemList(sqlDB); - } - else - { - fileList.Clear(); - } - lastFilepath = ""; - fileList.Load(AppID, ""); - filesAreLoaded = true; - } - } - - public virtual void LoadFileLinks() - { - if (sqlDB != null) - { - if (fileLinks == null) - { - fileLinks = new FilelinkItemList(sqlDB); - } - else - { - fileLinks.Clear(); - } - lastFilepath = ""; - fileLinks.Load(AppID, ""); - linksAreLoaded = true; - } - } - - protected virtual void FixFileLinks() - { - // after a import the appitem has completely new - // fileitems (new ids) and LINKS stored in filteritems - // 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); - - // update command to fix one single link - string sqlFixOneLink = "update tblFilterItem set fileID = {0}, tag = 0 where appID = {1} and filename = '{2}'"; - - SQLiteResultSet rows2fix; - - - try - { - // 1) initialize TAG - sqlDB.Execute(String.Format("update tblFilterItem set tag = 1234 where appid = {0}", AppID)); - - // 2) fix all fileids of the newly imported files - rows2fix = sqlDB.Execute(sqlSelectDataToFix); - int newFileID; - string filenameToFix; - if (rows2fix.Rows.Count == 0) return; - for (int row = 0; row < rows2fix.Rows.Count; row++) - { - newFileID = ProgramUtils.GetIntDef(rows2fix, row, "newfileid", -1); - filenameToFix = ProgramUtils.Get(rows2fix, row, "filename"); - sqlDB.Execute(String.Format(sqlFixOneLink, newFileID, AppID, ProgramUtils.Encode(filenameToFix))); - } - - // 3) delete untouched links ( they were not imported anymore ) - sqlDB.Execute(String.Format("delete from tblFilterItem where appid = {0} and tag = 1234", AppID)); - - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception (Application.FixFileLinks) err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - - } - - - public void InsertOrUpdateSettings() - { - if (appID == -1) - { - Insert(); - } - else - { - Update(); - } - } - - public virtual string CurrentFilePath() - { - return this.FileDirectory; - } - - - public void Assign(ApplicationItem sourceApp) - { - this.Enabled = sourceApp.Enabled; - this.AppID = sourceApp.AppID; - this.FatherID = sourceApp.FatherID; - this.Title = sourceApp.Title; - this.ShortTitle = sourceApp.ShortTitle; - this.Filename = sourceApp.Filename; - this.Arguments = sourceApp.Arguments; - this.WindowStyle = sourceApp.WindowStyle; - this.Startupdir = sourceApp.Startupdir; - this.UseShellExecute = sourceApp.UseShellExecute; - this.UseQuotes = sourceApp.UseQuotes; - this.SourceType = sourceApp.SourceType; - this.Source = sourceApp.Source; - this.Imagefile = sourceApp.Imagefile; - this.FileDirectory = sourceApp.FileDirectory; - this.ImageDirectory = sourceApp.ImageDirectory; - this.ValidExtensions = sourceApp.ValidExtensions; - this.ImportValidImagesOnly = sourceApp.ImportValidImagesOnly; - this.Position = sourceApp.Position; - this.EnableGUIRefresh = sourceApp.EnableGUIRefresh; - this.WaitForExit = sourceApp.WaitForExit; - this.PreLaunch = sourceApp.PreLaunch; - this.PostLaunch = sourceApp.PostLaunch; - this.SystemDefault = sourceApp.SystemDefault; - this.ContentID = sourceApp.ContentID; - } - - - - // imagedirectory stuff - // get next imagedirectory that holds at least one image for a fileitem - // * m_pFile: the file we're looking images for - private void GetNextThumbFolderIndex(FileItem fileItem) - { - if (fileItem == null) return; - bool foundThumb = false; - while (!foundThumb) - { - thumbFolderIndex++; - if (thumbFolderIndex >= imageDirs.Length) - { - thumbFolderIndex = -1; - foundThumb = true; - } - else - { - string candFolder = imageDirs[thumbFolderIndex]; - string candThumb = candFolder + "\\" + fileItem.ExtractImageFileNoPath(); - if (candThumb.ToLower() != fileItem.Imagefile.ToLower()) - { - foundThumb = (System.IO.File.Exists(candThumb)); - } - else - { - // skip the initial directory, in case it's reentered as a search directory! - foundThumb = false; - } - } - } - } - - public virtual string GetCurThumb(GUIListItem item) - { - if (item.MusicTag == null) - { - return ""; - } - if (item.MusicTag is FileItem) - { - FileItem curFile = item.MusicTag as FileItem; - return GetCurThumb(curFile); - } - else if (item.MusicTag is ApplicationItem) - { - ApplicationItem curApp = item.MusicTag as ApplicationItem; - return curApp.Imagefile; - } - else - { - return ""; - } - } - - - public string GetCurThumb(FileItem fileItem) - { - string curThumb = ""; - if (thumbFolderIndex == -1) - { - curThumb = fileItem.Imagefile; - } - else - { - string curFolder = imageDirs[thumbFolderIndex]; - curThumb = curFolder + "\\" + fileItem.ExtractImageFileNoPath(); - } - if (thumbIndex > 0) - { - // try to find another thumb.... - // use the myGames convention: - // every thumb has the postfix "_1", "_2", etc with the same file extension - string curExtension = fileItem.ExtractImageExtension(); - if (curThumb != "") - { - string cand = curThumb.Replace(curExtension, "_" + thumbIndex.ToString() + curExtension); - if (System.IO.File.Exists(cand)) - { - // found another thumb => override the filename! - curThumb = cand; - } - else - { - thumbIndex = 0; // restart at the first thumb! - GetNextThumbFolderIndex(fileItem); - } - } - } - return curThumb; - } - - public void ResetThumbs() - { - thumbIndex = 0; - thumbFolderIndex = -1; - } - - public void NextThumb() - { - thumbIndex++; - } - - - public void LoadFromXmlProfile(XmlNode node) - { - - XmlNode titleNode = node.SelectSingleNode("title"); - if (titleNode != null) - { - this.Title = titleNode.InnerText; - } - - XmlNode launchingAppNode = node.SelectSingleNode("launchingApplication"); - if (launchingAppNode != null) - { - this.Filename = launchingAppNode.InnerText; - } - - XmlNode useShellExecuteNode = node.SelectSingleNode("useShellExecute"); - if (useShellExecuteNode != null) - { - this.UseShellExecute = ProgramUtils.StrToBoolean(useShellExecuteNode.InnerText); - } - - XmlNode argumentsNode = node.SelectSingleNode("arguments"); - if (argumentsNode != null) - { - this.Arguments = argumentsNode.InnerText; - } - - XmlNode windowStyleNode = node.SelectSingleNode("windowStyle"); - if (windowStyleNode != null) - { - this.WindowStyle = ProgramUtils.StringToWindowStyle(windowStyleNode.InnerText); - } - - XmlNode startupDirNode = node.SelectSingleNode("startupDir"); - if (startupDirNode != null) - { - this.Startupdir = startupDirNode.InnerText; - } - - XmlNode useQuotesNode = node.SelectSingleNode("useQuotes"); - if (useQuotesNode != null) - { - this.UseQuotes = ProgramUtils.StrToBoolean(useQuotesNode.InnerText); - } - - XmlNode fileExtensioneNode = node.SelectSingleNode("fileextensions"); - if (fileExtensioneNode != null) - { - this.ValidExtensions = fileExtensioneNode.InnerText; - } - } - - } -} \ No newline at end of file Copied: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs (from rev 554, trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem .cs) =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-15 23:36:24 UTC (rev 556) @@ -0,0 +1,1283 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.IO; +using System.Collections.Generic; +using System.Diagnostics; +using System.Xml; +using SQLite.NET; +using MediaPortal.Ripper; +using MediaPortal.Player; +using MediaPortal.GUI.Library; +using MediaPortal.Util; + +using GUIPrograms; +using GUIPrograms.Database; +using GUIPrograms.FileItems; + +namespace GUIPrograms.ApplicationItems +{ + /// <summary> + /// Summary description for Application. + /// </summary> + public class ApplicationItem + { + protected static SQLiteClient sqlDB = null; + private DatabaseSorter dbPc = new DatabaseSorter(); + + public delegate void FilelinkLaunchEventHandler(FilelinkItem curLink, bool mpGuiMode); + + public event FilelinkLaunchEventHandler OnLaunchFilelink = null; + + int appID; + int fatherID; + string title; + string shortTitle; + string filename; + string arguments; + ProcessWindowStyle windowStyle; + Process proc; + string startupDir; + bool useShellExecute; + bool useQuotes; + ApplicationType sourceType; + string sourceFile; + string imageFile; + string imageDirectories; // in one string for sqlite db field + public string[] imageDirs; // imageDirectories splitted + string fileDirectory; + string validExtensions; + bool importValidImagesOnly; + int appPosition; + bool enabled; + bool enableGUIRefresh; + int pincode; + int contentID; + string systemDefault; + bool waitForExit; + string preLaunch; + string postLaunch; + bool importMamePlaychoice10 = false; + + public bool ImportMamePlaychoice10 + { + get { return importMamePlaychoice10; } + set { importMamePlaychoice10 = value; } + } + bool importMameMahjong = false; + + public bool ImportMameMahjong + { + get { return importMameMahjong; } + set { importMameMahjong = value; } + } + + + string launchErrorMsg; + + + // two magic image-slideshow counters + int thumbIndex = 0; + int thumbFolderIndex = -1; + + string lastFilepath = ""; // cached path + + public bool filesAreLoaded = false; // load on demand.... + protected FileItemList fileList = null; + + public bool linksAreLoaded = false; + protected FilelinkItemList fileLinks = null; + + // event: read new file + public delegate void RefreshInfoEventHandler(string informationMessage, int progressBarProgess); + + public event RefreshInfoEventHandler OnRefreshInfo = null; + + protected void SendRefreshInfo(string informationMessage, int progressBarCtr) + { + if (OnRefreshInfo != null) + { + OnRefreshInfo(informationMessage, progressBarCtr); + } + } + + protected int GetID = ProgramUtils.GetID; + + public ApplicationItem(SQLiteClient initSqlDB) + { + + // constructor: save SQLiteDB object + sqlDB = initSqlDB; + // .. init member variables ... + appID = -1; + fatherID = -1; + title = ""; + shortTitle = ""; + filename = ""; + arguments = ""; + windowStyle = ProcessWindowStyle.Normal; + startupDir = "%FILEDIR%"; + useShellExecute = false; + useQuotes = true; + enabled = true; + sourceType = ApplicationType.UNKNOWN; + sourceFile = ""; + imageFile = ""; + fileDirectory = ""; + imageDirectories = ""; + validExtensions = ""; + appPosition = 0; + importValidImagesOnly = false; + enableGUIRefresh = false; + pincode = -1; + contentID = 100; + systemDefault = ""; + waitForExit = true; + filesAreLoaded = false; + preLaunch = ""; + postLaunch = ""; + + } + + public SQLiteClient db + { + get { return sqlDB; } + } + + public int CurrentSortIndex + { + get { return GetCurrentSortIndex(); } + set { SetCurrentSortIndex(value); } + } + + public bool CurrentSortIsAscending + { + get { return GetCurrentSortIsAscending(); } + set { SetCurrentSortIsAscending(value); } + } + + + public FileItem PrevFile(FileItem curFile) + { + if (Files == null) + { + return null; + } + if (Files.Count == 0) + { + return null; + } + int index = this.Files.IndexOf(curFile); + index = index - 1; + if (index < 0) + index = Files.Count - 1; + return (FileItem)Files[index]; + } + + public FileItem NextFile(FileItem curFile) + { + if (Files == null) + { + return null; + } + if (Files.Count == 0) + { + return null; + } + int index = this.Files.IndexOf(curFile); + index = index + 1; + if (index > Files.Count - 1) + index = 0; + return (FileItem)Files[index]; + } + + + public virtual void LaunchFile(FileItem curFile, bool mpGuiMode) + { + string curFilename = curFile.Filename; + if (curFilename == "") + { + return; + } + + // Launch File by item + if (mpGuiMode) + { + curFile.UpdateLaunchInfo(); + } + ProcessStartInfo procStart = new ProcessStartInfo(); + + if (Filename != "") + { + // use the APPLICATION launcher and add current file information + procStart.FileName = Filename; // filename of the application + // set the arguments: one of the arguments is the fileitem-filename + procStart.Arguments = " " + this.Arguments + " "; + if (UseQuotes) + { + // avoid double quotes around the filename-argument..... + curFilename = "\"" + (curFile.Filename.TrimStart('\"')).TrimEnd('\"') + "\""; + } + + if (procStart.Arguments.IndexOf("%FILEnoPATHnoEXT%") >= 0) + { + // ex. kawaks: + // winkawaks.exe alpham2 + // => filename without path and extension is necessary! + string filenameNoPathNoExt = curFile.ExtractFileName(); + filenameNoPathNoExt = (filenameNoPathNoExt.TrimStart('\"')).TrimEnd('\"'); + filenameNoPathNoExt = Path.GetFileNameWithoutExtension(filenameNoPathNoExt); + procStart.Arguments = procStart.Arguments.Replace("%FILEnoPATHnoEXT%", filenameNoPathNoExt); + } + else + { + // the fileitem-argument can be positioned anywhere in the argument string... + if (procStart.Arguments.IndexOf("%FILE%") == -1) + { + // no placeholder found => default handling: add the fileitem as the last argument + procStart.Arguments = procStart.Arguments + curFilename; + } + else + { + // placeholder found => replace the placeholder by the correct filename + procStart.Arguments = procStart.Arguments.Replace("%FILE%", curFilename); + } + } + procStart.WorkingDirectory = Startupdir; + if (procStart.WorkingDirectory.IndexOf("%FILEDIR%") != -1) + { + procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); + } + procStart.UseShellExecute = UseShellExecute; + } + else + { + // application has no launch-file + // => try to make a correct launch using the current FILE object + procStart.FileName = curFile.Filename; + procStart.WorkingDirectory = Path.GetFullPath(curFile.Filename); + + + if (Startupdir != "") + { + if (Startupdir.Contains("%FILEDIR%")) + { + procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); + } + else + { + procStart.WorkingDirectory = Startupdir; + } + } + + procStart.UseShellExecute = UseShellExecute; + } + procStart.WindowStyle = this.WindowStyle; + + this.LaunchErrorMsg = ""; + try + { + DoPreLaunch(); + + + if (mpGuiMode) + { + AutoPlay.StopListening(); + if (g_Player.Playing) + { + g_Player.Stop(); + } + } + + proc = new Process(); + proc.EnableRaisingEvents = true; + proc.Exited += new EventHandler(proc_Exited); + + proc.StartInfo = procStart; + ProgramUtils.StartProcess(proc, WaitForExit); + + + if (mpGuiMode) + { + //GUIGraphicsContext.DX9Device.Reset(GUIGraphicsContext.DX9Device.PresentationParameters); + AutoPlay.StartListening(); + } + + } + catch (Exception ex) + { + string ErrorString = String.Format("myPrograms: error launching program\n filename: {0}\n arguments: {1}\n WorkingDirectory: {2}\n stack: {3} {4} {5}", + procStart.FileName, + procStart.Arguments, + procStart.WorkingDirectory, + ex.Message, + ex.Source, + ex.StackTrace); + Log.Info(ErrorString); + this.LaunchErrorMsg = ErrorString; + } + finally + { + DoPostLaunch(); + } + } + + void proc_Exited(object sender, EventArgs e) + { + + if (proc != null) + { + proc.Dispose(); + proc = null; + } + } + + protected void DoPreLaunch() + { + if (waitForExit && (preLaunch != "")) + { + LaunchCmd(preLaunch); + } + } + + protected void DoPostLaunch() + { + if (waitForExit && (preLaunch != "")) + { + LaunchCmd(postLaunch); + } + } + + protected void LaunchCmd(string commands) + { + string results = ""; + string errors = ""; + string[] script; + string curLine; + Process p = new Process(); + StreamWriter sw; + StreamReader sr; + StreamReader err; + + script = commands.Split(';'); + if (script.Length > 0) + { + ProcessStartInfo psI = new ProcessStartInfo("cmd"); + psI.UseShellExecute = false; + psI.RedirectStandardInput = true; + psI.RedirectStandardOutput = true; + psI.RedirectStandardError = true; + psI.CreateNoWindow = true; + p.StartInfo = psI; + + p.Start(); + sw = p.StandardInput; + sr = p.StandardOutput; + err = p.StandardError; + + sw.AutoFlush = true; + + for (int i = 0; i < script.Length; i++) + { + curLine = script[i].Trim(); + curLine = curLine.TrimStart('\n'); + if (curLine != "") + sw.WriteLine(curLine); + } + sw.Close(); + + results += sr.ReadToEnd(); + errors += err.ReadToEnd(); + + if (errors.Trim() != "") + { + Log.Info("Application PrePost errors: {0}", errors); + } + } + } + + public virtual void LaunchFile(GUIListItem item) + { + // Launch File by GUILISTITEM + // => look for FileItem and launch it using the found object + if (item.MusicTag == null) + { + return; + } + FileItem curFile = (FileItem)item.MusicTag; + + if (curFile == null) + { + return; + } + this.LaunchFile(curFile, true); + } + + protected virtual void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + { + this.OnLaunchFilelink(curLink, MPGUIMode); + } + + public virtual string DefaultFilepath() + { + return ""; // override this if the appitem can have subfolders + } + + public virtual int DisplayFiles(string filePath, GUIFacadeControl facadeView) + { + int totalItems = 0; + if (filePath != lastFilepath) + { + Files.Load(AppID, filePath); + Filelinks.Load(AppID, filePath); + } + totalItems = totalItems + DisplayArrayList(filePath, this.Files, facadeView); + totalItems = totalItems + DisplayArrayList(filePath, this.Filelinks, facadeView); + lastFilepath = filePath; + return totalItems; + } + + protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) + { + int totalItems = 0; + //foreach (FileItem currentFileItem in dbItems) + foreach (object obj in dbItems) + { + totalItems = totalItems + 1; + if (obj is FileItem) + { + FileItem curFile = obj as FileItem; + GUIListItem gli = new GUIListItem(curFile.Title); + gli.Label2 = curFile.Title2; + gli.MusicTag = curFile; + gli.IsFolder = curFile.IsFolder; + gli.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); + gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); + facadeView.Add(gli); + } + else if (obj is ProgramFilterItem) + { + ProgramFilterItem curFilter = obj as ProgramFilterItem; + GUIListItem gli = new GUIListItem(curFilter.Title); + gli.Label2 = curFilter.Title2; // some filters may have more than one text + gli.MusicTag = curFilter; + gli.IsFolder = true; + //ck + gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); + + + facadeView.Add(gli); + + } + } + return totalItems; + } + + + void OnRetrieveCoverArt(GUIListItem gli) + { + if ((gli.MusicTag != null) && (gli.MusicTag is FileItem)) + { + FileItem curFile = (FileItem)gli.MusicTag; + if (curFile.Imagefile != "") + { + gli.ThumbnailImage = curFile.Imagefile; + gli.IconImageBig = curFile.Imagefile; + gli.IconImage = curFile.Imagefile; + } + else + { + gli.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + gli.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + gli.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; + } + } + } + + /* private void OnItemSelected(GUIListItem item, GUIControl parent) + { + GUIFilmstripControl filmstrip = parent as GUIFilmstripControl; + if (filmstrip == null) return; + if (item == null) return; + if ((item.MusicTag != null) && (item.MusicTag is FileItem) && (!item.IsFolder)) + { + filmstrip.InfoImageFileName = item.ThumbnailImage; + } + else + { + filmstrip.InfoImageFileName = ""; + } + }*/ + private void OnItemSelected(GUIListItem item, GUIControl parent) + { + GUIPrograms.ThumbnailPath = ""; + if (item.ThumbnailImage != "" + && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png" + && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultAlbum.png" + ) + { + // only show big thumb if there is really one.... + GUIPrograms.ThumbnailPath = item.ThumbnailImage; + } + } + + public virtual void OnSort(GUIFacadeControl view, bool doSwitchState) + { + /* + * if (!filesAreLoaded) + { + LoadFiles(); + } + + if (doSwitchState) + { + dbPc.UpdateState(); + } + view.Sort(dbPc); + */ + } + + public virtual void OnSortToggle(GUIFacadeControl view) + { + dbPc.sortAscending = (!dbPc.sortAscending); + view.Sort(dbPc); + } + + public virtual int GetCurrentSortIndex() + { + return dbPc.CurrentSortMethodIndex; + } + + public virtual void SetCurrentSortIndex(int newValue) + { + dbPc.CurrentSortMethodIndex = newValue; + } + + public virtual string CurrentSortTitle() + { + return dbPc.CurrentSortMethodAsText; + } + + public virtual bool GetCurrentSortIsAscending() + { + return dbPc.sortAscending; + } + + public virtual void SetCurrentSortIsAscending(bool newValue) + { + dbPc.sortAscending = newValue; + } + + public virtual bool RefreshButtonVisible() + { + return false; // otherwise, override this in child class + } + + public virtual bool FileEditorAllowed() + { + return true; // otherwise, override this in child class + } + + public virtual bool FileAddAllowed() + { + return true; // otherwise, override this in child class + } + + public virtual bool FilesCanBeFavourites() + { + return true; // otherwise, override this in child class + } + + public virtual bool FileBrowseAllowed() + { + // set this to true, if SUBDIRECTORIES are allowed + // (example: possible for DIRECTORY-CACHE) + return false; // otherwise, override this in child class + } + + public virtual bool SubItemsAllowed() + { + return false; + } + + public virtual bool ProfileLoadingAllowed() + { + return false; + } + + public virtual void Refresh(bool mpGuiMode) + { + // descendant classes do that! + } + + + public virtual void OnInfo(GUIListItem item, ref bool isOverviewVisible, ref ProgramInfoAction modalResult, ref int selectedFileID) + { + GUIFileInfo fileInfoDialog = (GUIFileInfo)GUIWindowManager.GetWindow(ProgramUtils.ProgramInfoID); + if (null != fileInfoDialog) + { + if (item.MusicTag == null) + { + return; + } + FileItem curFile = (FileItem)item.MusicTag; + fileInfoDialog.App = this; + fileInfoDialog.File = curFile; + fileInfoDialog.IsOverviewVisible = isOverviewVisible; + fileInfoDialog.DoModal(GetID); + isOverviewVisible = fileInfoDialog.IsOverviewVisible; + modalResult = fileInfoDialog.ModalResult; + selectedFileID = fileInfoDialog.SelectedFileID; + return; + } + } + + public int AppID + { + get { return appID; } + set { appID = value; } + } + + public int FatherID + { + get { return fatherID; } + set { fatherID = value; } + } + + public string Title + { + get { return title; } + set { title = value; } + } + + public string ShortTitle + { + get { return shortTitle; } + set { shortTitle = value; } + } + + public string Filename + { + get { return filename; } + set { filename = value; } + } + + public string Arguments + { + get { return arguments; } + set { arguments = value; } + } + + public bool UseQuotes + { + get { return useQuotes; } + set { useQuotes = value; } + } + + public bool UseShellExecute + { + get { return useShellExecute; } + set { useShellExecute = value; } + } + + public bool Enabled + { + get { return enabled; } + set { enabled = value; } + } + + public ProcessWindowStyle WindowStyle + { + get { return windowStyle; } + set { windowStyle = value; } + } + + public string Startupdir + { + get { return startupDir; } + set { startupDir = value; } + } + + public string FileDirectory + { + get { return fileDirectory; } + set { fileDirectory = value; } + } + + public string ImageDirectory + { + get { return imageDirectories; } + set { SetImageDirectory(value); } + } + + private void SetImageDirectory(string value) + { + imageDirectories = value; + imageDirs = imageDirectories.Split(';'); + for (int i = 0; i < imageDirs.Length; i++) + { + imageDirs[i] = imageDirs[i].Trim(); + // hack the \n away.... + // imageDirs[i] = imageDirs[i].TrimStart('\n'); + // hack trailing backslashes away + imageDirs[i] = imageDirs[i].TrimEnd('\\'); + } + } + + public string Imagefile + { + get { return imageFile; } + set { imageFile = value; } + } + + public string Source + { + get { return sourceFile; } + set { sourceFile = value; } + } + + public ApplicationType SourceType + { + get { return sourceType; } + set { ... [truncated message content] |
From: <che...@us...> - 2007-06-16 15:44:14
|
Revision: 560 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=560&view=rev Author: chef_koch Date: 2007-06-16 08:44:09 -0700 (Sat, 16 Jun 2007) Log Message: ----------- renamed property from Startupdir to StartupDir Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-16 13:27:16 UTC (rev 559) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-16 15:44:09 UTC (rev 560) @@ -139,7 +139,7 @@ get { return windowStyle; } set { windowStyle = value; } } - public string Startupdir + public string StartupDir { get { return startupDir; } set { startupDir = value; } @@ -478,7 +478,7 @@ procStart.Arguments = procStart.Arguments.Replace("%FILE%", curFilename); } } - procStart.WorkingDirectory = Startupdir; + procStart.WorkingDirectory = StartupDir; if (procStart.WorkingDirectory.IndexOf("%FILEDIR%") != -1) { procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); @@ -493,15 +493,15 @@ procStart.WorkingDirectory = Path.GetFullPath(curFile.Filename); - if (Startupdir != "") + if (StartupDir != "") { - if (Startupdir.Contains("%FILEDIR%")) + if (StartupDir.Contains("%FILEDIR%")) { procStart.WorkingDirectory = procStart.WorkingDirectory.Replace("%FILEDIR%", Path.GetDirectoryName(curFile.Filename)); } else { - procStart.WorkingDirectory = Startupdir; + procStart.WorkingDirectory = StartupDir; } } @@ -901,7 +901,7 @@ AppID = GetNewAppID(); // important to avoid subsequent inserts! string sql = String.Format("insert into tblApplicationItem (appid, fatherID, title, shorttitle, filename, arguments, windowstyle, startupdir, useshellexecute, usequotes, source_type, source, imagefile, filedirectory, imagedirectory, validextensions, importvalidimagesonly, iposition, enabled, enableGUIRefresh, GUIRefreshPossible, pincode, contentID, systemDefault, WaitForExit, preLaunch, postLaunch) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}', '{17}', '{18}', '{19}', '{20}', '{21}', '{22}', '{23}', '{24}', '{25}', '{26}')", AppID, FatherID, ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), - ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(Startupdir), ProgramUtils.BooleanToStr(UseShellExecute), + ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(StartupDir), ProgramUtils.BooleanToStr(UseShellExecute), ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), ProgramUtils.Encode(FileDirectory), ProgramUtils.Encode(ImageDirectory), ProgramUtils.Encode(ValidExtensions), ProgramUtils.BooleanToStr(importValidImagesOnly), Position, ProgramUtils.BooleanToStr(Enabled), ProgramUtils.BooleanToStr(EnableGUIRefresh), ProgramUtils.BooleanToStr(GUIRefreshPossible), Pincode, @@ -931,7 +931,7 @@ { sql = String.Format("update tblApplicationItem set title = '{0}', shorttitle = '{1}', filename = '{2}', arguments = '{3}', windowstyle = '{4}', startupdir = '{5}', useshellexecute = '{6}', usequotes = '{7}', source_type = '{8}', source = '{9}', imagefile = '{10}',filedirectory = '{11}',imagedirectory = '{12}',validextensions = '{13}',importvalidimagesonly = '{14}',iposition = {15}, enabled = '{16}', fatherID = '{17}', enableGUIRefresh = '{18}', GUIRefreshPossible = '{19}', pincode = '{20}', contentID = '{21}', systemDefault = '{22}', WaitForExit = '{23}', preLaunch = '{24}', postLaunch = '{25}' where appID = {26}", ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), - ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(Startupdir), ProgramUtils.BooleanToStr(UseShellExecute), + ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(StartupDir), ProgramUtils.BooleanToStr(UseShellExecute), ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), ProgramUtils.Encode(FileDirectory), ProgramUtils.Encode(ImageDirectory), ProgramUtils.Encode(ValidExtensions), ProgramUtils.BooleanToStr(importValidImagesOnly), Position, ProgramUtils.BooleanToStr(Enabled), FatherID, ProgramUtils.BooleanToStr(EnableGUIRefresh), ProgramUtils.BooleanToStr(GUIRefreshPossible), @@ -1104,7 +1104,7 @@ this.Filename = sourceApp.Filename; this.Arguments = sourceApp.Arguments; this.WindowStyle = sourceApp.WindowStyle; - this.Startupdir = sourceApp.Startupdir; + this.StartupDir = sourceApp.StartupDir; this.UseShellExecute = sourceApp.UseShellExecute; this.UseQuotes = sourceApp.UseQuotes; this.SourceType = sourceApp.SourceType; @@ -1263,7 +1263,7 @@ XmlNode startupDirNode = node.SelectSingleNode("startupDir"); if (startupDirNode != null) { - this.Startupdir = startupDirNode.InnerText; + this.StartupDir = startupDirNode.InnerText; } XmlNode useQuotesNode = node.SelectSingleNode("useQuotes"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-16 13:27:16 UTC (rev 559) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-16 15:44:09 UTC (rev 560) @@ -64,7 +64,7 @@ newApp.Filename = ProgramUtils.Get(results, recordIndex, "filename"); newApp.Arguments = ProgramUtils.Get(results, recordIndex, "arguments"); newApp.WindowStyle = ProgramUtils.GetProcessWindowStyle(results, recordIndex, "windowstyle"); - newApp.Startupdir = ProgramUtils.Get(results, recordIndex, "startupdir"); + newApp.StartupDir = ProgramUtils.Get(results, recordIndex, "startupdir"); newApp.UseShellExecute = ProgramUtils.GetBool(results, recordIndex, "useshellexecute"); newApp.UseQuotes = ProgramUtils.GetBool(results, recordIndex, "usequotes"); newApp.SourceType = ProgramUtils.GetSourceType(results, recordIndex, "source_type"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-06-16 13:27:16 UTC (rev 559) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-06-16 15:44:09 UTC (rev 560) @@ -53,7 +53,7 @@ applicationExeTextBox.Text = curApp.Filename; applicationArgumentsTextBox.Text = curApp.Arguments; SetWindowStyle(curApp.WindowStyle); - startupDirComboBox.Text = curApp.Startupdir; + startupDirComboBox.Text = curApp.StartupDir; shellexecuteCheckBox.Checked = (curApp.UseShellExecute); quoteCheckBox.Checked = (curApp.UseQuotes); waitExitCheckBox.Checked = (curApp.WaitForExit); @@ -70,7 +70,7 @@ curApp.Filename = applicationExeTextBox.Text; curApp.Arguments = applicationArgumentsTextBox.Text; curApp.WindowStyle = GetSelectedWindowStyle(); - curApp.Startupdir = startupDirComboBox.Text; + curApp.StartupDir = startupDirComboBox.Text; curApp.UseShellExecute = (shellexecuteCheckBox.Checked); curApp.UseQuotes = (quoteCheckBox.Checked); curApp.WaitForExit = (waitExitCheckBox.Checked); @@ -107,7 +107,7 @@ applicationArgumentsTextBox.Text = applicationItem.Arguments; SetWindowStyle(applicationItem.WindowStyle); - startupDirComboBox.Text = applicationItem.Startupdir; + startupDirComboBox.Text = applicationItem.StartupDir; shellexecuteCheckBox.Checked = applicationItem.UseShellExecute; quoteCheckBox.Checked = applicationItem.UseQuotes; waitExitCheckBox.Checked = applicationItem.WaitForExit; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-06-16 13:27:16 UTC (rev 559) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-06-16 15:44:09 UTC (rev 560) @@ -65,7 +65,7 @@ this.titleTextBox.Text = curApp.Title; this.applicationExeTextBox.Text = curApp.Filename; this.applicationArgumentsTextBox.Text = curApp.Arguments; - this.startupDirComboBox.Text = curApp.Startupdir; + this.startupDirComboBox.Text = curApp.StartupDir; this.quoteCheckBox.Checked = true; //(curApp.UseQuotes); this.waitExitCheckBox.Checked = (curApp.WaitForExit); @@ -85,7 +85,7 @@ curApp.Filename = this.applicationExeTextBox.Text; curApp.Arguments = this.applicationArgumentsTextBox.Text; curApp.WindowStyle = GetSelectedWindowStyle(); - curApp.Startupdir = this.startupDirComboBox.Text; + curApp.StartupDir = this.startupDirComboBox.Text; curApp.UseShellExecute = (this.shellexecuteCheckBox.Checked); curApp.UseQuotes = (this.quoteCheckBox.Checked); curApp.WaitForExit = (this.waitExitCheckBox.Checked); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-20 12:09:33
|
Revision: 570 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=570&view=rev Author: chef_koch Date: 2007-06-20 05:09:31 -0700 (Wed, 20 Jun 2007) Log Message: ----------- - uncommented the directx.device reset, it is needed sometimes after Project64 was closed, (no problems with snes9x) - in consequence of the device reset, the screen keeps black -> this is fixed by changing the conditions in RefreshThumbnail() Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-19 19:47:03 UTC (rev 569) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-20 12:09:31 UTC (rev 570) @@ -504,7 +504,7 @@ if (mpGuiMode) { - //GUIGraphicsContext.DX9Device.Reset(GUIGraphicsContext.DX9Device.PresentationParameters); + GUIGraphicsContext.DX9Device.Reset(GUIGraphicsContext.DX9Device.PresentationParameters); AutoPlay.StartListening(); } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-19 19:47:03 UTC (rev 569) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-20 12:09:31 UTC (rev 570) @@ -1090,16 +1090,12 @@ GUIListItem item = GetSelectedItem(); // some preconditions... + if (item == null) return; if (appWithImg == null) { - if ((item != null) && (item.MusicTag != null) && (item.MusicTag is ApplicationItem)) - { - appWithImg = (ApplicationItem)(item.MusicTag); - } - else - { - return; - } + if (item.MusicTag == null) return; + appWithImg = item.MusicTag as ApplicationItem; + if (appWithImg == null) return; } ThumbnailPath = ""; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-20 18:20:59
|
Revision: 576 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=576&view=rev Author: chef_koch Date: 2007-06-20 11:20:58 -0700 (Wed, 20 Jun 2007) Log Message: ----------- fixed: changing view did not refresh an appItem's fileList if this appItem was not active on view change Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-20 17:57:17 UTC (rev 575) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-20 18:20:58 UTC (rev 576) @@ -65,6 +65,7 @@ bool enableGUIRefresh; int appPosition; + string currentView = ""; public bool filesAreLoaded = false; // load on demand.... protected FileItemList fileList = null; public bool linksAreLoaded = false; // load on demand.... @@ -195,6 +196,12 @@ set { appPosition = value; } } + + public string CurrentView + { + get { return currentView; } + set { currentView = value; } + } public FileItemList Files { // load on demand.... Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-20 17:57:17 UTC (rev 575) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-20 18:20:58 UTC (rev 576) @@ -521,16 +521,8 @@ } set { - if (value == null || value == "") - { - currentView = ""; - DatabaseSettings.viewHandler.CurrentView = null; - } - else - { - currentView = value; - DatabaseSettings.viewHandler.CurrentView = value; - } + currentView = value; + DatabaseSettings.viewHandler.CurrentView = value; } } @@ -999,6 +991,13 @@ { if (lastApp == null) return 0; + // Refresh FileList if view has changed, while this appItem was not active + if (lastApp.CurrentView != this.CurrentView) + { + lastApp.LoadFiles(); + lastApp.CurrentView = this.CurrentView; + } + int totalFiles = lastApp.DisplayFiles(this.lastFilepath, facadeView); return (totalFiles); } @@ -1436,10 +1435,6 @@ } } } - if (lastApp != null) - { - lastApp.LoadFiles(); - } UpdateButtons(); UpdateListControl(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-21 22:46:40
|
Revision: 587 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=587&view=rev Author: chef_koch Date: 2007-06-21 15:46:34 -0700 (Thu, 21 Jun 2007) Log Message: ----------- moved button images to global properties file, no need to store it for each button anymore Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.resx Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-06-21 22:04:32 UTC (rev 586) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-06-21 22:46:34 UTC (rev 587) @@ -82,8 +82,8 @@ this.fileListView.TabIndex = 1; this.fileListView.UseCompatibleStateImageBehavior = false; this.fileListView.View = System.Windows.Forms.View.Details; + this.fileListView.SelectedIndexChanged += new System.EventHandler(this.fileListView_SelectedIndexChanged); this.fileListView.DoubleClick += new System.EventHandler(this.fileListView_DoubleClick); - this.fileListView.SelectedIndexChanged += new System.EventHandler(this.fileListView_SelectedIndexChanged); // // fileTitle // @@ -183,13 +183,13 @@ this.contextFavouritesMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.grouperToolStripMenuItem}); this.contextFavouritesMenuStrip.Name = "contextFavouritesMenuStrip"; - this.contextFavouritesMenuStrip.Size = new System.Drawing.Size(118, 26); + this.contextFavouritesMenuStrip.Size = new System.Drawing.Size(125, 26); this.contextFavouritesMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextFavouritesMenuStrip_Opening); // // grouperToolStripMenuItem // this.grouperToolStripMenuItem.Name = "grouperToolStripMenuItem"; - this.grouperToolStripMenuItem.Size = new System.Drawing.Size(117, 22); + this.grouperToolStripMenuItem.Size = new System.Drawing.Size(124, 22); this.grouperToolStripMenuItem.Text = "Grouper"; // // fileExtensionsTextBox @@ -197,7 +197,7 @@ this.fileExtensionsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.fileExtensionsTextBox.Location = new System.Drawing.Point(85, 71); this.fileExtensionsTextBox.Name = "fileExtensionsTextBox"; - this.fileExtensionsTextBox.Size = new System.Drawing.Size(330, 20); + this.fileExtensionsTextBox.Size = new System.Drawing.Size(330, 21); this.fileExtensionsTextBox.TabIndex = 28; // // imageDirsTextBox @@ -205,7 +205,7 @@ this.imageDirsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.imageDirsTextBox.Location = new System.Drawing.Point(85, 45); this.imageDirsTextBox.Name = "imageDirsTextBox"; - this.imageDirsTextBox.Size = new System.Drawing.Size(330, 20); + this.imageDirsTextBox.Size = new System.Drawing.Size(330, 21); this.imageDirsTextBox.TabIndex = 27; // // fileDirTextBox @@ -213,12 +213,12 @@ this.fileDirTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.fileDirTextBox.Location = new System.Drawing.Point(85, 19); this.fileDirTextBox.Name = "fileDirTextBox"; - this.fileDirTextBox.Size = new System.Drawing.Size(330, 20); + this.fileDirTextBox.Size = new System.Drawing.Size(330, 21); this.fileDirTextBox.TabIndex = 26; // // fileDirButton // - this.fileDirButton.Image = ((System.Drawing.Image)(resources.GetObject("fileDirButton.Image"))); + this.fileDirButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; this.fileDirButton.Location = new System.Drawing.Point(426, 16); this.fileDirButton.Name = "fileDirButton"; this.fileDirButton.Size = new System.Drawing.Size(31, 23); @@ -228,7 +228,7 @@ // // fileExtensionsbutton // - this.fileExtensionsbutton.Image = ((System.Drawing.Image)(resources.GetObject("fileExtensionsbutton.Image"))); + this.fileExtensionsbutton.Image = global::GUIPrograms.Properties.Resources.searchButton_Image; this.fileExtensionsbutton.Location = new System.Drawing.Point(426, 68); this.fileExtensionsbutton.Name = "fileExtensionsbutton"; this.fileExtensionsbutton.Size = new System.Drawing.Size(31, 23); @@ -238,7 +238,7 @@ // // imageDirButton // - this.imageDirButton.Image = ((System.Drawing.Image)(resources.GetObject("imageDirButton.Image"))); + this.imageDirButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; this.imageDirButton.Location = new System.Drawing.Point(426, 42); this.imageDirButton.Name = "imageDirButton"; this.imageDirButton.Size = new System.Drawing.Size(31, 23); @@ -302,7 +302,7 @@ this.importPlaychoiceCheckBox.AutoSize = true; this.importPlaychoiceCheckBox.Location = new System.Drawing.Point(299, 345); this.importPlaychoiceCheckBox.Name = "importPlaychoiceCheckBox"; - this.importPlaychoiceCheckBox.Size = new System.Drawing.Size(161, 17); + this.importPlaychoiceCheckBox.Size = new System.Drawing.Size(160, 17); this.importPlaychoiceCheckBox.TabIndex = 87; this.importPlaychoiceCheckBox.Text = "Import Playchoice/Vs games"; this.importPlaychoiceCheckBox.UseVisualStyleBackColor = true; @@ -312,7 +312,7 @@ this.importMahjongCheckBox.AutoSize = true; this.importMahjongCheckBox.Location = new System.Drawing.Point(299, 321); this.importMahjongCheckBox.Name = "importMahjongCheckBox"; - this.importMahjongCheckBox.Size = new System.Drawing.Size(133, 17); + this.importMahjongCheckBox.Size = new System.Drawing.Size(136, 17); this.importMahjongCheckBox.TabIndex = 86; this.importMahjongCheckBox.Text = "Import Mahjong games"; this.importMahjongCheckBox.UseVisualStyleBackColor = true; @@ -322,7 +322,7 @@ this.validImagesCheckBox.AutoSize = true; this.validImagesCheckBox.Location = new System.Drawing.Point(299, 275); this.validImagesCheckBox.Name = "validImagesCheckBox"; - this.validImagesCheckBox.Size = new System.Drawing.Size(151, 17); + this.validImagesCheckBox.Size = new System.Drawing.Size(154, 17); this.validImagesCheckBox.TabIndex = 84; this.validImagesCheckBox.Text = "Only files with valid images"; this.validImagesCheckBox.UseVisualStyleBackColor = true; @@ -332,7 +332,7 @@ this.importOriginalsCheckBox.AutoSize = true; this.importOriginalsCheckBox.Location = new System.Drawing.Point(299, 298); this.importOriginalsCheckBox.Name = "importOriginalsCheckBox"; - this.importOriginalsCheckBox.Size = new System.Drawing.Size(119, 17); + this.importOriginalsCheckBox.Size = new System.Drawing.Size(123, 17); this.importOriginalsCheckBox.TabIndex = 85; this.importOriginalsCheckBox.Text = "Only import originals"; this.importOriginalsCheckBox.UseVisualStyleBackColor = true; @@ -365,7 +365,7 @@ this.gamebaseDBTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.gamebaseDBTextBox.Location = new System.Drawing.Point(85, 96); this.gamebaseDBTextBox.Name = "gamebaseDBTextBox"; - this.gamebaseDBTextBox.Size = new System.Drawing.Size(330, 20); + this.gamebaseDBTextBox.Size = new System.Drawing.Size(330, 21); this.gamebaseDBTextBox.TabIndex = 89; this.toolTip.SetToolTip(this.gamebaseDBTextBox, "Select a gamebase (*.mdb) file to import\r\n"); // @@ -379,6 +379,7 @@ // // gamebaseDBButton // + this.gamebaseDBButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; this.gamebaseDBButton.Location = new System.Drawing.Point(426, 93); this.gamebaseDBButton.Name = "gamebaseDBButton"; this.gamebaseDBButton.Size = new System.Drawing.Size(31, 23); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx 2007-06-21 22:04:32 UTC (rev 586) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.resx 2007-06-21 22:46:34 UTC (rev 587) @@ -172,46 +172,6 @@ <metadata name="contextFavouritesMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="fileDirButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAahJREFUOE+dkktL - AlEYhkdK+gH9kX5CWzdtIigiWpRtDIqIIEpyEVSLoAtEmzASiaiIcNFlE0WGZJQpBoJWhpKX0bTUyktf - 8x4544zjIhJe5szxe57vO0d1Kc8cCXWfkr4i6EtNbBdrXaEsNOtbhNa2SV19rRB3W4jKx/RTPJRT+d4n - pJzbrD7zdnoPrRJqGwoAKyGA1VipmN1ggeTVNaUVYJMLOCSDmTUqIpLgK73eWPByMSqPybsxSMpXcoU+ - YwvsWYgvUcQ5oZ0AAoyHMIEEfqeWq2BiUU7SaybUau7g+WxYBUPA4UJsjq1z0XkKn49QzD9LHoeJnty2 - mihw1M8EOCMfGSCSj8zQR9jCEjw1MhHWru1BtYBdknROjKyEIeASNMo+mkkURXJuGWuCB0dPFcZFSV15 - Rw5ngmMMRN1bYFwr8B10yqMDBghIGQhQl/abtIL7vQ72E+F8yq5cgK4QoE70DlDfSUh9hNsdAxPw0VGs - 7A4B3lGXvOslg91Hl9ah2h1c29rlCSCBoF6Cd9QlbrooetVNN7vTagG+/EvQWQVr/lX/2PgFSHRoW2Mt - IzAAAAAASUVORK5CYII= -</value> - </data> - <data name="fileExtensionsbutton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAARlJREFUOE/FkkFr - wkAQhddfIb2W0l/gyZP/zkPrOeSgiMSKNmqgQYgQtBbFQw9FkFZpi3qRgIhie37yEtdadRN6amBgN/Pe - NzOZxETE0+494/N9LDxv7ivj8QtxeXUtUslELMorSlYT2bKN6uMrHgZrP3jmO+ZCAaxMUWcCP4YeMF0B - H8vgTgg1SkiucAen/4buLDB5X0EsvgNQ+2WCYqWuBqRvMvukNNMoozXa4FBz0slt5gfApGyf3XCcp/EG - x5pfED1fPGmPZgngeBxT+Q3shoOa7SgFpZodvgVd1/0Wz0HurQZYQFndMAwQwKCQd8IYPIfuX9M0mKYZ - LTxHYQXXdUFI5G96LJDm0NWoqP9nZkdyXX+eeWfYAqIDETY5OFC+AAAAAElFTkSuQmCC -</value> - </data> - <data name="imageDirButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAahJREFUOE+dkktL - AlEYhkdK+gH9kX5CWzdtIigiWpRtDIqIIEpyEVSLoAtEmzASiaiIcNFlE0WGZJQpBoJWhpKX0bTUyktf - 8x4544zjIhJe5szxe57vO0d1Kc8cCXWfkr4i6EtNbBdrXaEsNOtbhNa2SV19rRB3W4jKx/RTPJRT+d4n - pJzbrD7zdnoPrRJqGwoAKyGA1VipmN1ggeTVNaUVYJMLOCSDmTUqIpLgK73eWPByMSqPybsxSMpXcoU+ - YwvsWYgvUcQ5oZ0AAoyHMIEEfqeWq2BiUU7SaybUau7g+WxYBUPA4UJsjq1z0XkKn49QzD9LHoeJnty2 - mihw1M8EOCMfGSCSj8zQR9jCEjw1MhHWru1BtYBdknROjKyEIeASNMo+mkkURXJuGWuCB0dPFcZFSV15 - Rw5ngmMMRN1bYFwr8B10yqMDBghIGQhQl/abtIL7vQ72E+F8yq5cgK4QoE70DlDfSUh9hNsdAxPw0VGs - 7A4B3lGXvOslg91Hl9ah2h1c29rlCSCBoF6Cd9QlbrooetVNN7vTagG+/EvQWQVr/lX/2PgFSHRoW2Mt - IzAAAAAASUVORK5CYII= -</value> - </data> <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>353, 17</value> </metadata> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-06-21 22:04:32 UTC (rev 586) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-06-21 22:46:34 UTC (rev 587) @@ -29,7 +29,6 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AppSettingsBase)); this.winTypeLabel = new System.Windows.Forms.Label(); this.enabledCheckbox = new System.Windows.Forms.CheckBox(); this.titleLabel = new System.Windows.Forms.Label(); @@ -106,7 +105,7 @@ // // applicationExeButton // - this.applicationExeButton.Image = ((System.Drawing.Image)(resources.GetObject("applicationExeButton.Image"))); + this.applicationExeButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; this.applicationExeButton.Location = new System.Drawing.Point(427, 69); this.applicationExeButton.Name = "applicationExeButton"; this.applicationExeButton.Size = new System.Drawing.Size(31, 23); @@ -214,7 +213,7 @@ // // applicationImageButton // - this.applicationImageButton.Image = ((System.Drawing.Image)(resources.GetObject("applicationImageButton.Image"))); + this.applicationImageButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; this.applicationImageButton.Location = new System.Drawing.Point(427, 94); this.applicationImageButton.Name = "applicationImageButton"; this.applicationImageButton.Size = new System.Drawing.Size(31, 23); @@ -224,7 +223,7 @@ // // startupDirButton // - this.startupDirButton.Image = ((System.Drawing.Image)(resources.GetObject("startupDirButton.Image"))); + this.startupDirButton.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; this.startupDirButton.Location = new System.Drawing.Point(427, 174); this.startupDirButton.Name = "startupDirButton"; this.startupDirButton.Size = new System.Drawing.Size(31, 23); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.resx 2007-06-21 22:04:32 UTC (rev 586) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.resx 2007-06-21 22:46:34 UTC (rev 587) @@ -117,49 +117,6 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="applicationExeButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAahJREFUOE+dkktL - AlEYhkdK+gH9kX5CWzdtIigiWpRtDIqIIEpyEVSLoAtEmzASiaiIcNFlE0WGZJQpBoJWhpKX0bTUyktf - 8x4544zjIhJe5szxe57vO0d1Kc8cCXWfkr4i6EtNbBdrXaEsNOtbhNa2SV19rRB3W4jKx/RTPJRT+d4n - pJzbrD7zdnoPrRJqGwoAKyGA1VipmN1ggeTVNaUVYJMLOCSDmTUqIpLgK73eWPByMSqPybsxSMpXcoU+ - YwvsWYgvUcQ5oZ0AAoyHMIEEfqeWq2BiUU7SaybUau7g+WxYBUPA4UJsjq1z0XkKn49QzD9LHoeJnty2 - mihw1M8EOCMfGSCSj8zQR9jCEjw1MhHWru1BtYBdknROjKyEIeASNMo+mkkURXJuGWuCB0dPFcZFSV15 - Rw5ngmMMRN1bYFwr8B10yqMDBghIGQhQl/abtIL7vQ72E+F8yq5cgK4QoE70DlDfSUh9hNsdAxPw0VGs - 7A4B3lGXvOslg91Hl9ah2h1c29rlCSCBoF6Cd9QlbrooetVNN7vTagG+/EvQWQVr/lX/2PgFSHRoW2Mt - IzAAAAAASUVORK5CYII= -</value> - </data> - <data name="applicationImageButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAahJREFUOE+dkktL - AlEYhkdK+gH9kX5CWzdtIigiWpRtDIqIIEpyEVSLoAtEmzASiaiIcNFlE0WGZJQpBoJWhpKX0bTUyktf - 8x4544zjIhJe5szxe57vO0d1Kc8cCXWfkr4i6EtNbBdrXaEsNOtbhNa2SV19rRB3W4jKx/RTPJRT+d4n - pJzbrD7zdnoPrRJqGwoAKyGA1VipmN1ggeTVNaUVYJMLOCSDmTUqIpLgK73eWPByMSqPybsxSMpXcoU+ - YwvsWYgvUcQ5oZ0AAoyHMIEEfqeWq2BiUU7SaybUau7g+WxYBUPA4UJsjq1z0XkKn49QzD9LHoeJnty2 - mihw1M8EOCMfGSCSj8zQR9jCEjw1MhHWru1BtYBdknROjKyEIeASNMo+mkkURXJuGWuCB0dPFcZFSV15 - Rw5ngmMMRN1bYFwr8B10yqMDBghIGQhQl/abtIL7vQ72E+F8yq5cgK4QoE70DlDfSUh9hNsdAxPw0VGs - 7A4B3lGXvOslg91Hl9ah2h1c29rlCSCBoF6Cd9QlbrooetVNN7vTagG+/EvQWQVr/lX/2PgFSHRoW2Mt - IzAAAAAASUVORK5CYII= -</value> - </data> - <data name="startupDirButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAahJREFUOE+dkktL - AlEYhkdK+gH9kX5CWzdtIigiWpRtDIqIIEpyEVSLoAtEmzASiaiIcNFlE0WGZJQpBoJWhpKX0bTUyktf - 8x4544zjIhJe5szxe57vO0d1Kc8cCXWfkr4i6EtNbBdrXaEsNOtbhNa2SV19rRB3W4jKx/RTPJRT+d4n - pJzbrD7zdnoPrRJqGwoAKyGA1VipmN1ggeTVNaUVYJMLOCSDmTUqIpLgK73eWPByMSqPybsxSMpXcoU+ - YwvsWYgvUcQ5oZ0AAoyHMIEEfqeWq2BiUU7SaybUau7g+WxYBUPA4UJsjq1z0XkKn49QzD9LHoeJnty2 - mihw1M8EOCMfGSCSj8zQR9jCEjw1MhHWru1BtYBdknROjKyEIeASNMo+mkkURXJuGWuCB0dPFcZFSV15 - Rw5ngmMMRN1bYFwr8B10yqMDBghIGQhQl/abtIL7vQ72E+F8yq5cgK4QoE70DlDfSUh9hNsdAxPw0VGs - 7A4B3lGXvOslg91Hl9ah2h1c29rlCSCBoF6Cd9QlbrooetVNN7vTagG+/EvQWQVr/lX/2PgFSHRoW2Mt - IzAAAAAASUVORK5CYII= -</value> - </data> <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs 2007-06-21 22:04:32 UTC (rev 586) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.Designer.cs 2007-06-21 22:46:34 UTC (rev 587) @@ -29,7 +29,6 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileDetailsForm)); this.gameinfoURLTextBox = new System.Windows.Forms.TextBox(); this.gameInfoURLLabel = new System.Windows.Forms.Label(); this.buttonViewImg = new MediaPortal.UserInterface.Controls.MPButton(); @@ -95,7 +94,7 @@ // buttonViewImg // this.buttonViewImg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonViewImg.Image = ((System.Drawing.Image)(resources.GetObject("buttonViewImg.Image"))); + this.buttonViewImg.Image = global::GUIPrograms.Properties.Resources.previewButton_Image; this.buttonViewImg.Location = new System.Drawing.Point(440, 103); this.buttonViewImg.Name = "buttonViewImg"; this.buttonViewImg.Size = new System.Drawing.Size(20, 22); @@ -393,7 +392,7 @@ // btnImageFile // this.btnImageFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnImageFile.Image = ((System.Drawing.Image)(resources.GetObject("btnImageFile.Image"))); + this.btnImageFile.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; this.btnImageFile.Location = new System.Drawing.Point(476, 103); this.btnImageFile.Name = "btnImageFile"; this.btnImageFile.Size = new System.Drawing.Size(20, 22); @@ -450,7 +449,7 @@ // btnFilename // this.btnFilename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnFilename.Image = ((System.Drawing.Image)(resources.GetObject("btnFilename.Image"))); + this.btnFilename.Image = global::GUIPrograms.Properties.Resources.browseButton_Image; this.btnFilename.Location = new System.Drawing.Point(476, 52); this.btnFilename.Name = "btnFilename"; this.btnFilename.Size = new System.Drawing.Size(20, 21); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.resx 2007-06-21 22:04:32 UTC (rev 586) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.resx 2007-06-21 22:46:34 UTC (rev 587) @@ -117,62 +117,9 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="buttonViewImg.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - Qk2qAwAAAAAAADYAAAAoAAAAEQAAABEAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA2Ons2Ons - 2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2OnsB9jp7ICAgAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjp7AfY6eyAgIAA//8AgAAAgAAA//8AAAAA - //8AgAAAAAAAgAAA//8AAAD//wAA//8AAADY6ewH2OnsgICAAAAAAP////8AAAAAAP//AIAAAAAA//8A - AP//AAAAAIAAAP//AAAAAAAA2OnsB9jp7ICAgP//AAAAAAD//wCAAP//AACAAAD//wCAgAAAAACAAAD/ - /wAAAP//AAAAANjp7AfY6eyAgID//////wAAAAAA//8A//8AAAAAgAAAAAAA//8AgAAAAAD//wD///8A - AADY6ewH2OnsgICA//8A//////8AAAAA//8AAP//AAAA////AAAAAAAA//8A//////8AAAAA2OnsB9jp - 7ICAgP//////AP//////AAAAAAAAAP//////AP//////AP//////AP///wAAANjp7AfY6eyAgID//wD/ - /////wD//////wD//////wD//////wD//////wD//////wAAAADY6ewH2OnsgICA//////8A//////8A - //////8A//////8A////AAAAAAAA//8A////AAAA2OnsB9jp7ICAgP//AP//////AP//////AP////// - AP///wAAAP///wD//wAAAP//AAAAANjp7AfY6eyAgID//////wD//////wD//////wD//////wAAAAAA - //////8AAAD///8AAADY6ewH2OnsgICA//8A//////8A//////8A//////8A//////8AAAAAAAAA//// - //8AAAAA2OnsB9jp7ICAgP//////AP//////AP//////AP//////AP//////AP//////AP///wAAANjp - 7AfY6eyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6ewH2Ons2Ons - 2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2OnsB9jp7Njp7Njp7Njp7Njp - 7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7D8= -</value> - </data> <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <data name="btnImageFile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - Qk2mAgAAAAAAADYAAAAoAAAADwAAAA0AAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA////AAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICAQMDAQMDAQMDAQMDAQMDA - QMDAQMDAQMDAQMDAQMDAQMDAQMDAQMDAAAAAAAAAAICA////gMD/gP//gMD/gP//gMD/gP//gMD/gP// - gMD/gMD/gMD/QMDAAAAAAAAAAICA////gP//gP//gP//gMD/gP//gMD/gP//gMD/gP//gMD/gMD/QMDA - AAAAAAAAAICA////gP//gP//gP//gP//gP//gP//gMD/gP//gMD/gP//gMD/QMDAAAAAAAAAAICA//// - gP//gP//gP//gP//gP//gMD/gP//gMD/gP//gMD/gP//QMDAAAAAAAAAAICA////gP//gP//gP//gP// - gP//gP//gP//gP//gMD/gP//gMD/QMDAAAAAAAAAAICA////gP//gP//gP//gP//gP//gP//gP//gMD/ - gP//gMD/gP//QMDAAAAAAAAAAICA////gP//gP//gP//gP//gP//gP//gP//gP//gP//gP//gMD/QMDA - AAAAAAAAAICA////////////////////////////////////////////gP//QMDAAAAAAAAAAICAQMDA - QMDAQMDAQMDAQMDAQMDAQMDAAICAAICAAICAAICAAICAAICA////AAAA////AICA////////////gP// - gP//AICAAAAA////////////////////////AAAA////////AICAAICAAICAAICAAICAAAAA//////// - ////////////////////AAAA -</value> - </data> - <data name="btnFilename.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - Qk2mAgAAAAAAADYAAAAoAAAADwAAAA0AAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA////AAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAICAQMDAQMDAQMDAQMDAQMDA - QMDAQMDAQMDAQMDAQMDAQMDAQMDAQMDAAAAAAAAAAICA////gMD/gP//gMD/gP//gMD/gP//gMD/gP// - gMD/gMD/gMD/QMDAAAAAAAAAAICA////gP//gP//gP//gMD/gP//gMD/gP//gMD/gP//gMD/gMD/QMDA - AAAAAAAAAICA////gP//gP//gP//gP//gP//gP//gMD/gP//gMD/gP//gMD/QMDAAAAAAAAAAICA//// - gP//gP//gP//gP//gP//gMD/gP//gMD/gP//gMD/gP//QMDAAAAAAAAAAICA////gP//gP//gP//gP// - gP//gP//gP//gP//gMD/gP//gMD/QMDAAAAAAAAAAICA////gP//gP//gP//gP//gP//gP//gP//gMD/ - gP//gMD/gP//QMDAAAAAAAAAAICA////gP//gP//gP//gP//gP//gP//gP//gP//gP//gP//gMD/QMDA - AAAAAAAAAICA////////////////////////////////////////////gP//QMDAAAAAAAAAAICAQMDA - QMDAQMDAQMDAQMDAQMDAQMDAAICAAICAAICAAICAAICAAICA////AAAA////AICA////////////gP// - gP//AICAAAAA////////////////////////AAAA////////AICAAICAAICAAICAAICAAAAA//////// - ////////////////////AAAA -</value> - </data> <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>109, 17</value> </metadata> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-21 22:04:32 UTC (rev 586) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-21 22:46:34 UTC (rev 587) @@ -158,10 +158,19 @@ <Compile Include="ProgramUtils.cs" /> <Compile Include="ProgramViewHandler.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> </ItemGroup> <ItemGroup> + <None Include="buttonViewImg.Image.bmp" /> <Content Include="MetaData\myProgramsAltFileDetailsInfo.xml" /> <Content Include="MetaData\myProgramsAltPreconfiguration.xml" /> + <None Include="searchButton.Image.png" /> + <None Include="Resources\BrowseFileOrFolder_Image.png" /> + <None Include="Resources\applicationExeButton.Image.png" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="Design\AppFilesImportProgress.resx"> @@ -216,6 +225,11 @@ <SubType>Designer</SubType> <DependentUpon>ProgramViews.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.resx"> + <SubType>Designer</SubType> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.Designer.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.Designer.cs 2007-06-21 22:46:34 UTC (rev 587) @@ -0,0 +1,84 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:2.0.50727.1318 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace GUIPrograms.Properties { + using System; + + + /// <summary> + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// </summary> + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GUIPrograms.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + internal static System.Drawing.Bitmap browseButton_Image { + get { + object obj = ResourceManager.GetObject("browseButton_Image", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap previewButton_Image { + get { + object obj = ResourceManager.GetObject("previewButton_Image", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap searchButton_Image { + get { + object obj = ResourceManager.GetObject("searchButton_Image", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.resx (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.resx 2007-06-21 22:46:34 UTC (rev 587) @@ -0,0 +1,142 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="browseButton_Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAahJREFUOE+dkktL + AlEYhkdK+gH9kX5CWzdtIigiWpRtDIqIIEpyEVSLoAtEmzASiaiIcNFlE0WGZJQpBoJWhpKX0bTUyktf + 8x4544zjIhJe5szxe57vO0d1Kc8cCXWfkr4i6EtNbBdrXaEsNOtbhNa2SV19rRB3W4jKx/RTPJRT+d4n + pJzbrD7zdnoPrRJqGwoAKyGA1VipmN1ggeTVNaUVYJMLOCSDmTUqIpLgK73eWPByMSqPybsxSMpXcoU+ + YwvsWYgvUcQ5oZ0AAoyHMIEEfqeWq2BiUU7SaybUau7g+WxYBUPA4UJsjq1z0XkKn49QzD9LHoeJnty2 + mihw1M8EOCMfGSCSj8zQR9jCEjw1MhHWru1BtYBdknROjKyEIeASNMo+mkkURXJuGWuCB0dPFcZFSV15 + Rw5ngmMMRN1bYFwr8B10yqMDBghIGQhQl/abtIL7vQ72E+F8yq5cgK4QoE70DlDfSUh9hNsdAxPw0VGs + 7A4B3lGXvOslg91Hl9ah2h1c29rlCSCBoF6Cd9QlbrooetVNN7vTagG+/EvQWQVr/lX/2PgFSHRoW2Mt + IzAAAAAASUVORK5CYII= +</value> + </data> + <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="previewButton_Image" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\buttonViewImg.Image.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="searchButton_Image" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\searchButton.Image.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> +</root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-21 22:55:26
|
Revision: 588 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=588&view=rev Author: chef_koch Date: 2007-06-21 15:55:25 -0700 (Thu, 21 Jun 2007) Log Message: ----------- the resources were not embedded in global resources file Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.resx trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.resx Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-06-21 22:46:34 UTC (rev 587) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs 2007-06-21 22:55:25 UTC (rev 588) @@ -28,7 +28,6 @@ /// </summary> private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetupForm)); 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(); @@ -68,7 +67,7 @@ this.addApplicationToolStripMenuItem, this.deleteApplicationToolStripMenuItem}); this.addDeleteApplicationsToolStripMenuItem.Name = "addDeleteApplicationsToolStripMenuItem"; - this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size(146, 20); + this.addDeleteApplicationsToolStripMenuItem.Size = new System.Drawing.Size(132, 20); this.addDeleteApplicationsToolStripMenuItem.Text = "Add/Delete applications"; // // addApplicationToolStripMenuItem @@ -78,20 +77,20 @@ this.addGroupnodeToolStripMenuItem, this.extendedApplicationItemToolStripMenuItem}); this.addApplicationToolStripMenuItem.Name = "addApplicationToolStripMenuItem"; - this.addApplicationToolStripMenuItem.Size = new System.Drawing.Size(169, 22); + 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(208, 22); + 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(208, 22); + this.addGroupnodeToolStripMenuItem.Size = new System.Drawing.Size(207, 22); this.addGroupnodeToolStripMenuItem.Text = "Groupingtem"; this.addGroupnodeToolStripMenuItem.Click += new System.EventHandler(this.addGroupnodeToolStripMenuItem_Click); // @@ -101,28 +100,28 @@ this.mameImportToolStripMenuItem, this.importGamebaseItemToolStripMenuItem}); this.extendedApplicationItemToolStripMenuItem.Name = "extendedApplicationItemToolStripMenuItem"; - this.extendedApplicationItemToolStripMenuItem.Size = new System.Drawing.Size(208, 22); + this.extendedApplicationItemToolStripMenuItem.Size = new System.Drawing.Size(207, 22); this.extendedApplicationItemToolStripMenuItem.Text = "Extended applicationItem"; // // mameImportToolStripMenuItem // this.mameImportToolStripMenuItem.Name = "mameImportToolStripMenuItem"; - this.mameImportToolStripMenuItem.Size = new System.Drawing.Size(168, 22); + this.mameImportToolStripMenuItem.Size = new System.Drawing.Size(170, 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.Size = new System.Drawing.Size(170, 22); this.importGamebaseItemToolStripMenuItem.Text = "Import Gamebase"; this.importGamebaseItemToolStripMenuItem.Click += new System.EventHandler(this.importGamebaseItemToolStripMenuItem_Click); // // deleteApplicationToolStripMenuItem // - this.deleteApplicationToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("deleteApplicationToolStripMenuItem.Image"))); + this.deleteApplicationToolStripMenuItem.Image = global::GUIPrograms.Properties.Resources.deleteButton_Image; this.deleteApplicationToolStripMenuItem.Name = "deleteApplicationToolStripMenuItem"; - this.deleteApplicationToolStripMenuItem.Size = new System.Drawing.Size(169, 22); + this.deleteApplicationToolStripMenuItem.Size = new System.Drawing.Size(170, 22); this.deleteApplicationToolStripMenuItem.Text = "Delete application"; this.deleteApplicationToolStripMenuItem.Click += new System.EventHandler(this.deleteApplicationToolStripMenuItem_Click); // @@ -131,7 +130,7 @@ 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.Size = new System.Drawing.Size(44, 20); this.toolsStripMenuItem.Text = "Tools"; // // premadeConfigurationsToolStripMenuItem @@ -139,13 +138,13 @@ 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.Size = new System.Drawing.Size(155, 22); this.premadeConfigurationsToolStripMenuItem.Text = "Configurations"; // // emulatorSetupToolStripMenuItem // this.emulatorSetupToolStripMenuItem.Name = "emulatorSetupToolStripMenuItem"; - this.emulatorSetupToolStripMenuItem.Size = new System.Drawing.Size(155, 22); + this.emulatorSetupToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.emulatorSetupToolStripMenuItem.Text = "Emulator Setup"; // // treeView @@ -162,15 +161,15 @@ treeNode1}); 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.DragDrop += new System.Windows.Forms.DragEventHandler(this.treeView_DragDrop); 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.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView_NodeMouseClick); 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); + this.treeView.DragOver += new System.Windows.Forms.DragEventHandler(this.treeView_DragOver); // // tabControl // @@ -230,8 +229,8 @@ this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "SetupForm"; - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SetupForm_FormClosed); this.Load += new System.EventHandler(this.SetupForm_Load); + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SetupForm_FormClosed); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); this.tabControl.ResumeLayout(false); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.resx 2007-06-21 22:46:34 UTC (rev 587) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.resx 2007-06-21 22:55:25 UTC (rev 588) @@ -120,17 +120,4 @@ <metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="deleteApplicationToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAThJREFUOE9jYKAG - +Hx4z//3axb/J8Ws4421EPUP1iz7/7Q87f+7vnowfjKpE6dBHzev+3+3ruT/kuoqVDWbO1r+P+tpABvw - pjrr/8MEPwxDXmRF/98XiSmO4upd+en/n0W7/39mr/r/np4I2BCQi66o8/1f7uVIvBdP6kn+vyDL9P+Q - DDMYz44MJl4zzElH5VjBmvfLsJKu+ay1+v9TBtL/V7pY/b+sJ/b/uJUa8YZcNFf6f8FA/P/SsAC4pqtG - 0v+PZScQNuSyq+H/87oi/9fYGmEoBhmCN53cjfEG23xIH7vC/U01/487GWI35M2sif+vO2iC/b24KA+n - TQf8HLDLPU0O+n/TTR9sAKHkvD3IH1MNyIA7Pqb/D5sRDu09ddA8gGzT8aLM/3eD7f8vzssi6AJCLiRZ - HgCBbKVnemi5TQAAAABJRU5ErkJggg== -</value> - </data> </root> \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-21 22:46:34 UTC (rev 587) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-21 22:55:25 UTC (rev 588) @@ -166,6 +166,7 @@ </ItemGroup> <ItemGroup> <None Include="buttonViewImg.Image.bmp" /> + <None Include="deleteApplicationToolStripMenuItem.Image.png" /> <Content Include="MetaData\myProgramsAltFileDetailsInfo.xml" /> <Content Include="MetaData\myProgramsAltPreconfiguration.xml" /> <None Include="searchButton.Image.png" /> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.Designer.cs 2007-06-21 22:46:34 UTC (rev 587) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.Designer.cs 2007-06-21 22:55:25 UTC (rev 588) @@ -67,6 +67,13 @@ } } + internal static System.Drawing.Bitmap deleteButton_Image { + get { + object obj = ResourceManager.GetObject("deleteButton_Image", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap previewButton_Image { get { object obj = ResourceManager.GetObject("previewButton_Image", resourceCulture); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.resx =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.resx 2007-06-21 22:46:34 UTC (rev 587) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/Resources.resx 2007-06-21 22:55:25 UTC (rev 588) @@ -132,11 +132,47 @@ IzAAAAAASUVORK5CYII= </value> </data> - <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> - <data name="previewButton_Image" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\buttonViewImg.Image.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="deleteButton_Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAThJREFUOE9jYKAG + +Hx4z//3axb/J8Ws4421EPUP1iz7/7Q87f+7vnowfjKpE6dBHzev+3+3ruT/kuoqVDWbO1r+P+tpABvw + pjrr/8MEPwxDXmRF/98XiSmO4upd+en/n0W7/39mr/r/np4I2BCQi66o8/1f7uVIvBdP6kn+vyDL9P+Q + DDMYz44MJl4zzElH5VjBmvfLsJKu+ay1+v9TBtL/V7pY/b+sJ/b/uJUa8YZcNFf6f8FA/P/SsAC4pqtG + 0v+PZScQNuSyq+H/87oi/9fYGmEoBhmCN53cjfEG23xIH7vC/U01/487GWI35M2sif+vO2iC/b24KA+n + TQf8HLDLPU0O+n/TTR9sAKHkvD3IH1MNyIA7Pqb/D5sRDu09ddA8gGzT8aLM/3eD7f8vzssi6AJCLiRZ + HgCBbKVnemi5TQAAAABJRU5ErkJggg== +</value> </data> - <data name="searchButton_Image" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\searchButton.Image.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="previewButton_Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + Qk2qAwAAAAAAADYAAAAoAAAAEQAAABEAAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAA2Ons2Ons + 2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Onsgdjp7ICAgAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjp7IHY6eyAgIAA//8AgAAAgAAA//8AAAAA + //8AgAAAAAAAgAAA//8AAAD//wAA//8AAADY6eyB2OnsgICAAAAAAP////8AAAAAAP//AIAAAAAA//8A + AP//AAAAAIAAAP//AAAAAAAA2Onsgdjp7ICAgP//AAAAAAD//wCAAP//AACAAAD//wCAgAAAAACAAAD/ + /wAAAP//AAAAANjp7IHY6eyAgID//////wAAAAAA//8A//8AAAAAgAAAAAAA//8AgAAAAAD//wD///8A + AADY6eyB2OnsgICA//8A//////8AAAAA//8AAP//AAAA////AAAAAAAA//8A//////8AAAAA2Onsgdjp + 7ICAgP//////AP//////AAAAAAAAAP//////AP//////AP//////AP///wAAANjp7IHY6eyAgID//wD/ + /////wD//////wD//////wD//////wD//////wD//////wAAAADY6eyB2OnsgICA//////8A//////8A + //////8A//////8A////AAAAAAAA//8A////AAAA2Onsgdjp7ICAgP//AP//////AP//////AP////// + AP///wAAAP///wD//wAAAP//AAAAANjp7IHY6eyAgID//////wD//////wD//////wD//////wAAAAAA + //////8AAAD///8AAADY6eyB2OnsgICA//8A//////8A//////8A//////8A//////8AAAAAAAAA//// + //8AAAAA2Onsgdjp7ICAgP//////AP//////AP//////AP//////AP//////AP//////AP///wAAANjp + 7IHY6eyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6eyB2Ons2Ons + 2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Ons2Onsgdjp7Njp7Njp7Njp7Njp + 7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7Njp7IE= +</value> </data> + <data name="searchButton_Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAARlJREFUOE/FkkFr + wkAQhddfIb2W0l/gyZP/zkPrOeSgiMSKNmqgQYgQtBbFQw9FkFZpi3qRgIhie37yEtdadRN6amBgN/Pe + NzOZxETE0+494/N9LDxv7ivj8QtxeXUtUslELMorSlYT2bKN6uMrHgZrP3jmO+ZCAaxMUWcCP4YeMF0B + H8vgTgg1SkiucAen/4buLDB5X0EsvgNQ+2WCYqWuBqRvMvukNNMoozXa4FBz0slt5gfApGyf3XCcp/EG + x5pfED1fPGmPZgngeBxT+Q3shoOa7SgFpZodvgVd1/0Wz0HurQZYQFndMAwQwKCQd8IYPIfuX9M0mKYZ + LTxHYQXXdUFI5G96LJDm0NWoqP9nZkdyXX+eeWfYAqIDETY5OFC+AAAAAElFTkSuQmCC +</value> + </data> </root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-24 09:16:22
|
Revision: 615 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=615&view=rev Author: chef_koch Date: 2007-06-24 02:16:20 -0700 (Sun, 24 Jun 2007) Log Message: ----------- minor format change Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs 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 Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -24,21 +24,20 @@ #endregion using System; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.IO; +using System.Windows.Forms; +using SQLite.NET; + using MediaPortal.Dialogs; using MediaPortal.GUI.Library; using MediaPortal.Util; -using GUIPrograms; -using SQLite.NET; -using System.Windows.Forms; - +using GUIPrograms; +using GUIPrograms.Database; using GUIPrograms.FileItems; -using GUIPrograms.Database; - namespace GUIPrograms.ApplicationItems { /// <summary> @@ -328,5 +327,4 @@ LoadFiles(); } } - -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -23,9 +23,9 @@ #endregion -using GUIPrograms; using SQLite.NET; +using GUIPrograms; namespace GUIPrograms.ApplicationItems { @@ -67,6 +67,5 @@ } return applicationItem; } - } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -25,11 +25,13 @@ using System; using System.IO; +using SQLite.NET; + using MediaPortal.Dialogs; using MediaPortal.GUI.Library; + using GUIPrograms; using GUIPrograms.Database; -using SQLite.NET; using GUIPrograms.Imports; namespace GUIPrograms.ApplicationItems @@ -134,4 +136,4 @@ LoadFiles(); } } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -24,13 +24,14 @@ #endregion using System.Collections.Generic; -using MediaPortal.GUI.Library; -using GUIPrograms; using SQLite.NET; +using GUIPrograms; using GUIPrograms.Database; +using GUIPrograms.FileItems; -using GUIPrograms.FileItems; +using MediaPortal.GUI.Library; + namespace GUIPrograms.ApplicationItems { /// <summary> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -26,10 +26,12 @@ using System; using System.Diagnostics; using System.IO; +using SQLite.NET; + using MediaPortal.Dialogs; using MediaPortal.GUI.Library; + using GUIPrograms; -using SQLite.NET; using GUIPrograms.Imports; namespace GUIPrograms.ApplicationItems @@ -39,7 +41,6 @@ /// </summary> public class ApplicationItemMame : ApplicationItem { - GUIDialogProgress guiDialogProgress = null; bool importOriginalsOnly = true; @@ -155,4 +156,4 @@ guiDialogProgress.Progress(); } } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -27,18 +27,20 @@ using System.Collections; using System.Collections.Generic; using System.IO; -using MediaPortal.GUI.Library; -using GUIPrograms; using SQLite.NET; -using GUIPrograms.Imports; +using MediaPortal.GUI.Library; + +using GUIPrograms; using GUIPrograms.ApplicationItems; +using GUIPrograms.Imports; - namespace GUIPrograms.FileItems { public class FileItem { + #region Variables + protected static SQLiteClient sqlDB = null; int fileID; @@ -49,6 +51,7 @@ string filename; string filepath; string imagefile; + string mainGenre; string subGenre; string country; @@ -60,16 +63,20 @@ string manualFilename; DateTime lastTimeLaunched; int launchCount; + int extFileID; string tagData; string categoryData; bool isFolder; string gameInfoURL; - List<FileItemInfo> fileItemInfoList = null; FileItemInfo fileItemInfoFavourite = null; + #endregion + + #region Constructor + public FileItem(SQLiteClient initSqlDB) { // constructor: save SQLiteDB object @@ -77,6 +84,8 @@ Clear(); } + #endregion + public virtual void Clear() { fileID = -1; @@ -119,6 +128,8 @@ return (result.Trim()); } + #region Properties + public int FileID { get @@ -130,7 +141,6 @@ fileID = value; } } - public int AppID { get @@ -142,7 +152,6 @@ appID = value; } } - public string Title { get @@ -154,7 +163,6 @@ title = value; } } - public string Title2 { get @@ -166,7 +174,6 @@ title2 = value; } } - public string TitleNormalized { get @@ -174,7 +181,6 @@ return GetTitleNormalized(); } } - public string TitleOptimized { get @@ -198,7 +204,6 @@ filename = value; } } - public string Filepath { get @@ -210,7 +215,6 @@ filepath = value; } } - public string Imagefile { get @@ -234,7 +238,6 @@ mainGenre = value; } } - public string SubGenre { get @@ -245,9 +248,8 @@ { subGenre = value; } - } - - public string Country + } + public string Country { get { @@ -258,7 +260,6 @@ country = value; } } - public string Manufacturer { get @@ -270,7 +271,6 @@ manufacturer = value; } } - public int Year { get @@ -282,7 +282,6 @@ year = value; } } - public int Rating { get @@ -294,7 +293,6 @@ rating = value; } } - public string Overview { get @@ -306,7 +304,6 @@ overview = value; } } - public string System_ { get @@ -318,7 +315,6 @@ system = value; } } - public string ManualFilename { get @@ -330,7 +326,6 @@ manualFilename = value; } } - public DateTime LastTimeLaunched { get @@ -342,7 +337,6 @@ lastTimeLaunched = value; } } - public int LaunchCount { get @@ -355,6 +349,17 @@ } } + public int ExtFileID + { + get + { + return extFileID; + } + set + { + extFileID = value; + } + } public string TagData { get @@ -366,7 +371,6 @@ tagData = value; } } - public string CategoryData { get @@ -378,7 +382,6 @@ categoryData = value; } } - public bool IsFolder { get @@ -390,19 +393,12 @@ isFolder = value; } } - - public int ExtFileID + public string GameInfoURL { - get - { - return extFileID; - } - set - { - extFileID = value; - } + get { return gameInfoURL; } + set { gameInfoURL = value; } } - + public string YearManu { get @@ -418,7 +414,6 @@ return fileItemInfoList; } } - public FileItemInfo FileInfoFavourite { get @@ -431,6 +426,8 @@ } } + #endregion + private int CountQuotes(string strVal) { int at = 0; @@ -523,8 +520,6 @@ return strRes; } - - public string ExtractArguments() { string strRes = ""; @@ -557,21 +552,9 @@ } return strRes; } + private void Insert() { - string strLastLaunch = ""; - string strLaunchCount = ""; - string strYear = ""; - - strLastLaunch = String.Format("{0}", LastTimeLaunched); - - strLaunchCount = String.Format("{0}", LaunchCount); // poor man's inttostr :-) - - if (Year > 0) - { - strYear = String.Format("{0}", Year); - } - try { string strSQL = String.Format( @@ -616,13 +599,13 @@ '" + ProgramUtils.Encode(SubGenre)+ @"', '" + Country+ @"', '" + ProgramUtils.Encode(Manufacturer)+ @"', - '" + strYear+ @"', + '" + Year.ToString()+ @"', '" + Rating+ @"', '" + ProgramUtils.Encode(Overview)+ @"', '" + ProgramUtils.Encode(System_)+ @"', '" + ProgramUtils.Encode(ManualFilename)+ @"', - '" + strLastLaunch+ @"', - '" + strLaunchCount+ @"', + '" + LastTimeLaunched.ToString()+ @"', + '" + LaunchCount.ToString()+ @"', '" + ProgramUtils.BooleanToStr(IsFolder)+ @"', '" + ExtFileID+ @"', '" + ProgramUtils.Encode(Title.ToUpper())+ @"', @@ -639,7 +622,6 @@ } } - private void Update() { string strYear = ""; @@ -723,12 +705,6 @@ } } - public string GameInfoURL - { - get { return gameInfoURL; } - set { gameInfoURL = value; } - } - public bool FindFileInfo(ScraperType ScraperType) { @@ -1032,7 +1008,5 @@ result = result.TrimEnd('\"'); return result; } - } - -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -26,12 +26,11 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; + using MediaPortal.Util; using GUIPrograms.ApplicationItems; - - namespace GUIPrograms.FileItems { /// <summary> @@ -39,23 +38,28 @@ /// </summary> public class FileItemInfo { + #region Variables string relevance; int relevanceNorm; - string year; string gameURL; + string title; string mainGenre; string subGenre; + string year; string style; string platform; string rating; int ratingNorm; - string imageURLs; string manufacturer; string overview; + + string imageURLs; bool isLoaded; + #endregion + public FileItemInfo() { // @@ -78,6 +82,9 @@ isLoaded = false; } + + #region Properties + public string RelevanceOrig { get @@ -89,7 +96,6 @@ relevance = value; } } - public int RelevanceNorm { get @@ -101,19 +107,6 @@ relevanceNorm = value; } } - - public string Year - { - get - { - return year; - } - set - { - year = value; - } - } - public string GameURL { get @@ -125,7 +118,6 @@ gameURL = value; } } - public string GameURLPostParams { get @@ -145,7 +137,6 @@ title = value; } } - public string MainGenre { get @@ -157,7 +148,6 @@ mainGenre = value; } } - public string SubGenre { get @@ -170,7 +160,17 @@ subGenre = value; } } - + public string Year + { + get + { + return year; + } + set + { + year = value; + } + } public string Style { get @@ -182,7 +182,6 @@ style = value; } } - public string Platform { get @@ -194,7 +193,6 @@ platform = value; } } - public string RatingOrig { get @@ -206,7 +204,6 @@ rating = value; } } - public int RatingNorm { get @@ -218,7 +215,6 @@ ratingNorm = value; } } - public string Manufacturer { get @@ -230,7 +226,6 @@ manufacturer = value; } } - public string Overview { get @@ -254,7 +249,6 @@ imageURLs = value; } } - public bool Loaded { get @@ -267,6 +261,8 @@ } } + #endregion + public void LaunchURL() { if (GameURL == null) @@ -336,4 +332,4 @@ } } } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -26,23 +26,19 @@ using System; using System.Collections.Generic; //using System.Diagnostics; -using MediaPortal.GUI.Library; -using GUIPrograms; using SQLite.NET; +using MediaPortal.GUI.Library; -using GUIPrograms.FileItems; +using GUIPrograms; using GUIPrograms.Database; +using GUIPrograms.FileItems; - namespace GUIPrograms.FileItems { - public class FileItemList : List<object> { - string filePath = ""; - static SQLiteClient sqlDB = null; public FileItemList(SQLiteClient initSqlDB) @@ -59,7 +55,6 @@ } } - public FileItem GetFileItemByID(int fileID) { foreach (FileItem currentFileItem in this) @@ -72,7 +67,6 @@ return null; } - static private FileItem DBGetFileItem(SQLiteResultSet results, int iRecord) { FileItem newFile = new FileItem(sqlDB); @@ -191,5 +185,4 @@ } } } - -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkItem.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -25,11 +25,12 @@ using System; using System.Collections; +using SQLite.NET; + using MediaPortal.GUI.Library; + using GUIPrograms; -using SQLite.NET; - namespace GUIPrograms.FileItems { /// <summary> @@ -129,6 +130,5 @@ // nothing to update (yet) //...... as all tblFilterItem fields are primary key fields... } - } -} +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-24 08:33:23 UTC (rev 614) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-24 09:16:20 UTC (rev 615) @@ -25,11 +25,12 @@ using System; using System.Collections.Generic; -using MediaPortal.GUI.Library; -using GUIPrograms; using SQLite.NET; +using MediaPortal.GUI.Library; +using GUIPrograms; + namespace GUIPrograms.FileItems { /// <summary> @@ -37,15 +38,14 @@ /// </summary> public class FilelinkItemList : List<object> { + static SQLiteClient sqlDB = null; + public FilelinkItemList(SQLiteClient initSqlDB) { // constructor: save SQLiteDB object sqlDB = initSqlDB; } - static SQLiteClient sqlDB = null; - - static private FilelinkItem DBGetFilelinkItem(SQLiteResultSet results, int iRecord) { FilelinkItem newLink = new FilelinkItem(sqlDB); @@ -71,7 +71,6 @@ return newLink; } - public void Load(int nAppID, string strPath) { if (sqlDB == null) @@ -102,6 +101,5 @@ Log.Info("Filedatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } } - } -} +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-24 09:49:49
|
Revision: 617 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=617&view=rev Author: chef_koch Date: 2007-06-24 02:49:46 -0700 (Sun, 24 Jun 2007) Log Message: ----------- added some svn ignore properties Property Changed: ---------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties/ Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db Property changes on: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Properties ___________________________________________________________________ Name: svn:ignore + bin obj *.suo *.user thumbs.db This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-24 12:51:36
|
Revision: 618 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=618&view=rev Author: northern_sky Date: 2007-06-24 05:51:32 -0700 (Sun, 24 Jun 2007) Log Message: ----------- dbchange: filepath-pincode removed Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -86,7 +86,6 @@ string validExtensions; bool importValidImagesOnly; - int pincode; int contentID; string systemDefault; @@ -358,7 +357,6 @@ appPosition = 0; importValidImagesOnly = false; enableGUIRefresh = false; - pincode = -1; contentID = 100; systemDefault = ""; waitForExit = true; @@ -848,20 +846,73 @@ if (sqlDB == null) return; string sql = ""; - string Pincode = ""; //to remove if (ContentID <= 0) ContentID = 100; try { AppID = GetNewAppID(); // important to avoid subsequent inserts! - sql = String.Format("insert into tblApplicationItem (appid, fatherID, title, shorttitle, filename, arguments, windowstyle, startupdir, useshellexecute, usequotes, source_type, source, imagefile, filedirectory, imagedirectory, validextensions, importvalidimagesonly, iposition, enabled, enableGUIRefresh, GUIRefreshPossible, pincode, contentID, systemDefault, WaitForExit, preLaunch, postLaunch) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}', '{16}', '{17}', '{18}', '{19}', '{20}', '{21}', '{22}', '{23}', '{24}', '{25}', '{26}')", - AppID, FatherID, ProgramUtils.Encode(Title), ProgramUtils.Encode(ShortTitle), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Arguments), - ProgramUtils.WindowStyleToStr(WindowStyle), ProgramUtils.Encode(StartupDir), ProgramUtils.BooleanToStr(UseShellExecute), - ProgramUtils.BooleanToStr(UseQuotes), ProgramUtils.ApplicationTypeToString(SourceType), ProgramUtils.Encode(Source), ProgramUtils.Encode(Imagefile), - ProgramUtils.Encode(FileDirectory), ProgramUtils.Encode(ImageDirectory), ProgramUtils.Encode(ValidExtensions), ProgramUtils.BooleanToStr(importValidImagesOnly), Position, - ProgramUtils.BooleanToStr(Enabled), ProgramUtils.BooleanToStr(EnableGUIRefresh), ProgramUtils.BooleanToStr(GUIRefreshPossible), Pincode, - ContentID, ProgramUtils.Encode(SystemDefault), ProgramUtils.BooleanToStr(WaitForExit), ProgramUtils.Encode(PreLaunch), ProgramUtils.Encode(PostLaunch) + sql = String.Format(@" + INSERT INTO + tblApplicationItem + ( + appid, + fatherID, + title, + shorttitle, + filename, + arguments, + windowstyle, + startupdir, + useshellexecute, + usequotes, + source_type, + source, + imagefile, + filedirectory, + imagedirectory, + validextensions, + importvalidimagesonly, + iposition, + enabled, + enableGUIRefresh, + GUIRefreshPossible, + contentID, + systemDefault, + WaitForExit, + preLaunch, + postLaunch + ) + VALUES + ( + '"+ AppID + @"', + '"+ FatherID + @"', + '"+ ProgramUtils.Encode(Title) +@"', + '"+ ProgramUtils.Encode(ShortTitle) +@"', + '"+ ProgramUtils.Encode(Filename) +@"', + '"+ ProgramUtils.Encode(Arguments) + @"', + '"+ ProgramUtils.WindowStyleToStr(WindowStyle) +@"', + '"+ ProgramUtils.Encode(StartupDir) +@"', + '"+ ProgramUtils.BooleanToStr(UseShellExecute) +@"', + '"+ ProgramUtils.BooleanToStr(UseQuotes) +@"', + '"+ ProgramUtils.ApplicationTypeToString(SourceType) +@"', + '"+ ProgramUtils.Encode(Source) +@"', + '"+ ProgramUtils.Encode(Imagefile) +@"', + '"+ ProgramUtils.Encode(FileDirectory) +@"', + '"+ ProgramUtils.Encode(ImageDirectory)+@"', + '"+ ProgramUtils.Encode(ValidExtensions)+@"', + '"+ ProgramUtils.BooleanToStr(importValidImagesOnly)+@"', + '"+ Position+@"', + '"+ ProgramUtils.BooleanToStr(Enabled)+@"', + '"+ ProgramUtils.BooleanToStr(EnableGUIRefresh) +@"', + '" + ProgramUtils.BooleanToStr(GUIRefreshPossible)+@"', + '" + ContentID +@"', + '"+ ProgramUtils.Encode(SystemDefault)+@"', + '"+ ProgramUtils.BooleanToStr(WaitForExit) +@"', + '"+ ProgramUtils.Encode(PreLaunch)+@"', + '"+ ProgramUtils.Encode(PostLaunch)+@"' + )" + ); sqlDB.Execute(sql); } @@ -877,7 +928,6 @@ if (AppID == -1) return; string sql = ""; - string Pincode = ""; //to remove if (ContentID <= 0) ContentID = 100; @@ -907,7 +957,6 @@ fatherID = '" + FatherID + @"', enableGUIRefresh = '" + ProgramUtils.BooleanToStr(EnableGUIRefresh) + @"', GUIRefreshPossible = '" + ProgramUtils.BooleanToStr(GUIRefreshPossible) +@"', - pincode = '" + Pincode + @"', contentID = '" + ContentID + @"', systemDefault = '" + ProgramUtils.Encode(SystemDefault) + @"', WaitForExit = '" + ProgramUtils.BooleanToStr(WaitForExit) + @"', Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -160,7 +160,7 @@ { curFile.Filename = "\"" + curFile.Filename + "\""; } - curFile.Filepath = fileInfo.DirectoryName; + curFile.Imagefile = GetThumbsFile(fileInfo, curFile.TitleNormalized); // not imported properties => set default values Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -182,7 +182,7 @@ if (sqlDB == null) return false; - skipPrePostPatch = DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, shorttitle 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, pincode integer, preLaunch text, postLaunch text)"); + skipPrePostPatch = DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, shorttitle 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, filepath text, imagefile text, mainGenre text, subGenre text, country text, manufacturer text, year integer, rating integer, overview text, system text, import_flag integer, manualfilename text, lastTimeLaunched text, launchcount integer, isfolder text, external_id integer, 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)"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -49,7 +49,7 @@ string title2; string titleOptimized; string filename; - string filepath; + // string filepath; string imagefile; string mainGenre; @@ -94,7 +94,7 @@ title2 = ""; titleOptimized = ""; filename = ""; - filepath = ""; +// filepath = ""; imagefile = ""; mainGenre = ""; subGenre = ""; @@ -204,7 +204,7 @@ filename = value; } } - public string Filepath + /* public string Filepath { get { @@ -214,7 +214,7 @@ { filepath = value; } - } + }*/ public string Imagefile { get @@ -566,7 +566,6 @@ appid, title, filename, - filepath, imagefile, mainGenre, subGenre, @@ -593,7 +592,6 @@ '" + AppID + @"', '" + ProgramUtils.Encode(Title)+ @"', '" + ProgramUtils.Encode(Filename)+ @"', - '" + ProgramUtils.Encode(Filepath)+ @"', '" + ProgramUtils.Encode(Imagefile)+ @"', '" + ProgramUtils.Encode(MainGenre)+ @"', '" + ProgramUtils.Encode(SubGenre)+ @"', @@ -633,7 +631,7 @@ try { string strSQL = String.Format( - "UPDATE tblFileItem SET title = '{1}', filename = '{2}', filepath = '{3}', imagefile = '{4}', mainGenre = '{5}', subGenre = '{6}', country = '{7}', manufacturer = '{8}', year = '{9}', rating = '{10}', overview = '{11}', system = '{12}', uppertitle = '{13}', tagdata = '{14}', categorydata = '{15}', gameInfoURL = '" + ProgramUtils.Encode(GameInfoURL) +"' where fileid = {0}", FileID, ProgramUtils.Encode(Title), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Filepath), ProgramUtils.Encode(Imagefile), ProgramUtils.Encode(MainGenre), ProgramUtils.Encode(SubGenre), ProgramUtils.Encode(Country), ProgramUtils.Encode(Manufacturer), strYear, Rating, ProgramUtils.Encode(Overview), ProgramUtils.Encode(System_), ProgramUtils.Encode(Title.ToUpper()), ProgramUtils.Encode(TagData), ProgramUtils.Encode(CategoryData)); + "UPDATE tblFileItem SET title = '{1}', filename = '{2}', imagefile = '{3}', mainGenre = '{4}', subGenre = '{5}', country = '{6}', manufacturer = '{7}', year = '{8}', rating = '{9}', overview = '{10}', system = '{11}', uppertitle = '{12}', tagdata = '{13}', categorydata = '{14}', gameInfoURL = '" + ProgramUtils.Encode(GameInfoURL) +"' where fileid = {0}", FileID, ProgramUtils.Encode(Title), ProgramUtils.Encode(Filename),ProgramUtils.Encode(Imagefile), ProgramUtils.Encode(MainGenre), ProgramUtils.Encode(SubGenre), ProgramUtils.Encode(Country), ProgramUtils.Encode(Manufacturer), strYear, Rating, ProgramUtils.Encode(Overview), ProgramUtils.Encode(System_), ProgramUtils.Encode(Title.ToUpper()), ProgramUtils.Encode(TagData), ProgramUtils.Encode(CategoryData)); sqlDB.Execute(strSQL); } catch (SQLiteException ex) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -25,7 +25,7 @@ using System; using System.Collections.Generic; -//using System.Diagnostics; +//using System.IO; using SQLite.NET; using MediaPortal.GUI.Library; @@ -51,7 +51,7 @@ { get { - return filePath; + return filePath; } } @@ -74,7 +74,6 @@ newFile.AppID = ProgramUtils.GetIntDef(results, iRecord, "appid", -1); newFile.Title = ProgramUtils.Get(results, iRecord, "title"); newFile.Filename = ProgramUtils.Get(results, iRecord, "filename"); - newFile.Filepath = ProgramUtils.Get(results, iRecord, "filepath"); newFile.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); newFile.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); newFile.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -54,7 +54,6 @@ newLink.TargetAppID = ProgramUtils.GetIntDef(results, iRecord, "targetappid", -1); newLink.Title = ProgramUtils.Get(results, iRecord, "title"); newLink.Filename = ProgramUtils.Get(results, iRecord, "filename"); - newLink.Filepath = ProgramUtils.Get(results, iRecord, "filepath"); newLink.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); newLink.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); newLink.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); @@ -86,7 +85,7 @@ // applicationItem. // SPECIAL: the current application IS NOT the application with the launchinfo! strSQL = String.Format( - "SELECT fi.appid AS targetappid, fi.grouperappid AS grouperappid, f.fileid AS fileid, title, uppertitle, f.filename as filename, filepath, imagefile, mainGenre, subGenre, country, manufacturer, YEAR, rating, overview, SYSTEM, import_flag, manualfilename, lasttimelaunched, launchcount, isfolder, external_id FROM tblFileItem f, tblFilterItem fi WHERE f.fileid = fi.fileid AND grouperappid = {0} ORDER BY filepath, uppertitle", nAppID); + "SELECT fi.appid AS targetappid, fi.grouperappid AS grouperappid, f.fileid AS fileid, title, uppertitle, f.filename as filename, imagefile, mainGenre, subGenre, country, manufacturer, YEAR, rating, overview, SYSTEM, import_flag, manualfilename, lasttimelaunched, launchcount, isfolder, external_id FROM tblFileItem f, tblFilterItem fi WHERE f.fileid = fi.fileid AND grouperappid = {0} ORDER BY fileName, uppertitle", nAppID); results = sqlDB.Execute(strSQL); if (results.Rows.Count == 0) return; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -67,7 +67,6 @@ curFile.AppID = applicationItem.AppID; curFile.Title = myReader["name"].ToString(); curFile.Filename = romFilename; - curFile.Filepath = Path.GetDirectoryName(romFilename); curFile.Imagefile = imgFilename; string strGenre1 = myReader["ParentGenre"].ToString(); string strGenre2 = myReader["Genre"].ToString(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-06-24 09:49:46 UTC (rev 617) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs 2007-06-24 12:51:32 UTC (rev 618) @@ -373,7 +373,6 @@ curFile.AppID = currentApplication.AppID; curFile.Filename = fullRomname; curFile.Imagefile = GetImageFile(curRomname); - curFile.Filepath = Path.GetDirectoryName(fullRomname); if ((curFile.Imagefile == "") && (currentApplication.ImportValidImagesOnly)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-25 20:29:13
|
Revision: 629 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=629&view=rev Author: northern_sky Date: 2007-06-25 13:28:17 -0700 (Mon, 25 Jun 2007) Log Message: ----------- db: removed unneccesary patches. merged dbsetting and dbhandler Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-25 13:58:05 UTC (rev 628) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-25 20:28:17 UTC (rev 629) @@ -41,15 +41,14 @@ namespace GUIPrograms.Database { /// <summary> - /// Summary description for DBPrograms. + /// DBhandling methods /// </summary> public class DatabaseHandler { public static SQLiteClient sqlDB = null; static ApplicationItemList applicationItemList = null; - static ProgramViewHandler viewHandler = null; + static private ProgramViewHandler viewHandler = null; - // singleton. Dont allow any instance of this class private DatabaseHandler() { } @@ -65,36 +64,19 @@ catch (Exception) { } sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, "myProgramsAltDatabaseV1.db3")); - MediaPortal.Database.DatabaseUtility.SetPragmas(sqlDB); - DatabaseSettings.sqlDB = sqlDB; // make sure the DB-structure is complete - CreateObjects(); - // patch old ContentID values... - PatchContentID(); + CreateDBTables(); - - // patch old values, which were made empty by old versions... - PatchEmptyValues(); - - // patch genre-values - PatchGenreValues(); - // remove trigger - PatchAppTrigger(); - // add PreLaunch / PostLaunch fields - PatchPrePostLaunch(); - // dirty hack: propagate the sqliteClient to the singleton objects... - DatabaseSettings.sqlDB = sqlDB; } catch (SQLiteException ex) { Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } - viewHandler = new ProgramViewHandler(); - DatabaseSettings.viewHandler = viewHandler; - applicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); + ViewHandler = new ProgramViewHandler(); + applicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); } static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) @@ -106,175 +88,114 @@ } } - - static bool ObjectExists(string strName, string strType) + /// <summary> + /// Create db tables etc,if not already exist + /// </summary> + /// <returns></returns> + static bool CreateDBTables() { - SQLiteResultSet results; - bool res = false; - - results = sqlDB.Execute(@" - SELECT - name - - FROM - sqlite_master - - WHERE - name='" + strName + @"' - - AND type='" + strType + @"' - - UNION ALL - - SELECT - name - - FROM - sqlite_temp_master - - WHERE - type='" + strType + @"' - - ORDER BY name"); - - if (results != null && results.Rows.Count > 0) - { - if (results.Rows.Count == 1) - { - SQLiteResultSet.Row arr = results.Rows[0]; - if (arr.fields.Count == 1) - { - if (arr.fields[0] == strName) - { - res = true; - } - } - } - } - return res; - } - - - static bool AddObject(string strName, string strType, string strSQL) - // checks if object exists and returns true if it newly added the object - { if (sqlDB == null) return false; - if (ObjectExists(strName, strType)) - return false; - try - { - sqlDB.Execute(strSQL); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - return false; - } - return true; - } - - static bool CreateObjects() - { - bool skipPrePostPatch = false; - - if (sqlDB == null) - return false; - - skipPrePostPatch = DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, shorttitle 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, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, shorttitle 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, manualfilename text, lastTimeLaunched text, launchcount integer, isfolder text, external_id integer, 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.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)"); - if (skipPrePostPatch) - { - // don't need to add prelaunch / postlaunch anymore if table was created above - DatabaseSettings.WriteSetting(ProgramUtils.cPREPOST_PATCH, "DONE"); - } - return true; } - static void PatchContentID() + static public string ReadSetting(string Key) { - if (sqlDB == null) - return; + SQLiteResultSet results; + string res = null; + string SQL = @" + SELECT + value + + FROM + tblSetting + + WHERE + key ='" + Key + "'"; - if (!DatabaseSettings.KeyExists(ProgramUtils.cCONTENT_PATCH)) + results = sqlDB.Execute(SQL); + + if (results != null && results.Rows.Count > 0) { - Log.Info("myPrograms: applying contentID-patch"); - sqlDB.Execute("UPDATE tblApplicationItem SET contentID = 100 WHERE contentID IS NULL"); - sqlDB.Execute("UPDATE tblApplicationItem SET contentID = 100 WHERE contentID <= 0"); - DatabaseSettings.WriteSetting(ProgramUtils.cCONTENT_PATCH, "DONE"); + SQLiteResultSet.Row arr = results.Rows[0]; + res = arr.fields[0]; } + //Log.Info("dw read setting key:{0}\nvalue:{1}", Key, applicationItem); + return res; } - static void PatchEmptyValues() + static int CountKey(string Key) { - if (sqlDB == null) - return; + SQLiteResultSet results; + int res = 0; + results = sqlDB.Execute(@" + SELECT + COUNT(*) + + FROM + tblSetting + + WHERE key ='" + Key + "'"); - Log.Info("myPrograms: applying empty-value-patch"); - sqlDB.Execute("UPDATE tblFileItem SET launchcount = 0 WHERE launchcount = ''"); - sqlDB.Execute("UPDATE tblFileItem SET launchcount = 0 WHERE launchcount <= 0"); - sqlDB.Execute("UPDATE tblFileItem SET lastTimeLaunched = '01.01.0001 00:00:00' WHERE lastTimeLaunched = ''"); + if (results != null && results.Rows.Count > 0) + { + SQLiteResultSet.Row arr = results.Rows[0]; + res = Int32.Parse(arr.fields[0]); + } + return res; } - static void PatchGenreValues() + static public bool KeyExists(string Key) { - if (sqlDB == null) - return; - if (!DatabaseSettings.KeyExists(ProgramUtils.cGENRE_PATCH)) - { - Log.Info("myPrograms: applying genre-patch"); - sqlDB.Execute("UPDATE tblFileItem SET mainGenre = '' WHERE mainGenre IS NULL"); - sqlDB.Execute("UPDATE tblFileItem SET subGenre = '' WHERE subGenre IS NULL"); - DatabaseSettings.WriteSetting(ProgramUtils.cGENRE_PATCH, "DONE"); - } + return (CountKey(Key) > 0); } - // trigger prevents sqlitev3 client from deleting globalApplicationList.... - static void PatchAppTrigger() + static public void WriteSetting(string Key, string Value) { - if (sqlDB == null) - return; - if (ObjectExists("td_application", "trigger")) + if (KeyExists(Key)) { - try - { - sqlDB.Execute("drop trigger td_application"); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } + sqlDB.Execute(@" + UPDATE + tblSetting + + SET + value = '" + Value + @"' + + WHERE + key = '" + Key + "'"); } + else + { + sqlDB.Execute(@" + INSERT INTO + tblSetting (key, value) + + VALUES('" + Key + "', '" + Value + "')"); + } } - static void PatchPrePostLaunch() + static public void DeleteSetting(string Key) { - if (sqlDB == null) - return; - if (!DatabaseSettings.KeyExists(ProgramUtils.cPREPOST_PATCH)) - { - try - { - Log.Info("myPrograms: adding preLaunch / postLaunch fields"); - sqlDB.Execute("ALTER TABLE tblApplicationItem ADD COLUMN preLaunch TEXT"); - sqlDB.Execute("ALTER TABLE tblApplicationItem ADD COLUMN postLaunch TEXT"); - DatabaseSettings.WriteSetting(ProgramUtils.cPREPOST_PATCH, "DONE"); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } + sqlDB.Execute("DELETE FROM tblSetting WHERE key = '" + Key + "'"); } + public static ProgramViewHandler ViewHandler + { + get { return viewHandler; } + set { viewHandler = value; } + } + + static public ApplicationItemList ApplicationItemList { get Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs 2007-06-25 13:58:05 UTC (rev 628) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs 2007-06-25 20:28:17 UTC (rev 629) @@ -88,7 +88,7 @@ public override bool AppItemToForm(ApplicationItem curApp) { base.AppItemToForm(curApp); - titleTextBox.Text = DatabaseSettings.ReadSetting(ProgramUtils.cPLUGINTITLE); + titleTextBox.Text = DatabaseHandler.ReadSetting(ProgramUtils.cPLUGINTITLE); if (titleTextBox.Text == "") { // PluginTitle.Text = GUILocalizeStrings.Get(0); @@ -104,11 +104,11 @@ { if ((titleTextBox.Text != "")) { - DatabaseSettings.WriteSetting(ProgramUtils.cPLUGINTITLE, titleTextBox.Text); + DatabaseHandler.WriteSetting(ProgramUtils.cPLUGINTITLE, titleTextBox.Text); } else { - DatabaseSettings.DeleteSetting(ProgramUtils.cPLUGINTITLE); + DatabaseHandler.DeleteSetting(ProgramUtils.cPLUGINTITLE); } } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-25 13:58:05 UTC (rev 628) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-25 20:28:17 UTC (rev 629) @@ -627,7 +627,12 @@ { strYear = String.Format("{0}", Year); } + else + { + strYear = "-1"; + } + try { string strSQL = String.Format( Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-25 13:58:05 UTC (rev 628) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-25 20:28:17 UTC (rev 629) @@ -147,7 +147,7 @@ //Debugger.Launch(); if (sqlDB == null) return; - if (DatabaseSettings.viewHandler == null) + if (DatabaseHandler.ViewHandler == null) return; try @@ -157,7 +157,7 @@ return; SQLiteResultSet results; filePath = pathSubfolders; - string sqlQuery = DatabaseSettings.viewHandler.BuildQuery(appID, pathSubfolders); + string sqlQuery = DatabaseHandler.ViewHandler.BuildQuery(appID, pathSubfolders); // Log.Info("dw \n{0}", sqlQuery); results = sqlDB.Execute(sqlQuery); if (results.Rows.Count == 0) @@ -165,7 +165,7 @@ for (int curRow = 0; curRow < results.Rows.Count; curRow++) { - if (DatabaseSettings.viewHandler.IsFilterQuery) + if (DatabaseHandler.ViewHandler.IsFilterQuery) { ProgramFilterItem curFilter = DBGetFilterItem(results, curRow); Add(curFilter); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-25 13:58:05 UTC (rev 628) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-06-25 20:28:17 UTC (rev 629) @@ -69,7 +69,7 @@ /// false : plugin does not need its own button on home</returns> public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { - string strText = DatabaseSettings.ReadSetting(ProgramUtils.cPLUGINTITLE); + string strText = DatabaseHandler.ReadSetting(ProgramUtils.cPLUGINTITLE); if ((strText != "") && (strText != null)) { strButtonText = strText; @@ -278,7 +278,7 @@ } xmlwriter.SetValue("myprograms", "lastAppID", mapSettings.LastAppID.ToString()); // xmlwriter.SetValue("myprograms", "lastViewLevel", mapSettings.LastViewLevel.ToString()); - xmlwriter.SetValue("myprograms", "lastViewLevel", DatabaseSettings.viewHandler.CurrentLevel); + xmlwriter.SetValue("myprograms", "lastViewLevel", DatabaseHandler.ViewHandler.CurrentLevel); xmlwriter.SetValue("myprograms", "sortby", mapSettings.SortBy); // avoid bool conversion...... don't wanna know why it doesn't work! :-( if (mapSettings.SortAscending) @@ -306,7 +306,7 @@ void LoadSettings() { - string _slideSpeed = DatabaseSettings.ReadSetting(ProgramUtils.cSLIDESPEED); + string _slideSpeed = DatabaseHandler.ReadSetting(ProgramUtils.cSLIDESPEED); if ((_slideSpeed != "") && (_slideSpeed != null)) { slideSpeed = int.Parse(_slideSpeed); @@ -452,7 +452,7 @@ lastFilepath = lastApp.DefaultFilepath(); lastApp.CurrentSortIndex = mapSettings.SortBy; lastApp.CurrentSortIsAscending = mapSettings.SortAscending; - DatabaseSettings.viewHandler.CurrentLevel = mapSettings.LastViewLevel; + DatabaseHandler.ViewHandler.CurrentLevel = mapSettings.LastViewLevel; } else { @@ -523,12 +523,12 @@ {//maybe we can remove this property, not sure if we would need it get { - if (DatabaseSettings.viewHandler.View == null) + if (DatabaseHandler.ViewHandler.View == null) return Layout.List; if (layout == null) { - layout = new Layout[DatabaseSettings.viewHandler.Views.Count, 50]; + layout = new Layout[DatabaseHandler.ViewHandler.Views.Count, 50]; List<String> viewStrings = new List<String>(); viewStrings.Add("List"); @@ -536,11 +536,11 @@ viewStrings.Add("Big Icons"); viewStrings.Add("Filmstrip"); - for (int i = 0; i < DatabaseSettings.viewHandler.Views.Count; ++i) + for (int i = 0; i < DatabaseHandler.ViewHandler.Views.Count; ++i) { - for (int j = 0; j < DatabaseSettings.viewHandler.Views[i].Filters.Count; ++j) + for (int j = 0; j < DatabaseHandler.ViewHandler.Views[i].Filters.Count; ++j) { - FilterDefinition def = (FilterDefinition)DatabaseSettings.viewHandler.Views[i].Filters[j]; + FilterDefinition def = (FilterDefinition)DatabaseHandler.ViewHandler.Views[i].Filters[j]; int defaultView = viewStrings.IndexOf(def.DefaultView); if (defaultView != -1) @@ -551,11 +551,11 @@ } } - return layout[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel]; + return layout[DatabaseHandler.ViewHandler.Views.IndexOf(DatabaseHandler.ViewHandler.View), DatabaseHandler.ViewHandler.CurrentLevel]; } set { - layout[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel] = value; + layout[DatabaseHandler.ViewHandler.Views.IndexOf(DatabaseHandler.ViewHandler.View), DatabaseHandler.ViewHandler.CurrentLevel] = value; } } @@ -563,28 +563,28 @@ { get { - if (DatabaseSettings.viewHandler.View == null) + if (DatabaseHandler.ViewHandler.View == null) return true; if (sortasc == null) { - sortasc = new bool[DatabaseSettings.viewHandler.Views.Count, 50]; + sortasc = new bool[DatabaseHandler.ViewHandler.Views.Count, 50]; - for (int i = 0; i < DatabaseSettings.viewHandler.Views.Count; ++i) + for (int i = 0; i < DatabaseHandler.ViewHandler.Views.Count; ++i) { - for (int j = 0; j < DatabaseSettings.viewHandler.Views[i].Filters.Count; ++j) + for (int j = 0; j < DatabaseHandler.ViewHandler.Views[i].Filters.Count; ++j) { - FilterDefinition def = (FilterDefinition)DatabaseSettings.viewHandler.Views[i].Filters[j]; + FilterDefinition def = (FilterDefinition)DatabaseHandler.ViewHandler.Views[i].Filters[j]; sortasc[i, j] = def.SortAscending; } } } - return sortasc[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel]; + return sortasc[DatabaseHandler.ViewHandler.Views.IndexOf(DatabaseHandler.ViewHandler.View), DatabaseHandler.ViewHandler.CurrentLevel]; } set { - sortasc[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel] = value; + sortasc[DatabaseHandler.ViewHandler.Views.IndexOf(DatabaseHandler.ViewHandler.View), DatabaseHandler.ViewHandler.CurrentLevel] = value; } } @@ -592,12 +592,12 @@ { get { - if (DatabaseSettings.viewHandler.View == null) + if (DatabaseHandler.ViewHandler.View == null) return ProgramSort.SortMethod.Name; if (sortby == null) { - sortby = new ProgramSort.SortMethod[DatabaseSettings.viewHandler.Views.Count, 50]; + sortby = new ProgramSort.SortMethod[DatabaseHandler.ViewHandler.Views.Count, 50]; List<String> sortStrings = new List<String>(); sortStrings.Add("Name"); @@ -607,11 +607,11 @@ sortStrings.Add("LaunchCount"); sortStrings.Add("LastTimeLaunched"); - for (int i = 0; i < DatabaseSettings.viewHandler.Views.Count; ++i) + for (int i = 0; i < DatabaseHandler.ViewHandler.Views.Count; ++i) { - for (int j = 0; j < DatabaseSettings.viewHandler.Views[i].Filters.Count; ++j) + for (int j = 0; j < DatabaseHandler.ViewHandler.Views[i].Filters.Count; ++j) { - FilterDefinition def = (FilterDefinition)DatabaseSettings.viewHandler.Views[i].Filters[j]; + FilterDefinition def = (FilterDefinition)DatabaseHandler.ViewHandler.Views[i].Filters[j]; int defaultSort = sortStrings.IndexOf(def.DefaultSort); if (defaultSort != -1) @@ -622,11 +622,11 @@ } } - return sortby[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel]; + return sortby[DatabaseHandler.ViewHandler.Views.IndexOf(DatabaseHandler.ViewHandler.View), DatabaseHandler.ViewHandler.CurrentLevel]; } set { - sortby[DatabaseSettings.viewHandler.Views.IndexOf(DatabaseSettings.viewHandler.View), DatabaseSettings.viewHandler.CurrentLevel] = value; + sortby[DatabaseHandler.ViewHandler.Views.IndexOf(DatabaseHandler.ViewHandler.View), DatabaseHandler.ViewHandler.CurrentLevel] = value; } } @@ -698,7 +698,7 @@ protected override void OnPageLoad() { string view = CurrentView; - DatabaseSettings.viewHandler.CurrentView = view; + DatabaseHandler.ViewHandler.CurrentView = view; base.OnPageLoad(); InitMyPrograms(); } @@ -860,16 +860,16 @@ void UpdateButtons() { - GUIPropertyManager.SetProperty("#view", DatabaseSettings.viewHandler.LocalizedCurrentView); + GUIPropertyManager.SetProperty("#view", DatabaseHandler.ViewHandler.LocalizedCurrentView); btnViewAs.Label = mapSettings.ViewAsText; btnRefresh.IsVisible = RefreshButtonVisible(); // display apptitle if available..... if (lastApp != null) { - if ((DatabaseSettings.viewHandler.CurrentView != null) && (DatabaseSettings.viewHandler.MaxLevels > 0)) + if ((DatabaseHandler.ViewHandler.CurrentView != null) && (DatabaseHandler.ViewHandler.MaxLevels > 0)) { - GUIPropertyManager.SetProperty("#curheader", DatabaseSettings.viewHandler.LocalizedCurrentView); + GUIPropertyManager.SetProperty("#curheader", DatabaseHandler.ViewHandler.LocalizedCurrentView); } else { @@ -878,7 +878,7 @@ } else { - string strText = DatabaseSettings.ReadSetting(ProgramUtils.cPLUGINTITLE); + string strText = DatabaseHandler.ReadSetting(ProgramUtils.cPLUGINTITLE); if ((strText != "") && (strText != null)) { GUIPropertyManager.SetProperty("#curheader", strText); @@ -1043,13 +1043,13 @@ void SaveItemIndex(string value, ApplicationItem app, string pathSub) { - string key = BuildHistoryKey(app, DatabaseSettings.viewHandler.CurrentLevel, pathSub); + string key = BuildHistoryKey(app, DatabaseHandler.ViewHandler.CurrentLevel, pathSub); itemHistory.Set(value, key); } void RestoreItemIndex(ApplicationItem app, string pathSub) { - string key = BuildHistoryKey(app, DatabaseSettings.viewHandler.CurrentLevel, pathSub); + string key = BuildHistoryKey(app, DatabaseHandler.ViewHandler.CurrentLevel, pathSub); string itemHist = itemHistory.Get(key); if (itemHist != "") { @@ -1077,14 +1077,14 @@ } else { - if (DatabaseSettings.viewHandler.RemoveFilterItem()) + if (DatabaseHandler.ViewHandler.RemoveFilterItem()) { ProgramFilterItem curFilter; // force reload, this will load the next filter-level..... lastApp.LoadFiles(); // auto-remove filters if there is only ONE EMPTY Filteritem // displaying - bool doAutoRemove = ((lastApp.Files.Count == 1) && (DatabaseSettings.viewHandler.IsFilterQuery)); + bool doAutoRemove = ((lastApp.Files.Count == 1) && (DatabaseHandler.ViewHandler.IsFilterQuery)); while (doAutoRemove) { doAutoRemove = false; @@ -1093,10 +1093,10 @@ curFilter = lastApp.Files[0] as ProgramFilterItem; if ((curFilter.Title == "") && (curFilter.Title2 == "")) { - if (DatabaseSettings.viewHandler.RemoveFilterItem()) + if (DatabaseHandler.ViewHandler.RemoveFilterItem()) { lastApp.LoadFiles(); - doAutoRemove = ((lastApp.Files.Count == 1) && (DatabaseSettings.viewHandler.IsFilterQuery)); + doAutoRemove = ((lastApp.Files.Count == 1) && (DatabaseHandler.ViewHandler.IsFilterQuery)); } } } @@ -1158,7 +1158,7 @@ lastApp = candidate; mapSettings.LastAppID = lastApp.AppID; lastFilepath = lastApp.DefaultFilepath(); - DatabaseSettings.viewHandler.CurrentLevel = 0; + DatabaseHandler.ViewHandler.CurrentLevel = 0; } else if (item.MusicTag is FileItem) @@ -1197,14 +1197,14 @@ { ProgramFilterItem curFilter; SaveItemIndex(GetSelectedItemNo().ToString(), lastApp, lastFilepath); - DatabaseSettings.viewHandler.AddFilterItem(item.MusicTag as ProgramFilterItem); + DatabaseHandler.ViewHandler.AddFilterItem(item.MusicTag as ProgramFilterItem); if (lastApp != null) { // force reload, this will load the next filter-level..... lastApp.LoadFiles(); // check if the next filter is only displaying ONE EMPTY item // if yes, autoselect this filteritem - bool doAutoSelect = ((lastApp.Files.Count == 1) && (DatabaseSettings.viewHandler.IsFilterQuery)); + bool doAutoSelect = ((lastApp.Files.Count == 1) && (DatabaseHandler.ViewHandler.IsFilterQuery)); while (doAutoSelect) { doAutoSelect = false; @@ -1213,9 +1213,9 @@ curFilter = lastApp.Files[0] as ProgramFilterItem; if ((curFilter.Title == "") && (curFilter.Title2 == "")) { - DatabaseSettings.viewHandler.AddFilterItem(curFilter); + DatabaseHandler.ViewHandler.AddFilterItem(curFilter); lastApp.LoadFiles(); - doAutoSelect = ((lastApp.Files.Count == 1) && (DatabaseSettings.viewHandler.IsFilterQuery)); + doAutoSelect = ((lastApp.Files.Count == 1) && (DatabaseHandler.ViewHandler.IsFilterQuery)); } } } @@ -1393,7 +1393,7 @@ dlg.Reset(); dlg.SetHeading(499); // Actions dlg.Add(GUILocalizeStrings.Get(100000 + GetID)); // Files - foreach (ViewDefinition view in DatabaseSettings.viewHandler.Views) + foreach (ViewDefinition view in DatabaseHandler.ViewHandler.Views) { dlg.Add(view.LocalizedName); } @@ -1404,7 +1404,7 @@ int nNewWindow = (int)Window.WINDOW_FILES; StartWindow = nNewWindow; CurrentView = ""; - DatabaseSettings.viewHandler.CurrentView = null; + DatabaseHandler.ViewHandler.CurrentView = null; if (nNewWindow != GetID) { GUIWindowManager.ReplaceWindow(nNewWindow); @@ -1412,9 +1412,9 @@ } else { - ViewDefinition selectedView = (ViewDefinition)DatabaseSettings.viewHandler.Views[dlg.SelectedLabel - 1]; + ViewDefinition selectedView = (ViewDefinition)DatabaseHandler.ViewHandler.Views[dlg.SelectedLabel - 1]; CurrentView = selectedView.Name; - DatabaseSettings.viewHandler.CurrentView = selectedView.Name; + DatabaseHandler.ViewHandler.CurrentView = selectedView.Name; int nNewWindow = (int)Window.WINDOW_FILES; if (GetID != nNewWindow) { Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-06-25 13:58:05 UTC (rev 628) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs 2007-06-25 20:28:17 UTC (rev 629) @@ -107,10 +107,8 @@ public const string cSLIDESPEED = "SLIDESPEED"; public const string cPLUGINTITLE = "PLUGINTITLE"; - public const string cCONTENT_PATCH = "CONTENTPATCH"; - public const string cGENRE_PATCH = "GENREPATCH"; - public const string cPREPOST_PATCH = "PREPOSTPATCH"; + #endregion Variables #region Constructor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-25 20:33:53
|
Revision: 630 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=630&view=rev Author: northern_sky Date: 2007-06-25 13:33:27 -0700 (Mon, 25 Jun 2007) Log Message: ----------- dbsettings merged in dbhandler Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseSettings.cs Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseSettings.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseSettings.cs 2007-06-25 20:28:17 UTC (rev 629) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseSettings.cs 2007-06-25 20:33:27 UTC (rev 630) @@ -1,126 +0,0 @@ -#region Copyright (C) 2005-2007 Team MediaPortal - -/* - * Copyright (C) 2005-2007 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#endregion - -using System; -using System.Collections; -using SQLite.NET; - - -namespace GUIPrograms.Database -{ - /// <summary> - /// Summary description for DatabaseSettings. - /// </summary> - public class DatabaseSettings - { - static public SQLiteClient sqlDB = null; - static public ProgramViewHandler viewHandler = null; - - // singleton. Dont allow any instance of this class - private DatabaseSettings() { } - - static DatabaseSettings() { } - - static public string ReadSetting(string Key) - { - SQLiteResultSet results; - string res = null; - string SQL = @" - SELECT - value - - FROM - tblSetting - - WHERE - key ='" + Key + "'"; - - results = sqlDB.Execute(SQL); - - if (results != null && results.Rows.Count > 0) - { - SQLiteResultSet.Row arr = results.Rows[0]; - res = arr.fields[0]; - } - //Log.Info("dw read setting key:{0}\nvalue:{1}", Key, applicationItem); - return res; - } - - static int CountKey(string Key) - { - SQLiteResultSet results; - int res = 0; - results = sqlDB.Execute(@" - SELECT - COUNT(*) - - FROM - tblSetting - - WHERE key ='" + Key + "'"); - - if (results != null && results.Rows.Count > 0) - { - SQLiteResultSet.Row arr = results.Rows[0]; - res = Int32.Parse(arr.fields[0]); - } - return res; - } - - static public bool KeyExists(string Key) - { - return (CountKey(Key) > 0); - } - - static public void WriteSetting(string Key, string Value) - { - if (KeyExists(Key)) - { - sqlDB.Execute(@" - UPDATE - tblSetting - - SET - value = '" + Value + @"' - - WHERE - key = '" + Key + "'"); - } - else - { - sqlDB.Execute(@" - INSERT INTO - tblSetting (key, value) - - VALUES('" + Key + "', '" + Value + "')"); - } - } - - static public void DeleteSetting(string Key) - { - sqlDB.Execute("DELETE FROM tblSetting WHERE key = '" + Key + "'"); - } - } -} Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-25 20:28:17 UTC (rev 629) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-06-25 20:33:27 UTC (rev 630) @@ -62,7 +62,6 @@ <Compile Include="ApplicationItems\ApplicationItemList.cs" /> <Compile Include="ApplicationItems\ApplicationItemMame.cs" /> <Compile Include="Database\DatabaseHandler.cs" /> - <Compile Include="Database\DatabaseSettings.cs" /> <Compile Include="Database\DatabaseSorter.cs" /> <Compile Include="Design\AppFilesImportProgress.cs"> <SubType>UserControl</SubType> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-26 20:34:54
|
Revision: 642 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=642&view=rev Author: northern_sky Date: 2007-06-26 13:34:51 -0700 (Tue, 26 Jun 2007) Log Message: ----------- DB: - 3 fields removed (external_id,manualfilename,shortitle) + code - no more quotes around filename in db,parsed instead Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -49,7 +49,6 @@ int appID; int fatherID; string title; - string shortTitle; string filename; string arguments; @@ -123,11 +122,7 @@ get { return title; } set { title = value; } } - public string ShortTitle - { - get { return shortTitle; } - set { shortTitle = value; } - } + public string Filename { get { return filename; } @@ -340,7 +335,6 @@ appID = -1; fatherID = -1; title = ""; - shortTitle = ""; filename = ""; arguments = ""; windowStyle = ProcessWindowStyle.Normal; @@ -436,9 +430,9 @@ // filename of the application procStart.FileName = this.Filename; - // avoid double quotes around the filename-argument..... + // double quotes around the filename-argument..... if (UseQuotes) - curFilename = "\"" + (curFileItem.Filename.TrimStart('\"')).TrimEnd('\"') + "\""; + curFilename = "\"" + curFileItem.Filename + "\""; // set the arguments: one of the arguments is the fileitem-filename if (this.Arguments.Contains("%FILEnoPATHnoEXT%")) @@ -463,7 +457,14 @@ { // application has no launch-file // => try to make a correct launch using the current FILE object - procStart.FileName = curFileItem.Filename; + if (UseQuotes) + { + procStart.FileName = "\"" + curFileItem.Filename + "\""; + } + else + { + procStart.FileName = curFileItem.Filename; + } // set WorkingDirectory if (this.StartupDir == "") @@ -859,7 +860,6 @@ appid, fatherID, title, - shorttitle, filename, arguments, windowstyle, @@ -888,7 +888,6 @@ '"+ AppID + @"', '"+ FatherID + @"', '"+ ProgramUtils.Encode(Title) +@"', - '"+ ProgramUtils.Encode(ShortTitle) +@"', '"+ ProgramUtils.Encode(Filename) +@"', '"+ ProgramUtils.Encode(Arguments) + @"', '"+ ProgramUtils.WindowStyleToStr(WindowStyle) +@"', @@ -938,7 +937,6 @@ tblApplicationItem SET title = '" + ProgramUtils.Encode(Title) + @"', - shorttitle = '" + ProgramUtils.Encode(ShortTitle) + @"', filename = '" + ProgramUtils.Encode(Filename) + @"', arguments = '" + ProgramUtils.Encode(Arguments) + @"', windowstyle = '" + ProgramUtils.WindowStyleToStr(WindowStyle) + @"', @@ -1114,7 +1112,6 @@ this.AppID = sourceApp.AppID; this.FatherID = sourceApp.FatherID; this.Title = sourceApp.Title; - this.ShortTitle = sourceApp.ShortTitle; this.Filename = sourceApp.Filename; this.Arguments = sourceApp.Arguments; this.WindowStyle = sourceApp.WindowStyle; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -156,15 +156,10 @@ curFile.Title = fileInfo.Name; curFile.Title = curFile.TitleNormalized; curFile.Filename = fileInfo.FullName; - if (this.UseQuotes) - { - curFile.Filename = "\"" + curFile.Filename + "\""; - } curFile.Imagefile = GetThumbsFile(fileInfo, curFile.TitleNormalized); // not imported properties => set default values - curFile.ManualFilename = ""; curFile.LastTimeLaunched = DateTime.MinValue; curFile.LaunchCount = 0; curFile.Write(); @@ -186,14 +181,9 @@ this.Files.Load(AppID, ""); foreach (FileItem DBfile in this.Files) { - if (this.UseQuotes && !DBfile.IsFolder) - { - TheFileName = DBfile.Filename.Substring(1, DBfile.Filename.Length - 2); - } - else - { - TheFileName = DBfile.Filename; - } + + TheFileName = DBfile.Filename; + if (!DBfile.IsFolder) { if (!File.Exists(TheFileName)) { DBfile.Delete(); } @@ -224,8 +214,7 @@ foreach (FileItem DBfile in this.Files) { - if ((((this.UseQuotes) && (DBfile.Filename == "\"" + fileInDir.FullName + "\"")) - || ((!this.UseQuotes) && (DBfile.Filename == fileInDir.FullName)))) + if (DBfile.Filename == fileInDir.FullName) { FileExists = true; break;//ugly Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -61,7 +61,6 @@ newApp.AppID = ProgramUtils.GetIntDef(results, recordIndex, "appid", -1); newApp.FatherID = ProgramUtils.GetIntDef(results, recordIndex, "fatherID", -1); newApp.Title = ProgramUtils.Get(results, recordIndex, "title"); - newApp.ShortTitle = ProgramUtils.Get(results, recordIndex, "shorttitle"); newApp.Filename = ProgramUtils.Get(results, recordIndex, "filename"); newApp.Arguments = ProgramUtils.Get(results, recordIndex, "arguments"); newApp.WindowStyle = ProgramUtils.GetProcessWindowStyle(results, recordIndex, "windowstyle"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -46,8 +46,9 @@ public class DatabaseHandler { public static SQLiteClient sqlDB = null; - static ApplicationItemList applicationItemList = null; + static ApplicationItemList dbHandlerApplicationItemList = null; static private ProgramViewHandler viewHandler = null; + private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; // singleton. Dont allow any instance of this class private DatabaseHandler() { } @@ -63,8 +64,8 @@ } catch (Exception) { } - sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, "myProgramsAltDatabaseV1.db3")); - MediaPortal.Database.DatabaseUtility.SetPragmas(sqlDB); + sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, DATABASEFILE )); + DatabaseUtility.SetPragmas(sqlDB); // make sure the DB-structure is complete CreateDBTables(); @@ -74,14 +75,13 @@ { Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } - ViewHandler = new ProgramViewHandler(); - applicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); + dbHandlerApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); } static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) { - ApplicationItem targetApp = applicationItemList.GetAppByID(curLink.TargetAppID); + ApplicationItem targetApp = dbHandlerApplicationItemList.GetAppByID(curLink.TargetAppID); if (targetApp != null) { targetApp.LaunchFile(curLink, MPGUIMode); @@ -97,8 +97,8 @@ if (sqlDB == null) return false; - DatabaseUtility.AddTable(sqlDB, "tblApplicationItem", "CREATE TABLE tblApplicationItem (appid integer primary key, fatherID integer, title text, shorttitle 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, manualfilename text, lastTimeLaunched text, launchcount integer, isfolder text, external_id integer, uppertitle text, tagdata text, categorydata text, gameInfoUrl text)"); + 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)"); @@ -109,6 +109,7 @@ return true; } + #region dbsettings static public string ReadSetting(string Key) { SQLiteResultSet results; @@ -188,6 +189,7 @@ { sqlDB.Execute("DELETE FROM tblSetting WHERE key = '" + Key + "'"); } + #endregion dbsettings public static ProgramViewHandler ViewHandler { @@ -200,7 +202,7 @@ { get { - return applicationItemList; + return dbHandlerApplicationItemList; } } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -54,8 +54,8 @@ applicationArgumentsTextBox.Text = curApp.Arguments; SetWindowStyle(curApp.WindowStyle); startupDirComboBox.Text = curApp.StartupDir; - shellexecuteCheckBox.Checked = (curApp.UseShellExecute); - quoteCheckBox.Checked = (curApp.UseQuotes); + shellexecuteCheckBox.Checked = curApp.UseShellExecute; + quoteCheckBox.Checked = curApp.UseQuotes; waitExitCheckBox.Checked = (curApp.WaitForExit); applicationImageTextBox.Text = curApp.Imagefile; allowRefreshCheckBox.Checked = curApp.EnableGUIRefresh; @@ -71,9 +71,9 @@ curApp.Arguments = applicationArgumentsTextBox.Text; curApp.WindowStyle = GetSelectedWindowStyle(); curApp.StartupDir = startupDirComboBox.Text; - curApp.UseShellExecute = (shellexecuteCheckBox.Checked); - curApp.UseQuotes = (quoteCheckBox.Checked); - curApp.WaitForExit = (waitExitCheckBox.Checked); + curApp.UseShellExecute = shellexecuteCheckBox.Checked; + curApp.UseQuotes = quoteCheckBox.Checked; + curApp.WaitForExit = waitExitCheckBox.Checked; curApp.SourceType = ApplicationType.DIRCACHE; curApp.Imagefile = applicationImageTextBox.Text; curApp.EnableGUIRefresh = (allowRefreshCheckBox.Checked); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -86,9 +86,9 @@ curApp.Arguments = this.applicationArgumentsTextBox.Text; curApp.WindowStyle = GetSelectedWindowStyle(); curApp.StartupDir = this.startupDirComboBox.Text; - curApp.UseShellExecute = (this.shellexecuteCheckBox.Checked); - curApp.UseQuotes = (this.quoteCheckBox.Checked); - curApp.WaitForExit = (this.waitExitCheckBox.Checked); + curApp.UseShellExecute = this.shellexecuteCheckBox.Checked; + curApp.UseQuotes = this.quoteCheckBox.Checked; + curApp.WaitForExit = this.waitExitCheckBox.Checked; curApp.SourceType = ApplicationType.GAMEBASE; curApp.Imagefile = this.applicationImageTextBox.Text; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -60,11 +60,10 @@ int rating; string overview; string system; - string manualFilename; DateTime lastTimeLaunched; int launchCount; - int extFileID; + string tagData; string categoryData; bool isFolder; @@ -104,11 +103,9 @@ rating = -1; overview = ""; system = ""; - manualFilename = ""; isFolder = false; lastTimeLaunched = DateTime.MinValue; launchCount = 0; - extFileID = -1; tagData = ""; categoryData = ""; gameInfoURL = string.Empty; @@ -315,17 +312,7 @@ system = value; } } - public string ManualFilename - { - get - { - return manualFilename; - } - set - { - manualFilename = value; - } - } + public DateTime LastTimeLaunched { get @@ -349,17 +336,7 @@ } } - public int ExtFileID - { - get - { - return extFileID; - } - set - { - extFileID = value; - } - } + public string TagData { get @@ -575,11 +552,9 @@ rating, overview, system, - manualfilename, lastTimeLaunched, launchcount, isfolder, - external_id, uppertitle, tagdata, categorydata, @@ -601,11 +576,9 @@ '" + Rating+ @"', '" + ProgramUtils.Encode(Overview)+ @"', '" + ProgramUtils.Encode(System_)+ @"', - '" + ProgramUtils.Encode(ManualFilename)+ @"', '" + LastTimeLaunched.ToString()+ @"', '" + LaunchCount.ToString()+ @"', '" + ProgramUtils.BooleanToStr(IsFolder)+ @"', - '" + ExtFileID+ @"', '" + ProgramUtils.Encode(Title.ToUpper())+ @"', '" + ProgramUtils.Encode(TagData)+ @"', '" + ProgramUtils.Encode(CategoryData))+ @"', Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemList.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -83,7 +83,6 @@ newFile.Rating = ProgramUtils.GetIntDef(results, iRecord, "rating", 5); newFile.Overview = ProgramUtils.Get(results, iRecord, "overview"); newFile.System_ = ProgramUtils.Get(results, iRecord, "system"); - newFile.ExtFileID = ProgramUtils.GetIntDef(results, iRecord, "external_id", -1); newFile.LastTimeLaunched = ProgramUtils.GetDateDef(results, iRecord, "lastTimeLaunched", DateTime.MinValue); newFile.LaunchCount = ProgramUtils.GetIntDef(results, iRecord, "launchcount", 0); newFile.IsFolder = ProgramUtils.GetBool(results, iRecord, "isfolder"); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FilelinkList.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -63,7 +63,6 @@ newLink.Rating = ProgramUtils.GetIntDef(results, iRecord, "rating", 5); newLink.Overview = ProgramUtils.Get(results, iRecord, "overview"); newLink.System_ = ProgramUtils.Get(results, iRecord, "system"); - newLink.ExtFileID = ProgramUtils.GetIntDef(results, iRecord, "external_id", -1); newLink.LastTimeLaunched = ProgramUtils.GetDateDef(results, iRecord, "lastTimeLaunched", DateTime.MinValue); newLink.LaunchCount = ProgramUtils.GetIntDef(results, iRecord, "launchcount", 0); newLink.IsFolder = ProgramUtils.GetBool(results, iRecord, "isfolder"); @@ -102,12 +101,10 @@ overview, system, import_flag, - manualFilename, lastTimeLaunched, launchCount, - isFolder, - external_id - + isFolder + FROM tblFileItem f, tblFilterItem fi Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-06-26 19:02:52 UTC (rev 641) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs 2007-06-26 20:34:51 UTC (rev 642) @@ -89,7 +89,6 @@ curFile.Overview = myReader["MemoText"].ToString(); curFile.System_ = applicationItem.Title; // not imported properties => set default values - curFile.ManualFilename = ""; curFile.LastTimeLaunched = DateTime.MinValue; curFile.LaunchCount = 0; curFile.Write(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-28 18:50:40
|
Revision: 649 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=649&view=rev Author: northern_sky Date: 2007-06-28 11:49:44 -0700 (Thu, 28 Jun 2007) Log Message: ----------- fixed strange char problem + small rating change Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-28 17:50:10 UTC (rev 648) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-28 18:49:44 UTC (rev 649) @@ -695,7 +695,7 @@ while ((!bSuccess) && (iRetries < 5)) { // brute force! Try five times.... sometimes I get - // a PostHTTP false result... don't know why! + // a ScrapeWebPage false result... don't know why! bSuccess = scraper.FindGameinfo(Title); if (!bSuccess) { @@ -722,7 +722,7 @@ while ((!bSuccess) && (iRetries < 5)) { // brute force! Try five times.... sometimes I get - // a PostHTTP false result... don't know why! + // a ScrapeWebPage false result... don't know why! bSuccess = scraper.FindGameinfoDetail(curApp, this, curInfo, saveType); if (!bSuccess) { @@ -746,7 +746,7 @@ FileInfoFavourite.Manufacturer = this.Manufacturer; FileInfoFavourite.Year = this.Year.ToString(); FileInfoFavourite.Overview = this.Overview; - FileInfoFavourite.RatingNorm = this.Rating; + FileInfoFavourite.Rating = this.Rating; FileInfoFavourite.Platform = this.System_; } @@ -760,7 +760,7 @@ this.Manufacturer = FileInfoFavourite.Manufacturer; this.Year = ProgramUtils.StringToInteger(FileInfoFavourite.Year, -1); this.Overview = FileInfoFavourite.Overview; - this.Rating = FileInfoFavourite.RatingNorm; + this.Rating = FileInfoFavourite.Rating; this.System_ = FileInfoFavourite.Platform; this.GameInfoURL = FileInfoFavourite.GameURL; this.Write(); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-28 17:50:10 UTC (rev 648) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-28 18:49:44 UTC (rev 649) @@ -50,8 +50,7 @@ string year; string style; string platform; - string rating; - int ratingNorm; + int rating; string manufacturer; string overview; @@ -74,8 +73,7 @@ subGenre = ""; style = ""; platform = ""; - rating = ""; - ratingNorm = 0; + rating = 0; imageURLs = ""; manufacturer = ""; overview = ""; @@ -193,7 +191,8 @@ platform = value; } } - public string RatingOrig + + public int Rating { get { @@ -204,17 +203,6 @@ rating = value; } } - public int RatingNorm - { - get - { - return ratingNorm; - } - set - { - ratingNorm = value; - } - } public string Manufacturer { get Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs 2007-06-28 17:50:10 UTC (rev 648) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs 2007-06-28 18:49:44 UTC (rev 649) @@ -99,8 +99,10 @@ List<string> tableRowList = new List<string>(); List<string[]> tableCellList = new List<string[]>(); + string rating = string.Empty; + string httpPostLine = allGameUrlEnd + gameTitle; - string htmlText = PostHTTP(allGameUrlStart, httpPostLine); + string htmlText = ScrapeWebPage(allGameUrlStart, httpPostLine); if (htmlText.Length == 0) return false; @@ -148,7 +150,7 @@ // col 5: "Style // col 6: "Genre // col 7: "Platform - // col 8: "Rating" => use imagename to get rating: "st_gt1.gif" to "st_gt9.gif" + // col 8: "Rating" => in allgame we double it... cos it can be 0.5 etc foreach (string[] tableData in tableCellList) @@ -180,23 +182,22 @@ newGame.Platform = match.Groups["platform"].Value; match = Regex.Match(tableData[8], regexpRating, RegexOptions.IgnoreCase); - newGame.RatingOrig = match.Groups["rating"].Value; + rating = match.Groups["rating"].Value; //the rating can be 0-5 , but also in halfstepmodes... so to fit into old model //with 10 rating and no decimals, we just double the value. - if (newGame.RatingOrig != "") + if (rating != "") { - newGame.RatingOrig = (newGame.RatingOrig).Replace('.', ','); + rating = (rating).Replace('.', ','); } else { - newGame.RatingOrig = "0"; + rating = "0"; } - newGame.RatingNorm = (int)(Convert.ToDouble(newGame.RatingOrig) * 2); + newGame.Rating = (int)(Convert.ToDouble(rating) * 2); - newGame.RelevanceNorm = (ProgramUtils.StringToInteger(newGame.RelevanceOrig, -1) + 44); gameList.Add(newGame); @@ -230,12 +231,12 @@ // query string is as in the following example: //http://www.allgame.com/cg/agg.dll?p=agg&sql=1:9472 - // To use PostHTTP, we have to split the parameters from the full url + // To use ScrapeWebPage, we have to split the parameters from the full url string strPostData = curGame.GetGameURLPostParams(); if (strPostData == "") return false; - string page = PostHTTP(allGameUrlStart, strPostData); + string page = ScrapeWebPage(allGameUrlStart, strPostData); if (page.Length == 0) return false; @@ -261,9 +262,7 @@ while (match.Success) { - curGame.AddImageURL(match.Groups["link"].Value); - match = match.NextMatch(); } @@ -300,47 +299,42 @@ } - private string PostHTTP(string strURL, string strData) + private string ScrapeWebPage(string url, string strData) { string page = string.Empty; + byte[] bytes = null; + try { - - - WebRequest req = WebRequest.Create(strURL); + HttpWebRequest req = (HttpWebRequest) WebRequest.Create(url); req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; - byte[] bytes = null; // Get the data that is being posted (or sent) to the server bytes = Encoding.ASCII.GetBytes(strData); req.ContentLength = bytes.Length; // 1. Get an output stream from the request object using (Stream outputStream = req.GetRequestStream()) { - // 2. Post the data out to the stream outputStream.Write(bytes, 0, bytes.Length); } - - using (WebResponse result = req.GetResponse()) + using (HttpWebResponse result =(HttpWebResponse) req.GetResponse()) { using (Stream ReceiveStream = result.GetResponseStream()) { - Encoding encode = Encoding.GetEncoding("utf-8"); + Encoding encode = Encoding.GetEncoding(result.CharacterSet); using (StreamReader sr = new StreamReader(ReceiveStream, encode)) { page = sr.ReadToEnd(); } - } } - } catch (Exception ex) { - Log.Info("AllGameScraper:PostHTTP: couldn't connect"); + Log.Info("AllGameScraper:ScrapeWebPage: couldn't connect"); Log.Info(ex.Message.ToString()); } return page; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-28 21:16:22
|
Revision: 651 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=651&view=rev Author: chef_koch Date: 2007-06-28 14:16:18 -0700 (Thu, 28 Jun 2007) Log Message: ----------- ImageURLs is now a List<string> type Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-28 18:51:29 UTC (rev 650) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItemInfo.cs 2007-06-28 21:16:18 UTC (rev 651) @@ -54,7 +54,7 @@ string manufacturer; string overview; - string imageURLs; + List<string> imageURLs; bool isLoaded; #endregion @@ -74,7 +74,7 @@ style = ""; platform = ""; rating = 0; - imageURLs = ""; + imageURLs = new List<string>(); manufacturer = ""; overview = ""; isLoaded = false; @@ -226,7 +226,7 @@ } } - public string ImageURLs + public List<string> ImageURLs { get { @@ -279,23 +279,10 @@ return result; } - public void AddImageURL(string strURL) - { - if (imageURLs != "") - { - imageURLs = imageURLs + "\n" + strURL; - } - else - { - imageURLs = strURL; - } - } - public void DownloadImages(ApplicationItem curApp, FileItem curFile) { if (curFile == null) return; - List<string> imageUrlsList = new List<string>(this.ImageURLs.Split('\n')); int i = 0; string strFile = ""; @@ -304,7 +291,7 @@ curFile.Imagefile = ""; // download all images - foreach (string imageUrl in imageUrlsList) + foreach (string imageUrl in ImageURLs) { // imageUrl contains a full URL with one picture to download Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs 2007-06-28 18:51:29 UTC (rev 650) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs 2007-06-28 21:16:18 UTC (rev 651) @@ -245,10 +245,10 @@ curGame.Manufacturer = match.Groups["developer"].Value; - curGame.ImageURLs = ""; // clear all imageurls + curGame.ImageURLs.Clear(); // clear all imageurls match = Regex.Match(page, regexpBoxart, RegexOptions.IgnoreCase); - curGame.ImageURLs = match.Value; + curGame.ImageURLs.Add(match.Value); match = Regex.Match(page, regexpSynopsis, RegexOptions.IgnoreCase); string synopsis = match.Groups["synopsis"].Value; @@ -262,7 +262,7 @@ while (match.Success) { - curGame.AddImageURL(match.Groups["link"].Value); + curGame.ImageURLs.Add(match.Groups["link"].Value); match = match.NextMatch(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |