コード例 #1
0
 private void AssemblerDisplayCheckBox_CheckedChanged(object sender, EventArgs e)
 {
     GraphViewer.ShowAssemblers = (sender as CheckBox).Checked;
     GraphViewer.ShowMiners     = (sender as CheckBox).Checked;
     GraphViewer.Graph.UpdateNodeValues();
     GraphViewer.UpdateNodes();
 }
コード例 #2
0
        private void fixedAmountButton_CheckedChanged(object sender, EventArgs e)
        {
            if ((sender as RadioButton).Checked)
            {
                this.GraphViewer.Graph.SelectedAmountType = AmountType.FixedAmount;
            }

            GraphViewer.Graph.UpdateNodeValues();
            GraphViewer.UpdateNodes();
            GraphViewer.Invalidate();
        }
コード例 #3
0
        private void LanguageDropDown_SelectedIndexChanged(object sender, EventArgs e)
        {
            String newLocale = (LanguageDropDown.SelectedItem as Language).Name;

            DataCache.LocaleFiles.Clear();
            DataCache.LoadLocaleFiles(newLocale);

            GraphViewer.UpdateNodes();
            UpdateControlValues();

            Properties.Settings.Default["Language"] = newLocale;
            Properties.Settings.Default.Save();
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: Stonemuzzle/Foreman
 private void rateButton_CheckedChanged(object sender, EventArgs e)
 {
     if ((sender as RadioButton).Checked)
     {
         this.GraphViewer.Graph.SelectedAmountType = AmountType.Rate;
         rateOptionsDropDown.Enabled = true;
     }
     else
     {
         rateOptionsDropDown.Enabled = false;
     }
     GraphViewer.UpdateNodes();
     GraphViewer.Invalidate();
 }
コード例 #5
0
        private void rateOptionsDropDown_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch ((sender as ComboBox).SelectedIndex)
            {
            case 0:
                GraphViewer.Graph.SelectedUnit = RateUnit.PerSecond;
                break;

            case 1:
                GraphViewer.Graph.SelectedUnit = RateUnit.PerMinute;
                break;
            }
            GraphViewer.Graph.UpdateNodeValues();
            GraphViewer.Invalidate();
            GraphViewer.UpdateNodes();
        }
コード例 #6
0
ファイル: MainForm.cs プロジェクト: Stonemuzzle/Foreman
        private void fixedAmountButton_CheckedChanged(object sender, EventArgs e)
        {
            if ((sender as RadioButton).Checked)
            {
                this.GraphViewer.Graph.SelectedAmountType = AmountType.FixedAmount;
            }

            MinerDisplayCheckBox.Checked
                      = MinerDisplayCheckBox.Enabled
                      = AssemblerDisplayCheckBox.Enabled
                      = AssemblerDisplayCheckBox.Checked
                      = !(sender as RadioButton).Checked;

            GraphViewer.UpdateNodes();
            GraphViewer.Invalidate();
        }
コード例 #7
0
ファイル: MainForm.cs プロジェクト: Stonemuzzle/Foreman
 private void ModuleSelectionBox_ItemCheck(object sender, ItemCheckEventArgs e)
 {
     ((Module)ModuleSelectionBox.Items[e.Index]).Enabled = e.NewValue == CheckState.Checked;
     GraphViewer.UpdateNodes();
 }
コード例 #8
0
ファイル: MainForm.cs プロジェクト: Stonemuzzle/Foreman
 private void SingleAssemblerPerRecipeCheckBox_CheckedChanged(object sender, EventArgs e)
 {
     GraphViewer.Graph.OneAssemblerPerRecipe = (sender as CheckBox).Checked;
     GraphViewer.UpdateNodes();
 }