コード例 #1
0
        private void BtnAddCrosslinkSearch_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new XLSearchTaskWindow();

            if (dialog.ShowDialog() == true)
            {
                AddTaskToCollection(dialog.TheTask);
                UpdateTaskGuiStuff();
            }
        }
コード例 #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);
            }
        }