资源简介
C# 高仿 Windows 画图板,实现图片的打开/保存/文字绘制/矩形/圆形/椭圆形/圆角矩形/画刷/画笔/喷枪/曲线/取色等功能。
代码片段和文件信息
#region Using directives
using System;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;
using System.Globalization;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using Microsoft.Win32;
using System.Security;
#endregion
// Using: in the end of this file.
namespace DocToolkit
{
#region Class DocManager
///
/// Document manager. Makes file-related operations:
/// open new save updating of the form title
/// registering of file type for Windows Shell.
/// Built using the article:
/// Creating Document-Centric Applications in Windows Forms
/// by Chris Sells
/// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms09182003.asp
///
public class DocManager
{
#region Events
public event SaveEventHandler SaveEvent;
public event LoadEventHandler LoadEvent;
public event OpenFileEventHandler OpenEvent;
public event EventHandler ClearEvent;
public event EventHandler DocChangedEvent;
#endregion
#region Members
private string fileName = ““;
private bool dirty = false;
private Form frmOwner;
private string newDocName;
private string fileDlgFilter;
private string registryPath;
private bool updatetitle;
private const string registryValue = “Path“;
private string fileDlgInitDir = ““; // file dialog initial directory
#endregion
#region Enum
///
/// Enumeration used for Save function
///
public enum SaveType
{
Save
SaveAs
}
#endregion
#region Constructor
///
/// Initialization
///
///
public DocManager(DocManagerData data)
{
frmOwner = data.FormOwner;
frmOwner.Closing += OnClosing;
updatetitle = data.Updatetitle;
newDocName = data.NewDocName;
fileDlgFilter = data.FileDialogFilter;
registryPath = data.RegistryPath;
if (!registryPath.EndsWith(“\\“))
registryPath += “\\“;
registryPath += “FileDir“;
// attempt to read initial directory from registry
RegistryKey key = Registry.CurrentUser.OpenSubKey(registryPath);
if (key != null)
{
string s = (string)key.GetValue(registryValue);
if (!Empty(s))
fileDlgInitDir = s;
}
}
#endregion
#region Public functions and Properties
///
/// Dirty property (true when document has unsaved changes).
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\.vs\
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\.vs\DrawToolsRedux\
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\.vs\DrawToolsRedux\v14\
文件 86528 2018-10-17 10:44 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\.vs\DrawToolsRedux\v14\.suo
文件 13321 2010-06-23 11:11 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\Article.htm
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\
文件 28000 2007-01-12 17:46 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\DocManager.cs
文件 3970 2010-05-10 11:52 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\DocToolkit.csproj
文件 452 2010-05-10 11:52 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\DocToolkit.csproj.user
文件 3941 2007-01-12 17:50 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\DragDropManager.cs
文件 16590 2007-01-12 17:47 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\MruManager.cs
文件 6401 2007-01-12 17:52 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\PersistWindowState.cs
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\Properties\
文件 1393 2007-01-12 17:44 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\Properties\AssemblyInfo.cs
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\bin\
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\bin\Release\
文件 19968 2018-10-17 10:34 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\bin\Release\DocToolkit.dll
文件 44544 2018-10-17 10:34 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\bin\Release\DocToolkit.pdb
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\obj\
目录 0 2018-10-17 10:34 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\obj\Release\
文件 6043 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\obj\Release\DesignTimeResolveAssemblyReferencesInput.cache
文件 1216 2018-10-17 10:34 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\obj\Release\DocToolkit.csproj.FileListAbsolute.txt
文件 1225 2018-10-17 10:34 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\obj\Release\DocToolkit.csprojResolveAssemblyReference.cache
文件 19968 2018-10-17 10:34 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\obj\Release\DocToolkit.dll
文件 44544 2018-10-17 10:34 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\obj\Release\DocToolkit.pdb
目录 0 2018-10-17 10:57 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DocToolkit\obj\Release\TempPE\
目录 0 2018-10-17 10:33 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DrawToolsRedux\
文件 855 2007-05-29 21:53 DrawToolsRedux-Source\DrawToolsRedux-Source\DrawToolsRedux\DrawToolsRedux\Command.cs
............此处省略153个文件信息
相关资源
- C#单机版考试系统(管理员和学生入口
- C# 视频会议系统
- C# WPF读取任意类型Excel文件(20032007
- 微信支付扫码支付asp.net C#版
- 进销存管理系统+C#源代码
- C# 设计模式 CHM完整版 + C# 设计模式
- c#调用Oracle UDT自定义结构数组类型源
- C#开发的一款百宝箱
- C#开发无人机地面站
- 学生信息管理系统C#winformSQLServer
- fiddlercoreCapture.zip 用 .NET C# 实现 HTTP
- c#HL7通讯测试解析.zip
- 安卓QQ5.8协议 C#版本
- C#仿QQ软件源码
- ArcEngine+C#基本功能很全的代码
- 个人理财系统c#+sql
- 药品管理系统c#编写的
- C# ASP.NET 实战项目源代码 AJAX校内数码
- 《Visual C# + Oracle数据库系统开发全程
- C# winform 播放与录制视频源码
- c# DEV Winform 框架
- WPF开发教程 ----WPF C# 编程 界面开发(
- ASP.NET+C#+SQL校园新闻发布系统
- c# winform twain文件扫描并保存成图片
- ArcEngine 10.0 C#二次开发最新最全帮助文
- 基于C#、SQL学生选课管理系统
- 数据结构(C#语言描述-陈广-PPT及教材
- C#小区物业管理系完整源码
- C#图书管理系统源码20131205
- Windows Runtime via C#
评论
共有 条评论