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); }
public static void closing() { if (m_parent != null) { m_parent.aeriaClose(); } instance = null; }
private void aeriaLogin(string userGuid) { if (m_parent != null) { m_parent.aeriaLogin(userGuid, ""); } base.Close(); instance = null; }
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); }