当前位置:网站首页>.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语言】操作符详解
- MySQL优化:从十几秒优化到三百毫秒
- sql语句之多表查询
- Unity URP渲染管线摄像机核心机制剖析
- WeChat applet uses cloud functions to update and add cloud database nested array elements
- 行业落地呈现新进展 | 2022开放原子全球开源峰会OpenAtom OpenHarmony分论坛圆满召开
- unity2d game
- prompt.ml/15中<svg>标签使用解释
- Industry-university-research application to build an open source talent ecosystem | 2022 Open Atom Global Open Source Summit Education Sub-Forum was successfully held
- SQL语句中对时间字段进行区间查询
猜你喜欢

Heavyweight | The Open Atomic School Source Line activity was officially launched

MySQL优化之慢日志查询

Hand in hand to realize the picture preview plug-in (3)

MySQL optimization: from ten seconds to three hundred milliseconds

WPF WPF 】 【 the depth resolution of the template

MySQL transaction isolation level, rounding

益智类游戏关卡设计:逆推法--巧解益智类游戏关卡设计

The Vue project connects to the MySQL database through node and implements addition, deletion, modification and query operations

MySQL数据库安装配置保姆级教程(以8.0.29为例)有手就行

Go语学习笔记 - 处理超时问题 - Context使用 | 从零开始Go语言
随机推荐
开源社区三十年 | 2022开放原子全球开源峰会开源社区三十年专题活动圆满召开
Sun Wenlong, Secretary General of the Open Atom Open Source Foundation |
CentOS7 安装MySQL 图文详细教程
.NET-6.WinForm2.NanUI学习和总结
HCIP第十天_BGP路由汇总实验
MySQL数据库必会的增删查改操作(CRUD)
【云原生】DevOps(五):集成Harbor
从零开始,一镜到底,纯净系统搭建除草机(Grasscutter)
ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
[Linear Neural Network] softmax regression
.NET-9.乱七八糟的理论笔记(概念,思想)
信息系统项目管理师核心考点(五十五)配置管理员(CMO)的工作
Create componentized development based on ILRuntime hot update
MySQL优化之慢日志查询
Gaussian distribution and its maximum likelihood estimation
打造基于ILRuntime热更新的组件化开发
Error EPERM operation not permitted, mkdir ‘Dsoftwarenodejsnode_cache_cacach两种解决办法
VScode+ESP32 quickly install ESP-IDF plugin
Doris学习笔记之监控
Minesweeper game (written in c language)