Exemple #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);

        }
Exemple #2
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();
     }
 }
Exemple #3
0
 private void SetStatus(string Text, string in_reply_to_status_id)
 {
     using (PostUpdate StatusForm = new PostUpdate(false))
     {
         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;
             StatusForm.Hide();
             IsLoaded = false;
             //Manager.RefreshFriendsTimeLine();
         }
         else
         {
             this.statList.Visible = true;
             StatusForm.Hide();
             IsLoaded = false;
         }
         Manager.Start();
         this.Visible = true;
         IsLoaded = true;
         this.statList.Redraw();
         this.statList.Visible = true;
         StatusForm.Close();
     }
 }