资源简介
C#开发cad画图软件 GDI+
支持拾取
支持撤销
很好的gdi+图形示例
代码片段和文件信息
#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).
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 28000 2007-01-12 16:46 DrawTools2005\DocToolkit\DocManager.cs
文件 2191 2007-01-12 16:52 DrawTools2005\DocToolkit\DocToolkit.csproj
文件 3941 2007-01-12 16:50 DrawTools2005\DocToolkit\DragDropManager.cs
文件 16590 2007-01-12 16:47 DrawTools2005\DocToolkit\MruManager.cs
文件 6401 2007-01-12 16:52 DrawTools2005\DocToolkit\PersistWindowState.cs
文件 1393 2007-01-12 16:44 DrawTools2005\DocToolkit\Properties\AssemblyInfo.cs
文件 904 2007-01-20 20:50 DrawTools2005\DrawTools\Command.cs
文件 766 2007-01-13 19:21 DrawTools2005\DrawTools\CommandAdd.cs
文件 2399 2007-01-16 21:48 DrawTools2005\DrawTools\CommandChangeState.cs
文件 1700 2007-01-16 21:32 DrawTools2005\DrawTools\CommandDelete.cs
文件 1245 2007-01-16 21:32 DrawTools2005\DrawTools\CommandDeleteAll.cs
文件 10149 2007-01-20 09:31 DrawTools2005\DrawTools\DrawArea.cs
文件 1761 2007-01-13 17:36 DrawTools2005\DrawTools\DrawArea.Designer.cs
文件 5814 2007-01-13 10:26 DrawTools2005\DrawTools\DrawArea.resx
文件 1033 2007-01-14 20:22 DrawTools2005\DrawTools\DrawEllipse.cs
文件 7237 2007-01-14 20:22 DrawTools2005\DrawTools\DrawLine.cs
文件 9054 2007-01-14 21:08 DrawTools2005\DrawTools\Drawob
文件 6625 2007-01-14 20:21 DrawTools2005\DrawTools\DrawPolygon.cs
文件 10248 2007-01-14 20:22 DrawTools2005\DrawTools\DrawRectangle.cs
文件 5716 2007-01-16 21:32 DrawTools2005\DrawTools\DrawTools.csproj
文件 326 2007-01-13 11:43 DrawTools2005\DrawTools\Ellipse.cur
文件 731 2007-01-13 17:37 DrawTools2005\DrawTools\FrmAbout.cs
文件 3134 2007-01-13 11:54 DrawTools2005\DrawTools\FrmAbout.Designer.cs
文件 7730 2007-01-13 11:54 DrawTools2005\DrawTools\FrmAbout.resx
文件 14088 2007-01-19 21:02 DrawTools2005\DrawTools\GraphicsList.cs
文件 916 2007-01-13 17:37 DrawTools2005\DrawTools\GraphicsProperties.cs
文件 382 2004-10-06 16:24 DrawTools2005\DrawTools\Images\about.bmp
文件 1078 2004-06-25 20:34 DrawTools2005\DrawTools\Images\App.ico
文件 382 2004-10-06 16:24 DrawTools2005\DrawTools\Images\ellipse.bmp
文件 326 2004-06-26 21:24 DrawTools2005\DrawTools\Images\Ellipse.cur
............此处省略47个文件信息
- 上一篇:C# CAD画图软件
- 下一篇:基于asp.net的停车场管理系统
相关资源
- C#流程图编程演示(用GDI+实现鼠标绘
- 基于C#的波形显示控件的实现源码
- 用VS2010做的绘图板C#
- C# 画图工具鼠标拖动方式
- C#用GDI+画图经典案例不下后悔
- c# 绘制3D可旋转旋转矩形
- C#中使用双缓冲以及BitBlt提高GDI+绘图
- _01_DllPrctise.zip
- C#中GDI+实现简单二维矢量图编辑器教
- 曲线生成算法的C#gdi+实现贝塞尔曲线
- C# GDI+实时动态曲线绘制
- c#GDI+画点最简单的处理方式
- c# GDI+ 实现类似画图板的效果,有画矩
- 基于GDI+的 图元绘制拾取 C#实现
- C# 编写的数字式电子时钟控件,颜色
- C#使用GDI+处理图片
- C#的GDI+绘制图形分层拖放操作源码
- C#实现二维矢量图编辑
- C#利用GDI+绘制旋转文字,矩形内可以
- GDI+鼠标绘制常规图形平衡缩放DEMO
- C# GDI+编程教程.pdf
- c# GDI+ 完整
- 三维投影Demo (使用GDI+绘制三维图形
- C#中基于GDI+(Graphics)图像处理工具(
- Flow C#通过GDI+实现流程图绘制
- GDIPlusCFCode GDI+for wince
- shiboqi 采用C#编程
- GDIDrawFlow C# GDI+ 开发的类Viso流程图用
- GDI绘图案例
- C# GDI+绘制雷达图
评论
共有 条评论