예제 #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);
         }
     }
 }