Exemple #1
0
        public DownLoadMails()
        {
            InitializeComponent();
            base._SetLanguage(this);

            #region control setting
            //todo:
            this.button1_Pause.Hide();
            this.button2_Cancel.Hide();

            this.progressBar1.Style = ProgressBarStyle.Continuous;

            //for test
            TestLaber = new Label();
            TestLaber.Text = "0";
            TestLaber.Name = "TestLaber";
            TestLaber.Location = new Point(20,0);
            this.Controls.Add(TestLaber);
            //test end

            #endregion
            MailMng = new MailManage();
            currMailCount = MailMng.GetUserMailCount((int)AppMain.currUser.Id);
            hmail = new HMail.HMail(HMConvert.ConvertMailEntity.ConvertToMailEntity(AppMain.currUser));
            if (hmail.MailCount <= currMailCount)
                this.Close();
            this.progressBar1.Maximum = hmail.MailCount - currMailCount;
        }
Exemple #2
0
        public DownLoadMails()
        {
            InitializeComponent();
            base._SetLanguage(this);

            #region control setting
            //todo:
            this.button1_Pause.Hide();
            this.button2_Cancel.Hide();

            this.progressBar1.Style = ProgressBarStyle.Continuous;

            //for test
            TestLaber          = new Label();
            TestLaber.Text     = "0";
            TestLaber.Name     = "TestLaber";
            TestLaber.Location = new Point(20, 0);
            this.Controls.Add(TestLaber);
            //test end

            #endregion
            MailMng       = new MailManage();
            currMailCount = MailMng.GetUserMailCount((int)AppMain.currUser.Id);
            hmail         = new HMail.HMail(HMConvert.ConvertMailEntity.ConvertToMailEntity(AppMain.currUser));
            if (hmail.MailCount <= currMailCount)
            {
                this.Close();
            }
            this.progressBar1.Maximum = hmail.MailCount - currMailCount;
        }