摘要: 作为一名非主修C#的程序员,在此记录下学习与工作中C#的有用内容,持续更新 对类型进行约束,class指定了类型必须是引用类型,new()指定了类型必须具有一个无参的构造函数,规定T类型必须实现IUser,规定T必须为struct where T : class, new(), T:IUser, T 阅读全文
posted @ 2017-04-22 19:45 Hey,Coder! 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 通过Blend复制原有样式后修改 <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}"> <Setter Property="OverridesDefaultStyle" Value="true"/> <Sett 阅读全文
posted @ 2025-03-02 16:00 Hey,Coder! 阅读(11) 评论(0) 推荐(0) 编辑
摘要: NAudio var enumerator = new MMDeviceEnumerator(); var devices = enumerator.EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.All); foreach (var de 阅读全文
posted @ 2025-03-01 17:33 Hey,Coder! 阅读(5) 评论(0) 推荐(0) 编辑
摘要: <InkCanvas x:Name="inkCanvas" Background="White" > <InkCanvas.DefaultDrawingAttributes> <!--<DrawingAttributes StylusTip="Ellipse" Height="8" Width="4 阅读全文
posted @ 2025-02-25 23:02 Hey,Coder! 阅读(1) 评论(0) 推荐(0) 编辑
摘要: // 克隆一个现有的文化 CultureInfo customCulture = (CultureInfo)CultureInfo.GetCultureInfo("zh-CN").Clone(); // 修改时间显示格式 customCulture.DateTimeFormat.ShortDateP 阅读全文
posted @ 2025-02-25 10:20 Hey,Coder! 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 前台 <Window x:Class="FinalTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winf 阅读全文
posted @ 2025-02-23 21:33 Hey,Coder! 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 配置属性如下 直接翻译文本即可 阅读全文
posted @ 2025-02-22 00:57 Hey,Coder! 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 引用surfer安装后自动添加的com组件 代码调用 using Surfer; Application app = new Application(); var path = AppDomain.CurrentDomain.BaseDirectory; app.GridData2(DataFile 阅读全文
posted @ 2025-02-11 16:02 Hey,Coder! 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 安装nuget【Ude.NetStandard】 using (FileStream fs = File.OpenRead(ParseFilePath)) { Ude.CharsetDetector cdet = new Ude.CharsetDetector(); cdet.Feed(fs); c 阅读全文
posted @ 2025-01-15 17:40 Hey,Coder! 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 创建两个项目,wpf、webapi 将webapi项目输出类型设置为类库 在wpf中引用webapi wpf中启动 Host.CreateDefaultBuilder(new string[]{ "--urls", "http://localhost:8888", }) .ConfigureWebH 阅读全文
posted @ 2025-01-02 18:40 Hey,Coder! 阅读(21) 评论(0) 推荐(0) 编辑
摘要: vim /etc/sudoers ## 添加管理员权限 testuser ALL=(ALL) PASSWD:ALL 配置命令无需输入sudo # /etc/sudoers中添加 testuser ALL=NOPASSWD:/usr/bin/nmcli 阅读全文
posted @ 2024-12-11 15:23 Hey,Coder! 阅读(23) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示