示例#1
0
 public ConstructForm(IDataProvider dataProvider, IGameRules gameRules)
 {
     questionController = new QuestionController(dataProvider, gameRules);
     questionController.RefreshPackNameList();
     InitializeComponent();
     PackList.Items.AddRange(questionController.packNameList.ToArray());
 }
示例#2
0
 Random rand = new Random();        //???
 public GameForm(IDataProvider dataProvider, IGameRules gameRules)
 {
     questionController = new QuestionController(dataProvider, gameRules);
     questionController.RefreshPackNameList();
     InitializeComponent();
     CreateRadio();
     questionController.timer.Tick += new EventHandler(Timer_Tick);
     if (!gameRules.HintsAvailable)
     {
         foreach (Button item in hintsPanel.Controls)
         {
             item.Enabled         = false;
             item.BackgroundImage = ToolStripRenderer.CreateDisabledImage(item.BackgroundImage);
         }
     }
 }