Ejemplo n.º 1
0
 public Canvas()
 {
     mCanvasCore = new CanvasCore();
     mCanvasControl = null;
     mSizeMode = @"Normal";
     mDockStyle = @"None";
 }
Ejemplo n.º 2
0
 public override void _initControl()
 {
     if (null == mCanvasControl || mCanvasControl.IsDisposed)
     {
         mCanvasControl = new CanvasControl(mCanvasCore);
         if (string.Compare(mDockStyle, @"Top") == 0)
         {
             mCanvasControl.Dock = DockStyle.Top;
         }
         else if (string.Compare(mDockStyle, @"Bottom") == 0)
         {
             mCanvasControl.Dock = DockStyle.Bottom;
         }
         else if (string.Compare(mDockStyle, @"Fill") == 0)
         {
             mCanvasControl.Dock = DockStyle.Fill;
         }
         else if (string.Compare(mDockStyle, @"Left") == 0)
         {
             mCanvasControl.Dock = DockStyle.Left;
         }
         else if (string.Compare(mDockStyle, @"Right") == 0)
         {
             mCanvasControl.Dock = DockStyle.Right;
         }
         else
         {
             mCanvasControl.Dock = DockStyle.None;
         }
         if (string.Compare(mSizeMode, @"StretchImage") == 0)
         {
             mCanvasControl.SizeMode = PictureBoxSizeMode.StretchImage;
         }
         else if (string.Compare(mSizeMode, @"AutoSize") == 0)
         {
             mCanvasControl.SizeMode = PictureBoxSizeMode.AutoSize;
         }
         else if (string.Compare(mSizeMode, @"CenterImage") == 0)
         {
             mCanvasControl.SizeMode = PictureBoxSizeMode.CenterImage;
         }
         else if (string.Compare(mSizeMode, @"Zoom") == 0)
         {
             mCanvasControl.SizeMode = PictureBoxSizeMode.Zoom;
         }
         else
         {
             mCanvasControl.SizeMode = PictureBoxSizeMode.Normal;
         }
     }
 }