예제 #1
0
        static void Main(string [] args)
        {
#if WINDOWS
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            History.Default.Load();

			var view = new MainView();
            if (args != null && args.Length > 0)
            {
                var projectFilePath = string.Join(" ", args);
                view.OpenProjectPath = projectFilePath;
            }

            var model = new PipelineProject();
            var controller = new PipelineController(view, model);   
            Application.Run(view);
#endif
#if LINUX || MONOMAC

			Gtk.Application.Init ();
			MainWindow win = new MainWindow ();
			win.Show (); 
			var model = new PipelineProject();
			new PipelineController(win, model);  
			if (args != null && args.Length > 0)
			{
				var projectFilePath = string.Join(" ", args);
				win.OpenProjectPath = projectFilePath;
			}
			win.OnShowEvent ();
			Gtk.Application.Run ();
#endif
        }
예제 #2
0
파일: Program.cs 프로젝트: Zodge/MonoGame
        static void Main(string [] args)
        {
#if WINDOWS
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            PipelineSettings.Default.Load();

			var view = new MainView();
            if (args != null && args.Length > 0)
            {
                var projectFilePath = string.Join(" ", args);
                view.OpenProjectPath = projectFilePath;
            }

            var controller = new PipelineController(view);
            Application.Run(view);
#endif
#if LINUX || MONOMAC

			Gtk.Application.Init ();
            Global.Initalize ();
			MainWindow win = new MainWindow ();
			win.Show (); 
			new PipelineController(win);
			#if LINUX
			if (args != null && args.Length > 0)
			{
				var projectFilePath = string.Join(" ", args);
				win.OpenProjectPath = projectFilePath;
			}
			#elif MONOMAC
			var project = Environment.GetEnvironmentVariable("MONOGAME_PIPELINE_PROJECT");
			if (!string.IsNullOrEmpty (project)) {
				win.OpenProjectPath = project;
			}
			#endif
			win.OnShowEvent ();
			Gtk.Application.Run ();
#endif
        }