ParseCommandLine() public method

public ParseCommandLine ( string args ) : void
args string
return void
Beispiel #1
0
        static void Main(string[] args)
        {
            try
            {
                System.Threading.Thread.CurrentThread.Name = "Main thread";
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.ThreadException += ApplicationThreadException;

                if (WikiFunctions.Variables.UsingMono)
                {
                    MessageBox.Show("AWB is not currently supported by mono", "Not supported",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                AwbDirs.MigrateDefaultSettings();

                MainForm awb = new MainForm();
                AWB = awb;
                awb.ParseCommandLine(args);

                Application.Run(awb);
            }
            catch (Exception ex)
            {
                WikiFunctions.ErrorHandler.Handle(ex);
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            try
            {		
                System.Threading.Thread.CurrentThread.Name = "Main thread";
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.ThreadException += ApplicationThreadException;

                if (Variables.UsingMono)
                {
                    MessageBox.Show("AWB is not currently supported by mono", "Not supported",
                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                AwbDirs.MigrateDefaultSettings();

                MainForm awb = new MainForm();
                AWB = awb;
                awb.ParseCommandLine(args);

                Application.Run(awb);
            }
            catch (Exception ex)
            {
                ErrorHandler.Handle(ex);
            }
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            try
            {		
                System.Threading.Thread.CurrentThread.Name = "Main thread";
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.ThreadException += ApplicationThreadException;

                if (Globals.UsingMono)
                {
                    MessageBox.Show("AWB is not currently supported by mono. You may use it for testing purposes, but functionality is not guaranteed.",
                        "Not supported",
                        MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

                AwbDirs.MigrateDefaultSettings();

                MainForm awb = new MainForm();
                AWB = awb;
                awb.ParseCommandLine(args);

                Application.Run(awb);
            }
            catch (Exception ex)
            {
                if (ex is SecurityException) //"Fix" - http://geekswithblogs.net/TimH/archive/2006/03/08/71714.aspx
                    MessageBox.Show("AWB is unable to start up from the current location due to a lack of permissions.\r\nPlease try on a local drive or similar.", "Permissions Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                else
                    ErrorHandler.Handle(ex);
            }
        }
        static void Main(string[] args)
        {
            try
            {
                System.Threading.Thread.CurrentThread.Name = "Main thread";
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.ThreadException += ApplicationThreadException;

                if (Globals.UsingMono)
                {
                    MessageBox.Show("AWB is not currently supported by mono. You may use it for testing purposes, but functionality is not guaranteed.",
                                    "Not supported",
                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

                AwbDirs.MigrateDefaultSettings();

                MainForm awb = new MainForm();
                AWB = awb;
                awb.ParseCommandLine(args);

                Article.SetAddListener(MyTrace.AddListener, MyTrace, "AWB");

                Application.Run(awb);
            }
            catch (Exception ex)
            {
                if (ex is SecurityException) //"Fix" - http://geekswithblogs.net/TimH/archive/2006/03/08/71714.aspx
                {
                    MessageBox.Show("AWB is unable to start up from the current location due to a lack of permissions.\r\nPlease try on a local drive or similar.", "Permissions Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    ErrorHandler.HandleException(ex);
                }
            }
        }