Ejemplo n.º 1
0
 public void Start(ColetaInfo ci)
 {
     List<string> names = new List<string>();
     models.ForEach(delegate(ChannelControl cc){
         names.Add(cc.ChnName);
         cc.DisableClick();
     });
     maxPontos = ci.Duration * boardConfig.Rate * boardConfig.QChanns;
     fileHand = new FileHandler(boardConfig.QChanns, boardConfig.BoardName, boardConfig.Rate, ci.PatientName, names);
     plotHand = new PlotHandler(models, uiDispatcher);
     Processing += fileHand.CreateBackground;
     Processing += plotHand.CreateBackground;
     dataCont.Scanned += DispatchData;
     dataCont.Start();
 }
 public ColetaWindow(ColetaInfo ci, List<BoardConfiguration> bcs)
 {
     InitializeComponent();
     duration.Text = ci.Duration.ToString();
     pName.Text = ci.PatientName.ToString();
     bcWindows = new List<BoardConfig>();
     for (int i = 0; i < bcs.Count; i++)
     {
         BoardConfig bc = new BoardConfig(bcs[i]);
         bc.SetValue(Grid.RowProperty, i);
         RowDefinition rowDef = new RowDefinition();
         rowDef.Height = new GridLength(100, GridUnitType.Pixel);
         boardConfigGrid.RowDefinitions.Add(rowDef);
         boardConfigGrid.Children.Add(bc);
         bcWindows.Add(bc);
     }
 }
 private void TrialCleaning(string complement)
 {
     //animationToggle();
     coletaInfo = null;
     completed = true;
     started = false;
     stsMsg.Content = complement + ", click the third icon to save acquired data";
     dataHandlers.Clear();
     CommandManager.InvalidateRequerySuggested();
 }
 private void New_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     tabControl.Items.Clear();
     ColetaWindow cw = new ColetaWindow(new ColetaInfo(20, "Patient"), boardConfigs);
     cw.Owner = this;
     cw.ShowDialog();
     if (!cw.Aborted)
     {
         coletaInfo = cw.ColetaInformation;
         boardConfigs = cw.BoardConfigs;
         for (int i = 0; i < boards.Count; i++)
         {
             tabControl.Items.Add(createTabItem(boards[i], i, boardConfigs[i]));
         }
         tabControl.SelectedItem = tabControl.Items[0];
         completed = false;
         stsMsg.Content = "Trial successfuly created, double click chart to change description, click the play icon to start acquisition";
     }
 }