private void timerHandler(object source, EventArgs e) { Console.WriteLine("current Time: " + time); if (time == 0) { ScreenWindow mw = new ScreenWindow(); mw.Show(); this.Visibility = System.Windows.Visibility.Hidden; } time--; }
private void comboWindows_SelectedValueChanged(object sender, EventArgs e) { ScreenWindow selectedItem = ((ComboBox)sender).SelectedItem as ScreenWindow; this.Render(selectedItem); if (this.pictureBox.Image != null) { this.m_ChromaColor = this.GetColorFromImage(this.pictureBox.Image, 0, 0); this.pictureBoxChromaColor.Image = this.CreateSwatch(0x15, 0x15, this.m_ChromaColor); } this.timer.Enabled = true; }
public void NextLevel() { //Toggle Victory Screen isVictory = true; ScreenWindow v = ScreenController.SetActiveScreen("Victory"); v.GetButton("Next").onClick.AddListener(() => { StartLevel(curLevel + 1); isVictory = false; }); //StartLevel(curLevel+1); }
public static void StartReceivingMessages(ScreenWindow currentInstance) { try { pipeName = "RipplePipe"; owner = currentInstance; ThreadStart pipeThread = new ThreadStart(createPipeServer); Thread listenerThread = new Thread(pipeThread); listenerThread.SetApartmentState(ApartmentState.STA); listenerThread.IsBackground = true; listenerThread.Start(); } catch (Exception) { throw; } }
private void Render(ScreenWindow screenWindow) { if ((screenWindow != null) && (screenWindow.Handle != IntPtr.Zero)) { Image original = ScreenCapture.Capture3(screenWindow); if (original != null) { float num3 = original.Width * this.m_ImageScale; float num4 = original.Height * this.m_ImageScale; Bitmap bitmap = new Bitmap(original, new Size((int)num3, (int)num4)); //~ if (m_IsFramelessMode) { Bitmap orig = new Bitmap(original, new Size((int)num3, (int)num4)); ScreenCapture.ApplyChromaKey3(bitmap, m_ChromaColor); } //~ original.Dispose(); this.pictureBox.Image = bitmap; if (m_isImageFlipped) { this.pictureBox.Image.RotateFlip(RotateFlipType.RotateNoneFlipX); } else { this.pictureBox.Image.RotateFlip(RotateFlipType.RotateNoneFlipNone); } if (!(this.m_ImageScale == this.m_PreviousImageScale)) { this.AutoSizeWindow(new Rectangle(0, 0, (int)num3, (int)num4)); } } } if (this.m_IsRubberBandBoxBeingDragged) { this.DrawRubberBandBox(this.pictureBox, this.m_LastLocation); } GC.Collect(); }
private void InitWindows() { var curScreens = ScreenHandler.GetScreens(); foreach (var screen in curScreens) { var win = new ScreenWindow(); var config = new WindowPagesConfig { ScreenNum = screen, CurrentIdx = 0, Window = win, Pages = new IReportPage[] { new StartPage() } }; _monWinPagesDic.Add(screen, config); Dispatcher.Invoke(() => { ShowOnMonitor(screen, win); win.MainFrame.Navigate(config.Pages[0]); }); } }
public ScriptingHelper(ScreenWindow w) { this.mExternalWPF = w; }
public override void Execute() { var screenWindow = new ScreenWindow(_channel, _window); screenWindow.ShowDialog(); }