private void ChangePanel(VaultOptionTabs tab) { if (this.ActivePanel != null) { this.ActivePanel.Paint -= new PaintEventHandler(this.ActivePanel_Paint); } if (tab == VaultOptionTabs.Upload) { this.ActivePanel = this.gpgPanelUpload; } this.ActivePanel.Paint += new PaintEventHandler(this.ActivePanel_Paint); this.ActivePanel.BringToFront(); this.ActivePanel.Invalidate(); }
public DlgVaultOptions(VaultOptionTabs tab) { this.mVaultOptions = null; this.ActivePanel = null; this.components = null; this.InitializeComponent(); base.SetStyle(ControlStyles.ResizeRedraw, true); this.listBoxUploadPaths.DataSource = Program.Settings.Content.Upload.UploadPaths; this.gpgTextBoxMyDownloads.Text = Program.Settings.Content.Download.MyDownloads; this.skinButtonTabDownload.Tag = VaultOptionTabs.Download; this.skinButtonTabDownload.Click += new EventHandler(this.ChangePanel); this.skinButtonTabUpload.Tag = VaultOptionTabs.Upload; this.skinButtonTabUpload.Click += new EventHandler(this.ChangePanel); this.skinButtonRemoveUploadPath.Enabled = this.listBoxUploadPaths.SelectedIndex >= 0; this.ChangePanel(tab); this.gpgCheckBoxCachePreviews.Checked = Program.Settings.Content.Download.CachePreviewImages; base.ttDefault.SetToolTip(this.gpgCheckBoxCachePreviews, Loc.Get("<LOC>Caches preview images on your local hard drive which speed up image retrieval in exchange for a small amount of disk space.")); }