private async void SpeedBox_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            var ParameterInput = new ParameterInputBox();

            ParameterInput.Message.Text = LanguageHandler.GetMessageResource("ContinousSpeed");
            await DialogHost.Show(ParameterInput, "RootDialog");

            if (ParameterInput.result)
            {
                if ((ParameterInput.Parameter.Text != null) && (ParameterInput.Parameter.Text != ""))
                {
                    if ((float.Parse(ParameterInput.Parameter.Text) > 0 && float.Parse(ParameterInput.Parameter.Text) <= 20))
                    {
                        SpeedBar.Value = float.Parse(ParameterInput.Parameter.Text);
                        SpeedBox.Text  = LanguageHandler.GetMessageResource("ContSpeed") + float.Parse(ParameterInput.Parameter.Text).ToString() + " %";
                    }
                }
            }
        }
Exemple #2
0
        private async void LoadPos_Click(object sender, RoutedEventArgs e)
        {
            SyncCoord();
            var ParameterInput = new ParameterInputBox();

            ParameterInput.Message.Text = LanguageHandler.GetMessageResource("LoadPositionMSG");
            await DialogHost.Show(ParameterInput, "RootDialog");

            if (ParameterInput.result)
            {
                if ((ParameterInput.Parameter.Text != null) && (ParameterInput.Parameter.Text != ""))
                {
                    if ((int.Parse(ParameterInput.Parameter.Text) >= 0 && int.Parse(ParameterInput.Parameter.Text) <= MaxCoordinateNR))
                    {
                        CurrentlySelected     = int.Parse(ParameterInput.Parameter.Text);
                        SelectedPosition.Text = LanguageHandler.GetMessageResource("selectedPosition") + ParameterInput.Parameter.Text;
                        SavePos.IsEnabled     = true;
                        PositionSyncronizer.TargetPosition = coordinate[int.Parse(ParameterInput.Parameter.Text)];
                        DisplayData(coordinate[int.Parse(ParameterInput.Parameter.Text)], C_Axis_Exists);
                        SetGridStlye(C_Axis_Exists);
                    }
                }
            }
        }