Example #1
0
 void AddGamePanel(gamePanel ngp)
 {
     currentPanels.Add(ngp);
     ngp.OnRemove += ngp_OnRemove;
     ngp.SaveLog  += WriteToFile;
     ngp.Parent    = this;
     if (horIndex != 2)//This number is how many game panels wide it will be. Default is 2
     {
         if (!DontExtend)
         {
             this.Width = (_initGamepanel.Width * (horIndex + 1)) + 10;
         }
         ngp.Location = new Point(ngp.Width * horIndex,
                                  (vertIndex * ngp.Height) + toolstripOffset);
         ngp.Show();
     }
     else
     {
         DontExtend = true;
         horIndex   = 0;
         vertIndex++;
         this.Height  = (_initGamepanel.Height * (vertIndex + 1)) + tbOffset + toolstripOffset;
         ngp.Location = new Point(ngp.Width * horIndex,
                                  (vertIndex * ngp.Height) + toolstripOffset);
     }
     horIndex++;
     ngp.Show();
 }
Example #2
0
 public Form1()
 {
     InitializeComponent();
     _initGamepanel          = new gamePanel(true);
     _initGamepanel.Parent   = this;
     _initGamepanel.Location = new Point(0, toolstripOffset);
     _initGamepanel.SaveLog += WriteToFile;
     _initGamepanel.Show();
 }
Example #3
0
 public Form1()
 {
     InitializeComponent();
     _initGamepanel = new gamePanel(true);
     _initGamepanel.Parent = this;
     _initGamepanel.Location = new Point(0, toolstripOffset);
     _initGamepanel.SaveLog += WriteToFile;
     _initGamepanel.Show();
 }
Example #4
0
 void AddGamePanel(gamePanel ngp)
 {
     currentPanels.Add(ngp);
     ngp.OnRemove += ngp_OnRemove;
     ngp.SaveLog += WriteToFile;
     ngp.Parent = this;
     if (horIndex != 2)//This number is how many game panels wide it will be. Default is 2
     {
         if (!DontExtend)
             this.Width = (_initGamepanel.Width * (horIndex + 1)) + 10;
         ngp.Location = new Point(ngp.Width * horIndex,
             (vertIndex * ngp.Height) + toolstripOffset);
         ngp.Show();
     }
     else
     {
         DontExtend = true;
         horIndex = 0;
         vertIndex++;
         this.Height = (_initGamepanel.Height * (vertIndex + 1)) + tbOffset + toolstripOffset;
         ngp.Location = new Point(ngp.Width * horIndex,
             (vertIndex * ngp.Height) + toolstripOffset);
     }
     horIndex++;
     ngp.Show();
 }