public PadHandle(UIPadsController c, wgssSTU.IUsbDevice device, AppState s, int i)
 {
     if (null == c)
     {
         throw new Exception("Error: no pad controller on PadHandle constructor");
     }
     m_controller = c;
     background   = new BackgroundTaskManager();
     //This has to be synchronous/blocking:
     background.Dispatcher.Invoke(new Action <wgssSTU.IUsbDevice, AppState, int>(ConstructorB), device, s, i);
     if (AppState.Identification_Mode == s)
     {
         background.Dispatcher.BeginInvoke(new Action <int>(waitandIdB), i);
     }
 }
示例#2
0
        private void MainWindow_OnContentRendered(object sender, EventArgs e)
        {
            DPI = DpiInfo.GetDpi();
            DPI = 1.0f;

            timer           = new DispatcherTimer();
            timer.IsEnabled = false;
            timer.Interval  = TimeSpan.FromMilliseconds(350);
            timer.Tick     += OnEndResize;

            m_usbDevices = new wgssSTU.UsbDevices();
            m_padGui     = new UIPadsController(m_usbDevices, canvas, LayoutRoot, tbar, config, this);

            m_padGui.setMinSizesCanvas();
        }