![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
wpf
wang_h_b
这个作者很懒,什么都没留下…
展开
-
wpf全屏窗口
private void Window_Loaded() { ////去掉窗口放大缩小按键 //this.WindowState = System.Windows.WindowState.Normal; //this.WindowStyle = System.Windows.WindowStyle.None; //this.ResizeMode = System.Windows.ResizeMo...原创 2021-01-23 13:38:54 · 202 阅读 · 0 评论 -
C# .NET Core发布linux64位系统
(1)创建一个.NET Core工程(2)创建成功后,右键解决方案,选择发布,会看到如下图:选择发布到文件夹(3)选择完成(4)选择编辑release,将部署模式改为独立,目标运行改为Linux-x64(5)选择发布,在发布路径中看到publish文件,将此文件拷贝到linux64系统中,root权限./工程名即可运行...原创 2020-11-21 15:56:51 · 1108 阅读 · 0 评论 -
获取本机IP信息的5中方法
public List<string> GetAddressIP() { List<string> AddressIP = new List<string>(); IPAddress[] _IPAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList; for(int i=0;i< _IPAddress.Length;i+...原创 2020-10-26 16:38:38 · 254 阅读 · 0 评论 -
读取本机cpu id与硬盘id
using System.Management; /// <summary> /// 读取cpu id /// </summary> /// <returns></returns> public string get_cpu_id() { try { //需要在解决方案中引用Syste...原创 2020-10-24 16:53:24 · 354 阅读 · 0 评论 -
C# 字典 Dictionary 遍历
using System;using System.Collections.Generic;public class Example{ public static void Main() { //一、创建泛型哈希表,然后加入元素 Dictionary<string, string> oscar = new Dictionary<string, string>(); .转载 2020-09-12 13:39:28 · 1231 阅读 · 0 评论 -
tcp开辟多个监听端口,并且每个端口支持多个连接
class TCPClass { Dictionary<string, Socket> dict = new Dictionary<string, Socket>();//存放套接字 Dictionary<string, Thread> dictThread = new Dictionary<string, Thread>();//存放线程 Dictionary<string, List<by...原创 2020-09-12 13:31:36 · 2168 阅读 · 0 评论 -
C# NAudio播放pcm格式音频
using NAudio;using NAudio.Wave;WaveOut waveOut; //播放器BufferedWaveProvider bufferedWaveProvider; //5s缓存区/// <summary> /// Naudio初始化,调用一次即可 /// </summary>public void naudioInit() { ...原创 2020-09-09 11:08:08 · 2939 阅读 · 0 评论 -
C# tcp服务器 多线程接收处理数据
Thread threadWatch = null; // 负责监听客户端连接请求的 线程; Socket socketWatch = null; Dictionary<string, Socket> dict = new Dictionary<string, Socket>();//存放套接字 Dictionary<string, Thread> dictThread = new Dictionary<...原创 2020-09-09 11:02:56 · 1271 阅读 · 0 评论 -
创建文件、读取文件信息、删除文件、压缩、解压文件、拷贝文件方法
/// <summary> /// 读取文件信息 /// </summary> /// <param name="fileName">文件路径加文件名(@"./IAP_bootloader.stm")</param> /// <param name="by">...原创 2020-04-10 14:26:57 · 231 阅读 · 0 评论 -
AES 加密解密方法
using System;using System.Collections.Generic;using System.Linq;using System.Security.Cryptography;using System.Text;using System.Threading.Tasks;namespace fileEncrypt{ class Encrypt {...原创 2020-04-10 14:18:04 · 449 阅读 · 0 评论 -
wpf 选择文件
引用 system.windows.Formsprivate void Button_Click(object sender, RoutedEventArgs e) { string file_name = ""; System.Windows.Forms.OpenFileDialog openFileDialog = ne...原创 2020-04-10 14:12:44 · 207 阅读 · 0 评论 -
sqlite 操作
在 System.Data.SQLite 官网的 download 中的 Setups for 64-bit Windows (.NET Framework 4.6) sqlite-netFx46-setup-x64-2015-1.0.104.0.exe (17.99 MiB) 下载然后运行安装。更简单的做法是在 Visual Studio 2017 的 NuGet 中,输入:install-pa...转载 2018-05-11 16:46:22 · 395 阅读 · 1 评论 -
wpfToolkit安装使用说明
安装:选择工具 -> NuGet包管理 -> 程序包管理控制台。在控制台输入命令: PM> Install-Package Extended.Wpf.Toolkit使用:using Xceed.Wpf.Toolkit; 在xaml域名添加xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" 然后在xaml中添加控件时,前...原创 2018-05-14 14:30:50 · 12766 阅读 · 1 评论 -
自己使用的udp类
using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Net.Sockets;using System.Text;using System.Threading;using System.Threading.Tasks;namespace Monito...原创 2018-05-14 14:32:24 · 719 阅读 · 0 评论 -
wpf Label走马灯自定义控件 可直接使用
using NUnit.Framework;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Timers;using System.Windows;using System.Windows.Contr...转载 2018-05-14 14:34:02 · 1262 阅读 · 0 评论 -
wpf 定时器的选择 System.Windows.Threading.DispatcherTimer
System.Windows.Threading.DispatcherTimer _timer = new System.Windows.Threading.DispatcherTimer(); _timer.Interval = new TimeSpan(0, 0, 0, 0,10); _timer.Tick += new EventHand...原创 2018-11-12 17:51:36 · 1014 阅读 · 0 评论 -
wpf 委托的实现小例子
窗体1里面 private void btnNew_Click(object sender, RoutedEventArgs e) { NewName win = new NewName(); win.ChangeColor+= new NewName.Ad(Change); win.ShowDialog(...原创 2018-12-20 18:35:49 · 1759 阅读 · 0 评论 -
wpf 右键datagrid删除datatable
//右键删除数据 private void datagrid_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { ContextMenu menu1 = new ContextMenu(); MenuItem menuitemFunc = ...原创 2018-03-23 11:52:12 · 913 阅读 · 0 评论