Exemple #1
0
        public ModelBrowser( MainWnd owner )
        {
            this.owner = owner;

            InitializeComponent();

            Application.Idle += new EventHandler( Application_Idle );
        }
Exemple #2
0
        static int Main( string[] args )
        {
            if( Properties.Settings.Default.Settings_TryToUpgrade )
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.Settings_TryToUpgrade = false;
                Properties.Settings.Default.Save();
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault( false );

            Gui.MainWnd main = new Gui.MainWnd();

            for( int i = 0; i < args.Length; i++ )
            {
                string arg = args[i];

                if( string.Compare( arg, "-d",
                    StringComparison.InvariantCultureIgnoreCase ) == 0 )
                {
                    if( i + 2 < args.Length )
                    {
                        //open a diff window
                        main.OpenDiffView( args[i + 1], args[i + 2] );
                    }

                    i += 2; //-d expects two strings to follow, skip them
                    continue;
                }

                //default is to just open the model
                main.OpenModelViewer( arg );
            }

            Application.Run( main );

            return 0;
        }