C#实现流程图设计器

2019-12-30 11:10:40王冬梅
  • __lineX1 = e.X;  __lineY1 = e.Y; 
  • __lineMouseClickedCount = 1;  } 
  • else  { 
  • __lineMouseClickedCount = 0;  __lineX1 = 0; 
  • __lineY1 = 0;  __lineX2 = 0; 
  • __lineY2 = 0;  } 
  •   } 
  • 下面给出重绘的程序:

     

     
    1. private void ReDrawAll()  { 
    2. renderGrid();  Graphics g = this.panel1.CreateGraphics(); 
    3. g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;  GObject CurrObj = new GObject(); 
    4. Rectangle Rct = new Rectangle();  Pen p = new Pen(Color.Black); 
    5. //p.Width = 2;  p.Width = __penWidth * __zoomTimes; 
    6.   Image ObjImg; 
    7. int xm = 0;  int ym = 0; 
    8.   int _maxX = 0; 
    9. int _maxY = 0;  int _minX = 0; 
    10. int _minY = 0;  int _oldW = this.panel1.Width; 
    11. int _oldH = this.panel1.Height;   
    12. string IsLine = "";  //Nobj==50为当前画布最大的对象个数 
    13. for (int i = 0; i < GNetworkFlow.Nobj; i++)  { 
    14. CurrObj = GNetworkFlow.GObjects[i];  //当前对象类型判断