コード例 #1
0
 public void genAllBtn(Form1 form, Hexagon[] Grid, List <PictureBox> Background, PiecePlacement Place)
 {
     place = Place;
     for (int i = 0; i < Grid.Length; i++)
     {
         for (int j = 0; j < 6; j++)
         {
             if (i > 2)
             {
                 if (j != 0 || j != 1 || j != 5)
                 {
                     this.TownBtnLcn(form, Grid, Background, i, j);
                 }
             }
             else
             {
                 this.TownBtnLcn(form, Grid, Background, i, j);
             }
         }
         for (int j = 0; j < 6; j++)
         {
             if (i > 2)
             {
                 if (j != 0 || j != 1 || j != 5)
                 {
                     this.RoadBtnLcn(form, Grid, Background, i, j);
                 }
             }
             else
             {
                 this.RoadBtnLcn(form, Grid, Background, i, j);
             }
         }
     }
     for (int i = 0; i < roadCnt; i++)
     {
         roadBtns[i].SendToBack();
         roadBtns[i].Enabled = false;
     }
 }
コード例 #2
0
ファイル: ButtonInfo.cs プロジェクト: jmirandam992/Settlers
 public ButtonInfo(Form1 form, Hexagon[] grid, List <PictureBox> background, ButtonManager btnManager, PiecePlacement Place, bool IsRoad, int index, int hexloc, int location)
 {
     this.Index      = index;
     this.Form       = form;
     this.Grid       = grid;
     this.place      = Place;
     this.isRoad     = IsRoad;
     this.Hexscape   = hexloc;
     this.Location   = location;
     this.Background = background;
     this.Parent     = btnManager;
 }