随笔分类 -  C#

摘要:需要添加对System.Management.dll的引用 ,并且不要忘记导入下面的名称空间。 using System.Management; 将ListView和 ImageList控件从可视工具箱拖动到Winform。 将ListView控件的LargeImageList属性设置为ImageL 阅读全文
posted @ 2020-04-24 17:09 liessay 阅读(1126) 评论(0) 推荐(1)
摘要:这篇文章向您展示了如何在c#.net Windows窗体应用程序中创建一个等待窗体对话框。创建一个新表单,然后输入您的表单名称为frmWaitForm。接下来,将Label,Progress Bar控件从Visual Studio工具箱中拖到winform中,然后可以如下所示布置ui设计。 我们将使 阅读全文
posted @ 2020-04-24 15:42 liessay 阅读(2764) 评论(0) 推荐(1)
摘要:这篇文章向您展示了如何在c#.net Windows窗体应用程序中使用RSA算法对字符串进行加密和解密。RSA是由Ron Rivest,Adi Shamir和Leonard Adleman开发的非对称编码系统(其名称也是这三位作者的缩写)。它被广泛用于加密和电子签名技术。它通过使用公共密钥与所有人共 阅读全文
posted @ 2020-04-24 15:13 liessay 阅读(7382) 评论(0) 推荐(0)
摘要:Clear() 从 List<T> 中移除所有元素。 List<Employees> employees = new List<Employees>(); employees.Add(new Employees { Id = 1, Name = "Nancy.Davolio", City = "Se 阅读全文
posted @ 2020-04-24 12:47 liessay 阅读(11611) 评论(0) 推荐(2)
摘要:List集合查询数据 List<Employees> employees = new List<Employees>(); employees.Add(new Employees { Id = 1, Name = "Nancy.Davolio", City = "Seattle", BirthDat 阅读全文
posted @ 2020-04-24 11:08 liessay 阅读(33507) 评论(0) 推荐(1)
摘要:所有操作基于以下类 class Employees { public int Id { get; set; } public string Name { get; set; } public string City { get; set; } public DateTime BirthDate { 阅读全文
posted @ 2020-04-24 10:08 liessay 阅读(13923) 评论(0) 推荐(2)
摘要:所有操作基于以下类 class Employees { public int Id { get; set; } public string Name { get; set; } public string City { get; set; } public DateTime BirthDate { 阅读全文
posted @ 2020-04-24 09:26 liessay 阅读(2746) 评论(0) 推荐(1)
摘要:使用类库为 https://gitee.com/kuiyu/dotnetcodes/tree/master/DotNet.Utilities/%E6%B1%89%E5%AD%97%E8%BD%AC%E6%8B%BC%E9%9F%B3 取首字母 textBox2.Text = PinYin.GetCo 阅读全文
posted @ 2020-04-20 11:17 liessay 阅读(341) 评论(0) 推荐(0)
摘要:本教程说明如何在C#.NET Windows Forms Application中将图像转换为base64字符串,以及将base64字符串转换为图像。您可以创建一个新的Windows窗体应用程序项目来演示,然后从Visual Studio工具箱中将图片框,标签和按钮拖到Winform中,然后设计一个 阅读全文
posted @ 2020-04-20 10:58 liessay 阅读(4743) 评论(0) 推荐(0)
摘要:本演示说明了如何使用c#.net Windows Forms应用程序中的system.speech库将文本转换为语音。Microsoft .NET框架提供System.Speech.Synthesis进行语音合成。要播放演示,您可以将Visual Studio工具箱中的Label,Combobox, 阅读全文
posted @ 2020-04-20 10:32 liessay 阅读(836) 评论(0) 推荐(0)
摘要:private void button1_Click(object sender, EventArgs e) { //清除Series chart1.Series.Clear(); Random randon = new Random(); //添加第一个Series chart1.Series.A 阅读全文
posted @ 2020-04-17 18:42 liessay 阅读(483) 评论(0) 推荐(0)
摘要:显示分组面板 gridView1.OptionsView.ShowGroupPanel = true; 是否开启多选 gridView1.OptionsSelection.MultiSelect = true; 多选模式(开启多选生效),行选择、单元格选择,CheckBox选择 //单元格选择 gr 阅读全文
posted @ 2020-04-16 13:35 liessay 阅读(931) 评论(0) 推荐(0)
摘要:using System; using System.Data; using System.Windows.Forms; using DotNet.Utilities; namespace WindowsFormsApp1 { public partial class Form1 : Form { 阅读全文
posted @ 2020-04-16 12:48 liessay 阅读(746) 评论(0) 推荐(0)
摘要:Model层Region.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace WebApplication1.Models { public class R 阅读全文
posted @ 2020-01-15 22:01 liessay 阅读(918) 评论(0) 推荐(0)
摘要:拼接sql语句会造成sql注入,注入演示 namespace WindowsFormsApp1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_C 阅读全文
posted @ 2019-12-11 09:05 liessay 阅读(794) 评论(0) 推荐(0)
摘要:Form2 Form1 效果 阅读全文
posted @ 2019-12-10 08:35 liessay 阅读(241) 评论(0) 推荐(1)
摘要:View Controller 阅读全文
posted @ 2019-11-29 14:40 liessay 阅读(216) 评论(0) 推荐(0)
摘要:单条记录添加 第一种方式: public void AddRegion() { using(Northwind db = new Northwind()) { Region region = new Region(); region.RegionID = 5; region.RegionDescri 阅读全文
posted @ 2019-11-28 12:59 liessay 阅读(1442) 评论(0) 推荐(0)
摘要:右击项目——添加——新建项——数据(C#)——选择ADO.NET实体数据模型——点击添加——然后根据实体数据模型向导来一步步的做。 用到的表 1 using System; 2 using System.Data; 3 using System.Linq; 4 using System.Window 阅读全文
posted @ 2019-11-27 15:22 liessay 阅读(463) 评论(0) 推荐(0)
摘要:_Layout.cshtml 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta charset="utf-8" /> 阅读全文
posted @ 2019-11-26 13:30 liessay 阅读(263) 评论(0) 推荐(0)