资源简介
一个小型的.net画图程序的源代码,比较清楚,适合新手学习gdi使用。

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Text;
namespace PhotoSprite
{
///
/// 图像处理历史记录
///
public class HistoryImage
{
private int current = -1;
private string [] History;
private string initDirectory = ““;
private int max = 0;
private int count = 0;
private int save = -1;
///
/// 获取或设置初始化文件目录
///
public string InitDirectory
{
get
{
return initDirectory;
}
set
{
initDirectory = value;
}
}
///
/// 获取 bool 值,指示是否可以撤消
///
public bool CanUndo
{
get
{
if (current > 0)
return true;
else
return false;
}
}
///
/// 获取 bool 值,指示是否可以重复
///
public bool CanRedo
{
get
{
if (current < count - 1 && count != 0)
return true;
else
return false;
}
}
///
/// 获取 bool 值,指示图像是否已经修改过
///
public bool IsDirty
{
get
{
if (current != save)
return true;
else
return false;
}
}
///
/// 获取最大历史记录数
///
public int Max
{
get
{
return max;
}
}
///
/// 获取当前已记录的最大历史记录数
///
public int Count
{
get
{
return count;
}
}
///
/// 获取或设置当前图像文件
///
public int Current
{
get
{
return current;
}
set
{
current = value;
// 队列循环
if (current < 0)
{
if (count < max)
current = 0;
else
current = max - 1;
}
else if (current >= max)
{
current = 0;
count = max;
}
if (current >= count)
count = current + 1;
OnHistoryChanged();
}
}
///
/// 获取当前图像文件名
///
public string CurrentImage
{
get
{
if (current >= 0)
return History[current];
else
return ““;
}
}
///
/// 获取下一个图像文件名
///
public string NextImage
{
get
{
int next = (current + 1) % max;
return History[next];
}
}
///
/// 建立历史记录类
///
/// 初始化文件目录
/// 统计次数
public HistoryImage(string initDirectory int max)
{
this.initDirectory = initDirectory;
this.max = max;
History = new string[max];
for (int i = 0; i < max; i++)
{
History
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 258560 2017-12-22 17:46 PhotoSprite\.vs\PhotoSprite\v14\.suo
文件 4312 2002-01-01 09:48 PhotoSprite\Backup\ColorSpace\CMYK.cs
文件 4407 2002-01-01 09:48 PhotoSprite\Backup\ColorSpace\HSI.cs
文件 5357 2002-01-01 09:48 PhotoSprite\Backup\ColorSpace\HSL.cs
文件 6106 2002-01-01 09:48 PhotoSprite\Backup\ColorSpace\HSV.cs
文件 4258 2002-01-01 09:48 PhotoSprite\Backup\ColorSpace\YUV.cs
文件 4152 2002-01-01 09:48 PhotoSprite\Backup\Dialog\AboutBox.cs
文件 9219 2002-01-01 09:48 PhotoSprite\Backup\Dialog\AboutBox.Designer.cs
文件 5814 2002-01-01 09:48 PhotoSprite\Backup\Dialog\AboutBox.resx
文件 3623 2002-01-01 09:48 PhotoSprite\Backup\Dialog\AdvancedDialog.cs
文件 5625 2002-01-01 09:48 PhotoSprite\Backup\Dialog\AdvancedDialog.Designer.cs
文件 6219 2002-01-01 09:48 PhotoSprite\Backup\Dialog\AdvancedDialog.resx
文件 3637 2002-01-01 09:48 PhotoSprite\Backup\Dialog\AngleDialog.cs
文件 5038 2002-01-01 09:48 PhotoSprite\Backup\Dialog\AngleDialog.Designer.cs
文件 5814 2002-01-01 09:48 PhotoSprite\Backup\Dialog\AngleDialog.resx
文件 749 2002-01-01 09:48 PhotoSprite\Backup\Dialog\ArtStringDialog.cs
文件 7232 2002-01-01 09:48 PhotoSprite\Backup\Dialog\ArtStringDialog.Designer.cs
文件 5814 2002-01-01 09:48 PhotoSprite\Backup\Dialog\ArtStringDialog.resx
文件 2425 2002-01-01 09:48 PhotoSprite\Backup\Dialog\ColorBalanceDialog.cs
文件 10212 2002-01-01 09:48 PhotoSprite\Backup\Dialog\ColorBalanceDialog.Designer.cs
文件 5814 2002-01-01 09:48 PhotoSprite\Backup\Dialog\ColorBalanceDialog.resx
文件 9995 2002-01-01 09:48 PhotoSprite\Backup\Dialog\ColorPickerDialog.cs
文件 19670 2002-01-01 09:48 PhotoSprite\Backup\Dialog\ColorPickerDialog.Designer.cs
文件 5814 2002-01-01 09:48 PhotoSprite\Backup\Dialog\ColorPickerDialog.resx
文件 8618 2002-01-01 09:48 PhotoSprite\Backup\Dialog\CustomDialog.cs
文件 16680 2002-01-01 09:48 PhotoSprite\Backup\Dialog\CustomDialog.Designer.cs
文件 6219 2002-01-01 09:48 PhotoSprite\Backup\Dialog\CustomDialog.resx
文件 6795 2002-01-01 09:48 PhotoSprite\Backup\Dialog\DegreeDialog.cs
文件 5284 2002-01-01 09:48 PhotoSprite\Backup\Dialog\DegreeDialog.Designer.cs
文件 5814 2002-01-01 09:48 PhotoSprite\Backup\Dialog\DegreeDialog.resx
............此处省略454个文件信息
相关资源
- USB.Over.Network.Server 注册机
- WPF USB 网络 串口 通信软件
- dotnet 写字板 实验 源代码 不好请要不
- B/S 网上订餐系统
- .net面试简历内容非常细致
- 教室管理系统.rar
- 小鸡快跑游戏.
- .net网站服装销售系统(MVC)
-
分别适用于.NET fr
amework 2.0和4.0的E - 汽车租赁系统............................
-
安装 .net fr
amework 4.0失败原因是KB9 - 德卡D8读写器关于读写感应卡的一些代
- halcon 测量助手
- 图片存储到数据库保存二进制文件并
- vs2005骑士巡游问题-分治法C
- 用Socket写的简易FTP服务器和客户端
- 企业销售管理信息系统(全套)
- 串口操作类(justinio)
- 基于Petri网的工作流(完整的原创源代
- 选择题自动考试系统
- 多线程实例:桌面智能弹球小游戏
- EXCEL文件转换成固定的格式的文本格式
- .net计件工资管理程序 啊
- powerdatagrid控件 源码
- SunnyUI.Net
- .NET WinForm 和 WPF 的UI界面库,收集整合
- Oxford Industries 采用 Microsoft.NET 平台实
- ssk皮肤
- dotnetfx_cleanup_tool .NET删除工具
- 土地信息管理系统
评论
共有 条评论