public OtherWindow() { InitializeComponent(); this.Text = L18n.Get("OtherWindow", "OtherWindow_name"); this.btnUploadScreenshot.Text = L18n.Get("OtherWindow", "Button_btnUploadScreenshot"); this.btnUploadVideo.Text = L18n.Get("OtherWindow", "Button_btnUploadVideo"); this.btnOpenMediaHistory.Text = L18n.Get("OtherWindow", "Button_btnOpenMediaHistory"); self = this; }
private void Button_Other_Click(object sender, EventArgs e) { if (OtherWindow.self == null) { this.Hide(); OtherWindow window = new OtherWindow(); window.ShowDialog(); this.Show(); } else { if (OtherWindow.self.WindowState == FormWindowState.Minimized) { OtherWindow.self.WindowState = FormWindowState.Normal; } else { OtherWindow.self.Show(); } } }
private void OtherWindow_FormClosing(object sender, FormClosingEventArgs e) { self = null; }