private void ContainersInitialization() { _containerSolarSystem = new whlSolarSystem(); #region Events _containerSolarSystem.OnChangeSolarSystemInfo += ContainerEvent_ChangeSolarSystemInfo; _containerSolarSystem.OnShowTravelHistory += ContainerEvent_ShowTravelHistory; _containerSolarSystem.OnShowLostAndFoundOffice += ContainerEvent_ShowLostAndFoundOffice; _containerSolarSystem.OnBrowserNavigate += Event_BrowserNavigate; _containerSolarSystem.OnContainerActivate += ContainerEvent_Activate; #endregion _containerTravelHistory = new whlTravelHistory(); #region Events _containerTravelHistory.OnShowLocation += ContainerEvent_ShowLocation; #endregion _containerBrowser = new ucRichBrowser(); #region Events _containerSolarSystemOffline = new whlSolarSystemOffline(); _containerSolarSystemOffline.OnBrowserNavigate += Event_BrowserNavigate; #endregion _containerVersion = new whlVersion(); _containerBookmarks = new whlBookmarks(); _containerAuthorization = new whlAuthorization(); #region Events _containerAuthorization.OnChangeSelectedPilot += ContainerEvent_ChangeSelectedPilot; #endregion _containerLostAndFoundOffice = new whlLostAndFoundOffice(); #region Events _containerLostAndFoundOffice.OnShowSolarSystem += ContainerEvent_ShowSolarSystem; #endregion _containerRouter = new whlRouter(); #region Events _containerRouter.OnContainerActivate += ContainerEvent_Activate; #endregion pnlContainer.Controls.Add(_containerPilotInfo); pnlContainer.Controls.Add(_containerBookmarks); pnlContainer.Controls.Add(_containerSolarSystem); pnlContainer.Controls.Add(_containerTravelHistory); pnlContainer.Controls.Add(_containerSolarSystemOffline); pnlContainer.Controls.Add(_containerVersion); pnlContainer.Controls.Add(_containerAuthorization); pnlContainer.Controls.Add(_containerLostAndFoundOffice); pnlContainer.Controls.Add(_containerRouter); _containerBrowser.ChangeViewMode += ChangeViewMode; pnlContainer.Controls.Add(_containerBrowser); _containerPilotInfo.OnBrowserNavigate += Event_BrowserNavigate; _containerBrowser.ParentWindow = this; }
private void WindowMonitoring_Load(object sender, EventArgs e) { lblVersionID.Text = Global.Version; ucContainreSolarSystem = new whlSolarSystem(); ucContainerlSolarSystemOffline = new whlSolarSystemOffline(); ucContainerBookmarks = new whlBookmarks(); ucContainreAuthorization = new whlAuthorization(); Controls.Add(ucContainerPilotInfo); Controls.Add(ucContainerBookmarks); Controls.Add(ucContainreSolarSystem); Controls.Add(ucContainerlSolarSystemOffline); Controls.Add(ucContainreAuthorization); Global.Browser = new whlBrowser(OpenWebBrowserPanel); Controls.Add(Global.Browser); Log.DebugFormat("[WindowMonitoring] Version: {0}", lblVersionID.Text); Size = ContainerTabs.Active().Size; ResizeWindow(); CreateTooltipsForStatics(); var identity = System.Security.Principal.WindowsIdentity.GetCurrent(); var principal = new System.Security.Principal.WindowsPrincipal(identity); if (principal.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)) { MessageBox.Show("For use return tokens from EVE CREST we need run WHL as administrator"); } DelegateStartProcess startProcessFunction = StartPilotAuthorizeFlow; new Thread(() => new CrestApiListener().ListenLocalhost(startProcessFunction)) { IsBackground = true }.Start(); SetStyle(ControlStyles.ResizeRedraw, true); HideAllContainers(); OpenAuthorizationPanel(); CheckVersion(); }
private void ContainersInitialization() { DelegateShowTravelHistory showTravelHistory = ShowContainer_TravelHistory; DelegateShowLocation showLocation = ShowContainer_Location; DelegateChangeSolarSystemInfo changeSolarSystemInfo = ChangeSolarSystemInfo; _containerSolarSystem = new whlSolarSystem(showTravelHistory, changeSolarSystemInfo); _containerSolarSystem.OnShowLostAndFoundOffice += Event_LostAndFoundOffice; _containerTravelHistory = new whlTravelHistory(showLocation); _containerBrowser = new ucRichBrowser(); _containerSolarSystemOffline = new whlSolarSystemOffline(); _containerVersion = new whlVersion(); _containerBookmarks = new whlBookmarks(); _containerAuthorization = new whlAuthorization(); _containerAuthorization.OnChangeSelectedPilot += Event_ChangeSelectedPilot; _containerLostAndFoundOffice = new whlLostAndFoundOffice(); _containerLostAndFoundOffice.OnShowSolarSystem += Event_ShowSolarSystem; pnlContainer.Controls.Add(_containerPilotInfo); pnlContainer.Controls.Add(_containerBookmarks); pnlContainer.Controls.Add(_containerSolarSystem); pnlContainer.Controls.Add(_containerTravelHistory); pnlContainer.Controls.Add(_containerSolarSystemOffline); pnlContainer.Controls.Add(_containerVersion); pnlContainer.Controls.Add(_containerAuthorization); pnlContainer.Controls.Add(_containerLostAndFoundOffice); _containerBrowser.ChangeViewMode += ChangeViewMode; pnlContainer.Controls.Add(_containerBrowser); _containerSolarSystem.OnBrowserNavigate += Event_BrowserNavigate; _containerPilotInfo.OnBrowserNavigate += Event_BrowserNavigate; _containerSolarSystemOffline.OnBrowserNavigate += Event_BrowserNavigate; _containerBrowser.ParentWindow = this; }