-
C# 使用代码查找资源词典中的资源
C# 使用代码查找资源词典中的资源,单击按钮,窗体中会出现一张图片,没搞懂本示例是想要演示什么功能,有兴趣的自己下载源码查看。这里帖一下几行关键代码:
private void button1_Click(object sender, RoutedEventArgs e)
{//使用代码查找资源词典中的资源
Image MyImage = (Image)this.FindResource("MyImage");
this.image1.Source = MyImage.Source;
}
- 2022-09-07 18:30:03下载
- 积分:1
-
7Zip
This file is part of SevenZipSharp. SevenZipSharp is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SevenZipSharp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with SevenZipSharp. If not, see .
- 2022-07-20 00:09:31下载
- 积分:1
-
C# 验证码图像生成类
C# 验证码图像生成类,这个图像验证码生成类中可根据RGB,计算验证码图片的灰度值,去图形边框,灰度转换,逐行方式,得到有效图形并调整为可平均分割的大小,得到有效图形,图形为类变量,得到有效图形,图形由外面传入,返回灰度图片的点阵描述字串,1表示灰点,0表示背景,小平和垂直方向上的平均分割图片等。本验证码图片可用到WEB中,也可用到WinForm程序中。
- 2022-03-09 22:25:52下载
- 积分:1
-
C# 使用Graphics对象在程序运行时创建位图
C# 在程序运行时创建位图,本源码实例主要是学习使用使用Graphics对象创建简单图像的例子,本程序将生成一条曲线图像,参照如下代码:
{//在程序运行时创建位图
int MyWidth=this.pictureBox1.Width;
int MyHeight=this.pictureBox1.Height;
Bitmap MyBitmap = new Bitmap(MyWidth,MyHeight);
Graphics MyGraphics = Graphics.FromImage(MyBitmap);
Pen MyPen = new Pen(Color.Black, 3);
Point[] MyPoints = { new Point(50, 100), new Point(100, 10), new Point(150, 290), new Point(200, 100), new Point(250, 10), new Point(300, 290), new Point(350, 100) };
MyGraphics.Clear(Color.White);
MyGraphics.DrawBeziers(MyPen, MyPoints);
pictureBox1.Image = MyBitmap;
- 2022-03-25 22:38:21下载
- 积分:1
-
C# 以浮雕效果显示图片
Visual C# 以浮雕效果显示图像控件中的图像,private void Window_Loaded(object sender, RoutedEventArgs e)
{//以浮雕效果显示图像控件中的图像
var MyEmbossBitmapEffect = new System.Windows.Media.Effects.EmbossBitmapEffect();
MyEmbossBitmapEffect.LightAngle = 320;
MyEmbossBitmapEffect.Relief = 0.8;
this.image1.BitmapEffect = MyEmbossBitmapEffect;
}
- 2022-05-23 11:20:57下载
- 积分:1
-
activeMQ C++源码
activeMQ C++源码 ,C++写的源代码,网上找到的,分享给大家。
- 2022-09-14 21:05:04下载
- 积分:1
-
C# LINQ 销售单查询实例
C# 使用LINQ进行销售单查询实例,可关联销售单列表和销售商品列表 ,包括了销售单号 = b.SaleBillCode, 销售日期 = b.SaleDate,销售员 = b.SaleMan, 商品名称 = p.ProductName,数量 = p.Quantity,单价 = p.Price,金额,代码中同时自定义了销售单据类和销售商品类,用以完成对应功能,在代码编写时定义了LINQJoin类,这些方法和函数都在LINQJoin类中。
- 2022-05-23 08:43:26下载
- 积分:1
-
Visual C#多线程下载网络文件实例
C# 下载文件,使用多线程下载,只是简单的多线程下载的示例,并不支持断点续传,这里重点是演示将多线程技术应用到网络下载程序中。在代码中定义了一个函数,方便程序调用,此函数可实现输入下载文件地址和下载后的存储地址,立即下载文件,很方便。
- 2022-01-25 16:16:53下载
- 积分:1
-
C# 创建反射(控制台程序)
C# 创建反射的一个例子,是一个控制台程序,运行时,请先运行cmd命令,打开命令提示符控制台,然后此Debug中的exe文件拖放至cmd窗口中,按下回画键,即可看到创建反射的过程,基于以下代码来实现:
Console.WriteLine ("
Reflection.MemberInfo");
// 取得 Type 和 MemberInfo.
Type MyType =Type.GetType("System.IO.File");
MemberInfo[] Mymemberinfoarray = MyType.GetMembers();
// 取得并显示 DeclaringType 方法
Console.WriteLine("
有 {0} 个成员在 {1} 中.",
Mymemberinfoarray.Length, MyType.FullName);
Console.WriteLine("{0}.", MyType.FullName);
if (MyType.IsPublic)
{
Console.WriteLine("{0} 是共有的(public).", MyType.FullName);
}
- 2022-05-22 18:36:15下载
- 积分:1
-
C# 使用Graphics对象的DrawRectangle方法绘制粗边框图形
C# 使用Graphics对象的DrawRectangle方法绘制粗边框图形,可以方便的自定义图形的边框大小,如示例截图所示的效果,具体的代码编写方法为:
private void button1_Click(object sender, EventArgs e)
{
Graphics graphics = this.CreateGraphics();//声明一个Graphics对象
Pen myPen = new Pen(Color.Black, 8);//实例化Pen类
//调用Graphics对象的DrawRectangle方法
graphics.DrawRectangle(myPen, 10, 10, 150, 100);
}
- 2022-03-24 16:40:35下载
- 积分:1