本文整理汇总了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();
}
示例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();
}
示例3: Main
static void Main(string[] args)
{
Program app = new Program();
app.Init();
app.Run();
}
示例4: Main
static void Main(string[] args)
{
Program app = new Program();
app.Startup += new StartupEventHandler(AppStartUp);
app.Exit += new ExitEventHandler(AppExit);
app.Run();
}
示例5: Main
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var program = new Program();
program.Run(Environment.GetCommandLineArgs());
}
示例6: Main
public static void Main()
{
using(var program = new Program())
{
program.Run(60, 120);
}
}
示例7: Main
public static void Main()
{
using (Program prog = new Program()) {
//Utilities.SetWindowTitle (prog);
prog.Run( 30.0, 0.0 );
}
}
示例8: Main_
public static void Main_()
{
using (Program p = new Program())
{
p.Run(60);
}
}
示例9: Main
public static int Main ()
{
Program p = new Program ();
p.Run ();
return 0;
}
示例10: Main
static void Main(string[] args)
{
using (Program p = new Program())
{
p.Run();
}
}
示例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();
}
示例12: Main
public static void Main()
{
Program myApplication = new Program();
Window mainWindow = myApplication.CreateWindow();
// Start the application
myApplication.Run(mainWindow);
}
示例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));
}
}
示例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();
}
示例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();
}