public static void ClosePopup()
 {
     try
     {
         if (instance != null)
         {
             instance.Close();
             instance = null;
         }
     }
     catch (Exception)
     {
     }
 }
Example #2
0
 public static void ClosePopup()
 {
     try
     {
         if (instance != null)
         {
             instance.Close();
             instance = null;
         }
     }
     catch (Exception)
     {
     }
 }
Example #3
0
        public static void ShowVideo(string url, bool video)
        {
            if (instance != null)
            {
                try
                {
                    instance.Close();
                    instance = null;
                }
                catch (Exception)
                {
                }
            }
            vidLoaded = false;
            VideoWindow window = new VideoWindow();

            window.setMode(video);
            window.closeCallback = new MyFormBase.MFBClose(VideoWindow.closing);
            Form parentForm = InterfaceMgr.Instance.ParentForm;

            if ((parentForm != null) && (parentForm.WindowState != FormWindowState.Minimized))
            {
                Point location = parentForm.Location;
                Size  size     = parentForm.Size;
                Size  size2    = window.Size;
                Point point2   = new Point(((size.Width - size2.Width) / 2) + location.X, ((size.Height - size2.Height) / 2) + location.Y);
                window.Location = point2;
            }
            else
            {
                window.StartPosition = FormStartPosition.CenterScreen;
            }
            window.Show(parentForm);
            instance = window;
            while (!vidLoaded)
            {
                Thread.Sleep(100);
                Application.DoEvents();
            }
            Thread.Sleep(500);
            window.videoPane.Visible = true;
            window.videoPane.openPage(url);
        }
 public static void ShowVideo(string url, bool video)
 {
     if (instance != null)
     {
         try
         {
             instance.Close();
             instance = null;
         }
         catch (Exception)
         {
         }
     }
     vidLoaded = false;
     VideoWindow window = new VideoWindow();
     window.setMode(video);
     window.closeCallback = new MyFormBase.MFBClose(VideoWindow.closing);
     Form parentForm = InterfaceMgr.Instance.ParentForm;
     if ((parentForm != null) && (parentForm.WindowState != FormWindowState.Minimized))
     {
         Point location = parentForm.Location;
         Size size = parentForm.Size;
         Size size2 = window.Size;
         Point point2 = new Point(((size.Width - size2.Width) / 2) + location.X, ((size.Height - size2.Height) / 2) + location.Y);
         window.Location = point2;
     }
     else
     {
         window.StartPosition = FormStartPosition.CenterScreen;
     }
     window.Show(parentForm);
     instance = window;
     while (!vidLoaded)
     {
         Thread.Sleep(100);
         Application.DoEvents();
     }
     Thread.Sleep(500);
     window.videoPane.Visible = true;
     window.videoPane.openPage(url);
 }
        public static void showMessage()
        {
            if (adminMessage.StartsWith("http://"))
            {
                string[] strArray = adminMessage.Split(delims);
                if (strArray.Length > 0)
                {
                    VideoWindow.ShowVideo(strArray[0], false);
                    return;
                }
            }
            AdminInfoPopup popup = new AdminInfoPopup {
                btnSend  = { Visible = false },
                textBox1 = { ReadOnly = true, Text = adminMessage }
            };

            popup.init();
            popup.Show();
            popup.btnExit.Focus();
            lastPopup = popup;
            RemoteServices.Instance.ShowAdminMessage = false;
        }
 public static void closing()
 {
     instance = null;
 }
Example #7
0
 public static void closing()
 {
     instance = null;
 }