You can subscribe to this list here.
2007 |
Jan
(36) |
Feb
(79) |
Mar
(123) |
Apr
(95) |
May
(119) |
Jun
(172) |
Jul
(124) |
Aug
(100) |
Sep
(83) |
Oct
(52) |
Nov
(97) |
Dec
(87) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(131) |
Feb
(80) |
Mar
(163) |
Apr
(178) |
May
(73) |
Jun
(54) |
Jul
(106) |
Aug
(118) |
Sep
(50) |
Oct
(125) |
Nov
(100) |
Dec
(99) |
2009 |
Jan
(104) |
Feb
(99) |
Mar
(68) |
Apr
(81) |
May
(52) |
Jun
(87) |
Jul
(67) |
Aug
(33) |
Sep
(27) |
Oct
(37) |
Nov
(60) |
Dec
(116) |
2010 |
Jan
(82) |
Feb
(79) |
Mar
(38) |
Apr
(50) |
May
(45) |
Jun
(53) |
Jul
(23) |
Aug
(86) |
Sep
(22) |
Oct
(96) |
Nov
(97) |
Dec
(73) |
2011 |
Jan
(24) |
Feb
(45) |
Mar
(28) |
Apr
(31) |
May
(42) |
Jun
(25) |
Jul
|
Aug
(12) |
Sep
(28) |
Oct
(13) |
Nov
(43) |
Dec
(13) |
2012 |
Jan
(62) |
Feb
(28) |
Mar
(6) |
Apr
(16) |
May
(7) |
Jun
|
Jul
(16) |
Aug
(2) |
Sep
(1) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
2013 |
Jan
(5) |
Feb
|
Mar
(34) |
Apr
(9) |
May
(6) |
Jun
(10) |
Jul
(32) |
Aug
(8) |
Sep
(11) |
Oct
(35) |
Nov
(24) |
Dec
(22) |
2014 |
Jan
(44) |
Feb
(9) |
Mar
(9) |
Apr
(15) |
May
(25) |
Jun
(34) |
Jul
(16) |
Aug
(11) |
Sep
(7) |
Oct
(6) |
Nov
(1) |
Dec
(12) |
2015 |
Jan
(33) |
Feb
(19) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
From: <ze...@us...> - 2007-06-12 21:43:19
|
Revision: 523 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=523&view=rev Author: zebons Date: 2007-06-12 14:43:17 -0700 (Tue, 12 Jun 2007) Log Message: ----------- Corrected bug when trying to launch a file movie store in the root directory (share drive for example) Modified Paths: -------------- trunk/plugins/MyFilms/MesFilmsDetail.cs Modified: trunk/plugins/MyFilms/MesFilmsDetail.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-06-12 21:02:26 UTC (rev 522) +++ trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-06-12 21:43:17 UTC (rev 523) @@ -1069,7 +1069,10 @@ if (!multifile) { //case monofile search files belonging same movie (extension cdx or diskx) string folder = file.Substring(0, file.LastIndexOf(@"\")); - file = folder + file.Substring(file.LastIndexOf(@"\") + 1); + if ((folder.Length == 2) && (folder.Substring(1,1) == ":")) + file = folder + "\\" + file.Substring(file.LastIndexOf(@"\") + 1); + else + file = folder + file.Substring(file.LastIndexOf(@"\") + 1); ArrayList items = m_directory.GetDirectory(folder.ToString()); for (int i = 0; i < items.Count; ++i) @@ -1387,8 +1390,9 @@ System.Text.RegularExpressions.MatchCollection oMatches = oRegex.Matches(fi.Name.ToLower()); foreach (System.Text.RegularExpressions.Match oMatch in oMatches) { - if (MediaPortal.Util.Utils.IsVideo(fi.Name)) - result.Add(fi.Name); + if (MediaPortal.Util.Utils.IsVideo(fi.Name) || VirtualDirectory.IsImageFile(System.IO.Path.GetExtension(fi.Name))) + + result.Add(path + "\\" + fi.Name); else { if (fi.Attributes.ToString() == "Directory") 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: <an...@us...> - 2007-06-12 17:50:36
|
Revision: 521 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=521&view=rev Author: and-81 Date: 2007-06-12 10:50:28 -0700 (Tue, 12 Jun 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -126,7 +126,6 @@ private void MainForm_Load(object sender, EventArgs e) { - IrssLog.LogLevel = IrssLog.Level.Debug; IrssLog.Open(Common.FolderIrssLogs + "Debug Client.log"); @@ -407,6 +406,16 @@ { AddStatusLine(ex.Message); } + + try + { + if (PipeAccess.ServerRunning) + PipeAccess.StopServer(); + } + catch (Exception ex) + { + AddStatusLine(ex.Message); + } } private void buttonBlast_Click(object sender, EventArgs e) { Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -984,9 +984,7 @@ if (_pluginTransmit != null) { - if (String.IsNullOrEmpty(transceiverInfo.Name)) - transceiverInfo.Name = _pluginTransmit.Name; - + transceiverInfo.Name = _pluginTransmit.Name; transceiverInfo.Ports = _pluginTransmit.AvailablePorts; transceiverInfo.Speeds = _pluginTransmit.AvailableSpeeds; transceiverInfo.CanLearn = _pluginTransmit.CanLearn; Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -30,7 +30,7 @@ // Build Number // Revision // -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -32,7 +32,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -88,7 +88,7 @@ _ports = new string[] { "None" }; _speeds = new string[] { "None" }; - _name = String.Empty; + _name = "None"; _canLearn = false; _canReceive = false; _canTransmit = false; Modified: trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -32,7 +32,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -33,7 +33,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(false)] \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -209,7 +209,7 @@ #region IIRServerPlugin Members public string Name { get { return "FusionREMOTE"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "DViCO FusionREMOTE Receiver"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -49,7 +49,7 @@ #region IIRServerPlugin Members public string Name { get { return "IRMan"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "Receiver support for the Serial IRMan device"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -221,7 +221,7 @@ #region IIRServerPlugin Members public string Name { get { return "IRTrans (Experimental)"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "IRTrans Transceiver (Experimental)"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -63,7 +63,7 @@ #region IIRServerPlugin Members public string Name { get { return "IgorPlug USB"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "IgorPlug USB Receiver"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -42,7 +42,7 @@ #region IIRServerPlugin Members public string Name { get { return "MCE Replacement"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "Supports the MCE Replacement Driver for accessing the Microsoft MCE transceiver"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -335,7 +335,7 @@ #region IIRServerPlugin Members public string Name { get { return "Microsoft MCE"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "Microsoft MCE Infrared Transceiver"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -202,7 +202,7 @@ #region IIRServerPlugin Members public string Name { get { return "USB-UIRT"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "Support for the USB-UIRT transceiver"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -43,7 +43,7 @@ #region IIRServerPlugin Members public string Name { get { return "WinLirc"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81, original code for MediaPortal by Sven"; } } public string Description { get { return "Supports WinLirc as a reciever"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -54,7 +54,7 @@ #region IIRServerPlugin Members public string Name { get { return "Windows Messages"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "Supports receiving simulated button presses through Windows Messages"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -43,7 +43,7 @@ #region IIRServerPlugin Members public string Name { get { return "X10 (Experimental)"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "X10 Transceiver (Experimental)"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -29,7 +29,7 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -187,7 +187,7 @@ #region IIRServerPlugin Members public string Name { get { return "XBCDRC"; } } - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } public string Author { get { return "and-81"; } } public string Description { get { return "Supports the XBox 1 IR receiver with XBCDRC"; } } public bool CanReceive { get { return true; } } Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -39,7 +39,7 @@ const int WindowID = 248101; - internal const string PluginVersion = "MP Blast Zone Plugin 1.0.3.1 for IR Server"; + internal const string PluginVersion = "MP Blast Zone Plugin 1.0.3.2 for IR Server"; internal static readonly string MenuFile = Common.FolderAppData + "MP Blast Zone Plugin\\Menu.xml"; @@ -156,19 +156,26 @@ public void ShowPlugin() { - InConfiguration = true; + try + { + InConfiguration = true; - if (LogVerbose) - Log.Info("MPBlastZonePlugin: ShowPlugin()"); + if (LogVerbose) + Log.Info("MPBlastZonePlugin: ShowPlugin()"); - SetupForm setupForm = new SetupForm(); - if (setupForm.ShowDialog() == DialogResult.OK) - SaveSettings(); + SetupForm setupForm = new SetupForm(); + if (setupForm.ShowDialog() == DialogResult.OK) + SaveSettings(); - StopComms(); + StopComms(); - if (LogVerbose) - Log.Info("MPBlastZonePlugin: ShowPlugin() - End"); + if (LogVerbose) + Log.Info("MPBlastZonePlugin: ShowPlugin() - End"); + } + catch (Exception ex) + { + Log.Error(ex); + } } #endregion @@ -183,16 +190,35 @@ public override bool Init() { - Start(); + InConfiguration = false; - return Load(GUIGraphicsContext.Skin + "\\BlastZone.xml"); + Log.Info("MPBlastZonePlugin: Starting ({0})", PluginVersion); + + if (!StartComms()) + Log.Error("MPBlastZonePlugin: Failed to start local comms, IR blasting is disabled for this session"); + + if (Load(GUIGraphicsContext.Skin + "\\BlastZone.xml")) + { + if (LogVerbose) + Log.Info("MPBlastZonePlugin: Started"); + + return true; + } + else + { + Log.Error("MPBlastZonePlugin: Failed to load skin file."); + return false; + } } public override void DeInit() { - Stop(); + StopComms(); base.DeInit(); + + if (LogVerbose) + Log.Info("MPBlastZonePlugin: Stopped"); } protected override void OnPageLoad() @@ -239,30 +265,6 @@ #region Implementation - static void Start() - { - Log.Info("MPBlastZonePlugin: Starting ({0})", PluginVersion); - - Log.Debug("MPBlastZonePlugin: Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit")); - - InConfiguration = false; - - if (!StartComms()) - Log.Error("MPBlastZonePlugin: Failed to start local comms, IR blasting is disabled for this session"); - - if (LogVerbose) - Log.Info("MPBlastZonePlugin: Started"); - } - static void Stop() - { - if (LogVerbose) - Log.Info("MPBlastZonePlugin: Stopping"); - - StopComms(); - - Log.Info("MPBlastZonePlugin: Stopped"); - } - static string GetCommand(string path, string name) { foreach (string collection in _menu.GetAllItems()) Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -34,8 +34,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersionAttribute("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersionAttribute("1.0.3.2")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -404,9 +404,7 @@ } else { - string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length)); - - BlastCommand blastCommand = new BlastCommand(commands); + BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length)); if (blastCommand.ShowDialog(this) == DialogResult.Cancel) return; Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -206,15 +206,13 @@ public void Start() { + InConfiguration = false; + Log.Info("MPControlPlugin: Starting ({0})", PluginVersion); - Log.Debug("MPControlPlugin: Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit")); - // Load basic settings LoadSettings(); - InConfiguration = false; - // Load the remote button mappings _remoteMap = LoadRemoteMap(RemotesFile); @@ -250,9 +248,6 @@ } public void Stop() { - if (LogVerbose) - Log.Info("MPControlPlugin: Stopping"); - //SystemEvents.SessionEnding -= new SessionEndingEventHandler(SystemEvents_SessionEnding); SystemEvents.PowerModeChanged -= new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); @@ -273,7 +268,8 @@ for (int i = 0; i < _multiInputHandlers.Count; i++) _multiInputHandlers[i] = null; - Log.Info("MPControlPlugin: Stopped"); + if (LogVerbose) + Log.Info("MPControlPlugin: Stopped"); } #endregion IPlugin methods @@ -290,23 +286,30 @@ public void ShowPlugin() { - LoadSettings(); - LoadDefaultMapping(); - LoadMultiMappings(); + try + { + LoadSettings(); + LoadDefaultMapping(); + LoadMultiMappings(); - InConfiguration = true; + InConfiguration = true; - if (LogVerbose) - Log.Info("MPControlPlugin: ShowPlugin()"); + if (LogVerbose) + Log.Info("MPControlPlugin: ShowPlugin()"); - SetupForm setupForm = new SetupForm(); - if (setupForm.ShowDialog() == DialogResult.OK) - SaveSettings(); + SetupForm setupForm = new SetupForm(); + if (setupForm.ShowDialog() == DialogResult.OK) + SaveSettings(); - StopComms(); + StopComms(); - if (LogVerbose) - Log.Info("MPControlPlugin: ShowPlugin() - End"); + if (LogVerbose) + Log.Info("MPControlPlugin: ShowPlugin() - End"); + } + catch (Exception ex) + { + Log.Error(ex); + } } public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -34,8 +34,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersionAttribute("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersionAttribute("1.0.3.2")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -27,7 +27,7 @@ #region Constants - internal const string PluginVersion = "TV2 Blaster Plugin 1.0.3.1 for IR Server"; + internal const string PluginVersion = "TV2 Blaster Plugin 1.0.3.2 for IR Server"; internal static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml"; @@ -120,8 +120,6 @@ { Log.Info("TV2BlasterPlugin: Starting ({0})", PluginVersion); - Log.Debug("TV2BlasterPlugin: Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit")); - // Load basic settings LoadSettings(); @@ -140,14 +138,12 @@ } public void Stop() { - if (LogVerbose) - Log.Info("TV2BlasterPlugin: Stopping"); - GUIWindowManager.Receivers -= new SendMessageHandler(OnMessage); StopComms(); - Log.Info("TV2BlasterPlugin: Stopped"); + if (LogVerbose) + Log.Info("TV2BlasterPlugin: Stopped"); } #endregion IPlugin methods @@ -164,22 +160,29 @@ public void ShowPlugin() { - LoadSettings(); - LoadExternalConfigs(); + try + { + LoadSettings(); + LoadExternalConfigs(); - InConfiguration = true; + InConfiguration = true; - if (LogVerbose) - Log.Info("TV2BlasterPlugin: ShowPlugin()"); + if (LogVerbose) + Log.Info("TV2BlasterPlugin: ShowPlugin()"); - SetupForm setupForm = new SetupForm(); - if (setupForm.ShowDialog() == DialogResult.OK) - SaveSettings(); + SetupForm setupForm = new SetupForm(); + if (setupForm.ShowDialog() == DialogResult.OK) + SaveSettings(); - StopComms(); + StopComms(); - if (LogVerbose) - Log.Info("TV2BlasterPlugin: ShowPlugin() - End"); + if (LogVerbose) + Log.Info("TV2BlasterPlugin: ShowPlugin() - End"); + } + catch (Exception ex) + { + Log.Error(ex); + } } public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -28,7 +28,18 @@ public PluginSetup() { InitializeComponent(); + } + #endregion Constructor + + #region SetupTv.SectionSettings + + public override void OnSectionActivated() + { + Log.Info("TV3BlasterPlugin: Configuration activated"); + + TV3BlasterPlugin.InConfiguration = true; + TvBusinessLayer layer = new TvBusinessLayer(); TV3BlasterPlugin.LogVerbose = checkBoxLogVerbose.Checked = Convert.ToBoolean(layer.GetSetting("TV3BlasterPlugin_LogVerbose", "False").Value); TV3BlasterPlugin.ServerHost = layer.GetSetting("TV3BlasterPlugin_ServerHost", String.Empty).Value; @@ -41,14 +52,13 @@ if (!TV3BlasterPlugin.StartComms()) MessageBox.Show(this, "Failed to start local comms. IR functions temporarily disabled.", "TV3 Blaster Plugin - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + TV3BlasterPlugin.LoadExternalConfigs(); + RefreshIRList(); RefreshMacroList(); + + base.OnSectionActivated(); } - - #endregion Constructor - - #region SetupTv.SectionSettings - public override void OnSectionDeActivated() { Log.Info("TV3BlasterPlugin: Configuration deactivated"); @@ -66,23 +76,15 @@ setting.Value = TV3BlasterPlugin.ServerHost; setting.Persist(); - TV3BlasterPlugin.LoadExternalConfigs(); + //TV3BlasterPlugin.LoadExternalConfigs(); + TV3BlasterPlugin.StopComms(); + TV3BlasterPlugin.InConfiguration = false; base.OnSectionDeActivated(); } - public override void OnSectionActivated() - { - Log.Info("TV3BlasterPlugin: Configuration activated"); - TV3BlasterPlugin.InConfiguration = true; - - TV3BlasterPlugin.LoadExternalConfigs(); - - base.OnSectionActivated(); - } - #endregion SetupTv.SectionSettings #region Implementation Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -34,8 +34,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersionAttribute("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersionAttribute("1.0.3.2")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-06-12 16:40:14 UTC (rev 520) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-06-12 17:50:28 UTC (rev 521) @@ -28,7 +28,7 @@ #region Constants - internal const string PluginVersion = "TV3 Blaster Plugin 1.0.3.1 for IR Server"; + internal const string PluginVersion = "TV3 Blaster Plugin 1.0.3.2 for IR Server"; internal static readonly string FolderMacros = Common.FolderAppData + "TV3 Blaster Plugin\\Macro\\"; @@ -70,7 +70,7 @@ /// <summary> /// returns the version of the plugin /// </summary> - public string Version { get { return "1.0.3.1"; } } + public string Version { get { return "1.0.3.2"; } } /// <summary> /// returns the author of the plugin /// </summary> @@ -130,8 +130,6 @@ { Log.Info("TV3BlasterPlugin: Version {0}", PluginVersion); - Log.Debug("TV3BlasterPlugin: Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit")); - InConfiguration = false; TvBusinessLayer layer = new TvBusinessLayer(); @@ -146,6 +144,9 @@ if (!StartComms()) Log.Error("TV3BlasterPlugin: Failed to start local comms, IR blasting is disabled for this session"); + + if (LogVerbose) + Log.Info("TV3BlasterPlugin: Started"); } public void Stop() @@ -154,6 +155,9 @@ events.OnTvServerEvent -= _eventHandler; StopComms(); + + if (LogVerbose) + Log.Info("TV3BlasterPlugin: Stopped"); } [CLSCompliant(false)] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ide...@us...> - 2007-06-12 16:40:32
|
Revision: 520 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=520&view=rev Author: ideasdigger Date: 2007-06-12 09:40:14 -0700 (Tue, 12 Jun 2007) Log Message: ----------- First version of the IE-based WebBrowser plug-in Adopted from the Mozilla-based WebBrowser source code Should work with any IE version (tested 7.0) Supports Zoom in/out functionality Added Paths: ----------- trunk/plugins/WebBrowserIE/ trunk/plugins/WebBrowserIE/Plugins/ trunk/plugins/WebBrowserIE/Plugins/Windows/ trunk/plugins/WebBrowserIE/Plugins/Windows/Interop.SHDocVw.dll trunk/plugins/WebBrowserIE/Plugins/Windows/WebBrowser.dll trunk/plugins/WebBrowserIE/Readme.txt trunk/plugins/WebBrowserIE/Sources/ trunk/plugins/WebBrowserIE/Sources/Common.cs trunk/plugins/WebBrowserIE/Sources/DialogWebKeyboard.cs trunk/plugins/WebBrowserIE/Sources/GUIFavorites.cs trunk/plugins/WebBrowserIE/Sources/GUIWebBrowser.cs trunk/plugins/WebBrowserIE/Sources/GUIWebBrowser.csproj trunk/plugins/WebBrowserIE/Sources/GUIWebBrowser.sln trunk/plugins/WebBrowserIE/Sources/INIFile.cs trunk/plugins/WebBrowserIE/Sources/MozillaFile.cs trunk/plugins/WebBrowserIE/Sources/MozillaNode.cs trunk/plugins/WebBrowserIE/Sources/Node.cs trunk/plugins/WebBrowserIE/skin/ trunk/plugins/WebBrowserIE/skin/BlueTwo/ trunk/plugins/WebBrowserIE/skin/BlueTwo/Media/ trunk/plugins/WebBrowserIE/skin/BlueTwo/Media/nav_zoom_in_focus.PNG trunk/plugins/WebBrowserIE/skin/BlueTwo/Media/nav_zoom_out_focus.PNG trunk/plugins/WebBrowserIE/skin/BlueTwo/WebBrowser.xml Added: trunk/plugins/WebBrowserIE/Plugins/Windows/Interop.SHDocVw.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/WebBrowserIE/Plugins/Windows/Interop.SHDocVw.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/WebBrowserIE/Plugins/Windows/WebBrowser.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/WebBrowserIE/Plugins/Windows/WebBrowser.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/WebBrowserIE/Readme.txt =================================================================== --- trunk/plugins/WebBrowserIE/Readme.txt (rev 0) +++ trunk/plugins/WebBrowserIE/Readme.txt 2007-06-12 16:40:14 UTC (rev 520) @@ -0,0 +1,15 @@ + +The plug-in was adopted from the original Mozilla-based one by Igor Moochnick. + +Homepage link: http://igor.moochnick.googlepages.com/walltop +Download link: http://igor.moochnick.googlepages.com/IEWebControl.exe + +The following DLLs need to be placed in the Plugins\Windows directory of the installed MediaPortal for the plugin to work: + +WebBrowser.dll +Interop.SHDocVw.dll + +Skin files are already in the main MP distribution, but if you'd like to use the Zoom-in and Zoom-out functionality, +copy the files from the attached Skin directory to the Skin directory of the installed MediaPortal. + +NOTE: If you're better than me in the arts of button-creation - please fix my crappy Zoom buttons (booth in-focus and off-focus) Added: trunk/plugins/WebBrowserIE/Sources/Common.cs =================================================================== --- trunk/plugins/WebBrowserIE/Sources/Common.cs (rev 0) +++ trunk/plugins/WebBrowserIE/Sources/Common.cs 2007-06-12 16:40:14 UTC (rev 520) @@ -0,0 +1,56 @@ +#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.Text; + +namespace MediaPortal.GUI.WebBrowser +{ + class Common + { + /// <summary> + /// Menu state enum + /// </summary> + public enum MenuState + { + Browser = 0, + TopBar = 1 + } + /// <summary> + /// Gets the user configured home page from the mediaportal settings + /// </summary> + public static string HomePage + { + get + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + return xmlreader.GetValueAsString("webbrowser", "homePage", string.Empty); + } + } + } + } +} Added: trunk/plugins/WebBrowserIE/Sources/DialogWebKeyboard.cs =================================================================== --- trunk/plugins/WebBrowserIE/Sources/DialogWebKeyboard.cs (rev 0) +++ trunk/plugins/WebBrowserIE/Sources/DialogWebKeyboard.cs 2007-06-12 16:40:14 UTC (rev 520) @@ -0,0 +1,1679 @@ +#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.Drawing; +using System.Windows.Forms; +using System.Collections; +using MediaPortal.GUI.Library; +using Microsoft.DirectX; +using Microsoft.DirectX.Direct3D; +using Direct3D = Microsoft.DirectX.Direct3D; + +namespace MediaPortal.GUI.WebBrowser +{ + /// <summary> + /// </summary> + public class DialogWebKeyboard : GUIWindow, IRenderLayer + { + const int GAP_WIDTH = 0; + const int GAP2_WIDTH = 4; + const int MODEKEY_WIDTH = 110; + const int KEY_INSET = 1; + + const int MAX_KEYS_PER_ROW = 14; + + // Must be this far from center on 0.0 - 1.0 scale + const float JOY_THRESHOLD = 0.25f; + + // How often (per second) the caret blinks + const float fCARET_BLINK_RATE = 1.0f; + + // During the blink period, the amount the caret is visible. 0.5 equals + // half the time, 0.75 equals 3/4ths of the time, etc. + const float fCARET_ON_RATIO = 0.75f; + + // Text colors for keys + const long COLOR_SEARCHTEXT = 0xff000000; // black (0xff10e010) + const long COLOR_HIGHLIGHT = 0xff00ff00; // green + const long COLOR_PRESSED = 0xff808080; // gray + const long COLOR_NORMAL = 0xff000000; // black + const long COLOR_DISABLED = 0xffffffff; // white + const long COLOR_HELPTEXT = 0xffffffff; // white + const long COLOR_FONT_DISABLED = 0xff808080; // gray + const long COLOR_INVISIBLE = 0xff0000ff; // blue + const long COLOR_RED = 0xffff0000; // red + // Font sizes + const int FONTSIZE_BUTTONCHARS = 24; + const int FONTSIZE_BUTTONSTRINGS = 18; + const int FONTSIZE_SEARCHTEXT = 20; + + + // Controller repeat values + const float fINITIAL_REPEAT = 0.333f; // 333 mS recommended for first repeat + const float fSTD_REPEAT = 0.085f; // 85 mS recommended for repeat rate + + // Maximum number of characters in string + const int MAX_CHARS = 64; + + // Width of text box + float fTEXTBOX_WIDTH = 576.0f - 64.0f - 4.0f - 4.0f - 10.0f; + float BUTTON_Y_POS = 411.0f; // button text line + float BUTTON_X_OFFSET = 40.0f; // space between button and text + + const long BUTTONTEXT_COLOR = 0xffffffff; + const float FIXED_JSL_SIZE = 3.0f; + + // Xboxdings font button mappings + const string TEXT_A_BUTTON = "A"; + const string TEXT_B_BUTTON = "B"; + const string TEXT_X_BUTTON = "C"; + const string TEXT_Y_BUTTON = "D"; + const int KEY_WIDTH = 34; // width of std key in pixels + + string[] g_strEnglish = + { + "English", + "Choose Keyboard", + "Sample graphics. Don't use in your game", + "Select", + "Back", + "Help", + "SPACE", + "BKSP", + "SHIFT", + "CAPS", + "ALPHABET", + "SYMB", + "ACEENTS", + "DONE", + "Select", + "Cance", + "Toggle\nmode", + "Display help", + "Backspace", + "Space", + "Trigger buttons move cursor", + }; + enum KeyboardTypes + { + TYPE_ALPHABET = 0, + TYPE_SYMBOLS, + TYPE_ACCENTS, + + TYPE_HIRAGANA, + TYPE_KATAKANA, + TYPE_ANS, + + TYPE_MAX + }; + + enum State + { + STATE_BACK, // Main menu + STATE_KEYBOARD, // Keyboard display + STATE_MAX + }; + + enum ControllerSState + { + XKJ_START = 1 << 0, + XKJ_BACK = 1 << 1, + XKJ_A = 1 << 2, + XKJ_B = 1 << 3, + XKJ_X = 1 << 4, + XKJ_Y = 1 << 5, + XKJ_BLACK = 1 << 6, + XKJ_WHITE = 1 << 7, + XKJ_LEFTTR = 1 << 8, + XKJ_RIGHTTR = 1 << 9, + + XKJ_DUP = 1 << 12, + XKJ_DDOWN = 1 << 13, + XKJ_DLEFT = 1 << 14, + XKJ_DRIGHT = 1 << 15, + XKJ_UP = 1 << 16, + XKJ_DOWN = 1 << 17, + XKJ_LEFT = 1 << 18, + XKJ_RIGHT = 1 << 19 + }; + + enum Event + { + EV_NULL, // No events + EV_A_BUTTON, // A button + EV_START_BUTTON, // Start button + EV_B_BUTTON, // B button + EV_BACK_BUTTON, // Back button + EV_X_BUTTON, // X button + EV_Y_BUTTON, // Y button + EV_WHITE_BUTTON, // White button + EV_BLACK_BUTTON, // Black button + EV_LEFT_BUTTON, // Left trigger + EV_RIGHT_BUTTON, // Right trigger + EV_UP, // Up Dpad or left joy + EV_DOWN, // Down Dpad or left joy + EV_LEFT, // Left Dpad or left joy + EV_RIGHT, // Right Dpad or left joy + + EVENT_MAX + }; + + enum Xkey + { + XK_NULL = 0, + + XK_SPACE = ' ', + XK_LBRACK = '[', + XK_RBRACK = ']', + XK_LBRACE = '{', + XK_RBRACE = '}', + XK_LPAREN = '(', + XK_RPAREN = ')', + XK_FSLASH = '/', + XK_BSLASH = '\\', + XK_LT = '<', + XK_GT = '>', + XK_AT = '@', + XK_SEMI = ';', + XK_COLON = ':', + XK_QUOTE = '\'', + XK_DQUOTE = '\"', + XK_AMPER = '&', + XK_STAR = '*', + XK_QMARK = '?', + XK_COMMA = ',', + XK_PERIOD = '.', + XK_DASH = '-', + XK_UNDERS = '_', + XK_PLUS = '+', + XK_EQUAL = '=', + XK_DOLLAR = '$', + XK_PERCENT = '%', + XK_CARET = '^', + XK_TILDE = '~', + XK_APOS = '`', + XK_EXCL = '!', + XK_VERT = '|', + XK_NSIGN = '#', + + + // Numbers + XK_0 = '0', + XK_1, + XK_2, + XK_3, + XK_4, + XK_5, + XK_6, + XK_7, + XK_8, + XK_9, + + // Letters + XK_A = 'A', + XK_B, + XK_C, + XK_D, + XK_E, + XK_F, + XK_G, + XK_H, + XK_I, + XK_J, + XK_K, + XK_L, + XK_M, + XK_N, + XK_O, + XK_P, + XK_Q, + XK_R, + XK_S, + XK_T, + XK_U, + XK_V, + XK_W, + XK_X, + XK_Y, + XK_Z, + + // Accented characters and other special characters + + XK_INVERTED_EXCL = 0xA1, // \xA1 + XK_CENT_SIGN = 0xA2, // \xA2 + XK_POUND_SIGN = 0xA3, // \xA3 + XK_YEN_SIGN = 0xA5, // \xA5 + XK_COPYRIGHT_SIGN = 0xA9, // \xA9 + XK_LT_DBL_ANGLE_QUOTE = 0xAB, // << + XK_REGISTERED_SIGN = 0xAE, // \xAE + XK_SUPERSCRIPT_TWO = 0xB2, // \xB2 + XK_SUPERSCRIPT_THREE = 0xB3, // \xB3 + XK_ACUTE_ACCENT = 0xB4, // \xB4 + XK_MICRO_SIGN = 0xB5, // \xB5 + XK_SUPERSCRIPT_ONE = 0xB9, // \xB9 + XK_RT_DBL_ANGLE_QUOTE = 0xBB, // >> + XK_INVERTED_QMARK = 0xBF, // \xBF + XK_CAP_A_GRAVE = 0xC0, // \xC0 + XK_CAP_A_ACUTE = 0xC1, // \xC1 + XK_CAP_A_CIRCUMFLEX = 0xC2, // \xC2 + XK_CAP_A_TILDE = 0xC3, // \xC3 + XK_CAP_A_DIAERESIS = 0xC4, // \xC4 + XK_CAP_A_RING = 0xC5, // \xC5 + XK_CAP_AE = 0xC6, // \xC6 + XK_CAP_C_CEDILLA = 0xC7, // \xC7 + XK_CAP_E_GRAVE = 0xC8, // \xC8 + XK_CAP_E_ACUTE = 0xC9, // \xC9 + XK_CAP_E_CIRCUMFLEX = 0xCA, // \xCA + XK_CAP_E_DIAERESIS = 0xCB, // \xCB + XK_CAP_I_GRAVE = 0xCC, // \xCC + XK_CAP_I_ACUTE = 0xCD, // \xCD + XK_CAP_I_CIRCUMFLEX = 0xCE, // \xCE + XK_CAP_I_DIAERESIS = 0xCF, // \xCF + XK_CAP_N_TILDE = 0xD1, // \xD1 + XK_CAP_O_GRAVE = 0xD2, // \xD2 + XK_CAP_O_ACUTE = 0xD3, // \xD3 + XK_CAP_O_CIRCUMFLEX = 0xD4, // \xD4 + XK_CAP_O_TILDE = 0xD5, // \xD5 + XK_CAP_O_DIAERESIS = 0xD6, // \xD6 + XK_CAP_O_STROKE = 0xD8, // \xD8 + XK_CAP_U_GRAVE = 0xD9, // \xD9 + XK_CAP_U_ACUTE = 0xDA, // \xDA + XK_CAP_U_CIRCUMFLEX = 0xDB, // \xDB + XK_CAP_U_DIAERESIS = 0xDC, // \xDC + XK_CAP_Y_ACUTE = 0xDD, // \xDD + XK_SM_SHARP_S = 0xDF, // \xDF + XK_SM_A_GRAVE = 0xE0, // \xE0 + XK_SM_A_ACUTE = 0xE1, // \xE1 + XK_SM_A_CIRCUMFLEX = 0xE2, // \xE2 + XK_SM_A_TILDE = 0xE3, // \xE3 + XK_SM_A_DIAERESIS = 0xE4, // \xE4 + XK_SM_A_RING = 0xE5, // \xE5 + XK_SM_AE = 0xE6, // \xE6 + XK_SM_C_CEDILLA = 0xE7, // \xE7 + XK_SM_E_GRAVE = 0xE8, // \xE8 + XK_SM_E_ACUTE = 0xE9, // \xE9 + XK_SM_E_CIRCUMFLEX = 0xEA, // \xEA + XK_SM_E_DIAERESIS = 0xEB, // \xEB + XK_SM_I_GRAVE = 0xEC, // \xEC + XK_SM_I_ACUTE = 0xED, // \xED + XK_SM_I_CIRCUMFLEX = 0xEE, // \xEE + XK_SM_I_DIAERESIS = 0xEF, // \xEF + XK_SM_N_TILDE = 0xF1, // \xF1 + XK_SM_O_GRAVE = 0xF2, // \xF2 + XK_SM_O_ACUTE = 0xF3, // \xF3 + XK_SM_O_CIRCUMFLEX = 0xF4, // \xF4 + XK_SM_O_TILDE = 0xF5, // \xF5 + XK_SM_O_DIAERESIS = 0xF6, // \xF6 + XK_SM_O_STROKE = 0xF8, // \xF8 + XK_SM_U_GRAVE = 0xF9, // \xF9 + XK_SM_U_ACUTE = 0xFA, // \xFA + XK_SM_U_CIRCUMFLEX = 0xFB, // \xFB + XK_SM_U_DIAERESIS = 0xFC, // \xFC + XK_SM_Y_ACUTE = 0xFD, // \xFD + XK_SM_Y_DIAERESIS = 0xFF, // \xFF + + // Unicode + XK_CAP_Y_DIAERESIS = 0x0178, // Y umlaut + XK_EURO_SIGN = 0x20AC, // Euro symbol + XK_ARROWLEFT = '<', // left arrow + XK_ARROWRIGHT = '>', // right arrow + + // Special + XK_BACKSPACE = 0x10000, // backspace + XK_DELETE, // delete // !!! + XK_SHIFT, // shift + XK_CAPSLOCK, // caps lock + XK_ALPHABET, // alphabet + XK_SYMBOLS, // symbols + XK_ACCENTS, // accents + XK_OK, // "done" + XK_HIRAGANA, // Hiragana + XK_KATAKANA, // Katakana + XK_ANS, // Alphabet/numeral/symbol + XK_PREWWW, // www. + XK_POSTCOM, // .com + XK_POSTNET, // .net + + + + + }; + + enum KeyboardLanguageType + { + KEYBOARD_ENGLISH, + }; + enum StringID + { + STR_MENU_KEYBOARD_NAME, + STR_MENU_CHOOSE_KEYBOARD, + STR_MENU_ILLUSTRATIVE_GRAPHICS, + STR_MENU_A_SELECT, + STR_MENU_B_BACK, + STR_MENU_Y_HELP, + STR_KEY_SPACE, + STR_KEY_BACKSPACE, + STR_KEY_SHIFT, + STR_KEY_CAPSLOCK, + STR_KEY_ALPHABET, + STR_KEY_SYMBOLS, + STR_KEY_ACCENTS, + STR_KEY_DONE, + STR_HELP_SELECT, + STR_HELP_CANCEL, + STR_HELP_TOGGLE, + STR_HELP_HELP, + STR_HELP_BACKSPACE, + STR_HELP_SPACE, + STR_HELP_TRIGGER, + + STR_MAX, + }; + + + class Key + { + public Xkey xKey; // virtual key code + public int dwWidth = KEY_WIDTH; // width of the key + public string strName = ""; // name of key when vKey >= 0x10000 + public Key(Xkey key) + { + xKey = key; + } + public Key(Xkey key, int iwidth) + { + xKey = key; + dwWidth = iwidth; + + // Special keys get their own names + switch (xKey) + { + case Xkey.XK_SPACE: + strName = "SPACE"; + break; + case Xkey.XK_BACKSPACE: + strName = "BKSP"; + break; + case Xkey.XK_SHIFT: + strName = "SHIFT"; + break; + case Xkey.XK_CAPSLOCK: + strName = "CAPS"; + break; + case Xkey.XK_ALPHABET: + strName = "ALPHABET"; + break; + case Xkey.XK_SYMBOLS: + strName = "SYMB"; + break; + case Xkey.XK_ACCENTS: + strName = "ACCENTS"; + break; + case Xkey.XK_OK: + strName = "DONE"; + break; + case Xkey.XK_PREWWW: + strName = "www."; + break; + case Xkey.XK_POSTCOM: + strName = ".com"; + break; + case Xkey.XK_POSTNET: + strName = ".net"; + break; + } + } + }; + + string m_strData = ""; + bool m_bIsCapsLockOn = false; + bool m_bIsShiftOn = false; + State m_State; + int m_iPos; + KeyboardTypes m_iCurrBoard; + int m_iCurrRow; + int m_iCurrKey; + int m_iLastColumn; + //float m_fRepeatDelay; + CachedTexture.Frame m_pKeyTexture; + float m_fKeyHeight; + int m_dwMaxRows; + bool m_bConfirmed; + GUIFont m_Font18; + GUIFont m_Font12; + GUIFont m_FontButtons; + GUIFont m_FontSearchText; + DateTime m_CaretTimer = DateTime.Now; + bool m_bPrevOverlay = true; + bool _Password = false; + GUIImage image; + + ArrayList m_KeyboardList = new ArrayList(); // list of rows = keyboard + + + #region Base Dialog Variables + bool m_bRunning = false; + int m_dwParentWindowID = 0; + GUIWindow m_pParentWindow = null; + #endregion + + public DialogWebKeyboard() + { + GetID = (int)GUIWindow.Window.WINDOW_VIRTUAL_WEB_KEYBOARD; + m_bIsCapsLockOn = false; + m_bIsShiftOn = false; + m_State = State.STATE_KEYBOARD; + m_iPos = 0; + m_iCurrBoard = KeyboardTypes.TYPE_ALPHABET; + m_iCurrRow = 0; + m_iCurrKey = 0; + m_iLastColumn = 0; + //m_fRepeatDelay = fINITIAL_REPEAT; + m_pKeyTexture = null; + + m_fKeyHeight = 42.0f; + m_dwMaxRows = 5; + m_bConfirmed = false; + m_CaretTimer = DateTime.Now; + + + if (GUIGraphicsContext.DX9Device != null) + InitBoard(); + } + + public override bool Init() + { + return true; + } + + public bool IsConfirmed + { + get { return m_bConfirmed; } + } + + void Initialize() + { + m_Font12 = GUIFontManager.GetFont("font12"); + m_Font18 = GUIFontManager.GetFont("font18"); + m_FontButtons = GUIFontManager.GetFont("dingbats"); + m_FontSearchText = GUIFontManager.GetFont("font14"); + + int iTextureWidth, iTextureHeight; + int iImages = GUITextureManager.Load("keyNF.bmp", 0, 0, 0); + if (iImages == 1) + { + m_pKeyTexture = GUITextureManager.GetTexture("keyNF.bmp", 0, out iTextureWidth, out iTextureHeight); + } + image = new GUIImage(this.GetID, 1, 0, 0, 10, 10, "white.bmp", 1); + image.AllocResources(); + } + + void DeInitialize() + { + image.FreeResources(); + image = null; + } + + public void Reset() + { + _Password = false; + m_bConfirmed = false; + m_bIsCapsLockOn = false; + m_bIsShiftOn = false; + m_State = State.STATE_KEYBOARD; + m_iPos = 0; + m_iCurrBoard = KeyboardTypes.TYPE_ALPHABET; + m_iCurrRow = 0; + m_iCurrKey = 0; + m_iLastColumn = 0; + //m_fRepeatDelay = fINITIAL_REPEAT; + m_fKeyHeight = 42.0f; + m_dwMaxRows = 5; + m_iPos = 0; + m_strData = ""; + m_CaretTimer = DateTime.Now; + + + int y = 411; + int x = 40; + GUIGraphicsContext.ScalePosToScreenResolution(ref x, ref y); + BUTTON_Y_POS = x; // button text line + BUTTON_X_OFFSET = y; // space between button and text + + int width = 42; + GUIGraphicsContext.ScaleHorizontal(ref width); + m_fKeyHeight = width; + + width = (int)(576.0f - 64.0f - 4.0f - 4.0f - 10.0f); + GUIGraphicsContext.ScaleHorizontal(ref width); + fTEXTBOX_WIDTH = width; + + InitBoard(); + } + + public bool Password + { + get { return _Password; } + set { _Password = value; } + } + + protected void PageLoad() + { + m_bPrevOverlay = GUIGraphicsContext.Overlay; + m_bConfirmed = false; + GUIGraphicsContext.Overlay = false; + GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(100000 + (int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD)); + Log.Info("window:{0} init", this.ToString()); + Initialize(); + } + + protected void PageDestroy() + { + GUIGraphicsContext.Overlay = m_bPrevOverlay; + DeInitialize(); + + Log.Info("window:{0} deinit", this.ToString()); + FreeResources(); + } + + public string Text + { + get { return m_strData; } + set { m_strData = value; } + } + + public void SelectActiveButton(float x, float y) + { + // Draw each row + int y1 = 250, x1 = 64; + GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1); + float fY = y1; + ArrayList keyBoard = (ArrayList)m_KeyboardList[(int)m_iCurrBoard]; + for (int row = 0; row < m_dwMaxRows; ++row, fY += m_fKeyHeight) + { + float fX = x1; + float fWidthSum = 0.0f; + ArrayList keyRow = (ArrayList)keyBoard[row]; + int dwIndex = 0; + for (int i = 0; i < keyRow.Count; i++) + { + Key key = (Key)keyRow[i]; + int width = key.dwWidth; + GUIGraphicsContext.ScaleHorizontal(ref width); + if (x >= fX + fWidthSum && x <= fX + fWidthSum + key.dwWidth) + { + if (y >= fY && y < fY + m_fKeyHeight) + { + m_iCurrRow = row; + m_iCurrKey = dwIndex; + return; + } + } + fWidthSum += width; + // There's a slightly larger gap between the leftmost keys (mode + // keys) and the main keyboard + if (dwIndex == 0) + { + width = GAP2_WIDTH; + GUIGraphicsContext.ScaleHorizontal(ref width); + fWidthSum += width; + } + else + { + width = GAP_WIDTH; + GUIGraphicsContext.ScaleHorizontal(ref width); + fWidthSum += width; + } + ++dwIndex; + + } + } + + // Default no key found no key highlighted + if (m_iCurrKey != -1) m_iLastColumn = m_iCurrKey; + m_iCurrKey = -1; + } + + public override void OnAction(Action action) + { + if (action.wID == Action.ActionType.ACTION_CLOSE_DIALOG || action.wID == Action.ActionType.ACTION_PREVIOUS_MENU || action.wID == Action.ActionType.ACTION_CONTEXT_MENU) + { + Close(); + return; + } + + Event ev; + switch (action.wID) + { + case Action.ActionType.ACTION_MOUSE_MOVE: + SelectActiveButton(action.fAmount1, action.fAmount2); + break; + case Action.ActionType.ACTION_MOUSE_CLICK: + ev = Event.EV_A_BUTTON; + UpdateState(ev); + break; + + case Action.ActionType.ACTION_SELECT_ITEM: + if (m_iCurrKey == -1) + { + Close(); + m_bConfirmed = true; + } + ev = Event.EV_A_BUTTON; + UpdateState(ev); + break; + + case Action.ActionType.ACTION_MOVE_DOWN: + ev = Event.EV_DOWN; + UpdateState(ev); + break; + + case Action.ActionType.ACTION_MOVE_UP: + ev = Event.EV_UP; + UpdateState(ev); + break; + + case Action.ActionType.ACTION_MOVE_LEFT: + ev = Event.EV_LEFT; + UpdateState(ev); + break; + + case Action.ActionType.ACTION_MOVE_RIGHT: + ev = Event.EV_RIGHT; + UpdateState(ev); + break; + + case Action.ActionType.ACTION_PREVIOUS_MENU: + ev = Event.EV_BACK_BUTTON; + UpdateState(ev); + break; + + case Action.ActionType.ACTION_KEY_PRESSED: + if (action.m_key != null) + { + if (action.m_key.KeyChar >= 32) + Press((char)action.m_key.KeyChar); + if (action.m_key.KeyChar == 8) + { + Press(Xkey.XK_BACKSPACE); + } + } + break; + } + } + void Close() + { + m_bRunning = false; + } + + public void DoModal(int dwParentId) + { + + m_dwParentWindowID = dwParentId; + m_pParentWindow = GUIWindowManager.GetWindow(m_dwParentWindowID); + if (null == m_pParentWindow) + { + m_dwParentWindowID = 0; + return; + } + GUIWindowManager.IsSwitchingToNewWindow = true; + + GUIWindowManager.RouteToWindow(GetID); + + GUILayerManager.RegisterLayer(this, GUILayerManager.LayerType.Dialog); + // active this window... (with its own OnPageLoad) + PageLoad(); + + GUIWindowManager.IsSwitchingToNewWindow = false; + m_bRunning = true; + m_iPos = m_strData.Length; + while (m_bRunning && GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING) + { + GUIWindowManager.Process(); + } + + GUIWindowManager.IsSwitchingToNewWindow = true; + lock (this) + { + // deactive this window... (with its own OnPageDestroy) + PageDestroy(); + + GUIWindowManager.UnRoute(); + m_pParentWindow = null; + } + GUIWindowManager.IsSwitchingToNewWindow = false; + GUILayerManager.UnRegisterLayer(this); + } + + public override void Render(float timePassed) + { + + lock (this) + { + + RenderKeyboardLatin(timePassed); + } + } + + void InitBoard() + { + // Restore keyboard to default state + m_iCurrRow = 0; + m_iCurrKey = 0; + m_iLastColumn = 1; + m_iCurrBoard = KeyboardTypes.TYPE_ALPHABET; + m_bIsCapsLockOn = false; + m_bIsShiftOn = false; + m_strData = ""; + m_iPos = 0; + int height = 42; + GUIGraphicsContext.ScaleVertical(ref height); + m_fKeyHeight = height; + m_dwMaxRows = 5; + + // Destroy old keyboard + m_KeyboardList.Clear(); + + + //------------------------------------------------------------------------- + // Alpha keyboard + //------------------------------------------------------------------------- + + ArrayList keyBoard = new ArrayList(); + + // First row is Done, 1-0 + ArrayList keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_OK, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_PERIOD)); + keyRow.Add(new Key(Xkey.XK_FSLASH)); + keyRow.Add(new Key(Xkey.XK_AT)); + keyRow.Add(new Key(Xkey.XK_1)); + keyRow.Add(new Key(Xkey.XK_2)); + keyRow.Add(new Key(Xkey.XK_3)); + keyRow.Add(new Key(Xkey.XK_4)); + keyRow.Add(new Key(Xkey.XK_5)); + keyRow.Add(new Key(Xkey.XK_6)); + keyRow.Add(new Key(Xkey.XK_7)); + keyRow.Add(new Key(Xkey.XK_8)); + keyRow.Add(new Key(Xkey.XK_9)); + keyRow.Add(new Key(Xkey.XK_0)); + keyBoard.Add(keyRow); + + // Second row is Shift, A-J + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_SHIFT, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_PREWWW, (KEY_WIDTH * 3) + (GAP_WIDTH * 1))); + keyRow.Add(new Key(Xkey.XK_A)); + keyRow.Add(new Key(Xkey.XK_B)); + keyRow.Add(new Key(Xkey.XK_C)); + keyRow.Add(new Key(Xkey.XK_D)); + keyRow.Add(new Key(Xkey.XK_E)); + keyRow.Add(new Key(Xkey.XK_F)); + keyRow.Add(new Key(Xkey.XK_G)); + keyRow.Add(new Key(Xkey.XK_H)); + keyRow.Add(new Key(Xkey.XK_I)); + keyRow.Add(new Key(Xkey.XK_J)); + keyBoard.Add(keyRow); + + // Third row is Caps Lock, K-T + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_CAPSLOCK, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_POSTCOM, (KEY_WIDTH * 3) + (GAP_WIDTH * 1))); + keyRow.Add(new Key(Xkey.XK_K)); + keyRow.Add(new Key(Xkey.XK_L)); + keyRow.Add(new Key(Xkey.XK_M)); + keyRow.Add(new Key(Xkey.XK_N)); + keyRow.Add(new Key(Xkey.XK_O)); + keyRow.Add(new Key(Xkey.XK_P)); + keyRow.Add(new Key(Xkey.XK_Q)); + keyRow.Add(new Key(Xkey.XK_R)); + keyRow.Add(new Key(Xkey.XK_S)); + keyRow.Add(new Key(Xkey.XK_T)); + keyBoard.Add(keyRow); + + // Fourth row is Symbols, U-Z, Backspace + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_SYMBOLS, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_POSTNET, (KEY_WIDTH * 3) + (GAP_WIDTH * 1))); + keyRow.Add(new Key(Xkey.XK_U)); + keyRow.Add(new Key(Xkey.XK_V)); + keyRow.Add(new Key(Xkey.XK_W)); + keyRow.Add(new Key(Xkey.XK_X)); + keyRow.Add(new Key(Xkey.XK_Y)); + keyRow.Add(new Key(Xkey.XK_Z)); + keyRow.Add(new Key(Xkey.XK_BACKSPACE, (KEY_WIDTH * 4) + (GAP_WIDTH * 3))); + keyBoard.Add(keyRow); + + // Fifth row is Accents, Space, Left, Right + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_ACCENTS, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_SPACE, (KEY_WIDTH * 7) + (GAP_WIDTH * 5))); + keyRow.Add(new Key(Xkey.XK_ARROWLEFT, (KEY_WIDTH * 2) + (GAP_WIDTH * 1))); + keyRow.Add(new Key(Xkey.XK_ARROWRIGHT, (KEY_WIDTH * 2) + (GAP_WIDTH * 1))); + keyBoard.Add(keyRow); + + // Add the alpha keyboard to the list + m_KeyboardList.Add(keyBoard); + + //------------------------------------------------------------------------- + // Symbol keyboard + //------------------------------------------------------------------------- + + keyBoard = new ArrayList(); + + // First row + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_OK, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_LPAREN)); + keyRow.Add(new Key(Xkey.XK_RPAREN)); + keyRow.Add(new Key(Xkey.XK_AMPER)); + keyRow.Add(new Key(Xkey.XK_UNDERS)); + keyRow.Add(new Key(Xkey.XK_CARET)); + keyRow.Add(new Key(Xkey.XK_PERCENT)); + keyRow.Add(new Key(Xkey.XK_BSLASH)); + keyRow.Add(new Key(Xkey.XK_FSLASH)); + keyRow.Add(new Key(Xkey.XK_AT)); + keyRow.Add(new Key(Xkey.XK_NSIGN)); + keyBoard.Add(keyRow); + + // Second row + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_SHIFT, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_LBRACK)); + keyRow.Add(new Key(Xkey.XK_RBRACK)); + keyRow.Add(new Key(Xkey.XK_DOLLAR)); + keyRow.Add(new Key(Xkey.XK_POUND_SIGN)); + keyRow.Add(new Key(Xkey.XK_YEN_SIGN)); + keyRow.Add(new Key(Xkey.XK_EURO_SIGN)); + keyRow.Add(new Key(Xkey.XK_SEMI)); + keyRow.Add(new Key(Xkey.XK_COLON)); + keyRow.Add(new Key(Xkey.XK_QUOTE)); + keyRow.Add(new Key(Xkey.XK_DQUOTE)); + keyBoard.Add(keyRow); + + // Third row + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_CAPSLOCK, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_LT)); + keyRow.Add(new Key(Xkey.XK_GT)); + keyRow.Add(new Key(Xkey.XK_QMARK)); + keyRow.Add(new Key(Xkey.XK_EXCL)); + keyRow.Add(new Key(Xkey.XK_INVERTED_QMARK)); + keyRow.Add(new Key(Xkey.XK_INVERTED_EXCL)); + keyRow.Add(new Key(Xkey.XK_DASH)); + keyRow.Add(new Key(Xkey.XK_STAR)); + keyRow.Add(new Key(Xkey.XK_PLUS)); + keyRow.Add(new Key(Xkey.XK_EQUAL)); + keyBoard.Add(keyRow); + + // Fourth row + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_ALPHABET, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_LBRACE)); + keyRow.Add(new Key(Xkey.XK_RBRACE)); + keyRow.Add(new Key(Xkey.XK_LT_DBL_ANGLE_QUOTE)); + keyRow.Add(new Key(Xkey.XK_RT_DBL_ANGLE_QUOTE)); + keyRow.Add(new Key(Xkey.XK_COMMA)); + keyRow.Add(new Key(Xkey.XK_PERIOD)); + keyRow.Add(new Key(Xkey.XK_BACKSPACE, (KEY_WIDTH * 4) + (GAP_WIDTH * 3))); + keyBoard.Add(keyRow); + + // Fifth row is Accents, Space, Left, Right + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_ACCENTS, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_SPACE, (KEY_WIDTH * 6) + (GAP_WIDTH * 5))); + keyRow.Add(new Key(Xkey.XK_ARROWLEFT, (KEY_WIDTH * 2) + (GAP_WIDTH * 1))); + keyRow.Add(new Key(Xkey.XK_ARROWRIGHT, (KEY_WIDTH * 2) + (GAP_WIDTH * 1))); + keyBoard.Add(keyRow); + + // Add the symbol keyboard to the list + m_KeyboardList.Add(keyBoard); + + //------------------------------------------------------------------------- + // Accents keyboard + //------------------------------------------------------------------------- + + keyBoard = new ArrayList(); + + // First row + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_OK, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_1)); + keyRow.Add(new Key(Xkey.XK_2)); + keyRow.Add(new Key(Xkey.XK_3)); + keyRow.Add(new Key(Xkey.XK_4)); + keyRow.Add(new Key(Xkey.XK_5)); + keyRow.Add(new Key(Xkey.XK_6)); + keyRow.Add(new Key(Xkey.XK_7)); + keyRow.Add(new Key(Xkey.XK_8)); + keyRow.Add(new Key(Xkey.XK_9)); + keyRow.Add(new Key(Xkey.XK_0)); + keyBoard.Add(keyRow); + + // Second row + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_SHIFT, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_CAP_A_GRAVE)); + keyRow.Add(new Key(Xkey.XK_CAP_A_ACUTE)); + keyRow.Add(new Key(Xkey.XK_CAP_A_CIRCUMFLEX)); + keyRow.Add(new Key(Xkey.XK_CAP_A_DIAERESIS)); + keyRow.Add(new Key(Xkey.XK_CAP_C_CEDILLA)); + keyRow.Add(new Key(Xkey.XK_CAP_E_GRAVE)); + keyRow.Add(new Key(Xkey.XK_CAP_E_ACUTE)); + keyRow.Add(new Key(Xkey.XK_CAP_E_CIRCUMFLEX)); + keyRow.Add(new Key(Xkey.XK_CAP_E_DIAERESIS)); + keyRow.Add(new Key(Xkey.XK_CAP_I_GRAVE)); + keyBoard.Add(keyRow); + + // Third row + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_CAPSLOCK, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_CAP_I_ACUTE)); + keyRow.Add(new Key(Xkey.XK_CAP_I_CIRCUMFLEX)); + keyRow.Add(new Key(Xkey.XK_CAP_I_DIAERESIS)); + keyRow.Add(new Key(Xkey.XK_CAP_N_TILDE)); + keyRow.Add(new Key(Xkey.XK_CAP_O_GRAVE)); + keyRow.Add(new Key(Xkey.XK_CAP_O_ACUTE)); + keyRow.Add(new Key(Xkey.XK_CAP_O_CIRCUMFLEX)); + keyRow.Add(new Key(Xkey.XK_CAP_O_TILDE)); + keyRow.Add(new Key(Xkey.XK_CAP_O_DIAERESIS)); + keyRow.Add(new Key(Xkey.XK_SM_SHARP_S)); + keyBoard.Add(keyRow); + + // Fourth row + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_ALPHABET, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_CAP_U_GRAVE)); + keyRow.Add(new Key(Xkey.XK_CAP_U_ACUTE)); + keyRow.Add(new Key(Xkey.XK_CAP_U_CIRCUMFLEX)); + keyRow.Add(new Key(Xkey.XK_CAP_U_DIAERESIS)); + keyRow.Add(new Key(Xkey.XK_CAP_Y_ACUTE)); + keyRow.Add(new Key(Xkey.XK_CAP_Y_DIAERESIS)); + keyRow.Add(new Key(Xkey.XK_BACKSPACE, (KEY_WIDTH * 4) + (GAP_WIDTH * 3))); + keyBoard.Add(keyRow); + + // Fifth row + keyRow = new ArrayList(); + keyRow.Add(new Key(Xkey.XK_ACCENTS, MODEKEY_WIDTH)); + keyRow.Add(new Key(Xkey.XK_SPACE, (KEY_WIDTH * 6) + (GAP_WIDTH * 5))); + keyRow.Add(new Key(Xkey.XK_ARROWLEFT, (KEY_WIDTH * 2) + (GAP_WIDTH * 1))); + keyRow.Add(new Key(Xkey.XK_ARROWRIGHT, (KEY_WIDTH * 2) + (GAP_WIDTH * 1))); + keyBoard.Add(keyRow); + + // Add the accents keyboard to the list + m_KeyboardList.Add(keyBoard); + + } + + void UpdateState(Event ev) + { + switch (m_State) + { + case State.STATE_KEYBOARD: + switch (ev) + { + case Event.EV_A_BUTTON: // Select current key + case Event.EV_START_BUTTON: + PressCurrent(); + break; + + case Event.EV_B_BUTTON: // Shift mode + case Event.EV_BACK_BUTTON: // Back + m_State = State.STATE_BACK; + Close(); //Added by JM to close automatically + break; + + case Event.EV_X_BUTTON: // Toggle keyboard + Press(m_iCurrBoard == KeyboardTypes.TYPE_SYMBOLS ? Xkey.XK_ALPHABET : Xkey.XK_SYMBOLS); + /*if( m_iKeyboard == KEYBOARD_ENGLISH ) + { + Press( m_iCurrBoard == KeyboardTypes.TYPE_SYMBOLS ?Xkey.XK_ALPHABET : Xkey.XK_SYMBOLS ); + } + else + { + switch( m_iCurrBoard ) + { + case KeyboardTypes.TYPE_ALPHABET: Press( Xkey.XK_SYMBOLS ); break; + case KeyboardTypes.TYPE_SYMBOLS: Press( Xkey.XK_ACCENTS ); break; + case KeyboardTypes.TYPE_ACCENTS: Press( Xkey.XK_ALPHABET ); break; + } + }*/ + break; + case Event.EV_WHITE_BUTTON: // Backspace + Press(Xkey.XK_BACKSPACE); + break; + case Event.EV_BLACK_BUTTON: // Space + Press(Xkey.XK_SPACE); + break; + case Event.EV_LEFT_BUTTON: // Left + Press(Xkey.XK_ARROWLEFT); + break; + case Event.EV_RIGHT_BUTTON: // Right + Press(Xkey.XK_ARROWRIGHT); + break; + + // Navigation + case Event.EV_UP: MoveUp(); break; + case Event.EV_DOWN: MoveDown(); break; + case Event.EV_LEFT: MoveLeft(); break; + case Event.EV_RIGHT: MoveRight(); break; + } + break; + default: + Close(); + break; + } + } + + void ChangeKey(int iBoard, int iRow, int iKey, Key newkey) + { + ArrayList board = (ArrayList)m_KeyboardList[iBoard]; + ArrayList row = (ArrayList)board[iRow]; + row[iKey] = newkey; + } + + void PressCurrent() + { + if (m_iCurrKey == -1) return; + + ArrayList board = (ArrayList)m_KeyboardList[(int)m_iCurrBoard]; + ArrayList row = (ArrayList)board[m_iCurrRow]; + Key key = (Key)row[m_iCurrKey]; + + // Press it + Press(key.xKey); + } + + void Press(char k) + { + // Don't add more than the maximum characters, and don't allow + // text to exceed the width of the text entry field + if (m_strData.Length < MAX_CHARS) + { + float fWidth = 0, fHeight = 0; + m_Font18.GetTextExtent(m_strData, ref fWidth, ref fHeight); + + if (fWidth < fTEXTBOX_WIDTH) + { + if (m_iPos >= m_strData.Length) + m_strData += k.ToString(); + else + m_strData = m_strData.Insert(m_iPos, k.ToString()); + ++m_iPos; // move the caret + } + } + + // Unstick the shift key + m_bIsShiftOn = false; + } + + void Press(Xkey xk) + { + if (xk == Xkey.XK_NULL) // happens in Japanese keyboard (keyboard type) + xk = Xkey.XK_SPACE; + + // If the key represents a character, add it to the word + if (((uint)xk) < 0x10000 && xk != Xkey.XK_ARROWLEFT && xk != Xkey.XK_ARROWRIGHT) + { + // Don't add more than the maximum characters, and don't allow + // text to exceed the width of the text entry field + if (m_strData.Length < MAX_CHARS) + { + float fWidth = 0, fHeight = 0; + m_Font18.GetTextExtent(m_strData, ref fWidth, ref fHeight); + + if (fWidth < fTEXTBOX_WIDTH) + { + if (m_iPos >= m_strData.Length) + m_strData += GetChar(xk).ToString(); + else + m_strData = m_strData.Insert(m_iPos, GetChar(xk).ToString()); + ++m_iPos; // move the caret + } + } + + // Unstick the shift key + m_bIsShiftOn = false; + } + + // Special cases + else switch (xk) + { + case Xkey.XK_BACKSPACE: + if (m_iPos > 0) + { + --m_iPos; // move the caret + m_strData = m_strData.Remove(m_iPos, 1); + } + break; + case Xkey.XK_DELETE: // Used for Japanese only + if (m_strData.Length > 0) + m_strData = m_strData.Remove(m_iPos, 1); + break; + case Xkey.XK_SHIFT: + m_bIsShiftOn = !m_bIsShiftOn; + break; + case Xkey.XK_CAPSLOCK: + m_bIsCapsLockOn = !m_bIsCapsLockOn; + break; + case Xkey.XK_ALPHABET: + m_iCurrBoard = KeyboardTypes.TYPE_ALPHABET; + + // Adjust mode keys + ChangeKey((int)m_iCurrBoard, 3, 0, new Key(Xkey.XK_SYMBOLS, MODEKEY_WIDTH)); + ChangeKey((int)m_iCurrBoard, 4, 0, new Key(Xkey.XK_ACCENTS, MODEKEY_WIDTH)); + + break; + case Xkey.XK_SYMBOLS: + m_iCurrBoard = KeyboardTypes.TYPE_SYMBOLS; + + // Adjust mode keys + ChangeKey((int)m_iCurrBoard, 3, 0, new Key(Xkey.XK_ALPHABET, MODEKEY_WIDTH)); + ChangeKey((int)m_iCurrBoard, 4, 0, new Key(Xkey.XK_ACCENTS, MODEKEY_WIDTH)); + + break; + case Xkey.XK_ACCENTS: + m_iCurrBoard = KeyboardTypes.TYPE_ACCENTS; + + // Adjust mode keys + ChangeKey((int)m_iCurrBoard, 3, 0, new Key(Xkey.XK_ALPHABET, MODEKEY_WIDTH)); + ChangeKey((int)m_iCurrBoard, 4, 0, new Key(Xkey.XK_SYMBOLS, MODEKEY_WIDTH)); + break; + case Xkey.XK_ARROWLEFT: + if (m_iPos > 0) + --m_iPos; + break; + case Xkey.XK_ARROWRIGHT: + if (m_iPos < m_strData.Length) + ++m_iPos; + break; + case Xkey.XK_OK: + Close(); + m_bConfirmed = true; + break; + case Xkey.XK_PREWWW: + m_strData = m_strData.Insert(m_iPos, "www."); + m_iPos = m_iPos + 4; + break; + case Xkey.XK_POSTCOM: + m_strData = m_strData.Insert(m_iPos, ".com"); + m_iPos = m_iPos + 4; + break; + case Xkey.XK_POSTNET: + m_strData = m_strData.Insert(m_iPos, ".net"); + m_iPos = m_iPos + 4; + break; + } + } + + void MoveUp() + { + if (m_iCurrKey == -1) m_iCurrKey = m_iLastColumn; + + do + { + // Update key index for special cases + switch (m_iCurrRow) + { + case 0: + if (1 < m_iCurrKey && m_iCurrKey < 7) // 2 - 6 + { + m_iLastColumn = m_iCurrKey; // remember column + m_iCurrKey = 1; // move to spacebar + } + else if (6 < m_iCurrKey && m_iCurrKey < 9) // 7 - 8 + { + m_iLastColumn = m_iCurrKey; // remember column + m_iCurrKey = 2; // move to left arrow + } + else if (m_iCurrKey > 8) // 9 - 0 + { + m_iLastColumn = m_iCurrKey; // remember column + m_iCurrKey = 3; // move to right arrow + } + break; + case 3: + if (m_iCurrKey == 7) // backspace + m_iCurrKey = Math.Max(7, m_iLastColumn); // restore column + break; + case 4: + if (m_iCurrKey == 1) // spacebar + m_iCurrKey = Math.Min(6, m_iLastColumn); // restore column + else if (m_iCurrKey > 1) // left and right + m_iCurrKey = 7; // backspace + break; + } + + // Update row + m_iCurrRow = (m_iCurrRow == 0) ? m_dwMaxRows - 1 : m_iCurrRow - 1; + + } while (IsKeyDisabled()); + } + + void MoveDown() + { + if (m_iCurrKey == -1) m_iCurrKey = m_iLastColumn; + + do + { + // Update key index for special cases + switch (m_iCurrRow) + { + case 2: + if (m_iCurrKey > 7) // q - t + { + m_iLastColumn = m_iCurrKey; // remember column + m_iCurrKey = 7; // move to backspace + } + break; + case 3: + if (0 < m_iCurrKey && m_iCurrKey < 7) // u - z + { + m_iLastColumn = m_iCurrKey; // remember column + m_iCurrKey = 1; // move to spacebar + } + else if (m_iCurrKey > 6) // backspace + { + if (m_iLastColumn > 8) + m_iCurrKey = 3; // move to right arrow + else + m_iCurrKey = 2; // move to left arrow + } + break; + case 4: + switch (m_iCurrKey) + { + case 1: // spacebar + m_iCurrKey = Math.Min(6, m_iLastColumn); + break; + case 2: // left arrow + m_iCurrKey = Math.Max(Math.Min(8, m_iLastColumn), 7); + break; + case 3: // right arrow + m_iCurrKey = Math.Max(9, m_iLastColumn); + break; + } + break; + } + + // Update row + m_iCurrRow = (m_iCurrRow == m_dwMaxRows - 1) ? 0 : m_iCurrRow + 1; + + } while (IsKeyDisabled()); + } + + void MoveLeft() + { + if (m_iCurrKey == -1) m_iCurrKey = m_iLastColumn; + do + { + if (m_iCurrKey <= 0) + { + ArrayList board = (ArrayList)m_KeyboardList[(int)m_iCurrBoard]; + ArrayList row = (ArrayList)board[m_iCurrRow]; + m_iCurrKey = row.Count - 1; + + } + else + --m_iCurrKey; + + } while (IsKeyDisabled()); + + SetLastColumn(); + } + + void MoveRight() + { + if (m_iCurrKey == -1) m_iCurrKey = m_iLastColumn; + do + { + ArrayList board = (ArrayList)m_KeyboardList[(int)m_iCurrBoard]; + ArrayList row = (ArrayList)board[m_iCurrRow]; + + if (m_iCurrKey == row.Count - 1) + m_iCurrKey = 0; + else + ++m_iCurrKey; + + } while (IsKeyDisabled()); + + SetLastColumn(); + } + + void SetLastColumn() + { + if (m_iCurrKey == -1) return; + // If the new key is a single character, remember it for later + ArrayList board = (ArrayList)m_KeyboardList[(int)m_iCurrBoard]; + ArrayList row = (ArrayList)board[m_iCurrRow]; + Key key = (Key)row[m_iCurrKey]; + if (key.strName == "") + { + switch (key.xKey) + { + // Adjust the last column for the arrow keys to confine it + // within the range of the key width + case Xkey.XK_ARROWLEFT: + m_iLastColumn = (m_iLastColumn <= 7) ? 7 : 8; break; + case Xkey.XK_ARROWRIGHT: + m_iLastColumn = (m_iLastColumn <= 9) ? 9 : 10; break; + + // Single char, non-arrow + default: + m_iLastColumn = m_iCurrKey; break; + } + } + } + + bool IsKeyDisabled() + { + if (m_iCurrKey == -1) return true; + + ArrayList board = (ArrayList)m_KeyboardList[(int)m_iCurrBoard]; + ArrayList row = (ArrayList)board[m_iCurrRow]; + Key key = (Key)row[m_iCurrKey]; + + // On the symbols keyboard, Shift and Caps Lock are disabled + if (m_iCurrBoard == KeyboardTypes.TYPE_SYMBOLS) + { + if (key.xKey == Xkey.XK_SHIFT || key.xKey == Xkey.XK_CAPSLOCK) + return true; + } + + // On the English keyboard, the Accents key is disabled + //if( m_iKeyboard == KeyboardLanguageType.KEYBOARD_ENGLISH ) + { + if (key.xKey == Xkey.XK_ACCENTS) + return true; + } + + return false; + } + + char GetChar(Xkey xk) + { + // Handle case conversion + char wc = (char)(((uint)xk) & 0xffff); + + if ((m_bIsCapsLockOn && !m_bIsShiftOn) || (!m_bIsCapsLockOn && m_bIsShiftOn)) + wc = Char.ToUpper(wc); + else + wc = Char.ToLower(wc); + + return wc; + } + + void RenderKey(float fX, float fY, Key key, long KeyColor, long TextColor) + { + if (KeyColor == COLOR_INVISIBLE || key.xKey == Xkey.XK_NULL) return; + + + string strKey = GetChar(key.xKey).ToString(); + string strName = (key.strName.Length == 0) ? strKey : key.strName; + + int width = key.dwWidth - KEY_INSET + 2; + int height = (int)(KEY_INSET + 2); + GUIGraphicsContext.ScaleHorizontal(ref width); + GUIGraphicsContext.ScaleVertical(ref height); + + float x = fX + KEY_INSET; + float y = fY + KEY_INSET; + float z = fX + width;//z + float w = fY + m_fKeyHeight - height;//w + + float nw = width; + float nh = m_fKeyHeight - height; + + float uoffs = 0; + float v = 1.0f; + float u = 1.0f; + + m_pKeyTexture.Draw(x, y, nw, nh, uoffs, 0.0f, u, v, (int)KeyColor); + /* + VertexBuffer m_vbBuffer = new VertexBuffer(typeof(CustomVertex.TransformedColoredTextured), + 4, GUIGraphicsContext.DX9Device, + 0, CustomVertex.TransformedColoredTextured.Format, + Pool.Managed); + + CustomVertex.TransformedColoredTextured[] verts = (CustomVertex.TransformedColoredTextured[])m_vbBuffer.Lock(0,0); + verts[0].X=x- 0.5f; verts[0].Y=y+nh- 0.5f;verts[0].Z= 0.0f;verts[0].Rhw=1.0f ; + verts[0].Color = (int)KeyColor; + verts[0].Tu = uoffs; + verts[0].Tv = v; + + verts[1].X= x- 0.5f; verts[1].Y=y- 0.5f;verts[1].Z= 0.0f; verts[1].Rhw=1.0f ; + verts[1].Color = (int)KeyColor; + verts[1].Tu = uoffs; + verts[1].Tv = 0.0f; + + verts[2].X= x+nw- 0.5f; verts[2].Y=y+nh- 0.5f;verts[2].Z= 0.0f;verts[2].Rhw=1.0f; + verts[2].Color = (int)KeyColor; + verts[2].Tu = uoffs+u; + verts[2].Tv = v; + + verts[3].X= x+nw- 0.5f;verts[3].Y= y- 0.5f;verts[3].Z= 0.0f;verts[3].Rhw= 1.0f ; + verts[3].Color = (int)KeyColor; + verts[3].Tu = uoffs+u; + verts[3].Tv = 0.0f; + + + m_vbBuffer.Unlock(); + + GUIGraphicsContext.DX9Device.SetTexture( 0, m_pKeyTexture); + + // Render the image + GUIGraphicsContext.DX9Device.SetStreamSource( 0, m_vbBuffer, 0); + GUIGraphicsContext.DX9Device.VertexFormat = CustomVertex.TransformedColoredTextured.Format; + GUIGraphicsContext.DX9Device.DrawPrimitives( PrimitiveType.TriangleStrip, 0, 2 ); + + + // unset the texture and palette or the texture caching crashes because the runtime still has a reference + GUIGraphicsContext.DX9Device.SetTexture( 0, null); + m_vbBuffer.Dispose(); + */ + // Draw the key text. If key name is, use a slightly smaller font. + float fW = 0; + float fH = 0; + float fposX = (x + z) / 2.0f; + float fposY = (y + w) / 2.0f; + fposX -= GUIGraphicsContext.OffsetX; + fposY -= GUIGraphicsContext.OffsetY; + if (key.strName.Length > 1 && Char.IsUpper(key.strName[1])) + { + m_Font12.GetTextExtent(strName, ref fW, ref fH); + fposX -= (fW / 2); + fposY -= (fH / 2); + m_Font12.DrawText(fposX, fposY, TextColor, strName, GUIControl.Alignment.ALIGN_LEFT, -1); + } + else + { + m_Font18.GetTextExtent(strName, ref fW, ref fH); + fposX -= (fW / 2); + fposY -= (fH / 2); + m_Font18.DrawText(fposX, fposY, TextColor, strName, GUIControl.Alignment.ALIGN_LEFT, -1); + } + } + + void DrawTextBox(float timePassed, int x1, int y1, int x2, int y2) + { + //long lColor=0xaaffffff; + + GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1); + GUIGraphicsContext.ScalePosToScreenResolution(ref x2, ref y2); + x1 += GUIGraphicsContext.OffsetX; + x2 += GUIGraphicsContext.OffsetX; + y1 += GUIGraphicsContext.OffsetY; + y2 += GUIGraphicsContext.OffsetY; + /* + Rectangle[] rect = new Rectangle[1]; + rect[0].X=x1; + rect[0].Y=y1; + rect[0].Width=x2-x1; + rect[0].Height=y2-y1; + GUIGraphicsContext.DX9Device.Clear( ClearFlags.Target|ClearFlags.Target, (int)lColor, 1.0f, 0, rect ); + */ + //image.ColourDiffuse=lColor; + image.SetPosition(x1, y1); + image.Width = (x2 - x1); + image.Height = (y2 - y1); + image.Render(timePassed); + + } + + void DrawText(int x, int y) + { + GUIGraphicsContext.ScalePosToScreenResolution(ref x, ref y); + x += GUIGraphicsContext.OffsetX; + y += GUIGraphicsContext.OffsetY; + string strTxt = m_strData; + if (_Password) + { + strTxt = ""; + for (int i = 0; i < m_strData.Length; ++i) strTxt += "*"; + } + + m_FontSearchText.DrawText((float)x, (float)y, COLOR_SEARCHTEXT, strTxt, GUIControl.Alignment.ALIGN_LEFT, -1); + + + // Draw blinking caret using line primitives. + TimeSpan ts = DateTime.Now - m_CaretTimer; + if ((ts.TotalSeconds % fCARET_BLINK_RATE) < fCARET_ON_RATIO) + { + string strLine = strTxt.Substring(0, m_iPos); + + float fCaretWidth = 0.0f; + float fCaretHeight = 0.0f; + m_FontSearchText.GetTextExtent(strLine, ref fCaretWidth, ref fCaretHeight); + x += (int)fCaretWidth; + m_FontSearchText.DrawText((float)x, (float)y, 0xff202020, "|", GUIControl.Alignment.ALIGN_LEFT, -1); + + } + } + + void RenderKeyboardLatin(float timePassed) + { + // Show text and caret + DrawTextBox(timePassed, 64, 208, 576, 248); + DrawText(68, 208); + + + int x1 = 64; + int y1 = 250; + GUIGraphicsContext.ScalePosToScreenResolution(ref x1, ref y1); + x1 += GUIGraphicsContext.OffsetX; + y1 += GUIGraphicsContext.OffsetY; + // Draw each row + float fY = y1; + ArrayList keyBoard = (ArrayList)m_KeyboardList[(int)m_iCurrBoard]; + for (int row = 0; row < m_dwMaxRows; ++row, fY += m_fKeyHeight) + { + float fX = x1; + float fWidthSum = 0.0f; + ArrayList keyRow = (ArrayList)keyBoard[row]; + int dwIndex = 0; + for (int i = 0; i < keyRow.Count; i++) + { + // Determine key name + Key key = (Key)keyRow[i]; + long selKeyColor = 0xffffffff; + long selTextColor = COLOR_NORMAL; + + // Handle special key coloring + switch (key.xKey) + { + case Xkey.XK_SHIFT: + switch (m_iCurrBoard) + { + case KeyboardTypes.TYPE_ALPHABET: + case KeyboardTypes.TYPE_ACCENTS: + if (m_bIsShiftOn) + selKeyColor = COLOR_PRESSED; + break; + case KeyboardTypes.TYPE_SYMBOLS: + selKeyColor = COLOR_DISABLED; + selTextColor = COLOR_FONT_DISABLED; + break; + } + break; + case Xkey.XK_CAPSLOCK: + switch (m_iCurrBoard) + { + case KeyboardTypes.TYPE_ALPHABET: + case KeyboardTypes.TYPE_ACCENTS: + if (m_bIsCapsLockOn) + selKeyColor = COLOR_PRESSED; + break; + case KeyboardTypes.TYPE_SYMBOLS: + selKeyColor = COLOR_DISABLED; + selTextColor = COLOR_FONT_DISABLED; + break; + } + break; + case Xkey.XK_ACCENTS: + selKeyColor = COLOR_INVISIBLE; + selTextColor = COLOR_INVISIBLE; + break; + } + + // Highlight the current key + if (row == m_iCurrRow && dwIndex == m_iCurrKey) + selKeyColor = COLOR_HIGHLIGHT; + + RenderKey(fX + fWidthSum, fY, key, selKeyColor, selTextColor); + + int width = key.dwWidth; + GUIGraphicsContext.ScaleHorizontal(ref width); + fWidthSum += width; + + // There's a slightly larger gap between the leftmost keys (mode + // keys) and the main keyboard + if (dwIndex == 0) + width = GAP2_WIDTH; + else + width = GAP_WIDTH; + GUIGraphicsContext.ScaleHorizontal(ref width); + fWidthSum += width; + + ++dwIndex; + } + } + } + + #region IRenderLayer + public bool ShouldRenderLayer() + { + return true; + } + + public void RenderLayer(float timePassed) + { + Render(timePassed); + } + #endregion + + } +} + Added: trunk/plugins/WebBrowserIE/Sources/GUIFavorites.cs =================================================================== --- trunk/plugins/WebBrowserIE/Sources/GUIFavorites.cs (rev 0) +++ trunk/plugins/WebBrowserIE/Sources/GUIFavorites.cs 2007-06-12 16:40:14 UTC (rev 520) @@ -0,0 +1,226 @@ +#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 MediaPortal.GUI.Library; +using MediaPortal.Util; +using MediaPortal.Dialogs; + +namespace MediaPortal.GUI.WebBrowser +{ + /// <summary> + /// A web browser plugin for mediaportal + /// </summary> + public class GUIFavorites : GUIWindow + { + public const int WINDOW_FAVORITES = 5501; + + DirectoryHistory m_history = new DirectoryHistory(); + string currentFolder = String.Empty; + [SkinControlAttribute(50)] protected GUIFacadeControl facadeView=null; + + #region Constructor + public GUIFavorites() + { + GetID = WINDOW_FAVORITES; + } + #endregion + + #region Private Enumerations + /// <summary> + /// Gui Widgets + ... [truncated message content] |
From: <an...@us...> - 2007-06-12 15:14:13
|
Revision: 519 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=519&view=rev Author: and-81 Date: 2007-06-12 08:14:12 -0700 (Tue, 12 Jun 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-12 14:41:04 UTC (rev 518) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-12 15:14:12 UTC (rev 519) @@ -194,7 +194,8 @@ SourceGrid.Cells.Controllers.CustomEvents nameCellController = new SourceGrid.Cells.Controllers.CustomEvents(); nameCellController.DoubleClick += new EventHandler(PluginDoubleClick); nameCell.AddController(nameCellController); - + + nameCell.AddController(new SourceGrid.Cells.Controllers.ToolTipText()); nameCell.ToolTipText = string.Format("{0}\nVersion: {1}\nAuthor: {2}\n{3}", transceiver.Name, transceiver.Version, transceiver.Author, transceiver.Description); gridPlugins[row, 0] = nameCell; 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: <an...@us...> - 2007-06-12 13:45:08
|
Revision: 517 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=517&view=rev Author: and-81 Date: 2007-06-12 06:45:04 -0700 (Tue, 12 Jun 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -160,15 +160,15 @@ this.groupBoxMode.Size = new System.Drawing.Size(424, 120); this.groupBoxMode.TabIndex = 1; this.groupBoxMode.TabStop = false; - this.groupBoxMode.Text = "Server mode"; + this.groupBoxMode.Text = "Mode"; // // labelComputer // this.labelComputer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.labelComputer.Location = new System.Drawing.Point(160, 24); + this.labelComputer.Location = new System.Drawing.Point(160, 56); this.labelComputer.Name = "labelComputer"; - this.labelComputer.Size = new System.Drawing.Size(248, 64); + this.labelComputer.Size = new System.Drawing.Size(248, 32); this.labelComputer.TabIndex = 3; this.labelComputer.Text = "Button Relay / IR Repeater mode host computer:"; this.labelComputer.TextAlign = System.Drawing.ContentAlignment.BottomLeft; Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -540,7 +540,7 @@ } else { - Thread.SpinWait(1000); + Thread.Sleep(1000); } } Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -379,7 +379,7 @@ } else { - Thread.SpinWait(1000); + Thread.Sleep(1000); } } Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -501,7 +501,7 @@ } else { - Thread.SpinWait(1000); + Thread.Sleep(1000); } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -357,7 +357,7 @@ // Wait for the learning to finish ... while (_learning && Environment.TickCount < _learnStartTick + timeout) - Thread.SpinWait(100); + Thread.Sleep(100); if (Environment.TickCount >= _learnStartTick + timeout) return LearnStatus.Timeout; Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -461,7 +461,7 @@ // Wait for the learning to finish ... while (_learning && Environment.TickCount < _learnStartTick + timeout) - Thread.SpinWait(1000); + Thread.Sleep(1000); if (_learning) { Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -334,7 +334,7 @@ } catch (Exception ex) { - Log.Error(ex.ToString()); + Log.Error(ex); } return false; @@ -403,7 +403,7 @@ } catch (Exception ex) { - Log.Error(ex.ToString()); + Log.Error(ex); return false; } } @@ -422,7 +422,7 @@ } catch (Exception ex) { - Log.Error(ex.ToString()); + Log.Error(ex); return false; } } @@ -524,7 +524,7 @@ } else { - Thread.SpinWait(1000); + Thread.Sleep(1000); } } Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -236,11 +236,10 @@ LoadEventMappings(); MapEvent(MappedEvent.MappingEvent.MediaPortal_Start); - } - // Register with MediaPortal to receive GUI Messages ... - if (EventMapperEnabled) + // Register with MediaPortal to receive GUI Messages ... GUIWindowManager.Receivers += new SendMessageHandler(OnMessage); + } // Register for Power State message ... //SystemEvents.SessionEnding += new SessionEndingEventHandler(SystemEvents_SessionEnding); @@ -260,11 +259,12 @@ RemoteButtonListener -= new RemoteButtonHandler(RemoteButtonPressed); if (EventMapperEnabled) + { + GUIWindowManager.Receivers -= new SendMessageHandler(OnMessage); + MapEvent(MappedEvent.MappingEvent.MediaPortal_Stop); + } - if (EventMapperEnabled) - GUIWindowManager.Receivers -= new SendMessageHandler(OnMessage); - StopComms(); _defaultInputHandler = null; @@ -594,7 +594,7 @@ } catch (Exception ex) { - Log.Error(ex.ToString()); + Log.Error(ex); } return false; @@ -663,7 +663,7 @@ } catch (Exception ex) { - Log.Error(ex.ToString()); + Log.Error(ex); return false; } } @@ -682,7 +682,7 @@ } catch (Exception ex) { - Log.Error(ex.ToString()); + Log.Error(ex); return false; } } @@ -784,7 +784,7 @@ } else { - Thread.SpinWait(1000); + Thread.Sleep(1000); } } @@ -1129,7 +1129,14 @@ if (LogVerbose) Log.Info("MPControlPlugin: Event Mapper - Event \"{0}\"", Enum.GetName(typeof(MappedEvent.MappingEvent), eventType)); - ProcessCommand(mappedEvent.Command); + try + { + ProcessCommand(mappedEvent.Command); + } + catch (Exception ex) + { + Log.Error(ex); + } } } } @@ -1150,7 +1157,14 @@ if (LogVerbose) Log.Info("MPControlPlugin: Event Mapper - Event \"{0}\"", Enum.GetName(typeof(MappedEvent.MappingEvent), eventType)); - ProcessCommand(mappedEvent.Command); + try + { + ProcessCommand(mappedEvent.Command); + } + catch (Exception ex) + { + Log.Error(ex); + } } } } Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -206,7 +206,7 @@ } catch (Exception ex) { - Log.Error(ex.ToString()); + Log.Error(ex); } return false; @@ -275,7 +275,7 @@ } catch (Exception ex) { - Log.Error(ex.ToString()); + Log.Error(ex); return false; } } @@ -294,7 +294,7 @@ } catch (Exception ex) { - Log.Error(ex.ToString()); + Log.Error(ex); return false; } } @@ -396,7 +396,7 @@ } else { - Thread.SpinWait(1000); + Thread.Sleep(1000); } } Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-06-12 12:35:18 UTC (rev 516) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-06-12 13:45:04 UTC (rev 517) @@ -373,7 +373,7 @@ } else { - Thread.SpinWait(1000); + Thread.Sleep(1000); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-12 12:35:25
|
Revision: 516 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=516&view=rev Author: chef_koch Date: 2007-06-12 05:35:18 -0700 (Tue, 12 Jun 2007) Log Message: ----------- reverted changes, sorry for the problems :( Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.resx Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-11 19:57:40 UTC (rev 515) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-12 12:35:18 UTC (rev 516) @@ -28,14 +28,13 @@ using System.Diagnostics; using System.Drawing; using System.Windows.Forms; -using System.Threading; -using MediaPortal.GUI.Library; - +using GUIPrograms; +using GUIPrograms.Database; using GUIPrograms.ApplicationItems; using GUIPrograms.FileItems; -using GUIPrograms.Imports; + namespace GUIPrograms.Design { /// <summary> @@ -43,60 +42,52 @@ /// </summary> public class FileInfoScraperForm : Form { - #region InitControls - private ApplicationItem m_CurApp; - private MediaPortal.UserInterface.Controls.MPListView listViewFileList; + private Panel leftPanel; + private Panel rightPanel; + private Splitter splitterVert; + private ListView FileList; private ColumnHeader FileTitle; + private ColumnHeader columnHeader1; private ColumnHeader status; - private MediaPortal.UserInterface.Controls.MPButton buttonStartSearch; - private MediaPortal.UserInterface.Controls.MPButton buttonSaveSearch; - private MediaPortal.UserInterface.Controls.MPButton buttonClose; - private LinkLabel linkLabelAllGame; + 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; private ToolTip toolTip1; - private MediaPortal.UserInterface.Controls.MPComboBox filterComboBox; - private MediaPortal.UserInterface.Controls.MPButton ResetFilterButton; + private Button uncheckAllButton; + private Button buttonSelectBestMatch; + private Label filterLabel; + private ComboBox filterComboBox; + private Button ResetFilterButton; private NumericUpDown MinRelevanceNum; - private MediaPortal.UserInterface.Controls.MPLabel label1; + 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.MPGroupBox groupBoxMatchList; - private MediaPortal.UserInterface.Controls.MPListView listViewMatchList; - private ColumnHeader columnHeader1; - private ColumnHeader columnHeader2; - private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxFileList; - private MediaPortal.UserInterface.Controls.MPCheckBox checkboxFileList; private MediaPortal.UserInterface.Controls.MPLabel label2; - private MediaPortal.UserInterface.Controls.MPLabel labelLaunchUrlInfo; - - #endregion - - #region Variables / Init - - int mStartTime = 0; - private SplitContainer splitContainer1; - private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxFilter; - private StatusStrip statusStrip; - private ToolStripStatusLabel toolStripStatusLabel; - private ToolStripProgressBar toolStripProgressBar; - private MediaPortal.UserInterface.Controls.MPLabel labelPlatform; - private ToolStripDropDownButton toolStripDropDownButton1; - private ToolStripMenuItem cancelSearchToolStripMenuItem; // timer stuff - - bool isSearching = false; bool stopSearching = false; - ScraperSaveType saveType = ScraperSaveType.DataAndImages; - public ApplicationItem CurApp { get @@ -145,207 +136,549 @@ base.Dispose(disposing); } - public void Setup() + #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() { - SyncFileList(); - UpdateButtonStates(); - } + 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); - #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; } - - private FileItemInfo GetSelectedMatchItem() - { - 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) - { - result = (info.RelevanceNorm >= MinRelevanceNum.Value); - } - return result; - } - - private void SelectBestMatch(ListViewItem curItem) - { - 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; - } - - /* this needs adding the gameurl to database - // 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 - private void UpdateButtonStates() + public void Setup() { - // 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); - buttonStartSearch.Enabled = (!isSearching); - buttonSaveSearch.Enabled = (!isSearching); - buttonClose.Enabled = (!isSearching); - toolStripDropDownButton1.Enabled = isSearching; + SyncListView(); + SyncFileLabel(); } - private void ChangeFileSelection() + private void SyncListView() { - SyncMatchList(GetSelectedFileItem()); - } + if (m_CurApp == null) + return; - private void SyncFileList() - { - if (m_CurApp == null) return; - - listViewFileList.BeginUpdate(); + FileList.BeginUpdate(); try { - listViewFileList.Items.Clear(); + FileList.Items.Clear(); // add all files foreach (FileItem file in m_CurApp.Files) { ListViewItem curItem = new ListViewItem(file.Title); - file.ToFileInfoFavourite(); curItem.Tag = file; if (!file.IsFolder) { - ListViewItem newItem = listViewFileList.Items.Add(curItem); + ListViewItem newItem = FileList.Items.Add(curItem); newItem.SubItems.Add("<unknown>"); } } } finally { - listViewFileList.EndUpdate(); + FileList.EndUpdate(); } } - private void SyncMatchList(FileItem file) + private void button3_Click(object sender, EventArgs e) { - listViewMatchList.BeginUpdate(); - try + if ((m_CurApp != null) && (filterComboBox.Text != "")) { - listViewMatchList.Items.Clear(); - - if (file == null) return; - if (file.FileInfoList == null) return; - - foreach (FileItemInfo item in file.FileInfoList) - { - if (!IsGoodMatch(item)) continue; - - ListViewItem curItem = new ListViewItem(String.Format("{0} ({1})", item.Title, item.Platform)); - curItem.SubItems.Add(String.Format("{0}%", item.RelevanceNorm)); - curItem.Tag = item; - - // selected item? - if (file.FileInfoFavourite != null) - if (file.FileInfoFavourite == item) - { - curItem.Checked = true; - } - - listViewMatchList.Items.Add(curItem); - } + m_CurApp.SystemDefault = filterComboBox.Text; + m_CurApp.InsertOrUpdateSettings(); } - finally - { - listViewMatchList.EndUpdate(); - } + this.Close(); } - private void InitProgressBar(string msg) + void InitProgressBar(string msg) { - toolStripProgressBar.Value = 0; - if (listViewFileList.CheckedItems.Count - 1 > 0) + progressPanel.Enabled = true; + progressBar.Value = 0; + if (FileList.CheckedItems.Count - 1 > 0) { - toolStripProgressBar.Maximum = listViewFileList.CheckedItems.Count - 1; + progressBar.Maximum = FileList.CheckedItems.Count - 1; } else { - toolStripProgressBar.Maximum = 1; + progressBar.Maximum = 1; } - toolStripProgressBar.Step = 1; - toolStripStatusLabel.Text = msg; + progressBar.Step = 1; + progressStatusLabel.Text = msg; mStartTime = (int)(DateTime.Now.Ticks / 10000); // reset timer! } - private void StepProgressBar() + void StepProgressBar() { string strTimeRemaining = ""; - toolStripProgressBar.PerformStep(); - if (toolStripProgressBar.Value > 1) + progressBar.PerformStep(); + if (progressBar.Value > 1) { int nTimeElapsed = ((int)(DateTime.Now.Ticks / 10000)) - mStartTime; - double TimePerItem = nTimeElapsed / toolStripProgressBar.Value - 1; - int nTotalTime = (int)(toolStripProgressBar.Maximum * TimePerItem); + double TimePerItem = nTimeElapsed / progressBar.Value - 1; + int nTotalTime = (int)(progressBar.Maximum * TimePerItem); int nTimeRemaining = nTotalTime - nTimeElapsed; int nSecondsRemaining = nTimeRemaining / 1000; int nMinutesRemaining = nSecondsRemaining / 60; @@ -353,124 +686,292 @@ strTimeRemaining = String.Format(" ({0}m {1}s remaining)", nMinutesRemaining, nSecondsRemaining); } - toolStripStatusLabel.Text = String.Format("Searching file {0} of {1} ", toolStripProgressBar.Value, toolStripProgressBar.Maximum + 1) + strTimeRemaining; + progressStatusLabel.Text = String.Format("Searching file {0} of {1} ", progressBar.Value, progressBar.Maximum + 1) + strTimeRemaining; } - private void DeInitProgressBar(string msg) + void DeInitProgressBar(string msg) { - toolStripStatusLabel.Text = msg; + progressPanel.Enabled = false; + progressStatusLabel.Text = msg; } - #endregion + private void btnStartSearch_Click(object sender, EventArgs e) + { + int numberOfSearches = 0; + bool bSuccess = true; + InitProgressBar("Starting search"); + foreach (ListViewItem curItem in FileList.CheckedItems) + { + if (stopSearching) + break; + ListViewItem nextItem = null; + FileItem file = (FileItem)curItem.Tag; + if (file != null) + { + if (curItem.Index < FileList.Items.Count - 1) + { + nextItem = FileList.Items[curItem.Index + 1]; + } + else + { + nextItem = curItem; + } + nextItem.EnsureVisible(); + // if (!bSuccess) + // { + // curItem.SubItems[1].Text = String.Format("waiting for reconnection..."); + // System.Threading.Thread.Sleep(5126); + // } + numberOfSearches = numberOfSearches + 1; + if (numberOfSearches > 20) + { + curItem.SubItems[1].Text = String.Format("waiting..."); + System.Threading.Thread.Sleep(20000); + System.Windows.Forms.Application.DoEvents(); + numberOfSearches = 0; + } + 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); + curItem.SubItems[1].Text = String.Format("{0} matches", file.FileInfoList.Count); + StepProgressBar(); + buttonSelectBestMatch.Enabled = true; + System.Windows.Forms.Application.DoEvents(); + } + } + ChangeFileSelection(); + if (stopSearching) + { + DeInitProgressBar("Search aborted"); + } + else + { + DeInitProgressBar("Search finished"); + } + stopSearching = false; + } - #region ControlEvents - #region Lists - - private void listViewFileList_SelectedIndexChanged(object sender, EventArgs e) + private FileItem GetSelectedFileItem() { - ChangeFileSelection(); + FileItem res = null; + if (FileList.FocusedItem != null) + { + if (FileList.FocusedItem.Tag != null) + { + res = (FileItem)FileList.FocusedItem.Tag; + } + } + return res; } - private void listViewFileList_ItemChecked(object sender, ItemCheckedEventArgs e) + private FileItemInfo GetSelectedMatchItem() { - UpdateButtonStates(); + FileItemInfo res = null; + if (MatchList.SelectedItems != null) + { + if (MatchList.SelectedItems[0] != null) + { + if (MatchList.SelectedItems[0].Tag != null) + { + res = (FileItemInfo)MatchList.SelectedItems[0].Tag; + } + } + } + return res; } - private void listViewMatchList_ItemCheck(object sender, ItemCheckEventArgs e) + + private bool IsGoodMatch(FileItemInfo info) { - if (e.NewValue == CheckState.Checked) + bool result = (filterComboBox.Text == "") || (info.Platform.ToLower().IndexOf(filterComboBox.Text.ToLower()) == 0); + if (result) { - if (listViewMatchList.CheckedItems == null) return; - foreach (ListViewItem item in listViewMatchList.CheckedItems) - if (item.Index != e.Index) - item.Checked = false; + result = (info.RelevanceNorm >= MinRelevanceNum.Value); } + return result; } - private void listViewMatchList_ItemChecked(object sender, ItemCheckedEventArgs e) + private void SyncMatchesList(FileItem file) { - if (e.Item.Checked == false) return; + LaunchURLButton.Enabled = false; + MatchList.BeginUpdate(); + try + { + MatchList.Items.Clear(); + if (file != null) + { + if (file.FileInfoList != null) + { + foreach (FileItemInfo item in file.FileInfoList) + { + if (IsGoodMatch(item)) + { + ListViewItem curItem = new ListViewItem(String.Format("{0} ({1})", item.Title, item.Platform)); + curItem.SubItems.Add(String.Format("{0}%", item.RelevanceNorm)); + // curItem.SubItems[1].Text = String.Format("{0}%", item.Relevance); + curItem.Tag = item; + curItem = MatchList.Items.Add(curItem); + // selected item? + if ((file.FileInfoFavourite != null) && (file.FileInfoFavourite == item)) + { + curItem.Selected = true; + LaunchURLButton.Enabled = true; + } + } + } + } + } + } + finally + { + MatchList.EndUpdate(); + } - FileItem file = GetSelectedFileItem(); - if (file == null) return; + } - if (e.Item.Tag == null) return; - FileItemInfo info = e.Item.Tag as FileItemInfo; - if (info == null) return; - file.FileInfoFavourite = info; - buttonSaveSearch.Enabled = true; - listViewFileList.FocusedItem.SubItems[1].Text = String.Format("best: {0}%", file.FileInfoFavourite.RelevanceNorm); + private void ChangeFileSelection() + { + FileItem file = GetSelectedFileItem(); + SyncMatchesList(file); } - private void listViewMatchList_SelectedIndexChanged(object sender, EventArgs e) + private void FileList_SelectedIndexChanged(object sender, EventArgs e) { - if (listViewMatchList.SelectedItems.Count == 0) return; - if (listViewMatchList.SelectedItems[0].Tag == null) return; - FileItemInfo info = listViewMatchList.SelectedItems[0].Tag as FileItemInfo; - if (info == null) return; - - info.LaunchURL(); + ChangeFileSelection(); } - private void checkboxFileList_CheckedChanged(object sender, EventArgs e) + private void allGameLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - if (checkboxFileList.Checked) + if (allGameLink.Text == null) + return; + if (allGameLink.Text.Length > 0) { - foreach (ListViewItem curItem in listViewFileList.Items) - curItem.Checked = true; + ProcessStartInfo sInfo = new ProcessStartInfo(allGameLink.Text); + Process.Start(sInfo); } - else - { - foreach (ListViewItem curItem in listViewFileList.Items) - curItem.Checked = false; - } - UpdateButtonStates(); } - #endregion + private void LaunchSelectedMatchURL() + { + FileItemInfo info = GetSelectedMatchItem(); + if (info == null) + return; + info.LaunchURL(); + } - #region Buttons - private void btnStartSearch_Click(object sender, EventArgs e) + private void MatchList_DoubleClick(object sender, EventArgs e) { - SearchStart(); + LaunchSelectedMatchURL(); } - private void btnSaveSearch_Click(object sender, EventArgs e) + private void checkAllButton_Click(object sender, EventArgs e) { - menuSaveDetails.Show(buttonSaveSearch, new Point(0, buttonSaveSearch.Height)); + foreach (ListViewItem curItem in FileList.Items) + { + curItem.Checked = true; + } + btnStartSearch.Enabled = (FileList.CheckedItems.Count > 0); + SyncFileLabel(); } - private void cancelSearchToolStripMenuItem_Click(object sender, EventArgs e) + private void uncheckAllButton_Click(object sender, EventArgs e) { - stopSearching = true; + foreach (ListViewItem curItem in FileList.Items) + { + curItem.Checked = false; + } + btnStartSearch.Enabled = false; + buttonSelectBestMatch.Enabled = false; + btnSaveSearch.Enabled = false; + SyncFileLabel(); } - private void buttonClose_Click(object sender, EventArgs e) + private void MatchList_SelectedIndexChanged(object sender, EventArgs e) { - if ((m_CurApp != null) && (filterComboBox.Text != "")) + FileItem file = GetSelectedFileItem(); + if (file == null) + return; + + if (MatchList.SelectedIndices.Count > 0) { - m_CurApp.SystemDefault = filterComboBox.Text; - //m_CurApp.Write(); + FileItemInfo info = GetSelectedMatchItem(); + file.FileInfoFavourite = info; + LaunchURLButton.Enabled = true; + btnSaveSearch.Enabled = true; + FileList.FocusedItem.SubItems[1].Text = String.Format("best: {0}%", file.FileInfoFavourite.RelevanceNorm); } - this.Close(); + else + { + file.FileInfoFavourite = null; + LaunchURLButton.Enabled = false; + } } - private void allGameLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + private void btnSaveSearch_Click(object sender, EventArgs e) { - if (linkLabelAllGame.Text == null) return; + menuSaveDetails.Show(btnSaveSearch, new Point(0, btnSaveSearch.Height)); + } - if (linkLabelAllGame.Text.Length > 0) + void SaveSearch(ScraperSaveType saveType) + { + int numberOfSearches = 0; + InitProgressBar("Starting search"); + ListViewItem nextItem = null; + foreach (ListViewItem curItem in FileList.CheckedItems) { - ProcessStartInfo sInfo = new ProcessStartInfo(linkLabelAllGame.Text); - Process.Start(sInfo); + if (stopSearching) + break; + FileItem file = (FileItem)curItem.Tag; + if (file != null) + { + if (curItem.Index < FileList.Items.Count - 1) + { + nextItem = FileList.Items[curItem.Index + 1]; + } + else + { + nextItem = curItem; + } + nextItem.EnsureVisible(); + StepProgressBar(); + if (file.FileInfoFavourite != null) + { + numberOfSearches++; + numberOfSearches = numberOfSearches + 1; + if (numberOfSearches > 20) + { + curItem.SubItems[1].Text = String.Format("waiting..."); + System.Windows.Forms.Application.DoEvents(); + System.Threading.Thread.Sleep(20000); + numberOfSearches = 0; + } + curItem.SubItems[1].Text = String.Format("<searching...>"); + System.Windows.Forms.Application.DoEvents(); + file.FindFileInfoDetail(m_CurApp, file.FileInfoFavourite, ScraperType.ALLGAME, saveType); + if ((saveType == ScraperSaveType.DataAndImages) || (saveType == ScraperSaveType.Data)) + { + file.SaveFromFileInfoFavourite(); + } + curItem.SubItems[1].Text = String.Format("<saved>"); + System.Windows.Forms.Application.DoEvents(); + } + } } + if (stopSearching) + { + DeInitProgressBar("Search aborted"); + } + else + { + DeInitProgressBar("Search finished"); + } + stopSearching = false; } - #endregion - private void filterComboBox_SelectedIndexChanged(object sender, EventArgs e) { ChangeFileSelection(); @@ -490,17 +991,69 @@ ChangeFileSelection(); } + private void buttonSelectBestMatch_Click(object sender, EventArgs e) + { + foreach (ListViewItem curItem in FileList.CheckedItems) + { + FileItem file = (FileItem)curItem.Tag; + if (file != null) + { + if (file.FileInfoList != null) + { + file.FileInfoFavourite = null; + foreach (FileItemInfo item in file.FileInfoList) + { + if (IsGoodMatch(item)) + { + btnSaveSearch.Enabled = true; + file.FileInfoFavourite = item; + break; + } + } + if (file.FileInfoFavourite != null) + { + curItem.SubItems[1].Text = String.Format("best: {0}%", file.FileInfoFavourite.RelevanceNorm); + } + else + { + curItem.SubItems[1].Text = "no match"; + } + } + } + } + ChangeFileSelection(); + } + private void MinRelevanceNum_ValueChanged(object sender, EventArgs e) { ChangeFileSelection(); } - #region Menus + private void LaunchURLButton_Click(object sender, EventArgs e) + { + LaunchSelectedMatchURL(); + } + private void FileList_MouseUp(object sender, MouseEventArgs e) + { + SyncButtons(); + } + + void SyncButtons() + { + btnStartSearch.Enabled = (FileList.CheckedItems.Count > 0); + if (!btnStartSearch.Enabled) + { + buttonSelectBestMatch.Enabled = false; + btnSaveSearch.Enabled = false; + } + SyncFileLabel(); + } + private void mnuCheckWithoutImages_Click(object sender, EventArgs e) { FileItem curFile; - foreach (ListViewItem curItem in listViewFileList.Items) + foreach (ListViewItem curItem in FileList.Items) { curFile = (FileItem)curItem.Tag; if (curFile != null) @@ -512,13 +1065,14 @@ curItem.Checked = false; } } - buttonStartSearch.Enabled = (listViewFileList.CheckedItems.Count > 0); - UpdateButtonStates(); + btnStartSearch.Enabled = (FileList.CheckedItems.Count > 0); + SyncFileLabel(); } + private void mnuCheckWithoutOverview_Click(object sender, EventArgs e) { FileItem curFile; - foreach (ListViewItem curItem in listViewFileList.Items) + foreach (ListViewItem curItem in FileList.Items) { curFile = (FileItem)curItem.Tag; if (curFile != null) @@ -530,672 +1084,42 @@ curItem.Checked = false; } } - buttonStartSearch.Enabled = (listViewFileList.CheckedItems.Count > 0); - UpdateButtonStates(); + btnStartSearch.Enabled = (FileList.CheckedItems.Count > 0); + SyncFileLabel(); } - - private void menuDataAndImages_Click(object sender, EventArgs e) + + private void SyncFileLabel() { - saveType = ScraperSaveType.DataAndImages; - SearchSave(); + lblFiles.Text = String.Format("Files: ({0} of {1} selected)", FileList.CheckedItems.Count, FileList.Items.Count); } - private void menuData_Click(object sender, EventArgs e) - { - saveType = ScraperSaveType.Data; - SearchSave(); - } - private void menuImages_Click(object sender, EventArgs e) - { - saveType = ScraperSaveType.Images; - SearchSave(); - } - #endregion - - #endregion - - #region Threads - - private void SearchStart() + private void FileList_AfterLabelEdit(object sender, LabelEditEventArgs e) { - Thread thread = new Thread(new ThreadStart(SearchStartThread)); - thread.Priority = ThreadPriority.BelowNormal; - thread.Name = "MyPrograms SearchStart"; - thread.Start(); + FileItem curItem = GetSelectedFileItem(); + if (curItem == null) + return; + curItem.TitleOptimized = e.Label; } - private void SearchStartThread() + private void cancelButton_Click(object sender, EventArgs e) { - isSearching = true; - UpdateButtonStates(); - - int numberOfSearches = 0; - bool bSuccess = true; - InitProgressBar("Starting search"); - foreach (ListViewItem curItem in listViewFileList.CheckedItems) - { - if (stopSearching) break; - if (curItem.Tag == null) continue; - - FileItem file = curItem.Tag as FileItem; - if (file == null) continue; - - ListViewItem nextItem = null; - - if (curItem.Index < listViewFileList.Items.Count - 1) - { - nextItem = listViewFileList.Items[curItem.Index + 1]; - } - else - { - nextItem = curItem; - } - nextItem.EnsureVisible(); - // if (!bSuccess) - // { - // curItem.SubItems[1].Text = String.Format("waiting for reconnection..."); - // System.Threading.Thread.Sleep(5126); - // } - numberOfSearches = numberOfSearches + 1; - if (numberOfSearches > 20) - { - curItem.SubItems[1].Text = String.Format("waiting..."); - System.Threading.Thread.Sleep(20000); - System.Windows.Forms.Application.DoEvents(); - numberOfSearches = 0; - } - 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(file.Title, ScraperType.ALLGAME); - - SelectBestMatch(curItem); - - StepProgressBar(); - System.Windows.Forms.Application.DoEvents(); - } - ChangeFileSelection(); - if (stopSearching) - { - DeInitProgressBar("Search aborted"); - } - else - { - DeInitProgressBar("Search finished"); - } - - stopSearching = false; - isSearching = false; - UpdateButtonStates(); + stopSearching = true; } - private void SearchSave() + private void menuDataAndImages_Click(object sender, EventArgs e) { - Thread thread = new Thread(new ThreadStart(SearchSaveThread)); - thread.Priority = ThreadPriority.BelowNormal; - thread.Name = "MyPrograms SearchSave"; - thread.Start(); + SaveSearch(ScraperSaveType.DataAndImages); } - private void SearchSaveThread() + private void menuData_Click(object sender, EventArgs e) { - isSearching = true; - UpdateButtonStates(); - - int numberOfSearches = 0; - InitProgressBar("Starting search"); - ListViewItem nextItem = null; - - foreach (ListViewItem curItem in listViewFileList.CheckedItems) - { - if (stopSearching) - break; - FileItem file = (FileItem)curItem.Tag; - - if (file == null) - continue; - - if (curItem.Index < listViewFileList.Items.Count - 1) - { - nextItem = listViewFileList.Items[curItem.Index + 1]; - } - else - { - nextItem = curItem; - } - nextItem.EnsureVisible(); - StepProgressBar(); - if (file.FileInfoFavourite != null) - { - numberOfSearches++; - numberOfSearches = numberOfSearches + 1; - if (numberOfSearches > 20) - { - curItem.SubItems[1].Text = String.Format("waiting..."); - System.Windows.Forms.Application.DoEvents(); - System.Threading.Thread.Sleep(20000); - numberOfSearches = 0; - } - curItem.SubItems[1].Text = String.Format("<searching...>"); - System.Windows.Forms.Application.DoEvents(); - file.FindFileInfoDetail(m_CurApp, file.FileInfoFavourite, ScraperType.ALLGAME, saveType); - if ((saveType == ScraperSaveType.DataAndImages) || (saveType == ScraperSaveType.Data)) - { - file.SaveFromFileInfoFavourite(); - } - curItem.SubItems[1].Text = String.Format("<saved>"); - System.Windows.Forms.Application.DoEvents(); - } - } - if (stopSearching) - { - DeInitProgressBar("Search aborted"); - } - else - { - DeInitProgressBar("Search finished"); - } - - stopSearching = false; - isSearching = false; - UpdateButtonStates(); + SaveSearch(ScraperSaveType.Data); } - #endregion - - #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 menuImages_Click(object sender, EventArgs e) { - this.components = new System.ComponentModel.Container(); - 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.listViewFileList = new MediaPortal.UserInterface.Controls.MPListView(); - 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.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.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.groupBoxFileList = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.checkboxFileList = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.statusStrip = new System.Windows.Forms.StatusStrip(); - this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.toolStripPro... [truncated message content] |
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: <nor...@us...> - 2007-06-11 19:36:54
|
Revision: 514 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=514&view=rev Author: northern_sky Date: 2007-06-11 12:36:49 -0700 (Mon, 11 Jun 2007) Log Message: ----------- removed unneccesary item, will be created if not exist Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/defaultMyProgramsAltViews.xml Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/defaultMyProgramsAltViews.xml =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/defaultMyProgramsAltViews.xml 2007-06-11 19:35:49 UTC (rev 513) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/defaultMyProgramsAltViews.xml 2007-06-11 19:36:49 UTC (rev 514) @@ -1,263 +0,0 @@ -<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> -<SOAP-ENV:Body> -<a1:ArrayList id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-2"/> -<_size>7</_size> -<_version>7</_version> -</a1:ArrayList> -<SOAP-ENC:Array id="ref-2" SOAP-ENC:arrayType="xsd:anyType[8]"> -<item href="#ref-3"/> -<item href="#ref-4"/> -<item href="#ref-5"/> -<item href="#ref-6"/> -<item href="#ref-7"/> -<item href="#ref-8"/> -<item href="#ref-9"/> -</SOAP-ENC:Array> -<a3:ViewDefinition id="ref-3" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-11"/> -<name id="ref-12">13031</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-4" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-13"/> -<name id="ref-14">135</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-5" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-15"/> -<name id="ref-16">931</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-6" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-17"/> -<name id="ref-18">987</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-7" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-19"/> -<name id="ref-20">13032</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-8" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-21"/> -<name id="ref-22">13033</name> -</a3:ViewDefinition> -<a3:ViewDefinition id="ref-9" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<listFilters href="#ref-23"/> -<name id="ref-24">13034</name> -</a3:ViewDefinition> -<a1:ArrayList id="ref-11" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-25"/> -<_size>2</_size> -<_version>137</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-13" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-26"/> -<_size>2</_size> -<_version>164</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-15" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-27"/> -<_size>2</_size> -<_version>173</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-17" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-28"/> -<_size>2</_size> -<_version>146</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-19" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-29"/> -<_size>1</_size> -<_version>179</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-21" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-30"/> -<_size>1</_size> -<_version>129</_version> -</a1:ArrayList> -<a1:ArrayList id="ref-23" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> -<_items href="#ref-31"/> -<_size>2</_size> -<_version>105</_version> -</a1:ArrayList> -<SOAP-ENC:Array id="ref-25" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-32"/> -<item href="#ref-33"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-26" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-34"/> -<item href="#ref-35"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-27" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-36"/> -<item href="#ref-37"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-28" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-38"/> -<item href="#ref-39"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-29" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-40"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-30" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-41"/> -</SOAP-ENC:Array> -<SOAP-ENC:Array id="ref-31" SOAP-ENC:arrayType="xsd:anyType[4]"> -<item href="#ref-42"/> -<item href="#ref-43"/> -</SOAP-ENC:Array> -<a3:FilterDefinition id="ref-32" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction id="ref-44"></restriction> -<whereClause id="ref-45">manufacturer</whereClause> -<fromStatement id="ref-46"></fromStatement> -<sqloperator href="#ref-44"/> -<whereValue id="ref-47">*</whereValue> -<selectedValue href="#ref-46"/> -<defaultView id="ref-48">List</defaultView> -<defaultSort id="ref-49">Name</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-33" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-44"/> -<whereClause id="ref-50">title</whereClause> -<fromStatement href="#ref-46"/> -<sqloperator href="#ref-44"/> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView href="#ref-48"/> -<defaultSort id="ref-51">Title</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-34" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-44"/> -<whereClause id="ref-52">genre</whereClause> -<fromStatement href="#ref-46"/> -<sqloperator href="#ref-44"/> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView id="ref-53">List</defaultView> -<defaultSort href="#ref-49"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-35" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-44"/> -<whereClause id="ref-54">title</whereClause> -<fromStatement href="#ref-46"/> -<sqloperator href="#ref-44"/> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView href="#ref-53"/> -<defaultSort href="#ref-51"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-36" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>false</sortAscending> -<restriction href="#ref-44"/> -<whereClause id="ref-55">rating</whereClause> -<fromStatement href="#ref-46"/> -<sqloperator href="#ref-44"/> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView href="#ref-53"/> -<defaultSort id="ref-56">Rating</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-37" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-44"/> -<whereClause href="#ref-54"/> -<fromStatement href="#ref-46"/> -<sqloperator href="#ref-44"/> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView href="#ref-53"/> -<defaultSort href="#ref-51"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-38" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-44"/> -<whereClause id="ref-57">year</whereClause> -<fromStatement href="#ref-46"/> -<sqloperator href="#ref-44"/> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView href="#ref-53"/> -<defaultSort href="#ref-49"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-39" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-44"/> -<whereClause href="#ref-54"/> -<fromStatement href="#ref-46"/> -<sqloperator href="#ref-44"/> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView href="#ref-53"/> -<defaultSort href="#ref-51"/> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-40" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>false</sortAscending> -<restriction id="ref-58">0</restriction> -<whereClause id="ref-59">launchcount</whereClause> -<fromStatement href="#ref-46"/> -<sqloperator id="ref-60">></sqloperator> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView id="ref-61">List</defaultView> -<defaultSort id="ref-62">LaunchCount</defaultSort> -<limit>100</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-41" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>false</sortAscending> -<restriction id="ref-63">01.01.0001 00:00:00</restriction> -<whereClause id="ref-64">lastTimeLaunched</whereClause> -<fromStatement href="#ref-46"/> -<sqloperator id="ref-65">></sqloperator> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView id="ref-66">List</defaultView> -<defaultSort id="ref-67">LastTimeLaunched</defaultSort> -<limit>100</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-42" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction id="ref-68">1</restriction> -<whereClause id="ref-69">title</whereClause> -<fromStatement href="#ref-46"/> -<sqloperator id="ref-70">group</sqloperator> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView id="ref-71">List</defaultView> -<defaultSort id="ref-72">Name</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -<a3:FilterDefinition id="ref-43" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> -<distinct>false</distinct> -<sortAscending>true</sortAscending> -<restriction href="#ref-44"/> -<whereClause href="#ref-69"/> -<fromStatement href="#ref-46"/> -<sqloperator href="#ref-44"/> -<whereValue href="#ref-47"/> -<selectedValue href="#ref-46"/> -<defaultView href="#ref-71"/> -<defaultSort id="ref-73">Name</defaultSort> -<limit>-1</limit> -</a3:FilterDefinition> -</SOAP-ENV:Body> -</SOAP-ENV:Envelope> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-06-11 19:35:51
|
Revision: 513 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=513&view=rev Author: northern_sky Date: 2007-06-11 12:35:49 -0700 (Mon, 11 Jun 2007) Log Message: ----------- restored changed dbquerys,views,fileload working again Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-10 21:40:37 UTC (rev 512) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs 2007-06-11 19:35:49 UTC (rev 513) @@ -95,8 +95,8 @@ //genre ViewDefinition viewGenre = new ViewDefinition(); viewGenre.Name = "Genre"; - filter1 = new FilterDefinition(); filter1.Where = "genre"; ; filter1.SortAscending = true; - filter2 = new FilterDefinition(); filter2.Where = "genre2"; ; filter2.SortAscending = true; + filter1 = new FilterDefinition(); filter1.Where = "mainGenre"; ; filter1.SortAscending = true; + filter2 = new FilterDefinition(); filter2.Where = "subGenre"; ; filter2.SortAscending = true; filter3 = new FilterDefinition(); filter3.Where = "filename"; ; filter3.SortAscending = true; viewGenre.Filters.Add(filter1); viewGenre.Filters.Add(filter2); @@ -307,7 +307,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) { @@ -316,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("tblfile.*"); + sqlSelect.AddField("tblFileItem.*"); sqlSelect.AddField("'' as title2"); sqlSelect.AddField("'' as fieldtype2"); if (pathSubfolders != "") @@ -364,7 +364,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 + @")) @@ -395,7 +395,7 @@ UPPER(SUBSTR(" + currentViewFilterFieldVariable + ",1," + currentViewFilterFieldRestriction + @")) AS title, Count(*) - FROM tblfile + FROM tblFileItem WHERE appid = " + appID + @" @@ -406,7 +406,7 @@ UPPER(SUBSTR(" + prevViewFilterFieldVariable + ",1," + prevViewFilterRestriciton + @")) AS title FROM - tblfile + tblFileItem WHERE appid = " + appID + @" @@ -427,11 +427,11 @@ else { return @"SELECT - tblfile.*, + tblFileItem.*, 'STR' AS fieldtype FROM - tblfile + tblFileItem WHERE UPPER(SUBSTR(" + prevViewFilterFieldVariable + ",1," + prevViewFilterRestriciton + @")) LIKE '" + prevViewFilterFieldSelectedValue + @"%' @@ -541,11 +541,8 @@ string GetField(string where) { if (where == "title") return "title"; - if (where == "genre") return "genre"; - if (where == "genre2") return "genre2"; - if (where == "genre3") return "genre3"; - if (where == "genre4") return "genre4"; - if (where == "genre5") return "genre5"; + if (where == "mainGenre") return "mainGenre"; + if (where == "subGenre") return "subGenre"; if (where == "country") return "country"; if (where == "manufacturer") return "manufacturer"; if (where == "year") return "year"; @@ -558,11 +555,8 @@ string GetFieldId(string where) { if (where == "title") return "title"; - if (where == "genre") return "genre"; - if (where == "genre2") return "genre2"; - if (where == "genre3") return "genre3"; - if (where == "genre4") return "genre4"; - if (where == "genre5") return "genre5"; + if (where == "mainGenre") return "mainGenre"; + if (where == "subGenre") return "subGenre"; if (where == "country") return "country"; if (where == "manufacturer") return "manufacturer"; if (where == "year") return "year"; @@ -578,11 +572,8 @@ // maps WHERE-fieldname to a SQL-fieldname // and the MAY be different in the future..... if (where == "title") return "title"; - else if (where == "genre") return "genre"; - else if (where == "genre2") return "genre2"; - else if (where == "genre3") return "genre3"; - else if (where == "genre4") return "genre4"; - else if (where == "genre5") return "genre5"; + else if (where == "mainGenre") return "mainGenre"; + else if (where == "subGenre") return "subGenre"; else if (where == "manufacturer") return "manufacturer"; else if (where == "country") return "country"; else if (where == "year") return "year"; @@ -597,18 +588,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 { @@ -639,11 +630,8 @@ string GetFieldTypeForSelect(string where) { if (where == "title") return "'STR' as fieldtype"; // watch quotes... these are SQL-strings! - else if (where == "genre") return "'STR' as fieldtype"; - else if (where == "genre2") return "'STR' as fieldtype"; - else if (where == "genre3") return "'STR' as fieldtype"; - else if (where == "genre4") return "'STR' as fieldtype"; - else if (where == "genre5") return "'STR' as fieldtype"; + else if (where == "mainGenre") return "'STR' as fieldtype"; + else if (where == "subGenre") return "'STR' as fieldtype"; else if (where == "manufacturer") return "'STR' as fieldtype"; else if (where == "country") return "'STR' as fieldtype"; else if (where == "year") return "'INT' as fieldtype"; @@ -664,11 +652,8 @@ bool GetDistinct(string where) { if (where == "title") return false; - else if (where == "genre") return true; - else if (where == "genre2") return true; - else if (where == "genre3") return true; - else if (where == "genre4") return true; - else if (where == "genre5") return true; + else if (where == "mainGenre") return true; + else if (where == "subGenre") return true; else if (where == "manufacturer") return true; else if (where == "country") return true; else if (where == "year") return true; @@ -696,7 +681,7 @@ { if (filterItem == null) return; FilterDefinition definition = (FilterDefinition)currentView.Filters[CurrentLevel]; - if ((definition.Where == "genre") || (definition.Where == "genre2") || (definition.Where == "genre3") || (definition.Where == "genre4") || (definition.Where == "genre5")) + if ((definition.Where == "mainGenre") || (definition.Where == "subGenre")) { guiListItem.Label = filterItem.Genre; guiListItem.Label2 = String.Empty; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-10 21:40:42
|
Revision: 512 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=512&view=rev Author: chef_koch Date: 2007-06-10 14:40:37 -0700 (Sun, 10 Jun 2007) Log Message: ----------- added my config file of my views, for example, maybe it's the wrong folder Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/defaultMyProgramsAltViews.xml Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/defaultMyProgramsAltViews.xml =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/defaultMyProgramsAltViews.xml (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/MetaData/defaultMyProgramsAltViews.xml 2007-06-10 21:40:37 UTC (rev 512) @@ -0,0 +1,263 @@ +<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> +<SOAP-ENV:Body> +<a1:ArrayList id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-2"/> +<_size>7</_size> +<_version>7</_version> +</a1:ArrayList> +<SOAP-ENC:Array id="ref-2" SOAP-ENC:arrayType="xsd:anyType[8]"> +<item href="#ref-3"/> +<item href="#ref-4"/> +<item href="#ref-5"/> +<item href="#ref-6"/> +<item href="#ref-7"/> +<item href="#ref-8"/> +<item href="#ref-9"/> +</SOAP-ENC:Array> +<a3:ViewDefinition id="ref-3" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-11"/> +<name id="ref-12">13031</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-4" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-13"/> +<name id="ref-14">135</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-5" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-15"/> +<name id="ref-16">931</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-6" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-17"/> +<name id="ref-18">987</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-7" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-19"/> +<name id="ref-20">13032</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-8" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-21"/> +<name id="ref-22">13033</name> +</a3:ViewDefinition> +<a3:ViewDefinition id="ref-9" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<listFilters href="#ref-23"/> +<name id="ref-24">13034</name> +</a3:ViewDefinition> +<a1:ArrayList id="ref-11" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-25"/> +<_size>2</_size> +<_version>137</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-13" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-26"/> +<_size>2</_size> +<_version>164</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-15" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-27"/> +<_size>2</_size> +<_version>173</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-17" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-28"/> +<_size>2</_size> +<_version>146</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-19" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-29"/> +<_size>1</_size> +<_version>179</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-21" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-30"/> +<_size>1</_size> +<_version>129</_version> +</a1:ArrayList> +<a1:ArrayList id="ref-23" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Collections"> +<_items href="#ref-31"/> +<_size>2</_size> +<_version>105</_version> +</a1:ArrayList> +<SOAP-ENC:Array id="ref-25" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-32"/> +<item href="#ref-33"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-26" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-34"/> +<item href="#ref-35"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-27" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-36"/> +<item href="#ref-37"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-28" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-38"/> +<item href="#ref-39"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-29" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-40"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-30" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-41"/> +</SOAP-ENC:Array> +<SOAP-ENC:Array id="ref-31" SOAP-ENC:arrayType="xsd:anyType[4]"> +<item href="#ref-42"/> +<item href="#ref-43"/> +</SOAP-ENC:Array> +<a3:FilterDefinition id="ref-32" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction id="ref-44"></restriction> +<whereClause id="ref-45">manufacturer</whereClause> +<fromStatement id="ref-46"></fromStatement> +<sqloperator href="#ref-44"/> +<whereValue id="ref-47">*</whereValue> +<selectedValue href="#ref-46"/> +<defaultView id="ref-48">List</defaultView> +<defaultSort id="ref-49">Name</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-33" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-44"/> +<whereClause id="ref-50">title</whereClause> +<fromStatement href="#ref-46"/> +<sqloperator href="#ref-44"/> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView href="#ref-48"/> +<defaultSort id="ref-51">Title</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-34" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-44"/> +<whereClause id="ref-52">genre</whereClause> +<fromStatement href="#ref-46"/> +<sqloperator href="#ref-44"/> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView id="ref-53">List</defaultView> +<defaultSort href="#ref-49"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-35" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-44"/> +<whereClause id="ref-54">title</whereClause> +<fromStatement href="#ref-46"/> +<sqloperator href="#ref-44"/> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView href="#ref-53"/> +<defaultSort href="#ref-51"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-36" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>false</sortAscending> +<restriction href="#ref-44"/> +<whereClause id="ref-55">rating</whereClause> +<fromStatement href="#ref-46"/> +<sqloperator href="#ref-44"/> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView href="#ref-53"/> +<defaultSort id="ref-56">Rating</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-37" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-44"/> +<whereClause href="#ref-54"/> +<fromStatement href="#ref-46"/> +<sqloperator href="#ref-44"/> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView href="#ref-53"/> +<defaultSort href="#ref-51"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-38" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-44"/> +<whereClause id="ref-57">year</whereClause> +<fromStatement href="#ref-46"/> +<sqloperator href="#ref-44"/> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView href="#ref-53"/> +<defaultSort href="#ref-49"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-39" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-44"/> +<whereClause href="#ref-54"/> +<fromStatement href="#ref-46"/> +<sqloperator href="#ref-44"/> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView href="#ref-53"/> +<defaultSort href="#ref-51"/> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-40" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>false</sortAscending> +<restriction id="ref-58">0</restriction> +<whereClause id="ref-59">launchcount</whereClause> +<fromStatement href="#ref-46"/> +<sqloperator id="ref-60">></sqloperator> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView id="ref-61">List</defaultView> +<defaultSort id="ref-62">LaunchCount</defaultSort> +<limit>100</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-41" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>false</sortAscending> +<restriction id="ref-63">01.01.0001 00:00:00</restriction> +<whereClause id="ref-64">lastTimeLaunched</whereClause> +<fromStatement href="#ref-46"/> +<sqloperator id="ref-65">></sqloperator> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView id="ref-66">List</defaultView> +<defaultSort id="ref-67">LastTimeLaunched</defaultSort> +<limit>100</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-42" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction id="ref-68">1</restriction> +<whereClause id="ref-69">title</whereClause> +<fromStatement href="#ref-46"/> +<sqloperator id="ref-70">group</sqloperator> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView id="ref-71">List</defaultView> +<defaultSort id="ref-72">Name</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +<a3:FilterDefinition id="ref-43" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/MediaPortal.GUI.View/Core%2C%20Version%3D0.2.2.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull"> +<distinct>false</distinct> +<sortAscending>true</sortAscending> +<restriction href="#ref-44"/> +<whereClause href="#ref-69"/> +<fromStatement href="#ref-46"/> +<sqloperator href="#ref-44"/> +<whereValue href="#ref-47"/> +<selectedValue href="#ref-46"/> +<defaultView href="#ref-71"/> +<defaultSort id="ref-73">Name</defaultSort> +<limit>-1</limit> +</a3:FilterDefinition> +</SOAP-ENV:Body> +</SOAP-ENV:Envelope> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-10 21:38:43
|
Revision: 511 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=511&view=rev Author: chef_koch Date: 2007-06-10 14:38:41 -0700 (Sun, 10 Jun 2007) Log Message: ----------- added some ideas to README.txt Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-10 20:58:23 UTC (rev 510) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-10 21:38:41 UTC (rev 511) @@ -26,14 +26,58 @@ Mame, Gamebase support partially rewritten.much faster. Some new options: Skip mahjong games,etc -To-do next: -Revise the code, clear out bugs. +---------------- +.: To-do next :. +---------------- +Revise the code, clear out bugs + Add some more specific emulator support.. -Testing!! -Small restructure of db. -.... + - bring/keep the profiles up-to-date -Iso mounting? +ConfigurationTool redesign: + - InfoScraperForm redesign -> first redesign done, still needs some work + +DB redesign/restructure: + - small changes + +AllTime Todo: + --> TESTING ;) + --> BugFixing :P + + +--------------------- +.: things to clear :. +--------------------- +Add some more specific emulator support.. + - using system and emulator ids??? can be used for + - filter in fileinfoscraperForm + - easier application image assigning together with thumbsdir -> we also could provide icons for most common system + +ConfigurationTool redesign: + - saving the path to file for import + - saving the path to image dir, or using thumbsDir of MP, are there any pros? + +DB redesign/restructure: + - saving gameURL from AllGame.com??? or maybe only the AllGame.com-ID? + +Iso mounting -> pro/contra??? + +"Minimize MP before starting a file" as a new option for application items: + - sometimes after starting a file (here with fullscreen DirectX PC games, i.e. NFS Most Wanted) + MP use too much resources, so the started game slows down and is impossible to play properly + - tried it already, but did not get it working properly + i used messaging of mp (Messages: MP_SEND_TO_TRAY, MP_SEND_TO_TRAY_DONE, MP_RESTORE_FROM_TRAY, MP_RESTORE_FROM_TRAY_DONE) + - how it can work: + -> GUIListItem clicked -> WaitForExit-true? -> MinimizeMPonFileLunch-true? + --> Minimize MP by sending MP_SEND_TO_TRAY + --> wait for MP_SEND_TO_TRAY_DONE + -> start file -> wait for fileExit -> IsMPinTray-true? + --> Restore MP by sending MP_RESTORE_FROM_TRAY + --> wait for MP_RESTORE_FROM_TRAY_DONE + -> now it should be able to work with GUI again + +....... + Add some of chef_koch fixes? UPDATE: chef_koch is also doing updates on this version. Great,it will for sure speed up development! Quit key for joystick.. -Fileoptions etc +Fileoptions etc \ 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-10 20:58:26
|
Revision: 510 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=510&view=rev Author: chef_koch Date: 2007-06-10 13:58:23 -0700 (Sun, 10 Jun 2007) Log Message: ----------- merged first layout redesign - revert this pls, if you don't like it should be the last merge from old plugin, so all future code changes i'll made will be exclusive for new-MyPrograms Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.resx Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-10 20:11:31 UTC (rev 509) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-10 20:58:23 UTC (rev 510) @@ -28,13 +28,14 @@ using System.Diagnostics; using System.Drawing; using System.Windows.Forms; +using System.Threading; -using GUIPrograms; -using GUIPrograms.Database; +using MediaPortal.GUI.Library; + using GUIPrograms.ApplicationItems; using GUIPrograms.FileItems; +using GUIPrograms.Imports; - namespace GUIPrograms.Design { /// <summary> @@ -42,52 +43,60 @@ /// </summary> public class FileInfoScraperForm : Form { + #region InitControls + private ApplicationItem m_CurApp; - private Panel leftPanel; - private Panel rightPanel; - private Splitter splitterVert; - private ListView FileList; + private MediaPortal.UserInterface.Controls.MPListView listViewFileList; 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; + private MediaPortal.UserInterface.Controls.MPButton buttonStartSearch; + private MediaPortal.UserInterface.Controls.MPButton buttonSaveSearch; + private MediaPortal.UserInterface.Controls.MPButton buttonClose; + private LinkLabel linkLabelAllGame; private ToolTip toolTip1; - private Button uncheckAllButton; - private Button buttonSelectBestMatch; - private Label filterLabel; - private ComboBox filterComboBox; - private Button ResetFilterButton; + private MediaPortal.UserInterface.Controls.MPComboBox filterComboBox; + private MediaPortal.UserInterface.Controls.MPButton ResetFilterButton; private NumericUpDown MinRelevanceNum; - private Label label1; - private Button LaunchURLButton; + private MediaPortal.UserInterface.Controls.MPLabel label1; 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.MPGroupBox groupBoxMatchList; + private MediaPortal.UserInterface.Controls.MPListView listViewMatchList; + private ColumnHeader columnHeader1; + private ColumnHeader columnHeader2; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxFileList; + private MediaPortal.UserInterface.Controls.MPCheckBox checkboxFileList; private MediaPortal.UserInterface.Controls.MPLabel label2; + private MediaPortal.UserInterface.Controls.MPLabel labelLaunchUrlInfo; + + #endregion + + #region Variables / Init + + int mStartTime = 0; + private SplitContainer splitContainer1; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxFilter; + private StatusStrip statusStrip; + private ToolStripStatusLabel toolStripStatusLabel; + private ToolStripProgressBar toolStripProgressBar; + private MediaPortal.UserInterface.Controls.MPLabel labelPlatform; + private ToolStripDropDownButton toolStripDropDownButton1; + private ToolStripMenuItem cancelSearchToolStripMenuItem; // timer stuff + + bool isSearching = false; bool stopSearching = false; + ScraperSaveType saveType = ScraperSaveType.DataAndImages; + public ApplicationItem CurApp { get @@ -136,549 +145,207 @@ 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() + public void Setup() { - 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); + SyncFileList(); + UpdateButtonStates(); + } + #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; } + + private FileItemInfo GetSelectedMatchItem() + { + 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) + { + result = (info.RelevanceNorm >= MinRelevanceNum.Value); + } + return result; + } + + private void SelectBestMatch(ListViewItem curItem) + { + 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; + } + + /* this needs adding the gameurl to database + // 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); + buttonStartSearch.Enabled = (!isSearching); + buttonSaveSearch.Enabled = (!isSearching); + buttonClose.Enabled = (!isSearching); + toolStripDropDownButton1.Enabled = isSearching; } - private void SyncListView() + private void ChangeFileSelection() { - if (m_CurApp == null) - return; + SyncMatchList(GetSelectedFileItem()); + } - FileList.BeginUpdate(); + private void SyncFileList() + { + if (m_CurApp == null) return; + + listViewFileList.BeginUpdate(); try { - FileList.Items.Clear(); + listViewFileList.Items.Clear(); // add all files foreach (FileItem file in m_CurApp.Files) { ListViewItem curItem = new ListViewItem(file.Title); + file.ToFileInfoFavourite(); curItem.Tag = file; if (!file.IsFolder) { - ListViewItem newItem = FileList.Items.Add(curItem); + ListViewItem newItem = listViewFileList.Items.Add(curItem); newItem.SubItems.Add("<unknown>"); } } } finally { - FileList.EndUpdate(); + listViewFileList.EndUpdate(); } } - private void button3_Click(object sender, EventArgs e) + private void SyncMatchList(FileItem file) { - if ((m_CurApp != null) && (filterComboBox.Text != "")) + listViewMatchList.BeginUpdate(); + try { - m_CurApp.SystemDefault = filterComboBox.Text; - m_CurApp.InsertOrUpdateSettings(); + listViewMatchList.Items.Clear(); + + if (file == null) return; + if (file.FileInfoList == null) return; + + foreach (FileItemInfo item in file.FileInfoList) + { + if (!IsGoodMatch(item)) continue; + + ListViewItem curItem = new ListViewItem(String.Format("{0} ({1})", item.Title, item.Platform)); + curItem.SubItems.Add(String.Format("{0}%", item.RelevanceNorm)); + curItem.Tag = item; + + // selected item? + if (file.FileInfoFavourite != null) + if (file.FileInfoFavourite == item) + { + curItem.Checked = true; + } + + listViewMatchList.Items.Add(curItem); + } } - this.Close(); + finally + { + listViewMatchList.EndUpdate(); + } } - void InitProgressBar(string msg) + private void InitProgressBar(string msg) { - progressPanel.Enabled = true; - progressBar.Value = 0; - if (FileList.CheckedItems.Count - 1 > 0) + toolStripProgressBar.Value = 0; + if (listViewFileList.CheckedItems.Count - 1 > 0) { - progressBar.Maximum = FileList.CheckedItems.Count - 1; + toolStripProgressBar.Maximum = listViewFileList.CheckedItems.Count - 1; } else { - progressBar.Maximum = 1; + toolStripProgressBar.Maximum = 1; } - progressBar.Step = 1; - progressStatusLabel.Text = msg; + toolStripProgressBar.Step = 1; + toolStripStatusLabel.Text = msg; mStartTime = (int)(DateTime.Now.Ticks / 10000); // reset timer! } - void StepProgressBar() + private void StepProgressBar() { string strTimeRemaining = ""; - progressBar.PerformStep(); - if (progressBar.Value > 1) + toolStripProgressBar.PerformStep(); + if (toolStripProgressBar.Value > 1) { int nTimeElapsed = ((int)(DateTime.Now.Ticks / 10000)) - mStartTime; - double TimePerItem = nTimeElapsed / progressBar.Value - 1; - int nTotalTime = (int)(progressBar.Maximum * TimePerItem); + double TimePerItem = nTimeElapsed / toolStripProgressBar.Value - 1; + int nTotalTime = (int)(toolStripProgressBar.Maximum * TimePerItem); int nTimeRemaining = nTotalTime - nTimeElapsed; int nSecondsRemaining = nTimeRemaining / 1000; int nMinutesRemaining = nSecondsRemaining / 60; @@ -686,292 +353,124 @@ strTimeRemaining = String.Format(" ({0}m {1}s remaining)", nMinutesRemaining, nSecondsRemaining); } - progressStatusLabel.Text = String.Format("Searching file {0} of {1} ", progressBar.Value, progressBar.Maximum + 1) + strTimeRemaining; + toolStripStatusLabel.Text = String.Format("Searching file {0} of {1} ", toolStripProgressBar.Value, toolStripProgressBar.Maximum + 1) + strTimeRemaining; } - void DeInitProgressBar(string msg) + private void DeInitProgressBar(string msg) { - progressPanel.Enabled = false; - progressStatusLabel.Text = msg; + toolStripStatusLabel.Text = msg; } - private void btnStartSearch_Click(object sender, EventArgs e) - { - int numberOfSearches = 0; - bool bSuccess = true; - InitProgressBar("Starting search"); - foreach (ListViewItem curItem in FileList.CheckedItems) - { - if (stopSearching) - break; - ListViewItem nextItem = null; - FileItem file = (FileItem)curItem.Tag; - if (file != null) - { - if (curItem.Index < FileList.Items.Count - 1) - { - nextItem = FileList.Items[curItem.Index + 1]; - } - else - { - nextItem = curItem; - } - nextItem.EnsureVisible(); - // if (!bSuccess) - // { - // curItem.SubItems[1].Text = String.Format("waiting for reconnection..."); - // System.Threading.Thread.Sleep(5126); - // } - numberOfSearches = numberOfSearches + 1; - if (numberOfSearches > 20) - { - curItem.SubItems[1].Text = String.Format("waiting..."); - System.Threading.Thread.Sleep(20000); - System.Windows.Forms.Application.DoEvents(); - numberOfSearches = 0; - } - 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); - curItem.SubItems[1].Text = String.Format("{0} matches", file.FileInfoList.Count); - StepProgressBar(); - buttonSelectBestMatch.Enabled = true; - System.Windows.Forms.Application.DoEvents(); - } - } - ChangeFileSelection(); - if (stopSearching) - { - DeInitProgressBar("Search aborted"); - } - else - { - DeInitProgressBar("Search finished"); - } - stopSearching = false; - } + #endregion + #region ControlEvents - private FileItem GetSelectedFileItem() + #region Lists + + private void listViewFileList_SelectedIndexChanged(object sender, EventArgs e) { - FileItem res = null; - if (FileList.FocusedItem != null) - { - if (FileList.FocusedItem.Tag != null) - { - res = (FileItem)FileList.FocusedItem.Tag; - } - } - return res; + ChangeFileSelection(); } - private FileItemInfo GetSelectedMatchItem() + private void listViewFileList_ItemChecked(object sender, ItemCheckedEventArgs e) { - FileItemInfo res = null; - if (MatchList.SelectedItems != null) - { - if (MatchList.SelectedItems[0] != null) - { - if (MatchList.SelectedItems[0].Tag != null) - { - res = (FileItemInfo)MatchList.SelectedItems[0].Tag; - } - } - } - return res; + UpdateButtonStates(); } - - private bool IsGoodMatch(FileItemInfo info) + private void listViewMatchList_ItemCheck(object sender, ItemCheckEventArgs e) { - bool result = (filterComboBox.Text == "") || (info.Platform.ToLower().IndexOf(filterComboBox.Text.ToLower()) == 0); - if (result) + if (e.NewValue == CheckState.Checked) { - result = (info.RelevanceNorm >= MinRelevanceNum.Value); + if (listViewMatchList.CheckedItems == null) return; + foreach (ListViewItem item in listViewMatchList.CheckedItems) + if (item.Index != e.Index) + item.Checked = false; } - return result; } - private void SyncMatchesList(FileItem file) + private void listViewMatchList_ItemChecked(object sender, ItemCheckedEventArgs e) { - LaunchURLButton.Enabled = false; - MatchList.BeginUpdate(); - try - { - MatchList.Items.Clear(); - if (file != null) - { - if (file.FileInfoList != null) - { - foreach (FileItemInfo item in file.FileInfoList) - { - if (IsGoodMatch(item)) - { - ListViewItem curItem = new ListViewItem(String.Format("{0} ({1})", item.Title, item.Platform)); - curItem.SubItems.Add(String.Format("{0}%", item.RelevanceNorm)); - // curItem.SubItems[1].Text = String.Format("{0}%", item.Relevance); - curItem.Tag = item; - curItem = MatchList.Items.Add(curItem); - // selected item? - if ((file.FileInfoFavourite != null) && (file.FileInfoFavourite == item)) - { - curItem.Selected = true; - LaunchURLButton.Enabled = true; - } - } - } - } - } - } - finally - { - MatchList.EndUpdate(); - } + if (e.Item.Checked == false) return; - } + FileItem file = GetSelectedFileItem(); + if (file == null) return; + if (e.Item.Tag == null) return; + FileItemInfo info = e.Item.Tag as FileItemInfo; + if (info == null) return; - private void ChangeFileSelection() - { - FileItem file = GetSelectedFileItem(); - SyncMatchesList(file); + file.FileInfoFavourite = info; + buttonSaveSearch.Enabled = true; + listViewFileList.FocusedItem.SubItems[1].Text = String.Format("best: {0}%", file.FileInfoFavourite.RelevanceNorm); } - private void FileList_SelectedIndexChanged(object sender, EventArgs e) + private void listViewMatchList_SelectedIndexChanged(object sender, EventArgs e) { - ChangeFileSelection(); + if (listViewMatchList.SelectedItems.Count == 0) return; + if (listViewMatchList.SelectedItems[0].Tag == null) return; + FileItemInfo info = listViewMatchList.SelectedItems[0].Tag as FileItemInfo; + if (info == null) return; + + info.LaunchURL(); } - private void allGameLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + private void checkboxFileList_CheckedChanged(object sender, EventArgs e) { - if (allGameLink.Text == null) - return; - if (allGameLink.Text.Length > 0) + if (checkboxFileList.Checked) { - ProcessStartInfo sInfo = new ProcessStartInfo(allGameLink.Text); - Process.Start(sInfo); + foreach (ListViewItem curItem in listViewFileList.Items) + curItem.Checked = true; } + else + { + foreach (ListViewItem curItem in listViewFileList.Items) + curItem.Checked = false; + } + UpdateButtonStates(); } - private void LaunchSelectedMatchURL() - { - FileItemInfo info = GetSelectedMatchItem(); - if (info == null) - return; - info.LaunchURL(); - } + #endregion + #region Buttons - private void MatchList_DoubleClick(object sender, EventArgs e) + private void btnStartSearch_Click(object sender, EventArgs e) { - LaunchSelectedMatchURL(); + SearchStart(); } - private void checkAllButton_Click(object sender, EventArgs e) + private void btnSaveSearch_Click(object sender, EventArgs e) { - foreach (ListViewItem curItem in FileList.Items) - { - curItem.Checked = true; - } - btnStartSearch.Enabled = (FileList.CheckedItems.Count > 0); - SyncFileLabel(); + menuSaveDetails.Show(buttonSaveSearch, new Point(0, buttonSaveSearch.Height)); } - private void uncheckAllButton_Click(object sender, EventArgs e) + private void cancelSearchToolStripMenuItem_Click(object sender, EventArgs e) { - foreach (ListViewItem curItem in FileList.Items) - { - curItem.Checked = false; - } - btnStartSearch.Enabled = false; - buttonSelectBestMatch.Enabled = false; - btnSaveSearch.Enabled = false; - SyncFileLabel(); + stopSearching = true; } - private void MatchList_SelectedIndexChanged(object sender, EventArgs e) + private void buttonClose_Click(object sender, EventArgs e) { - FileItem file = GetSelectedFileItem(); - if (file == null) - return; - - if (MatchList.SelectedIndices.Count > 0) + if ((m_CurApp != null) && (filterComboBox.Text != "")) { - FileItemInfo info = GetSelectedMatchItem(); - file.FileInfoFavourite = info; - LaunchURLButton.Enabled = true; - btnSaveSearch.Enabled = true; - FileList.FocusedItem.SubItems[1].Text = String.Format("best: {0}%", file.FileInfoFavourite.RelevanceNorm); + m_CurApp.SystemDefault = filterComboBox.Text; + //m_CurApp.Write(); } - else - { - file.FileInfoFavourite = null; - LaunchURLButton.Enabled = false; - } + this.Close(); } - private void btnSaveSearch_Click(object sender, EventArgs e) + private void allGameLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - menuSaveDetails.Show(btnSaveSearch, new Point(0, btnSaveSearch.Height)); - } + if (linkLabelAllGame.Text == null) return; - void SaveSearch(ScraperSaveType saveType) - { - int numberOfSearches = 0; - InitProgressBar("Starting search"); - ListViewItem nextItem = null; - foreach (ListViewItem curItem in FileList.CheckedItems) + if (linkLabelAllGame.Text.Length > 0) { - if (stopSearching) - break; - FileItem file = (FileItem)curItem.Tag; - if (file != null) - { - if (curItem.Index < FileList.Items.Count - 1) - { - nextItem = FileList.Items[curItem.Index + 1]; - } - else - { - nextItem = curItem; - } - nextItem.EnsureVisible(); - StepProgressBar(); - if (file.FileInfoFavourite != null) - { - numberOfSearches++; - numberOfSearches = numberOfSearches + 1; - if (numberOfSearches > 20) - { - curItem.SubItems[1].Text = String.Format("waiting..."); - System.Windows.Forms.Application.DoEvents(); - System.Threading.Thread.Sleep(20000); - numberOfSearches = 0; - } - curItem.SubItems[1].Text = String.Format("<searching...>"); - System.Windows.Forms.Application.DoEvents(); - file.FindFileInfoDetail(m_CurApp, file.FileInfoFavourite, ScraperType.ALLGAME, saveType); - if ((saveType == ScraperSaveType.DataAndImages) || (saveType == ScraperSaveType.Data)) - { - file.SaveFromFileInfoFavourite(); - } - curItem.SubItems[1].Text = String.Format("<saved>"); - System.Windows.Forms.Application.DoEvents(); - } - } + ProcessStartInfo sInfo = new ProcessStartInfo(linkLabelAllGame.Text); + Process.Start(sInfo); } - if (stopSearching) - { - DeInitProgressBar("Search aborted"); - } - else - { - DeInitProgressBar("Search finished"); - } - stopSearching = false; } + #endregion + private void filterComboBox_SelectedIndexChanged(object sender, EventArgs e) { ChangeFileSelection(); @@ -991,69 +490,17 @@ ChangeFileSelection(); } - private void buttonSelectBestMatch_Click(object sender, EventArgs e) - { - foreach (ListViewItem curItem in FileList.CheckedItems) - { - FileItem file = (FileItem)curItem.Tag; - if (file != null) - { - if (file.FileInfoList != null) - { - file.FileInfoFavourite = null; - foreach (FileItemInfo item in file.FileInfoList) - { - if (IsGoodMatch(item)) - { - btnSaveSearch.Enabled = true; - file.FileInfoFavourite = item; - break; - } - } - if (file.FileInfoFavourite != null) - { - curItem.SubItems[1].Text = String.Format("best: {0}%", file.FileInfoFavourite.RelevanceNorm); - } - else - { - curItem.SubItems[1].Text = "no match"; - } - } - } - } - ChangeFileSelection(); - } - private void MinRelevanceNum_ValueChanged(object sender, EventArgs e) { ChangeFileSelection(); } - private void LaunchURLButton_Click(object sender, EventArgs e) - { - LaunchSelectedMatchURL(); - } + #region Menus - private void FileList_MouseUp(object sender, MouseEventArgs e) - { - SyncButtons(); - } - - void SyncButtons() - { - btnStartSearch.Enabled = (FileList.CheckedItems.Count > 0); - if (!btnStartSearch.Enabled) - { - buttonSelectBestMatch.Enabled = false; - btnSaveSearch.Enabled = false; - } - SyncFileLabel(); - } - private void mnuCheckWithoutImages_Click(object sender, EventArgs e) { FileItem curFile; - foreach (ListViewItem curItem in FileList.Items) + foreach (ListViewItem curItem in listViewFileList.Items) { curFile = (FileItem)curItem.Tag; if (curFile != null) @@ -1065,14 +512,13 @@ curItem.Checked = false; } } - btnStartSearch.Enabled = (FileList.CheckedItems.Count > 0); - SyncFileLabel(); + buttonStartSearch.Enabled = (listViewFileList.CheckedItems.Count > 0); + UpdateButtonStates(); } - private void mnuCheckWithoutOverview_Click(object sender, EventArgs e) { FileItem curFile; - foreach (ListViewItem curItem in FileList.Items) + foreach (ListViewItem curItem in listViewFileList.Items) { curFile = (FileItem)curItem.Tag; if (curFile != null) @@ -1084,42 +530,672 @@ curItem.Checked = false; } } - btnStartSearch.Enabled = (FileList.CheckedItems.Count > 0); - SyncFileLabel(); + buttonStartSearch.Enabled = (listViewFileList.CheckedItems.Count > 0); + UpdateButtonStates(); } - - private void SyncFileLabel() + + private void menuDataAndImages_Click(object sender, EventArgs e) { - lblFiles.Text = String.Format("Files: ({0} of {1} selected)", FileList.CheckedItems.Count, FileList.Items.Count); + saveType = ScraperSaveType.DataAndImages; + SearchSave(); } + private void menuData_Click(object sender, EventArgs e) + { + saveType = ScraperSaveType.Data; + SearchSave(); + } + private void menuImages_Click(object sender, EventArgs e) + { + saveType = ScraperSaveType.Images; + SearchSave(); + } - private void FileList_AfterLabelEdit(object sender, LabelEditEventArgs e) + #endregion + + #endregion + + #region Threads + + private void SearchStart() { - FileItem curItem = GetSelectedFileItem(); - if (curItem == null) - return; - curItem.TitleOptimized = e.Label; + Thread thread = new Thread(new ThreadStart(SearchStartThread)); + thread.Priority = ThreadPriority.BelowNormal; + thread.Name = "MyPrograms SearchStart"; + thread.Start(); } - private void cancelButton_Click(object sender, EventArgs e) + private void SearchStartThread() { - stopSearching = true; + isSearching = true; + UpdateButtonStates(); + + int numberOfSearches = 0; + bool bSuccess = true; + InitProgressBar("Starting search"); + foreach (ListViewItem curItem in listViewFileList.CheckedItems) + { + if (stopSearching) break; + if (curItem.Tag == null) continue; + + FileItem file = curItem.Tag as FileItem; + if (file == null) continue; + + ListViewItem nextItem = null; + + if (curItem.Index < listViewFileList.Items.Count - 1) + { + nextItem = listViewFileList.Items[curItem.Index + 1]; + } + else + { + nextItem = curItem; + } + nextItem.EnsureVisible(); + // if (!bSuccess) + // { + // curItem.SubItems[1].Text = String.Format("waiting for reconnection..."); + // System.Threading.Thread.Sleep(5126); + // } + numberOfSearches = numberOfSearches + 1; + if (numberOfSearches > 20) + { + curItem.SubItems[1].Text = String.Format("waiting..."); + System.Threading.Thread.Sleep(20000); + System.Windows.Forms.Application.DoEvents(); + numberOfSearches = 0; + } + 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(file.Title, ScraperType.ALLGAME); + + SelectBestMatch(curItem); + + StepProgressBar(); + System.Windows.Forms.Application.DoEvents(); + } + ChangeFileSelection(); + if (stopSearching) + { + DeInitProgressBar("Search aborted"); + } + else + { + DeInitProgressBar("Search finished"); + } + + stopSearching = false; + isSearching = false; + UpdateButtonStates(); } - private void menuDataAndImages_Click(object sender, EventArgs e) + private void SearchSave() { - SaveSearch(ScraperSaveType.DataAndImages); + Thread thread = new Thread(new ThreadStart(SearchSaveThread)); + thread.Priority = ThreadPriority.BelowNormal; + thread.Name = "MyPrograms SearchSave"; + thread.Start(); } - private void menuData_Click(object sender, EventArgs e) + private void SearchSaveThread() { - SaveSearch(ScraperSaveType.Data); + isSearching = true; + UpdateButtonStates(); + + int numberOfSearches = 0; + InitProgressBar("Starting search"); + ListViewItem nextItem = null; + + foreach (ListViewItem curItem in listViewFileList.CheckedItems) + { + if (stopSearching) + break; + FileItem file = (FileItem)curItem.Tag; + + if (file == null) + continue; + + if (curItem.Index < listViewFileList.Items.Count - 1) + { + nextItem = listViewFileList.Items[curItem.Index + 1]; + } + else + { + nextItem = curItem; + } + nextItem.EnsureVisible(); + StepProgressBar(); + if (file.FileInfoFavourite != null) + { + numberOfSearches++; + numberOfSearches = numberOfSearches + 1; + if (numberOfSearches > 20) + { + curItem.SubItems[1].Text = String.Format("waiting..."); + System.Windows.Forms.Application.DoEvents(); + System.Threading.Thread.Sleep(20000); + numberOfSearches = 0; + } + curItem.SubItems[1].Text = String.Format("<searching...>"); + System.Windows.Forms.Application.DoEvents(); + file.FindFileInfoDetail(m_CurApp, file.FileInfoFavourite, ScraperType.ALLGAME, saveType); + if ((saveType == ScraperSaveType.DataAndImages) || (saveType == ScraperSaveType.Data)) + { + file.SaveFromFileInfoFavourite(); + } + curItem.SubItems[1].Text = String.Format("<saved>"); + System.Windows.Forms.Application.DoEvents(); + } + } + if (stopSearching) + { + DeInitProgressBar("Search aborted"); + } + else + { + DeInitProgressBar("Search finished"); + } + + stopSearching = false; + isSearching = false; + UpdateButtonStates(); } - private void menuImages_Click(object sender, EventArgs e) + #endregion + + #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() { - SaveSearch(ScraperSaveType.Images); + this.components = new System.ComponentModel.Container(); + 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.listViewFileList = new MediaPortal.UserInterface.Controls.MPListView(); + 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.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.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.groupBoxFileList = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.checkboxFileList = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.splitContainer1 = new System.Windows.Forms.SplitCo... [truncated message content] |
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-10 17:45:27
|
Revision: 508 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=508&view=rev Author: northern_sky Date: 2007-06-10 10:45:25 -0700 (Sun, 10 Jun 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-10 17:39:18 UTC (rev 507) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-06-10 17:45:25 UTC (rev 508) @@ -1,10 +1,11 @@ -Work in progress on alternative/update to myprograms. -not 0.1 yet, so still some features and bugs to fix. -Do not use on your real MP-installation, only for tests. -In fact, i'm not interested in bug-reports yet, as -there are a few known to fix first. +Work in progress on an alternative/update to myprograms. +Not releaseready yet, as there still are some features and bugs to fix. +Do not use on your real MP-installation, only for tests.. +Not really interested in bug-reports yet, as +there are a few known bugs to fix first. Copy contents of metadata-folder to MP root folder , and the GUIPrograms.dll to MP/windowsplugins to run. +There will possibly be db-changes and xml-changes between versions, so always make sure that you have a clean install between updates. Done so far: @@ -23,16 +24,16 @@ Allgamesupport updated. Mame, Gamebase support partially rewritten.much faster. -Some new options . skip mahjong games, etc +Some new options: Skip mahjong games,etc To-do next: Revise the code, clear out bugs. -Add more specific emulator support -Test all gamebase variants,some more options. +Add some more specific emulator support.. +Testing!! Small restructure of db. .... Iso mounting? -Add some of chef_koch fixes? +Add some of chef_koch fixes? UPDATE: chef_koch is also doing updates on this version. Great,it will for sure speed up development! Quit key for joystick.. Fileoptions etc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-06-10 17:39:20
|
Revision: 507 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=507&view=rev Author: and-81 Date: 2007-06-10 10:39:18 -0700 (Sun, 10 Jun 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/IR Server Suite.sln Removed Paths: ------------- trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Windows.Forms.xml trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.Extensions.dll trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.Extensions.xml trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.xml trunk/plugins/IR Server Suite/IR Server Plugins/Dummy Transceiver/ Deleted: trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml 2007-06-10 17:38:13 UTC (rev 506) +++ trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml 2007-06-10 17:39:18 UTC (rev 507) @@ -1,1900 +0,0 @@ -<?xml version="1.0"?> -<doc> - <assembly> - <name>DevAge.Core</name> - </assembly> - <members> - <member name="T:DevAge.Text.FixedLength.LineParser"> - <summary> - A class for parsing fixed length string and loading the fields into a class. - </summary> - </member> - <member name="M:DevAge.Text.FixedLength.LineParser.#ctor"> - <summary> - Constructor. Fill the Fields list fot specify the columns. - </summary> - </member> - <member name="M:DevAge.Text.FixedLength.LineParser.#ctor(System.Type)"> - <summary> - Load the parser fields with the properties specified in the type. You must use the FieldAttribute and ParseFormatAttribute to specify additional informations like the field length. - </summary> - <param name="lineClassType"></param> - </member> - <member name="M:DevAge.Text.FixedLength.LineParser.Reset"> - <summary> - Reset the parser - </summary> - </member> - <member name="M:DevAge.Text.FixedLength.LineParser.LoadLine(System.String)"> - <summary> - Load the specified line in the parser. - </summary> - <param name="line"></param> - </member> - <member name="M:DevAge.Text.FixedLength.LineParser.GetValue(System.String)"> - <summary> - Get a specified field value. - </summary> - <param name="fieldName"></param> - <returns></returns> - </member> - <member name="M:DevAge.Text.FixedLength.LineParser.FillLineClass(System.Object)"> - <summary> - Fill the properties of the specified class with the values of the line has defined by the Fields collection. - </summary> - <param name="schemaClass"></param> - <returns>Returns the same class specified in the schemaClass parameter, this is useful if you have struct or value types.</returns> - </member> - <member name="P:DevAge.Text.FixedLength.LineParser.Fields"> - <summary> - Gets a collection of fields. - </summary> - </member> - <member name="T:DevAge.Data.SqlClient.SqlCommandBuilder"> - <summary> - This class is similar to the System.Data.SqlClient.SqlCommandBuilder, but use only the DataTable to create the required commands. - Don't support identity (autoincrement) column and only the base data type. This class don't use the data source to explore the data but only the DataTable informations. - So you must populate the PrimaryKeys of the DataSet. I suggest to use GUID column (uniqueidentifier) to replace the identity column. - Remember to set the Connection of the generated command. - </summary> - </member> - <member name="M:DevAge.Data.SqlClient.SqlCommandBuilder.#ctor(System.Data.DataTable)"> - <summary> - Constructor - </summary> - <param name="dataTable">table used to create commands</param> - </member> - <member name="P:DevAge.Data.SqlClient.SqlCommandBuilder.DataTable"> - <summary> - Table used to create commands - </summary> - </member> - <member name="T:DevAge.DateTimeHelper"> - <summary> - Summary description for DateTimeHelper. - </summary> - </member> - <member name="M:DevAge.DateTimeHelper.YearsDifference(System.DateTime,System.DateTime)"> - <summary> - Calculate the difference in years of 2 dates. Usually used for age calculations. dateA - dateB - </summary> - <param name="dateA"></param> - <param name="dateB"></param> - <returns></returns> - </member> - <member name="M:DevAge.DateTimeHelper.MonthsDifference(System.DateTime,System.DateTime)"> - <summary> - Calculate the difference in months of 2 dates. dateA - dateB - </summary> - <param name="dateA"></param> - <param name="dateB"></param> - <returns></returns> - </member> - <member name="T:DevAge.Data.FileDataSet"> - <summary> - Summary description for Manager. - </summary> - </member> - <member name="P:DevAge.Data.FileDataSet.SaveDataFormat"> - <summary> - Gets or Sets the format used to save the DataSet - </summary> - </member> - <member name="P:DevAge.Data.FileDataSet.FileDataFormat"> - <summary> - Gets the current format of the File where the data are loaded. - </summary> - </member> - <member name="P:DevAge.Data.FileDataSet.MergeReadedSchema"> - <summary> - Gets or Sets if merge the schema of the file with the schema of the DataSet specified. Use true if the DataSet doesn't have a schema definition. Default is false. - </summary> - </member> - <member name="T:DevAge.DevAgeApplicationException"> - <summary> - Generic DevAge Exception - </summary> - </member> - <member name="M:DevAge.DevAgeApplicationException.#ctor(System.String)"> - <summary> - Constructor - </summary> - <param name="p_strErrDescription"></param> - </member> - <member name="M:DevAge.DevAgeApplicationException.#ctor(System.String,System.Exception)"> - <summary> - Constructor - </summary> - <param name="p_strErrDescription"></param> - <param name="p_InnerException"></param> - </member> - <member name="M:DevAge.DevAgeApplicationException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> - <summary> - Constructor - </summary> - <param name="p_Info"></param> - <param name="p_StreamingContext"></param> - </member> - <member name="T:DevAge.Text.FixedLength.FieldAttribute"> - <summary> - Required attribute to specify the field position and length - </summary> - </member> - <member name="M:DevAge.Text.FixedLength.FieldAttribute.#ctor(System.Int32,System.Int32)"> - <summary> - Constructor. - </summary> - <param name="fieldIndex">Index of the field, 0 based. Each field must have a unique progressive index</param> - <param name="length">Lenght of the field when readed and writed to the string.</param> - </member> - <member name="T:DevAge.Text.FixedLength.ParseFormatAttribute"> - <summary> - Attribute used to specify additional parse options - </summary> - </member> - <member name="M:DevAge.Text.FixedLength.ParseFormatAttribute.#ctor"> - <summary> - Constructor. Use one of these properties to customize the format: CultureInfo, DateTimeFormat, NumberFormat, TrimBeforeParse. - Default is Invariant culture format. - </summary> - </member> - <member name="T:DevAge.Text.FixedLength.ValueMappingAttribute"> - <summary> - Attribute used to convert a specific value to another value - </summary> - </member> - <member name="M:DevAge.Text.FixedLength.ValueMappingAttribute.#ctor(System.String,System.Object)"> - <summary> - Constructor - </summary> - <param name="stringValue">String value</param> - <param name="fieldValue">Field typed value</param> - </member> - <member name="T:DevAge.Text.FixedLength.StandardValueAttribute"> - <summary> - Attribute used to specify the standard value (mandatory value) for a specific field. - You can use this attribute for example when you want a particular field to only accept one or more standard values. - </summary> - </member> - <member name="M:DevAge.Text.FixedLength.StandardValueAttribute.#ctor(System.Object)"> - <summary> - Construcotr - </summary> - <param name="standardValue">Required value</param> - </member> - <member name="T:DevAge.Patterns.IActivity"> - <summary> - An interface to represents a basic activity. - </summary> - </member> - <member name="M:DevAge.Patterns.IActivity.Start(DevAge.Patterns.IActivityEvents)"> - <summary> - Start the activity and all sub activities. - </summary> - <param name="events">Interface class that receive the events, can be null if no event class is needed.</param> - </member> - <member name="M:DevAge.Patterns.IActivity.Cancel"> - <summary> - Cancel the current activity and all sub activities throwing a ActivityCanceledException. - </summary> - </member> - <member name="P:DevAge.Patterns.IActivity.SubActivities"> - <summary> - Subordinated activities. Are executed after the current activity. If one of these activity throws an exception is propagated to parent activity and the operation is stopped. - Note that the sub activities can be async and so can be executed in a parellel mode. - </summary> - </member> - <member name="P:DevAge.Patterns.IActivity.Status"> - <summary> - Activity status - </summary> - </member> - <member name="P:DevAge.Patterns.IActivity.Name"> - <summary> - Name of the activity used to describe the class. - </summary> - </member> - <member name="P:DevAge.Patterns.IActivity.WaitHandle"> - <summary> - Gets the WaitHandle class used to wait for the completition of the activity. - </summary> - </member> - <member name="P:DevAge.Patterns.IActivity.Exception"> - <summary> - Gets the exception throwed when the activity fail. Null if no exception. - </summary> - </member> - <member name="P:DevAge.Patterns.IActivity.Parent"> - <summary> - Gets or sets the Activity parent. Null when it is a root activity. - Do not set manually the parent activity, but simply add the activity to the SubActivities collection. - </summary> - </member> - <member name="P:DevAge.Patterns.IActivity.FullName"> - <summary> - Gets the activity full name of the activity, composed by the full name of the parent activity separated with a \ character - </summary> - </member> - <member name="F:DevAge.Patterns.SubActivityWaitMode.DoNotWait"> - <summary> - Don't wait the sub activities to finish (parallel processing, asyncronous) - </summary> - </member> - <member name="F:DevAge.Patterns.SubActivityWaitMode.WaitOnEach"> - <summary> - Wait for each sub activities (syncronous) - </summary> - </member> - <member name="F:DevAge.Patterns.SubActivityWaitMode.WaitAtTheEnd"> - <summary> - Wait all the sub activities at the end (parallel processing but syncronized with the parent) - </summary> - </member> - <member name="T:DevAge.Patterns.ActivityBase"> - <summary> - Base activity class. Override the OnWork method to customize the activity. - </summary> - </member> - <member name="F:DevAge.Patterns.ActivityBase.mActivityCount"> - <summary> - An activity count used only to generate a seguential name - </summary> - </member> - <member name="F:DevAge.Patterns.ActivityBase.mWaitHandle"> - <summary> - Initially set to signaled=true=completed, nonsignaled=false=notcompleted, - </summary> - </member> - <member name="M:DevAge.Patterns.ActivityBase.#ctor"> - <summary> - Constructor - </summary> - </member> - <member name="M:DevAge.Patterns.ActivityBase.ResetRunningStatus"> - <summary> - Reset the status property to the original values. If the activity is still running an exception is throw. - </summary> - </member> - <member name="M:DevAge.Patterns.ActivityBase.OnWork"> - <summary> - Working method. Abstract. Override this method to provide a specific work for the activity. - </summary> - </member> - <member name="M:DevAge.Patterns.ActivityBase.DoWork"> - <summary> - Internal work method. Call the OnWork method and Start the SubActivities. - </summary> - </member> - <member name="M:DevAge.Patterns.ActivityBase.WaitActivities(DevAge.Patterns.ActivityCollection,System.Int32)"> - <summary> - Wait until or SubActivities are completed. Throw an exception on timeout. - </summary> - <param name="activities"></param> - <param name="timeout"></param> - </member> - <member name="M:DevAge.Patterns.ActivityBase.WaitActivity(DevAge.Patterns.IActivity,System.Int32)"> - <summary> - Wait until or SubActivities are completed. Throw an exception on timeout. - </summary> - <param name="activity"></param> - <param name="timeout"></param> - </member> - <member name="M:DevAge.Patterns.ActivityBase.CheckActivitiesException(DevAge.Patterns.ActivityCollection)"> - <summary> - Throw an exception if one of the activities has an exception. - </summary> - <param name="activities"></param> - </member> - <member name="M:DevAge.Patterns.ActivityBase.CheckActivityException(DevAge.Patterns.IActivity)"> - <summary> - Throw an exception if one of the activities has an exception. - </summary> - <param name="activity"></param> - </member> - <member name="M:DevAge.Patterns.ActivityBase.StartActivity"> - <summary> - Start the activity. NOTE: Usually don't override this method but override the OnWork method to implement the specific activity work. - </summary> - </member> - <member name="M:DevAge.Patterns.ActivityBase.Start(DevAge.Patterns.IActivityEvents)"> - <summary> - Start the activity. If the activity is already running an exception is throw. - To override the common working code use the OnWork abstract method. - </summary> - <param name="events">Interface class that receive the events, can be null if no event class is needed.</param> - </member> - <member name="M:DevAge.Patterns.ActivityBase.Cancel"> - <summary> - Cancel the current activity and all sub activities throwing a ActivityCanceledException. - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.SubActivitiesTimeOut"> - <summary> - Gets or sets the time to wait for the sub activities. If the operation is still executing then a TimeOutException is fired. Default is System.Threading.Timeout.Infinite. Default is true. - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.PropagateException"> - <summary> - Gets or sets if propagate an exception from sub activities to the current activities. Default is true. - Only valid SubActivitiesTimeOut is WaitOnEach or WaitAtTheEnd - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.SubActivityWaitMode"> - <summary> - Gets or sets how the current activity wait the completition of the sub activities. - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.SubActivities"> - <summary> - Subordinated activities. Are executed after the current activity. If one of these activity throws an exception is propagated to parent activity and the operation is stopped. - Note that the sub activities can be async and so can be executed in a parellel mode. - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.Status"> - <summary> - Activity status - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.Name"> - <summary> - Name of the activity used to describe the class. - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.WaitHandle"> - <summary> - Gets the WaitHandle class used to wait for the completition of the activity. - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.Exception"> - <summary> - Gets the exception throwed when the activity fail. Null if no exception. - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.Parent"> - <summary> - Gets or sets the Activity parent. Null when it is a root activity. - Do not set manually the parent activity, but simply add the activity to the SubActivities collection. - </summary> - </member> - <member name="P:DevAge.Patterns.ActivityBase.FullName"> - <summary> - Gets the activity full name of the activity, composed by the full name of the parent activity separated with a \ character - </summary> - </member> - <member name="T:DevAge.Patterns.Activity"> - <summary> - An activity used as a container for other activities using a syncronized code. - </summary> - </member> - <member name="T:DevAge.Patterns.AsynchronousActivity"> - <summary> - An activity used as a container for other activities using an asynchronous code. - Override the OnAsyncWork method for custom asynchronous work. - </summary> - </member> - <member name="T:DevAge.Patterns.AsyncActivityBase"> - <summary> - Base activity class. Override the OnBeginWork and OnEndWork method to customize the activity. - This class support an asyncronous activity. - </summary> - </member> - <member name="M:DevAge.Patterns.AsyncActivityBase.OnBeginWork(System.AsyncCallback)"> - <summary> - Begind working method. Called to start the asyncronous activity. Abstract. - </summary> - </member> - <member name="M:DevAge.Patterns.AsyncActivityBase.OnEndWork(System.IAsyncResult)"> - <summary> - End working method. Called when the asyncronous operation is finished - </summary> - <param name="asyncResult">AsyncResult</param> - </member> - <member name="M:DevAge.Patterns.AsyncActivityBase.OnWork"> - <summary> - Working method. - </summary> - </member> - <member name="M:DevAge.Patterns.AsyncActivityBase.StartActivity"> - <summary> - Start the activity. NOTE: Usually don't override this method but override the OnBeginWork method to implement the specific activity work. - </summary> - </member> - <member name="T:DevAge.Data.StreamDataSet"> - <summary> - A static class used to serialize a DataSet to and from a stream using a binary or xml format. - The xml format use the standard DataSet xml serialization, the binary format use a custom format. - </summary> - </member> - <member name="M:DevAge.Data.StreamDataSet.Write(System.IO.Stream,System.Data.DataSet,DevAge.Data.StreamDataSetFormat)"> - <summary> - Write the dataset to the stream using the specified format. - </summary> - <param name="destination"></param> - <param name="source"></param> - <param name="format"></param> - </member> - <member name="M:DevAge.Data.StreamDataSet.Read(System.IO.Stream,System.Data.DataSet,DevAge.Data.StreamDataSetFormat,System.Boolean)"> - <summary> - Read from the stream and populate the dataset using the specified format. - </summary> - <param name="source"></param> - <param name="destination"></param> - <param name="format"></param> - <param name="mergeSchema">True to merge the schema, otherwise it is used the schema of the dataset</param> - </member> - <member name="T:DevAge.Data.StreamDataSetFormat"> - <summary> - Enum to control the serialization format - </summary> - </member> - <member name="F:DevAge.Data.StreamDataSetFormat.XML"> - <summary> - Standard xml format used by the ReadXml and WriteXml of the DataSet - </summary> - </member> - <member name="F:DevAge.Data.StreamDataSetFormat.Binary"> - <summary> - Custom binary format. More compact of the xml but not human readable - </summary> - </member> - <member name="T:DevAge.Data.BinaryDataSetInvalidException"> - <summary> - Binary data not valid exception - </summary> - </member> - <member name="M:DevAge.Data.BinaryDataSetInvalidException.#ctor"> - <summary> - Constructor - </summary> - </member> - <member name="M:DevAge.Data.BinaryDataSetInvalidException.#ctor(System.Exception)"> - <summary> - Constructor - </summary> - <param name="p_InnerException"></param> - </member> - <member name="T:DevAge.Data.BinaryDataSetVersionException"> - <summary> - Version not valid exception - </summary> - </member> - <member name="M:DevAge.Data.BinaryDataSetVersionException.#ctor"> - <summary> - Constructor - </summary> - </member> - <member name="M:DevAge.Data.BinaryDataSetVersionException.#ctor(System.Exception)"> - <summary> - Constructor - </summary> - <param name="p_InnerException"></param> - </member> - <member name="T:DevAge.Configuration.CommandLineArgs"> - <summary> - Description résumée de Arguments. - </summary> - </member> - <member name="T:DevAge.ComponentModel.Converter.PercentTypeConverter"> - <summary> - A TypeConverter that support string conversion from and to string with the percent symbol. - Support Conversion for Float, Double and Decimal - </summary> - </member> - <member name="P:DevAge.ComponentModel.Converter.PercentTypeConverter.ConsiderAllStringAsPercent"> - <summary> - If true and the user insert a string with no percent symbel the value is divided by 100, otherwise not. - </summary> - </member> - <member name="T:DevAge.Text.FixedLength.LineWriter"> - <summary> - A class used to create fixed lenght string. - </summary> - </member> - <member name="T:DevAge.IO.StreamPersistence"> - <summary> - A static class to help save and read stream data - </summary> - </member> - <member name="T:DevAge.Configuration.PersistableItemDictionary"> - <summary> - A dictionary with keys of type String and values of type PersistableItem - </summary> - </member> - <member name="M:DevAge.Configuration.PersistableItemDictionary.#ctor"> - <summary> - Initializes a new empty instance of the PersistableItemDictionary class - </summary> - </member> - <member name="M:DevAge.Configuration.PersistableItemDictionary.Add(System.String,DevAge.Configuration.PersistableItem)"> - <summary> - Adds an element with the specified key and value to this PersistableItemDictionary. - </summary> - <param name="key"> - The String key of the element to add. - </param> - <param name="value"> - The PersistableItem value of the element to add. - </param> - </member> - <member name="M:DevAge.Configuration.PersistableItemDictionary.Contains(System.String)"> - <summary> - Determines whether this PersistableItemDictionary contains a specific key. - </summary> - <param name="key"> - The String key to locate in this PersistableItemDictionary. - </param> - <returns> - true if this PersistableItemDictionary contains an element with the specified key; - otherwise, false. - </returns> - </member> - <member name="M:DevAge.Configuration.PersistableItemDictionary.ContainsKey(System.String)"> - <summary> - Determines whether this PersistableItemDictionary contains a specific key. - </summary> - <param name="key"> - The String key to locate in this PersistableItemDictionary. - </param> - <returns> - true if this PersistableItemDictionary contains an element with the specified key; - otherwise, false. - </returns> - </member> - <member name="M:DevAge.Configuration.PersistableItemDictionary.ContainsValue(DevAge.Configuration.PersistableItem)"> - <summary> - Determines whether this PersistableItemDictionary contains a specific value. - </summary> - <param name="value"> - The PersistableItem value to locate in this PersistableItemDictionary. - </param> - <returns> - true if this PersistableItemDictionary contains an element with the specified value; - otherwise, false. - </returns> - </member> - <member name="M:DevAge.Configuration.PersistableItemDictionary.Remove(System.String)"> - <summary> - Removes the element with the specified key from this PersistableItemDictionary. - </summary> - <param name="key"> - The String key of the element to remove. - </param> - </member> - <member name="P:DevAge.Configuration.PersistableItemDictionary.Item(System.String)"> - <summary> - Gets or sets the PersistableItem associated with the given String - </summary> - <param name="key"> - The String whose value to get or set. - </param> - </member> - <member name="P:DevAge.Configuration.PersistableItemDictionary.Keys"> - <summary> - Gets a collection containing the keys in this PersistableItemDictionary. - </summary> - </member> - <member name="P:DevAge.Configuration.PersistableItemDictionary.Values"> - <summary> - Gets a collection containing the values in this PersistableItemDictionary. - </summary> - </member> - <member name="T:DevAge.ComponentModel.Converter.CurrencyTypeConverter"> - <summary> - A TypeConverter that support string conversion from and to string with the currency symbol. - Support Conversion for Float, Double and Decimal, Int - </summary> - </member> - <member name="T:DevAge.ComponentModel.Converter.NumberTypeConverter"> - <summary> - A TypeConverter that support string conversion from and to string with a custom format number. - Support Conversion for Float, Double and Decimal, Int - </summary> - </member> - <member name="T:DevAge.Text.FixedLength.FieldList"> - <summary> - A dictionary with keys of type string and values of type IField - </summary> - </member> - <member name="M:DevAge.Text.FixedLength.FieldList.#ctor"> - <summary> - Initializes a new empty instance of the FieldList class - </summary> - </member> - <member name="M:DevAge.Text.FixedLength.FieldList.Add(DevAge.Text.FixedLength.IField)"> - <summary> - Adds an element with the specified key and value to this FieldList. - </summary> - <param name="key"> - The string key of the element to add. - </param> - <param name="value"> - The IField value of the element to add. - </param> - </member> - <member name="M:DevAge.Text.FixedLength.FieldList.Contains(System.String)"> - <summary> - Determines whether this FieldList contains a specific key. - </summary> - <param name="fieldName"> - The string key to locate in this FieldList. - </param> - <returns> - true if this FieldList contains an element with the specified key; - otherwise, false. - </returns> - </member> - <member name="M:DevAge.Text.FixedLength.FieldList.ContainsKey(System.String)"> - <summary> - Determines whether this FieldList contains a specific key. - </summary> - <param name="key"> - The string key to locate in this FieldList. - </param> - <returns> - true if this FieldList contains an element with the specified key; - otherwise, false. - </returns> - </member> - <member name="M:DevAge.Text.FixedLength.FieldList.ContainsValue(DevAge.Text.FixedLength.IField)"> - <summary> - Determines whether this FieldList contains a specific value. - </summary> - <param name="value"> - The IField value to locate in this FieldList. - </param> - <returns> - true if this FieldList contains an element with the specified value; - otherwise, false. - </returns> - </member> - <member name="M:DevAge.Text.FixedLength.FieldList.Remove(System.String)"> - <summary> - Removes the element with the specified key from this FieldList. - </summary> - <param name="fieldName"> - The string key of the element to remove. - </param> - </member> - <member name="P:DevAge.Text.FixedLength.FieldList.Item(System.String)"> - <summary> - Gets or sets the IField associated with the given string - </summary> - <param name="key"> - The string whose value to get or set. - </param> - </member> - <member name="P:DevAge.Text.FixedLength.FieldList.Keys"> - <summary> - Gets a collection containing the keys in this FieldList. - </summary> - </member> - <member name="P:DevAge.Text.FixedLength.FieldList.Values"> - <summary> - Gets a collection containing the values in this FieldList. - </summary> - </member> - <member name="T:DevAge.Shell.Utilities"> - <summary> - Shell utilities - </summary> - </member> - <member name="T:DevAge.Patterns.ActivityCanceledException"> - <summary> - Exception fired when canceling an activity with the Cancel method. - </summary> - </member> - <member name="M:DevAge.Patterns.ActivityCanceledException.#ctor"> - <summary> - Constructor - </summary> - </member> - <member name="T:DevAge.Patterns.ActivityStatusNotValidException"> - <summary> - Exception fired when canceling an activity with the Cancel method. - </summary> - </member> - <member name="M:DevAge.Patterns.ActivityStatusNotValidException.#ctor"> - <summary> - Constructor - </summary> - </member> - <member name="T:DevAge.Patterns.TimeOutActivityException"> - <summary> - Exception fired when a time out is encountered. - </summary> - </member> - <member name="M:DevAge.Patterns.TimeOutActivityException.#ctor"> - <summary> - Constructor - </summary> - </member> - <member name="T:DevAge.Patterns.SubActivityException"> - <summary> - Exception fired when a time out is encountered. - </summary> - </member> - <member name="M:DevAge.Patterns.SubActivityException.#ctor(System.String,System.Exception)"> - <summary> - Constructor - </summary> - <param name="activityName"></param> - <param name="innerException"></param> - </member> - <member name="T:DevAge.IO.IsolatedStorage.IsolatedStorageSettingBase"> - <summary> - Abstract class that help to save settings in the isolated storage - </summary> - </member> - <member name="T:DevAge.ComponentModel.Validator.ValidatorTypeConverter"> - <summary> - A string editor that use a TypeConverter for conversion. - </summary> - </member> - <member name="T:DevAge.ComponentModel.Validator.ValidatorBase"> - <summary> - A base class to support value conversion and validation. This class is used if no conversion is required or as a base class for specialized validator. - Naming Legend: - Object = an object not yet converted for the current validator, - Value = an object already converted and valid for the current validator, - String = a string that can be used for conversion to and from Value, - DisplayString = a string representation of the Value - </summary> - </member> - <member name="T:DevAge.ComponentModel.ComponentLight"> - <summary> - A IComponent implementation, used as a base class for component derived class. It is similar to the System Component class but doesn't derive from MarshalByRef class, for this reason it is faster and consume less resources. - Can be serialized. - </summary> - </member> - <member name="M:DevAge.ComponentModel.ComponentLight.#ctor"> - <summary> - Default constructor - </summary> - </member> - <member name="M:DevAge.ComponentModel.ComponentLight.#ctor(DevAge.ComponentModel.ComponentLight)"> - <summary> - Copy constructor - </summary> - <param name="other"></param> - </member> - <member name="T:DevAge.ComponentModel.Validator.IValidator"> - <summary> - An interface to support value conversion and validation. - Naming Legend: - Object = an object not yet converted for the current validator, - Value = an object already converted and valid for the current validator, - String = a string that can be used for conversion to and from Value, - DisplayString = a string representation of the Value - </summary> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.IsNullString(System.String)"> - <summary> - Returns true if the string is null or if is equals to the NullString - </summary> - <param name="p_str"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.ObjectToValue(System.Object)"> - <summary> - Convert an object according to the current ValueType of the validator - </summary> - <param name="p_Object"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToObject(System.Object,System.Type)"> - <summary> - Convert a value valid for the current validator ValueType to an object with the Type specified. Throw an exception on error. - </summary> - <param name="p_Value"></param> - <param name="p_ReturnObjectType"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToString(System.Object)"> - <summary> - Convert a value valid for the current validator ValueType to a string that can be used for other conversions, for example StringToValue method. - </summary> - <param name="p_Value"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.StringToValue(System.String)"> - <summary> - Converts a string to an object according to the type of the string editor - </summary> - <param name="p_str"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.IsStringConversionSupported"> - <summary> - Returns true if string conversion is suported. AllowStringConversion must be true and the current Validator must support string conversion. - </summary> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToDisplayString(System.Object)"> - <summary> - Converts a value valid for this validator valuetype to a string representation. The string cannot be used for conversion. - If the validator support string conversion this method simply call ValueToString otherwise call Value.ToString() - </summary> - <param name="p_Value"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidValue(System.Object)"> - <summary> - Returns true if the value is valid for this type of editor without any conversion. - </summary> - <param name="p_Value"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidObject(System.Object)"> - <summary> - Returns true if the object is valid for this type of validator, using conversion functions. - </summary> - <param name="p_Object"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidObject(System.Object,System.Object@)"> - <summary> - Returns true if the object is valid for this type of validator, using conversion functions. Returns as parameter the value converted. - </summary> - <param name="p_Object"></param> - <param name="p_ValueConverted"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidString(System.String)"> - <summary> - Returns true if the string is valid for this type of editor, using string conversion function. - </summary> - <param name="p_strValue"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidString(System.String,System.Object@)"> - <summary> - Returns true if the string is valid for this type of editor, using string conversion function. An returns the object converted. - </summary> - <param name="p_strValue"></param> - <param name="p_ValueConverted"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.IsInStandardValues(System.Object)"> - <summary> - Returns true if the value specified is presents in the list StandardValues. - </summary> - <param name="p_Value"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.StandardValueAtIndex(System.Int32)"> - <summary> - Returns the standard values at the specified index. If StandardValues support IList use simple the indexer method otherwise loop troght the collection. - </summary> - <param name="p_Index"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.IValidator.StandardValuesIndexOf(System.Object)"> - <summary> - Returns the index of the specified standard value. -1 if not found. If StandardValues support IList use simple the indexer method otherwise loop troght the collection. - </summary> - <param name="p_StandardValue"></param> - <returns></returns> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.AllowNull"> - <summary> - True to allow null object value or NullString string Value - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.NullString"> - <summary> - Null string representation. A string is null when is null or when is equals to this string. Default is empty string. - Used by ValueToString and StringToValue - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.NullDisplayString"> - <summary> - Null string representation. A string is null when is null or when is equals to this string. Default is empty string. - Used by ValueToDisplayString - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.AllowStringConversion"> - <summary> - Gets or Sets if the string conversion is allowed. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.MinimumValue"> - <summary> - Minimum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.MaximumValue"> - <summary> - Maximum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.ValueType"> - <summary> - Type allowed for the current editor. Cannot be null. - </summary> - </member> - <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingObjectToValue"> - <summary> - Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject - </summary> - </member> - <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingValueToObject"> - <summary> - Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject - </summary> - </member> - <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingValueToDisplayString"> - <summary> - Fired when converting a value to a display string. Called from method ValueToDisplayString - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.DefaultValue"> - <summary> - Default value for this editor, usually is the default value for the specified type. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.StandardValues"> - <summary> - A list of values that this editor can support. If StandardValuesExclusive is true then the editor can only support one of these values. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.StandardValuesExclusive"> - <summary> - If StandardValuesExclusive is true then the editor can only support the list specified in StandardValues. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.IValidator.CultureInfo"> - <summary> - Culture for conversion. If null the default user culture is used. Default is null. - </summary> - </member> - <member name="E:DevAge.ComponentModel.Validator.IValidator.Changed"> - <summary> - Fired when one of the properties of the Validator change. - </summary> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.#ctor"> - <summary> - Constructor. Initialize the class using a null type. - </summary> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.#ctor(System.Type)"> - <summary> - Constructor. - </summary> - <param name="type">The type used to validate the values. If null no validation is made.</param> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsNullString(System.String)"> - <summary> - Returns true if the string is null or if is equals to the NullString - </summary> - <param name="p_str"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ObjectToStringForError(System.Object)"> - <summary> - Returns a string used for error description for a specified object. Usually used when printing the object for the error message when there is a conversion error. - </summary> - <param name="val"></param> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ObjectToValue(System.Object)"> - <summary> - Convert an object according to the current ValueType of the validator - </summary> - <param name="p_Object"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToObject(System.Object,System.Type)"> - <summary> - Convert a value according to the current ValueType to an object with the Type specified. Throw an exception on error. - </summary> - <param name="p_Value"></param> - <param name="p_ReturnObjectType"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToString(System.Object)"> - <summary> - Converts a value object to a string representation - </summary> - <param name="p_Value"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StringToValue(System.String)"> - <summary> - Converts a string to an object according to the type of the string editor - </summary> - <param name="p_str"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsStringConversionSupported"> - <summary> - Returns true if string conversion is suported. AllowStringConversion must be true and the current Validator must support string conversion. - </summary> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToDisplayString(System.Object)"> - <summary> - Converts a value valid for this validator valuetype to a string representation. The string cannot be used for conversion. - If the validator support string conversion this method simply call ValueToString otherwise call Value.ToString() - </summary> - <param name="p_Value"></param> - <returns></returns> - </member> - <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingObjectToValue"> - <summary> - Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject - </summary> - </member> - <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingValueToObject"> - <summary> - Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject - </summary> - </member> - <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingValueToDisplayString"> - <summary> - Fired when converting a value to a display string. Called from method ValueToDisplayString - </summary> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingObjectToValue(DevAge.ComponentModel.ConvertingObjectEventArgs)"> - <summary> - Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject - </summary> - <param name="e"></param> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingValueToObject(DevAge.ComponentModel.ConvertingObjectEventArgs)"> - <summary> - Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject - </summary> - <param name="e"></param> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingValueToDisplayString(DevAge.ComponentModel.ConvertingObjectEventArgs)"> - <summary> - Fired when converting a value to a display string. Called from method ValueToDisplayString - </summary> - <param name="e"></param> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidValue(System.Object)"> - <summary> - Returns true if the value is valid for this type of editor without any conversion. - </summary> - <param name="p_Value"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidObject(System.Object)"> - <summary> - Returns true if the object is valid for this type of validator, using conversion functions. - </summary> - <param name="p_Object"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidObject(System.Object,System.Object@)"> - <summary> - Returns true if the object is valid for this type of validator, using conversion functions. Returns as parameter the value converted. - </summary> - <param name="p_Object"></param> - <param name="p_ValueConverted"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidString(System.String)"> - <summary> - Returns true if the string is valid for this type of editor, using string conversion function. - </summary> - <param name="p_strValue"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidString(System.String,System.Object@)"> - <summary> - Returns true if the string is valid for this type of editor, using string conversion function. Returns as out parameter the object converted. - </summary> - <param name="p_strValue"></param> - <param name="p_ValueConverted"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsInStandardValues(System.Object)"> - <summary> - Returns true if the value specified is presents in the list StandardValues. - </summary> - <param name="p_Value"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StandardValueAtIndex(System.Int32)"> - <summary> - Returns the standard values at the specified index. If StandardValues support IList use simple the indexer method otherwise loop troght the collection. - </summary> - <param name="p_Index"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StandardValuesIndexOf(System.Object)"> - <summary> - Returns the index of the specified standard value. -1 if not found. If StandardValues support IList use simple the indexer method otherwise loop troght the collection. - </summary> - <param name="p_StandardValue"></param> - <returns></returns> - </member> - <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnChanged(System.EventArgs)"> - <summary> - Fired when one of the properties of the Validator change. - Call the Changed event. - </summary> - <param name="e"></param> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.AllowNull"> - <summary> - True to allow null object value or NullString string Value - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.NullString"> - <summary> - Null string representation. A string is null when is null or when is equals to this string. Default is empty string. - Used by ValueToString and StringToValue - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.NullDisplayString"> - <summary> - Null string representation. Default is empty string. - Used by ValueToDisplayString - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.AllowStringConversion"> - <summary> - Gets or Sets if the string conversion is allowed. - </summary> - </member> - <member name="E:DevAge.ComponentModel.Validator.ValidatorBase.ConvertingObjectToValue"> - <summary> - Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject - </summary> - </member> - <member name="E:DevAge.ComponentModel.Validator.ValidatorBase.ConvertingValueToObject"> - <summary> - Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject - </summary> - </member> - <member name="E:DevAge.ComponentModel.Validator.ValidatorBase.ConvertingValueToDisplayString"> - <summary> - Fired when converting a value to a display string. Called from method ValueToDisplayString - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.MinimumValue"> - <summary> - Minimum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.MaximumValue"> - <summary> - Maximum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.ValueType"> - <summary> - Type allowed for the current editor. Cannot be null. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.ValueTypeName"> - <summary> - Set the ValueType property using a string value, usually used by designer code generation. - The designer for this type is configured to use only this property. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.DefaultValue"> - <summary> - Default value for this editor, usually is the default value for the specified type. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.StandardValues"> - <summary> - A list of values that this editor can support. If StandardValuesExclusive is true then the editor can only support one of these values. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.StandardValuesExclusive"> - <summary> - If StandardValuesExclusive is true then the editor can only support the list specified in StandardValues. - </summary> - </member> - <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.CultureInfo"> - <summary> - Culture for conversion. If null the default user culture is used. Default is null. - </summary> - </member> - <member name="E:DevAge.ComponentModel.Validator.ValidatorBase.Changed"> - <summary> - Fired when one of the properties of the Validator change. - </summary> - </member> - <member name="M:DevAge.ComponentModel.Validator.Validator... [truncated message content] |
From: <nor...@us...> - 2007-06-10 17:38:15
|
Revision: 506 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=506&view=rev Author: northern_sky Date: 2007-06-10 10:38:13 -0700 (Sun, 10 Jun 2007) Log Message: ----------- small cosmetic change Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-06-10 17:37:16 UTC (rev 505) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-06-10 17:38:13 UTC (rev 506) @@ -55,6 +55,12 @@ // this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); // + // applicationArgumentsTextBox + // + this.toolTip.SetToolTip(this.applicationArgumentsTextBox, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + + "%FILE% if the filename needs to be placed in some specific place between several" + + " arguments)"); + // // winStyleComboBox // this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + @@ -79,7 +85,7 @@ // this.progressBar.Location = new System.Drawing.Point(0, 97); this.progressBar.Name = "progressBar"; - this.progressBar.Size = new System.Drawing.Size(350, 31); + this.progressBar.Size = new System.Drawing.Size(480, 31); this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.progressBar.TabIndex = 35; // @@ -89,7 +95,7 @@ this.progressTextBox.Multiline = true; this.progressTextBox.Name = "progressTextBox"; this.progressTextBox.ReadOnly = true; - this.progressTextBox.Size = new System.Drawing.Size(347, 47); + this.progressTextBox.Size = new System.Drawing.Size(477, 47); this.progressTextBox.TabIndex = 34; // // AppFilesImportProgress @@ -99,11 +105,8 @@ this.Controls.Add(this.progressTextBox); this.Controls.Add(this.progressBar); this.Name = "AppFilesImportProgress"; - this.Size = new System.Drawing.Size(497, 550); this.Load += new System.EventHandler(this.AppFilesImportProgress_Load); this.Controls.SetChildIndex(this.prePostButton, 0); - this.Controls.SetChildIndex(this.progressBar, 0); - this.Controls.SetChildIndex(this.progressTextBox, 0); this.Controls.SetChildIndex(this.winTypeLabel, 0); this.Controls.SetChildIndex(this.enabledCheckbox, 0); this.Controls.SetChildIndex(this.titleLabel, 0); @@ -126,6 +129,8 @@ this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); this.Controls.SetChildIndex(this.informationLabel, 0); this.Controls.SetChildIndex(this.applicationExeTextBox, 0); + this.Controls.SetChildIndex(this.progressBar, 0); + this.Controls.SetChildIndex(this.progressTextBox, 0); this.ResumeLayout(false); this.PerformLayout(); 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: <an...@us...> - 2007-06-10 17:28:50
|
Revision: 504 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=504&view=rev Author: and-81 Date: 2007-06-10 10:28:47 -0700 (Sun, 10 Jun 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-06-10 08:51:02 UTC (rev 503) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-06-10 17:28:47 UTC (rev 504) @@ -33,22 +33,16 @@ this.buttonOK = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); this.toolTips = new System.Windows.Forms.ToolTip(this.components); - this.buttonConfigureTransceiver = new System.Windows.Forms.Button(); - this.textBoxPlugin = new System.Windows.Forms.TextBox(); this.checkBoxRunAtBoot = new System.Windows.Forms.CheckBox(); this.radioButtonServer = new System.Windows.Forms.RadioButton(); this.radioButtonRelay = new System.Windows.Forms.RadioButton(); this.radioButtonRepeater = new System.Windows.Forms.RadioButton(); - this.listViewTransceiver = new System.Windows.Forms.ListView(); - this.columnHeaderTransceiver = new System.Windows.Forms.ColumnHeader(); - this.columnHeaderCanReceive = new System.Windows.Forms.ColumnHeader(); - this.columnHeaderCanTransmit = new System.Windows.Forms.ColumnHeader(); this.groupBoxTransceiver = new System.Windows.Forms.GroupBox(); + this.gridPlugins = new SourceGrid.Grid(); this.groupBoxMode = new System.Windows.Forms.GroupBox(); this.labelComputer = new System.Windows.Forms.Label(); this.comboBoxComputer = new System.Windows.Forms.ComboBox(); this.buttonHelp = new System.Windows.Forms.Button(); - this.labelCurrentPlugin = new System.Windows.Forms.Label(); this.groupBoxTransceiver.SuspendLayout(); this.groupBoxMode.SuspendLayout(); this.SuspendLayout(); @@ -76,34 +70,6 @@ this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); // - // buttonConfigureTransceiver - // - this.buttonConfigureTransceiver.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonConfigureTransceiver.Enabled = false; - this.buttonConfigureTransceiver.Location = new System.Drawing.Point(344, 224); - this.buttonConfigureTransceiver.Name = "buttonConfigureTransceiver"; - this.buttonConfigureTransceiver.Size = new System.Drawing.Size(72, 24); - this.buttonConfigureTransceiver.TabIndex = 2; - this.buttonConfigureTransceiver.Text = "Configure"; - this.toolTips.SetToolTip(this.buttonConfigureTransceiver, "Configure the remote control transceiver"); - this.buttonConfigureTransceiver.UseVisualStyleBackColor = true; - this.buttonConfigureTransceiver.Click += new System.EventHandler(this.buttonConfigureTransceiver_Click); - // - // textBoxPlugin - // - this.textBoxPlugin.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxPlugin.BackColor = System.Drawing.SystemColors.ControlLight; - this.textBoxPlugin.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxPlugin.Location = new System.Drawing.Point(104, 224); - this.textBoxPlugin.Name = "textBoxPlugin"; - this.textBoxPlugin.ReadOnly = true; - this.textBoxPlugin.Size = new System.Drawing.Size(232, 24); - this.textBoxPlugin.TabIndex = 1; - this.textBoxPlugin.Text = "None set"; - this.textBoxPlugin.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.toolTips.SetToolTip(this.textBoxPlugin, "Currently selected Remote Transceiver"); - // // checkBoxRunAtBoot // this.checkBoxRunAtBoot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -151,56 +117,12 @@ this.radioButtonRepeater.UseVisualStyleBackColor = true; this.radioButtonRepeater.CheckedChanged += new System.EventHandler(this.radioButtonRepeater_CheckedChanged); // - // listViewTransceiver - // - this.listViewTransceiver.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.listViewTransceiver.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeaderTransceiver, - this.columnHeaderCanReceive, - this.columnHeaderCanTransmit}); - this.listViewTransceiver.FullRowSelect = true; - this.listViewTransceiver.GridLines = true; - this.listViewTransceiver.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.listViewTransceiver.HideSelection = false; - this.listViewTransceiver.Location = new System.Drawing.Point(8, 24); - this.listViewTransceiver.MultiSelect = false; - this.listViewTransceiver.Name = "listViewTransceiver"; - this.listViewTransceiver.ShowGroups = false; - this.listViewTransceiver.ShowItemToolTips = true; - this.listViewTransceiver.Size = new System.Drawing.Size(408, 192); - this.listViewTransceiver.TabIndex = 0; - this.listViewTransceiver.UseCompatibleStateImageBehavior = false; - this.listViewTransceiver.View = System.Windows.Forms.View.Details; - this.listViewTransceiver.DoubleClick += new System.EventHandler(this.listViewTransceiver_DoubleClick); - // - // columnHeaderTransceiver - // - this.columnHeaderTransceiver.Text = "Name"; - this.columnHeaderTransceiver.Width = 240; - // - // columnHeaderCanReceive - // - this.columnHeaderCanReceive.Text = "Receiver"; - this.columnHeaderCanReceive.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.columnHeaderCanReceive.Width = 70; - // - // columnHeaderCanTransmit - // - this.columnHeaderCanTransmit.Text = "Blaster"; - this.columnHeaderCanTransmit.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.columnHeaderCanTransmit.Width = 70; - // // groupBoxTransceiver // this.groupBoxTransceiver.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.groupBoxTransceiver.Controls.Add(this.labelCurrentPlugin); - this.groupBoxTransceiver.Controls.Add(this.textBoxPlugin); - this.groupBoxTransceiver.Controls.Add(this.listViewTransceiver); - this.groupBoxTransceiver.Controls.Add(this.buttonConfigureTransceiver); + this.groupBoxTransceiver.Controls.Add(this.gridPlugins); this.groupBoxTransceiver.Location = new System.Drawing.Point(8, 8); this.groupBoxTransceiver.Name = "groupBoxTransceiver"; this.groupBoxTransceiver.Size = new System.Drawing.Size(424, 256); @@ -208,6 +130,22 @@ this.groupBoxTransceiver.TabStop = false; this.groupBoxTransceiver.Text = "Device plugin"; // + // gridPlugins + // + this.gridPlugins.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.gridPlugins.BackColor = System.Drawing.SystemColors.Window; + this.gridPlugins.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.gridPlugins.Location = new System.Drawing.Point(16, 24); + this.gridPlugins.Name = "gridPlugins"; + this.gridPlugins.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; + this.gridPlugins.SelectionMode = SourceGrid.GridSelectionMode.Row; + this.gridPlugins.Size = new System.Drawing.Size(392, 216); + this.gridPlugins.TabIndex = 0; + this.gridPlugins.TabStop = true; + this.gridPlugins.ToolTipText = ""; + // // groupBoxMode // this.groupBoxMode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) @@ -230,7 +168,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.labelComputer.Location = new System.Drawing.Point(160, 24); this.labelComputer.Name = "labelComputer"; - this.labelComputer.Size = new System.Drawing.Size(256, 64); + this.labelComputer.Size = new System.Drawing.Size(248, 64); this.labelComputer.TabIndex = 3; this.labelComputer.Text = "Button Relay / IR Repeater mode host computer:"; this.labelComputer.TextAlign = System.Drawing.ContentAlignment.BottomLeft; @@ -245,7 +183,7 @@ this.comboBoxComputer.FormattingEnabled = true; this.comboBoxComputer.Location = new System.Drawing.Point(160, 88); this.comboBoxComputer.Name = "comboBoxComputer"; - this.comboBoxComputer.Size = new System.Drawing.Size(256, 21); + this.comboBoxComputer.Size = new System.Drawing.Size(248, 21); this.comboBoxComputer.TabIndex = 4; // // buttonHelp @@ -259,16 +197,6 @@ this.buttonHelp.UseVisualStyleBackColor = true; this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click); // - // labelCurrentPlugin - // - this.labelCurrentPlugin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.labelCurrentPlugin.Location = new System.Drawing.Point(8, 224); - this.labelCurrentPlugin.Name = "labelCurrentPlugin"; - this.labelCurrentPlugin.Size = new System.Drawing.Size(96, 24); - this.labelCurrentPlugin.TabIndex = 3; - this.labelCurrentPlugin.Text = "Current plugin:"; - this.labelCurrentPlugin.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // Config // this.AcceptButton = this.buttonOK; @@ -287,9 +215,7 @@ this.Name = "Config"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "IR Server - Configuration"; - this.Load += new System.EventHandler(this.Config_Load); this.groupBoxTransceiver.ResumeLayout(false); - this.groupBoxTransceiver.PerformLayout(); this.groupBoxMode.ResumeLayout(false); this.ResumeLayout(false); @@ -301,12 +227,6 @@ private System.Windows.Forms.Button buttonCancel; private System.Windows.Forms.ToolTip toolTips; private System.Windows.Forms.GroupBox groupBoxTransceiver; - private System.Windows.Forms.Button buttonConfigureTransceiver; - private System.Windows.Forms.ListView listViewTransceiver; - private System.Windows.Forms.ColumnHeader columnHeaderTransceiver; - private System.Windows.Forms.ColumnHeader columnHeaderCanReceive; - private System.Windows.Forms.ColumnHeader columnHeaderCanTransmit; - private System.Windows.Forms.TextBox textBoxPlugin; private System.Windows.Forms.GroupBox groupBoxMode; private System.Windows.Forms.CheckBox checkBoxRunAtBoot; private System.Windows.Forms.ComboBox comboBoxComputer; @@ -315,6 +235,6 @@ private System.Windows.Forms.RadioButton radioButtonServer; private System.Windows.Forms.RadioButton radioButtonRepeater; private System.Windows.Forms.Label labelComputer; - private System.Windows.Forms.Label labelCurrentPlugin; + private SourceGrid.Grid gridPlugins; } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-10 08:51:02 UTC (rev 503) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-10 17:28:47 UTC (rev 504) @@ -60,12 +60,67 @@ get { return comboBoxComputer.Text; } set { comboBoxComputer.Text = value; } } - public string Plugin + public string PluginReceive { - get { return textBoxPlugin.Text; } - set { textBoxPlugin.Text = value; } + get + { + SourceGrid.Cells.CheckBox checkBox; + for (int row = 1; row < gridPlugins.RowsCount; row++) + { + checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox; + if (checkBox != null && checkBox.Checked) + return gridPlugins[row, 0].DisplayText; + } + + return String.Empty; + } + set + { + SourceGrid.Cells.CheckBox checkBox; + for (int row = 1; row < gridPlugins.RowsCount; row++) + { + checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox; + if (checkBox == null) + continue; + + if (gridPlugins[row, 0].DisplayText.Equals(value, StringComparison.InvariantCultureIgnoreCase)) + checkBox.Checked = true; + else + checkBox.Checked = false; + } + } } + public string PluginTransmit + { + get + { + SourceGrid.Cells.CheckBox checkBox; + for (int row = 1; row < gridPlugins.RowsCount; row++) + { + checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox; + if (checkBox != null && checkBox.Checked) + return gridPlugins[row, 0].DisplayText; + } + return String.Empty; + } + set + { + SourceGrid.Cells.CheckBox checkBox; + for (int row = 1; row < gridPlugins.RowsCount; row++) + { + checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox; + if (checkBox == null) + continue; + + if (gridPlugins[row, 0].DisplayText.Equals(value, StringComparison.InvariantCultureIgnoreCase)) + checkBox.Checked = true; + else + checkBox.Checked = false; + } + } + } + #endregion Properties #region Constructor @@ -76,28 +131,13 @@ // Add transceivers to list ... _transceivers = Program.AvailablePlugins(); - - listViewTransceiver.Items.Clear(); - if (_transceivers == null || _transceivers.Length == 0) { MessageBox.Show(this, "No IR Server Plugins found!", "IR Server Configuration", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { - foreach (IIRServerPlugin transceiver in _transceivers) - { - ListViewItem listViewItem = new ListViewItem( - new string[] { - transceiver.Name, - transceiver.CanReceive.ToString(), - transceiver.CanTransmit.ToString() - }); - - listViewItem.ToolTipText = String.Format("{0}\nVersion: {1}\nAuthor: {2}\n{3}", transceiver.Name, transceiver.Version, transceiver.Author, transceiver.Description); - - listViewTransceiver.Items.Add(listViewItem); - } + CreateGrid(); } try @@ -115,17 +155,98 @@ if (computer != Environment.MachineName) comboBoxComputer.Items.Add(computer); } - } #endregion Constructor - private void Config_Load(object sender, EventArgs e) + void CreateGrid() { - if (_transceivers != null && !String.IsNullOrEmpty(textBoxPlugin.Text)) - foreach (IIRServerPlugin tx in _transceivers) - if (tx.Name == textBoxPlugin.Text) - buttonConfigureTransceiver.Enabled = tx.CanConfigure; + int row = 0; + gridPlugins.Rows.Clear(); + + gridPlugins.Columns.SetCount(4); + + gridPlugins.Rows.Insert(row); + SourceGrid.Cells.ColumnHeader headerCell; + + headerCell = new SourceGrid.Cells.ColumnHeader("Name"); + gridPlugins[row, 0] = headerCell; + + headerCell = new SourceGrid.Cells.ColumnHeader("Receive"); + gridPlugins[row, 1] = headerCell; + + headerCell = new SourceGrid.Cells.ColumnHeader("Transmit"); + gridPlugins[row, 2] = headerCell; + + headerCell = new SourceGrid.Cells.ColumnHeader("Configure"); + gridPlugins[row, 3] = headerCell; + + gridPlugins.FixedRows = 1; + + row++; + + foreach (IIRServerPlugin transceiver in _transceivers) + { + gridPlugins.Rows.Insert(row); + + SourceGrid.Cells.Cell nameCell = new SourceGrid.Cells.Cell(transceiver.Name); + + SourceGrid.Cells.Controllers.CustomEvents nameCellController = new SourceGrid.Cells.Controllers.CustomEvents(); + nameCellController.DoubleClick += new EventHandler(PluginDoubleClick); + nameCell.AddController(nameCellController); + + nameCell.ToolTipText = string.Format("{0}\nVersion: {1}\nAuthor: {2}\n{3}", transceiver.Name, transceiver.Version, transceiver.Author, transceiver.Description); + + gridPlugins[row, 0] = nameCell; + + if (transceiver.CanReceive) + { + SourceGrid.Cells.CheckBox checkbox = new SourceGrid.Cells.CheckBox(); + + SourceGrid.Cells.Controllers.CustomEvents checkboxcontroller = new SourceGrid.Cells.Controllers.CustomEvents(); + checkboxcontroller.ValueChanged += new EventHandler(ReceiveChanged); + checkbox.Controller.AddController(checkboxcontroller); + + gridPlugins[row, 1] = checkbox; + } + else + gridPlugins[row, 1] = new SourceGrid.Cells.Cell(); + + if (transceiver.CanTransmit) + { + SourceGrid.Cells.CheckBox checkbox = new SourceGrid.Cells.CheckBox(); + + SourceGrid.Cells.Controllers.CustomEvents checkboxcontroller = new SourceGrid.Cells.Controllers.CustomEvents(); + checkboxcontroller.ValueChanged += new EventHandler(TransmitChanged); + checkbox.Controller.AddController(checkboxcontroller); + + gridPlugins[row, 2] = checkbox; + } + else + gridPlugins[row, 2] = new SourceGrid.Cells.Cell(); + + if (transceiver.CanConfigure) + { + SourceGrid.Cells.Button button = new SourceGrid.Cells.Button("Configure"); + + SourceGrid.Cells.Controllers.Button buttonClickEvent = new SourceGrid.Cells.Controllers.Button(); + buttonClickEvent.Executed += new EventHandler(buttonClickEvent_Executed); + button.Controller.AddController(buttonClickEvent); + + gridPlugins[row, 3] = button; + } + else + gridPlugins[row, 3] = new SourceGrid.Cells.Cell(); + + row++; + } + + gridPlugins.Columns[0].AutoSizeMode = SourceGrid.AutoSizeMode.Default; + gridPlugins.Columns[1].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.Columns[2].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.Columns[3].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.AutoStretchColumnsToFitWidth = true; + gridPlugins.AutoSizeCells(); } #region Controls @@ -153,24 +274,64 @@ this.Close(); } - private void buttonConfigureTransceiver_Click(object sender, EventArgs e) + private void buttonClickEvent_Executed(object sender, EventArgs e) { - if (String.IsNullOrEmpty(textBoxPlugin.Text)) + SourceGrid.CellContext context = (SourceGrid.CellContext)sender; + SourceGrid.Cells.Button cell = (SourceGrid.Cells.Button)context.Cell; + + string plugin = gridPlugins[cell.Row.Index, 0].DisplayText; + + foreach (IIRServerPlugin transceiver in _transceivers) + if (transceiver.Name == plugin) + transceiver.Configure(); + } + + private void ReceiveChanged(object sender, EventArgs e) + { + SourceGrid.CellContext context = (SourceGrid.CellContext)sender; + SourceGrid.Cells.CheckBox cell = (SourceGrid.Cells.CheckBox)context.Cell; + + if (!cell.Checked) return; - foreach (IIRServerPlugin tx in _transceivers) - if (tx.Name == textBoxPlugin.Text) - if (tx.CanConfigure) - tx.Configure(); + string plugin = gridPlugins[cell.Row.Index, 0].DisplayText; + + for (int row = 1; row < gridPlugins.RowsCount; row++) + { + SourceGrid.Cells.CheckBox checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox; + if (checkBox != null && checkBox.Checked && !gridPlugins[row, 0].DisplayText.Equals(plugin, StringComparison.InvariantCultureIgnoreCase)) + checkBox.Checked = false; + } } + private void TransmitChanged(object sender, EventArgs e) + { + SourceGrid.CellContext context = (SourceGrid.CellContext)sender; + SourceGrid.Cells.CheckBox cell = (SourceGrid.Cells.CheckBox)context.Cell; - private void listViewTransceiver_DoubleClick(object sender, EventArgs e) + if (!cell.Checked) + return; + + string plugin = gridPlugins[cell.Row.Index, 0].DisplayText; + + for (int row = 1; row < gridPlugins.RowsCount; row++) + { + SourceGrid.Cells.CheckBox checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox; + if (checkBox != null && checkBox.Checked && !gridPlugins[row, 0].DisplayText.Equals(plugin, StringComparison.InvariantCultureIgnoreCase)) + checkBox.Checked = false; + } + } + private void PluginDoubleClick(object sender, EventArgs e) { - textBoxPlugin.Text = (sender as ListView).FocusedItem.Text; + SourceGrid.CellContext context = (SourceGrid.CellContext)sender; + SourceGrid.Cells.Cell cell = (SourceGrid.Cells.Cell)context.Cell; - foreach (IIRServerPlugin tx in _transceivers) - if (tx.Name == textBoxPlugin.Text) - buttonConfigureTransceiver.Enabled = tx.CanConfigure; + SourceGrid.Cells.CheckBox checkBoxReceive = gridPlugins[cell.Row.Index, 1] as SourceGrid.Cells.CheckBox; + if (checkBoxReceive != null) + checkBoxReceive.Checked = true; + + SourceGrid.Cells.CheckBox checkBoxTransmit = gridPlugins[cell.Row.Index, 2] as SourceGrid.Cells.CheckBox; + if (checkBoxTransmit != null) + checkBoxTransmit.Checked = true; } private void buttonHelp_Click(object sender, EventArgs e) @@ -185,23 +346,21 @@ } } - #endregion Controls - private void radioButtonServer_CheckedChanged(object sender, EventArgs e) { comboBoxComputer.Enabled = false; } - private void radioButtonRelay_CheckedChanged(object sender, EventArgs e) { comboBoxComputer.Enabled = true; } - private void radioButtonRepeater_CheckedChanged(object sender, EventArgs e) { comboBoxComputer.Enabled = true; } + #endregion Controls + } } Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-06-10 08:51:02 UTC (rev 503) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-06-10 17:28:47 UTC (rev 504) @@ -57,6 +57,18 @@ </DocumentationFile> </PropertyGroup> <ItemGroup> + <Reference Include="DevAge.Core, Version=4.6.2660.128, Culture=neutral, PublicKeyToken=faad465d84242dbf, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>SourceGrid\DevAge.Core.dll</HintPath> + </Reference> + <Reference Include="DevAge.Windows.Forms, Version=4.6.2660.128, Culture=neutral, PublicKeyToken=faad465d84242dbf, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>SourceGrid\DevAge.Windows.Forms.dll</HintPath> + </Reference> + <Reference Include="SourceGrid, Version=4.7.2662.1973, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>SourceGrid\SourceGrid.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-10 08:51:02 UTC (rev 503) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-10 17:28:47 UTC (rev 504) @@ -68,9 +68,12 @@ string _localPipeName = String.Empty; bool _registered = false; - string _pluginName = String.Empty; - IIRServerPlugin _plugin = null; + string _pluginNameReceive = String.Empty; + IIRServerPlugin _pluginReceive = null; + string _pluginNameTransmit = String.Empty; + IIRServerPlugin _pluginTransmit = null; + bool _inConfiguration = false; #endregion Variables @@ -86,8 +89,6 @@ _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("&Quit", null, new EventHandler(ClickQuit))); _notifyIcon.Icon = Properties.Resources.Icon16; _notifyIcon.Text = "IR Server"; - - } #endregion Constructor @@ -97,30 +98,36 @@ /// <summary> /// Start the server /// </summary> - /// <returns>returns true if successful</returns> + /// <returns>success</returns> internal bool Start() { try { - IrssLog.Debug("Starting IR Server ..."); + IrssLog.Info("Starting IR Server ..."); LoadSettings(); - // Try to load the IR Plugin, if it fails (for whatever reason) then run configuration. - _plugin = null; - while (_plugin == null) + // Load IR Plugins ... + _pluginReceive = null; + _pluginTransmit = null; + + if (String.IsNullOrEmpty(_pluginNameReceive) && String.IsNullOrEmpty(_pluginNameTransmit)) { - _plugin = Program.GetPlugin(_pluginName); + IrssLog.Warn("No transmit/receive plugin loaded"); + } + else + { + if (!String.IsNullOrEmpty(_pluginNameReceive)) + _pluginReceive = Program.GetPlugin(_pluginNameReceive); + else + IrssLog.Warn("No receiver plugin loaded"); - if (_plugin == null) - { - IrssLog.Warn("Failed to load plugin \"{0}\"", _pluginName); - - if (Configure()) - SaveSettings(); - else - return false; - } + if (_pluginNameTransmit.Equals(_pluginNameReceive, StringComparison.InvariantCultureIgnoreCase)) + _pluginTransmit = _pluginReceive; + else if (!String.IsNullOrEmpty(_pluginNameTransmit)) + _pluginTransmit = Program.GetPlugin(_pluginNameTransmit); + else + IrssLog.Warn("No transmit plugin loaded"); } StartMessageQueue(); @@ -166,32 +173,39 @@ } } - // Start transceiver ... - if (!_plugin.Start()) + // Start plugin(s) ... + if (_pluginReceive != null) { - IrssLog.Error("Failed to start transceiver plugin: \"{0}\"", _pluginName); - - if (PipeAccess.ServerRunning) - PipeAccess.StopServer(); - return false; + if (_pluginReceive.Start()) + IrssLog.Info("Receiver plugin started: \"{0}\"", _pluginNameReceive); + else + IrssLog.Error("Failed to start receive plugin: \"{0}\"", _pluginNameReceive); } + if (!_pluginNameTransmit.Equals(_pluginNameReceive, StringComparison.InvariantCultureIgnoreCase)) + { + if (_pluginTransmit != null) + { + if (_pluginTransmit.Start()) + IrssLog.Info("Transmit plugin started: \"{0}\"", _pluginNameTransmit); + else + IrssLog.Error("Failed to start transmit plugin: \"{0}\"", _pluginNameTransmit); + } + } - IrssLog.Info("Transceiver plugin started: \"{0}\"", _pluginName); + if (_pluginReceive != null && _pluginReceive.CanReceive) + _pluginReceive.RemoteButtonCallback += new RemoteButtonHandler(RemoteButtonPressed); - if (_plugin.CanReceive) - _plugin.RemoteButtonCallback += new RemoteButtonHandler(RemoteButtonPressed); - _notifyIcon.Visible = true; IrssLog.Info("IR Server started"); + + return true; } catch (Exception ex) { IrssLog.Error(ex.ToString()); return false; } - - return true; } /// <summary> @@ -203,18 +217,28 @@ _notifyIcon.Visible = false; - if (_plugin.CanReceive) - _plugin.RemoteButtonCallback -= new RemoteButtonHandler(RemoteButtonPressed); + if (_pluginReceive != null && _pluginReceive.CanReceive) + _pluginReceive.RemoteButtonCallback -= new RemoteButtonHandler(RemoteButtonPressed); - // Stop Plugin + // Stop Plugin(s) try { - _plugin.Stop(); + if (_pluginReceive != null) + _pluginReceive.Stop(); } catch (Exception ex) { IrssLog.Error(ex.ToString()); } + try + { + if (_pluginTransmit != null) + _pluginTransmit.Stop(); + } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + } // Stop Message Queue try @@ -257,18 +281,20 @@ try { - Config config = new Config(); - config.Mode = _mode; - config.HostComputer = _hostComputer; - config.Plugin = _pluginName; + Config config = new Config(); + config.Mode = _mode; + config.HostComputer = _hostComputer; + config.PluginReceive = _pluginNameReceive; + config.PluginTransmit = _pluginNameTransmit; if (config.ShowDialog() == DialogResult.OK) { - _mode = config.Mode; - _hostComputer = config.HostComputer; - _pluginName = config.Plugin; + _mode = config.Mode; + _hostComputer = config.HostComputer; + _pluginNameReceive = config.PluginReceive; + _pluginNameTransmit = config.PluginTransmit; - _inConfiguration = false; + _inConfiguration = false; return true; } @@ -726,16 +752,16 @@ { IrssLog.Debug("Blast IR"); - if (!_plugin.CanTransmit) + if (_pluginTransmit == null || !_pluginTransmit.CanTransmit) return false; int portLen = BitConverter.ToInt32(data, 0); if (portLen > 0) - _plugin.SetPort(Encoding.ASCII.GetString(data, 4, portLen)); + _pluginTransmit.SetPort(Encoding.ASCII.GetString(data, 4, portLen)); int speedLen = BitConverter.ToInt32(data, 4 + portLen); if (speedLen > 0) - _plugin.SetSpeed(Encoding.ASCII.GetString(data, 4 + portLen + 4, speedLen)); + _pluginTransmit.SetSpeed(Encoding.ASCII.GetString(data, 4 + portLen + 4, speedLen)); byte[] fileData = new byte[data.Length - (4 + portLen + 4 + speedLen)]; for (int index = (4 + portLen + 4 + speedLen); index < data.Length; index++) @@ -748,7 +774,7 @@ fileStream.Flush(); fileStream.Close(); - bool result = _plugin.Transmit(tempFile); + bool result = _pluginTransmit.Transmit(tempFile); File.Delete(tempFile); @@ -767,7 +793,7 @@ Thread.Sleep(500); - if (!_plugin.CanLearn) + if (_pluginTransmit == null || !_pluginTransmit.CanLearn) { IrssLog.Debug("Active transceiver doesn't support learn"); return null; @@ -780,7 +806,7 @@ { string tempFile = Path.GetTempFileName(); - LearnStatus status = _plugin.Learn(tempFile); + LearnStatus status = _pluginTransmit.Learn(tempFile); switch (status) { case LearnStatus.Success: @@ -948,16 +974,25 @@ { response.Name = received.Name + " Success"; - // Transceiver Info ... TransceiverInfo transceiverInfo = new TransceiverInfo(); - transceiverInfo.Name = _plugin.Name; - transceiverInfo.Ports = _plugin.AvailablePorts; - transceiverInfo.Speeds = _plugin.AvailableSpeeds; - transceiverInfo.CanConfigure = _plugin.CanConfigure; - transceiverInfo.CanLearn = _plugin.CanLearn; - transceiverInfo.CanReceive = _plugin.CanReceive; - transceiverInfo.CanTransmit = _plugin.CanTransmit; + if (_pluginReceive != null) + { + transceiverInfo.Name = _pluginReceive.Name; + transceiverInfo.CanReceive = _pluginReceive.CanReceive; + } + + if (_pluginTransmit != null) + { + if (String.IsNullOrEmpty(transceiverInfo.Name)) + transceiverInfo.Name = _pluginTransmit.Name; + + transceiverInfo.Ports = _pluginTransmit.AvailablePorts; + transceiverInfo.Speeds = _pluginTransmit.AvailableSpeeds; + transceiverInfo.CanLearn = _pluginTransmit.CanLearn; + transceiverInfo.CanTransmit = _pluginTransmit.CanTransmit; + } + response.Data = TransceiverInfo.ToBytes(transceiverInfo); } @@ -1032,13 +1067,13 @@ void ClickSetup(object sender, EventArgs e) { - IrssLog.Info("Setup"); - if (_inConfiguration) return; Stop(); + IrssLog.Info("Setup"); + if (Configure()) SaveSettings(); @@ -1046,11 +1081,11 @@ } void ClickQuit(object sender, EventArgs e) { - IrssLog.Info("Quit"); - if (_inConfiguration) return; + IrssLog.Info("Quit"); + if (_mode == IRServerMode.ServerMode) { PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Server Shutdown", null); @@ -1068,17 +1103,19 @@ XmlDocument doc = new XmlDocument(); doc.Load(ConfigurationFile); - _mode = (IRServerMode)Enum.Parse(typeof(IRServerMode), doc.DocumentElement.Attributes["Mode"].Value); - _hostComputer = doc.DocumentElement.Attributes["HostComputer"].Value; - _pluginName = doc.DocumentElement.Attributes["Plugin"].Value; + _mode = (IRServerMode)Enum.Parse(typeof(IRServerMode), doc.DocumentElement.Attributes["Mode"].Value); + _hostComputer = doc.DocumentElement.Attributes["HostComputer"].Value; + _pluginNameReceive = doc.DocumentElement.Attributes["PluginReceive"].Value; + _pluginNameTransmit = doc.DocumentElement.Attributes["PluginTransmit"].Value; } catch (Exception ex) { IrssLog.Error(ex.ToString()); - _mode = IRServerMode.ServerMode; - _hostComputer = String.Empty; - _pluginName = String.Empty; + _mode = IRServerMode.ServerMode; + _hostComputer = String.Empty; + _pluginNameReceive = String.Empty; + _pluginNameTransmit = String.Empty; } } void SaveSettings() @@ -1094,7 +1131,8 @@ writer.WriteAttributeString("Mode", Enum.GetName(typeof(IRServerMode), _mode)); writer.WriteAttributeString("HostComputer", _hostComputer); - writer.WriteAttributeString("Plugin", _pluginName); + writer.WriteAttributeString("PluginReceive", _pluginNameReceive); + writer.WriteAttributeString("PluginTransmit", _pluginNameTransmit); writer.WriteEndElement(); // </settings> writer.WriteEndDocument(); Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-06-10 08:51:02 UTC (rev 503) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-06-10 17:28:47 UTC (rev 504) @@ -17,7 +17,7 @@ { [STAThread] - static int Main() + static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); @@ -26,12 +26,12 @@ try { if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length != 1) - return 1; + return; } catch (Exception ex) { Console.WriteLine(ex.Message); - return 1; + return; } // Open log file @@ -46,27 +46,17 @@ catch (Exception ex) { Console.WriteLine(ex.Message); - return 1; + return; } // Start Server IRServer irServer = new IRServer(); if (irServer.Start()) - { Application.Run(); - IrssLog.Close(); - return 0; - } - else - { - MessageBox.Show("Failed to start IR Server, refer to log file for more details.", "IR Server", MessageBoxButtons.OK, MessageBoxIcon.Error); - - IrssLog.Close(); - return 1; - } - + IrssLog.Close(); + return; } /// <summary> Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs 2007-06-10 08:51:02 UTC (rev 503) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs 2007-06-10 17:28:47 UTC (rev 504) @@ -17,7 +17,6 @@ string[] _speeds; string _name; - bool _canConfigure; bool _canLearn; bool _canReceive; bool _canTransmit; @@ -54,15 +53,6 @@ } /// <summary> - /// Can this transceiver be configured. - /// </summary> - public bool CanConfigure - { - get { return _canConfigure; } - set { _canConfigure = value; } - } - - /// <summary> /// Can this transceiver learn IR Commands. /// </summary> public bool CanLearn @@ -98,8 +88,7 @@ _ports = new string[] { "None" }; _speeds = new string[] { "None" }; - _name = "Unknown"; - _canConfigure = false; + _name = String.Empty; _canLearn = false; _canReceive = false; _canTransmit = false; @@ -136,16 +125,15 @@ speeds.Append(','); } - string data = String.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8}", + string data = String.Format("{0},{1},{2},{3},{4},{5},{6},{7}", transceiverInfo.Name, // 0 - transceiverInfo.CanConfigure, // 1 - transceiverInfo.CanLearn, // 2 - transceiverInfo.CanReceive, // 3 - transceiverInfo.CanTransmit, // 4 - transceiverInfo.Ports.Length, // 5 - ports.ToString(), // 6 - transceiverInfo.Speeds.Length, // 7 - speeds.ToString() // 8 + transceiverInfo.CanLearn, // 1 + transceiverInfo.CanReceive, // 2 + transceiverInfo.CanTransmit, // 3 + transceiverInfo.Ports.Length, // 4 + ports.ToString(), // 5 + transceiverInfo.Speeds.Length, // 6 + speeds.ToString() // 7 ); return Encoding.ASCII.GetBytes(data); @@ -171,14 +159,13 @@ TransceiverInfo transceiverInfo = new TransceiverInfo(); transceiverInfo.Name = data[0]; - transceiverInfo.CanConfigure = bool.Parse(data[1]); - transceiverInfo.CanLearn = bool.Parse(data[2]); - transceiverInfo.CanReceive = bool.Parse(data[3]); - transceiverInfo.CanTransmit = bool.Parse(data[4]); + transceiverInfo.CanLearn = bool.Parse(data[1]); + transceiverInfo.CanReceive = bool.Parse(data[2]); + transceiverInfo.CanTransmit = bool.Parse(data[3]); int index; - int portIndex = 5; + int portIndex = 4; int portCount = int.Parse(data[portIndex]); transceiverInfo.Ports = new string[portCount]; for (index = portIndex + 1; index <= portIndex + portCount; index++) Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-06-10 08:51:02 UTC (rev 503) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-06-10 17:28:47 UTC (rev 504) @@ -105,9 +105,35 @@ _server.CommandEvent -= new WinLircServer.CommandEventHandler(CommandHandler); } - public bool Transmit(string file) { return false; } - public LearnStatus Learn(string file) { return LearnStatus.Failure; } + public bool Transmit(string file) + { + string password, remoteName, buttonName, repeats; + try + { + XmlDocument doc = new XmlDocument(); + doc.Load(file); + + password = doc.DocumentElement.Attributes["Password"].Value; + remoteName = doc.DocumentElement.Attributes["RemoteName"].Value; + buttonName = doc.DocumentElement.Attributes["ButtonName"].Value; + repeats = doc.DocumentElement.Attributes["Repeats"].Value; + + string output = String.Format("{0} {1} {2} {3}\n", password, remoteName, buttonName, repeats); + _server.Transmit(output); + + return true; + } + catch + { + return false; + } + } + public LearnStatus Learn(string file) + { + return LearnStatus.Failure; + } + public bool SetPort(string port) { return true; } public bool SetSpeed(string speed) { return true; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs 2007-06-10 08:51:02 UTC (rev 503) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs 2007-06-10 17:28:47 UTC (rev 504) @@ -33,6 +33,7 @@ namespace WinLircReceiver { + /// <summary> /// WinLIRC server class implementing communication with WinLIRC /// all remotes are supported as long as WinLIRC supports them @@ -115,6 +116,11 @@ return (processes.Length > 0); } + public void Transmit(string transmit) + { + _socket.Send(Encoding.ASCII.GetBytes(transmit)); + } + #endregion #region Private Methods @@ -223,4 +229,5 @@ } #endregion } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ze...@us...> - 2007-06-10 08:51:06
|
Revision: 503 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=503&view=rev Author: zebons Date: 2007-06-10 01:51:02 -0700 (Sun, 10 Jun 2007) Log Message: ----------- MyFilms v4.2.5 : - enhcements for DVDProfiler'DB use (SortTitle, Tags use) - no need to specify yhe movie filename in the ANT DB if those contain the Title movie Name. - some mods to skin BT (to be reported to others) Modified Paths: -------------- trunk/plugins/MyFilms/AssemblyInfo.cs trunk/plugins/MyFilms/CatalogConverter.cs trunk/plugins/MyFilms/MesFilms.cs trunk/plugins/MyFilms/MesFilmsDetail.cs trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs trunk/plugins/MyFilms/MesFilmsSetup.cs trunk/plugins/MyFilms/Properties/AssemblyInfo.cs trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml trunk/plugins/MyFilms/skin/BlueTwo/MesFilmsDetail.xml Modified: trunk/plugins/MyFilms/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyFilms/AssemblyInfo.cs 2007-06-10 08:33:09 UTC (rev 502) +++ trunk/plugins/MyFilms/AssemblyInfo.cs 2007-06-10 08:51:02 UTC (rev 503) @@ -31,5 +31,5 @@ // // Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de révision et de build par défaut // en utilisant '*', comme indiqué ci-dessous : -[assembly: AssemblyVersion("2.2.0.0")] -[assembly: AssemblyFileVersion("4.2.0.0")] +[assembly: AssemblyVersion("2.2.2.0")] +[assembly: AssemblyFileVersion("2.4.0.0")] Modified: trunk/plugins/MyFilms/CatalogConverter.cs =================================================================== --- trunk/plugins/MyFilms/CatalogConverter.cs 2007-06-10 08:33:09 UTC (rev 502) +++ trunk/plugins/MyFilms/CatalogConverter.cs 2007-06-10 08:51:02 UTC (rev 503) @@ -6,20 +6,21 @@ using MediaPortal.GUI.Library; using System.Windows.Forms; using System.Globalization; +using MediaPortal.Configuration; + namespace MesFilms { class CatalogConverter { public Dictionary<string, string> ProfilerDict; - public CatalogConverter() + public CatalogConverter(string TagField) { - ProfilerDict = new Dictionary<string, string>(); ProfilerDict.Add("Title", "OriginalTitle"); - ProfilerDict.Add("SortTitle", "TranslatedTitle"); - ProfilerDict.Add("SortTitle1", "FormattedTitle"); + ProfilerDict.Add("TTitle", "TranslatedTitle"); + ProfilerDict.Add("STitle", "FormattedTitle"); ProfilerDict.Add("CollectionNumber", "Number"); ProfilerDict.Add("Review/ReviewFilm", "Rating"); ProfilerDict.Add("Notes/File", "URL"); @@ -32,9 +33,11 @@ ProfilerDict.Add("Credits1", "Producer"); ProfilerDict.Add("Overview", "Description"); ProfilerDict.Add("Picture", "Picture"); + ProfilerDict.Add("Tag", TagField); } - - public string ConvertProfiler(string source, string folderimage) + public string TagFullName; + + public string ConvertProfiler(string source, string folderimage, bool SortTitle, string TagField) { //string destFile = Path.GetTempPath()+@"AntTempFile.xml"; //string destFile = source.Substring(0, source.Length - 4) + "_tmp.xml"; @@ -75,6 +78,7 @@ } XmlNode nodeTitle = nodeDVD.SelectSingleNode("Title"); XmlNode nodeOTitle = nodeDVD.SelectSingleNode("OriginalTitle"); + XmlNode nodeSTitle = nodeDVD.SelectSingleNode("SortTitle"); XmlNode nodeNotes = nodeDVD.SelectSingleNode("Notes"); XmlNode nodeYear = nodeDVD.SelectSingleNode("ProductionYear"); XmlNode nodeDuration = nodeDVD.SelectSingleNode("RunningTime"); @@ -101,6 +105,25 @@ if (genre.Length > 0) genre += ", "; genre += nodeGenre.InnerText; } + if (TagField.Length > 0) + { + XmlNodeList TagList = nodeDVD.SelectNodes("Tags/Tag"); + TagFullName = ""; + + foreach (XmlNode nodeTag in TagList) + { + if (nodeTag.Attributes["FullName"] != null && nodeTag.Attributes["FullName"].Value != null) + { + if (TagFullName.Length > 0) TagFullName += ", "; + TagFullName += nodeTag.Attributes["FullName"].Value; + } + } + if (TagField == "Category") + { + if (genre.Length > 0) genre += ", "; + genre += TagFullName; + } + } string cast = String.Empty; XmlNodeList actorsList = nodeDVD.SelectNodes("Actors/Actor"); foreach (XmlNode nodeActor in actorsList) @@ -199,8 +222,11 @@ WriteAntAtribute(destXml, "Title", nodeOTitle.InnerText); else WriteAntAtribute(destXml, "Title", nodeTitle.InnerText); - WriteAntAtribute(destXml, "SortTitle", nodeTitle.InnerText); - WriteAntAtribute(destXml, "SortTitle1", nodeTitle.InnerText); + WriteAntAtribute(destXml, "TTitle", nodeTitle.InnerText); + if (SortTitle) + WriteAntAtribute(destXml, "STitle", nodeSTitle.InnerText); + else + WriteAntAtribute(destXml, "STitle", nodeTitle.InnerText); WriteAntAtribute(destXml, "Notes/File", File); WriteAntAtribute(destXml, "Notes/Country", Country); WriteAntAtribute(destXml, "Review/ReviewFilm", Rating); @@ -211,6 +237,8 @@ WriteAntAtribute(destXml, "Credits1", Producer); WriteAntAtribute(destXml, "Actors", cast); WriteAntAtribute(destXml, "Picture", Image); + if ((TagField.Length > 0) && (TagField != "Category") && (TagFullName.Length > 0)) + WriteAntAtribute(destXml, "Tag", TagFullName); if (nodeOverview != null && nodeOverview.InnerText != null) WriteAntAtribute(destXml, "Overview", nodeOverview.InnerText); else Modified: trunk/plugins/MyFilms/MesFilms.cs =================================================================== --- trunk/plugins/MyFilms/MesFilms.cs 2007-06-10 08:33:09 UTC (rev 502) +++ trunk/plugins/MyFilms/MesFilms.cs 2007-06-10 08:51:02 UTC (rev 503) @@ -223,7 +223,7 @@ public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { string wPluginName = StrPluginName; - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { wPluginName = xmlreader.GetValueAsString("MyFilms", "PluginName", "My Films"); } @@ -265,6 +265,8 @@ { if (actionType.wID == Action.ActionType.ACTION_PARENT_DIR) if (GetPrevFilmList()) return; + + if ((actionType.wID == Action.ActionType.ACTION_PREVIOUS_MENU) && (boolselect)) { Change_LayOut(Layout); @@ -276,6 +278,8 @@ Change_view(WStrSort); return; } + if (actionType.wID == Action.ActionType.ACTION_PREVIOUS_MENU) + if (GetPrevFilmList()) return; base.OnAction(actionType); } //--------------------------------------------------------------------------------------- @@ -299,7 +303,7 @@ affich_overlay(); else supprim_overlay(); - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { if (PreviousWindowId == ID_MesFilmsDetail) { @@ -530,6 +534,12 @@ { GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(101)); facadeView.View = GUIFacadeControl.ViewMode.List; + // Layout = 3; + //} + //else if (Layout == 3) + //{ + // GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(733)); + // facadeView.View = GUIFacadeControl.ViewMode.Filmstrip; Layout = 0; } else @@ -763,7 +773,7 @@ item.ThumbnailImage = StrPathImg + "\\" + r["Picture"].ToString(); else item.ThumbnailImage = r["Picture"].ToString(); - + item.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(item_OnItemSelected); //item.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); facadeView.Add(item); @@ -979,6 +989,21 @@ { supprim_overlay(); } + private void item_OnItemSelected(GUIListItem item, GUIControl parent) + { + GUIFilmstripControl filmstrip = parent as GUIFilmstripControl; + if (filmstrip == null) return; + if (item.Label == "..") + { + filmstrip.InfoImageFileName = String.Empty; + return; + } + + if (item.IsFolder) filmstrip.InfoImageFileName = item.ThumbnailImage; + // else filmstrip.InfoImageFileName = MediaPortal.Util.Utils.ConvertToLargeCoverArt(item.ThumbnailImage); + else filmstrip.InfoImageFileName = item.ThumbnailImage; + } + #region Acc\xE8s Donn\xE9es //----------------------------------------------------------------------------------------- // Controle de l'existence du fichier ANT XML @@ -1167,7 +1192,7 @@ //----------------------------------------------------------------------------------------------- private void save_config_values() { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { xmlwriter.SetValue(CurrentConfig, "StrSelect", StrSelect.ToString()); xmlwriter.SetValue(CurrentConfig, "StrActors", StrActors.ToString()); @@ -1201,11 +1226,11 @@ //----------------------------------------------------------------------------------------------- // Load Config Parameters in MyFilms.xml file (section CurrentConfig) //----------------------------------------------------------------------------------------------- - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { xmlwriter.SetValue("MyFilms", "Current_Config", CurrentConfig); } - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { StrStorage = xmlreader.GetValueAsString(CurrentConfig, "AntStorage", ""); StrIdentItem = xmlreader.GetValueAsString(CurrentConfig, "AntIdentItem", ""); @@ -1239,8 +1264,12 @@ StrFileXml = destFile; break; } - CatalogConverter cv = new CatalogConverter(); - StrFileXml = cv.ConvertProfiler(StrFileXml, StrPathImg); + bool SortTitle = false; + if (xmlreader.GetValueAsString(CurrentConfig, "SortTitle", "False") == "True") + SortTitle = true; + string TagField = xmlreader.GetValueAsString(CurrentConfig, "DVDPTagField", ""); + CatalogConverter cv = new CatalogConverter(TagField); + StrFileXml = cv.ConvertProfiler(StrFileXml, StrPathImg,SortTitle,TagField); } else StrFileXml = xmlreader.GetValueAsString(CurrentConfig, "AntCatalogTemp", ""); @@ -1286,7 +1315,7 @@ } dlg.Reset(); dlg.SetHeading(924); // menu - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { int MesFilms_nb_config = xmlreader.GetValueAsInt("MyFilms", "NbConfig", -1); for (int i = 0; i < (int)MesFilms_nb_config; i++) @@ -1312,7 +1341,7 @@ if (configname.Length == 0) return ""; string Dwp; - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { Dwp = xmlreader.GetValueAsString(configname, "Dwp", ""); } @@ -1343,11 +1372,11 @@ boolselect = false; if (!ControlFichierDonn\xE9es()) { - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { if (CurrentConfig == xmlreader.GetValueAsString("MyFilms", "Current_Config", "")) { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { xmlwriter.SetValue("MyFilms", "Current_Config", ""); } @@ -1466,12 +1495,16 @@ GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(417)); facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; break; + //case 3: + // GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(733)); + // facadeView.View = GUIFacadeControl.ViewMode.Filmstrip; + // break; default: GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(101)); facadeView.View = GUIFacadeControl.ViewMode.List; break; } - GUIControl.HideControl(GetID, facadeView.GetID); +// GUIControl.HideControl(GetID, facadeView.GetID); int iControl = facadeView.GetID; GUIControl.ShowControl(GetID, iControl); GUIControl.FocusControl(GetID, iControl); @@ -1539,7 +1572,7 @@ GetFilmList(); return; } - if (choice_view.ToLower() == "view1") + if ((choice_view.ToLower() == "view1") || (choice_view.ToLower() == StrViewItem1.ToLower())) { // Change View by "View1": Change_LayOut(0); @@ -1552,7 +1585,7 @@ getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, WStrSortSens, "*", true, ""); return; } - if (choice_view.ToLower() == "view2") + if ((choice_view.ToLower() == "view2") || (choice_view.ToLower() == StrViewItem2.ToLower())) { // Change View by "View2": Change_LayOut(0); Modified: trunk/plugins/MyFilms/MesFilmsDetail.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-06-10 08:33:09 UTC (rev 502) +++ trunk/plugins/MyFilms/MesFilmsDetail.cs 2007-06-10 08:51:02 UTC (rev 503) @@ -39,7 +39,7 @@ using MediaPortal.GUI.Library; using SQLite.NET; using MediaPortal.Configuration; - +using Core.Util; using NewStringLib; namespace MesFilms @@ -99,6 +99,8 @@ string Stritem1 = null; string Stritem2 = null; string Stritem3 = null; + string ItemSearchFile = null; + bool SearchFile = false; string CurrentConfig = null; string wzone = null; int StrIndex = 0; @@ -106,7 +108,6 @@ public SQLiteClient m_db; string TitleDelim = null; DataRow[] r; // will hold current recordset to traverse - public class IMDBActorMovie { public string MovieTitle; @@ -122,7 +123,7 @@ static VirtualDirectory virtualDirectory = new VirtualDirectory(); static bool m_askBeforePlayingDVDImage = false; static bool multifile = false; - + public static ArrayList result; static MesFilmsDetail() { playlistPlayer = PlayListPlayer.SingletonPlayer; @@ -181,7 +182,7 @@ m_directory.SetExtensions(Utils.VideoExtensions); string TxtSelect; base.OnMessage(messageType); - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { CurrentConfig = xmlreader.GetValueAsString("MyFilms", "Current_Config", ""); StrStorage = xmlreader.GetValueAsString(CurrentConfig, "AntStorage", ""); @@ -207,6 +208,11 @@ StrTitleSelect = xmlreader.GetValueAsString(CurrentConfig, "StrTitleSelect", ""); StrFilmSelect = xmlreader.GetValueAsString(CurrentConfig, "StrFilmSelect", ""); TitleDelim = xmlreader.GetValueAsString(CurrentConfig, "TitleDelim", "."); + ItemSearchFile = xmlreader.GetValueAsString(CurrentConfig, "ItemSearchFileName", ""); + if (xmlreader.GetValueAsString(CurrentConfig, "SearchFileName", "false") == "True") + SearchFile = true; + else + SearchFile = false; switch (xmlreader.GetValueAsString(CurrentConfig, "CatalogType", "0")) { case "0": @@ -342,7 +348,7 @@ int ItemID; dlg.Reset(); - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { StrUpdItem1 = xmlreader.GetValueAsString(CurrentConfig, "AntUpdItem1", ""); StrUpdText1 = xmlreader.GetValueAsString(CurrentConfig, "AntUpdText1", ""); @@ -767,7 +773,7 @@ // val of -1 = don't save, else save value private void save_config_values(int ID) { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MyFilms.xml")) + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MyFilms.xml"))) { xmlwriter.SetValue(CurrentConfig, "IndexItem", r[StrIndex]["Number"]); if (ID != -1) xmlwriter.SetValue(CurrentConfig, "LastID", ID); @@ -787,9 +793,26 @@ string fileName = null; if (!(StrStorage == null) && !(StrStorage == "(none)") && !(StrStorage == "")) { - if (r[select_item][StrStorage].ToString() != "") + if (r[select_item][StrStorage].ToString() == "") + // recherche nom de fichier par titre du film + if ((SearchFile) && (first)) + { + if (ItemSearchFile.Length > 0) + { + fileName = Search_FileName(r[select_item][ItemSearchFile].ToString(), StrDirStor); + if (fileName.Length > 0) + { + r[StrIndex][StrStorage] = fileName; + Update_XML_database(false, StrIndex, StrStorage); + } + } + } + else + fileName = (string)r[select_item][StrStorage]; + else + fileName = (string)r[select_item][StrStorage]; + if (fileName.Length > 0) { - fileName = (string)r[select_item][StrStorage]; if (VirtualDirectory.IsImageFile(System.IO.Path.GetExtension(fileName))) { if (MountImageFile(GetID, fileName)) @@ -814,7 +837,6 @@ return; } } - if (!first) return; GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); dlgOk.SetHeading(3);//my videos @@ -1047,12 +1069,13 @@ if (!multifile) { //case monofile search files belonging same movie (extension cdx or diskx) string folder = file.Substring(0, file.LastIndexOf(@"\")); + file = folder + file.Substring(file.LastIndexOf(@"\") + 1); ArrayList items = m_directory.GetDirectory(folder.ToString()); for (int i = 0; i < items.Count; ++i) { GUIListItem temporaryListItem = (GUIListItem)items[i]; - if (Utils.ShouldStack(temporaryListItem.Path, (string)file) || (temporaryListItem.Path.ToLower() == file.ToLower())) + if (Utils.ShouldStack(temporaryListItem.Path.ToLower(), (string)file.ToLower()) || (temporaryListItem.Path.ToLower() == file.ToLower())) { if (!(temporaryListItem.Path.ToLower() == file.ToLower())) idMovie = update_database(temporaryListItem.Path, select_item, idMovie); @@ -1257,6 +1280,137 @@ } } } + private string Search_FileName(string filename , string storage) + { + result = new ArrayList(); + string file= filename; + + SearchFiles(file, storage, true); + + //si des resultats existent on les affichent + if (result.Count != 0) + { + if (result.Count == 1) + return result[0].ToString(); + string wfile = null; + result.Sort(); + ArrayList wresult = new ArrayList(); + foreach (String s in result) + { + if (!Utils.ShouldStack(s, wfile)) + { + wresult.Add(s); + wfile = s; + } + } + if (wresult.Count == 1) + return wresult[0].ToString(); + else + { + // Many files found; ask for the good file + GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); + if (dlg == null) return ""; + dlg.Reset(); + dlg.SetHeading(924); // menu + foreach (string Moviefile in wresult) + dlg.Add(Moviefile); + dlg.DoModal(GetID); + + if (dlg.SelectedLabel == -1) + return ""; + return wresult[dlg.SelectedLabel].ToString(); + } + } + else +// No Movie File Found + return ""; + + } + /// <summary> + /// Permet de rechercher un fichier dans un dossier et ces sous dossier + /// </summary> + /// <param name="fileName">le nom du fichier recherch\xE9</param> + /// <param name="path">le chemin du r\xE9pertoire dans lequel chercher</param> + /// <param name="recur">sp\xE9cifie si la recherche doit \xEAtre recursive</param> + public static void SearchFiles(string fileName, string searchrep, bool recur) + { + System.Text.RegularExpressions.Regex oRegex; + oRegex = new System.Text.RegularExpressions.Regex(";"); + string[] SearchDir = oRegex.Split(searchrep); + string file = MediaPortal.Util.Utils.FilterFileName(fileName.ToLower()); + + file = file.Replace("-", " "); + file = file.Replace("!", " "); + file = file.Replace("#", " "); + file = file.Replace(";", " "); + file = file.Replace("'", " "); + file = file.Replace("=", " "); + file = file.Replace("&", " "); + file = file.Replace("(", " "); + file = file.Replace(")", " "); + file = file.Replace("@", " "); + file = file.Replace("%", " "); + file = file.Replace("$", " "); + file = file.Replace(":", " "); + file = file.Replace("_", " "); + file = file.Trim(); + oRegex = new System.Text.RegularExpressions.Regex(" +"); + + file = oRegex.Replace(file, ":"); + file = file.Replace(":", ".*"); + file = file.Replace("\xE9", "[e\xE9]"); + file = file.Replace("\xE8", "[e\xE8]"); + file = file.Replace("\xEA", "[e\xEA]"); + file = file.Replace("\xEB", "[e\xEB]"); + file = file.Replace("\xF4", "[o\xF4]"); + file = file.Replace("\xF6", "[o\xF6]"); + file = file.Replace("\xE0", "[a\xE0]"); + file = file.Replace("\xE2", "[a\xE2]"); + file = file.Replace("\xE4", "[a\xE4]"); + file = file.Replace("\xF9", "[u\xF9]"); + file = file.Replace("\xFB", "[u\xFB]"); + file = file.Replace("\xFC", "[u\xFC]"); + file = file.Replace("\xEE", "[i\xEE]"); + file = file.Replace("\xEF", "[i\xEF]"); + file = file.Replace("\xE7", "[c\xE7]"); + oRegex = new System.Text.RegularExpressions.Regex(file); + foreach (string path in SearchDir) + { + DirectoryInfo dirsInf = new DirectoryInfo(path); + //On retourne une liste d'informations sur les fichiers contenus dans le r\xE9pertoire + FileSystemInfo[] filesInf = dirsInf.GetFileSystemInfos(); + + //Si le nom d'un fichier correspond avec le nom du fichier recherch\xE9 + //on place son path dans la variable globale result. + foreach (FileSystemInfo fi in filesInf) + { + System.Text.RegularExpressions.MatchCollection oMatches = oRegex.Matches(fi.Name.ToLower()); + foreach (System.Text.RegularExpressions.Match oMatch in oMatches) + { + if (MediaPortal.Util.Utils.IsVideo(fi.Name)) + result.Add(fi.Name); + else + { + if (fi.Attributes.ToString() == "Directory") + if (System.IO.File.Exists(path + fi.Name + "\\VIDEO_TS\\VIDEO_TS.IFO")) + result.Add(path + fi.Name + "\\VIDEO_TS\\VIDEO_TS.IFO"); + + } + } + } + //Si le parametre recur vaut true on r\xE9alise une + //recherche r\xE9cursive sur tous les sous-r\xE9pertoires + if (recur) + { + foreach (DirectoryInfo dir in dirsInf.GetDirectories()) + { + //On rappelle la m\xE9thode SearchFiles pour tous les sous-r\xE9pertoires + + SearchFiles(fileName, dir.FullName, recur); + } + } + } + } private void update_fieldDB(string champselect, int iidmovie, string field) { IMDBMovie movieDetails = new IMDBMovie(); Modified: trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-06-10 08:33:09 UTC (rev 502) +++ trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-06-10 08:51:02 UTC (rev 503) @@ -95,289 +95,588 @@ /// </summary> private void InitializeComponent() { - this.label1 = new System.Windows.Forms.Label(); - this.MesFilmsCat = new System.Windows.Forms.TextBox(); - this.ButCat = new System.Windows.Forms.Button(); - this.ButImg = new System.Windows.Forms.Button(); - this.MesFilmsImg = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.ButQuit = new System.Windows.Forms.Button(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); - this.AntIdentItem = new System.Windows.Forms.ComboBox(); - this.label4 = new System.Windows.Forms.Label(); - this.AntFilterItem1 = new System.Windows.Forms.ComboBox(); - this.AntFilterText1 = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.AntStorage = new System.Windows.Forms.ComboBox(); - this.AntLabel1 = new System.Windows.Forms.TextBox(); - this.AntItem1 = new System.Windows.Forms.ComboBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.AntItem3 = new System.Windows.Forms.ComboBox(); - this.AntLabel2 = new System.Windows.Forms.TextBox(); - this.AntItem2 = new System.Windows.Forms.ComboBox(); - this.label7 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.AntFilterComb = new System.Windows.Forms.ComboBox(); - this.AntFilterSign2 = new System.Windows.Forms.ComboBox(); - this.AntFilterSign1 = new System.Windows.Forms.ComboBox(); - this.AntFilterItem2 = new System.Windows.Forms.ComboBox(); - this.AntFilterText2 = new System.Windows.Forms.TextBox(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.AntViewText2 = new System.Windows.Forms.TextBox(); - this.AntViewText1 = new System.Windows.Forms.TextBox(); - this.AntViewItem2 = new System.Windows.Forms.ComboBox(); - this.AntViewItem1 = new System.Windows.Forms.ComboBox(); + this.label10 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.Config_Name = new System.Windows.Forms.ComboBox(); + this.label12 = new System.Windows.Forms.Label(); + this.General = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.groupBox11 = new System.Windows.Forms.GroupBox(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.Rpt_Dwp = new System.Windows.Forms.TextBox(); + this.Dwp = new System.Windows.Forms.TextBox(); + this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.AntIdentLabel = new System.Windows.Forms.TextBox(); this.butPath = new System.Windows.Forms.Button(); this.PathStorage = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); - this.AntIdentLabel = new System.Windows.Forms.TextBox(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.AntUpdDflT2 = new System.Windows.Forms.TextBox(); - this.AntUpdDflT1 = new System.Windows.Forms.TextBox(); - this.AntUpdItem2 = new System.Windows.Forms.ComboBox(); - this.AntUpdText2 = new System.Windows.Forms.TextBox(); - this.AntUpdItem1 = new System.Windows.Forms.ComboBox(); - this.AntUpdText1 = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.AntStorage = new System.Windows.Forms.ComboBox(); + this.ItemSearchFileName = new System.Windows.Forms.ComboBox(); + this.SearchFileName = new System.Windows.Forms.CheckBox(); + this.label4 = new System.Windows.Forms.Label(); + this.AntIdentItem = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.CatalogType = new System.Windows.Forms.ComboBox(); this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.label17 = new System.Windows.Forms.Label(); this.TitleDelim = new System.Windows.Forms.TextBox(); this.label9 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.AntTitle2 = new System.Windows.Forms.ComboBox(); this.AntTitle1 = new System.Windows.Forms.ComboBox(); + this.ButImg = new System.Windows.Forms.Button(); + this.MesFilmsImg = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.ButCat = new System.Windows.Forms.Button(); + this.MesFilmsCat = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.tabPage2 = new System.Windows.Forms.TabPage(); this.groupBox6 = new System.Windows.Forms.GroupBox(); this.AntSort = new System.Windows.Forms.ComboBox(); this.AntTSort = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.label11 = new System.Windows.Forms.Label(); - this.Config_Name = new System.Windows.Forms.ComboBox(); - this.label12 = new System.Windows.Forms.Label(); - this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.AntUpdDflT2 = new System.Windows.Forms.TextBox(); + this.AntUpdDflT1 = new System.Windows.Forms.TextBox(); + this.AntUpdItem2 = new System.Windows.Forms.ComboBox(); + this.AntUpdText2 = new System.Windows.Forms.TextBox(); + this.AntUpdItem1 = new System.Windows.Forms.ComboBox(); + this.AntUpdText1 = new System.Windows.Forms.TextBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.AntFilterComb = new System.Windows.Forms.ComboBox(); + this.AntFilterSign2 = new System.Windows.Forms.ComboBox(); + this.AntFilterSign1 = new System.Windows.Forms.ComboBox(); + this.AntFilterItem2 = new System.Windows.Forms.ComboBox(); + this.AntFilterText2 = new System.Windows.Forms.TextBox(); + this.AntFilterItem1 = new System.Windows.Forms.ComboBox(); + this.AntFilterText1 = new System.Windows.Forms.TextBox(); + this.groupBox8 = new System.Windows.Forms.GroupBox(); this.label14 = new System.Windows.Forms.Label(); this.LayOut = new System.Windows.Forms.ComboBox(); - this.label13 = new System.Windows.Forms.Label(); - this.CatalogType = new System.Windows.Forms.ComboBox(); - this.ButSave = new System.Windows.Forms.Button(); - this.groupBox8 = new System.Windows.Forms.GroupBox(); this.View_Dflt_Item = new System.Windows.Forms.ComboBox(); this.View_Dflt_Text = new System.Windows.Forms.TextBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.AntViewText2 = new System.Windows.Forms.TextBox(); + this.AntViewText1 = new System.Windows.Forms.TextBox(); + this.AntViewItem2 = new System.Windows.Forms.ComboBox(); + this.AntViewItem1 = new System.Windows.Forms.ComboBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.AntItem3 = new System.Windows.Forms.ComboBox(); + this.AntLabel2 = new System.Windows.Forms.TextBox(); + this.AntItem2 = new System.Windows.Forms.ComboBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.AntLabel1 = new System.Windows.Forms.TextBox(); + this.AntItem1 = new System.Windows.Forms.ComboBox(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.groupBox10 = new System.Windows.Forms.GroupBox(); + this.SortTitle = new System.Windows.Forms.CheckBox(); + this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.radioButton2 = new System.Windows.Forms.CheckBox(); + this.radioButton1 = new System.Windows.Forms.CheckBox(); + this.DVDPTagField = new System.Windows.Forms.ComboBox(); + this.ButQuit = new System.Windows.Forms.Button(); this.ButDelet = new System.Windows.Forms.Button(); + this.ButSave = new System.Windows.Forms.Button(); this.Config_Dflt = new System.Windows.Forms.CheckBox(); - this.Dwp = new System.Windows.Forms.TextBox(); - this.Rpt_Dwp = new System.Windows.Forms.TextBox(); - this.label15 = new System.Windows.Forms.Label(); - this.label16 = new System.Windows.Forms.Label(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.groupBox4.SuspendLayout(); + this.General.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.groupBox11.SuspendLayout(); + this.groupBox7.SuspendLayout(); this.groupBox5.SuspendLayout(); + this.tabPage2.SuspendLayout(); this.groupBox6.SuspendLayout(); - this.groupBox7.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox2.SuspendLayout(); this.groupBox8.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.tabPage3.SuspendLayout(); + this.groupBox10.SuspendLayout(); + this.groupBox9.SuspendLayout(); this.SuspendLayout(); // - // label1 + // label10 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(7, 22); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(93, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Catalog File (XML)"; + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(676, 42); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(69, 13); + this.label10.TabIndex = 34; + this.label10.Text = "Version 4.2.5"; // - // MesFilmsCat + // textBox1 // - this.MesFilmsCat.Location = new System.Drawing.Point(157, 19); - this.MesFilmsCat.Name = "MesFilmsCat"; - this.MesFilmsCat.Size = new System.Drawing.Size(268, 20); - this.MesFilmsCat.TabIndex = 1; - this.MesFilmsCat.Enter += new System.EventHandler(this.Config_Name_Control); + this.textBox1.Location = new System.Drawing.Point(645, 14); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(98, 20); + this.textBox1.TabIndex = 5; // - // ButCat + // label11 // - this.ButCat.Location = new System.Drawing.Point(431, 16); - this.ButCat.Name = "ButCat"; - this.ButCat.Size = new System.Drawing.Size(32, 23); - this.ButCat.TabIndex = 2; - this.ButCat.Text = "..."; - this.ButCat.UseVisualStyleBackColor = true; - this.ButCat.Enter += new System.EventHandler(this.Config_Name_Control); - this.ButCat.Click += new System.EventHandler(this.ButCat_Click); + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(516, 17); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(123, 13); + this.label11.TabIndex = 36; + this.label11.Text = "MP\'s Menu Plugin Name"; // + // Config_Name + // + this.Config_Name.FormattingEnabled = true; + this.Config_Name.Location = new System.Drawing.Point(126, 15); + this.Config_Name.Name = "Config_Name"; + this.Config_Name.Size = new System.Drawing.Size(202, 21); + this.Config_Name.Sorted = true; + this.Config_Name.TabIndex = 1; + this.Config_Name.Leave += new System.EventHandler(this.Config_Name_SelectedIndexChanged); + this.Config_Name.SelectedIndexChanged += new System.EventHandler(this.Config_Name_SelectedIndexChanged); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(20, 19); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(100, 13); + this.label12.TabIndex = 38; + this.label12.Text = "Configuration Name"; + // + // General + // + this.General.Controls.Add(this.tabPage1); + this.General.Controls.Add(this.tabPage2); + this.General.Controls.Add(this.tabPage3); + this.General.Location = new System.Drawing.Point(12, 66); + this.General.Name = "General"; + this.General.SelectedIndex = 0; + this.General.Size = new System.Drawing.Size(755, 340); + this.General.TabIndex = 46; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.groupBox11); + this.tabPage1.Controls.Add(this.groupBox7); + this.tabPage1.Controls.Add(this.label13); + this.tabPage1.Controls.Add(this.CatalogType); + this.tabPage1.Controls.Add(this.groupBox5); + this.tabPage1.Controls.Add(this.ButImg); + this.tabPage1.Controls.Add(this.MesFilmsImg); + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.ButCat); + this.tabPage1.Controls.Add(this.MesFilmsCat); + this.tabPage1.Controls.Add(this.label1); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(747, 314); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "General"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // groupBox11 + // + this.groupBox11.Controls.Add(this.label16); + this.groupBox11.Controls.Add(this.label15); + this.groupBox11.Controls.Add(this.Rpt_Dwp); + this.groupBox11.Controls.Add(this.Dwp); + this.groupBox11.Location = new System.Drawing.Point(503, 208); + this.groupBox11.Name = "groupBox11"; + this.groupBox11.Size = new System.Drawing.Size(229, 76); + this.groupBox11.TabIndex = 75; + this.groupBox11.TabStop = false; + this.groupBox11.Text = "Security"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(6, 46); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(91, 13); + this.label16.TabIndex = 72; + this.label16.Text = "Repeat Password"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(44, 25); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(53, 13); + this.label15.TabIndex = 71; + this.label15.Text = "Password"; + // + // Rpt_Dwp + // + this.Rpt_Dwp.Location = new System.Drawing.Point(103, 43); + this.Rpt_Dwp.Name = "Rpt_Dwp"; + this.Rpt_Dwp.Size = new System.Drawing.Size(112, 20); + this.Rpt_Dwp.TabIndex = 70; + this.Rpt_Dwp.UseSystemPasswordChar = true; + // + // Dwp + // + this.Dwp.Location = new System.Drawing.Point(103, 21); + this.Dwp.Name = "Dwp"; + this.Dwp.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.Dwp.Size = new System.Drawing.Size(112, 20); + this.Dwp.TabIndex = 69; + this.Dwp.UseSystemPasswordChar = true; + // + // groupBox7 + // + this.groupBox7.Controls.Add(this.AntIdentLabel); + this.groupBox7.Controls.Add(this.butPath); + this.groupBox7.Controls.Add(this.PathStorage); + this.groupBox7.Controls.Add(this.label5); + this.groupBox7.Controls.Add(this.label6); + this.groupBox7.Controls.Add(this.AntStorage); + this.groupBox7.Controls.Add(this.ItemSearchFileName); + this.groupBox7.Controls.Add(this.SearchFileName); + this.groupBox7.Controls.Add(this.label4); + this.groupBox7.Controls.Add(this.AntIdentItem); + this.groupBox7.Location = new System.Drawing.Point(7, 89); + this.groupBox7.Name = "groupBox7"; + this.groupBox7.Size = new System.Drawing.Size(725, 104); + this.groupBox7.TabIndex = 74; + this.groupBox7.TabStop = false; + this.groupBox7.Text = "Play Movie Infos"; + // + // AntIdentLabel + // + this.AntIdentLabel.Location = new System.Drawing.Point(331, 74); + this.AntIdentLabel.Name = "AntIdentLabel"; + this.AntIdentLabel.Size = new System.Drawing.Size(144, 20); + this.AntIdentLabel.TabIndex = 57; + // + // butPath + // + this.butPath.Location = new System.Drawing.Point(443, 44); + this.butPath.Name = "butPath"; + this.butPath.Size = new System.Drawing.Size(32, 23); + this.butPath.TabIndex = 55; + this.butPath.Text = "..."; + this.butPath.UseVisualStyleBackColor = true; + this.butPath.Click += new System.EventHandler(this.butPath_Click); + // + // PathStorage + // + this.PathStorage.Location = new System.Drawing.Point(168, 47); + this.PathStorage.Name = "PathStorage"; + this.PathStorage.Size = new System.Drawing.Size(268, 20); + this.PathStorage.TabIndex = 54; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(8, 50); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(145, 13); + this.label5.TabIndex = 60; + this.label5.Text = "Paths for Movies File Search "; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(7, 21); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(144, 13); + this.label6.TabIndex = 59; + this.label6.Text = "Ant Item for Storage File Info"; + // + // AntStorage + // + this.AntStorage.FormattingEnabled = true; + this.AntStorage.Location = new System.Drawing.Point(168, 19); + this.AntStorage.Name = "AntStorage"; + this.AntStorage.Size = new System.Drawing.Size(223, 21); + this.AntStorage.TabIndex = 53; + // + // ItemSearchFileName + // + this.ItemSearchFileName.FormattingEnabled = true; + this.ItemSearchFileName.Items.AddRange(new object[] { + "OriginalTitle", + "TranslatedTitle", + "FormattedTitle"}); + this.ItemSearchFileName.Location = new System.Drawing.Point(599, 19); + this.ItemSearchFileName.Name = "ItemSearchFileName"; + this.ItemSearchFileName.Size = new System.Drawing.Size(112, 21); + this.ItemSearchFileName.TabIndex = 67; + // + // SearchFileName + // + this.SearchFileName.AutoSize = true; + this.SearchFileName.Location = new System.Drawing.Point(449, 22); + this.SearchFileName.Name = "SearchFileName"; + this.SearchFileName.Size = new System.Drawing.Size(144, 17); + this.SearchFileName.TabIndex = 66; + this.SearchFileName.Text = "Search by Movie\'s Name"; + this.SearchFileName.UseVisualStyleBackColor = true; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(7, 76); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(109, 13); + this.label4.TabIndex = 58; + this.label4.Text = "Ant Identification Item"; + // + // AntIdentItem + // + this.AntIdentItem.FormattingEnabled = true; + this.AntIdentItem.Location = new System.Drawing.Point(168, 73); + this.AntIdentItem.Name = "AntIdentItem"; + this.AntIdentItem.Size = new System.Drawing.Size(157, 21); + this.AntIdentItem.TabIndex = 56; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(485, 30); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(70, 13); + this.label13.TabIndex = 63; + this.label13.Text = "Catalog Type"; + // + // CatalogType + // + this.CatalogType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CatalogType.FormattingEnabled = true; + this.CatalogType.Items.AddRange(new object[] { + "Ant Movie Catalog", + "DVD Profiler"}); + this.CatalogType.Location = new System.Drawing.Point(561, 25); + this.CatalogType.Name = "CatalogType"; + this.CatalogType.Size = new System.Drawing.Size(166, 21); + this.CatalogType.TabIndex = 62; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.label17); + this.groupBox5.Controls.Add(this.TitleDelim); + this.groupBox5.Controls.Add(this.label9); + this.groupBox5.Controls.Add(this.label8); + this.groupBox5.Controls.Add(this.AntTitle2); + this.groupBox5.Controls.Add(this.AntTitle1); + this.groupBox5.Location = new System.Drawing.Point(7, 208); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(453, 76); + this.groupBox5.TabIndex = 61; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Title Order"; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(306, 21); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(101, 13); + this.label17.TabIndex = 66; + this.label17.Text = "Hierarchy Separator"; + // + // TitleDelim + // + this.TitleDelim.Location = new System.Drawing.Point(413, 17); + this.TitleDelim.MaxLength = 1; + this.TitleDelim.Name = "TitleDelim"; + this.TitleDelim.Size = new System.Drawing.Size(20, 20); + this.TitleDelim.TabIndex = 20; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(7, 46); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(97, 13); + this.label9.TabIndex = 18; + this.label9.Text = "Ant SecondaryTitle"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(7, 21); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(81, 13); + this.label8.TabIndex = 17; + this.label8.Text = "Ant Master Title"; + // + // AntTitle2 + // + this.AntTitle2.FormattingEnabled = true; + this.AntTitle2.Location = new System.Drawing.Point(131, 41); + this.AntTitle2.Name = "AntTitle2"; + this.AntTitle2.Size = new System.Drawing.Size(156, 21); + this.AntTitle2.TabIndex = 11; + // + // AntTitle1 + // + this.AntTitle1.FormattingEnabled = true; + this.AntTitle1.Items.AddRange(new object[] { + "OriginalTitle", + "TranslatedTitle", + "FormattedTitle"}); + this.AntTitle1.Location = new System.Drawing.Point(132, 16); + this.AntTitle1.Name = "AntTitle1"; + this.AntTitle1.Size = new System.Drawing.Size(155, 21); + this.AntTitle1.TabIndex = 10; + // // ButImg // - this.ButImg.Location = new System.Drawing.Point(431, 42); + this.ButImg.Location = new System.Drawing.Point(404, 51); this.ButImg.Name = "ButImg"; this.ButImg.Size = new System.Drawing.Size(32, 23); - this.ButImg.TabIndex = 4; + this.ButImg.TabIndex = 52; this.ButImg.Text = "..."; this.ButImg.UseVisualStyleBackColor = true; - this.ButImg.Enter += new System.EventHandler(this.Config_Name_Control); this.ButImg.Click += new System.EventHandler(this.ButImg_Click); // // MesFilmsImg // - this.MesFilmsImg.Location = new System.Drawing.Point(157, 45); + this.MesFilmsImg.Location = new System.Drawing.Point(164, 53); this.MesFilmsImg.Name = "MesFilmsImg"; - this.MesFilmsImg.Size = new System.Drawing.Size(268, 20); - this.MesFilmsImg.TabIndex = 3; - this.MesFilmsImg.Enter += new System.EventHandler(this.Config_Name_Control); + this.MesFilmsImg.Size = new System.Drawing.Size(234, 20); + this.MesFilmsImg.TabIndex = 50; // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(7, 48); + this.label2.Location = new System.Drawing.Point(14, 56); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(100, 13); - this.label2.TabIndex = 3; + this.label2.TabIndex = 51; this.label2.Text = "Picture Path (IMG) "; // - // ButQuit + // ButCat // - this.ButQuit.Location = new System.Drawing.Point(737, 431); - this.ButQuit.Name = "ButQuit"; - this.ButQuit.Size = new System.Drawing.Size(64, 31); - this.ButQuit.TabIndex = 40; - this.ButQuit.Text = "Quit"; - this.ButQuit.UseVisualStyleBackColor = true; - this.ButQuit.Click += new System.EventHandler(this.ButQuit_Click); + this.ButCat.Location = new System.Drawing.Point(404, 25); + this.ButCat.Name = "ButCat"; + this.ButCat.Size = new System.Drawing.Size(32, 23); + this.ButCat.TabIndex = 49; + this.ButCat.Text = "..."; + this.ButCat.UseVisualStyleBackColor = true; + this.ButCat.Click += new System.EventHandler(this.ButCat_Click); // - // AntIdentItem + // MesFilmsCat // - this.AntIdentItem.FormattingEnabled = true; - this.AntIdentItem.Location = new System.Drawing.Point(156, 126); - this.AntIdentItem.Name = "AntIdentItem"; - this.AntIdentItem.Size = new System.Drawing.Size(157, 21); - this.AntIdentItem.TabIndex = 8; - this.AntIdentItem.Enter += new System.EventHandler(this.Config_Name_Control); + this.MesFilmsCat.Location = new System.Drawing.Point(164, 27); + this.MesFilmsCat.Name = "MesFilmsCat"; + this.MesFilmsCat.Size = new System.Drawing.Size(234, 20); + this.MesFilmsCat.TabIndex = 48; // - // label4 + // label1 // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(6, 129); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(109, 13); - this.label4.TabIndex = 11; - this.label4.Text = "Ant Identification Item"; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(1... [truncated message content] |
From: <an...@us...> - 2007-06-10 08:33:14
|
Revision: 502 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=502&view=rev Author: and-81 Date: 2007-06-10 01:33:09 -0700 (Sun, 10 Jun 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/Tray Launcher/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/SetupForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/ trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.dll trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Windows.Forms.dll trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Windows.Forms.xml trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.Extensions.dll trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.Extensions.xml trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.License.txt trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.dll trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.xml Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-06-10 07:42:31 UTC (rev 501) +++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-06-10 08:33:09 UTC (rev 502) @@ -577,7 +577,6 @@ try { Help.ShowHelp(this, SystemRegistry.GetInstallFolder() + "\\IR Server Suite.chm"); - // , HelpNavigator.Topic, "index.html" } catch (Exception ex) { Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2007-06-10 07:42:31 UTC (rev 501) +++ trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2007-06-10 08:33:09 UTC (rev 502) @@ -33,7 +33,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-10 07:42:31 UTC (rev 501) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-10 08:33:09 UTC (rev 502) @@ -177,7 +177,7 @@ { try { - Help.ShowHelp(this, SystemRegistry.GetInstallFolder() + "\\IR Server Suite.chm", HelpNavigator.Topic, "IR Server"); + Help.ShowHelp(this, SystemRegistry.GetInstallFolder() + "\\IR Server Suite.chm", HelpNavigator.Topic, "IR Server\\index.html"); } catch (Exception ex) { Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-06-10 07:42:31 UTC (rev 501) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-06-10 08:33:09 UTC (rev 502) @@ -34,8 +34,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.1")] -[assembly: AssemblyFileVersion("1.0.3.1")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] [assembly: CLSCompliant(true)] Added: trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml (rev 0) +++ trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml 2007-06-10 08:33:09 UTC (rev 502) @@ -0,0 +1,1900 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>DevAge.Core</name> + </assembly> + <members> + <member name="T:DevAge.Text.FixedLength.LineParser"> + <summary> + A class for parsing fixed length string and loading the fields into a class. + </summary> + </member> + <member name="M:DevAge.Text.FixedLength.LineParser.#ctor"> + <summary> + Constructor. Fill the Fields list fot specify the columns. + </summary> + </member> + <member name="M:DevAge.Text.FixedLength.LineParser.#ctor(System.Type)"> + <summary> + Load the parser fields with the properties specified in the type. You must use the FieldAttribute and ParseFormatAttribute to specify additional informations like the field length. + </summary> + <param name="lineClassType"></param> + </member> + <member name="M:DevAge.Text.FixedLength.LineParser.Reset"> + <summary> + Reset the parser + </summary> + </member> + <member name="M:DevAge.Text.FixedLength.LineParser.LoadLine(System.String)"> + <summary> + Load the specified line in the parser. + </summary> + <param name="line"></param> + </member> + <member name="M:DevAge.Text.FixedLength.LineParser.GetValue(System.String)"> + <summary> + Get a specified field value. + </summary> + <param name="fieldName"></param> + <returns></returns> + </member> + <member name="M:DevAge.Text.FixedLength.LineParser.FillLineClass(System.Object)"> + <summary> + Fill the properties of the specified class with the values of the line has defined by the Fields collection. + </summary> + <param name="schemaClass"></param> + <returns>Returns the same class specified in the schemaClass parameter, this is useful if you have struct or value types.</returns> + </member> + <member name="P:DevAge.Text.FixedLength.LineParser.Fields"> + <summary> + Gets a collection of fields. + </summary> + </member> + <member name="T:DevAge.Data.SqlClient.SqlCommandBuilder"> + <summary> + This class is similar to the System.Data.SqlClient.SqlCommandBuilder, but use only the DataTable to create the required commands. + Don't support identity (autoincrement) column and only the base data type. This class don't use the data source to explore the data but only the DataTable informations. + So you must populate the PrimaryKeys of the DataSet. I suggest to use GUID column (uniqueidentifier) to replace the identity column. + Remember to set the Connection of the generated command. + </summary> + </member> + <member name="M:DevAge.Data.SqlClient.SqlCommandBuilder.#ctor(System.Data.DataTable)"> + <summary> + Constructor + </summary> + <param name="dataTable">table used to create commands</param> + </member> + <member name="P:DevAge.Data.SqlClient.SqlCommandBuilder.DataTable"> + <summary> + Table used to create commands + </summary> + </member> + <member name="T:DevAge.DateTimeHelper"> + <summary> + Summary description for DateTimeHelper. + </summary> + </member> + <member name="M:DevAge.DateTimeHelper.YearsDifference(System.DateTime,System.DateTime)"> + <summary> + Calculate the difference in years of 2 dates. Usually used for age calculations. dateA - dateB + </summary> + <param name="dateA"></param> + <param name="dateB"></param> + <returns></returns> + </member> + <member name="M:DevAge.DateTimeHelper.MonthsDifference(System.DateTime,System.DateTime)"> + <summary> + Calculate the difference in months of 2 dates. dateA - dateB + </summary> + <param name="dateA"></param> + <param name="dateB"></param> + <returns></returns> + </member> + <member name="T:DevAge.Data.FileDataSet"> + <summary> + Summary description for Manager. + </summary> + </member> + <member name="P:DevAge.Data.FileDataSet.SaveDataFormat"> + <summary> + Gets or Sets the format used to save the DataSet + </summary> + </member> + <member name="P:DevAge.Data.FileDataSet.FileDataFormat"> + <summary> + Gets the current format of the File where the data are loaded. + </summary> + </member> + <member name="P:DevAge.Data.FileDataSet.MergeReadedSchema"> + <summary> + Gets or Sets if merge the schema of the file with the schema of the DataSet specified. Use true if the DataSet doesn't have a schema definition. Default is false. + </summary> + </member> + <member name="T:DevAge.DevAgeApplicationException"> + <summary> + Generic DevAge Exception + </summary> + </member> + <member name="M:DevAge.DevAgeApplicationException.#ctor(System.String)"> + <summary> + Constructor + </summary> + <param name="p_strErrDescription"></param> + </member> + <member name="M:DevAge.DevAgeApplicationException.#ctor(System.String,System.Exception)"> + <summary> + Constructor + </summary> + <param name="p_strErrDescription"></param> + <param name="p_InnerException"></param> + </member> + <member name="M:DevAge.DevAgeApplicationException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> + <summary> + Constructor + </summary> + <param name="p_Info"></param> + <param name="p_StreamingContext"></param> + </member> + <member name="T:DevAge.Text.FixedLength.FieldAttribute"> + <summary> + Required attribute to specify the field position and length + </summary> + </member> + <member name="M:DevAge.Text.FixedLength.FieldAttribute.#ctor(System.Int32,System.Int32)"> + <summary> + Constructor. + </summary> + <param name="fieldIndex">Index of the field, 0 based. Each field must have a unique progressive index</param> + <param name="length">Lenght of the field when readed and writed to the string.</param> + </member> + <member name="T:DevAge.Text.FixedLength.ParseFormatAttribute"> + <summary> + Attribute used to specify additional parse options + </summary> + </member> + <member name="M:DevAge.Text.FixedLength.ParseFormatAttribute.#ctor"> + <summary> + Constructor. Use one of these properties to customize the format: CultureInfo, DateTimeFormat, NumberFormat, TrimBeforeParse. + Default is Invariant culture format. + </summary> + </member> + <member name="T:DevAge.Text.FixedLength.ValueMappingAttribute"> + <summary> + Attribute used to convert a specific value to another value + </summary> + </member> + <member name="M:DevAge.Text.FixedLength.ValueMappingAttribute.#ctor(System.String,System.Object)"> + <summary> + Constructor + </summary> + <param name="stringValue">String value</param> + <param name="fieldValue">Field typed value</param> + </member> + <member name="T:DevAge.Text.FixedLength.StandardValueAttribute"> + <summary> + Attribute used to specify the standard value (mandatory value) for a specific field. + You can use this attribute for example when you want a particular field to only accept one or more standard values. + </summary> + </member> + <member name="M:DevAge.Text.FixedLength.StandardValueAttribute.#ctor(System.Object)"> + <summary> + Construcotr + </summary> + <param name="standardValue">Required value</param> + </member> + <member name="T:DevAge.Patterns.IActivity"> + <summary> + An interface to represents a basic activity. + </summary> + </member> + <member name="M:DevAge.Patterns.IActivity.Start(DevAge.Patterns.IActivityEvents)"> + <summary> + Start the activity and all sub activities. + </summary> + <param name="events">Interface class that receive the events, can be null if no event class is needed.</param> + </member> + <member name="M:DevAge.Patterns.IActivity.Cancel"> + <summary> + Cancel the current activity and all sub activities throwing a ActivityCanceledException. + </summary> + </member> + <member name="P:DevAge.Patterns.IActivity.SubActivities"> + <summary> + Subordinated activities. Are executed after the current activity. If one of these activity throws an exception is propagated to parent activity and the operation is stopped. + Note that the sub activities can be async and so can be executed in a parellel mode. + </summary> + </member> + <member name="P:DevAge.Patterns.IActivity.Status"> + <summary> + Activity status + </summary> + </member> + <member name="P:DevAge.Patterns.IActivity.Name"> + <summary> + Name of the activity used to describe the class. + </summary> + </member> + <member name="P:DevAge.Patterns.IActivity.WaitHandle"> + <summary> + Gets the WaitHandle class used to wait for the completition of the activity. + </summary> + </member> + <member name="P:DevAge.Patterns.IActivity.Exception"> + <summary> + Gets the exception throwed when the activity fail. Null if no exception. + </summary> + </member> + <member name="P:DevAge.Patterns.IActivity.Parent"> + <summary> + Gets or sets the Activity parent. Null when it is a root activity. + Do not set manually the parent activity, but simply add the activity to the SubActivities collection. + </summary> + </member> + <member name="P:DevAge.Patterns.IActivity.FullName"> + <summary> + Gets the activity full name of the activity, composed by the full name of the parent activity separated with a \ character + </summary> + </member> + <member name="F:DevAge.Patterns.SubActivityWaitMode.DoNotWait"> + <summary> + Don't wait the sub activities to finish (parallel processing, asyncronous) + </summary> + </member> + <member name="F:DevAge.Patterns.SubActivityWaitMode.WaitOnEach"> + <summary> + Wait for each sub activities (syncronous) + </summary> + </member> + <member name="F:DevAge.Patterns.SubActivityWaitMode.WaitAtTheEnd"> + <summary> + Wait all the sub activities at the end (parallel processing but syncronized with the parent) + </summary> + </member> + <member name="T:DevAge.Patterns.ActivityBase"> + <summary> + Base activity class. Override the OnWork method to customize the activity. + </summary> + </member> + <member name="F:DevAge.Patterns.ActivityBase.mActivityCount"> + <summary> + An activity count used only to generate a seguential name + </summary> + </member> + <member name="F:DevAge.Patterns.ActivityBase.mWaitHandle"> + <summary> + Initially set to signaled=true=completed, nonsignaled=false=notcompleted, + </summary> + </member> + <member name="M:DevAge.Patterns.ActivityBase.#ctor"> + <summary> + Constructor + </summary> + </member> + <member name="M:DevAge.Patterns.ActivityBase.ResetRunningStatus"> + <summary> + Reset the status property to the original values. If the activity is still running an exception is throw. + </summary> + </member> + <member name="M:DevAge.Patterns.ActivityBase.OnWork"> + <summary> + Working method. Abstract. Override this method to provide a specific work for the activity. + </summary> + </member> + <member name="M:DevAge.Patterns.ActivityBase.DoWork"> + <summary> + Internal work method. Call the OnWork method and Start the SubActivities. + </summary> + </member> + <member name="M:DevAge.Patterns.ActivityBase.WaitActivities(DevAge.Patterns.ActivityCollection,System.Int32)"> + <summary> + Wait until or SubActivities are completed. Throw an exception on timeout. + </summary> + <param name="activities"></param> + <param name="timeout"></param> + </member> + <member name="M:DevAge.Patterns.ActivityBase.WaitActivity(DevAge.Patterns.IActivity,System.Int32)"> + <summary> + Wait until or SubActivities are completed. Throw an exception on timeout. + </summary> + <param name="activity"></param> + <param name="timeout"></param> + </member> + <member name="M:DevAge.Patterns.ActivityBase.CheckActivitiesException(DevAge.Patterns.ActivityCollection)"> + <summary> + Throw an exception if one of the activities has an exception. + </summary> + <param name="activities"></param> + </member> + <member name="M:DevAge.Patterns.ActivityBase.CheckActivityException(DevAge.Patterns.IActivity)"> + <summary> + Throw an exception if one of the activities has an exception. + </summary> + <param name="activity"></param> + </member> + <member name="M:DevAge.Patterns.ActivityBase.StartActivity"> + <summary> + Start the activity. NOTE: Usually don't override this method but override the OnWork method to implement the specific activity work. + </summary> + </member> + <member name="M:DevAge.Patterns.ActivityBase.Start(DevAge.Patterns.IActivityEvents)"> + <summary> + Start the activity. If the activity is already running an exception is throw. + To override the common working code use the OnWork abstract method. + </summary> + <param name="events">Interface class that receive the events, can be null if no event class is needed.</param> + </member> + <member name="M:DevAge.Patterns.ActivityBase.Cancel"> + <summary> + Cancel the current activity and all sub activities throwing a ActivityCanceledException. + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.SubActivitiesTimeOut"> + <summary> + Gets or sets the time to wait for the sub activities. If the operation is still executing then a TimeOutException is fired. Default is System.Threading.Timeout.Infinite. Default is true. + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.PropagateException"> + <summary> + Gets or sets if propagate an exception from sub activities to the current activities. Default is true. + Only valid SubActivitiesTimeOut is WaitOnEach or WaitAtTheEnd + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.SubActivityWaitMode"> + <summary> + Gets or sets how the current activity wait the completition of the sub activities. + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.SubActivities"> + <summary> + Subordinated activities. Are executed after the current activity. If one of these activity throws an exception is propagated to parent activity and the operation is stopped. + Note that the sub activities can be async and so can be executed in a parellel mode. + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.Status"> + <summary> + Activity status + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.Name"> + <summary> + Name of the activity used to describe the class. + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.WaitHandle"> + <summary> + Gets the WaitHandle class used to wait for the completition of the activity. + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.Exception"> + <summary> + Gets the exception throwed when the activity fail. Null if no exception. + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.Parent"> + <summary> + Gets or sets the Activity parent. Null when it is a root activity. + Do not set manually the parent activity, but simply add the activity to the SubActivities collection. + </summary> + </member> + <member name="P:DevAge.Patterns.ActivityBase.FullName"> + <summary> + Gets the activity full name of the activity, composed by the full name of the parent activity separated with a \ character + </summary> + </member> + <member name="T:DevAge.Patterns.Activity"> + <summary> + An activity used as a container for other activities using a syncronized code. + </summary> + </member> + <member name="T:DevAge.Patterns.AsynchronousActivity"> + <summary> + An activity used as a container for other activities using an asynchronous code. + Override the OnAsyncWork method for custom asynchronous work. + </summary> + </member> + <member name="T:DevAge.Patterns.AsyncActivityBase"> + <summary> + Base activity class. Override the OnBeginWork and OnEndWork method to customize the activity. + This class support an asyncronous activity. + </summary> + </member> + <member name="M:DevAge.Patterns.AsyncActivityBase.OnBeginWork(System.AsyncCallback)"> + <summary> + Begind working method. Called to start the asyncronous activity. Abstract. + </summary> + </member> + <member name="M:DevAge.Patterns.AsyncActivityBase.OnEndWork(System.IAsyncResult)"> + <summary> + End working method. Called when the asyncronous operation is finished + </summary> + <param name="asyncResult">AsyncResult</param> + </member> + <member name="M:DevAge.Patterns.AsyncActivityBase.OnWork"> + <summary> + Working method. + </summary> + </member> + <member name="M:DevAge.Patterns.AsyncActivityBase.StartActivity"> + <summary> + Start the activity. NOTE: Usually don't override this method but override the OnBeginWork method to implement the specific activity work. + </summary> + </member> + <member name="T:DevAge.Data.StreamDataSet"> + <summary> + A static class used to serialize a DataSet to and from a stream using a binary or xml format. + The xml format use the standard DataSet xml serialization, the binary format use a custom format. + </summary> + </member> + <member name="M:DevAge.Data.StreamDataSet.Write(System.IO.Stream,System.Data.DataSet,DevAge.Data.StreamDataSetFormat)"> + <summary> + Write the dataset to the stream using the specified format. + </summary> + <param name="destination"></param> + <param name="source"></param> + <param name="format"></param> + </member> + <member name="M:DevAge.Data.StreamDataSet.Read(System.IO.Stream,System.Data.DataSet,DevAge.Data.StreamDataSetFormat,System.Boolean)"> + <summary> + Read from the stream and populate the dataset using the specified format. + </summary> + <param name="source"></param> + <param name="destination"></param> + <param name="format"></param> + <param name="mergeSchema">True to merge the schema, otherwise it is used the schema of the dataset</param> + </member> + <member name="T:DevAge.Data.StreamDataSetFormat"> + <summary> + Enum to control the serialization format + </summary> + </member> + <member name="F:DevAge.Data.StreamDataSetFormat.XML"> + <summary> + Standard xml format used by the ReadXml and WriteXml of the DataSet + </summary> + </member> + <member name="F:DevAge.Data.StreamDataSetFormat.Binary"> + <summary> + Custom binary format. More compact of the xml but not human readable + </summary> + </member> + <member name="T:DevAge.Data.BinaryDataSetInvalidException"> + <summary> + Binary data not valid exception + </summary> + </member> + <member name="M:DevAge.Data.BinaryDataSetInvalidException.#ctor"> + <summary> + Constructor + </summary> + </member> + <member name="M:DevAge.Data.BinaryDataSetInvalidException.#ctor(System.Exception)"> + <summary> + Constructor + </summary> + <param name="p_InnerException"></param> + </member> + <member name="T:DevAge.Data.BinaryDataSetVersionException"> + <summary> + Version not valid exception + </summary> + </member> + <member name="M:DevAge.Data.BinaryDataSetVersionException.#ctor"> + <summary> + Constructor + </summary> + </member> + <member name="M:DevAge.Data.BinaryDataSetVersionException.#ctor(System.Exception)"> + <summary> + Constructor + </summary> + <param name="p_InnerException"></param> + </member> + <member name="T:DevAge.Configuration.CommandLineArgs"> + <summary> + Description résumée de Arguments. + </summary> + </member> + <member name="T:DevAge.ComponentModel.Converter.PercentTypeConverter"> + <summary> + A TypeConverter that support string conversion from and to string with the percent symbol. + Support Conversion for Float, Double and Decimal + </summary> + </member> + <member name="P:DevAge.ComponentModel.Converter.PercentTypeConverter.ConsiderAllStringAsPercent"> + <summary> + If true and the user insert a string with no percent symbel the value is divided by 100, otherwise not. + </summary> + </member> + <member name="T:DevAge.Text.FixedLength.LineWriter"> + <summary> + A class used to create fixed lenght string. + </summary> + </member> + <member name="T:DevAge.IO.StreamPersistence"> + <summary> + A static class to help save and read stream data + </summary> + </member> + <member name="T:DevAge.Configuration.PersistableItemDictionary"> + <summary> + A dictionary with keys of type String and values of type PersistableItem + </summary> + </member> + <member name="M:DevAge.Configuration.PersistableItemDictionary.#ctor"> + <summary> + Initializes a new empty instance of the PersistableItemDictionary class + </summary> + </member> + <member name="M:DevAge.Configuration.PersistableItemDictionary.Add(System.String,DevAge.Configuration.PersistableItem)"> + <summary> + Adds an element with the specified key and value to this PersistableItemDictionary. + </summary> + <param name="key"> + The String key of the element to add. + </param> + <param name="value"> + The PersistableItem value of the element to add. + </param> + </member> + <member name="M:DevAge.Configuration.PersistableItemDictionary.Contains(System.String)"> + <summary> + Determines whether this PersistableItemDictionary contains a specific key. + </summary> + <param name="key"> + The String key to locate in this PersistableItemDictionary. + </param> + <returns> + true if this PersistableItemDictionary contains an element with the specified key; + otherwise, false. + </returns> + </member> + <member name="M:DevAge.Configuration.PersistableItemDictionary.ContainsKey(System.String)"> + <summary> + Determines whether this PersistableItemDictionary contains a specific key. + </summary> + <param name="key"> + The String key to locate in this PersistableItemDictionary. + </param> + <returns> + true if this PersistableItemDictionary contains an element with the specified key; + otherwise, false. + </returns> + </member> + <member name="M:DevAge.Configuration.PersistableItemDictionary.ContainsValue(DevAge.Configuration.PersistableItem)"> + <summary> + Determines whether this PersistableItemDictionary contains a specific value. + </summary> + <param name="value"> + The PersistableItem value to locate in this PersistableItemDictionary. + </param> + <returns> + true if this PersistableItemDictionary contains an element with the specified value; + otherwise, false. + </returns> + </member> + <member name="M:DevAge.Configuration.PersistableItemDictionary.Remove(System.String)"> + <summary> + Removes the element with the specified key from this PersistableItemDictionary. + </summary> + <param name="key"> + The String key of the element to remove. + </param> + </member> + <member name="P:DevAge.Configuration.PersistableItemDictionary.Item(System.String)"> + <summary> + Gets or sets the PersistableItem associated with the given String + </summary> + <param name="key"> + The String whose value to get or set. + </param> + </member> + <member name="P:DevAge.Configuration.PersistableItemDictionary.Keys"> + <summary> + Gets a collection containing the keys in this PersistableItemDictionary. + </summary> + </member> + <member name="P:DevAge.Configuration.PersistableItemDictionary.Values"> + <summary> + Gets a collection containing the values in this PersistableItemDictionary. + </summary> + </member> + <member name="T:DevAge.ComponentModel.Converter.CurrencyTypeConverter"> + <summary> + A TypeConverter that support string conversion from and to string with the currency symbol. + Support Conversion for Float, Double and Decimal, Int + </summary> + </member> + <member name="T:DevAge.ComponentModel.Converter.NumberTypeConverter"> + <summary> + A TypeConverter that support string conversion from and to string with a custom format number. + Support Conversion for Float, Double and Decimal, Int + </summary> + </member> + <member name="T:DevAge.Text.FixedLength.FieldList"> + <summary> + A dictionary with keys of type string and values of type IField + </summary> + </member> + <member name="M:DevAge.Text.FixedLength.FieldList.#ctor"> + <summary> + Initializes a new empty instance of the FieldList class + </summary> + </member> + <member name="M:DevAge.Text.FixedLength.FieldList.Add(DevAge.Text.FixedLength.IField)"> + <summary> + Adds an element with the specified key and value to this FieldList. + </summary> + <param name="key"> + The string key of the element to add. + </param> + <param name="value"> + The IField value of the element to add. + </param> + </member> + <member name="M:DevAge.Text.FixedLength.FieldList.Contains(System.String)"> + <summary> + Determines whether this FieldList contains a specific key. + </summary> + <param name="fieldName"> + The string key to locate in this FieldList. + </param> + <returns> + true if this FieldList contains an element with the specified key; + otherwise, false. + </returns> + </member> + <member name="M:DevAge.Text.FixedLength.FieldList.ContainsKey(System.String)"> + <summary> + Determines whether this FieldList contains a specific key. + </summary> + <param name="key"> + The string key to locate in this FieldList. + </param> + <returns> + true if this FieldList contains an element with the specified key; + otherwise, false. + </returns> + </member> + <member name="M:DevAge.Text.FixedLength.FieldList.ContainsValue(DevAge.Text.FixedLength.IField)"> + <summary> + Determines whether this FieldList contains a specific value. + </summary> + <param name="value"> + The IField value to locate in this FieldList. + </param> + <returns> + true if this FieldList contains an element with the specified value; + otherwise, false. + </returns> + </member> + <member name="M:DevAge.Text.FixedLength.FieldList.Remove(System.String)"> + <summary> + Removes the element with the specified key from this FieldList. + </summary> + <param name="fieldName"> + The string key of the element to remove. + </param> + </member> + <member name="P:DevAge.Text.FixedLength.FieldList.Item(System.String)"> + <summary> + Gets or sets the IField associated with the given string + </summary> + <param name="key"> + The string whose value to get or set. + </param> + </member> + <member name="P:DevAge.Text.FixedLength.FieldList.Keys"> + <summary> + Gets a collection containing the keys in this FieldList. + </summary> + </member> + <member name="P:DevAge.Text.FixedLength.FieldList.Values"> + <summary> + Gets a collection containing the values in this FieldList. + </summary> + </member> + <member name="T:DevAge.Shell.Utilities"> + <summary> + Shell utilities + </summary> + </member> + <member name="T:DevAge.Patterns.ActivityCanceledException"> + <summary> + Exception fired when canceling an activity with the Cancel method. + </summary> + </member> + <member name="M:DevAge.Patterns.ActivityCanceledException.#ctor"> + <summary> + Constructor + </summary> + </member> + <member name="T:DevAge.Patterns.ActivityStatusNotValidException"> + <summary> + Exception fired when canceling an activity with the Cancel method. + </summary> + </member> + <member name="M:DevAge.Patterns.ActivityStatusNotValidException.#ctor"> + <summary> + Constructor + </summary> + </member> + <member name="T:DevAge.Patterns.TimeOutActivityException"> + <summary> + Exception fired when a time out is encountered. + </summary> + </member> + <member name="M:DevAge.Patterns.TimeOutActivityException.#ctor"> + <summary> + Constructor + </summary> + </member> + <member name="T:DevAge.Patterns.SubActivityException"> + <summary> + Exception fired when a time out is encountered. + </summary> + </member> + <member name="M:DevAge.Patterns.SubActivityException.#ctor(System.String,System.Exception)"> + <summary> + Constructor + </summary> + <param name="activityName"></param> + <param name="innerException"></param> + </member> + <member name="T:DevAge.IO.IsolatedStorage.IsolatedStorageSettingBase"> + <summary> + Abstract class that help to save settings in the isolated storage + </summary> + </member> + <member name="T:DevAge.ComponentModel.Validator.ValidatorTypeConverter"> + <summary> + A string editor that use a TypeConverter for conversion. + </summary> + </member> + <member name="T:DevAge.ComponentModel.Validator.ValidatorBase"> + <summary> + A base class to support value conversion and validation. This class is used if no conversion is required or as a base class for specialized validator. + Naming Legend: + Object = an object not yet converted for the current validator, + Value = an object already converted and valid for the current validator, + String = a string that can be used for conversion to and from Value, + DisplayString = a string representation of the Value + </summary> + </member> + <member name="T:DevAge.ComponentModel.ComponentLight"> + <summary> + A IComponent implementation, used as a base class for component derived class. It is similar to the System Component class but doesn't derive from MarshalByRef class, for this reason it is faster and consume less resources. + Can be serialized. + </summary> + </member> + <member name="M:DevAge.ComponentModel.ComponentLight.#ctor"> + <summary> + Default constructor + </summary> + </member> + <member name="M:DevAge.ComponentModel.ComponentLight.#ctor(DevAge.ComponentModel.ComponentLight)"> + <summary> + Copy constructor + </summary> + <param name="other"></param> + </member> + <member name="T:DevAge.ComponentModel.Validator.IValidator"> + <summary> + An interface to support value conversion and validation. + Naming Legend: + Object = an object not yet converted for the current validator, + Value = an object already converted and valid for the current validator, + String = a string that can be used for conversion to and from Value, + DisplayString = a string representation of the Value + </summary> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.IsNullString(System.String)"> + <summary> + Returns true if the string is null or if is equals to the NullString + </summary> + <param name="p_str"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.ObjectToValue(System.Object)"> + <summary> + Convert an object according to the current ValueType of the validator + </summary> + <param name="p_Object"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToObject(System.Object,System.Type)"> + <summary> + Convert a value valid for the current validator ValueType to an object with the Type specified. Throw an exception on error. + </summary> + <param name="p_Value"></param> + <param name="p_ReturnObjectType"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToString(System.Object)"> + <summary> + Convert a value valid for the current validator ValueType to a string that can be used for other conversions, for example StringToValue method. + </summary> + <param name="p_Value"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.StringToValue(System.String)"> + <summary> + Converts a string to an object according to the type of the string editor + </summary> + <param name="p_str"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.IsStringConversionSupported"> + <summary> + Returns true if string conversion is suported. AllowStringConversion must be true and the current Validator must support string conversion. + </summary> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToDisplayString(System.Object)"> + <summary> + Converts a value valid for this validator valuetype to a string representation. The string cannot be used for conversion. + If the validator support string conversion this method simply call ValueToString otherwise call Value.ToString() + </summary> + <param name="p_Value"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidValue(System.Object)"> + <summary> + Returns true if the value is valid for this type of editor without any conversion. + </summary> + <param name="p_Value"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidObject(System.Object)"> + <summary> + Returns true if the object is valid for this type of validator, using conversion functions. + </summary> + <param name="p_Object"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidObject(System.Object,System.Object@)"> + <summary> + Returns true if the object is valid for this type of validator, using conversion functions. Returns as parameter the value converted. + </summary> + <param name="p_Object"></param> + <param name="p_ValueConverted"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidString(System.String)"> + <summary> + Returns true if the string is valid for this type of editor, using string conversion function. + </summary> + <param name="p_strValue"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidString(System.String,System.Object@)"> + <summary> + Returns true if the string is valid for this type of editor, using string conversion function. An returns the object converted. + </summary> + <param name="p_strValue"></param> + <param name="p_ValueConverted"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.IsInStandardValues(System.Object)"> + <summary> + Returns true if the value specified is presents in the list StandardValues. + </summary> + <param name="p_Value"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.StandardValueAtIndex(System.Int32)"> + <summary> + Returns the standard values at the specified index. If StandardValues support IList use simple the indexer method otherwise loop troght the collection. + </summary> + <param name="p_Index"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.IValidator.StandardValuesIndexOf(System.Object)"> + <summary> + Returns the index of the specified standard value. -1 if not found. If StandardValues support IList use simple the indexer method otherwise loop troght the collection. + </summary> + <param name="p_StandardValue"></param> + <returns></returns> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.AllowNull"> + <summary> + True to allow null object value or NullString string Value + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.NullString"> + <summary> + Null string representation. A string is null when is null or when is equals to this string. Default is empty string. + Used by ValueToString and StringToValue + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.NullDisplayString"> + <summary> + Null string representation. A string is null when is null or when is equals to this string. Default is empty string. + Used by ValueToDisplayString + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.AllowStringConversion"> + <summary> + Gets or Sets if the string conversion is allowed. + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.MinimumValue"> + <summary> + Minimum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature. + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.MaximumValue"> + <summary> + Maximum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature. + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.ValueType"> + <summary> + Type allowed for the current editor. Cannot be null. + </summary> + </member> + <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingObjectToValue"> + <summary> + Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject + </summary> + </member> + <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingValueToObject"> + <summary> + Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject + </summary> + </member> + <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingValueToDisplayString"> + <summary> + Fired when converting a value to a display string. Called from method ValueToDisplayString + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.DefaultValue"> + <summary> + Default value for this editor, usually is the default value for the specified type. + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.StandardValues"> + <summary> + A list of values that this editor can support. If StandardValuesExclusive is true then the editor can only support one of these values. + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.StandardValuesExclusive"> + <summary> + If StandardValuesExclusive is true then the editor can only support the list specified in StandardValues. + </summary> + </member> + <member name="P:DevAge.ComponentModel.Validator.IValidator.CultureInfo"> + <summary> + Culture for conversion. If null the default user culture is used. Default is null. + </summary> + </member> + <member name="E:DevAge.ComponentModel.Validator.IValidator.Changed"> + <summary> + Fired when one of the properties of the Validator change. + </summary> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.#ctor"> + <summary> + Constructor. Initialize the class using a null type. + </summary> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.#ctor(System.Type)"> + <summary> + Constructor. + </summary> + <param name="type">The type used to validate the values. If null no validation is made.</param> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsNullString(System.String)"> + <summary> + Returns true if the string is null or if is equals to the NullString + </summary> + <param name="p_str"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ObjectToStringForError(System.Object)"> + <summary> + Returns a string used for error description for a specified object. Usually used when printing the object for the error message when there is a conversion error. + </summary> + <param name="val"></param> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ObjectToValue(System.Object)"> + <summary> + Convert an object according to the current ValueType of the validator + </summary> + <param name="p_Object"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToObject(System.Object,System.Type)"> + <summary> + Convert a value according to the current ValueType to an object with the Type specified. Throw an exception on error. + </summary> + <param name="p_Value"></param> + <param name="p_ReturnObjectType"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToString(System.Object)"> + <summary> + Converts a value object to a string representation + </summary> + <param name="p_Value"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StringToValue(System.String)"> + <summary> + Converts a string to an object according to the type of the string editor + </summary> + <param name="p_str"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsStringConversionSupported"> + <summary> + Returns true if string conversion is suported. AllowStringConversion must be true and the current Validator must support string conversion. + </summary> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToDisplayString(System.Object)"> + <summary> + Converts a value valid for this validator valuetype to a string representation. The string cannot be used for conversion. + If the validator support string conversion this method simply call ValueToString otherwise call Value.ToString() + </summary> + <param name="p_Value"></param> + <returns></returns> + </member> + <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingObjectToValue"> + <summary> + Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject + </summary> + </member> + <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingValueToObject"> + <summary> + Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject + </summary> + </member> + <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingValueToDisplayString"> + <summary> + Fired when converting a value to a display string. Called from method ValueToDisplayString + </summary> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingObjectToValue(DevAge.ComponentModel.ConvertingObjectEventArgs)"> + <summary> + Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject + </summary> + <param name="e"></param> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingValueToObject(DevAge.ComponentModel.ConvertingObjectEventArgs)"> + <summary> + Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject + </summary> + <param name="e"></param> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingValueToDisplayString(DevAge.ComponentModel.ConvertingObjectEventArgs)"> + <summary> + Fired when converting a value to a display string. Called from method ValueToDisplayString + </summary> + <param name="e"></param> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidValue(System.Object)"> + <summary> + Returns true if the value is valid for this type of editor without any conversion. + </summary> + <param name="p_Value"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidObject(System.Object)"> + <summary> + Returns true if the object is valid for this type of validator, using conversion functions. + </summary> + <param name="p_Object"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidObject(System.Object,System.Object@)"> + <summary> + Returns true if the object is valid for this type of validator, using conversion functions. Returns as parameter the value converted. + </summary> + <param name="p_Object"></param> + <param name="p_ValueConverted"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidString(System.String)"> + <summary> + Returns true if the string is valid for this type of editor, using string conversion function. + </summary> + <param name="p_strValue"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidString(System.String,System.Object@)"> + <summary> + Returns true if the string is valid for this type of editor, using string conversion function. Returns as out parameter the object converted. + </summary> + <param name="p_strValue"></param> + <param name="p_ValueConverted"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsInStandardValues(System.Object)"> + <summary> + Returns true if the value specified is presents in the list StandardValues. + </summary> + <param name="p_Value"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StandardValueAtIndex(System.Int32)"> + <summary> + Returns the standard values at the specified index. If StandardValues support IList use simple the indexer method otherwise loop troght the collection. + </summary> + <param name="p_Index"></param> + <returns></returns> + </member> + <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StandardValuesIndexOf(System.Object)"> + <summary> + Returns the index of the specified standard value. -1 if not found. If StandardValues support IList use simple the indexer method otherwise loop troght the collection. + </summary> + ... [truncated message content] |
From: <che...@us...> - 2007-06-10 07:42:36
|
Revision: 501 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=501&view=rev Author: chef_koch Date: 2007-06-10 00:42:31 -0700 (Sun, 10 Jun 2007) Log Message: ----------- winStyleComboBox is now DropDownList, instead of DropDown Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-06-10 07:32:21 UTC (rev 500) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs 2007-06-10 07:42:31 UTC (rev 501) @@ -181,6 +181,7 @@ // winStyleComboBox // this.winStyleComboBox.BackColor = System.Drawing.SystemColors.Window; + this.winStyleComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.winStyleComboBox.FormattingEnabled = true; this.winStyleComboBox.Items.AddRange(new object[] { "Normal", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-06-10 07:32:22
|
Revision: 500 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=500&view=rev Author: chef_koch Date: 2007-06-10 00:32:21 -0700 (Sun, 10 Jun 2007) Log Message: ----------- minor formatting changes (fixed tabs with 4 spaces to 2) Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.Designer.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-06-09 21:00:05 UTC (rev 499) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-06-10 07:32:21 UTC (rev 500) @@ -1,140 +1,140 @@ namespace GUIPrograms.Design { - partial class AppFilesImportProgress + partial class AppFilesImportProgress + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer 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) { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } - /// <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 - #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.progressBar = new System.Windows.Forms.ProgressBar(); + this.progressTextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // enabledCheckbox + // + this.toolTip.SetToolTip(this.enabledCheckbox, "Only enabled items will appear in MediaPortal"); + // + // titleTextBox + // + this.toolTip.SetToolTip(this.titleTextBox, "This text will appear in the listitem of MediaPortal\r\n(mandatory)"); + // + // shellexecuteCheckBox + // + this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + + "extension.\r\nYou can omit the \"Launching Application\" in this case."); + // + // applicationArgumentsLabel + // + this.toolTip.SetToolTip(this.applicationArgumentsLabel, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + + "%FILE% if the filename needs to be placed in some specific place between several" + + " arguments)"); + // + // applicationImageTextBox + // + this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); + // + // winStyleComboBox + // + this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + + "gration in MediaPortal"); + // + // startupDirTextBox + // + this.toolTip.SetToolTip(this.startupDirTextBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + + "EDIR% if you want to use the directory where the launched file is stored)"); + // + // quoteCheckBox + // + this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + + "le quotes though!"); + // + // allowRefreshCheckBox + // + this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + + ""); + // + // progressBar + // + this.progressBar.Location = new System.Drawing.Point(0, 97); + this.progressBar.Name = "progressBar"; + this.progressBar.Size = new System.Drawing.Size(350, 31); + this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous; + this.progressBar.TabIndex = 35; + // + // progressTextBox + // + this.progressTextBox.Location = new System.Drawing.Point(3, 43); + this.progressTextBox.Multiline = true; + this.progressTextBox.Name = "progressTextBox"; + this.progressTextBox.ReadOnly = true; + this.progressTextBox.Size = new System.Drawing.Size(347, 47); + this.progressTextBox.TabIndex = 34; + // + // AppFilesImportProgress + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.progressTextBox); + this.Controls.Add(this.progressBar); + this.Name = "AppFilesImportProgress"; + this.Size = new System.Drawing.Size(497, 550); + this.Load += new System.EventHandler(this.AppFilesImportProgress_Load); + this.Controls.SetChildIndex(this.prePostButton, 0); + this.Controls.SetChildIndex(this.progressBar, 0); + this.Controls.SetChildIndex(this.progressTextBox, 0); + this.Controls.SetChildIndex(this.winTypeLabel, 0); + this.Controls.SetChildIndex(this.enabledCheckbox, 0); + this.Controls.SetChildIndex(this.titleLabel, 0); + this.Controls.SetChildIndex(this.applicationExeLabel, 0); + this.Controls.SetChildIndex(this.titleTextBox, 0); + this.Controls.SetChildIndex(this.applicationExeButton, 0); + this.Controls.SetChildIndex(this.shellexecuteCheckBox, 0); + this.Controls.SetChildIndex(this.waitExitCheckBox, 0); + this.Controls.SetChildIndex(this.applicationImageLabel, 0); + this.Controls.SetChildIndex(this.applicationArgumentsLabel, 0); + this.Controls.SetChildIndex(this.applicationImageTextBox, 0); + this.Controls.SetChildIndex(this.applicationArgumentsTextBox, 0); + this.Controls.SetChildIndex(this.winStyleLabel, 0); + this.Controls.SetChildIndex(this.winStyleComboBox, 0); + this.Controls.SetChildIndex(this.startupDirTextBox, 0); + this.Controls.SetChildIndex(this.startupDirLabel, 0); + this.Controls.SetChildIndex(this.quoteCheckBox, 0); + this.Controls.SetChildIndex(this.applicationImageButton, 0); + this.Controls.SetChildIndex(this.startupDirButton, 0); + this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); + this.Controls.SetChildIndex(this.informationLabel, 0); + this.Controls.SetChildIndex(this.applicationExeTextBox, 0); + this.ResumeLayout(false); + this.PerformLayout(); - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.progressBar = new System.Windows.Forms.ProgressBar(); - this.progressTextBox = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // enabledCheckbox - // - this.toolTip.SetToolTip(this.enabledCheckbox, "Only enabled items will appear in MediaPortal"); - // - // titleTextBox - // - this.toolTip.SetToolTip(this.titleTextBox, "This text will appear in the listitem of MediaPortal\r\n(mandatory)"); - // - // shellexecuteCheckBox - // - this.toolTip.SetToolTip(this.shellexecuteCheckBox, "Enable this if you want to run a program that is associated with a specific file-" + - "extension.\r\nYou can omit the \"Launching Application\" in this case."); - // - // applicationArgumentsLabel - // - this.toolTip.SetToolTip(this.applicationArgumentsLabel, "Optional arguments that are needed to launch the program \r\n\r\n(advanced hint: Use " + - "%FILE% if the filename needs to be placed in some specific place between several" + - " arguments)"); - // - // applicationImageTextBox - // - this.toolTip.SetToolTip(this.applicationImageTextBox, "Optional filename for an image to display in MediaPortal"); - // - // winStyleComboBox - // - this.toolTip.SetToolTip(this.winStyleComboBox, "Appearance of the launched program. \r\nTry HIDDEN or MINIMIZED for a seamless inte" + - "gration in MediaPortal"); - // - // startupDirTextBox - // - this.toolTip.SetToolTip(this.startupDirTextBox, "Optional path that is passed as the launch-directory \r\n\r\n(advanced hint: Use %FIL" + - "EDIR% if you want to use the directory where the launched file is stored)"); - // - // quoteCheckBox - // - this.toolTip.SetToolTip(this.quoteCheckBox, "Quotes are usually needed to handle filenames with spaces correctly. \r\nAvoid doub" + - "le quotes though!"); - // - // allowRefreshCheckBox - // - this.toolTip.SetToolTip(this.allowRefreshCheckBox, "Check this if users can run the import through the REFRESH button in MediaPortal." + - ""); - // - // progressBar - // - this.progressBar.Location = new System.Drawing.Point(0, 97); - this.progressBar.Name = "progressBar"; - this.progressBar.Size = new System.Drawing.Size(350, 31); - this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.progressBar.TabIndex = 35; - // - // progressTextBox - // - this.progressTextBox.Location = new System.Drawing.Point(3, 43); - this.progressTextBox.Multiline = true; - this.progressTextBox.Name = "progressTextBox"; - this.progressTextBox.ReadOnly = true; - this.progressTextBox.Size = new System.Drawing.Size(347, 47); - this.progressTextBox.TabIndex = 34; - // - // AppFilesImportProgress - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.progressTextBox); - this.Controls.Add(this.progressBar); - this.Name = "AppFilesImportProgress"; - this.Size = new System.Drawing.Size(497, 550); - this.Load += new System.EventHandler(this.AppFilesImportProgress_Load); - this.Controls.SetChildIndex(this.prePostButton, 0); - this.Controls.SetChildIndex(this.progressBar, 0); - this.Controls.SetChildIndex(this.progressTextBox, 0); - this.Controls.SetChildIndex(this.winTypeLabel, 0); - this.Controls.SetChildIndex(this.enabledCheckbox, 0); - this.Controls.SetChildIndex(this.titleLabel, 0); - this.Controls.SetChildIndex(this.applicationExeLabel, 0); - this.Controls.SetChildIndex(this.titleTextBox, 0); - this.Controls.SetChildIndex(this.applicationExeButton, 0); - this.Controls.SetChildIndex(this.shellexecuteCheckBox, 0); - this.Controls.SetChildIndex(this.waitExitCheckBox, 0); - this.Controls.SetChildIndex(this.applicationImageLabel, 0); - this.Controls.SetChildIndex(this.applicationArgumentsLabel, 0); - this.Controls.SetChildIndex(this.applicationImageTextBox, 0); - this.Controls.SetChildIndex(this.applicationArgumentsTextBox, 0); - this.Controls.SetChildIndex(this.winStyleLabel, 0); - this.Controls.SetChildIndex(this.winStyleComboBox, 0); - this.Controls.SetChildIndex(this.startupDirTextBox, 0); - this.Controls.SetChildIndex(this.startupDirLabel, 0); - this.Controls.SetChildIndex(this.quoteCheckBox, 0); - this.Controls.SetChildIndex(this.applicationImageButton, 0); - this.Controls.SetChildIndex(this.startupDirButton, 0); - this.Controls.SetChildIndex(this.allowRefreshCheckBox, 0); - this.Controls.SetChildIndex(this.informationLabel, 0); - this.Controls.SetChildIndex(this.applicationExeTextBox, 0); - this.ResumeLayout(false); - this.PerformLayout(); + } - } + #endregion - #endregion + private System.Windows.Forms.ProgressBar progressBar; + private System.Windows.Forms.TextBox progressTextBox; - private System.Windows.Forms.ProgressBar progressBar; - private System.Windows.Forms.TextBox progressTextBox; - - } -} + } +} \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-06-09 21:00:05 UTC (rev 499) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-06-10 07:32:21 UTC (rev 500) @@ -1,448 +1,448 @@ -namespace GUIPrograms.Design +namespace GUIPrograms.Design { - partial class AppFilesView + partial class AppFilesView + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer 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) { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } - /// <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 - #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.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AppFilesView)); - this.fileListView = new System.Windows.Forms.ListView(); - this.fileTitle = new System.Windows.Forms.ColumnHeader(); - this.smallImageList = new System.Windows.Forms.ImageList(this.components); - this.newButton = new System.Windows.Forms.Button(); - this.editButton = new System.Windows.Forms.Button(); - this.deleteButton = new System.Windows.Forms.Button(); - this.launchButton = new System.Windows.Forms.Button(); - this.scanImageDirsButton = new System.Windows.Forms.Button(); - this.addFavouriteButton = new System.Windows.Forms.Button(); - this.internetSearchButton = new System.Windows.Forms.Button(); - this.updateDatabaseButton = new System.Windows.Forms.Button(); - this.contextFavouritesMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); - this.grouperToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.fileExtensionsTextBox = new System.Windows.Forms.TextBox(); - this.imageDirsTextBox = new System.Windows.Forms.TextBox(); - this.fileDirTextBox = new System.Windows.Forms.TextBox(); - this.fileDirButton = new System.Windows.Forms.Button(); - this.fileExtensionsbutton = new System.Windows.Forms.Button(); - this.imageDirButton = new System.Windows.Forms.Button(); - this.fileExtensionsLabel = new System.Windows.Forms.Label(); - this.imageDirsLabel = new System.Windows.Forms.Label(); - this.fileDirLabel = new System.Windows.Forms.Label(); - this.filesGroupBox = new System.Windows.Forms.GroupBox(); - this.importPlaychoiceCheckBox = new System.Windows.Forms.CheckBox(); - this.importMahjongCheckBox = new System.Windows.Forms.CheckBox(); - this.validImagesCheckBox = new System.Windows.Forms.CheckBox(); - this.importOriginalsCheckBox = new System.Windows.Forms.CheckBox(); - this.FileSettingsGroupBox = new System.Windows.Forms.GroupBox(); - this.gamebaseDBTextBox = new System.Windows.Forms.TextBox(); - this.gamebaseLabel = new System.Windows.Forms.Label(); - this.gamebaseDBButton = new System.Windows.Forms.Button(); - this.toolTip = new System.Windows.Forms.ToolTip(this.components); - this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); - this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); - this.contextFavouritesMenuStrip.SuspendLayout(); - this.filesGroupBox.SuspendLayout(); - this.FileSettingsGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // fileListView - // - this.fileListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + /// <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(AppFilesView)); + this.fileListView = new System.Windows.Forms.ListView(); + this.fileTitle = new System.Windows.Forms.ColumnHeader(); + this.smallImageList = new System.Windows.Forms.ImageList(this.components); + this.newButton = new System.Windows.Forms.Button(); + this.editButton = new System.Windows.Forms.Button(); + this.deleteButton = new System.Windows.Forms.Button(); + this.launchButton = new System.Windows.Forms.Button(); + this.scanImageDirsButton = new System.Windows.Forms.Button(); + this.addFavouriteButton = new System.Windows.Forms.Button(); + this.internetSearchButton = new System.Windows.Forms.Button(); + this.updateDatabaseButton = new System.Windows.Forms.Button(); + this.contextFavouritesMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); + this.grouperToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.fileExtensionsTextBox = new System.Windows.Forms.TextBox(); + this.imageDirsTextBox = new System.Windows.Forms.TextBox(); + this.fileDirTextBox = new System.Windows.Forms.TextBox(); + this.fileDirButton = new System.Windows.Forms.Button(); + this.fileExtensionsbutton = new System.Windows.Forms.Button(); + this.imageDirButton = new System.Windows.Forms.Button(); + this.fileExtensionsLabel = new System.Windows.Forms.Label(); + this.imageDirsLabel = new System.Windows.Forms.Label(); + this.fileDirLabel = new System.Windows.Forms.Label(); + this.filesGroupBox = new System.Windows.Forms.GroupBox(); + this.importPlaychoiceCheckBox = new System.Windows.Forms.CheckBox(); + this.importMahjongCheckBox = new System.Windows.Forms.CheckBox(); + this.validImagesCheckBox = new System.Windows.Forms.CheckBox(); + this.importOriginalsCheckBox = new System.Windows.Forms.CheckBox(); + this.FileSettingsGroupBox = new System.Windows.Forms.GroupBox(); + this.gamebaseDBTextBox = new System.Windows.Forms.TextBox(); + this.gamebaseLabel = new System.Windows.Forms.Label(); + this.gamebaseDBButton = new System.Windows.Forms.Button(); + this.toolTip = new System.Windows.Forms.ToolTip(this.components); + this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); + this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.contextFavouritesMenuStrip.SuspendLayout(); + this.filesGroupBox.SuspendLayout(); + this.FileSettingsGroupBox.SuspendLayout(); + this.SuspendLayout(); + // + // fileListView + // + this.fileListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.fileTitle}); - this.fileListView.FullRowSelect = true; - this.fileListView.HideSelection = false; - this.fileListView.Location = new System.Drawing.Point(8, 19); - this.fileListView.Name = "fileListView"; - this.fileListView.Size = new System.Drawing.Size(276, 343); - this.fileListView.SmallImageList = this.smallImageList; - this.fileListView.TabIndex = 1; - this.fileListView.UseCompatibleStateImageBehavior = false; - this.fileListView.View = System.Windows.Forms.View.Details; - this.fileListView.DoubleClick += new System.EventHandler(this.fileListView_DoubleClick); - this.fileListView.SelectedIndexChanged += new System.EventHandler(this.fileListView_SelectedIndexChanged); - // - // fileTitle - // - this.fileTitle.Text = "Title"; - this.fileTitle.Width = 239; - // - // smallImageList - // - this.smallImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("smallImageList.ImageStream"))); - this.smallImageList.TransparentColor = System.Drawing.Color.Transparent; - this.smallImageList.Images.SetKeyName(0, "folder.ico"); - this.smallImageList.Images.SetKeyName(1, "file.ico"); - this.smallImageList.Images.SetKeyName(2, "shortcut.ico"); - // - // newButton - // - this.newButton.Location = new System.Drawing.Point(299, 19); - this.newButton.Name = "newButton"; - this.newButton.Size = new System.Drawing.Size(81, 23); - this.newButton.TabIndex = 2; - this.newButton.Text = "New"; - this.newButton.UseVisualStyleBackColor = true; - this.newButton.Click += new System.EventHandler(this.newButton_Click); - // - // editButton - // - this.editButton.Location = new System.Drawing.Point(299, 48); - this.editButton.Name = "editButton"; - this.editButton.Size = new System.Drawing.Size(81, 23); - this.editButton.TabIndex = 3; - this.editButton.Text = "Edit"; - this.editButton.UseVisualStyleBackColor = true; - this.editButton.Click += new System.EventHandler(this.editButton_Click); - // - // deleteButton - // - this.deleteButton.Location = new System.Drawing.Point(299, 77); - this.deleteButton.Name = "deleteButton"; - this.deleteButton.Size = new System.Drawing.Size(81, 23); - this.deleteButton.TabIndex = 4; - this.deleteButton.Text = "Delete"; - this.deleteButton.UseVisualStyleBackColor = true; - this.deleteButton.Click += new System.EventHandler(this.deleteButton_Click); - // - // launchButton - // - this.launchButton.Location = new System.Drawing.Point(299, 148); - this.launchButton.Name = "launchButton"; - this.launchButton.Size = new System.Drawing.Size(81, 23); - this.launchButton.TabIndex = 5; - this.launchButton.Text = "Launch"; - this.launchButton.UseVisualStyleBackColor = true; - this.launchButton.Click += new System.EventHandler(this.launchButton_Click); - // - // scanImageDirsButton - // - this.scanImageDirsButton.Location = new System.Drawing.Point(394, 64); - this.scanImageDirsButton.Name = "scanImageDirsButton"; - this.scanImageDirsButton.Size = new System.Drawing.Size(81, 36); - this.scanImageDirsButton.TabIndex = 6; - this.scanImageDirsButton.Text = "(Re)Scan Imagefolders"; - this.scanImageDirsButton.UseVisualStyleBackColor = true; - this.scanImageDirsButton.Click += new System.EventHandler(this.scanImageDirsButton_Click); - // - // addFavouriteButton - // - this.addFavouriteButton.Location = new System.Drawing.Point(299, 106); - this.addFavouriteButton.Name = "addFavouriteButton"; - this.addFavouriteButton.Size = new System.Drawing.Size(81, 36); - this.addFavouriteButton.TabIndex = 7; - this.addFavouriteButton.Text = "Add to favourites"; - this.addFavouriteButton.UseVisualStyleBackColor = true; - this.addFavouriteButton.Click += new System.EventHandler(this.addFavoriteButton_Click); - // - // internetSearchButton - // - this.internetSearchButton.Location = new System.Drawing.Point(394, 106); - this.internetSearchButton.Name = "internetSearchButton"; - this.internetSearchButton.Size = new System.Drawing.Size(81, 36); - this.internetSearchButton.TabIndex = 8; - this.internetSearchButton.Text = "Internet search"; - this.internetSearchButton.UseVisualStyleBackColor = true; - this.internetSearchButton.Click += new System.EventHandler(this.internetSearchButton_Click); - // - // updateDatabaseButton - // - this.updateDatabaseButton.Location = new System.Drawing.Point(394, 19); - this.updateDatabaseButton.Name = "updateDatabaseButton"; - this.updateDatabaseButton.Size = new System.Drawing.Size(81, 35); - this.updateDatabaseButton.TabIndex = 9; - this.updateDatabaseButton.Text = "Update database"; - this.updateDatabaseButton.UseVisualStyleBackColor = true; - this.updateDatabaseButton.Click += new System.EventHandler(this.updateDatabaseButton_Click); - // - // contextFavouritesMenuStrip - // - this.contextFavouritesMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileListView.FullRowSelect = true; + this.fileListView.HideSelection = false; + this.fileListView.Location = new System.Drawing.Point(8, 19); + this.fileListView.Name = "fileListView"; + this.fileListView.Size = new System.Drawing.Size(276, 343); + this.fileListView.SmallImageList = this.smallImageList; + this.fileListView.TabIndex = 1; + this.fileListView.UseCompatibleStateImageBehavior = false; + this.fileListView.View = System.Windows.Forms.View.Details; + this.fileListView.DoubleClick += new System.EventHandler(this.fileListView_DoubleClick); + this.fileListView.SelectedIndexChanged += new System.EventHandler(this.fileListView_SelectedIndexChanged); + // + // fileTitle + // + this.fileTitle.Text = "Title"; + this.fileTitle.Width = 239; + // + // smallImageList + // + this.smallImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("smallImageList.ImageStream"))); + this.smallImageList.TransparentColor = System.Drawing.Color.Transparent; + this.smallImageList.Images.SetKeyName(0, "folder.ico"); + this.smallImageList.Images.SetKeyName(1, "file.ico"); + this.smallImageList.Images.SetKeyName(2, "shortcut.ico"); + // + // newButton + // + this.newButton.Location = new System.Drawing.Point(299, 19); + this.newButton.Name = "newButton"; + this.newButton.Size = new System.Drawing.Size(81, 23); + this.newButton.TabIndex = 2; + this.newButton.Text = "New"; + this.newButton.UseVisualStyleBackColor = true; + this.newButton.Click += new System.EventHandler(this.newButton_Click); + // + // editButton + // + this.editButton.Location = new System.Drawing.Point(299, 48); + this.editButton.Name = "editButton"; + this.editButton.Size = new System.Drawing.Size(81, 23); + this.editButton.TabIndex = 3; + this.editButton.Text = "Edit"; + this.editButton.UseVisualStyleBackColor = true; + this.editButton.Click += new System.EventHandler(this.editButton_Click); + // + // deleteButton + // + this.deleteButton.Location = new System.Drawing.Point(299, 77); + this.deleteButton.Name = "deleteButton"; + this.deleteButton.Size = new System.Drawing.Size(81, 23); + this.deleteButton.TabIndex = 4; + this.deleteButton.Text = "Delete"; + this.deleteButton.UseVisualStyleBackColor = true; + this.deleteButton.Click += new System.EventHandler(this.deleteButton_Click); + // + // launchButton + // + this.launchButton.Location = new System.Drawing.Point(299, 148); + this.launchButton.Name = "launchButton"; + this.launchButton.Size = new System.Drawing.Size(81, 23); + this.launchButton.TabIndex = 5; + this.launchButton.Text = "Launch"; + this.launchButton.UseVisualStyleBackColor = true; + this.launchButton.Click += new System.EventHandler(this.launchButton_Click); + // + // scanImageDirsButton + // + this.scanImageDirsButton.Location = new System.Drawing.Point(394, 64); + this.scanImageDirsButton.Name = "scanImageDirsButton"; + this.scanImageDirsButton.Size = new System.Drawing.Size(81, 36); + this.scanImageDirsButton.TabIndex = 6; + this.scanImageDirsButton.Text = "(Re)Scan Imagefolders"; + this.scanImageDirsButton.UseVisualStyleBackColor = true; + this.scanImageDirsButton.Click += new System.EventHandler(this.scanImageDirsButton_Click); + // + // addFavouriteButton + // + this.addFavouriteButton.Location = new System.Drawing.Point(299, 106); + this.addFavouriteButton.Name = "addFavouriteButton"; + this.addFavouriteButton.Size = new System.Drawing.Size(81, 36); + this.addFavouriteButton.TabIndex = 7; + this.addFavouriteButton.Text = "Add to favourites"; + this.addFavouriteButton.UseVisualStyleBackColor = true; + this.addFavouriteButton.Click += new System.EventHandler(this.addFavoriteButton_Click); + // + // internetSearchButton + // + this.internetSearchButton.Location = new System.Drawing.Point(394, 106); + this.internetSearchButton.Name = "internetSearchButton"; + this.internetSearchButton.Size = new System.Drawing.Size(81, 36); + this.internetSearchButton.TabIndex = 8; + this.internetSearchButton.Text = "Internet search"; + this.internetSearchButton.UseVisualStyleBackColor = true; + this.internetSearchButton.Click += new System.EventHandler(this.internetSearchButton_Click); + // + // updateDatabaseButton + // + this.updateDatabaseButton.Location = new System.Drawing.Point(394, 19); + this.updateDatabaseButton.Name = "updateDatabaseButton"; + this.updateDatabaseButton.Size = new System.Drawing.Size(81, 35); + this.updateDatabaseButton.TabIndex = 9; + this.updateDatabaseButton.Text = "Update database"; + this.updateDatabaseButton.UseVisualStyleBackColor = true; + this.updateDatabaseButton.Click += new System.EventHandler(this.updateDatabaseButton_Click); + // + // contextFavouritesMenuStrip + // + 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.Opening += new System.ComponentModel.CancelEventHandler(this.contextFavouritesMenuStrip_Opening); - // - // grouperToolStripMenuItem - // - this.grouperToolStripMenuItem.Name = "grouperToolStripMenuItem"; - this.grouperToolStripMenuItem.Size = new System.Drawing.Size(117, 22); - this.grouperToolStripMenuItem.Text = "Grouper"; - // - // fileExtensionsTextBox - // - this.fileExtensionsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.fileExtensionsTextBox.Location = new System.Drawing.Point(85, 71); - this.fileExtensionsTextBox.Name = "fileExtensionsTextBox"; - this.fileExtensionsTextBox.Size = new System.Drawing.Size(330, 20); - this.fileExtensionsTextBox.TabIndex = 28; - // - // imageDirsTextBox - // - this.imageDirsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.imageDirsTextBox.Location = new System.Drawing.Point(85, 45); - this.imageDirsTextBox.Name = "imageDirsTextBox"; - this.imageDirsTextBox.Size = new System.Drawing.Size(330, 20); - this.imageDirsTextBox.TabIndex = 27; - // - // fileDirTextBox - // - this.fileDirTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.fileDirTextBox.Location = new System.Drawing.Point(85, 19); - this.fileDirTextBox.Name = "fileDirTextBox"; - this.fileDirTextBox.Size = new System.Drawing.Size(330, 20); - this.fileDirTextBox.TabIndex = 26; - // - // fileDirButton - // - this.fileDirButton.Image = ((System.Drawing.Image)(resources.GetObject("fileDirButton.Image"))); - this.fileDirButton.Location = new System.Drawing.Point(426, 16); - this.fileDirButton.Name = "fileDirButton"; - this.fileDirButton.Size = new System.Drawing.Size(31, 23); - this.fileDirButton.TabIndex = 39; - this.fileDirButton.UseVisualStyleBackColor = true; - this.fileDirButton.Click += new System.EventHandler(this.fileDirButton_Click); - // - // fileExtensionsbutton - // - this.fileExtensionsbutton.Image = ((System.Drawing.Image)(resources.GetObject("fileExtensionsbutton.Image"))); - this.fileExtensionsbutton.Location = new System.Drawing.Point(426, 68); - this.fileExtensionsbutton.Name = "fileExtensionsbutton"; - this.fileExtensionsbutton.Size = new System.Drawing.Size(31, 23); - this.fileExtensionsbutton.TabIndex = 38; - this.fileExtensionsbutton.UseVisualStyleBackColor = true; - this.fileExtensionsbutton.Click += new System.EventHandler(this.fileExtensionsbutton_Click); - // - // imageDirButton - // - this.imageDirButton.Image = ((System.Drawing.Image)(resources.GetObject("imageDirButton.Image"))); - this.imageDirButton.Location = new System.Drawing.Point(426, 42); - this.imageDirButton.Name = "imageDirButton"; - this.imageDirButton.Size = new System.Drawing.Size(31, 23); - this.imageDirButton.TabIndex = 37; - this.imageDirButton.UseVisualStyleBackColor = true; - this.imageDirButton.Click += new System.EventHandler(this.imageDirButton_Click); - // - // fileExtensionsLabel - // - this.fileExtensionsLabel.Location = new System.Drawing.Point(2, 71); - this.fileExtensionsLabel.Name = "fileExtensionsLabel"; - this.fileExtensionsLabel.Size = new System.Drawing.Size(93, 20); - this.fileExtensionsLabel.TabIndex = 36; - this.fileExtensionsLabel.Text = "Fileextensions:"; - this.fileExtensionsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // imageDirsLabel - // - this.imageDirsLabel.Location = new System.Drawing.Point(2, 43); - this.imageDirsLabel.Name = "imageDirsLabel"; - this.imageDirsLabel.Size = new System.Drawing.Size(93, 20); - this.imageDirsLabel.TabIndex = 35; - this.imageDirsLabel.Text = "Image Dir:"; - this.imageDirsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // fileDirLabel - // - this.fileDirLabel.Location = new System.Drawing.Point(2, 19); - this.fileDirLabel.Name = "fileDirLabel"; - this.fileDirLabel.Size = new System.Drawing.Size(93, 20); - this.fileDirLabel.TabIndex = 34; - this.fileDirLabel.Text = "File Directory(s):"; - this.fileDirLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // filesGroupBox - // - this.filesGroupBox.BackColor = System.Drawing.SystemColors.Control; - this.filesGroupBox.Controls.Add(this.importPlaychoiceCheckBox); - this.filesGroupBox.Controls.Add(this.importMahjongCheckBox); - this.filesGroupBox.Controls.Add(this.validImagesCheckBox); - this.filesGroupBox.Controls.Add(this.importOriginalsCheckBox); - this.filesGroupBox.Controls.Add(this.fileListView); - this.filesGroupBox.Controls.Add(this.newButton); - this.filesGroupBox.Controls.Add(this.editButton); - this.filesGroupBox.Controls.Add(this.deleteButton); - this.filesGroupBox.Controls.Add(this.launchButton); - this.filesGroupBox.Controls.Add(this.updateDatabaseButton); - this.filesGroupBox.Controls.Add(this.scanImageDirsButton); - this.filesGroupBox.Controls.Add(this.addFavouriteButton); - this.filesGroupBox.Controls.Add(this.internetSearchButton); - this.filesGroupBox.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.filesGroupBox.Location = new System.Drawing.Point(3, 4); - this.filesGroupBox.Name = "filesGroupBox"; - this.filesGroupBox.Size = new System.Drawing.Size(481, 387); - this.filesGroupBox.TabIndex = 40; - this.filesGroupBox.TabStop = false; - this.filesGroupBox.Text = "Files"; - // - // importPlaychoiceCheckBox - // - 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.TabIndex = 87; - this.importPlaychoiceCheckBox.Text = "Import Playchoice/Vs games"; - this.importPlaychoiceCheckBox.UseVisualStyleBackColor = true; - // - // importMahjongCheckBox - // - this.importMahjongCheckBox.AutoSize = true; - this.importMahjongCheckBox.Location = new System.Drawing.Point(299, 321); - this.importMahjongCheckBox.Name = "importMahjongCheckBox"; - this.importMahjongCheckBox.Size = new System.Drawing.Size(133, 17); - this.importMahjongCheckBox.TabIndex = 86; - this.importMahjongCheckBox.Text = "Import Mahjong games"; - this.importMahjongCheckBox.UseVisualStyleBackColor = true; - // - // validImagesCheckBox - // - this.validImagesCheckBox.AutoSize = true; - this.validImagesCheckBox.Location = new System.Drawing.Point(299, 275); - this.validImagesCheckBox.Name = "validImagesCheckBox"; - this.validImagesCheckBox.Size = new System.Drawing.Size(151, 17); - this.validImagesCheckBox.TabIndex = 84; - this.validImagesCheckBox.Text = "Only files with valid images"; - this.validImagesCheckBox.UseVisualStyleBackColor = true; - // - // importOriginalsCheckBox - // - this.importOriginalsCheckBox.AutoSize = true; - this.importOriginalsCheckBox.Location = new System.Drawing.Point(299, 298); - this.importOriginalsCheckBox.Name = "importOriginalsCheckBox"; - this.importOriginalsCheckBox.Size = new System.Drawing.Size(119, 17); - this.importOriginalsCheckBox.TabIndex = 85; - this.importOriginalsCheckBox.Text = "Only import originals"; - this.importOriginalsCheckBox.UseVisualStyleBackColor = true; - // - // FileSettingsGroupBox - // - this.FileSettingsGroupBox.BackColor = System.Drawing.SystemColors.Control; - this.FileSettingsGroupBox.Controls.Add(this.fileDirTextBox); - this.FileSettingsGroupBox.Controls.Add(this.gamebaseDBTextBox); - this.FileSettingsGroupBox.Controls.Add(this.gamebaseLabel); - this.FileSettingsGroupBox.Controls.Add(this.fileDirLabel); - this.FileSettingsGroupBox.Controls.Add(this.gamebaseDBButton); - this.FileSettingsGroupBox.Controls.Add(this.fileDirButton); - this.FileSettingsGroupBox.Controls.Add(this.fileExtensionsbutton); - this.FileSettingsGroupBox.Controls.Add(this.imageDirsTextBox); - this.FileSettingsGroupBox.Controls.Add(this.imageDirButton); - this.FileSettingsGroupBox.Controls.Add(this.fileExtensionsTextBox); - this.FileSettingsGroupBox.Controls.Add(this.fileExtensionsLabel); - this.FileSettingsGroupBox.Controls.Add(this.imageDirsLabel); - this.FileSettingsGroupBox.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.FileSettingsGroupBox.Location = new System.Drawing.Point(6, 397); - this.FileSettingsGroupBox.Name = "FileSettingsGroupBox"; - this.FileSettingsGroupBox.Size = new System.Drawing.Size(478, 150); - this.FileSettingsGroupBox.TabIndex = 41; - this.FileSettingsGroupBox.TabStop = false; - this.FileSettingsGroupBox.Text = "Filesettings"; - // - // gamebaseDBTextBox - // - this.gamebaseDBTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.gamebaseDBTextBox.Location = new System.Drawing.Point(85, 96); - this.gamebaseDBTextBox.Name = "gamebaseDBTextBox"; - this.gamebaseDBTextBox.Size = new System.Drawing.Size(330, 20); - this.gamebaseDBTextBox.TabIndex = 89; - this.toolTip.SetToolTip(this.gamebaseDBTextBox, "Select a gamebase (*.mdb) file to import\r\n"); - // - // gamebaseLabel - // - this.gamebaseLabel.Location = new System.Drawing.Point(2, 96); - this.gamebaseLabel.Name = "gamebaseLabel"; - this.gamebaseLabel.Size = new System.Drawing.Size(93, 20); - this.gamebaseLabel.TabIndex = 88; - this.gamebaseLabel.Text = "Gamebase DB"; - // - // gamebaseDBButton - // - this.gamebaseDBButton.Location = new System.Drawing.Point(426, 93); - this.gamebaseDBButton.Name = "gamebaseDBButton"; - this.gamebaseDBButton.Size = new System.Drawing.Size(31, 23); - this.gamebaseDBButton.TabIndex = 90; - this.gamebaseDBButton.UseVisualStyleBackColor = true; - this.gamebaseDBButton.Click += new System.EventHandler(this.gamebaseDBButton_Click); - // - // openFileDialog - // - this.openFileDialog.FileName = "openFileDialog1"; - // - // AppFilesView - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.FileSettingsGroupBox); - this.Controls.Add(this.filesGroupBox); - this.Name = "AppFilesView"; - this.Size = new System.Drawing.Size(521, 574); - this.Load += new System.EventHandler(this.AppFilesView_Load); - this.contextFavouritesMenuStrip.ResumeLayout(false); - this.filesGroupBox.ResumeLayout(false); - this.filesGroupBox.PerformLayout(); - this.FileSettingsGroupBox.ResumeLayout(false); - this.FileSettingsGroupBox.PerformLayout(); - this.ResumeLayout(false); + this.contextFavouritesMenuStrip.Name = "contextFavouritesMenuStrip"; + this.contextFavouritesMenuStrip.Size = new System.Drawing.Size(118, 26); + this.contextFavouritesMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextFavouritesMenuStrip_Opening); + // + // grouperToolStripMenuItem + // + this.grouperToolStripMenuItem.Name = "grouperToolStripMenuItem"; + this.grouperToolStripMenuItem.Size = new System.Drawing.Size(117, 22); + this.grouperToolStripMenuItem.Text = "Grouper"; + // + // fileExtensionsTextBox + // + this.fileExtensionsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.fileExtensionsTextBox.Location = new System.Drawing.Point(85, 71); + this.fileExtensionsTextBox.Name = "fileExtensionsTextBox"; + this.fileExtensionsTextBox.Size = new System.Drawing.Size(330, 20); + this.fileExtensionsTextBox.TabIndex = 28; + // + // imageDirsTextBox + // + this.imageDirsTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.imageDirsTextBox.Location = new System.Drawing.Point(85, 45); + this.imageDirsTextBox.Name = "imageDirsTextBox"; + this.imageDirsTextBox.Size = new System.Drawing.Size(330, 20); + this.imageDirsTextBox.TabIndex = 27; + // + // fileDirTextBox + // + this.fileDirTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.fileDirTextBox.Location = new System.Drawing.Point(85, 19); + this.fileDirTextBox.Name = "fileDirTextBox"; + this.fileDirTextBox.Size = new System.Drawing.Size(330, 20); + this.fileDirTextBox.TabIndex = 26; + // + // fileDirButton + // + this.fileDirButton.Image = ((System.Drawing.Image)(resources.GetObject("fileDirButton.Image"))); + this.fileDirButton.Location = new System.Drawing.Point(426, 16); + this.fileDirButton.Name = "fileDirButton"; + this.fileDirButton.Size = new System.Drawing.Size(31, 23); + this.fileDirButton.TabIndex = 39; + this.fileDirButton.UseVisualStyleBackColor = true; + this.fileDirButton.Click += new System.EventHandler(this.fileDirButton_Click); + // + // fileExtensionsbutton + // + this.fileExtensionsbutton.Image = ((System.Drawing.Image)(resources.GetObject("fileExtensionsbutton.Image"))); + this.fileExtensionsbutton.Location = new System.Drawing.Point(426, 68); + this.fileExtensionsbutton.Name = "fileExtensionsbutton"; + this.fileExtensionsbutton.Size = new System.Drawing.Size(31, 23); + this.fileExtensionsbutton.TabIndex = 38; + this.fileExtensionsbutton.UseVisualStyleBackColor = true; + this.fileExtensionsbutton.Click += new System.EventHandler(this.fileExtensionsbutton_Click); + // + // imageDirButton + // + this.imageDirButton.Image = ((System.Drawing.Image)(resources.GetObject("imageDirButton.Image"))); + this.imageDirButton.Location = new System.Drawing.Point(426, 42); + this.imageDirButton.Name = "imageDirButton"; + this.imageDirButton.Size = new System.Drawing.Size(31, 23); + this.imageDirButton.TabIndex = 37; + this.imageDirButton.UseVisualStyleBackColor = true; + this.imageDirButton.Click += new System.EventHandler(this.imageDirButton_Click); + // + // fileExtensionsLabel + // + this.fileExtensionsLabel.Location = new System.Drawing.Point(2, 71); + this.fileExtensionsLabel.Name = "fileExtensionsLabel"; + this.fileExtensionsLabel.Size = new System.Drawing.Size(93, 20); + this.fileExtensionsLabel.TabIndex = 36; + this.fileExtensionsLabel.Text = "Fileextensions:"; + this.fileExtensionsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // imageDirsLabel + // + this.imageDirsLabel.Location = new System.Drawing.Point(2, 43); + this.imageDirsLabel.Name = "imageDirsLabel"; + this.imageDirsLabel.Size = new System.Drawing.Size(93, 20); + this.imageDirsLabel.TabIndex = 35; + this.imageDirsLabel.Text = "Image Dir:"; + this.imageDirsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // fileDirLabel + // + this.fileDirLabel.Location = new System.Drawing.Point(2, 19); + this.fileDirLabel.Name = "fileDirLabel"; + this.fileDirLabel.Size = new System.Drawing.Size(93, 20); + this.fileDirLabel.TabIndex = 34; + this.fileDirLabel.Text = "File Directory(s):"; + this.fileDirLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // filesGroupBox + // + this.filesGroupBox.BackColor = System.Drawing.SystemColors.Control; + this.filesGroupBox.Controls.Add(this.importPlaychoiceCheckBox); + this.filesGroupBox.Controls.Add(this.importMahjongCheckBox); + this.filesGroupBox.Controls.Add(this.validImagesCheckBox); + this.filesGroupBox.Controls.Add(this.importOriginalsCheckBox); + this.filesGroupBox.Controls.Add(this.fileListView); + this.filesGroupBox.Controls.Add(this.newButton); + this.filesGroupBox.Controls.Add(this.editButton); + this.filesGroupBox.Controls.Add(this.deleteButton); + this.filesGroupBox.Controls.Add(this.launchButton); + this.filesGroupBox.Controls.Add(this.updateDatabaseButton); + this.filesGroupBox.Controls.Add(this.scanImageDirsButton); + this.filesGroupBox.Controls.Add(this.addFavouriteButton); + this.filesGroupBox.Controls.Add(this.internetSearchButton); + this.filesGroupBox.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.filesGroupBox.Location = new System.Drawing.Point(3, 4); + this.filesGroupBox.Name = "filesGroupBox"; + this.filesGroupBox.Size = new System.Drawing.Size(481, 387); + this.filesGroupBox.TabIndex = 40; + this.filesGroupBox.TabStop = false; + this.filesGroupBox.Text = "Files"; + // + // importPlaychoiceCheckBox + // + 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.TabIndex = 87; + this.importPlaychoiceCheckBox.Text = "Import Playchoice/Vs games"; + this.importPlaychoiceCheckBox.UseVisualStyleBackColor = true; + // + // importMahjongCheckBox + // + this.importMahjongCheckBox.AutoSize = true; + this.importMahjongCheckBox.Location = new System.Drawing.Point(299, 321); + this.importMahjongCheckBox.Name = "importMahjongCheckBox"; + this.importMahjongCheckBox.Size = new System.Drawing.Size(133, 17); + this.importMahjongCheckBox.TabIndex = 86; + this.importMahjongCheckBox.Text = "Import Mahjong games"; + this.importMahjongCheckBox.UseVisualStyleBackColor = true; + // + // validImagesCheckBox + // + this.validImagesCheckBox.AutoSize = true; + this.validImagesCheckBox.Location = new System.Drawing.Point(299, 275); + this.validImagesCheckBox.Name = "validImagesCheckBox"; + this.validImagesCheckBox.Size = new System.Drawing.Size(151, 17); + this.validImagesCheckBox.TabIndex = 84; + this.validImagesCheckBox.Text = "Only files with valid images"; + this.validImagesCheckBox.UseVisualStyleBackColor = true; + // + // importOriginalsCheckBox + // + this.importOriginalsCheckBox.AutoSize = true; + this.importOriginalsCheckBox.Location = new System.Drawing.Point(299, 298); + this.importOriginalsCheckBox.Name = "importOriginalsCheckBox"; + this.importOriginalsCheckBox.Size = new System.Drawing.Size(119, 17); + this.importOriginalsCheckBox.TabIndex = 85; + this.importOriginalsCheckBox.Text = "Only import originals"; + this.importOriginalsCheckBox.UseVisualStyleBackColor = true; + // + // FileSettingsGroupBox + // + this.FileSettingsGroupBox.BackColor = System.Drawing.SystemColors.Control; + this.FileSettingsGroupBox.Controls.Add(this.fileDirTextBox); + this.FileSettingsGroupBox.Controls.Add(this.gamebaseDBTextBox); + this.FileSettingsGroupBox.Controls.Add(this.gamebaseLabel); + this.FileSettingsGroupBox.Controls.Add(this.fileDirLabel); + this.FileSettingsGroupBox.Controls.Add(this.gamebaseDBButton); + this.FileSettingsGroupBox.Controls.Add(this.fileDirButton); + this.FileSettingsGroupBox.Controls.Add(this.fileExtensionsbutton); + this.FileSettingsGroupBox.Controls.Add(this.imageDirsTextBox); + this.FileSettingsGroupBox.Controls.Add(this.imageDirButton); + this.FileSettingsGroupBox.Controls.Add(this.fileExtensionsTextBox); + this.FileSettingsGroupBox.Controls.Add(this.fileExtensionsLabel); + this.FileSettingsGroupBox.Controls.Add(this.imageDirsLabel); + this.FileSettingsGroupBox.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.FileSettingsGroupBox.Location = new System.Drawing.Point(6, 397); + this.FileSettingsGroupBox.Name = "FileSettingsGroupBox"; + this.FileSettingsGroupBox.Size = new System.Drawing.Size(478, 150); + this.FileSettingsGroupBox.TabIndex = 41; + this.FileSettingsGroupBox.TabStop = false; + this.FileSettingsGroupBox.Text = "Filesettings"; + // + // gamebaseDBTextBox + // + this.gamebaseDBTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.gamebaseDBTextBox.Location = new System.Drawing.Point(85, 96); + this.gamebaseDBTextBox.Name = "gamebaseDBTextBox"; + this.gamebaseDBTextBox.Size = new System.Drawing.Size(330, 20); + this.gamebaseDBTextBox.TabIndex = 89; + this.toolTip.SetToolTip(this.gamebaseDBTextBox, "Select a gamebase (*.mdb) file to import\r\n"); + // + // gamebaseLabel + // + this.gamebaseLabel.Location = new System.Drawing.Point(2, 96); + this.gamebaseLabel.Name = "gamebaseLabel"; + this.gamebaseLabel.Size = new System.Drawing.Size(93, 20); + this.gamebaseLabel.TabIndex = 88; + this.gamebaseLabel.Text = "Gamebase DB"; + // + // gamebaseDBButton + // + this.gamebaseDBButton.Location = new System.Drawing.Point(426, 93); + this.gamebaseDBButton.Name = "gamebaseDBButton"; + this.gamebaseDBButton.Size = new System.Drawing.Size(31, 23); + this.gamebaseDBButton.TabIndex = 90; + this.gamebaseDBButton.UseVisualStyleBackColor = true; + this.gamebaseDBButton.Click += new System.EventHandler(this.gamebaseDBButton_Click); + // + // openFileDialog + // + this.openFileDialog.FileName = "openFileDialog1"; + // + // AppFilesView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.FileSettingsGroupBox); + this.Controls.Add(this.filesGroupBox); + this.Name = "AppFilesView"; + this.Size = new System.Drawing.Size(521, 574); + this.Load += new System.EventHandler(this.AppFilesView_Load); + this.contextFavouritesMenuStrip.ResumeLayout(false); + this.filesGroupBox.ResumeLayout(false); + this.filesGroupBox.PerformLayout(); + this.FileSettingsGroupBox.ResumeLayout(false); + this.FileSettingsGroupBox.PerformLayout(); + this.ResumeLayout(false); - } + } - #endregion + #endregion - private System.Windows.Forms.ListView fileListView; - private System.Windows.Forms.Button newButton; - private System.Windows.Forms.Button editButton; - private System.Windows.Forms.Button deleteButton; - private System.Windows.Forms.Button launchButton; - private System.Windows.Forms.Button scanImageDirsButton; - private System.Windows.Forms.Button addFavouriteButton; - private System.Windows.Forms.Button internetSearchButton; - private System.Windows.Forms.Button updateDatabaseButton; - private System.Windows.Forms.ColumnHeader fileTitle; - private System.Windows.Forms.ContextMenuStrip contextFavouritesMenuStrip; - private System.Windows.Forms.ToolStripMenuItem grouperToolStripMenuItem; - private System.Windows.Forms.ImageList smallImageList; - protected System.Windows.Forms.TextBox fileExtensionsTextBox; - protected System.Windows.Forms.TextBox imageDirsTextBox; - protected System.Windows.Forms.TextBox fileDirTextBox; - protected System.Windows.Forms.Button fileDirButton; - protected System.Windows.Forms.Button fileExtensionsbutton; - protected System.Windows.Forms.Button imageDirButton; - protected System.Windows.Forms.Label fileExtensionsLabel; - protected System.Windows.Forms.Label imageDirsLabel; - protected System.Windows.Forms.Label fileDirLabel; - private System.Windows.Forms.GroupBox filesGroupBox; - private System.Windows.Forms.GroupBox FileSettingsGroupBox; - private System.Windows.Forms.ToolTip toolTip; - private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; - private System.Windows.Forms.CheckBox importPlaychoiceCheckBox; - private System.Windows.Forms.CheckBox importMahjongCheckBox; - private System.Windows.Forms.CheckBox validImagesCheckBox; - private System.Windows.Forms.CheckBox importOriginalsCheckBox; - private System.Windows.Forms.TextBox gamebaseDBTextBox; - private System.Windows.Forms.Label gamebaseLabel; - private System.Windows.Forms.Button gamebaseDBButton... [truncated message content] |
From: <ze...@us...> - 2007-06-09 21:00:08
|
Revision: 499 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=499&view=rev Author: zebons Date: 2007-06-09 14:00:05 -0700 (Sat, 09 Jun 2007) Log Message: ----------- Add using MeddiaPortal.Util for MP stable 0.2.2 version. Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/app.config trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-06-09 17:57:08 UTC (rev 498) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-06-09 21:00:05 UTC (rev 499) @@ -9,6 +9,7 @@ using System.IO; using ICSharpCode.SharpZipLib.Zip; using MediaPortal.Configuration; +using MediaPortal.Util; namespace MPInstaler { Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-06-09 17:57:08 UTC (rev 498) +++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-06-09 21:00:05 UTC (rev 499) @@ -10,6 +10,7 @@ using System.Globalization; using MediaPortal.Configuration; using MediaPortal.GUI.Library; +using MediaPortal.Util; namespace MPInstaler Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-06-09 17:57:08 UTC (rev 498) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-06-09 21:00:05 UTC (rev 499) @@ -41,7 +41,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> + <OutputPath>..\..\..\Program Files\Team MediaPortal\MediaPortal\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> @@ -87,6 +87,7 @@ <Compile Include="GroupForm.Designer.cs"> <DependentUpon>GroupForm.cs</DependentUpon> </Compile> + <Compile Include="ItemCombo.cs" /> <Compile Include="MPinstalerStruct.cs" /> <Compile Include="Form1.cs"> <SubType>Form</SubType> Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-06-09 17:57:08 UTC (rev 498) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-06-09 21:00:05 UTC (rev 499) @@ -10,6 +10,7 @@ using System.IO; using ICSharpCode.SharpZipLib.Zip; using MediaPortal.Configuration; +using MediaPortal.Util; namespace MPInstaler @@ -606,7 +607,7 @@ if (flst.Type == SKIN_TYPE) { - ret = Config.GetFolder(Config.Dir.Skin) + @"\"+ flst.SubType + @"\" ; + ret = Config.GetFolder(Config.Dir.Skin) + @"\" + flst.SubType + @"\"; } if (flst.Type == SKIN_MEDIA_TYPE) Modified: trunk/plugins/mpinstaler/MPInstaler/app.config =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/app.config 2007-06-09 17:57:08 UTC (rev 498) +++ trunk/plugins/mpinstaler/MPInstaler/app.config 2007-06-09 21:00:05 UTC (rev 499) @@ -1,3 +1,11 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0"?> <configuration> -</configuration> \ No newline at end of file + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="Bass.Net" publicKeyToken="B7566C273E6EF480" culture="neutral"/> + <bindingRedirect oldVersion="0.0.0.0-2.3.1.2" newVersion="2.3.1.2"/> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration> Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-06-09 17:57:08 UTC (rev 498) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-06-09 21:00:05 UTC (rev 499) @@ -10,6 +10,7 @@ using System.Windows.Forms; using MediaPortal.GUI.Library; using MediaPortal.Configuration; +using MediaPortal.Util; namespace MPInstaler { @@ -197,7 +198,7 @@ private void button4_Click(object sender, EventArgs e) { wizard_1 wiz = new wizard_1(); - wiz.package.LoadFromFile(Config.GetFolder(Config.Dir.Base) + @"\" + "Instaler" + @"\" + listView1.SelectedItems[0].SubItems[3].Text); + wiz.package.LoadFromFile (Config.GetFolder(Config.Dir.Base) + @"\" + "Instaler" + @"\" + listView1.SelectedItems[0].SubItems[3].Text); if (wiz.package.isValid) { wiz.starStep(); Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-06-09 17:57:08 UTC (rev 498) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-06-09 21:00:05 UTC (rev 499) @@ -6,6 +6,7 @@ using System.Text; using System.Windows.Forms; using MediaPortal.Configuration; +using MediaPortal.Util; namespace MPInstaler { @@ -206,7 +207,7 @@ richTextBox1.Text = String.Format("Intall paths : \n"); foreach (Config.Dir option in Enum.GetValues(typeof(Config.Dir))) { - richTextBox1.Text += String.Format("{0} - {1}\n", option, Config.GetFolder(option)); + richTextBox1.Text += String.Format("{0} - {1}\n", option, Config.GetFolder(option)); } break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |