private void buttonTestConnection_Click(object sender, EventArgs e) { try { labelTestConnection.Visible = false; TwitterTimer testTimer = new TwitterTimer(this, null); if (testTimer.Logon(textBoxAccessToken.Text, textBoxAccessSecret.Text, textBoxAuthKey.Text, textBoxAuthSecret.Text)) { labelTestConnection.ForeColor = Color.Green; labelTestConnection.Text = "Authentication passed."; labelTestConnection.Visible = true; } else { labelTestConnection.ForeColor = Color.Red; labelTestConnection.Text = "Authentication failed."; labelTestConnection.Visible = true; } } catch { labelTestConnection.ForeColor = Color.Red; labelTestConnection.Text = "Authentication failed."; labelTestConnection.Visible = true; } }
internal void LoadConfiguration(TwitterTimer timer) { textBoxAuthKey.Text = timer.ConsumerKey; textBoxAuthSecret.Text = timer.ConsumerSecret; textBoxAccessToken.Text = timer.AccessToken; textBoxAccessSecret.Text = timer.AccessSecret; numericRefreshInterval.Value = timer.IntervalSeconds; checkBoxEnabled.Checked = timer.Enabled; }
public void OnConnection(NetOffice.OutlookApi.Application application, NetOffice.OfficeApi._CustomTaskPane parentPane, object[] customArguments) { InitializeTaskPane(); Client = new TwitterTimer(this, Client_Error); Client.EnabledChanegd += new EnabledChangedEventHanlder(Client_EnabledChanegd); settingsPane.Initialize(Client); tweetGrid.DataSource = Client; button_Click(buttonMain, new EventArgs()); if (Config.Enabled) { tweetGrid.Enabled = true; Client.Enabled = true; } else { tweetGrid.Enabled = false; } }
internal void Initialize(TwitterTimer timer) { InitializeState = true; LoadConfiguration(timer); InitializeState = false; }