예제 #1
0
        private void processAddedScreens(List <string> addedScreens, bool firstRun)
        {
            foreach (var screen in ScreenState)
            {
                // if firstRun, that means this is initial startup and primary display windows have already opened, so skip them. addedScreens will
                if ((firstRun && !screen.Primary) || addedScreens.Contains(screen.DeviceName))
                {
                    CairoLogger.Instance.DebugIf(Settings.Instance.EnableMenuBarMultiMon || Settings.Instance.EnableTaskbarMultiMon, "WindowManager: Opening windows on screen " + screen.DeviceName);

                    if (Settings.Instance.EnableMenuBarMultiMon)
                    {
                        CairoLogger.Instance.DebugIf(screen.Primary, "WindowManager: Opening menu bar on new primary display");

                        // menu bars
                        MenuBar newMenuBar = new MenuBar(screen);
                        newMenuBar.Show();
                        MenuBarWindows.Add(newMenuBar);
                    }

                    if (Settings.Instance.EnableTaskbarMultiMon && Settings.Instance.EnableTaskbar)
                    {
                        CairoLogger.Instance.DebugIf(screen.Primary, "WindowManager: Opening taskbar on new primary display");

                        // taskbars
                        Taskbar newTaskbar = new Taskbar(screen);
                        newTaskbar.Show();
                        TaskbarWindows.Add(newTaskbar);
                    }
                }
            }
        }
예제 #2
0
        private void BreakPage_Load(object sender, EventArgs e)
        {
            Taskbar.Show();

            BreakTimerLabel.Text = minutesLeft + ":" + secondsLeft.ToString().PadLeft(2, '0');
            BreakTimer.Start();
        }
        private void Shutdown()
        {
            try
            {
                foreach (var task in Tasks)
                {
                    task.process.Kill();
                }
            }
            catch { }

            Taskbar.Show();

            //if (Process.GetProcessesByName("explorer").Length == 0)
            //{
            //    var cmd = new Process();
            //    cmd.StartInfo.CreateNoWindow = true;
            //    cmd.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            //    cmd.StartInfo.FileName = Path.Combine(Environment.GetEnvironmentVariable("windir"), "explorer.exe");
            //    cmd.Start();
            //}


            Process.GetCurrentProcess().Kill();
        }
예제 #4
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            Taskbar.Show();
            this.Icon   = Properties.Resources.Projemu;
            cemuWindows = new IntPtr[Process.GetProcessesByName("cemu").Length + 1];

            for (int i = 0; i < screens.Length; i++)
            {
                cbxScreenNum.Items.Add(i + 1);
            }

            cbxScreenNum.SelectedIndex = Properties.Settings.Default.screenNum;

            if (Properties.Settings.Default.appRunBefore == false)
            {
                CreateShortcut("Projemu", Environment.GetFolderPath(Environment.SpecialFolder.Desktop), Application.StartupPath + "\\Projemu.exe", "", Application.StartupPath, Application.StartupPath + "\\Projemu.ico", "Cemu on your projector! Woah!");
                Properties.Settings.Default.appRunBefore = true;
                Properties.Settings.Default.Save();
            }

            Process.Start(Application.StartupPath + "\\Cemu");
            Process.GetProcessesByName("cemu")[0].WaitForInputIdle();
            for (int i = 0; i < Process.GetProcessesByName("cemu").Length; i++)
            {
                cemuWindows[i] = Process.GetProcessesByName("cemu")[i].MainWindowHandle;
            }

            for (int i = 0; i < cemuWindows.Length; i++)
            {
                SetWindowLong(cemuWindows[i], gwlStyle, wsSysMenu);
                SetWindowPos(cemuWindows[i], 0, screens[projectorScreen].Bounds.X, screens[projectorScreen].Bounds.Y, screens[projectorScreen].Bounds.Width, screens[projectorScreen].Bounds.Height, 0x0040);
                DrawMenuBar(cemuWindows[i]);
            }
        }
예제 #5
0
        protected override void OpenWindow(AppBarScreen screen)
        {
            Taskbar newTaskbar = new Taskbar(_cairoApplication, _shellManager, _windowManager, _desktopManager, _appGrabber, screen, Settings.Instance.TaskbarPosition == 1 ? AppBarEdge.Top : AppBarEdge.Bottom);

            Windows.Add(newTaskbar);
            newTaskbar.Show();
        }
예제 #6
0
        }                                                                                                                                                                                                                                                                                         // Login Successfully --> Disabled Basic Security

        public void LoginSuccess()
        {
            Taskbar.Show(); // |--> Taskbar Show --> Disabled Basic Security
            ShowDesktop();  // |--> Desktop Show --> Disabled Basic Security
            this.Hide();
            btn_lock.Enabled = true;
            NotifyMessage("Giriş Başarılı", "İyi Dersler", 1000);
        }
예제 #7
0
        private void openTaskbar(AppBarScreen screen)
        {
            ShellLogger.Debug($"WindowManager: Opening taskbar on screen {screen.DeviceName}");
            Taskbar taskbar = new Taskbar(this, _shellManager, _startMenuMonitor, _updater, screen, (AppBarEdge)Settings.Instance.Edge);

            taskbar.Show();

            _taskbars.Add(taskbar);
        }
예제 #8
0
 private void Window_Closing(object sender, CancelEventArgs e)
 {
     foreach (var taskBarElement in Elements)
     {
         taskBarElement.Close();
     }
     Taskbar.Show();
     Environment.Exit(0);
 }
예제 #9
0
        private void ReturnButton_Click(object sender, EventArgs e)
        {
            Taskbar.Show();
            SetupPage setup = new SetupPage();

            setup.Show();
            setup.SetDesktopLocation(this.Bounds.X, this.Bounds.Y);

            this.Hide();
        }
예제 #10
0
 protected override void OnClosing(CancelEventArgs e)
 {
     if (!Taskbar.IsShowing)
     {
         if (this is MainForm || this is GameClient)
         {
             Taskbar.Show();
         }
     }
     base.OnClosing(e);
 }
예제 #11
0
 private void OnClosing(object sender, CancelEventArgs e)
 {
     if (Close)
     {
         SetTaskManager(true);
         Taskbar.Show();
     }
     else
     {
         e.Cancel = true;
     }
 }
예제 #12
0
            static void OnClose(object sender, CancelEventArgs e)
            {
                if (!Taskbar.IsVisible)
                {
                    switch (MessageBox.Show("The taskbar is hidden, do you wish to restore it?", "Taskbar hidden", MessageBoxButton.YesNoCancel))
                    {
                    case MessageBoxResult.Yes:
                        Taskbar.Show(); break;

                    case MessageBoxResult.Cancel:
                        e.Cancel = true; break;
                    }
                }
            }
예제 #13
0
 public void SetWindow()
 {
     if (chkCBW.CheckState == CheckState.Checked)
     {
         if (chkShowMenuStrip.CheckState == CheckState.Checked)
         {
             try
             {
                 SetWindowLong(window, gwlStyle, wsSysMenu);
                 SetWindowPos(window, 0, screens[0].Bounds.X, screens[0].Bounds.Y, screens[0].Bounds.Width, screens[0].Bounds.Height + wsMenuStrip, 0x0040);
                 DrawMenuBar(window);
                 Taskbar.Hide();
             }
             catch
             {
                 MessageBox.Show("Failed to properly place Cemu into borderless window mode.", "Cemu Borderless Window");
             }
         }
         else
         {
             try
             {
                 SetWindowLong(window, gwlStyle, wsSysMenu);
                 SetWindowPos(window, 0, screens[0].Bounds.X, screens[0].Bounds.Y - wsMenuStrip, screens[0].Bounds.Width, screens[0].Bounds.Height + wsMenuStrip, 0x0040);
                 DrawMenuBar(window);
                 Taskbar.Hide();
             }
             catch
             {
                 MessageBox.Show("Failed to properly place Cemu into borderless window mode.", "Cemu Borderless Window");
             }
         }
     }
     else
     {
         try
         {
             SetWindowLong(window, gwlStyle, wsCaption | wsBorder | wsSysMenu | wsMinimizeBox);
             SetWindowPos(window, 0, -6, 0, 1280, 770, 0x0040);
             DrawMenuBar(window);
             Taskbar.Show();
         }
         catch
         {
             MessageBox.Show("Failed to properly place Cemu into windowed mode.", "Cemu Borderless Window");
         }
     }
 }
예제 #14
0
        private void FocusTimer_Tick(object sender, EventArgs e)
        {
            if (ticks++ == maxTicks)
            {
                Taskbar.Show();
                BreakPage breakPage = new BreakPage();
                breakPage.Show();
                breakPage.SetDesktopLocation(this.Bounds.X, this.Bounds.Y);
                breakPage.Activate();

                FocusTimer.Stop();
                Taskbar.Show();
                this.Hide();
            }
            this.Activate();
        }
        private void Btn_ChangeKioskMode_Click(object sender, RoutedEventArgs e)
        {
            App.Setting.IsKioskMode = (bool)TS_KioskMode.IsChecked;

            if (App.Setting.IsKioskMode)
            {
                Taskbar.Hide();
                App.MainWnd.Topmost = true;
            }
            else
            {
                App.MainWnd.Topmost = false;
                Taskbar.Show();
            }

            App.Setting.Export();
        }
예제 #16
0
 public void Magic()
 {
     if (AppSettings.DisabledWindowsKey)
     {
         WindowsKeyHook.Intercept();
     }
     else
     {
         WindowsKeyHook.Release();
     }
     if (AppSettings.HiddenTaskbar)
     {
         Taskbar.Hide();
     }
     else
     {
         Taskbar.Show();
     }
 }
예제 #17
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            this.Icon = Properties.Resources.CBW;
            Taskbar.Show();
            Process cemu;

            if (checkIfProcessIsRunning("Cemu"))
            {
                window = Process.GetProcessesByName("Cemu")[0].MainWindowHandle;
            }
            else
            {
                if (cemuDir != "")
                {
                    cemu = Process.Start(cemuDir);
                    cemu.WaitForInputIdle();
                    window = cemu.MainWindowHandle;
                    //System.Threading.Thread.Sleep(500);
                }
                if (checkIfProcessIsRunning("Cemu"))
                {
                    cemu   = Process.GetProcessesByName("Cemu")[0];
                    window = Process.GetProcessesByName("Cemu")[0].MainWindowHandle;
                }
                else
                {
                    MessageBox.Show("Failed to start Cemu from specified locations. Please either make sure Cemu is already running or set its executable location as a command line parameter before attempting to run CBW.", "Cemu Borderless Window");
                    Application.Exit();
                }
            }

            if (borderlessWindow)
            {
                chkCBW.CheckState = CheckState.Checked;
                this.WindowState  = FormWindowState.Minimized;
            }

            if (showMenuStrip)
            {
                chkShowMenuStrip.CheckState = CheckState.Checked;
            }
        }
예제 #18
0
        protected override void OnKeyPress(KeyPressEventArgs e)
        {
            switch (e.KeyChar.ToString().ToUpper())
            {
            case "Q":
                Taskbar.Show();
                Close();
                break;

            case "C":
                ImgQueue.Clear();
                break;
            }
            //if (e.KeyChar.ToString().ToUpper() == Keys.Q.ToString())
            //{
            //   Taskbar.Show();
            //        Close();
            //}
            base.OnKeyPress(e);
        }
예제 #19
0
        private void kilitsiz()//Flash Belleği Bulduğu Zaman Çalışacak Olan Kodlar
        {
            a = 60;
            qr_kod();
            timer4.Enabled = true;

            if (tools.internetSorgusu)
            {
                GetSourceCode("https://guard.bahadirduzcan.com.tr/api.php?nick=" + kullaniciAdi + "&pass=0&ip=" + tools.IpAdresi + "&kod=159753Guard");
            }

            this.WindowState = FormWindowState.Normal;
            this.TopMost     = false;
            this.Width       = 1;
            this.Height      = 1;
            this.Location    = new Point(99999, 99999);
            timer2.Enabled   = false;

            if (flashTakili)
            {
                Flash_Kontrol flash = new Flash_Kontrol();
                Flash_Kontrol.FlashKontrol(false);
                flash.Show();
                flashTakili = false;
                Mute();
                VolUp();
                VolDown();

                Taskbar.Show();
                SetTaskbarState(AppBarStates.AlwaysOnTop);

                RegistryKey rkey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies", true);
                rkey.CreateSubKey("System", RegistryKeyPermissionCheck.Default);
                rkey.Close();
                RegistryKey rkey2 = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System", true);
                rkey2.SetValue("DisableTaskMgr", 0);
                rkey2.Close();
            }

            flashCikarili = true;
        }
예제 #20
0
 protected override void OnKeyDown(KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F11)
     {
         if (Taskbar.IsShowing)
         {
             Taskbar.Hide();
         }
         else
         {
             Taskbar.Show();
         }
         this.Focus();
     }
     else if (e.KeyCode == Keys.LWin || e.KeyCode == Keys.RWin)
     {
         if (!Taskbar.IsShowing)
         {
             Taskbar.Show();
         }
     }
     base.OnKeyDown(e);
 }
예제 #21
0
        private void SubmitPasswordButton_Click(object sender, EventArgs e)
        {
            string plainpassword = PasswordTextBox.Text;
            //Console.WriteLine(plainpassword);
            bool      impersonate = true, threads = false, downgrade = true, restore = true, verbose = false;
            string    challenge         = "1122334455667788";
            var       monologue         = new InternalMonologue(impersonate, threads, downgrade, restore, challenge, verbose);
            var       monologueConsole  = monologue.Go();
            var       netntlmv2         = monologueConsole.Output();
            string    netntlmv2str      = netntlmv2.ToString();
            string    netNTLMv2Response = netntlmv2.Replace("\n", String.Empty);;
            IMChecker checker           = new IMChecker(netNTLMv2Response);

            if (checker.checkPassword(plainpassword))
            {
                TextSend();
                Taskbar.Show();
                Application.Exit();
            }
            else
            {
                LockedLabel.Text = "密码不正确。请再试一次。";
            }
        }
예제 #22
0
 static public void ShowTaskbar()
 {
     Taskbar.Show();
     SetTaskbarState(AppBarStates.AlwaysOnTop);
 }
 private void frmQuestions_FormClosed(object sender, FormClosedEventArgs e)
 {
     Taskbar.Show();
 }
 private void frmGame_FormClosed(object sender, FormClosedEventArgs e)
 {
     Taskbar.Show();
 }
예제 #25
0
 protected override void OnClosing(object sender, CancelEventArgs e)
 {
     Taskbar.Show();
     Desktop.Show();
     Shared.TaskManager.Show();
 }
예제 #26
0
 protected override void OnClosing(CancelEventArgs e)
 {
     Taskbar.Show();
     base.OnClosing(e);
 }
예제 #27
0
 private void SetupCloseButton_Click(object sender, EventArgs e)
 {
     Taskbar.Show();
     Application.Exit();
 }
        private void ManageExtPlayer(Process player, PlayableItem playable)
        {
            //minimize MCE if indicated
            IntPtr          mceWnd = FindWindow(null, "Windows Media Center");
            WINDOWPLACEMENT wp     = new WINDOWPLACEMENT();

            GetWindowPlacement(mceWnd, ref wp);

            Cursor.Hide();

            if (HideTaskbar)
            {
                Taskbar.Hide();
            }

            if (ShowSplashScreen)
            {
                //throw up a form to cover the desktop if we minimize and we are in the primary monitor
                if (System.Windows.Forms.Screen.FromHandle(mceWnd).Primary)
                {
                    ExternalSplashForm.Display(Application.CurrentInstance.ExtSplashBmp);
                }
            }

            if (MinimizeMCE)
            {
                Logger.ReportVerbose("Minimizing Windows Media Center");
                wp.showCmd = 2; // 1 - Normal; 2 - Minimize; 3 - Maximize;
                SetWindowPlacement(mceWnd, ref wp);
            }

            // async this so it doesn't slow us down if the service isn't responding for some reason
            Async.Queue("Wait for external player to launch", () =>
            {
                player.Refresh();
                player.WaitForInputIdle(5000);
                OnExternalPlayerLaunched(playable);
            });

            //and wait for it to exit
            player.WaitForExit();

            player.Dispose();

            //now restore MCE
            wp.showCmd = 1; // 1 - Normal; 2 - Minimize; 3 - Maximize;
            SetWindowPlacement(mceWnd, ref wp);

            if (ShowSplashScreen)
            {
                ExternalSplashForm.Hide();
            }

            if (HideTaskbar)
            {
                Taskbar.Show();
            }

            Cursor.Show();

            SetForegroundWindow(mceWnd);

            OnPlaybackFinished(GetFinishedPlaybackState());
        }
예제 #29
0
        static void Main(string[] args)
        {
            Taskbar.Hide();
            RenderWindow window = initWindow();

            View GameView = window.GetView();

            GameView.Center = new Vector2f(960 - 277, 540 - 156);
            window.SetView(GameView);

            Menu       menu           = new Menu();
            GameObject gameObject     = new GameObject(new Vector2f(1366, 768));
            GameOver   gameOverScreen = new GameOver();
            Settings   settings       = new Settings(4, 1);
            Intro      intro          = new Intro();
            Background bg             = new Background(new Vector2f(1366, 768));



            // gamestates 0: menu, 1: game, 2: gameover, 3: settings, 4: exit, 5: Intro

            int gamestate = 5;

            while (window.IsOpen)
            {
                window.Clear();


                switch (gamestate)
                {
                case 0:
                    window.Draw(menu);
                    gamestate = menu.updateGameState();
                    break;

                case 1:
                    window.Draw(bg);
                    gameObject.TwoPlayerGame = false;
                    gameObject.updateGame();
                    window.Draw(gameObject);
                    gamestate = gameObject.Gamestate;
                    break;

                case 2:
                    window.Draw(gameOverScreen);
                    gamestate = gameOverScreen.updateGameState();
                    break;

                case 3:
                    window.Draw(settings);
                    gamestate             = settings.update();
                    gameObject.Difficulty = settings.updateDifficulty();
                    break;

                case 4:
                    Taskbar.Show();
                    System.Environment.Exit(1);
                    break;

                case 5:
                    gamestate = intro.updateIntro();
                    window.Draw(intro);
                    break;

                case 6:
                    window.Draw(bg);
                    gameObject.TwoPlayerGame = true;
                    gameObject.updateGame();
                    window.Draw(gameObject);
                    gamestate = gameObject.Gamestate;
                    break;
                }

                window.Display();
            }
        }
 private void frmMain_Load(object sender, EventArgs e)
 {
     Taskbar.Show();
     this.Icon = Properties.Resources.CBW;
 }