当前位置: 首页>>代码示例>>C#>>正文


C# Program.Run方法代码示例

本文整理汇总了C#中Program.Run方法的典型用法代码示例。如果您正苦于以下问题:C# Program.Run方法的具体用法?C# Program.Run怎么用?C# Program.Run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Program的用法示例。


在下文中一共展示了Program.Run方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Main

 static void Main(string[] args)
 {
     Program ap = new Program();
     ap.Startup += AppStartup;
     ap.Exit += AppExit;
     ap.Run();
 }
开发者ID:Wanderer19,项目名称:Tasks,代码行数:7,代码来源:Program.cs

示例2: VirtualPaperUI

    public VirtualPaperUI(Program p) : 
            base("Virtual Paper", "Virtual Paper")
    {
        program = p;

        DeleteEvent += new DeleteEventHandler(HandleDelete);

        handwriting = new Handwriting();

        ui.AddUiFromResource("UILayout.xml");
        PopulateActionGroups();
        
        Menus        = ui.GetWidget("/MainMenu")   as MenuBar;
        Toolbar = TB = ui.GetWidget("/ControlBar") as Toolbar;

        AddColorToolButton();

        Contents = handwriting;

        handwriting.PaperColor = Handwriting.White;
        handwriting.Changed += delegate {
            updateUndo();
        };
        
        updateUndo();

        ShowAll();
        program.Run();
    }
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:29,代码来源:VirtualPaperUI.cs

示例3: Main

        static void Main(string[] args)
        {
            Program app = new Program();

            app.Init();
            app.Run();
        }
开发者ID:platzhersh,项目名称:FHNW-Java-Projekte,代码行数:7,代码来源:Program.cs

示例4: Main

 static void Main(string[] args)
 {
     Program app = new Program();
     app.Startup += new StartupEventHandler(AppStartUp);
     app.Exit += new ExitEventHandler(AppExit);
     app.Run();
 }
开发者ID:neziry,项目名称:Argeset,代码行数:7,代码来源:Program.cs

示例5: Main

 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     var program = new Program();
     program.Run(Environment.GetCommandLineArgs());
 }
开发者ID:olivierdagenais,项目名称:branchreview,代码行数:7,代码来源:Program.cs

示例6: Main

 public static void Main()
 {
   using(var program = new Program())
   {
     program.Run(60, 120);
   }
 }
开发者ID:tupieurods,项目名称:tower-defense-csharp-opengl.game,代码行数:7,代码来源:Tower+defense+openGL.cs

示例7: Main

 public static void Main()
 {
     using (Program prog = new Program()) {
         //Utilities.SetWindowTitle (prog);
         prog.Run( 30.0, 0.0 );
     }
 }
开发者ID:Bad-ptr,项目名称:phys,代码行数:7,代码来源:Program.cs

示例8: Main_

 public static void Main_()
 {
     using (Program p = new Program())
     {
         p.Run(60);
     }
 }
开发者ID:TinyTexel,项目名称:SplineTubes,代码行数:7,代码来源:BKP.cs

示例9: Main

	public static int Main ()
	{
		Program p = new Program ();
		p.Run ();

		return 0;
	}
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:Program.cs

示例10: Main

 static void Main(string[] args)
 {
     using (Program p = new Program())
     {
         p.Run();
     }
 }
开发者ID:reidyd,项目名称:jitterphysics,代码行数:7,代码来源:Program.cs

示例11: Main

        static void Main(string[] args)
        {
            Style.Add<TextAreaHandler>("TextConsole", handler => {
                handler.Control.Font = new Font(FontFamily.GenericMonospace, 10);
            });

            var app = new Program(Eto.Platforms.WinForms);
            app.Run();
        }
开发者ID:andererandre,项目名称:Notedown,代码行数:9,代码来源:Main.cs

示例12: Main

        public static void Main()
        {
            Program myApplication = new Program();

            Window mainWindow = myApplication.CreateWindow();

            // Start the application
            myApplication.Run(mainWindow);
        }
开发者ID:meikeric,项目名称:DotCopter,代码行数:9,代码来源:Program.cs

示例13: Main

        public static void Main(string[] args)
        {
            AppLaunchingCommandLine commandLine;
            IModelBindingDefinition<AppLaunchingCommandLine> modelBindingDefinition = null;
            try
            {
                modelBindingDefinition = Configuration.Configure<AppLaunchingCommandLine>();
                commandLine = modelBindingDefinition.CreateAndBind(args);

                /*
                if (commandLine.ProductId == Guid.Empty)
                {
                    Console.WriteLine("");
                    Console.WriteLine("***Warning*** - no productId supplied");
                    Console.WriteLine("");
                }
                */
            }
            catch (Exception /*exception*/)
            {
                if (modelBindingDefinition != null)
                {
                    var help = new HelpProvider();
                    var formatter = new ConsoleHelpFormatter();

                    var sw = new StringWriter();
                    var text = help.GenerateModelHelp(modelBindingDefinition);
                    formatter.WriteHelp(text, sw);
                    Console.Write(sw.ToString());
                }
                else
                {
                    Console.Write("Sorry - no help available!");
                }
                return;
            }

            try
            {
                Console.WriteLine("AutomationHost starting");
                using (var program = new Program(commandLine))
                {
                    Console.WriteLine("To show help, enter 'help'");
                    program.Run();
                }
            }
            catch (QuitNowPleaseException)
            {
                Console.WriteLine("Goodbye");
            }
            catch (Exception exception)
            {
                Console.WriteLine(string.Format("Exception seen {0} {1}", exception.GetType().FullName,
                                                exception.Message));
            }
        }
开发者ID:roryshko,项目名称:WindowsPhoneTestFramework,代码行数:56,代码来源:Program.cs

示例14: Main

        static void Main(string[] args)
        {
            Style.Add<TextArea, Windows.TextBox>("TextConsole", (widget, control) => {
                control.Font = new Font(FontFamily.GenericMonospace, 10);
            });

            var generator = Generator.GetGenerator("Eto.Platform.Windows.Generator, Eto.Platform.Windows");
            var app = new Program(generator);
            app.Run();
        }
开发者ID:nagyist,项目名称:Notedown,代码行数:10,代码来源:Main.cs

示例15: Main

 /// <summary>This method runs automatically when the device is powered, and calls ProgramStarted.</summary>
 public static void Main()
 {
     // Important to initialize the Mainboard first
     Program.Mainboard = new GHIElectronics.Gadgeteer.FEZReaper();
     Program p = new Program();
     p.InitializeModules();
     p.ProgramStarted();
     // Starts Dispatcher
     p.Run();
 }
开发者ID:ZingPow,项目名称:Breakout_Boards,代码行数:11,代码来源:Program.generated.cs


注:本文中的Program.Run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。