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