• 大小: 261KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-01
  • 语言: C#
  • 标签: C#流程图  

资源简介

Winform实现类似Viso的简单的流程图 拖拽进行画流程图 .netframework 2.0 c#

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Text;
using System.Windows.Forms;
namespace FlowPaintDemo
{
    public partial class frmMP_ProductionData_EventFlow:Form
    {
        #region 变量声明
        private Point mouse_offset;
        public delegate void GreetingDelegate();
        public string SelectNode = ““;
        public int operateType = 1;
        private int pointNo = 0;
        Bitmap cusorMap;
        UcFlowNode control1;
        UcFlowNode control2;
       
        bool IsControlMoving = false;
        public enum OperateType
        {
            Normal=1
            DrawNode=2
            DrawLine=3
        }
        public enum LineForward
        {
            R_L = 1
            L_R = 2
            U_D=3
            D_U
        }
        #endregion
        public frmMP_ProductionData_EventFlow()
        {
            InitializeComponent();
        }
 



        #region 绘制流程图方法
        public void SetCursor(Bitmap cursor Point hotPoint)
        {
            int hotX = hotPoint.X;
            int hotY = hotPoint.Y;
            Bitmap myNewCursor = new Bitmap(cursor.Width * 2 - hotX cursor.Height * 2 - hotY);
            Graphics g = Graphics.FromImage(myNewCursor);
            g.Clear(Color.FromArgb(0 0 0 0));
            g.DrawImage(cursor cursor.Width - hotX cursor.Height - hotY cursor.Width
            cursor.Height);

            this.Cursor = new Cursor(myNewCursor.GetHicon());

            g.Dispose();
            myNewCursor.Dispose();
        }
        /// 
        /// 注册MouseDown事件
        /// 

        /// 
        /// 
        protected void regMouseDownEvent(Control ctl MouseEventHandler del)
        {
            if (ctl.Controls.Count > 0)
            {
                foreach (Control item in ctl.Controls)
                {
                    item.MouseDown+=new MouseEventHandler(del);
                    regMouseDownEvent(item del);
                }
            }
        }
        /// 
        /// 注册MouseMove事件
        /// 

        /// 
        /// 
        protected void regMouseMoveEvent(Control ctl MouseEventHandler del)
        {
            if (ctl.Controls.Count > 0)
            {
                foreach (Control item in ctl.Controls)
                {
                    item.MouseMove += new MouseEventHandler(del);
                    regMouseMoveEvent(item del);
                }
            }
        }
        protected void regMouseUpEvent(Control ctl MouseEventHandler del)
        {
            if (ctl.Controls.Count > 0)
            {
                foreach (Control item in ctl.Controls)
                {
                    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-12-07 15:08  FlowPaintDemo\
     目录           0  2018-12-07 15:08  FlowPaintDemo\.vs\
     目录           0  2018-12-07 15:08  FlowPaintDemo\.vs\FlowPaintDemo\
     目录           0  2018-12-07 15:08  FlowPaintDemo\.vs\FlowPaintDemo\v15\
     文件       34304  2018-12-07 15:51  FlowPaintDemo\.vs\FlowPaintDemo\v15\.suo
     目录           0  2018-12-07 15:08  FlowPaintDemo\.vs\FlowPaintDemo\v15\Server\
     目录           0  2018-12-07 15:51  FlowPaintDemo\.vs\FlowPaintDemo\v15\Server\sqlite3\
     文件           0  2018-12-07 15:08  FlowPaintDemo\.vs\FlowPaintDemo\v15\Server\sqlite3\db.lock
     文件      495616  2018-12-07 15:51  FlowPaintDemo\.vs\FlowPaintDemo\v15\Server\sqlite3\storage.ide
     目录           0  2018-12-07 15:47  FlowPaintDemo\FlowPaintDemo\
     目录           0  2018-12-07 15:08  FlowPaintDemo\FlowPaintDemo\bin\
     目录           0  2018-12-07 15:42  FlowPaintDemo\FlowPaintDemo\bin\Debug\
     文件       46592  2018-12-07 15:48  FlowPaintDemo\FlowPaintDemo\bin\Debug\FlowPaintDemo.exe
     文件       54784  2018-12-07 15:48  FlowPaintDemo\FlowPaintDemo\bin\Debug\FlowPaintDemo.pdb
     目录           0  2018-12-07 15:08  FlowPaintDemo\FlowPaintDemo\bin\Release\
     文件        4422  2018-12-07 15:40  FlowPaintDemo\FlowPaintDemo\FlowPaintDemo.csproj
     文件        5817  2018-12-07 15:40  FlowPaintDemo\FlowPaintDemo\FrmMain.resx
     文件       15256  2018-12-07 15:43  FlowPaintDemo\FlowPaintDemo\frmMP_ProductionData_EventFlow.cs
     文件        6098  2018-12-07 15:31  FlowPaintDemo\FlowPaintDemo\frmMP_ProductionData_EventFlow.designer.cs
     文件        5817  2018-12-07 15:31  FlowPaintDemo\FlowPaintDemo\frmMP_ProductionData_EventFlow.resx
     文件        2244  2018-12-07 15:47  FlowPaintDemo\FlowPaintDemo\frmMP_ProductionData_SetEventFlow.cs
     文件        8185  2018-12-07 15:38  FlowPaintDemo\FlowPaintDemo\frmMP_ProductionData_SetEventFlow.designer.cs
     文件        5817  2018-12-07 15:38  FlowPaintDemo\FlowPaintDemo\frmMP_ProductionData_SetEventFlow.resx
     目录           0  2018-12-07 15:08  FlowPaintDemo\FlowPaintDemo\obj\
     目录           0  2018-12-07 15:42  FlowPaintDemo\FlowPaintDemo\obj\Debug\
     文件         790  2018-12-07 15:08  FlowPaintDemo\FlowPaintDemo\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        6588  2018-12-07 15:40  FlowPaintDemo\FlowPaintDemo\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件          42  2018-12-07 15:40  FlowPaintDemo\FlowPaintDemo\obj\Debug\FlowPaintDemo.csproj.CoreCompileInputs.cache
     文件        1197  2018-12-07 15:42  FlowPaintDemo\FlowPaintDemo\obj\Debug\FlowPaintDemo.csproj.FileListAbsolute.txt
     文件        1232  2018-12-07 15:40  FlowPaintDemo\FlowPaintDemo\obj\Debug\FlowPaintDemo.csproj.GenerateResource.cache
     文件        8471  2018-12-07 15:08  FlowPaintDemo\FlowPaintDemo\obj\Debug\FlowPaintDemo.csprojResolveAssemblyReference.cache
............此处省略25个文件信息

评论

共有 条评论