public void ToControls(SidWizPlusGui form) { // Disable control notifications as we load values into them _ignoreFromControls = true; form.VerticalScaling.Text = AutoScaleHeight.ToString(CultureInfo.CurrentCulture); form.WidthControl.Text = Width.ToString(); form.HeightControl.Text = Height.ToString(); form.Columns.Value = Columns; form.MarginTopControl.Value = MarginTop; form.MarginLeftControl.Value = MarginLeft; form.MarginRightControl.Value = MarginRight; form.MarginBottomControl.Value = MarginBottom; form.FrameRateControl.Value = FrameRate; form.BackgroundColorButton.Color = BackgroundColor; form.PreviewCheckBox.Checked = Preview.Enabled; form.PreviewFrameskip.Value = Preview.Frameskip; form.EncodeCheckBox.Checked = EncodeVideo.Enabled; form.FfmpegParameters.Text = EncodeVideo.FfmpegParameters; form.AutogenerateMasterMix.Checked = MasterAudio.IsAutomatic; form.MasterMixReplayGain.Checked = MasterAudio.ApplyReplayGain; form.MasterAudioPath.Text = MasterAudio.Path; _ignoreFromControls = false; }
public void FromControls(SidWizPlusGui form) { if (_ignoreFromControls) { return; } AutoScaleHeight = float.Parse(form.VerticalScaling.Text); Width = int.Parse(form.WidthControl.Text); Height = int.Parse(form.HeightControl.Text); Columns = (int)form.Columns.Value; MarginTop = (int)form.MarginTopControl.Value; MarginLeft = (int)form.MarginLeftControl.Value; MarginRight = (int)form.MarginRightControl.Value; MarginBottom = (int)form.MarginBottomControl.Value; FrameRate = (int)form.FrameRateControl.Value; BackgroundColor = form.BackgroundColorButton.Color; Preview.Enabled = form.PreviewCheckBox.Checked; Preview.Frameskip = (int)form.PreviewFrameskip.Value; EncodeVideo.Enabled = form.EncodeCheckBox.Checked; EncodeVideo.FfmpegParameters = form.FfmpegParameters.Text; MasterAudio.IsAutomatic = form.AutogenerateMasterMix.Checked; MasterAudio.ApplyReplayGain = form.MasterMixReplayGain.Checked; MasterAudio.Path = form.MasterAudioPath.Text; }