Changeset 1278

Show
Ignore:
Timestamp:
1/31/2010 4:04:30 AM (7 weeks ago)
Author:
vessper
Message:

31/01/2010 (1.14.0.1278)


- Core: EveMail? class changed from a static class

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/EveHQ.Core/EveMail.vb

    r1275 r1278  
    55Public Class EveMail 
    66 
    7     Shared MailTimeFormat As String = "yyyy-MM-dd HH:mm:ss" 
    8     Shared culture As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("en-GB") 
    9  
    10     Public Shared Sub GetEveMail() 
     7    Dim MailTimeFormat As String = "yyyy-MM-dd HH:mm:ss" 
     8    Dim culture As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("en-GB") 
     9 
     10    Public Sub GetMail() 
     11        Call Me.GetEveMail() 
     12        Call Me.GetNotifications() 
     13    End Sub 
     14 
     15    Private Sub GetEveMail() 
    1116        ' Stage 1: Download the latest EveMail API using the standard API method 
    1217        ' Stage 2: Populate the class with our EveMail 
     
    143148        ' Send E-mail notification of new mails if required 
    144149        If EveHQ.Core.HQ.EveHQSettings.NotifyEveMail = True And NewMails.Count > 0 Then 
    145             Call EveMail.SendEmailForNewEveMails(NewMails, IDs) 
     150            Call SendEmailForNewEveMails(NewMails, IDs) 
    146151        End If 
    147152 
     
    152157    End Sub 
    153158 
    154     Public Shared Sub GetNotifications() 
     159    Private Sub GetNotifications() 
    155160        ' Stage 1: Download the latest EveNotifications API using the standard API method 
    156161        ' Stage 2: Populate the class with our Eve Notifications 
     
    271276        ' Send E-mail notification of new mails if required 
    272277        If EveHQ.Core.HQ.EveHQSettings.NotifyEveMail = True And newNotifys.Count > 0 Then 
    273             Call EveMail.SendEmailForNewEveNotifications(newNotifys, IDs) 
     278            Call SendEmailForNewEveNotifications(newNotifys, IDs) 
    274279        End If 
    275280 
     
    281286    End Sub 
    282287 
    283     Private Shared Sub SendEmailForNewEveMails(ByVal NewMails As ArrayList, ByVal IDs As ArrayList) 
     288    Private Sub SendEmailForNewEveMails(ByVal NewMails As ArrayList, ByVal IDs As ArrayList) 
    284289        ' Get the name data from the DB 
    285290        Dim strID As New StringBuilder 
     
    330335                End If 
    331336            Next 
    332             EveMail.SendEveHQMail("New Eve Mail Messages Notification", strBody.ToString) 
     337            Call SendEveHQMail("New Eve Mail Messages Notification", strBody.ToString) 
    333338        End If 
    334339    End Sub 
    335340 
    336     Private Shared Sub SendEmailForNewEveNotifications(ByVal NewNotifys As ArrayList, ByVal IDs As ArrayList) 
     341    Private Sub SendEmailForNewEveNotifications(ByVal NewNotifys As ArrayList, ByVal IDs As ArrayList) 
    337342        ' Get the name data from the DB 
    338343        Dim strID As New StringBuilder 
     
    368373            MessageCount += 1 
    369374        Next 
    370         EveMail.SendEveHQMail("New Eve Notification Messages Notification", strBody.ToString) 
     375        Call SendEveHQMail("New Eve Notification Messages Notification", strBody.ToString) 
    371376    End Sub 
    372377 
    373     Private Shared Sub SendEveHQMail(ByVal mailSubject As String, ByVal mailText As String) 
     378    Private Sub SendEveHQMail(ByVal mailSubject As String, ByVal mailText As String) 
    374379        Dim eveHQMail As New System.Net.Mail.SmtpClient 
    375380        Try 
  • trunk/EveHQ/Forms/frmEveHQ.vb

    r1235 r1278  
    27212721 
    27222722        ' Call the main routines! 
    2723         Call EveHQ.Core.EveMail.GetEveMail() 
    2724         Call EveHQ.Core.EveMail.GetNotifications() 
     2723        Dim myMail As New EveHQ.Core.EveMail 
     2724        Call myMail.GetMail() 
    27252725 
    27262726        ' Update the display with EveMail 
  • trunk/EveHQ/Forms/frmMail.vb

    r1276 r1278  
    7979        Me.Cursor = Cursors.WaitCursor 
    8080 
    81         Call EveHQ.Core.EveMail.GetEveMail() 
    82         Call EveHQ.Core.EveMail.GetNotifications() 
     81        Dim myMail As New EveHQ.Core.EveMail 
     82        Call myMail.GetMail() 
    8383 
    8484        ' Update the display with EveMail