예제 #1
0
        private static void Main(string[] args)
        {
            // Check for multi instance
            if (args != null && args.Length > 0)
            {
                CommandLineArg = args[0];

                if (CommandLineArg.Contains("-m"))
                {
                    Engine.IsMultiInstance = true;
                }
                else if (args.Length > 1 && args[0] == "/doc")
                {
                    string fp = args[1];
                    if (File.Exists(fp))
                    {
                        Process.Start(fp);
                    }
                    return;
                }
            }

            if (!Engine.IsMultiInstance)
            {
                if (!ApplicationInstanceManager.CreateSingleInstance(SingleInstanceCallback))
                {
                    return;
                }
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(CurrentDomain_AssemblyLoad);

            if (Engine.TurnOn(new Engine.EngineOptions {
                KeyboardHook = true, ShowConfigWizard = true
            }))
            {
                Application.Run(MainForm = new ZScreen());
                // Application.Run(CoreUI = new ZScreenSnap());
            }
        }
 public WorkerSecondary(ZScreen myZScreen)
 {
     this.mZScreen = myZScreen;
 }
 public WorkerSecondary(ZScreen myZScreen)
 {
     this.mZScreen = myZScreen;
 }
예제 #4
0
        private static void Main(string[] args)
        {
            // Check for multi instance
            if (args != null && args.Length > 0)
            {
                CommandLineArg = args[0];

                if (CommandLineArg.Contains("-m"))
                {
                    Engine.IsMultiInstance = true;
                }
                else if (args.Length > 1 && args[0] == "/doc")
                {
                    string fp = args[1];
                    if (File.Exists(fp))
                    {
                        Process.Start(fp);
                    }
                    return;
                }
            }

            if (!Engine.IsMultiInstance)
            {
                if (!ApplicationInstanceManager.CreateSingleInstance(SingleInstanceCallback)) return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler(CurrentDomain_AssemblyLoad);

            if (Engine.TurnOn(new Engine.EngineOptions { KeyboardHook = true, ShowConfigWizard = true }))
            {
                Application.Run(MainForm = new ZScreen());
                // Application.Run(CoreUI = new ZScreenSnap());
            }
        }