Example #1
0
        public static int Main(string[] rgArgs)
        {
            Cursor.Current = Cursors.AppStarting;
            CabhabApp app;

            if (rgArgs.Length == 0)
            {
                app = new CabhabApp();
            }
            else
            {
                // currently assuming a command line syntax of:
                //     -x  configfile answerfile
                // or
                //     -x  configfile
                // or
                //     answerfile
                if (rgArgs[0] == "-x" && rgArgs.Length >= 2)
                {
                    app = new CabhabApp(rgArgs[1]);
                    if (rgArgs.Length >= 3)
                    {
                        app.SetAnswerFile(rgArgs[2]);
                    }
                }
                else
                {
                    // assume is case of being launched from explorer
                    app = new CabhabApp();
                    app.SetAnswerFile(rgArgs[0]);
                }
            }
            Application.Run(app.NewMainWindow(false));

            return(0);
        }
Example #2
0
        public static int Main(string[] rgArgs)
        {
            Cursor.Current = Cursors.AppStarting;
            CabhabApp app;
            if (rgArgs.Length == 0)
                app = new CabhabApp();
            else
            {
                // currently assuming a command line syntax of:
                //     -x  configfile answerfile
                // or
                //     -x  configfile
                // or
                //     answerfile
                if (rgArgs[0] == "-x" && rgArgs.Length >= 2)
                {
                    app = new CabhabApp(rgArgs[1]);
                    if (rgArgs.Length >= 3)
                        app.SetAnswerFile(rgArgs[2]);
                }
                else
                {
                    // assume is case of being launched from explorer
                    app = new CabhabApp();
                    app.SetAnswerFile(rgArgs[0]);
                }
            }
            Application.Run(app.NewMainWindow(false));

            return 0;
        }