Exemplo n.º 1
0
        private void AddGPTMDTaskButton_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new GptmdTaskWindow();

            if (dialog.ShowDialog() == true)
            {
                AddTaskToCollection(dialog.TheTask);
                UpdateTaskGuiStuff();
            }
        }
Exemplo n.º 2
0
        private void TasksTreeView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var a = sender as TreeView;

            if (a.SelectedItem is PreRunTask preRunTask)
            {
                switch (preRunTask.metaMorpheusTask.TaskType)
                {
                case MyTask.Search:

                    var searchDialog = new SearchTaskWindow(preRunTask.metaMorpheusTask as SearchTask);

                    searchDialog.ShowDialog();

                    preRunTask.DisplayName = "Task" + (staticTasksObservableCollection.IndexOf(preRunTask) + 1) + "-" + searchDialog.TheTask.CommonParameters.TaskDescriptor;
                    tasksTreeView.Items.Refresh();

                    return;

                case MyTask.Gptmd:
                    var gptmddialog = new GptmdTaskWindow(preRunTask.metaMorpheusTask as GptmdTask);
                    gptmddialog.ShowDialog();
                    preRunTask.DisplayName = "Task" + (staticTasksObservableCollection.IndexOf(preRunTask) + 1) + "-" + gptmddialog.TheTask.CommonParameters.TaskDescriptor;
                    tasksTreeView.Items.Refresh();

                    return;

                case MyTask.Calibrate:
                    var calibratedialog = new CalibrateTaskWindow(preRunTask.metaMorpheusTask as CalibrationTask);
                    calibratedialog.ShowDialog();
                    preRunTask.DisplayName = "Task" + (staticTasksObservableCollection.IndexOf(preRunTask) + 1) + "-" + calibratedialog.TheTask.CommonParameters.TaskDescriptor;
                    tasksTreeView.Items.Refresh();
                    return;

                case MyTask.XLSearch:
                    var XLSearchdialog = new XLSearchTaskWindow(preRunTask.metaMorpheusTask as XLSearchTask);
                    XLSearchdialog.ShowDialog();
                    preRunTask.DisplayName = "Task" + (staticTasksObservableCollection.IndexOf(preRunTask) + 1) + "-" + XLSearchdialog.TheTask.CommonParameters.TaskDescriptor;
                    tasksTreeView.Items.Refresh();
                    return;

                case MyTask.Neo:
                    var Neodialog = new NeoSearchTaskWindow(preRunTask.metaMorpheusTask as NeoSearchTask);
                    Neodialog.ShowDialog();
                    preRunTask.DisplayName = "Task" + (staticTasksObservableCollection.IndexOf(preRunTask) + 1) + "-" + Neodialog.TheTask.CommonParameters.TaskDescriptor;
                    tasksTreeView.Items.Refresh();
                    return;
                }
            }

            if (a.SelectedItem is OutputFileForTreeView fileThing)
            {
                System.Diagnostics.Process.Start(fileThing.FullPath);
            }
        }