Пример #1
0
        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;
            }
        }
Пример #2
0
 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;
 }
Пример #3
0
 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;
     }
 }
Пример #4
0
 internal void Initialize(TwitterTimer timer)
 {
     InitializeState = true;
     LoadConfiguration(timer);
     InitializeState = false;
 }