示例#1
0
        void mTimer_SyncTick(object sender, EventArgs e)
        {
            if (Synchronize)
            {
                if (mDownloadingFile == false)
                {
                    foreach (Control control in pEmailEntries.Controls)
                    {
                        VoiceMailEntry vm = (VoiceMailEntry)control;
                        if (!vm.Cached)
                        {
                            vm.DownloadMail();
                            break;
                        }
                    }
                }

                //In this same timeout, we handle getting new data
                if (mPerformingUpdate)
                {
                    return;
                }
                mlastUpdate       = System.DateTime.Now;
                mPerformingUpdate = true;
                mMailSerive.VoiceMail_GetMessageListAsync(mUserName, mPassword);
            }
            else
            {
                TimeSpan interval = System.DateTime.Now - mlastUpdate;

                if (interval.TotalSeconds >= UpdateRateInSeconds)
                {
                    toolButtonRefresh.Enabled = true;
                }
            }
        }
示例#2
0
 private void toolButtonGet_Click(object sender, EventArgs e)
 {
     mSelectedVoiceMailEntry.DownloadMail();
 }