private void CloseAll() { this.isds = this.iscs = this.isls = this.isns = false; ds?.Close(); this.ds = null; cs?.Close(); this.cs = null; ls?.Close(); this.ls = null; ns?.Close(); this.ns = null; wdp?.Close(); this.wdp = null; wcp?.Close(); this.wcp = null; }
private void ShowDialog(string game) { if (game != "lol") { if (game == "dnf") { if (!this.isds) { if (this.wdp == null) { this.CloseAll(); this.isds = true; void Para(object obj) { this.wdp = new wg_dnf_up(); this.wdp.Show(); } base.Invoke((ParameterizedThreadStart)Para); } void Para2(object obj) { this.ds = new dnfShow(); this.ds.Show(); } base.Invoke((ParameterizedThreadStart)Para2); } if (this.ds != null) { Win32Native.SetWindowPos(this.ds.Handle, -1, 0, 0, 0, 0, 3); Win32Native.SetFocus(this.ds.Handle); } } else if (game == "cf") { if (!this.iscs) { this.CloseAll(); this.iscs = true; void Para(object obj) { this.cs = new cfShow(); this.cs.Show(); } base.Invoke((ParameterizedThreadStart)Para); if (this.wcp == null) { void Para2(object obj) { this.wcp = new wg_cf_up(); this.wcp.Show(); } base.Invoke((ParameterizedThreadStart)Para2); } if (this.cs != null) { Win32Native.SetWindowPos(this.cs.Handle, -1, 0, 0, 0, 0, 3); Win32Native.SetFocus(this.cs.Handle); } } } else if (game == "nz") { if (!this.isns) { this.CloseAll(); this.isns = true; void Para(object obj) { this.ns = new nzShow(); this.ns.Show(); } base.Invoke((ParameterizedThreadStart)Para); } if (this.ns != null) { Win32Native.SetWindowPos(this.ns.Handle, -1, 0, 0, 0, 0, 3); Win32Native.SetFocus(this.ns.Handle); } } else { this.isds = this.iscs = this.isls = this.isns = false; if (this.ds != null) { this.ds.Close(); } this.ds = null; if (this.cs != null) { this.cs.Close(); } this.cs = null; if (this.ls != null) { this.ls.Close(); } this.ls = null; if (this.ns != null) { this.ns.Close(); } this.ns = null; if (this.wdp != null) { this.wdp.Close(); } this.wdp = null; if (this.wcp != null) { this.wcp.Close(); } this.wcp = null; } } else { if (!this.isls) { this.CloseAll(); this.isls = true; void Para(object obj) { this.ls = new lolShow(); this.ls.Show(); } base.Invoke((ParameterizedThreadStart)Para); } if (this.ls != null) { Win32Native.SetWindowPos(this.ls.Handle, -1, 0, 0, 0, 0, 3); Win32Native.SetFocus(this.ls.Handle); } } }