private void Window_Loaded(object sender, RoutedEventArgs e) { FixWindow.Fix(this); AddressStats = SupportXmrAPI.GetAddressStats(); Timer.Tick += this.Timer_Tick; this.UpdateLabels(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { FixWindow.Fix(this); Core core = new Core(); this.SetupTrayIcon(); GData.SettingsManager.LoadXmrigSettings(SettingsManager.XmrigSettings.NormalMining); GData.XMRig.OnLoggedHashRate += this.XMRig_OnLoggedHashRate; GData.XMRig.OnInvalidShare += this.XMRig_OnInvalidShare; GData.XMRig.OnValidShare += this.XMRig_OnValidShare; GData.XMRig.OnMinerStateChange += this.XMRig_OnMinerStateChange; if (GData.SettingsManager.Settings.RunOnAppStart) { GData.XMRig.Initialize(); } this.SetControlStates(); progressBar_mining.Value = progressBar_mining.Maximum; this.RefreshApi(); if (SupportXmrAPI != null) { StartingValidSharesCount = SupportXmrAPI.GetAddressStats().ValidShares; StartingInvalidSharesCount = SupportXmrAPI.GetAddressStats().InvalidShares; this.UpdateValidSharesTextBlock(); this.UpdateInvalidSharesTextBlock(); } Timer_Timings.Tick += this.Timer_Timings_Tick; Timer_ApiUpdate.Tick += this.Timer_ApiUpdate_Tick; this.Timer_ApiUpdate_Tick(null, null); textBlock_withdrawLink.Visibility = Visibility.Hidden; InputInactivity.InactivityTimeReached += this.InputInactivity_InactivityTimeReached; InputInactivity.InputReceived += this.InputInactivity_InputReceived; this.SetInputInactivityDelay(); NotifyIcon.Icon = new System.Drawing.Icon("GMG_Icon.ico"); NotifyIcon.Visible = true; }