当前位置:网站首页>.NET-6.WinForm2.NanUI learning and summary
.NET-6.WinForm2.NanUI learning and summary
2022-07-31 04:55:00 【joyyi9】
NanUI学习和总结
前言
其实这个和electron.js,nw.js 差不多,任何htmlcan be embedded in;
也就是webDevelopment can be embedded,angular,vue,react,node.js的web,都可以哦!
挺爽的.
See the documentation for other small details.
参考文档:
官方文档
第一个NanUI程序:
1. 下载Nuget包:
NetDimension.NanUI
NetDimension.NanUI.Runtime
2. 建立一个Winform程序
3. 创建主窗体:MainWindow.cs
4. 初始化在Main方法中
5. 运行
MainWindow.cs:
using NetDimension.NanUI;
using NetDimension.NanUI.HostWindow;
class MainWindow : Formium
{
// 设置窗体样式类型
public override HostWindowType WindowType => HostWindowType.System;
// 指定启动 Url
public override string StartUrl => "https://www.bing.com";
public MainWindow()
{
// 在此处设置窗口样式
Size = new System.Drawing.Size(1024, 768);
}
protected override void OnReady()
{
// 在此处进行浏览器相关操作
//ShowDevTools();
//ExecuteJavaScript("alert('Hello NanUI')");
}
}
Program.cs:
using NetDimension.NanUI;
class Program
{
static void Main()
{
// ...
WinFormium.CreateRuntimeBuilder(env => {
env.CustomCefSettings(settings =>
{
// 在此处设置 CEF 的相关参数
});
env.CustomCefCommandLineArguments(commandLine =>
{
// 在此处指定 CEF 命令行参数
});
}, app =>
{
// 指定启动窗体
app.UseMainWindow(context => new MainWindow());
})
.Build()
.Run();
}
}
总结
继续学习.
边栏推荐
猜你喜欢
![[C language] Detailed explanation of operators](/img/fa/dce3da39f19b51c6d1b682128da36b.png)
[C language] Detailed explanation of operators
![[Linear Neural Network] softmax regression](/img/98/ffdff5e96ad0d6ac0142af7ca11e9a.png)
[Linear Neural Network] softmax regression

ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)

Sun Wenlong, Secretary General of the Open Atom Open Source Foundation |

Create componentized development based on ILRuntime hot update

【线性神经网络】softmax回归

30 Years of Open Source Community | 2022 Open Atom Global Open Source Summit 30 Years of Open Source Community Special Event Held Successfully

input输入框展示两位小数之precision

The MySQL database installed configuration nanny level tutorial for 8.0.29 (for example) have hands

三道leetcode上的oj题
随机推荐
Unity打灵狐者
Error EPERM operation not permitted, mkdir ‘Dsoftwarenodejsnode_cache_cacach两种解决办法
[C language] Detailed explanation of operators
Solved (the latest version of selenium framework element positioning error) NameError: name 'By' is not defined
prompt.ml/15中<svg>标签使用解释
开放原子开源基金会秘书长孙文龙 | 凝心聚力,共拓开源
EasyExcel的简单读取操作
Unity Fighter
[Detailed explanation of ORACLE Explain]
Summary of MySQL common interview questions (recommended collection!!!)
The MySQL database installed configuration nanny level tutorial for 8.0.29 (for example) have hands
centos7安装mysql5.7步骤(图解版)
Lua,ILRuntime, HybridCLR(wolong)/huatuo hot update comparative analysis
信息系统项目管理师核心考点(五十五)配置管理员(CMO)的工作
MySQL优化:从十几秒优化到三百毫秒
ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
mysql存储过程
Three oj questions on leetcode
Open Source Smart Future | 2022 OpenAtom Global Open Source Summit OpenAtom openEuler sub-forum was successfully held
产学研用 共建开源人才生态 | 2022开放原子全球开源峰会教育分论坛圆满召开