Пример #1
0
        public static void CloseWait()
        {
            if (instance != null)
            {
                instance.Close();
            }

            instance = null;
        }
Пример #2
0
        public static void ShowWait(Form parent)
        {
            if (instance == null)
            {
                instance = new FormWait();
            }

            var centerX = parent.Width + (parent.Location.X / 2);
            var centerY = parent.Height + (parent.Location.Y / 2);

            instance.Location = new System.Drawing.Point(centerX - Convert.ToInt32((instance.Width / 2)), centerY - Convert.ToInt32((instance.Height / 2)));
            instance.Show();
        }