Exemplo n.º 1
0
        public void showModal()
        {
            if (InvokeRequired)
            {
                Invoke((MethodInvoker) delegate { showModal(); });
                return;
            }
            hideModal();
            foreach (Control control in panelConnector.Controls)
            {
                control.Enabled = false;
            }
            foreach (Control control in panelFunctions.Controls)
            {
                control.Enabled = false;
            }
            //panelConnector.Visible = false;
            //panelFunctions.Visible = false;

            waitingWindow = new WaitingWindow();
            waitingWindow.StartPosition = FormStartPosition.CenterParent;
            waitingWindow.Show();
            waitingWindow.TopMost = true;
            Point p = new Point(this.Location.X + (this.Width / 2 - waitingWindow.Width / 2), this.Location.Y + (this.Height / 2 - waitingWindow.Height / 2));

            waitingWindow.Location = p;
            Application.DoEvents();
        }
Exemplo n.º 2
0
 private void hideModal()
 {
     if (InvokeRequired)
     {
         Invoke((MethodInvoker) delegate { hideModal(); });
         return;
     }
     panelConnector.Visible = true;
     panelFunctions.Visible = true;
     if (waitingWindow != null)
     {
         waitingWindow.Close();
         waitingWindow = null;
     }
     Application.DoEvents();
 }
Exemplo n.º 3
0
        public void hideModal()
        {
            if (InvokeRequired)
            {
                Invoke((MethodInvoker) delegate { hideModal(); });
                return;
            }
            foreach (Control control in panelConnector.Controls)
            {
                control.Enabled = true;
            }
            foreach (Control control in panelFunctions.Controls)
            {
                control.Enabled = true;
            }
//            panelConnector.Visible = true;
//            panelFunctions.Visible = true;
            if (waitingWindow != null)
            {
                waitingWindow.Close();
                waitingWindow = null;
            }
            Application.DoEvents();
        }