예제 #1
0
        private void OpenForm(TaskData data)
        {
            if (data.Findings != null)
            {
                Binding paramBinding = new();
                paramBinding.Source = data.Findings;
                paramBinding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
                FindingsDataGrid.SetBinding(DataGrid.ItemsSourceProperty, paramBinding);

                Binding filesParamBinding = new();
                filesParamBinding.Source = data.DataFiles;
                filesParamBinding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
                FilesDataGrid.SetBinding(DataGrid.ItemsSourceProperty, filesParamBinding);

                Binding equipmentParamBinding = new();
                equipmentParamBinding.Source = data.StandardEquipment;
                equipmentParamBinding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
                EquipmentDataGrid.SetBinding(DataGrid.ItemsSourceProperty, equipmentParamBinding);
            }

            if (((ActionTaken)data.Actions).Maintenance)
            {
                MaintenanceSelection.IsSelected = true;
            }
            else if (((ActionTaken)data.Actions).Calibration | ((ActionTaken)data.Actions).Verification)
            {
                CalibrationSelection.IsSelected = true;
            }
            FillForm(data);
        }
예제 #2
0
 public void ExecutedAllFiles(object sender, ExecutedRoutedEventArgs e)
 {
     ShowDescription.IsChecked = true;
     this.Cursor = Cursors.Wait;
     ViewModel.RenameAll();
     this.Cursor = Cursors.Arrow;
     FilesDataGrid.UnselectAll();
 }