Exemple #1
0
        private void stepSizeTextBox_DoubleClick(object sender, EventArgs e)
        {
            var f = new FrequencyInputPad
            {
                Text          = "Step size",
                AllowNegative = false,
                StartPosition = FormStartPosition.Manual
            };

            f.RelativeAlign(stepSizeTextBox, ContentAlignment.MiddleRight, 5);
            if (f.ShowDialog(this) == DialogResult.OK)
            {
                SetStepSize((long)f.Value);
            }
        }
Exemple #2
0
        private void orderLabel_DoubleClick(object sender, EventArgs e)
        {
            var f = new FrequencyInputPad
            {
                Text          = "Frequency",
                AllowNegative = !_control.SourceIsTunable,
                StartPosition = FormStartPosition.Manual
            };

            f.RelativeAlign(orderLabel, ContentAlignment.MiddleRight, 5);
            if (f.ShowDialog(this) == DialogResult.OK)
            {
                if (!_control.IsPlaying)
                {
                    return;
                }
                SetFrequency((long)f.Value);
            }
        }