Example #1
0
 public PcUpDownService(SlaveInfoService slaveInfoService, ButtonService buttonService, SynchronizationContext current, SysConfig SysConfig, Domain.Models.UserInfo UserInfo)
 {
     this.SlaveInfoService = slaveInfoService;
     this.ButtonService    = buttonService;
     this.SysConfig        = SysConfig;
     this.current          = current;
     this.UserInfo         = UserInfo;
 }
Example #2
0
 private void UpdateButton(UpDownMessage upDownMessage = null)
 {
     if (upDownMessage == null)
     {
         current.Post((o) => { ButtonService.UpdateButtons(); }, null);
     }
     else
     {
         current.Post((o) => { ButtonService.UpdateButton(upDownMessage); }, null);
     }
 }
Example #3
0
 public void WaitPut(List <LatticeInfo> latticeInfoList, string barCode)
 {
     latticeInfoList.ForEach(o =>
     {
         if (o.Product.Exists(p => p.BarCode == barCode && !p.IsComplete))
         {
             SlaveInfoService.SetLatticeStatus(o, LatticeStatus.WaitPut);
             SlaveInfoService.SetProductStatus(o, barCode, ProductStatus.WaitPut);
         }
     });
     current.Post((o) => { ButtonService.UpdateButton(latticeInfoList); }, null);
     SlaveInfoService.SaveAync();
 }
Example #4
0
 private void FlashGreenLight()
 {
     System.Windows.Forms.Timer timer1 = new System.Windows.Forms.Timer();
     timer1.Interval = 200;
     timer1.Enabled  = true;
     timer1.Tick    += new EventHandler((s, o) =>
     {
         if (num % 2 == 0)
         {
             ButtonService.GainsboroAll();
         }
         else
         {
             ButtonService.GreenAll();
         }
         if (--num < 0)
         {
             num = 6;
             timer1.Stop();
             timer1.Dispose();
         }
     });
 }