Exemplo n.º 1
0
        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);

			comboBox_hashrates.SelectionChanged += this.comboBox_SelectionChanged;
			comboBox_times.SelectionChanged += this.comboBox_SelectionChanged;
			textBox_hashrate.TextChanged += this.textBox_hashrate_TextChanged;

			this.SetCalculations(0, 0);
		}
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            FixWindow.Fix(this);

            this.PaintTabHeaders();
            this.LoadSettings();

            int recommendedCoreCount = Convert.ToInt32(Utils.GetCPUCacheSize() / 2);

            if (recommendedCoreCount > Environment.ProcessorCount)
            {
                recommendedCoreCount = Environment.ProcessorCount;
            }
            textBlock_recommendedMiningCores.Text    = string.Format(MinningCoresLabelPlaceholder, recommendedCoreCount);
            textBlock_recommendedAfkMiningCores.Text = string.Format(AfkMinningCoresLabelPlaceholder, recommendedCoreCount);

            Assembly        assembly = Assembly.GetExecutingAssembly();
            FileVersionInfo fvi      = FileVersionInfo.GetVersionInfo(assembly.Location);
            string          version  = fvi.FileVersion;

            label_version.Content = string.Format(VersionLabelPlaceholder, fvi.FileVersion);
        }