示例#1
0
 private void SetGameUnitsWidgets(GameUnitsList gameUnits)
 {
     foreach (GameUnit gameUnit in gameUnits)
     {
         GameUnitWidget guw = new GameUnitWidget(gameUnit);
         guw.GameUnit = gameUnit;
         widgets.Add(guw);
         guw.GameUnitEvent += (g, t) => { GameUnitEvent(g, t); };
         guw.Show();
         gameunitsbox1.PackStart(guw, false, true, 0);
     }
 }
 private void SetGameUnitsWidgets(GameUnitsList gameUnits)
 {
     foreach (GameUnit gameUnit in gameUnits) {
         GameUnitWidget guw = new GameUnitWidget(gameUnit);
         guw.GameUnit = gameUnit;
         widgets.Add(guw);
         guw.GameUnitEvent += (g, t) => {GameUnitEvent(g, t);};
         guw.Show();
         gameunitsbox1.PackStart(guw, false , true, 0);
     }
 }