private void InLobby_Load(Object sender, EventArgs e) { tb_video_url.Enabled = false; if (!isHost) { bt_start.Enabled = false; bt_start.Text = "Waiting Host"; browserContoller = new BrowserContoller(GetVideoGenre(), tb_video_url.Text, cookie, Global.WebdriverDir, Global.ChromeBinPath); syncWorker = new SyncWorker(lobbyName, Global.MyName, browserContoller, Global.SelectedServer); syncWorker.Do(); } }
private void bt_start_Click(Object sender, EventArgs e) { try { browserContoller = new BrowserContoller(GetVideoGenre(), tb_video_url.Text, cookie, Global.WebdriverDir, Global.ChromeBinPath); if (syncWorker != null) { return; } syncWorker = new SyncWorker(lobbyName, Global.MyName, browserContoller, Global.SelectedServer); syncWorker.Do(); } catch (Exception ex) { stLogger.Log("", ex); } }