s
o
u
l
s
j
i
e

随笔分类 -  C#

摘要:文本是使用SunnyUI的UIDataGridView控件进行演示的,同样适用于System.Windows.Forms.DataGridView控件 具体需求如下,下表是个成绩表,其中姓名、总分、平均分这三列信息重复,需要对数据表进行合并单元格处理。 实现该需求需要两个步骤: 1.给表格添加单元格 阅读全文
posted @ 2024-07-10 10:54 soulsjie 阅读(1279) 评论(1) 推荐(0) 编辑
摘要:命名空间:System.Drawing.Drawing2D.HatchBrush 在创建笔刷时,需要传入参数 1.阴影样式HatchStyle 2.前景色 3.背景色 Brush brs1 = new HatchBrush(参数1,参数2, 参数3); 参数1中HatchStyle为枚举值,且枚举很 阅读全文
posted @ 2023-07-12 15:55 soulsjie 阅读(555) 评论(0) 推荐(0) 编辑
摘要:1.运行ConfuserEx.exe 2.选择要加密的exe文件 例如:我们要加密混淆测试.exe时可以参照如下操作: 点击“+”: 选择要加密的exe文件,点击“打开” 点击打开后,会自动带出软件所在的目录,和输出目录,ConfUsed文件夹为混淆成功后之后新的exe的输出目录: 3.加密配置 S 阅读全文
posted @ 2023-07-07 14:55 soulsjie 阅读(3652) 评论(0) 推荐(0) 编辑
摘要:在word模板中定义字符串,如“{图片1}”,用于定位图片插入的位置。原理:遍历所有段落,在指定位置插入图片,再将定位字符串替换为空 NodeCollection paragraphs = doc.GetChildNodes(NodeType.Paragraph, true); foreach (P 阅读全文
posted @ 2023-05-24 09:48 soulsjie 阅读(2699) 评论(0) 推荐(0) 编辑
摘要:/// <summary> /// 键值对 /// </summary> public class Kv { /// <summary> /// 键 /// </summary> public string Key { get; set; } /// <summary> /// 值 /// </su 阅读全文
posted @ 2023-05-24 09:35 soulsjie 阅读(206) 评论(0) 推荐(0) 编辑
摘要:一、将所有控件上的值导出到文件 1.使用递归遍历窗体上所有的TextBox和ComBox,将控件名称和控件的值存入List 实体类Result.cs /// <summary> /// 结果数据 /// </summary> public class Result { /// <summary> / 阅读全文
posted @ 2023-02-23 11:10 soulsjie 阅读(508) 评论(0) 推荐(0) 编辑
摘要:描述:在项目资源中有个dll文件“资源名称.dll”,需要在程序运行后将“资源名称.dll”下载到D盘temp文件夹下 byte[] fileArr = Properties.Resources.资源名称; FileStream outputFile = new FileStream(@"D://t 阅读全文
posted @ 2022-12-12 10:35 soulsjie 阅读(129) 评论(0) 推荐(0) 编辑
摘要:using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MyMS { / 阅读全文
posted @ 2022-12-08 14:24 soulsjie 阅读(343) 评论(0) 推荐(0) 编辑
摘要:public class SqlConnHelp { /// <summary> /// SqlServer连接串 /// </summary> public static readonly string SqlServerConStr = "Data Source=localhost;Initia 阅读全文
posted @ 2022-07-04 11:55 soulsjie 阅读(1407) 评论(0) 推荐(0) 编辑
摘要:命名空间:System.Collections.Generic; //创建字典 Dictionary<int, string> nameDic = new Dictionary<int, string>(); //1.Add(TKey key, TValue value)-往字典中追加元素 name 阅读全文
posted @ 2022-06-29 11:26 soulsjie 阅读(456) 评论(0) 推荐(0) 编辑
摘要:背景 目前公司开发的程序为C/S模式(客户端+服务器)的方式开发,但是在实际的应用过程中需要开放一些web服务去给三方使用,比如:和微信公众号对接。对接需要按WebApi的形式去提供给外部系统,这样就会导致需要基于业务数据重新开发WebApi的服务,并将原有的C/S业务方法开放接口,供WebApi调 阅读全文
posted @ 2022-06-28 12:41 soulsjie 阅读(537) 评论(0) 推荐(0) 编辑
摘要:C#绘制折线图或曲线图,直接返回Image对象或图片文件 最终效果: 使用System.Drawing.Graphics绘制。 知识点: 1.使用Graphics图形填充 2.使用Graphics绘制点 3.使用Graphics绘制线 4.使用Graphics绘文本 封装后CharUtils的属性和 阅读全文
posted @ 2021-08-06 17:29 soulsjie 阅读(1493) 评论(0) 推荐(0) 编辑
摘要:C#反射+继承+接口的应用 创建一个接口类 创建一个动物Animal的接口,接口方法为Call,方法内容为让某个动物叫。 using System; using System.Collections.Generic; using System.Linq; using System.Text; usi 阅读全文
posted @ 2021-07-22 11:41 soulsjie 阅读(659) 评论(0) 推荐(0) 编辑
摘要:using System; namespace _02EnumDemo { class Program { //不带Key的申明,key自动按0递增 enum Days { Sun, Mon, tue, Wed, thu, Fri, Sat }; //指定Name和Key申明枚举 enum Book 阅读全文
posted @ 2021-06-30 11:36 soulsjie 阅读(121) 评论(0) 推荐(0) 编辑
摘要:using System; /// <summary> /// 结构体与类 /// </summary> namespace StructAndClass { class Program { //结构的特点 //1.结构可带有方法、字段、索引、属性、运算符方法和事件。 //2.结构可定义构造函数,但 阅读全文
posted @ 2021-06-30 11:09 soulsjie 阅读(181) 评论(0) 推荐(0) 编辑
摘要:导出手机微信数据库 首先要做的第一步就是将手机端的微信数据库.db文件导出到电脑上。 小米手机 小米的话做法很简单,不需要进行root。 1. 首先进入手机的设置-更多设置-备份和重置-本地备份,输入密码,点击新建备份,把两个勾去掉,点击软件程序右边的尖括号,选择微信,点击确定,点击开始备份,等待完 阅读全文
posted @ 2021-02-01 17:17 soulsjie 阅读(1953) 评论(1) 推荐(0) 编辑
摘要:1.统计一个字符串在字符串中出现的次数 例如:查找“this”在目标字符串中出现的次数 string a = "thisismythis"; int count1 = (a.Length - a.Replace("this", "").Length) / "this".Length; 结果为:2 2 阅读全文
posted @ 2020-12-09 14:24 soulsjie 阅读(281) 评论(0) 推荐(0) 编辑

你累吗?累就对了,当你觉得累时证明你在走上坡路!-----NotFoundObject - 2016-12-14 08:43
点击右上角即可分享
微信分享提示