Esempio n. 1
0
 private void AddCntNames(Graphics g)
 {
     for (int i = 0; i < CntRects.Length; i++)
     {
         var cntRect       = CntRects[i];//当前的机箱视图
         int nameRectWidth = cntRect.Width / 10;
         var nameRect      = new Rectangle(cntRect.X - nameRectWidth, cntRect.Y, nameRectWidth, cntRect.Height);
         BaseDrawer.AddDirctionSentence(g, nameRect, _sys.CntNames[i], false);
     }
 }
Esempio n. 2
0
 public void MouseEventHandler(object sender, MouseEventArgs e)
 {
     ChoosedBv = GetChoosedBaseView(e);
     if (ChoosedBv != null)
     {
         PropertyForm.Show(ChoosedBv.GetModelInstance());
     }
     else
     {
         PropertyForm.Show(this.GetModelInstance());
     }
     base.TriggerRedrawRequst();
 }
Esempio n. 3
0
        public override void DrawView(Graphics g)
        {
            DrawBoundary(g);
            //画槽位
            for (int i = 0; i < SlotRects.Length; i++)
            {
                BaseDrawer bv = PlaneVpxArray[i];
                bv.DrawView(g);
            }
            //稍后画选中的图元
            if (ChoosedBv != null)
            {
                ChoosedBv.ChoosedDrawView(g);
            }

            //画Links
            foreach (var linePair in LinkDir)
            {
                var link = linePair.Key;
                link.EndRadius = SlotRects[0].Width / 20;
                link.DrawLine(g, linePair.Value.ToList());
            }
        }