public TaskInfoPage(TaskInfoViewModel vm)
        {
            InitializeComponent();
            DataContext = vm;

            PreprocessingTable.Columns.Clear();
            var p = vm.PreprocessingList[0].ParameterProcessing;

            PreprocessingTable.Columns.Add(new DataGridTextColumn
            {
                Header = "Название",
                Binding = new Binding("Name"),
                Width = new DataGridLength(2, DataGridLengthUnitType.Star)
            });

            int index = 0;
            foreach(var item in p)
            {
                PreprocessingTable.Columns.Add(new DataGridTextColumn
                {
                    Header = item.Item1.Name,
                    Binding = new Binding(string.Format("ParameterProcessing[{0}].Item2", index)),
                    Width = new DataGridLength(1, DataGridLengthUnitType.Star)
                });
                index++;
            }
        }
Esempio n. 2
0
 public TaskTree(models.Task task,
                 models.Selection[] sel,
                 models.TaskSolver[] per,
                 models.TaskSolver[] desCART,
                 models.TaskSolver[] desC4_5,
                 models.TaskSolver[] wards,
                 models.TaskSolver[] convnets,
                 models.TaskSolver[] kohnets,
                 string[] solv,
                 TaskTreeViewModel vm)
 {
     Title   = task.Name;
     Content = new ObservableCollection <TreeSection>
     {
         new SelectionTree(task, sel, vm),
         new SolverTree(task, per, desCART, desC4_5, wards, convnets, kohnets, vm),
         new SolutionsTree(Title, solv, vm)
     };
     deleteCommand = new ActionHandler(
         () =>
     {
         new dms.services.preprocessing.DataHelper().deleteTask(task);
         vm.UpdateTaskTree();
     }, e => true);
     showInfoDialogCommand = new ActionHandler(() =>
     {
         TaskInfoViewModel t = new TaskInfoViewModel(task);
         vm.SendRequestCreateView(t);
     }, e => true);
     showPreprocessingCreationHandler = new ActionHandler(() =>
     {
         PreprocessingViewModel t = new PreprocessingViewModel(task, -1);
         vm.SendRequestCreateView(t);
     }, e => true);
 }
 public void ShowTaskInfoDialog(string taskName)
 {
     TaskInfoViewModel t = new TaskInfoViewModel(taskName);
     requestTaskInfoShow?.Invoke(this, new EventArgs<TaskInfoViewModel>(t));
 }