public void LoadProperties()
 {
     if (player != null)
     {
         propertyGrid = player.GetGrid(currentFrame);
         propertyGrid1.SelectedObject = propertyGrid;
     }
 }
        private void Form1_Load(object sender, EventArgs e)
        {
            propertyGrid = new PropertyGridCharacter();
            propertyGrid1.SelectedObject = propertyGrid;

            bp = new Bitmap(this.ClientRectangle.Width, this.ClientRectangle.Height,
                            System.Drawing.Imaging.PixelFormat.Format24bppRgb);
            var g = Graphics.FromImage(bp);

            var myPen = new System.Drawing.Pen(System.Drawing.Color.Green);

            g.DrawLine(myPen, MainGraphicPanel.Width / 2 + curX,
                       0,
                       MainGraphicPanel.Width / 2 + curX,
                       MainGraphicPanel.Height);
            g.DrawLine(myPen, 0,
                       MainGraphicPanel.Height / 2 + curY,
                       MainGraphicPanel.Width,
                       MainGraphicPanel.Height / 2 + curY);

            myPen.Dispose();
            g.Dispose();
        }