Пример #1
0
 private void FuzzyWait_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (_instance != null)
     {
         _instance = null;
     }
 }
Пример #2
0
        public static void ShowFuzzyWait(string message)
        {
            if (_instance == null)
            {
                _instance             = new FuzzyWait();
                _instance.lblMsg.Text = message;
            }
            else
            {
                _instance.lblMsg.Text = message;
            }

            int w = _instance.pictureBox1.Left + _instance.pictureBox1.Width + 5 + _instance.lblMsg.Width + 10;

            if (w > 500)
            {
                _instance.Width = 500;
            }
            else if (w < 250)
            {
                _instance.Width = 250;
            }
            else
            {
                _instance.Width = w;
            }

            _instance.Show();
            Application.DoEvents();
        }