private void EpisodenBackBtnClick(object sender, EventArgs e) { StaffelPanel.BringToFront(); selectedPanel = "StaffelPanel"; backbtn.Click -= EpisodenBackBtnClick; backbtn.Click += StaffelBackBtnClick; }
private void searchedforitemsclick(object sender, EventArgs e) { SeitenCountLabel.Visible = false; vorbtn.Visible = false; backbtn.Click -= backbtn_Click; backbtn.Click += StaffelBackBtnClick; string value; if (sender.GetType().ToString() == "System.Windows.Forms.Label") { value = (sender as Label).Text; } else { value = (sender as Panel).Controls.Find("label1", true)[0].Text; } StaffelPanel.BringToFront(); selectedPanel = "StaffelPanel"; panel1.Controls.Clear(); BackgroundWorker bw = new BackgroundWorker(); bw.DoWork += CreateStaffelDescrandPictureBackgroundWorkerDoEvent; bw.WorkerSupportsCancellation = true; bw.RunWorkerAsync(value); }