Ejemplo n.º 1
0
        public void BeginHiding()
        {
            while (!Hide.exit)
            {
                for (int i = 0; i < titles.Count; ++i)
                {
                    titles[i] = Tuple.Create(titles[i].Item1, 0);
                    var results = WindowFuncs.TitleOccurences(titles[i].Item1);
                    if (results.Count > 0)
                    {
                        foreach (IntPtr hWnd in results)
                        {
                            switch (traymgr.GetHideMode())
                            {
                            case HideMode.VISIBLE:
                                WindowFuncs.ShowWindow(hWnd);
                                break;

                            case HideMode.MINIMIZED:
                                WindowFuncs.MinimizeWindow(hWnd);
                                break;

                            case HideMode.HIDDEN:
                                WindowFuncs.HideWindow(hWnd);
                                break;
                            }
                        }
                    }
                }

                Thread.Sleep(500);
            }
        }
Ejemplo n.º 2
0
        static void Main()
        {
            if (WindowFuncs.AlreadyOpen())
            {
                return;
            }

            WindowFuncs.HideWindow(hWnd);

            tray = new TrayMgr();
            var trayThread = new Thread(tray.StartTray);

            trayThread.Start();

            hider = new WindowHider(tray);
            var windowThread = new Thread(hider.BeginHiding);

            windowThread.Start();

            windowThread.Join();
            trayThread.Join();
        }
Ejemplo n.º 3
0
 private void togglehide_click(System.Object sender, System.EventArgs e)
 {
     WindowFuncs.ToggleVisibility(Hide.hWnd);
 }