当前位置:网站首页>.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();
}
}
总结
继续学习.
边栏推荐
- STM32HAL库修改Hal_Delay为us级延时
- 参考代码系列_1.各种语言的Hello World
- Error EPERM operation not permitted, mkdir 'Dsoftwarenodejsnode_cache_cacach Two solutions
- XSS shooting range (3) prompt to win
- DVWA安装教程(懂你的不懂·详细)
- ENSP, VLAN division, static routing, comprehensive configuration of Layer 3 switches
- PCL 计算点云坐标最值及其索引
- 产学研用 共建开源人才生态 | 2022开放原子全球开源峰会教育分论坛圆满召开
- MySQL事务(transaction) (有这篇就足够了..)
- MySQL开窗函数
猜你喜欢

MySQL事务隔离级别详解

A complete introduction to JSqlParse of Sql parsing and conversion

MySQL database must add, delete, search and modify operations (CRUD)

Sql解析转换之JSqlParse完整介绍
![[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)

1. 获取数据-requests.get()

SQL行列转换

手把手实现图片预览插件(三)
![[C language] Detailed explanation of operators](/img/fa/dce3da39f19b51c6d1b682128da36b.png)
[C language] Detailed explanation of operators

From scratch, a mirror to the end, a pure system builds a grasscutter (Grasscutter)
随机推荐
centos7安装mysql5.7
MySQL transaction isolation level, rounding
信息系统项目管理师核心考点(五十五)配置管理员(CMO)的工作
unity2d game
MySQL开窗函数
Visual studio shortcuts that improve efficiency, summary (updated from time to time)
ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost3306' (10061)Solution
VScode+ESP32 quickly install ESP-IDF plugin
sql statement - how to query data in another table based on the data in one table
手把手实现图片预览插件(三)
扫雷小游戏——C语言
开源汇智创未来 | 2022开放原子全球开源峰会OpenAtom openEuler分论坛圆满召开
input输入框展示两位小数之precision
从零开始,一镜到底,纯净系统搭建除草机(Grasscutter)
MySQL数据库备份
MySQL常见面试题汇总(建议收藏!!!)
[R language] [3] apply, tapply, lapply, sapply, mapply and par function related parameters
CentOS7 安装MySQL 图文详细教程
【云原生】DevOps(五):集成Harbor
1. Get data - requests.get()