Changes for issue #120
This commit is contained in:
Generated
+14
@@ -32,6 +32,7 @@ Partial Class frmSessions
|
||||
Me.btnDelete = New System.Windows.Forms.Button()
|
||||
Me.btnClose = New System.Windows.Forms.Button()
|
||||
Me.lblDateRange = New System.Windows.Forms.Label()
|
||||
Me.lblTotalHours = New System.Windows.Forms.Label()
|
||||
CType(Me.dgSessions, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@@ -134,11 +135,23 @@ Partial Class frmSessions
|
||||
Me.lblDateRange.TabIndex = 9
|
||||
Me.lblDateRange.Text = "Date Range:"
|
||||
'
|
||||
'lblTotalHours
|
||||
'
|
||||
Me.lblTotalHours.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblTotalHours.Location = New System.Drawing.Point(118, 531)
|
||||
Me.lblTotalHours.Name = "lblTotalHours"
|
||||
Me.lblTotalHours.Size = New System.Drawing.Size(467, 13)
|
||||
Me.lblTotalHours.TabIndex = 0
|
||||
Me.lblTotalHours.Text = "Total Hours:"
|
||||
Me.lblTotalHours.TextAlign = System.Drawing.ContentAlignment.TopCenter
|
||||
'
|
||||
'frmSessions
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(784, 561)
|
||||
Me.Controls.Add(Me.lblTotalHours)
|
||||
Me.Controls.Add(Me.lblDateRange)
|
||||
Me.Controls.Add(Me.btnClose)
|
||||
Me.Controls.Add(Me.btnDelete)
|
||||
@@ -170,4 +183,5 @@ Partial Class frmSessions
|
||||
Friend WithEvents btnDelete As Button
|
||||
Friend WithEvents btnClose As Button
|
||||
Friend WithEvents lblDateRange As Label
|
||||
Friend WithEvents lblTotalHours As Label
|
||||
End Class
|
||||
|
||||
@@ -21,6 +21,7 @@ Public Class frmSessions
|
||||
dgSessions.Columns.Add("Start", frmSessions_ColumnStart)
|
||||
dgSessions.Columns.Add("EndUnix", frmSessions_ColumnEnd)
|
||||
dgSessions.Columns.Add("End", frmSessions_ColumnEnd)
|
||||
dgSessions.Columns.Add("Hours", frmSessions_ColumnHours)
|
||||
|
||||
'Get Column Indexes
|
||||
iStartDataCol = dgSessions.Columns.IndexOf(dgSessions.Columns("StartUnix"))
|
||||
@@ -41,6 +42,10 @@ Public Class frmSessions
|
||||
Private Sub LoadData()
|
||||
Dim oData As DataSet
|
||||
Dim sFilter As String
|
||||
Dim dStart As DateTime
|
||||
Dim dEnd As DateTime
|
||||
Dim iHours As Double
|
||||
Dim iTotalHours As Double
|
||||
|
||||
If txtFilter.Text = String.Empty Then
|
||||
oData = mgrSessions.GetSessionRange(dtpStart.Value, dtpEnd.Value)
|
||||
@@ -52,9 +57,15 @@ Public Class frmSessions
|
||||
dgSessions.Rows.Clear()
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), mgrCommon.UnixToDate(dr("Start")), dr("End"), mgrCommon.UnixToDate(dr("End"))})
|
||||
dStart = mgrCommon.UnixToDate(dr("Start"))
|
||||
dEnd = mgrCommon.UnixToDate(dr("End"))
|
||||
iHours = Math.Round(dEnd.Subtract(dStart).TotalHours, 2)
|
||||
iTotalHours += iHours
|
||||
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), dStart, dr("End"), dEnd, iHours})
|
||||
Next
|
||||
|
||||
lblTotalHours.Text = mgrCommon.FormatString(frmSessions_lblTotalHours, iTotalHours)
|
||||
|
||||
dgSessions.AutoResizeColumns()
|
||||
End Sub
|
||||
|
||||
|
||||
Generated
+18
@@ -3669,6 +3669,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Hours.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSessions_ColumnHours() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSessions_ColumnHours", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to MonitorID.
|
||||
'''</summary>
|
||||
@@ -3714,6 +3723,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Total Hours: [PARAM].
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSessions_lblTotalHours() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSessions_lblTotalHours", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Session Viewer.
|
||||
'''</summary>
|
||||
|
||||
@@ -1948,4 +1948,10 @@
|
||||
<data name="frmSettings_WarningAdminStart" xml:space="preserve">
|
||||
<value>Please note that GBM will not "Start with Windows" as Administrator.[BR][BR]See the Online Manual in the Help menu for details.</value>
|
||||
</data>
|
||||
<data name="frmSessions_ColumnHours" xml:space="preserve">
|
||||
<value>Hours</value>
|
||||
</data>
|
||||
<data name="frmSessions_lblTotalHours" xml:space="preserve">
|
||||
<value>Total Hours: [PARAM]</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user