private void btnRoster_Click(object sender, EventArgs e) { statusText.Text = String.Empty; AutoComplete autoComplete = new AutoComplete(_forum, _synchronousInvoker, _db); PlayerList frmPlayers = new PlayerList(_voteCount, autoComplete); DialogResult dr = frmPlayers.ShowDialog(); if (dr == System.Windows.Forms.DialogResult.OK) { } _voteCount.CommitRosterChanges(); _voteCount.Refresh(); }
private void BindToNewGame(String url) { url = Utils.Misc.NormalizeUrl(url); ThreadReader t = _forum.Reader(); _voteCount = new ElectionInfo(_synchronousInvoker, t, _db, _forum.ForumURL, url, _forum.PostsPerPage, true, _language, _forum.VBVersion); _voteCount.PropertyChanged += new PropertyChangedEventHandler(_voteCount_PropertyChanged); _voteCount.Turbo = _turbo; _moderator = new Moderator(_synchronousInvoker, _voteCount, _forum); txtLastPost.DataBindings.Clear(); udStartPost.DataBindings.Clear(); txtEndPost.DataBindings.Clear(); dtEndTime.DataBindings.Clear(); dtStartTime.DataBindings.Clear(); txtLastPost.DataBindings.Add("Text", _voteCount, "LastPost", false, DataSourceUpdateMode.OnPropertyChanged); udStartPost.DataBindings.Add("Text", _voteCount, "StartPost", false, DataSourceUpdateMode.OnPropertyChanged); txtEndPost.DataBindings.Add("Text", _voteCount, "EndPost", false, DataSourceUpdateMode.OnPropertyChanged); _voteCount.ChangeDay(_day); _voteCount.Refresh(); EnableButtons(false); _voteCount.CheckThread(() => { EnableButtons(true); }); }