注意: 此项目只用于存放一些测试代码,逐渐沦为一个大杂烩仓库,请谨慎star。
一个使用 Prism 作为模块化框架、基于多个开源控件库作为UI控件选择、集成开源 UI 界面设计的 .NET 7 WPF 客户端项目。
.NET是免费,跨平台,开源的,用于构建所有应用的开发人员平台。
Prism为程序设计提供指导,旨在帮助用户更加容易的设计和构建丰富、灵活、易于维护WPF桌面应用程序。Prism使用设计模式(如MVVM,复合视图,事件聚合器),帮助你创建一个松耦合的程序。遵循这些设计模式原则,将目标程序解耦成独立的模块。这些类型的应用程序被称为复合应用程序。
多种开源 WPF UI 库选择,开发 WPF 项目更方便:MaterialDesignInXamlToolkit、 HandyControl、 PanuonUI.Silver、 AduSkin。
ECharts:pie-doughnut
本地化支持
动态国际化支持
支持主题色动态切换
0.1
官方网站
关于TerminalMACS
收集全球优秀的开源WPF界面设计
以下为2022年之前的收集。
登录注册分类 1
参考视频:C# WPF Material Design UI: Login Window
参考源码:Login2
简单登录窗体设计1
参考视频:C# WPF Material Design UI: Login Window
参考源码:Login1
简单登录窗体设计2
参考视频:WPF Food App Login UI Material Design [Speed Design]
美食应用登录
菜单类 2
参考视频:C# WPF Material Design UI: Animated Colorful Navigation Drawer
参考源码:AnimatedColorfulMenu
抽屉式菜单1
参考视频:WPF - Navigation Drawer / Sidebar Menu | UI Design | C# |
参考源码:Navigation-Drawer-Sidebar-Menu-in-WPF
抽屉式菜单2
参考视频:C# WPF Material Design UI: Fast Food Sales
参考源码:Pizzaria1
菜单切换用户控件
参考视频:C# WPF Material Design UI: Animated Menu
参考源码:AnimatedMenu1
菜单切换用户控件
其他界面设计 3
参考视频:WPF Dashboard UI – Material Design [Speed Design]
参考源码:WPF-Dashboard-UI-Material-Design-Concept
移动应用仪表盘
参考视频:WPF Dashboard UI – Material Design [Speed Design]
参考源码:WPF-Dashboard-UI-Material-Design-Concept
ECharts:pie-doughnut
简易仪表盘2
参考视频:C# WPF Material Design UI: Redesign Instagram
参考源码:Instagram
Instagram重新设计
参考视频:dotnet9
参考源码:dotnet9
LoLGoal
参考视频:C# WPF Material Design UI: Dashboard
参考源码:Dashboard
简易音乐播放器1
百度地图
参考视频:
参考源码:Chat
聊天界面设计
参考视频:
计算器
参考开源项目:
https://github.com/yanjinhuagood/SoftWareHelper
文章
https://www.cnblogs.com/yanjinhua/p/13896894.html
Dotnet9站点介绍文章:https://dotnet9.com/16722.html
功能:
后面计划改成sqlite数据库存储:
{
"IsPowerOn": true,
"MenuItemInfos": [
{
"FilePath": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
"IconPath": null,
"Name": "Google Chrome",
"Type": 0
},
{
"FilePath": "https://dotnet9.com/",
"IconPath": "logo.png",
"Name": "Dotnet9",
"Type": 1
},
{
"FilePath": "mstsc /v:192.168.1.133",
"IconPath": "shell.png",
"Name": "192.168.1.133",
"Type": 2
}
]
}
private void Grid_Drop(object sender, DragEventArgs e)
{
try
{
var fileName = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();
MenuItemInfo menuItem = new MenuItemInfo() { FilePath = fileName };
// 快捷方式需要获取目标文件路径
if (fileName.ToLower().EndsWith("lnk"))
{
WshShell shell = new WshShell();
IWshShortcut wshShortcut = (IWshShortcut)shell.CreateShortcut(fileName);
menuItem.FilePath = wshShortcut.TargetPath;
}
ImageSource imageSource = SystemIcon.GetImageSource(true, menuItem.FilePath);
System.IO.FileInfo file = new System.IO.FileInfo(fileName);
if (string.IsNullOrWhiteSpace(file.Extension))
{
menuItem.Name = file.Name;
}
else
{
menuItem.Name = file.Name.Substring(0, file.Name.Length - file.Extension.Length);
}
menuItem.Type = MenuItemType.Exe;
if (ConfigHelper.AddNewMenuItem(menuItem))
{
var btn = AddMenuItem(menuItem);
fishButtons.Children.Add(btn);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void Grid_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effects = DragDropEffects.Link;
}
else
{
e.Effects = DragDropEffects.None;
}
}
{
"FilePath": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
"IconPath": null,
"Name": "Google Chrome",
"Type": 0
}
{
"FilePath": "https://dotnet9.com/",
"IconPath": "logo.png",
"Name": "Dotnet9",
"Type": 1
}
else if (menuItem.Type == MenuItemType.Web)
{
Process.Start(new ProcessStartInfo("cmd", $"/c start {menuItem.FilePath}")
{
UseShellExecute = false,
CreateNoWindow = true
});
}
{
"FilePath": "mstsc /v:192.168.1.133",
"IconPath": "shell.png",
"Name": "192.168.1.133",
"Type": 2
}
else if( menuItem.Type == MenuItemType.Cmd)
{
Process p = new Process();
p.StartInfo.FileName = "cmd";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardInput.WriteLine($"{menuItem.FilePath} &exit");
p.StandardInput.AutoFlush = true;
p.WaitForExit();
p.Close();
}
公司项目有使用到DotNetty与java端Netty项目通信,所以花时间整了这个demo,打算一直维护下去。
功能:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。