Exemplo n.º 1
0
 private void Moni(Button btn, int line)
 {
     btn.IsEnabled = false;
     IOCard.Moni(line, () =>
     {
         App.Current.Dispatcher.Invoke(new Action(() =>
         {
             btn.IsEnabled = true;
         }));
     });
 }
Exemplo n.º 2
0
 public Line(int lineNo, CountHelper count, LineOut lineOut, IOCard ioCard, StopHelper stopHelper)
 {
     Name = Config.Trigger[lineNo - 1].Name;
     OnPropertyChanged(nameof(Name));
     LineNo          = lineNo;
     Count           = count;
     LineOut         = lineOut;
     iOCard          = ioCard;
     Stop            = stopHelper;
     traceDataHelper = new TraceDataHelper();
     traceDataHelper.Init();
 }
Exemplo n.º 3
0
 void IOInit()
 {
     IOCard            = new IOCard();
     IOCard.OnTrigger += (index) =>
     {
         if (Stop.IsShowStop)
         {
             return;
         }
         Trigger.TriggerOn(index);
         Lines[index].SetReading();
     };
     IOCard.OnComplate += (index) =>
     {
         Lines[index].SetDefault();
         Count.UpdateToFile();
     };
     IOCard.OnMoni += () =>
     {
         MoniVisibility = Visibility.Visible;
         OnPropertyChanged(nameof(MoniVisibility));
     };
     OnPropertyChanged(nameof(IOCard));
 }