예제 #1
0
 protected override void OnStartup(StartupEventArgs e)
 {
     Messenger.Default.Register <int>(this, OnMessageUser);
     _waga = Waga.GetInstance;
     if (_waga != null)
     {
         _waga.StartWaga();
     }
 }
예제 #2
0
 public ViewModelMiernik()
 {
     WagaKgLocal = "BRAK POŁĄCZENIA";
     SaveCommand = new  DelegateCommand(ZapiszUstawienia);
     TestCommand = new DelegateCommand(TestWagi);
     app         = AppConfig.GetInstance;
     _waga       = Waga.GetInstance;
     Messenger.Default.Register <WagaRamka>(this, OnMessagewagaRamka);
     WypelnijCombo();
 }
예제 #3
0
 public void OnMessageUser(int reset)
 {
     if (reset == 999)
     {
         // _waga = new Waga();
         _waga = Waga.GetInstanceDispose;
         if (_waga != null)
         {
             _waga.StartWaga();
         }
     }
 }