Example #1
0
 public Lobby(string username, RegistrationWindow sender)
 {
     InitializeComponent();
     chatWindowControl = new ChatWindowControl(sendMessageField, chatBoxLabel, chatBoxField, sendMessageButton, username);
     MessagingClient.MessageReceived += MessagingClient_MessageReceived;
     this.username = username;
     this.sender = sender;
     BackgroundWorker getUserWorker = new BackgroundWorker();
     getUserWorker.DoWork += getUserWorker_DoWork;
     getUserWorker.RunWorkerCompleted += getUserWorker_RunWorkerCompleted;
     getUserWorker.RunWorkerAsync();
     timer_Tick(null, null);
     _logic = new Logic(username);
     InitDataTable();
 }
Example #2
0
 public MainWindow(string username, Lobby sender)
 {
     _logic = new BusinessLogic.Logic(username);
     _sender = sender;
     InitializeComponent();
     //Load setings
     BackgroundWorker worker = new BackgroundWorker();
     worker.DoWork += worker_DoWork;
     worker.RunWorkerCompleted += worker_RunWorkerCompleted;
     worker.RunWorkerAsync();
     MessagingClient.MessageReceived += RequestParser_messageReceived;
     InitTimeRemainingTimer();
     _logic.UpdateCorrectAnswerCount(0);
     correctCount.Text = _logic.GetCorrectAnswerCount().ToString();
     InitDataTable();
     chatWindowControl = new ChatWindowControl(sendMessageField, chatBoxLabel, chatBoxField, sendMessageButton, username);
 }