Exemplo n.º 1
0
        static void Main(string[] Args)
        {            
            bool bBackGround = false;
            if (Args.Length > 0)
            {
                string Arg =  Args[0];

                if (Arg == "/BackGround")
                {
                    bBackGround = true;
                }

                if (Arg == "/QuickPost")
                {
                    ClientSettings.LoadSettings();
                    if (ClientSettings.AccountsList.Count == 0)
                    {
                        PockeTwit.Localization.LocalizedMessageBox.Show("You must configure PockeTwit before using QuickPost.", "PockeTwit QuickPost");
                        return;
                    }
                    PostUpdate PostForm = new PostUpdate(true);
                    PostForm.AccountToSet = ClientSettings.DefaultAccount;
                    Application.Run(PostForm);
                    PostForm.Close();
                    return;
                }
            }
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            ClientSettings.LoadSettings();
            Application.Run(new TweetList(bBackGround, Args));
            LocalStorage.DataBaseUtility.CleanDB(10);

        }
Exemplo n.º 2
0
 private void SetStatus(string Text, string in_reply_to_status_id)
 {
     using (PostUpdate StatusForm = new PostUpdate(false))
     {
         StatusForm.Owner = this;
         if (!string.IsNullOrEmpty(Text))
         {
             StatusForm.AccountToSet = CurrentlySelectedAccount;
         }
         else
         {
             StatusForm.AccountToSet = ClientSettings.DefaultAccount;
         }
         this.statList.Visible = false;
         if (!string.IsNullOrEmpty(Text))
         {
             StatusForm.StatusText = Text + " ";
         }
         IsLoaded = false;
         StatusForm.in_reply_to_status_id = in_reply_to_status_id;
         Manager.Pause();
         if (StatusForm.ShowDialog() == DialogResult.OK)
         {
             this.statList.Visible = true;
             IsLoaded = false;
             //Manager.RefreshFriendsTimeLine();
         }
         else
         {
             this.statList.Visible = true;
             IsLoaded = false;
         }
         Manager.Start();
         this.Visible = true;
         IsLoaded = true;
         this.statList.Redraw();
         this.statList.Visible = true;
         StatusForm.Dispose();
     }
 }
Exemplo n.º 3
0
 private void linkLabel1_Click(object sender, EventArgs e)
 {
     Yedda.Twitter Twitter = new Yedda.Twitter();
     using (PostUpdate s = new PostUpdate(false))
     {
         s.StatusText = "@PockeTwitDev ";
         s.ShowDialog();
         s.Hide();
         string UpdateText = s.StatusText;
         if (s.DialogResult == DialogResult.OK)
         {
             Cursor.Current = Cursors.WaitCursor;
             Twitter.AccountInfo = s.AccountToSet;
             Twitter.Update(UpdateText, Yedda.Twitter.OutputFormatType.XML);
             Cursor.Current = Cursors.Default;
         }
         this.Show();
         s.Close();
     }
 }
Exemplo n.º 4
0
 private void linkLabel1_Click(object sender, EventArgs e)
 {
     using (PostUpdate s = new PostUpdate(false))
     {
         s.Owner = this;
         s.StatusText = "@PockeTwitDev ";
         s.ShowDialog();
         s.Hide();
         string UpdateText = s.StatusText;
         if (s.DialogResult == DialogResult.OK)
         {
             Yedda.Twitter Twitter = Yedda.Servers.CreateConnection(s.AccountToSet);
             Cursor.Current = Cursors.WaitCursor;
             Twitter.Update(UpdateText, null, Yedda.Twitter.OutputFormatType.XML);
             Cursor.Current = Cursors.Default;
         }
         s.Dispose();
     }
 }