예제 #1
0
파일: frmMain.cs 프로젝트: petarov/emex
 private void btnNewMail_Click(object sender, EventArgs e)
 {
     //--- [New Mail] button clicked
     frmMailView frmMail = new frmMailView(Bootstrap.Instance().Settings.AccountAddress);
     if (DialogResult.OK == frmMail.ShowDialog())
     {
         this.SendMail(frmMail);
     }
 }
예제 #2
0
파일: frmMain.cs 프로젝트: petarov/emex
 private void toolStripMenuNewMail_Click(object sender, EventArgs e)
 {
     //-- Context Menu (New Mail)
     frmMailView frmMail = new frmMailView(
         Bootstrap.Instance().Settings.AccountAddress,
         this.livContactCurrent.Text.Trim() );
     if (DialogResult.OK == frmMail.ShowDialog())
     {
         this.SendMail(frmMail);
     }
 }
예제 #3
0
파일: frmMain.cs 프로젝트: petarov/emex
        public void ShowEditMail(string id)
        {
            //--- Show Mail Edit dialog
            try
            {
                foreach (Hashtable t in resMessages.return_)
                {
                    if (id == Convert.ToString(t["id"]) )
                    {
                        Status = "Retrieving e-mail ...";
                        this.Cursor = Cursors.WaitCursor; // wait a while
                        Result resMail = Bootstrap.Instance().Talker.GetMail(id);
                        ErrorHandler.checkBizResult(resMail);
                        Status = "Done.";

                        frmMailView frmMail = new frmMailView(resMail.return_[0]);
                        frmMail.ShowDialog();
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                Status = "Retrieving e-mail failed !";
                new ErrorHandler(ex).Error();
            }
            finally
            {
                this.Cursor = Cursors.Arrow;
            }
        }