资源简介
鼠标实现类似CAD中的绘制功能,实现移动,拖拽锚点进行变形,并可以实现边线着色、线粗选择,面向对象的思想
代码片段和文件信息
#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 2007-01-21 21:27 DrawTools2005\
目录 0 2007-01-21 21:27 DrawTools2005\DocToolkit\
文件 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
目录 0 2007-01-21 21:26 DrawTools2005\DocToolkit\Properties\
文件 1393 2007-01-12 16:44 DrawTools2005\DocToolkit\Properties\AssemblyInfo.cs
目录 0 2007-01-21 21:27 DrawTools2005\DrawTools\
文件 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
目录 0 2007-01-21 21:26 DrawTools2005\DrawTools\Images\
............此处省略43个文件信息
- 上一篇:Tomasulo算法详细过程演示
- 下一篇:DDS verilog程序
相关资源
- AUTO CAD绘制电气图的
- cad统计单行文字
- CAD工具箱5.2.VLX
- cad200864位缩图文件.rar
- 基于pscad的微型燃气轮机
- 批量提取CAD中多段线各节点坐标并导
- CAD数字递增
- CAD线型文件
- 人脸识别需要的haarcascade_frontalface_d
- STM32F10x 系列ORCAD 原理图库
- 配筋校核插件
- 统计多个区域的面积和周长并输出到
- CAD2014破解文件
- CAD曲线转多段线测绘插件.rar
-
从fr
amework4.5里摘出来的ZipFile功能需 - ARX实现屏幕菜单(CAdUiPaletteSet)
- CAD图纸自动提取所有圆形坐标,并自
- [深入浅出AutoCAD.NET二次开发].李冠亿
- .NET加壳工具sixxpack2
- 过电压在pscad中仿真模型
- 排序算法过程演示程序源码
- .net 一般处理程序的增删改程序
- Lucene.Net实现全文搜索
- Buckboost变换器PSCAD模型
- ajax实现完美传值
- CAD图框 模板
- pscadS变换行波测距
- https://download.csdn.net/download/p_xiaojia/9
- 工艺流程CAD图.dwg
- 测量MOS电容的伏容特性曲线
评论
共有 条评论