Example #1
0
        internal static void Main(string[] args)
        {
            // Load mutex
            AppMutex.EnsureLoaded();

            // Load app
            Application.EnableVisualStyles();
            Application.Run(new MainForm());
        }
Example #2
0
        public static int Main(string[] args)
        {
            try
            {
                // Load mutex
                AppMutex.EnsureLoaded();

                // Create form
                var form = new MainForm();
                Application.EnableVisualStyles();
                Application.Run(form);
                return(0);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: {0}", ex.Message);
#if DEBUG
                Console.WriteLine(ex.StackTrace);
#endif
                return(1);
            }
        }
Example #3
0
        public static int Main(string[] args)
        {
            try
            {
                var options = new CommandLineOptions(args);
                if (options.ShowHelp)
                {
                    options.Usage();
                    return(1);
                }

                // Load mutex
                AppMutex.EnsureLoaded();

                // Initialize target
                Locations.Target = Target;

                if (!string.IsNullOrEmpty(options.SamplesFolder))
                {
                    var toolForm = new SamplesToolForm(options.SamplesFolder);
                    Application.EnableVisualStyles();
                    Application.Run(toolForm);
                    return(0);
                }

                var form = new MainForm();
                Application.EnableVisualStyles();
                Application.Run(form);
                return(0);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: {0}", ex.Message);
#if DEBUG
                Console.WriteLine(ex.StackTrace);
#endif
                return(1);
            }
        }