资源简介
C#编的一个流程图软件,可编译,可运行
界面很简单,适合初学者
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private Point pt;
private List listLine;
private List listPanel;
public Form1()
{
this.DoubleBuffered = true;
this.Setstyle(Controlstyles.OptimizedDoubleBuffer |
Controlstyles.ResizeRedraw |
Controlstyles.AllPaintingInWmPaint true);
InitializeComponent();
}
private void Form1_Load(object sender EventArgs e)
{
//动态创建panel
listPanel = new List();
for (int i = 0; i < 6; i++)
{
Panel panel1 = new System.Windows.Forms.Panel();
if(i%2==0)
panel1.BackgroundImage = global::WindowsFormsApplication1.Properties.Resources.icon_b_102;
else
panel1.BackgroundImage = global::WindowsFormsApplication1.Properties.Resources.icon_b_18;
panel1.Borderstyle = System.Windows.Forms.Borderstyle.FixedSingle;
panel1.Location = new System.Drawing.Point(100 + 70 * i 100 + 70 * i);
panel1.Size = new System.Drawing.Size(60 60);
panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel_MouseDown);
panel1.MouseEnter += new System.EventHandler(this.panel_MouseEnter);
panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel_MouseMove);
gdraw.Controls.Add(panel1);
listPanel.Add(panel1);
}
////线条对象
////往里面添加就行了
listLine = new List();
for (int i = 0; i < 5; i++)
{
Line line = new Line();
line.Start = listPanel[i];
line.End = listPanel[i+1];
Pen p = new Pen(Color.Blue 5);//设置笔的粗细为颜色为蓝色
//画箭头只对不封闭曲线有用
p.Dashstyle = Dashstyle.Solid;//恢复实线
p.EndCap = LineCap.ArrowAnchor;//定义线尾的样式为箭头
line.Pen = p;
listLine.Add(line);
}
}
private void panel_MouseDown(object sender MouseEventArgs e)
{
pt = Cursor.Position;
}
private void panel_MouseMove(object sender MouseEventArgs e)
{
gdraw.Update();
gdraw.Refresh();
Panel p = sender as Panel;
if (e.Button == MouseButtons.Left)
{
int px = Cursor.Position.X - pt.X;
int py = Cursor.Position.Y - pt.Y;
p.Location = new Point(p.Location.X
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 15872 2012-08-27 16:55 WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
文件 34304 2012-08-27 16:55 WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
文件 14848 2012-08-27 16:55 WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
文件 490 2007-07-21 01:33 WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
文件 3913 2012-08-27 16:55 WindowsFormsApplication1\Form1.cs
文件 2122 2012-08-27 16:49 WindowsFormsApplication1\Form1.Designer.cs
文件 5817 2012-08-27 16:49 WindowsFormsApplication1\Form1.resx
文件 6348 2012-08-27 16:52 WindowsFormsApplication1\Line.cs
文件 6471 2012-08-27 15:10 WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 5120 2012-08-27 15:10 WindowsFormsApplication1\obj\x86\Debug\TempPE\Properties.Resources.Designer.cs.dll
文件 1914 2012-08-27 16:55 WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
文件 934 2012-08-27 16:52 WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache
文件 15872 2012-08-27 16:55 WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.exe
文件 180 2012-08-27 16:52 WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Form1.resources
文件 34304 2012-08-27 16:55 WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.pdb
文件 2635 2012-08-27 16:52 WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Properties.Resources.resources
文件 505 2012-08-27 15:10 WindowsFormsApplication1\Program.cs
文件 1398 2012-08-27 15:10 WindowsFormsApplication1\Properties\AssemblyInfo.cs
文件 3402 2012-08-27 15:10 WindowsFormsApplication1\Properties\Resources.Designer.cs
文件 6595 2012-08-27 15:10 WindowsFormsApplication1\Properties\Resources.resx
文件 1109 2012-08-27 15:10 WindowsFormsApplication1\Properties\Settings.Designer.cs
文件 249 2012-08-27 15:10 WindowsFormsApplication1\Properties\Settings.settings
文件 676 2012-08-27 15:10 WindowsFormsApplication1\Resources\icon_b_102.png
文件 700 2012-08-27 15:10 WindowsFormsApplication1\Resources\icon_b_15.png
文件 770 2012-08-27 15:10 WindowsFormsApplication1\Resources\icon_b_18.png
..A.SH. 7168 2012-08-28 11:12 WindowsFormsApplication1\Resources\Thumbs.db
文件 3961 2012-08-27 16:39 WindowsFormsApplication1\WindowsFormsApplication1.csproj
文件 889 2012-08-27 16:52 WindowsFormsApplication1\WindowsFormsApplication1.sln
..A..H. 16384 2012-08-27 18:03 WindowsFormsApplication1\WindowsFormsApplication1.suo
目录 0 2012-08-27 15:10 WindowsFormsApplication1\obj\x86\Debug\TempPE
............此处省略13个文件信息
相关资源
- C# 调用win32 api函数-user32.dll详细说明
- C# 调用BarTender打印条码DEMO
- 大型比赛竞赛抽签系统 可打印 c# vs
- C#编写的Gerber查看器
- lua C# .Net4.0 vs2010 LuaInterface
- C#十六进制编辑器
- 明华URF-35H读卡器 C#读写源码 为大家
- C#文件流读取CSV文件
- c#读写PDF文件sql
- C# winform Socket大文件传输
- c#车牌识别系统附30张测试图片
- 《C#面向对象程序设计》源代码(CS)
- 金旭亮《C#面向对象程序设计》教案
- 试题库管理系统毕业论文(C#)源程序
- 学校网站原代码(C#.NET)
- C#-数据库操作技术-员工管理系统
- c#web开发入门经典
- C#与Matlab混合编程的几种方式
- c# 开发与 mysql数据库实现的增删改查
- C#异步操作 异步查询数据库 异步处理
- Basler相机通过IO触发源码
- [源代码] 《领域驱动设计 (C# 2008 实
- 松下PLC与C#通讯串口调试入门教程.z
- USB 继电器控制器 LCUS-1 保证能用 c#
- C# AES加密解密小工具
- C#圆形按钮,非常漂亮动态~~
- [精]C#仿QQ右下角弹出提示框()
- C#进程间通信-共享内存代码
- 有史以来最简单的三层(C#)
- vb调用c#编写的串口DLL文件(vb源码
评论
共有 条评论