Beispiel #1
0
        public Form1()
        {
            InitializeComponent();

            this.BringToFront();
            this.Focus();
            this.KeyPreview = true;

            Index           = 0; Pages = new List <Tuple <string, Status> >();
            button1.Enabled = button2.Enabled = false;

            if (BearerToken.Equals("none"))
            {
                try
                {
                    BearerToken = OAuth2.GetToken(ConsumerKey, ConsumerSecret).BearerToken;
                    Properties.Settings.Default.Save();
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.ToString());
                    Environment.Exit(1);
                }
            }
            Token = OAuth2Token.Create(ConsumerKey, ConsumerSecret, BearerToken);
            toolStripTextBox1.Focus();
        }