Пример #1
0
        public void Process(Processing process, out IProcessingState timeoutState)
        {
            process.Modules = new Modules();
            process.Modules.Init();

            timeoutState = new NextAnalysis();
        }
Пример #2
0
        private TabItem addTabItem()
        {
            int count = _tabContainer.TabItems.Count;

            NewAnalysisDialogBox analysisNameDialogBox = new NewAnalysisDialogBox(string.Format("Analysis {0}", count));
            analysisNameDialogBox.ShowDialog();

            if (analysisNameDialogBox.DialogResult == true)
            {
                if (!_tabContainer.AnalysisNames.Contains(analysisNameDialogBox.Answer))
                {
                    TabItem tab = tab = new TabItem();
                    tab.Header = analysisNameDialogBox.Answer;
                    tab.Name = string.Format("analysis{0}", count);
                    tab.HeaderTemplate = analysisTabControl.FindResource("tabHeader") as DataTemplate;

                    _tabContainer.AnalysisNames.Add(analysisNameDialogBox.Answer);

                    ProcessSync communication = new ProcessSync();
                    _tabContainer.CommunicationList.Insert(count - 1, communication);

                    UserControl analysisControl = new AnalysisControl(communication, this, tab, _context, analysisNameDialogBox.Answer);
                    _tabContainer.AnalysisControlList.Insert(count - 1, analysisControl);
                    tab.Content = analysisControl;

                    Processing ecgAnalysis = new Processing(communication);
                    Thread analysisThread = new Thread(ecgAnalysis.run);
                    _tabContainer.ThreadList.Insert(count - 1, analysisThread);
                    analysisThread.Start();

                    _tabContainer.TabItems.Insert(count - 1, tab);
                    return tab;
                }
                else
                {
                    MessageBox.Show("Same analysis already exists.");
                    addSelected = false;
                    return null;
                }

            }
            else
            {
                addSelected = false;
                return null;

            }
        }
Пример #3
0
 public void Process(Processing process, out IProcessingState timeoutState)
 {
     timeoutState = new Idle(5);
 }