private void OpenTasks()
        {
            сhannels_checkedListBox.Items.Clear();
            channelSelect1_combobox.Items.Clear();
            channelSelect2_combobox.Items.Clear();

            RedrawStatistic_btn.Enabled = true;

            List<List<string>> experimantsGroupsList = ADatabaseWorker.GetAllExperimentGroups(db);
            OpenExperimentsGroupsDialog od = new OpenExperimentsGroupsDialog(experimantsGroupsList);
            od.ShowDialog();

            if (od.ExperimentGroupIDsForDelete != null && od.ExperimentGroupIDsForDelete.Count > 0)
            {
                ADatabaseWorker.DeleteExperimentData(db, od.ExperimentGroupIDsForDelete);
            }

            if (od.ExperimentGroupIDsForOpen != null && od.ExperimentGroupIDsForOpen.Count > 0)
            {
                experimentGroup = Convert.ToInt32(od.ExperimentGroupIDsForOpen[0]);
                List<string> data = ADatabaseWorker.GetBaseblockAndChannelsInfo(db, experimentGroup);
                ALayout.SetChannelsComboBox(data, channelSelect1_combobox, channelSelect2_combobox);
                DrawTask(true);
            }
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: EugeneGudima/Reflecta
        private void OpenTasks()
        {
            сhannels_checkedListBox.Items.Clear();
            channelSelect1_combobox.Items.Clear();
            channelSelect2_combobox.Items.Clear();

            RedrawStatistic_btn.Enabled = true;
            DialogResult answer = MessageBox.Show("Получать количество точек в эксперименте??", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
            List<List<string>> experimantsGroupsList = ADatabaseWorker.GetAllExperimentGroups(db, answer == System.Windows.Forms.DialogResult.Yes? true: false);
            OpenExperimentsGroupsDialog od = new OpenExperimentsGroupsDialog(experimantsGroupsList);
            od.ShowDialog();

            if (od.ExperimentGroupIDsForDelete != null && od.ExperimentGroupIDsForDelete.Count > 0)
            {
                ADatabaseWorker.DeleteExperimentData(db, od.ExperimentGroupIDsForDelete);
            }

            if (od.ExperimentGroupIDsForOpen != null && od.ExperimentGroupIDsForOpen.Count > 0)
            {
                experimentGroup = Convert.ToInt32(od.ExperimentGroupIDsForOpen[0]);
                List<string> data = ADatabaseWorker.GetBaseblockAndChannelsInfo(db, experimentGroup);
                ALayout.SetChannelsComboBox(data, channelSelect1_combobox, channelSelect2_combobox);
                DrawTask(true);
            }
        }