Ejemplo n.º 1
0
 public CreateUsers(BCSandGSSVM vm)
 {
     this.vm = vm;
     InitializeComponent();
     users = vm.GetUsers();
     users = users.Where(u => u.Level == 2).ToList();
 }
Ejemplo n.º 2
0
 public Login(BCSandGSSVM vm)
 {
     this.vm = vm;
     users   = vm.GetUsers();
     InitializeComponent();
     Loaded += Login_Loaded;
 }
Ejemplo n.º 3
0
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            vm                = new BCSandGSSVM(true);
            this.Title        = "On the Spot BCS";
            label1.Visibility = Visibility.Visible;

            led1.Visibility = Visibility.Visible;

            vm.bControllerOn = false;
            logger.Info("BCS start");

            PhigTimer          = new DispatcherTimer();
            PhigTimer.Interval = TimeSpan.FromSeconds(5);
            PhigTimer.Tick    += new EventHandler(timer_Tick);
            PhigTimer.Start();
            batchTimer.Interval = TimeSpan.FromSeconds(30);
            batchTimer.Tick    += BatchTimer_Tick;

            ifKit = new InterfaceKit();

            //Hook the basica event handlers
            ifKit.Attach += new AttachEventHandler(PhidgitController_Attach);
            oldcursor     = this.Cursor;
            this.Cursor   = Cursors.Wait;
            //Open the object for device connections
            ifKit.open();

            DataContext = vm;
        }
Ejemplo n.º 4
0
        public RegisterItem()
        {
            InitializeComponent();

            vm = ((App)Application.Current).vm as BCSandGSSVM;

            DataContext = ((App)Application.Current).vm;

            timer2              = new DispatcherTimer();
            timer2.Interval     = TimeSpan.FromSeconds(1);
            timer2.Tick        += new EventHandler(timer2_Tick);
            vm.bReceivedAlready = false;

            Loaded += new RoutedEventHandler(RegisterItem_Loaded);
        }
Ejemplo n.º 5
0
 public GetNote(BCSandGSSVM vm)
 {
     InitializeComponent();
     this.vm = vm;
 }