// This is called when the browse button is pressed
        public override string Browse(string initialvalue)
        {
            int initangle;

            int.TryParse(initialvalue, out initangle);
            return(AngleForm.ShowDialog(Form.ActiveForm, initangle).ToString());
        }
        public override void Browse(IWin32Window parent)
        {
            int oldvalue = (int)Math.Round(value);
            int newvalue = AngleForm.ShowDialog(parent, oldvalue);

            if (newvalue != oldvalue)
            {
                value = (float)newvalue;
            }
        }
Example #3
0
 void CreateChildForms()
 {
     loadScopeForm     = new LoadScopeForm(AppTexts, serialPort);
     directAccessForm  = new DirectAccessForm(serialPort, AppTexts);
     jogForm           = new JogForm(serialPort, AppTexts);
     angleForm         = new AngleForm(serialPort, AppTexts);
     downloadSYMForm   = new DownloadSYMForm(serialPort, AppTexts);
     floatDirectAccess = new FloatDirectAccessForm(serialPort, TextsParams.GetListParamNames(4, 14));
     eventLogForm      = new EventLogForm(AppTexts, serialPort, systemConfiguration);
     verificationForm  = new VerificationForm(serialPort);
 }
Example #4
0
        protected override void Invoke(object parameter)
        {
            switch (((parameter as System.Windows.RoutedEventArgs).Source as System.Windows.Controls.Button).Name)
            {
            case "button6":
                AlgebraicExpressions alg = new AlgebraicExpressions();
                alg.Show();
                this.Target.Hide();
                break;

            case "button4":
                AngleForm ang = new AngleForm();
                ang.Show();
                this.Target.Hide();
                break;

            case "button5":
                AutoAngleForm autoang = new AutoAngleForm();
                autoang.Show();
                this.Target.Hide();
                break;

            case "button2":
                AutoCalcForm autocalc = new AutoCalcForm();
                autocalc.Show();
                this.Target.Hide();
                break;

            case "button1":
                ManualCalcForm manual = new ManualCalcForm();
                manual.Show();
                this.Target.Hide();
                break;

            case "button3":
                MoreComplexForm more = new MoreComplexForm();
                more.Show();
                this.Target.Hide();
                break;
            }
        }
Example #5
0
 public override void Browse(IWin32Window parent)
 {
     value = Angle2D.DoomToReal(AngleForm.ShowDialog(parent, Angle2D.RealToDoom(value)));
 }
 public override void Browse(IWin32Window parent)
 {
     value = AngleForm.ShowDialog(parent, value);
 }
Example #7
0
 public override void Browse(IWin32Window parent)
 {
     value = (int)Math.Round((float)AngleForm.ShowDialog(parent, (int)Math.Round((float)value / 256 * 360)) / 360 * 256);
 }