public SegmentCalculatorDialog(
            InstrumentWindow owner,
            double initial,
            double delay,
            double final,
            bool exponential)
        {
            this.owner = owner;

            InitializeComponent();
            this.Icon = OutOfPhase.Properties.Resources.Icon2;

            DpiChangeHelper.ScaleFont(this, Program.Config.AdditionalUIZoom);

            this.textBoxInitial.Text     = initial.ToString();
            this.textBoxDuration.Text    = delay.ToString();
            this.textBoxFinal.Text       = final.ToString();
            this.textBoxStartOffset.Text = savedNewStart.ToString();
            this.textBoxEndOffset.Text   = savedNewEnd.ToString();

            this.comboBoxFunction.Items.Add("Linear");
            this.comboBoxFunction.Items.Add("Exponential");
            this.comboBoxFunction.SelectedIndex = exponential ? 1 : 0;

            this.textBoxInitial.TextChanged            += new System.EventHandler(this.textBoxInitial_TextChanged);
            this.textBoxDuration.TextChanged           += new System.EventHandler(this.textBoxDuration_TextChanged);
            this.textBoxFinal.TextChanged              += new System.EventHandler(this.textBoxFinal_TextChanged);
            this.textBoxStartOffset.TextChanged        += new System.EventHandler(this.textBoxStartOffset_TextChanged);
            this.textBoxEndOffset.TextChanged          += new System.EventHandler(this.textBoxEndOffset_TextChanged);
            this.textBoxNewFinal.TextChanged           += new System.EventHandler(this.textBoxNewFinal_TextChanged);
            this.textBoxNewInitial.TextChanged         += new System.EventHandler(this.textBoxNewInitial_TextChanged);
            this.comboBoxFunction.SelectedIndexChanged += new System.EventHandler(this.comboBoxFunction_SelectedIndexChanged);

            Recalculate(true /*updateInitialFinal*/);
        }
 public SegmentCalculatorDialog(
     InstrumentWindow owner)
     : this(owner, savedInitial, savedDelay, savedFinal, savedExponential)
 {
 }