static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); HtmlUILauncher.EnableFlashSupport = false; // 需要引用PepperFlash文件夹 if (HtmlUILauncher.InitializeChromium((args => { args.Settings.LogSeverity = Chromium.CfxLogSeverity.Disable; }), cmd => { cmd.CommandLine.AppendSwitch("disable-web-security"); // 取消掉安全设置,可以跨域请求数据 //cmd.CommandLine.AppendArgument("--single-process"); // 没有效果 cmd.CommandLine.AppendSwitch("disable-direct-write"); cmd.CommandLine.AppendSwitch("--disable-directwrite-for-ui"); cmd.CommandLine.AppendSwitch("--single-process"); })) { //初始化成功,加载程序集内嵌的资源到运行时中 HtmlUILauncher.RegisterEmbeddedScheme(System.Reflection.Assembly.GetExecutingAssembly()); var l = System.Reflection.Assembly.GetExecutingAssembly(); //启动主窗体 Application.Run(new SubForm()); } }
static void Main(string[] argArray) { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); HtmlUILauncher.EnableFlashSupport = false; if (HtmlUILauncher.InitializeChromium((args => { args.Settings.LogSeverity = Chromium.CfxLogSeverity.Default; }))) { //初始化成功,加载程序集内嵌的资源到运行时中 HtmlUILauncher.RegisterEmbeddedScheme(System.Reflection.Assembly.GetExecutingAssembly()); if (argArray.Length > 0) { Application.Run(new MainForm(argArray[3], int.Parse(argArray[7]), argArray[5], argArray[9], argArray[11])); } else { Application.Run(new MainForm("", 1, "admin", "", "D:\\Projects\\Visual Studio 2017\\Sources\\Workspaces\\DiagnosisWorkstation\\DiagnosisWorkstation\\bin\\Debug")); } } } catch (FileNotFoundException ex) { MessageBox.Show("相关文件不存在:\r" + ex.Message, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (HtmlUILauncher.InitializeChromium()) { HtmlUILauncher.RegisterEmbeddedScheme(System.Reflection.Assembly.GetExecutingAssembly(), "res"); Application.Run(new frmMain()); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (HtmlUILauncher.InitializeChromium()) { //初始化成功,加载程序集内嵌的资源到运行时中 HtmlUILauncher.RegisterEmbeddedScheme(Resources.SchemeHelper.GetSchemeAssembley()); //启动主窗体 Application.Run(new EditorForm()); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); HtmlUILauncher.EnableFlashSupport = true; if (HtmlUILauncher.InitializeChromium()) { //初始化成功,加载程序集内嵌的资源到运行时中 HtmlUILauncher.RegisterEmbeddedScheme(System.Reflection.Assembly.GetExecutingAssembly()); //启动主窗体 Application.Run(new frmWelcome()); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (HtmlUILauncher.InitializeChromium((args) => { args.Settings.LogSeverity = Chromium.CfxLogSeverity.Verbose; }, settings => { })) { HtmlUILauncher.RegisterEmbeddedScheme(System.Reflection.Assembly.GetExecutingAssembly()); Application.Run(new Form1()); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); HtmlUILauncher.EnableFlashSupport = true; if (HtmlUILauncher.InitializeChromium((args => { args.Settings.LogSeverity = Chromium.CfxLogSeverity.Default; }))) { //初始化成功,加载程序集内嵌的资源到运行时中 HtmlUILauncher.RegisterEmbeddedScheme(System.Reflection.Assembly.GetExecutingAssembly(), domainName: "res.welcome.local"); //启动主窗体 Application.Run(new frmWelcome()); } }