예제 #1
0
        public Conf_ThumbRetriever(Game game)
        {
            InitializeComponent();

            if (game == null) //we need a valid game
            {
                throw new ArgumentNullException("game");
            }

            this.game = game;

            //configure thumb retriever events
            thumbRetriever = new ThumbRetriever();
            thumbRetriever.OnStatusChanged       += new ThumbRetrieverStatusChangedHandler(thumbRetriever_OnStatusChanged);
            thumbRetriever.OnSearchCompleted     += new SearchCompletedHandler(thumbRetriever_OnSearchCompleted);
            thumbRetriever.OnThumbDownloaded     += new ThumbDownloadedHandler(thumbRetriever_OnThumbDownloaded);
            thumbRetriever.OnDownloadComplete    += new ThumbDownloadCompleteHandler(thumbRetriever_OnDownloadComplete);
            resultsComboBox.DropDown             += new EventHandler(resultsComboBox_DropDown);
            resultsComboBox.SelectedIndexChanged += new EventHandler(resultsComboBox_SelectedIndexChanged);
            //reset status info
            progressBar.Visible = false;
            statusLabel.Text    = "";

            currentImages = new List <Bitmap>();
        }
        public Conf_EmuThumbRetriever(Emulator emu)
        {
            InitializeComponent();

            this.emu = emu;
            //configure thumb retriever events
            thumbRetriever = new ThumbRetriever();
            thumbRetriever.OnThumbDownloaded  += new ThumbDownloadedHandler(thumbRetriever_OnThumbDownloaded);
            thumbRetriever.OnDownloadComplete += new ThumbDownloadCompleteHandler(thumbRetriever_OnDownloadComplete);
            thumbRetriever.OnPlatformsFound   += new PlatformsFoundHandler(thumbRetriever_OnPlatformsFound);
            thumbRetriever.OnStatusChanged    += new ThumbRetrieverStatusChangedHandler(thumbRetriever_OnStatusChanged);
            currentImages = new List <Bitmap>();

            //reset status info
            progressBar.Visible = false;
            statusLabel.Text    = "";
        }