private void toolPriALL_Click(object sender, EventArgs e)
 {
     ViewPort.All(pictureBox1.Height, pictureBox1.Width);
     pictureBox1.Invalidate();
     Command = null;
     Primitive.SelectEnable = true;
     Primitive.SnapEnable   = false;
 }
        private void Form1_Load(object sender, EventArgs e)
        {
            Init();
            pictureBox1.MouseWheel += pictureBox1_MouseWheel;
            form1 = this;
            ViewPort.All(this.pictureBox1.Height, this.pictureBox1.Width);
            var g = pictureBox1.CreateGraphics();

            ViewPort.MMPixels = g.DpiX / 20.4f;
            g.Dispose();
            //PCommand = CMDGrids.Single;
            //PCommand.Start();
            //PCommand.Begin();
            //PCommand.End();
            //PCommand.Stop();
        }