From: <che...@us...> - 2007-06-13 22:07:19
|
Revision: 537 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=537&view=rev Author: chef_koch Date: 2007-06-13 15:07:13 -0700 (Wed, 13 Jun 2007) Log Message: ----------- small cleanup Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-13 21:54:37 UTC (rev 536) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs 2007-06-13 22:07:13 UTC (rev 537) @@ -42,21 +42,6 @@ { public partial class FileInfoScraperForm : Form { - #region InitControls - - private ToolTip toolTip1; - private ContextMenu menuFileList; - private MenuItem mnuCheckWithoutImages; - private MenuItem mnuCheckWithoutOverview; - - private ContextMenu menuSaveDetails; - private MenuItem menuItem4; - private MenuItem menuDataAndImages; - private MenuItem menuData; - private MenuItem menuImages; - - #endregion - #region Variables / Init int mStartTime = 0; @@ -549,24 +534,21 @@ 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) // { @@ -578,29 +560,23 @@ { 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(ScraperType.ALLGAME); SelectBestMatch(curItem); StepProgressBar(); - System.Windows.Forms.Application.DoEvents(); } - ChangeFileSelection(); + if (stopSearching) - { DeInitProgressBar("Search aborted"); - } else - { DeInitProgressBar("Search finished"); - } + ChangeFileSelection(); stopSearching = false; isSearching = false; UpdateButtonStates(); @@ -625,21 +601,15 @@ foreach (ListViewItem curItem in listViewFileList.CheckedItems) { - if (stopSearching) - break; + if (stopSearching) break; FileItem file = (FileItem)curItem.Tag; + if (file == null) continue; - 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) @@ -649,29 +619,21 @@ 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(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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |