private void Window_Loaded(object sender, RoutedEventArgs e) { System.Windows.Data.CollectionViewSource cableTypeViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("cableTypeViewSource"))); cableTypeViewSource.Source = MainWindow.activeProject.CableTypes; List <string> results = new List <string>(); results.Add("Tak"); results.Add("Nie"); ResultComboBox.ItemsSource = results; SourceTextBox.Text = mesurement.Source; DestinationTextBox.Text = mesurement.Destination; WireTextBox.Text = mesurement.NumberOfWire.ToString(); DistanceTextBox.Text = mesurement.Distance.ToString(); PigCountTextBox.Text = mesurement.CountOfPig.ToString(); WeldCountTextBox.Text = mesurement.CountOfWeld.ToString(); MesurementTextBox.Text = mesurement.RealAttenuation.ToString(); CabletypeCombo.SelectedItem = mesurement.Type; ManuallyResultCheckBox.IsChecked = mesurement.IsPropperValueManuallySet; if (mesurement.IsPropperValueManuallySet) { ResultComboBox.SelectedIndex = mesurement.PropperValue == true ? 0 : 1; } SourceTextBox.Focus(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { System.Windows.Data.CollectionViewSource cableTypeViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("cableTypeViewSource"))); cableTypeViewSource.Source = MainWindow.activeProject.CableTypes; List <string> results = new List <string>(); results.Add("Tak"); results.Add("Nie"); ResultComboBox.ItemsSource = results; SourceTextBox.Focus(); }
private void EditRuleView_OnLoaded(object sender, RoutedEventArgs e) { SourceTextBox.Focus(); }