Changeset 1280
- Timestamp:
- 1/31/2010 6:14:32 AM (7 weeks ago)
- Location:
- trunk/EveHQ/Forms
- Files:
-
- 2 modified
-
frmEveHQ.vb (modified) (4 diffs)
-
frmMail.vb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/EveHQ/Forms/frmEveHQ.vb
r1278 r1280 51 51 Dim EveHQMLF As New frmMarketPrices 52 52 Private EveHQTrayForm As Form = Nothing 53 Public Event MailUpdateStarted() 54 Public Event MailUpdateCompleted() 53 55 Friend Structure RECT 54 56 Friend Left As Int32 … … 2705 2707 2706 2708 Private Sub UpdateMailNotifications() 2707 Threading.ThreadPool.QueueUserWorkItem(AddressOf MailUpdateThread) 2708 End Sub 2709 2710 Private Sub MailUpdateThread(ByVal state As Object) 2709 OpenEveHQMailForm() 2710 Threading.ThreadPool.QueueUserWorkItem(AddressOf MailUpdateThread, frmMail.IsHandleCreated) 2711 End Sub 2712 2713 Private Sub MailUpdateThread(ByVal MailFormOpen As Object) 2711 2714 ' Check for the AutoMailAPI flag 2712 2715 Dim requiresAutoDisable As Boolean = False … … 2718 2721 EveHQ.Core.HQ.EveHQSettings.AutoMailAPI = False 2719 2722 End If 2720 frmMail.btnDownloadMail.Enabled = False 2723 2724 RaiseEvent MailUpdateStarted() 2721 2725 2722 2726 ' Call the main routines! … … 2724 2728 Call myMail.GetMail() 2725 2729 2726 ' Update the display with EveMail 2727 If frmMail.IsHandleCreated = True Then 2728 Call frmMail.UpdateMailInfo() 2729 End If 2730 2731 frmMail.btnDownloadMail.Enabled = True 2730 RaiseEvent MailUpdateCompleted() 2731 2732 ' Update the main EveMail button 2733 Call Me.UpdateEveMailButton() 2734 2732 2735 ' Set the AutoMailAPI flag if required 2733 2736 If requiresAutoDisable = True Then 2734 2737 EveHQ.Core.HQ.EveHQSettings.AutoMailAPI = True 2735 2738 End If 2736 ' Update the main EveMail button 2737 Call Me.UpdateEveMailButton() 2739 2738 2740 End Sub 2739 2741 -
trunk/EveHQ/Forms/frmMail.vb
r1279 r1280 22 22 23 23 Private Sub frmMail_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 24 ' Adds handlers for the external mail events 25 AddHandler frmEveHQ.MailUpdateStarted, AddressOf MailUpdateStarted 26 AddHandler frmEveHQ.MailUpdateCompleted, AddressOf MailUpdateCompleted 24 27 ' Check for the existence of our 2 required tables 25 28 Call EveHQ.Core.DataFunctions.CheckForEveMailTable() … … 83 86 Dim myMail As New EveHQ.Core.EveMail 84 87 AddHandler myMail.MailProgress, AddressOf DisplayMailProgress 85 btnDownloadMail.Enabled = False88 Me.Invoke(New MethodInvoker(AddressOf MailUpdateStarted)) 86 89 Call myMail.GetMail() 87 90 Me.Invoke(New MethodInvoker(AddressOf MailUpdateCompleted)) … … 97 100 End Sub 98 101 99 Private Sub MailUpdateCompleted() 102 Public Sub MailUpdateStarted() 103 lblDownloadMailStatus.Text = "Processing EveMails and Notifications..." 104 btnDownloadMail.Enabled = False 105 End Sub 106 107 Public Sub MailUpdateCompleted() 100 108 ' Update the display with EveMail 101 109 Call Me.UpdateMailInfo()
