当前位置:网站首页>.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();
}
}
总结
继续学习.
边栏推荐
- MySQL数据库备份
- STM32——DMA
- centos7安装mysql5.7步骤(图解版)
- PCL calculates the point cloud coordinate maximum and its index
- WeChat applet uses cloud functions to update and add cloud database nested array elements
- 12个MySQL慢查询的原因分析
- MySQL optimization: from ten seconds to three hundred milliseconds
- Minesweeper game (written in c language)
- mysql使用on duplicate key update批量更新数据
- 开源汇智创未来 | 2022开放原子全球开源峰会OpenAtom openEuler分论坛圆满召开
猜你喜欢

Centos7 install mysql5.7 steps (graphical version)
![[debug highlights] Expected input batch_size (1) to match target batch_size (0)](/img/b3/ff6ccc3cd307befad3bd07a9f4a956.png)
[debug highlights] Expected input batch_size (1) to match target batch_size (0)

12个MySQL慢查询的原因分析

WeChat applet uses cloud functions to update and add cloud database nested array elements

DVWA之SQL注入

城市内涝及桥洞隧道积水在线监测系统

MySQL优化:从十几秒优化到三百毫秒

数字经济时代的开源数据库创新 | 2022开放原子全球开源峰会数据库分论坛圆满召开

Lua,ILRuntime, HybridCLR(wolong)/huatuo热更新对比分析

STM32HAL library modifies Hal_Delay to us-level delay
随机推荐
聚变云原生,赋能新里程 | 2022开放原子全球开源峰会云原生分论坛圆满召开
重磅 | 开放原子校源行活动正式启动
EasyExcel的简单读取操作
[debug highlights] Expected input batch_size (1) to match target batch_size (0)
The 15th day of the special assault version of the sword offer
打造基于ILRuntime热更新的组件化开发
View source and switch mirrors in two ways: npm and nrm
CentOS7 install MySQL graphic detailed tutorial
visual studio 那些提高效率的快捷键,总结(不时更新)
MySQL事务隔离级别详解
Duplicate entry ‘XXX‘ for key ‘XXX.PRIMARY‘解决方案。
DVWA靶场环境搭建
ERP生产作业控制 金蝶
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
Unity Tutorial: URP Rendering Pipeline Practical Tutorial Series [1]
ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
[py script] batch binarization processing images
Unity框架设计系列:Unity 如何设计网络框架
论治理与创新 | 2022开放原子全球开源峰会OpenAnolis分论坛圆满召开
开放原子开源基金会秘书长孙文龙 | 凝心聚力,共拓开源