public static int Main(string[] args) { BrowserWindow nw = new BrowserWindow(); NativeApp.Run(nw); return(0); }
public void Run(NWindow window) { if (NativeApp == null) { throw new InvalidOperationException("Application is not initialized yet."); } window.Application = this; NativeApp.Run(window.StartupInfo); }
static void Main(string[] args) { BrowserWindow browserWindow = new BrowserWindow(); NativeApp.Run(browserWindow); }
static void Main(string[] args) { string configFile = "WebAssemblyViewer.cfg"; ArgOptions argOptions = GetOptions(args); if (argOptions.ContainsHelp) { MessageBox.Show(IntPtr.Zero, "Parameter:\n\n/f:<Path>\tset the path to config-file\n/e \t\topens the Config Editor!\n/?\t\tHelp\n\nExample:\n\nWebAssemblyViewer.exe /f:c:\\tmp\\config.cfg\n\n", "Parameters", MessageBoxOptions.OkOnly | MessageBoxOptions.IconInformation); return; } if (argOptions.ContainsConfigFilePath) { configFile = argOptions.ConfigFilePath; FileInfo fi = new FileInfo(configFile); if (fi.Directory == null || !fi.Directory.Exists) { MessageBox.Show("The directory of config-File cannot be found!"); return; } } BrowserOptions opetions; if (!LoadOptions(configFile, out opetions)) { opetions = GetDefaultOptions(); if (WriteOptions(configFile, opetions)) { if (!argOptions.ContainsEdit) { MessageBoxResult result = MessageBox.Show(IntPtr.Zero, "The Application created a configuration - file = (WebAssemblyViewer.cfg)\nDo you want to continue with emtyp configuration file?", "Config file created!", MessageBoxOptions.YesNo | MessageBoxOptions.IconQuestion | MessageBoxOptions.DefButton2); if (result == MessageBoxResult.No) { result = MessageBox.Show(IntPtr.Zero, "Do you want to Edit the Cofig-File?", "Want to edit Config-File?", MessageBoxOptions.OkOnly | MessageBoxOptions.YesNo); if (result == MessageBoxResult.Yes) { argOptions.ContainsEdit = true; } else { return; } } } } } if (argOptions.ContainsEdit) { EditWindow ew = new EditWindow(opetions); NativeApp.Run(ew); if (ew.Result) { if (WriteOptions(configFile, opetions)) { AppMessageBox mg = new AppMessageBox(); mg.Caption = "Continue?"; mg.Message = "The configuration has been saved.\nDo you want to start the App?\nClick Ok to start the Applicaiton."; NativeApp.Run(mg); var result = mg.Result; if (result == MessageBoxResult.Cancel) { return; } } } } BrowserWindow bw = new BrowserWindow(opetions); NativeApp.Run(bw); }
static void Main() { MainWindow mw = new MainWindow(); NativeApp.Run(mw); }
static void Main() { BrowserWindow bw = new BrowserWindow(); NativeApp.Run(bw); }
static void Main(string[] args) { MainForm nw = new MainForm(); NativeApp.Run(nw); }