public SmptWrapper() { var port = rnd.Next(50000, 60000); this.settingsSwitcher = new SettingsSwitcher("MailServerPort", port.ToString()); this.SmtpServerInstance = SimpleSmtpServer.Start(Settings.MailServerPort); }
private void ConfigureSettings() { this.musicVolumeLabel = new SettingsLabel("Music Volume"); this.musicVolumeTrackBar = new SettingsSlider(); this.soundsVolumeLabel = new SettingsLabel("Sounds Volume"); this.soundsVolumeTrackBar = new SettingsSlider(); this.resolutionLabel = new SettingsLabel("Resolution"); // this.resolutionSwitcher = new SettingsSwitcher<Resolution>(new Resolution(3, 4), // new Resolution(720, 480), // new Resolution(1080, 920)); this.fullScreenLabel = new SettingsLabel("Full Screen"); this.fullScreenSwitcher = new SettingsSwitcher <string>(new[] { "OFF", "ON" }, new Action[] { this._controller.OffFullScreen, this._controller.SetFullScreen }); var BorderLessLabel = new SettingsLabel("Borderless"); var BorderlessSwitcher = new SettingsSwitcher <string>(new[] { "OFF", "ON" }, new Action[] { this._controller.BackBorders, this._controller.SetBorderLess }); var rowContent = new List <Tuple <SettingsLabel, Control> > { Tuple.Create <SettingsLabel, Control>(this.musicVolumeLabel, this.musicVolumeTrackBar), Tuple.Create <SettingsLabel, Control>(this.soundsVolumeLabel, this.soundsVolumeTrackBar), // Tuple.Create<SettingsLabel, Control>(this.resolutionLabel, this.resolutionSwitcher), Tuple.Create <SettingsLabel, Control>(this.fullScreenLabel, this.fullScreenSwitcher), Tuple.Create <SettingsLabel, Control>(BorderLessLabel, BorderlessSwitcher) }; for (int i = 0; i < rowContent.Count; i++) { this.settings.RowStyles.Add(new RowStyle(SizeType.Percent, 1)); this.settings.Controls.Add(rowContent[i].Item1, 0, i); this.settings.Controls.Add(rowContent[i].Item2, 1, i); } this.settings.RowStyles.Add(new RowStyle(SizeType.Percent, 1)); this.ChangeControls = new Label(); this.ChangeControls.Text = "Change Controls"; this.ChangeControls.Dock = DockStyle.Fill; this.ChangeControls.TextAlign = ContentAlignment.MiddleCenter; //this.ChangeControls.BackColor = Color.Gray; //this.settings.Controls.Add(this.ChangeControls, 0, 4); this.settings.SetColumnSpan(this.ChangeControls, 2); //this.soundsVolumeLabel.BackColor = Color.Navy; //this.musicVolumeLabel.BackColor = Color.Peru; }
public virtual void SetTestRunnerSetting(string value) { this.settingsSwitcher = new SettingsSwitcher(this.settings.RequireJSSettingName, value); }