示例#1
0
        private static void Main()
        {
            WindowsUtility.InitializeApplication("Disk Usage", null);

            using (MainForm frmMain = new MainForm())
            {
                Application.Idle += new EventHandler(frmMain.OnIdle);
                Application.Run(frmMain);
            }
        }
示例#2
0
        private static void Main()
        {
            using (Mutex mutex = new Mutex(true, "Menees.WorkBreak", out bool createdNew))
            {
                if (createdNew)
                {
                    WindowsUtility.InitializeApplication("Work Break", null);
                    using Program program = new Program();
                    Application.Run(program);

                    // Force the mutex to live the whole life of the program
                    // (just in case the JITer decides we're not really using it).
                    GC.KeepAlive(mutex);
                }
                else
                {
                    WindowsUtility.ShowError(null, "Another instance of Work Break is running.");
                }
            }
        }
示例#3
0
        private static int Main()
        {
            // I'm intentionally not setting TaskbarManager.Instance.ApplicationId.  We want Windows
            // to assign a default application ID to each executable path, so they can have their own
            // private lists of recent files (just like we store in our .stgx files).  Then it will also make
            // MegaBuild's taskbar icons group together separately by .exe.  For more info:
            // "Introducing The Taskbar APIs" discusses the "default application ID":
            // http://msdn.microsoft.com/en-us/magazine/dd942846.aspx
            // Also, see SetCurrentProcessExplicitAppUserModelID function:
            // http://msdn.microsoft.com/en-us/library/windows/desktop/dd378422(v=vs.85).aspx
            WindowsUtility.InitializeApplication(nameof(MegaBuild), null);

            // Setup idle time processing.
            MainForm frmMain = new();

            Application.Idle += new EventHandler(frmMain.OnIdle);

            // Run the application.
            Application.Run(frmMain);

            // Return the exit code.
            return(Environment.ExitCode);
        }
示例#4
0
 public App()
 {
     WindowsUtility.InitializeApplication(nameof(WirePeep), null);
 }
示例#5
0
文件: App.xaml.cs 项目: menees/Gizmos
 public App()
 {
     WindowsUtility.InitializeApplication("GizmoDock", null);
 }
示例#6
0
 public App()
 {
     WindowsUtility.InitializeApplication("RPN Calc 3.0", null);
 }
示例#7
0
 public App()
 {
     WindowsUtility.InitializeApplication(nameof(Hasher), null);
 }
示例#8
0
 private static void Main()
 {
     WindowsUtility.InitializeApplication("Diff.Net", null);
     using MainForm mainForm = new MainForm();
     Application.Run(mainForm);
 }