.NET 内部效能插件

20年资深研发工程师带你认识NET插件的各种坑 图文分享插件的制作、调用、传参、反射、异常时的各种问题处理 阅读详情

简介

这篇文章将介绍一个自制的简易插件。

因为在release版用windows的task manager感觉很麻烦,每次都要找一下自己的程序,就临时想到乾脆做一个简单的小插件来玩玩。

如何使用

static void Main()
{
    PerformanceDetector.Instance.initialize();
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new frmMain());
    PerformanceDetector.Instance.destroy();
} 

开启工程中的Program.cs,然后于Main中加入两行代码。

PerformanceDetector.Instance.initialize(); 

PerformanceDetector.Instance.destroy(); 


将第一行代码加于Application.Run()之前,将第二行代码加于Application.Run()之后。

就可以在运行时透过Alt+Ctrl+M呼叫这个插件了。

关于这插件的构想

因为不喜欢每次都用Task Manager,就自己整个了内存监控的代码。

一开始只是想说做个在应用内监控内存使用量的代码。所以使用Process来获取内存使用量。

但又觉得每次都去打开Log档来看很麻烦,就想说做个UI来看好了。

然后又想说,那要怎么显示这个控件?想了想既不想做在Menu也不想用一个按钮或其他控件,最后就决定用快捷来处理了。

不过第一版没有仔细想好,搞了个占据了全部画面的控件。用了才发现这样也不能边操作边看用量,好吧,重做。

所以最后决定了,就用一个单一的窗口来显示,会比较乾净。

想说CPU使用量也可以一起监控,就顺便做了。

本来是有在考虑原本第一版做的比较详细的需不需要有,但后来想想目前似乎还用不到,于是最后做成这样。

这工具中使用的技术

第一个关于CPU的使用部分,用的是PerformaceCounter来处理的

theCPUCounter = new PerformanceCounter("Process", "% Processor Time", Process.GetCurrentProcess().ProcessName);
m_cpuUsage = (int)(theCPUCounter.NextValue() / Environment.ProcessorCount); 

public PerformanceCounter(
	string categoryName,
	string counterName,
	string instanceName )  


我需要抓的是当前进程的CPU使用率,所以第一个参数用"Process",第二个参数用"% Processor Time",第三个进程则是用当前进程的名称。

利用Process.GetCurrentProcess().ProcessName取得。

只要呼叫PerformanceCounter.NextValue()就可以取得CPU使用率,并透过Enviroment.ProcessorCount来计算。

另外由于我是利用快捷键的方式来显示窗口。所以利用了Hook来拦截按键。

HookManager.Instance.RegisterHook(HookType.WH_KEYBOARD, new CustomHookProc.HookProcHandler(KeyboardHookProc));

void KeyboardHookProc(int nCode, IntPtr wParam, IntPtr lParam)
{
    KeyStateInfo ctrlKey = KeyboardInfo.GetKeyState(Keys.ControlKey);
    KeyStateInfo altKey = KeyboardInfo.GetKeyState(Keys.Alt);
    KeyStateInfo mKey = KeyboardInfo.GetKeyState(Keys.M);
    if (ctrlKey.IsPressed && altKey.IsPressed && mKey.IsPressed)
    {
        showMonitorForm();
    }
} 

HookManager是我自己封装过的一个简易Hook类,只需透过注册事件即可使用。

最后是利用Process.WorkingSet64来取得进程内存。

Process currentProcess = Process.GetCurrentProcess();
currentProcess.WorkingSet64; 

以及使用Process.Modules跟ProcessModule.ModuleMemorySize来取得相关DLL的使用内存。


ProcessModuleCollection myProcessModuleCollection = currentProcess.Modules;
// Display the 'ModuleMemorySize' of each of the modules.
ProcessModule myProcessModule;
for (int i = 0; i < myProcessModuleCollection.Count; i++)
{
    myProcessModule = myProcessModuleCollection[i];
    if (m_moduleMemorys.Keys.Contains(myProcessModule.ModuleName))
        m_moduleMemorys[myProcessModule.ModuleName].update(myProcessModule.ModuleMemorySize);
    else
    {
        MemoryInfo mem = new MemoryInfo();
        mem.Name = myProcessModule.ModuleName;
        mem.update(myProcessModule.ModuleMemorySize);
        m_moduleMemorys[myProcessModule.ModuleName] = mem;
    }
} 


public class MemoryInfo
{
    string m_name;
    long m_currentUsage;
    long m_maximumUsage;
    public long MaximumUsage
    {
        get { return m_maximumUsage; }
        set { m_maximumUsage = value; }
    }
    public long CurrentUsage
    {
        get { return m_currentUsage; }
        set { m_currentUsage = value; }
    }
    public string Name
    {
        get { return m_name; }
        set { m_name = value; }
    }
    public string GetCurrentKB()
    {
        return Convert.ToString(m_currentUsage / 1024.0);
    }
    public string GetMaximumKB()
    {
        return Convert.ToString(m_maximumUsage / 1024.0);
    }
    public void update(long current)
    {
        m_currentUsage = current;
        if (m_currentUsage > m_maximumUsage)
            m_maximumUsage = m_currentUsage;
    }
} 


在代码中,声明了一个简单的类,来储存信息。

Name: 储存 ProcessModule.ModuleName。

CurrentUsage: 储存现在内存用量。

MaximumUsage: 储存最大内存用量。

代码下载


EO.WebBrowser_for_.NET_2018.2.53.0 Chrome based Browser Engine for .NET EO.WebBrowser is a web browser engine based on Google's Chromium project but with native .NET programming interface --- don't worry, it's not a wrapper around the Chrome browser installed on your machine. In fact EO.WebBrowser has the whole browser engine embedded inside a single .NET DLL. In another word, it has zero external dependency. Just reference and use. Why use EO.WebBrowser? • Based on Google's Chrome Project EO.WebBrowser uses the same core Google's Chrome and Apple Safari uses. It does not rely on IE. The engine is much faster and safer. • Zero External Dependency What if user updates/uninstall their browser? What if user disables JavaScript in Internet Explorer's settings dialog? These questions does not exist with EO.WebBrowser because everything is embedded inside our DLL files. • Native .NET components written in C# Because it's written in .NET, you can use it with any .NET based language/development tool. The same DLL works for both 32 bit and 64 bit environments; • Easy to use Programming Interface EO.WebBrowser offers core components that can be used in any Windows application, as well as wrapper controls for both Windows Forms applications and WPF applications; • Extensive Customization Options EO.WebBrowser offers extensive customization options that allow you to customize context menu, hot keys, JavaScript dialogs, file dialogs, focus and window control. Together these features allow you to seamlessly integrate the browser engine into your application; • .NET code -> JavaScript code Turn any web page into an integral part of your application -- both visually and programmatically. You can execute JavaScript code and access all the JavaScript objects directly from your .NET code. Access their properties or even call a JavaScript function are all different options available to you; • JavaScript code -> .NET code Things always go both ways --- and this is reflected in our programming interface as well. You can call JavaScript code from .NET code, and the other way around is also true --- you can call .NET code from your JavaScript code. This allows your Web page to seamlessly interact with the host application; • Custom Resource Handler Want to keep an eye on everything? Or want to keep everything to yourself? We got you covered. EO.WebBrowser offers ability to intercept and modify all requests that originate from the browser engine. For example, you can automatically deny all request sent to a specific host. It also offers you the ability to implement custom protocols or custom resource handlers. For example, you can implement a custom request handler to load images from your database instead of a Web server; 立即下载

相关推荐

CANoe基础讲解01:从零开始使用CANoe轻松搭建你的第一个CAN网络

本文是一篇CANoe软件入门实操指南,逐步演示了如何从零创建并运行一个CAN FD仿真工程。内容包括:启动软件、配置硬件通道与网络、加载DBC数据库、使用CAPL编写仿真节点发送CAN报文,最终启动测量并在Trace窗口中查看通信结果。通过七个清晰步骤,帮助初学者快速掌握CANoe基本操作,完成首个可运行的仿真网络搭建

车载网络小D的博客 1571

【C#】WinForm 之 SQL Server 服务监控器(避免开机启动服务)

由于刚刚开始写博客加上最近人又懒,很多过去的项目都没时间去整理,先把以前写过的一个小工具发上来吧。 关于MS-SQL服务优化 安装过MS-SQL Server的人应该知道,系统会因此多出4、5项新的服务 SQL Active Directory Helper 服务 SQL Server (SQLEXPRESS) 这个是Visual Studio自带...

dianwu9730的博客 262

R语言clusterProfiler实战:GO与KEGG富集分析从入门到精通

本文提供了一份详尽的R语言clusterProfiler实战指南,从环境配置、数据导入、基因ID转换到GO与KEGG富集分析及可视化,手把手教你解读生物学意义。文章重点介绍了如何利用clusterProfiler这一强大工具,将差异基因列表转化为清晰的生物学通路与功能故事,并分享了结果解读、可视化以及处理非模式生物等进阶技巧与避坑指南。

weixin_29044713的博客 162

对于c#软件或者服务程序 内存占用多的解决方案

对于内存泄露的状况不在本文讨论的范围之内  你需要检测程序代码是否有内存泄露,本文针对大型软件内存没有泄露时的软件内存占用大的情况 c#和其他语言有所区别,它是一门很占资源的语言,速度慢,占内存。一个普通的winform程序内存占到50兆以上是很平常的事,但是c#的优点也让它称为现在的热门 C#优点:开发速度快,简单,开发难度低,产品维护和升级相对容易。相比(C/C++)语言,开发者较容易掌

边缘星.net专栏 2295

WPS JS宏实战:批量调整200个Word表格格式的避坑指南(附完整代码)

本文提供了一份详尽的WPS JS宏实战指南,针对批量调整大量Word表格格式的需求。文章深入解析了如何利用JS宏自动化设置字体、行距和边框,并重点解决了常见的“首行访问报错”等核心难题,附有可直接使用的完整代码,帮助用户显著提升文档处理效率。

weixin_29280219的博客 429

R | 提取文件夹内栅格数据的最小值、最大值、标准差和平均值

各位同学好,我们长需要用长时间序列栅格数据的平均值做变量的时间变化分析,用代码能够帮助我们省下很多时间。

qq_48539301的博客 449

SetProcessWorkingSetSize减少内存占用

[DllImport("kernel32.dll", EntryPoint = "SetProcessWorkingSetSize")] public static extern int SetProcessWorkingSetSize(IntPtr process, int minSize, int maxSize); /// /// 释放内存 /// public static void

迪克程序 1891

动态数据脱敏技术分析

在当前国内信息安全热潮中,数据脱敏作为数据安全的重要一环得到了业界的认可与重视。早在2012年,数据脱敏首次作为一个单独的魔力象限由Gartner发布,Gartner在2014年又提出了:按照数据使用场景,将数据脱敏分为静态数据脱敏(Static data masking-SDM )与动态数据脱敏(Dynamic data masking-DDM )。 可能有人望文生义,认为动态数据脱敏一定比静态数据脱敏高级。非也非也,静态or动态,取决于脱敏的使用场景,主要是以使用场景为由来选择合适的数据脱敏的模式。 本

美创科技的博客 4666

内存优化软件使用的是一种手段

继续上一篇的解释: -------------------------------- 一个空白WinForm在任务管理器中都占用几十兆内存,的确有点可怕!通常有3种方法:                  1. 不要管他。  CLR &amp; GC 会自动管理内存占用,根据当前环境参数自动调整,这样会得到一个最佳化的运行效率。 2. 设置托管程序进程允许的最大工作集大小。   1...

Zaki 165

基于STM32L4XX、HAL库的GC9307 TFT 液晶驱动IC驱动程序设计

GC9307是一款常用的TFT液晶驱动IC,支持240x320分辨率的RGB接口显示屏。(Master Out Slave In): 连接到STM32L4的SPI数据输出引脚(如PA7)(Serial Clock): 连接到STM32L4的SPI时钟引脚(如PA5)(Data/Command): 连接到STM32L4的GPIO引脚(如PA3)(Chip Select): 连接到STM32L4的GPIO引脚(如PA4)(Reset): 连接到STM32L4的GPIO引脚(如PA2): 分别连接到电源和地。

zhusl6688的博客 1033

【重识云原生】第四章云网络4.7.5节vDPA方案——virtio的半硬件虚拟化实现

vDPA(vhost Data Path Acceleration)即是让virtio数据平面不需主机干预的解决方案。该框架由Redhat提出,实现了virtio数据平面的硬件卸载。控制平面仍然采用原来的控制平面协议,当控制信息被传递到硬件中,硬件完成数据平面的配置之后,数据通信过程由硬件设备(智能网卡)完成,虚拟机与网卡之间直通。中断信息也由网卡直接发送至虚拟机不需要主机的干预。......

junbaozi的专栏 2188

QTP .net插件

<br />       QTP默认安装完后支持ActiveX、Visual Basic、Web三种类型,对.net不支持,录了半天一个控件都没有识别出来,查了下才发现如果要对.net支持就要安装插件,在网上搜了好久都搜不到,后来直接到官网上寻找下载了一个<br />    <br />    大家可以到惠普下载中心https://h10078.www1.hp.com/cda/hpdc/display/main/index.jsp?zn=bto&cp=54_4012_100__,在keywords中输入 "

casilin的专栏 5139

【YOLOv11多模态涨点改进】独家创新首发| TGRS 2026 |引入 CIFusion 通道交互融合模块,通过跨特征交互机制强化目标区域响应,适合多模态融合目标检测,小目标检测高效涨点

🔥本文提出了一种改进YOLOv11多模态目标检测模型的方法,通过引入CIFusion通道交互融合模块来提升RGB与红外特征融合效果。CIF模块采用通道级自适应交互机制,根据全局上下文动态分配不同模态通道的重要性,实现跨模态特征交互与互补信息融合。相比传统拼接或加权融合方式,CIF能够增强目标区域响应,抑制背景噪声,提高小目标和低对比度目标的检测性能。实验表明,该方法在DroneVehicle等数据集上显著提升了检测精度。论文还详细介绍了CIF模块的结构原理、实现代码及模型配置方法。

Ai缝合怪、助力小伙伴高效发论文 186

Prise.NET 插件框架使用教程

Prise.NET 插件框架使用教程 1. 项目介绍 Prise 是一个用于 .NET (Core) 应用程序的插件框架,由 .NET (Core) 编写。其主要目标是帮助开发者以最小的努力编写解耦的代码,同时最大化定制性和向后兼容性。Prise 支持从外部程序集加载插件,旨在解耦本地和远程依赖关系,并努力避免程序集不匹配问题。 2. 项目快速启动 2.1 安装 Prise 首先,通过 NuGet...

gitblog_00321的博客 952

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

SonarQube .NET 插件

SonarQube 是一个开源的代码质量管理平台,它提供了丰富的分析工具和技术,帮助开发者发现、管理并修复代码中的问题。其中,SonarQube .NET 插件是专门为 C# 和 VB.NET 开发者设计的一款插件。 ## 什么是 SonarQube .NET 插件? SonarQube .NET 插件是一个基于 SonarQube 平台的插件,能够对 C# 和 VB.NET 语言编写的软件进...

gitblog_00004的博客 576

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

如何用实现.NET的插件机制

.NET 提供的反射(Reflection)机制可以很方便的加载插件。本文提供一种方法,可以灵活的正确的载入所需的插件。在.NET中,一个完整的类型名称的格式如 "类型名, 程序集名"。例如:"System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyTok

冯钰 的专栏 1105

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

.NET Core中插件式开发实现

但是.NET Core 仅支持单个默认应用域,那么在.NET Core中如何实现【插件式】开发呢? 一、.NET Core 中 AssemblyLoadContext的使用  1、AssemblyLoadContext简介: 每个 .NET Core 应用程序均隐式使用 AssemblyLoadContext。 它是运行时的提供程序,用于定位和加载依赖项。 只要加载了依赖项,就会调用 AssemblyLoadContext 实例来定位该依赖项。 它提供定位、加载和缓存托管程序集和其他依赖项的服务。 为了支持

weixin_45032957的博客 1404

Paint.NET WebP 插件使用教程

Paint.NET WebP 插件使用教程 1. 项目介绍 Paint.NET WebP 插件是一个开源项目,它为 Paint.NET 图像编辑软件提供了加载和保存 WebP 格式图像的功能。WebP 是一种由 Google 开发的图像文件格式,它提供了比 JPEG 和 PNG 更高的压缩率,同时保持图像质量。该插件与 Paint.NET 4.2.5 及更高版本兼容,并且当插件版本高于内置版本时,...

gitblog_00213的博客 676

MPV.NET 播放器安装和添加插件脚本Bilibili弹幕

1.一些最新的视频和电影可能会没有弹幕,下载本地弹幕XML格式直接快捷键 “j”加载就行2.不能中文输入......复制粘贴可以。可能没配置好,知道的留言3.一般用来看番用的,一般视频的弹幕支持也不是很好,用MPV在线播放()会更好的sort=newMPV使用很麻烦,开箱用也有点....嗯嗯,但是杜比视界不会偏色和占用会小点,不过potplayer最新版也支持杜比视界了...

BigBirdKing的博客 7062

灵活正确的实现.NET插件机制

。NET 提供的反射(Reflection)机制可以很方便的加载插件。本文提供一种方法,可以灵活的正确的载入所需的插件。    在。NET中,一个完整的类型名称的格式如 "类型名, 程序集名".    例如:"System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral,

加行道 1346

Visual Studio插件开发――VB.NET-C# 语言转换插件

该文件根据你当时创建插件工程时的不同选项,会稍有不同,有了这个文件,部署就基本搞定了。按理来所,这里根本就不要这么写的,就用else 里面代码就可以了,但是在我前段时间的中文版的Visual Studio 2005 就有问题,因为简体中文是zh-CHS ,这样它加上"Edit "就是正确的了,zh-CHSEdit, 但我的却是"zh ",所以加上"Edit "后,就成了"zhEdit ",这样就定位不到正确的资源了,如果你不知道我在说什么,你看看CommandBar.resx 文件就明白了。

biyusr的专栏 858

VS.Net插件制作初级教程

VS.Net插件制作初级教程作者:东方蜘蛛 2002年5月      

沉默之狼的专栏 2253

开源项目推荐:.NET Core 插件框架

开源项目推荐:.NET Core 插件框架 在软件开发中,插件化架构为我们提供了高度的可扩展性和可维护性。今天,我要为大家推荐一个.NET Core下的插件框架——pluginfactory。它不仅实现了插件化开发与依赖注入的完美结合,还能与ASP.NET Core等框架无缝融合。以下是关于此项目的详细介绍。 项目介绍 pluginfactory是基于.NET Core的插件框架,它使用依赖注入实...

gitblog_00050的博客 1111

C# .Net写AutoCAD插件基础教程

本文介绍了在AutoCAD 2026环境中使用.NET 8开发CAD插件的基础知识。首先强调了版本匹配的重要性,提供了各版本AutoCAD对应的.NET框架要求。文章详细说明了开发环境配置,包括必要的AutoCAD程序集引用(如acmgd.dll等)和关键命名空间的使用。核心内容展示了插件开发的基本结构,通过实现IExtensionApplication接口创建主程序入口,并演示了命令方法的注册与调用方式。文中还分享了作者封装的部分实用功能代码,包括日志记录、错误处理等,为开发者提供了AutoCAD插件开发

小菜鸟的博客 2594
上一篇: 用代码创建UITabBarController
下一篇: 在.NET中如何取得代码行数
云瑀
博客等级 码龄17年 502粉丝 150原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值