private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { Configuration.Save(); this._imageLoaderThread.Abort(); this.deckLayout.Dispose(); this._imageLoader = null; this._imageGenerator = null; CardBase.Editions.Clear(); CardBase.Cards.Clear(); }
private void Initialize() { LoadingForm loadingForm = new LoadingForm(null); if(loadingForm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { //this.LoadDataToTreeView(""); this._imageLoader = new ImageLoader(); this.tspbImageLoader.Maximum = this._imageLoader.ItemsToLoad; this.tslblImageLoader.Text = "ImageLoader initialized."; this._imageLoader.ImageLoaderResponse += new ImageLoader.ImageLoaderEventHandler(imageLoader_ImageLoaderResponse); this._imageLoader.ImageLoaderFinish += new ImageLoader.ImageLoaderFinishEventhandler(imageLoader_ImageLoaderFinish); } loadingForm.Close(); }