public SelectionLeaf(string taskName, string name, TaskTreeViewModel vm)
 {
     Title = name;
     parentTask = taskName;
     deleteHandler = new ActionHandler(() => vm.DeleteSelection(parentTask, Title), e => true);
     showSelectionInfoHandler = new ActionHandler(() => vm.ShowSelectionInfoDialog(parentTask, Title), e => true);
 }
        public TaskCreationViewModel()
        {
            cancelHandler = new ActionHandler(Cancel, (e) => true);
            createHandler = new ActionHandler(CreateTask, (e) => CanCreateTask());
            addSelectionHandler = new ActionHandler(AddSelection, e => true);

            Selections = new ObservableCollection<SelectionCreationViewModel>();
            Parameters = new ObservableCollection<ParameterCreationViewModel>();
        }
        public SelectionCreationViewModel(string taskName)
        {
            ParentTask = taskName;
            Random r = new Random();
            SelectionName = "Выборка " + r.Next(1, 1000);
            HasHeader = false;
            CountRows = 0;
            FilePath = "";
            Delimiter = ",";

            deleteSelectionHandler = new ActionHandler(DeleteSelection, (o) => true);
            browseFileCommandHandler = new ActionHandler(BrowseFile, (o) => true);
        }
 public SelectionTree(string taskName, string[] selections, 
     TaskTreeViewModel vm)
     : base("Выборки")
 {
     this.createSelection = new ActionHandler(() => vm.ShowCreateSelectionDialog(taskName), e => true);
     this.deleteSelection = new ActionHandler(() => vm.DeleteSelection(taskName, Title), e => true);
     ParentTask = taskName;
     Content = new ObservableCollection<TreeSection>();
     for(int i = 0; i < selections.Length; i++)
     {
         Content.Add(new SelectionLeaf(taskName, selections[i], vm));
     }
 }
        public TaskTreeViewModel()
        {
            Tasks = new ObservableCollection<TaskTree>
            {
                new TaskTree("Ирис",
                    new string[] { "Выборка 1", "Выборка 2" },
                    new string[] { "Персептрон 1", "Персептрон 2" },
                    new string[] { "Дерево 1", },
                    new string[] { },
                    this),
                new TaskTree("Морское ушко",
                    new string[] {"Выборка 1"},
                    new string[] { "П_му1"},
                    new string[] { },
                    new string[] { "Решение 1"},
                    this)
                };

            createTask = new ActionHandler(ShowCreateTaskDialog, e => true);
        }