private void ImportDesignForm_FormClosing(object sender, FormClosingEventArgs e) { try { if (FormDesignes.Contains(this)) { FormDesignes.Remove(this); } } catch { } }
private void FormDesign_Load(object sender, EventArgs e) { Thread.CurrentThread.Priority = ThreadPriority.Highest; IsExitButton = false; try { ConnectToServer.OnConnect += OnConnected; if (FormDesignes is null) { FormDesignes = new List <ImportDesignForm>(); } if (!FormDesignes.Contains(this)) { FormDesignes.Add(this); } } catch { } try { this.TopMost = true; this.BringToFront(); this.TopMost = false; Connect_Click(sender, e); } catch { } UpdateStatus(this, ServerIsRunning, InvokeRequired_LockObject); }