public ChoosingLanguageWindow() { InitializeComponent(); Dictionary <LanguageType, string> lang = International.GetAvailableLanguages(); LangCB.DataContext = lang.Values; }
public Form_ChooseLanguage_r() { InitializeComponent(); // Add language selections list Dictionary <LanguageType, string> lang = International.GetAvailableLanguages(); comboBox_Languages.Items.Clear(); for (int i = 0; i < lang.Count; i++) { comboBox_Languages.Items.Add(lang[(LanguageType)i]); } comboBox_Languages.SelectedIndex = 0; label_Instruction.Location = new Point((this.Width - label_Instruction.Size.Width) / 2, label_Instruction.Location.Y); button_OK.Location = new Point((this.Width - button_OK.Size.Width) / 2, button_OK.Location.Y); comboBox_Languages.Location = new Point((this.Width - comboBox_Languages.Size.Width) / 2, comboBox_Languages.Location.Y); }
public Form_ChooseLanguage() { InitializeComponent(); // Add language selections list var lang = International.GetAvailableLanguages(); comboBox_Languages.Items.Clear(); for (var i = 0; i < lang.Count; i++) { comboBox_Languages.Items.Add(lang[(LanguageType)i]); } comboBox_Languages.SelectedIndex = 0; //label_Instruction.Location = new Point((this.Width - label_Instruction.Size.Width) / 2, label_Instruction.Location.Y); //button_OK.Location = new Point((this.Width - button_OK.Size.Width) / 2, button_OK.Location.Y); //comboBox_Languages.Location = new Point((this.Width - comboBox_Languages.Size.Width) / 2, comboBox_Languages.Location.Y); textBox_TOS.Text = TosText; textBox_TOS.ScrollBars = ScrollBars.Vertical; }
private void InitializeGeneralTabFieldValuesReferences() { // Checkboxes set checked value { checkBox_DebugConsole.Checked = ConfigManager.GeneralConfig.DebugConsole; checkBox_AutoStartMining.Checked = ConfigManager.GeneralConfig.AutoStartMining; checkBox_HideMiningWindows.Checked = ConfigManager.GeneralConfig.HideMiningWindows; checkBox_MinimizeToTray.Checked = ConfigManager.GeneralConfig.MinimizeToTray; checkBox_DisableDetectionNVIDIA.Checked = ConfigManager.GeneralConfig.DeviceDetection.DisableDetectionNVIDIA; checkBox_DisableDetectionAMD.Checked = ConfigManager.GeneralConfig.DeviceDetection.DisableDetectionAMD; checkBox_AutoScaleBTCValues.Checked = ConfigManager.GeneralConfig.AutoScaleBTCValues; checkBox_StartMiningWhenIdle.Checked = ConfigManager.GeneralConfig.StartMiningWhenIdle; checkBox_ShowDriverVersionWarning.Checked = ConfigManager.GeneralConfig.ShowDriverVersionWarning; checkBox_DisableWindowsErrorReporting.Checked = ConfigManager.GeneralConfig.DisableWindowsErrorReporting; checkBox_NVIDIAP0State.Checked = ConfigManager.GeneralConfig.NVIDIAP0State; checkBox_LogToFile.Checked = ConfigManager.GeneralConfig.LogToFile; checkBox_AMD_DisableAMDTempControl.Checked = ConfigManager.GeneralConfig.DisableAMDTempControl; checkBox_DisableDefaultOptimizations.Checked = ConfigManager.GeneralConfig.DisableDefaultOptimizations; checkBox_ContinueMiningIfNoInternetAccess.Checked = ConfigManager.GeneralConfig.ContinueMiningIfNoInternetAccess; this.checkBox_Use3rdPartyMiners.Checked = ConfigManager.GeneralConfig.Use3rdPartyMiners == Use3rdPartyMiners.YES; } // Textboxes { textBox_BitcoinAddress.Text = ConfigManager.GeneralConfig.BitcoinAddress; textBox_WorkerName.Text = ConfigManager.GeneralConfig.WorkerName; textBox_SwitchMinSecondsFixed.Text = ConfigManager.GeneralConfig.SwitchMinSecondsFixed.ToString(); textBox_SwitchMinSecondsDynamic.Text = ConfigManager.GeneralConfig.SwitchMinSecondsDynamic.ToString(); textBox_SwitchMinSecondsAMD.Text = ConfigManager.GeneralConfig.SwitchMinSecondsAMD.ToString(); textBox_MinerAPIQueryInterval.Text = ConfigManager.GeneralConfig.MinerAPIQueryInterval.ToString(); textBox_MinerRestartDelayMS.Text = ConfigManager.GeneralConfig.MinerRestartDelayMS.ToString(); textBox_MinIdleSeconds.Text = ConfigManager.GeneralConfig.MinIdleSeconds.ToString(); textBox_LogMaxFileSize.Text = ConfigManager.GeneralConfig.LogMaxFileSize.ToString(); textBox_ethminerDefaultBlockHeight.Text = ConfigManager.GeneralConfig.ethminerDefaultBlockHeight.ToString(); textBox_APIBindPortStart.Text = ConfigManager.GeneralConfig.ApiBindPortPoolStart.ToString(); textBox_MinProfit.Text = ConfigManager.GeneralConfig.MinimumProfit.ToString("F2").Replace(',', '.'); // force comma; } // set custom control referances { benchmarkLimitControlCPU.TimeLimits = ConfigManager.GeneralConfig.BenchmarkTimeLimits.CPU; benchmarkLimitControlNVIDIA.TimeLimits = ConfigManager.GeneralConfig.BenchmarkTimeLimits.NVIDIA; benchmarkLimitControlAMD.TimeLimits = ConfigManager.GeneralConfig.BenchmarkTimeLimits.AMD; // here we want all devices devicesListViewEnableControl1.SetComputeDevices(ComputeDeviceManager.Avaliable.AllAvaliableDevices); devicesListViewEnableControl1.SetAlgorithmsListView(algorithmsListView1); devicesListViewEnableControl1.IsSettingsCopyEnabled = true; } // Add language selections list { Dictionary <LanguageType, string> lang = International.GetAvailableLanguages(); comboBox_Language.Items.Clear(); for (int i = 0; i < lang.Count; i++) { comboBox_Language.Items.Add(lang[(LanguageType)i]); } } // ComboBox { comboBox_Language.SelectedIndex = (int)ConfigManager.GeneralConfig.Language; comboBox_ServiceLocation.SelectedIndex = ConfigManager.GeneralConfig.ServiceLocation; currencyConverterCombobox.SelectedItem = ConfigManager.GeneralConfig.DisplayCurrency; } }