上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 35 下一页
摘要: 代码: using System.Text.RegularExpressions; namespace GetData { internal class Program { private static void Main(string[] args) { var lines = File.Read 阅读全文
posted @ 2022-11-24 11:44 wzwyc 阅读(527) 评论(0) 推荐(0)
摘要: 约束 说明 where T:struct 对于结构约束,类型T必须是值类型 where T:class 类约束指定类型T必须是引用类型 where T:IFoo 指定类型T必须实现接口IFoo where T:Foo 指定类型T必须派生自基类Foo where T:new() 这是一个构造函数约束, 阅读全文
posted @ 2022-09-13 09:29 wzwyc 阅读(96) 评论(0) 推荐(0)
摘要: 原来获取本机IP地址的方法(方法1): var items = Dns.GetHostEntry(Dns.GetHostName()).AddressList .Where(s => s.AddressFamily == System.Net.Sockets.AddressFamily.InterN 阅读全文
posted @ 2022-09-08 09:48 wzwyc 阅读(2796) 评论(0) 推荐(0)
摘要: 模板样式定义: <TabControl ItemsSource="{Binding Items}"> <TabControl.ContentTemplate> <DataTemplate> <ListBox BorderThickness="0" ItemsSource="{Binding Item 阅读全文
posted @ 2022-09-06 11:10 wzwyc 阅读(530) 评论(0) 推荐(0)
摘要: 数据的导出: private void OnExport() { try { FolderBrowserDialog dialog = new FolderBrowserDialog(); if (dialog.ShowDialog() == System.Windows.Forms.DialogR 阅读全文
posted @ 2022-09-02 16:49 wzwyc 阅读(687) 评论(0) 推荐(1)
摘要: 用小工具自动生成一段XAML代码,但是自动生成的文本缩进和格式比较乱,想弄得整齐一点。 附上最终的实现代码: public static string FormatXML(string content) { XmlDocument doc = new XmlDocument(); XmlReader 阅读全文
posted @ 2022-09-01 16:31 wzwyc 阅读(164) 评论(0) 推荐(0)
摘要: 今天打开Eclipse时弹出一个错误提示,无法正常打开。 “Version 1.8.0_131 of the JVM is not suitable for this product. Version: 11 or greater is required.” 之前印象中是可以正常打开的。 起初以为是 阅读全文
posted @ 2022-08-31 10:21 wzwyc 阅读(3953) 评论(1) 推荐(1)
摘要: 之前自己做了一个小的播放器软件,缺少字幕的功能有时候很不方面,研究了一下,把SRT字幕的功能加上了。 SRT本身其实就是一个纯文本文件,只需要按照他的规则去解析就可以了。 附上我的实现代码,供大家参考: using JcPlayer.Models; using System; using Syste 阅读全文
posted @ 2022-08-31 08:33 wzwyc 阅读(541) 评论(0) 推荐(0)
摘要: 在处理一些交互事件的时候,很容易出现单击或双击,不小心触发了多次的问题。 目前没有找到很好的处理办法。于是想着自己封装一个类。 public class EventResponseController { private static EventResponseController _instanc 阅读全文
posted @ 2022-08-03 12:47 wzwyc 阅读(400) 评论(0) 推荐(0)
摘要: 一些界面进行一些管理操作的时候,需要在主界面上打开新的窗体。有时候弹出的管理窗体,又需要再弹出新的管理窗体。这样的话,窗体一层一层的会非常多。 就像我之前做的一个项目,后面需要进行模块管理,首先打开【模块列表界面】,新建模块以后需要弹出【模块编辑界面】,模块编辑界面里会有接口列表,对某个接口进行编辑 阅读全文
posted @ 2022-07-29 16:40 wzwyc 阅读(1026) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 35 下一页