private void Application_Startup(object sender, StartupEventArgs e) { update_timer = new DispatcherTimer(); update_timer.Interval = new TimeSpan(0, 0, 15); update_timer.Tick += new EventHandler(updateTimer_Tick); update_timer.Start(); lcd = new LCD(1133, 49705); lcd.OpenDevice(); //lcd.captureFrames = true; pg1 = new Page1(lcd); pg2 = new Page2(lcd); _pages.Add(new LcdPageWpf { Element = pg1 }); _pages.Add(new LcdPageWpf { Element = pg2 }); lcd.Pages = _pages; lcd.CurrentPage = _pages[0]; lcd.UpdatePage(); //MainWindow mw = new MainWindow(); //mw.setLCD(lcd); //mw.Show(); }
private void Form1_Load(object sender, EventArgs e) { //vID = 0x046D - pID = 0xC229 for the G19 lcd = new LCD(1133, 49705); lcd.OpenDevice(); //label1.Text = this.Width + "x" + this.Height; this.Width = 320; this.Height = 240; }
private void Window_Loaded(object sender, RoutedEventArgs e) { life_timer = new DispatcherTimer(); life_timer.Interval = new TimeSpan(0, 0, 0, 0, 50); life_timer.Tick += new EventHandler(Life_Tick); //vID = 0x046D - pID = 0xC229 for the G19 lcd = new LCD(1133, 49705); lcd.OpenDevice(); InitLife(); }