自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 资源 (5)
  • 收藏
  • 关注

原创 【C# .NET】利用串行通信接口检测输入方波的周期(频率)

【问题描述】有些控制系统中采用独立的方波或脉冲信号协调各设备的动作,这种信号称为“时统信号”,整个系统在时统信号的协调下工作。时统信号的电平幅度(峰峰值)一般在10V左右。 这时,系统开发就需要检测时统信号的周期(频率)。解决这个问题通用方法是采用计数/定时器卡对时统脉冲计数,同时计时,然后根据检测时间和检测到的计时值计算出信号的周期(频率)。如果对软件对时统信号精度要求不高,例如绝对精度为0.1毫秒(100微秒),这时可以利用串行通信端口检测时统信号。【解决方法】串行通信接口检测时统信号有两种方法:(

2021-01-18 15:07:52 714

原创 【C# .Net Framework】检测网线是否被拔出

使用WMI(Windows Management Instrumentation)提供的 MSNdis_StatusMediaConnect对象/MSNdis_StatusMediaDisconnect对象,以事件方式通知网络连接或断开using System;using System.Linq;using System.Management;namespace ConsoleApp3{ class Program { static void Main(st

2021-01-14 21:40:45 1334

原创 【C# .Net Framework】如何正确检测Windows版本信息

从Windows 2000开始,Windows Kernel 库ntdll.dll中的RtlGetVersion函数可以获取操作系统版本详细信息。在Window 10 20H2中,这个函数依然有效using System;using System.Runtime.InteropServices;using System.Security;namespace ConsoleApp2{ class Program { [SecurityCritical] .

2021-01-11 00:02:25 634 2

原创 【C# .Net Framework】在.Net Framework中使用gRPC

随着.Net Core 3.0及后续版本的出现,微软似乎正在放弃极具“Windows特征”的WCF。作为WCF的替代者,VS Code 或VS2019已经有基于.Net Core 3.0平台的“gPRC项目模板”。这个模板极大地简化了gRPC的开发过程。gRPC不仅可以应用于.Net Core环境,也可以应用于.Net Framework。本文采用VS2019,以.Net Framework 4.7.2为例,描述gPRC的实现步骤。步骤一、 创建解决方案及项目Greeter,.Net Fr.

2020-10-03 21:52:17 5482 4

原创 【C# .Net Framework】派生类使用PropertyChanged.Fody

WPF MVVM中的View-Model广泛使用INotifyPropertyChanged接口(INPC)。View-Model中,如果有大量的属性需要实现INPC,直接编码是件非常痛苦和乏味的事情。使用PropertyChanged.Fody可以轻松解决问题。PropertyChanged.Fody 支持具有继承关系的类。基类BaseClass实现INotifyPropertyChangedpublic class BaseClass : INotifyPropertyChanged{

2020-10-02 22:15:47 1072

原创 DevExpress 19.2.7 .NET Core 3.1 WPF程序开发及汉化

1. 下载并安装 DevExpressNetCoreDesktopSetup-19.2.7.exe2. 下载汉化资源包 zh-Hans 19.23. 在Vistual Studio 2019中,创建新项目,选择“WPF App (.NET Core)”项目模板4. 在资源管理器,项目“WpfApp1”点上鼠标右键,选择“管理 Nuget 程序包”5. 在NuGet页面,程序包...

2020-04-17 22:36:39 1971

原创 IPv4报文分片基本概念(The Baisc of IPv4 Datagram Fragmentation )

1. IPv4分片由于数据链路层MTU(最大传输单元)的限制,使用TCP/IP协议传送字节数比较大的数据时,发生IPv4报文分片现象。以太网的MTU=1500B。假设用户数据有5690字节,IPv4 分片如下分片编号 IPv4报文字节数 分片偏移量(FO) 用户数据字节数 0# 1500=20(IPv4 Header)+8(UDP Header)+1472...

2020-02-23 16:26:06 2891 3

原创 用 C#/.Net Framework 获取系统真实物理网卡

1. 概述用C#和.Netframework检索计算机网卡,通常有两种方法:使用静态方法 System.Net.NetworkInformation.GetAllNetworkInterfaces( )获取网络接口信息; 使用System.Management.ManagementObjectSearcher类枚举系统安装的网络适配器;采用第1种方法的缺点是GetAllNetworkI...

2020-02-21 02:22:31 3041

原创 Visual Studio 中两个窗体(WinForm)之间相互传值的方法

编写WinowsForm应用程序时,实现两个窗体之间相互传递值的方法其实很简单。以下用一个例子说明:在名为FormMain主窗体运行过程中利用名为FormInfo窗体,获取用户输入信息,并将这些信息返回给FormMain1. FormMain和FormInfo点击“修改...”按钮,显示FormInfo2. 设置FormInfo中buttonOK和buttonC

2014-03-18 19:26:00 18591

DevExpress 17.2 官方汉化资源

配合Devexpress 17.2 汉化资源。官方网站下载,亲测可以

2017-12-12

Dependency Injection with Unity (Microsoft patterns & practices)

Over the years software systems have evolutionarily become more and more complex. One of the techniques for dealing with this inherent complexity of software systems is dependency injection – a design pattern that allows the removal of hard-coded dependencies and makes it possible to assemble a service by changing dependencies easily, whether at run-time or compile-time. It promotes code reuse and loosely-coupled design which leads to more easily maintainable and flexible code. The guide you are holding in your hands is a primer on using dependency injection with Unity – a lightweight extensible dependency injection container built by the Microsoft patterns & practices team. It covers various styles of dependency injection and also additional capabilities of Unity container, such as object lifetime management, interception, and registration by convention. It also discusses the advanced topics of enhancing Unity with your custom extensions. The guide contains plenty of trade-off discussions and tips and tricks for managing your application cross-cutting concerns and making the most out of both dependency injection and Unity. These are accompanied by a real world example that will help you master the techniques. Keep in mind that Unity can be used in a wide range of application types such as desktop, web, services, and cloud. We encourage you to experiment with the sample code and think beyond the scenarios discussed in the guide. In addition, the guide includes the Tales from the Trenches – a collection of case studies that offer a different perspective through the eyes of developers working on the real world projects and sharing their experiences. These chapters make clear the range of scenarios in which you can use Unity, and also highlight its ease of use and flexibility. Whether you are a seasoned developer or just starting your development journey, we hope this guide will be worth your time studying it. We hope you discover that Unity container adds significant benefits to your applications and helps you to achieve the goals of maintainability, testability, flexibility, and extensibility in your own projects.

2014-03-08

.NET Reflector

著名的.NET反汇编分析工具。最新版本,支持.NET3.5、.NET2.0等

2009-11-25

DevExpress VCL 帮助文件 CHM 格式(2)

2009年7月9日修订的DEVEXPRESS VCL套件CHM格式帮助文档

2009-07-13

DevExpress VCL 帮助文件 CHM 格式(1)

2009年7月9日修订的DEVEXPRESS VCL套件CHM格式帮助文档

2009-07-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除