public void InitialLanguage() { btnAxis.Content = LanguageHandler.GetMessageResource("AxisTabText"); btnPneumathic.Content = LanguageHandler.GetMessageResource("PneuTabText"); btnMFU.Content = LanguageHandler.GetMessageResource("MFUTabText"); btnOther.Content = LanguageHandler.GetMessageResource("OtherTabText"); }
private void SpeedBar_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e) { if (SpeedBox != null) { SpeedBox.Text = LanguageHandler.GetMessageResource("ContSpeed") + Math.Round((decimal)SpeedBar.Value, 0).ToString() + " %"; AdsCommunication.WriteAny(ReferenceHandler.GetReferenceAdress("continousOverride"), (Double)Math.Round((decimal)SpeedBar.Value, 2)); } }
private async void MenuPopupButton_OnClick(object sender, RoutedEventArgs e) { if ((((ButtonBase)sender) == btnLogin2) && (UserStatus == 0)) { LoginDialog.Message.Text = LanguageHandler.GetMessageResource("loginmessage"); await DialogHost.Show(LoginDialog, "RootDialog"); UserStatus = UserHandler.SelectUserLevel(LoginDialog.User.Text, LoginDialog.Password.Password); WindowViewModel.SetUserAcces(UserStatus); LoginDialog.User.Text = ""; LoginDialog.Password.Password = ""; if (UserStatus >= 0) { manualPage.IsEnabled = true; settingsPage.IsEnabled = true; historyPage.IsEnabled = true; } if (NotifiSlot.Children.Count == 0 && UserStatus == 0) { notifiDisplayer.Configuration(LanguageHandler.GetMessageResource("wrongpass"), (SolidColorBrush)FindResource("BaseYellowBrush"), false); NotifiSlot.Children.Add(notifiDisplayer); } await Task.Factory.StartNew(() => { Thread.Sleep(5000); }).ContinueWith(t => { if (NotifiSlot.Children.Count != 0) { this.NotifiSlot.Children.Remove(NotifiSlot.Children[0]); } }, TaskScheduler.FromCurrentSynchronizationContext()); } else if ((((ButtonBase)sender) == btnLogin2) && (UserStatus > 0)) { LoginDialog.User.Text = ""; LoginDialog.Password.Password = ""; UserStatus = UserHandler.SelectUserLevel(null, null); manualPage.IsEnabled = false; settingsPage.IsEnabled = false; historyPage.IsEnabled = false; UserHandler.CurrentUserAcces = UserStatus; WindowViewModel.SetUserAcces(UserStatus); } }
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() + " %"; } } } }
public void SetStatement(bool state) { if (state) { MovementModeSelect.Content = LanguageHandler.GetMessageResource("btnContinous"); SpeedBox.Foreground = (FindResource("AccentColorBrush") as SolidColorBrush); StepSizeText.Foreground = (FindResource("PrimaryHueLightBrush") as SolidColorBrush); StepSize.Foreground = (FindResource("PrimaryHueLightBrush") as SolidColorBrush); SpeedBar.IsEnabled = true; StepSize.IsEnabled = false; } else { MovementModeSelect.Content = LanguageHandler.GetMessageResource("btnStep"); SpeedBox.Foreground = (FindResource("PrimaryHueLightBrush") as SolidColorBrush); StepSizeText.Foreground = (FindResource("AccentColorBrush") as SolidColorBrush); StepSize.Foreground = (FindResource("AccentColorBrush") as SolidColorBrush); SpeedBar.IsEnabled = false; StepSize.IsEnabled = true; } AdsCommunication.WriteAny(ReferenceHandler.GetReferenceAdress("ManualMovementMode"), state); }
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); } } } }
private void UserControl_Loaded(object sender, RoutedEventArgs e) { SelectedPosition.Text = LanguageHandler.GetMessageResource("plsSelectPos"); SetGridStlye(C_Axis_Exists); }
private void InitLanguage() { SpeedBox.Text = LanguageHandler.GetMessageResource("ContSpeed") + "0 %"; }