コード例 #1
0
 public static void ShowAeriaLogin(string url, string urlFirst, ProfileLoginWindow parent, AeriaEventHandler loginCallback)
 {
     if (instance != null)
     {
         try
         {
             instance.Close();
             instance = null;
         }
         catch (Exception)
         {
         }
     }
     vidLoaded = false;
     AeriaWindow window = new AeriaWindow();
     m_parent = parent;
     Point point = new Point(parent.Location.X + ((parent.Width - window.Width) / 2), parent.Location.Y + ((parent.Height - window.Height) / 2));
     window.closeCallback = new MyFormBase.MFBClose(AeriaWindow.closing);
     window.Location = point;
     window.Show(parent);
     instance = window;
     instance.login = (AeriaEventHandler) Delegate.Combine(instance.login, loginCallback);
     while (!vidLoaded)
     {
         Thread.Sleep(100);
         Application.DoEvents();
     }
     Thread.Sleep(500);
     if (urlFirst.Length > 0)
     {
         futureURL = url;
         url = urlFirst;
     }
     window.webBrowser1.Navigate(url);
 }
コード例 #2
0
        public static void ShowAeriaLogin(string url, string urlFirst, ProfileLoginWindow parent, AeriaEventHandler loginCallback)
        {
            if (instance != null)
            {
                try
                {
                    instance.Close();
                    instance = null;
                }
                catch (Exception)
                {
                }
            }
            vidLoaded = false;
            AeriaWindow window = new AeriaWindow();

            m_parent = parent;
            Point point = new Point(parent.Location.X + ((parent.Width - window.Width) / 2), parent.Location.Y + ((parent.Height - window.Height) / 2));

            window.closeCallback = new MyFormBase.MFBClose(AeriaWindow.closing);
            window.Location      = point;
            window.Show(parent);
            instance       = window;
            instance.login = (AeriaEventHandler)Delegate.Combine(instance.login, loginCallback);
            while (!vidLoaded)
            {
                Thread.Sleep(100);
                Application.DoEvents();
            }
            Thread.Sleep(500);
            if (urlFirst.Length > 0)
            {
                futureURL = url;
                url       = urlFirst;
            }
            window.webBrowser1.Navigate(url);
        }