From 5d3fa68fc30cb9b59f0274c79534b6e117dbd48d Mon Sep 17 00:00:00 2001 From: MikeMaximus Date: Thu, 16 Nov 2017 23:01:44 -0600 Subject: [PATCH] Changes for issues #97 and #99 --- GBM/Forms/frmGameManager.Designer.vb | 78 ++++++++++++----- GBM/Forms/frmGameManager.vb | 15 ++++ GBM/Forms/frmSession.Designer.vb | 63 ++++++++++++++ GBM/Forms/frmSession.resx | 120 +++++++++++++++++++++++++++ GBM/Forms/frmSession.vb | 37 +++++++++ GBM/Game Backup Monitor.vbproj | 9 ++ GBM/Managers/mgrMonitorList.vb | 4 +- GBM/Managers/mgrSessions.vb | 12 +++ GBM/Managers/mgrXML.vb | 1 + GBM/My Project/Resources.Designer.vb | 47 ++++++++++- GBM/My Project/Resources.resx | 15 ++++ 11 files changed, 377 insertions(+), 24 deletions(-) create mode 100644 GBM/Forms/frmSession.Designer.vb create mode 100644 GBM/Forms/frmSession.resx create mode 100644 GBM/Forms/frmSession.vb diff --git a/GBM/Forms/frmGameManager.Designer.vb b/GBM/Forms/frmGameManager.Designer.vb index b1316a0..b658e3c 100644 --- a/GBM/Forms/frmGameManager.Designer.vb +++ b/GBM/Forms/frmGameManager.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class frmGameManager Inherits System.Windows.Forms.Form 'Form overrides dispose to clean up the component list. - _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) Try If disposing AndAlso components IsNot Nothing Then @@ -20,7 +20,7 @@ Partial Class frmGameManager 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. - _ + Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Me.btnAdd = New System.Windows.Forms.Button() @@ -98,6 +98,9 @@ Partial Class frmGameManager Me.cmsDeleteBackup = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.cmsDeleteOne = New System.Windows.Forms.ToolStripMenuItem() Me.cmsDeleteAll = New System.Windows.Forms.ToolStripMenuItem() + Me.btnSessions = New System.Windows.Forms.Button() + Me.txtComments = New System.Windows.Forms.TextBox() + Me.lblComments = New System.Windows.Forms.Label() Me.grpConfig.SuspendLayout() CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit() Me.grpExtra.SuspendLayout() @@ -113,7 +116,7 @@ Partial Class frmGameManager ' Me.btnAdd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.btnAdd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.btnAdd.Location = New System.Drawing.Point(12, 526) + Me.btnAdd.Location = New System.Drawing.Point(12, 586) Me.btnAdd.Name = "btnAdd" Me.btnAdd.Size = New System.Drawing.Size(30, 23) Me.btnAdd.TabIndex = 4 @@ -124,7 +127,7 @@ Partial Class frmGameManager ' Me.btnDelete.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.btnDelete.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.btnDelete.Location = New System.Drawing.Point(48, 526) + Me.btnDelete.Location = New System.Drawing.Point(48, 586) Me.btnDelete.Name = "btnDelete" Me.btnDelete.Size = New System.Drawing.Size(30, 23) Me.btnDelete.TabIndex = 5 @@ -134,7 +137,7 @@ Partial Class frmGameManager 'btnBackup ' Me.btnBackup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnBackup.Location = New System.Drawing.Point(616, 526) + Me.btnBackup.Location = New System.Drawing.Point(616, 586) Me.btnBackup.Name = "btnBackup" Me.btnBackup.Size = New System.Drawing.Size(75, 23) Me.btnBackup.TabIndex = 19 @@ -144,7 +147,7 @@ Partial Class frmGameManager 'btnClose ' Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnClose.Location = New System.Drawing.Point(697, 526) + Me.btnClose.Location = New System.Drawing.Point(697, 586) Me.btnClose.Name = "btnClose" Me.btnClose.Size = New System.Drawing.Size(75, 23) Me.btnClose.TabIndex = 20 @@ -154,6 +157,8 @@ Partial Class frmGameManager 'grpConfig ' Me.grpConfig.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.grpConfig.Controls.Add(Me.lblComments) + Me.grpConfig.Controls.Add(Me.txtComments) Me.grpConfig.Controls.Add(Me.txtParameter) Me.grpConfig.Controls.Add(Me.lblParameter) Me.grpConfig.Controls.Add(Me.chkCleanFolder) @@ -177,7 +182,7 @@ Partial Class frmGameManager Me.grpConfig.Enabled = False Me.grpConfig.Location = New System.Drawing.Point(247, 12) Me.grpConfig.Name = "grpConfig" - Me.grpConfig.Size = New System.Drawing.Size(525, 157) + Me.grpConfig.Size = New System.Drawing.Size(525, 215) Me.grpConfig.TabIndex = 8 Me.grpConfig.TabStop = False Me.grpConfig.Text = "Configuration" @@ -363,7 +368,7 @@ Partial Class frmGameManager 'chkMonitorOnly ' Me.chkMonitorOnly.AutoSize = True - Me.chkMonitorOnly.Location = New System.Drawing.Point(362, 340) + Me.chkMonitorOnly.Location = New System.Drawing.Point(363, 398) Me.chkMonitorOnly.Name = "chkMonitorOnly" Me.chkMonitorOnly.Size = New System.Drawing.Size(83, 17) Me.chkMonitorOnly.TabIndex = 11 @@ -387,7 +392,7 @@ Partial Class frmGameManager Me.grpExtra.Controls.Add(Me.txtAppPath) Me.grpExtra.Controls.Add(Me.nudHours) Me.grpExtra.Controls.Add(Me.lblHours) - Me.grpExtra.Location = New System.Drawing.Point(247, 175) + Me.grpExtra.Location = New System.Drawing.Point(248, 233) Me.grpExtra.Name = "grpExtra" Me.grpExtra.Size = New System.Drawing.Size(525, 155) Me.grpExtra.TabIndex = 9 @@ -518,7 +523,7 @@ Partial Class frmGameManager ' 'btnTags ' - Me.btnTags.Location = New System.Drawing.Point(535, 336) + Me.btnTags.Location = New System.Drawing.Point(535, 394) Me.btnTags.Name = "btnTags" Me.btnTags.Size = New System.Drawing.Size(75, 23) Me.btnTags.TabIndex = 12 @@ -539,7 +544,7 @@ Partial Class frmGameManager Me.grpStats.Controls.Add(Me.lblBackupFile) Me.grpStats.Controls.Add(Me.lblRemote) Me.grpStats.Controls.Add(Me.lblLocalData) - Me.grpStats.Location = New System.Drawing.Point(247, 365) + Me.grpStats.Location = New System.Drawing.Point(247, 423) Me.grpStats.Name = "grpStats" Me.grpStats.Size = New System.Drawing.Size(525, 154) Me.grpStats.TabIndex = 15 @@ -654,7 +659,7 @@ Partial Class frmGameManager 'btnMarkAsRestored ' Me.btnMarkAsRestored.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnMarkAsRestored.Location = New System.Drawing.Point(429, 526) + Me.btnMarkAsRestored.Location = New System.Drawing.Point(429, 586) Me.btnMarkAsRestored.Name = "btnMarkAsRestored" Me.btnMarkAsRestored.Size = New System.Drawing.Size(100, 23) Me.btnMarkAsRestored.TabIndex = 17 @@ -664,7 +669,7 @@ Partial Class frmGameManager 'btnRestore ' Me.btnRestore.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnRestore.Location = New System.Drawing.Point(535, 526) + Me.btnRestore.Location = New System.Drawing.Point(535, 586) Me.btnRestore.Name = "btnRestore" Me.btnRestore.Size = New System.Drawing.Size(75, 23) Me.btnRestore.TabIndex = 18 @@ -674,7 +679,7 @@ Partial Class frmGameManager 'btnSave ' Me.btnSave.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnSave.Location = New System.Drawing.Point(616, 336) + Me.btnSave.Location = New System.Drawing.Point(616, 394) Me.btnSave.Name = "btnSave" Me.btnSave.Size = New System.Drawing.Size(75, 23) Me.btnSave.TabIndex = 13 @@ -687,13 +692,13 @@ Partial Class frmGameManager Me.lstGames.Location = New System.Drawing.Point(12, 160) Me.lstGames.Name = "lstGames" Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended - Me.lstGames.Size = New System.Drawing.Size(228, 355) + Me.lstGames.Size = New System.Drawing.Size(228, 420) Me.lstGames.TabIndex = 3 ' 'btnCancel ' Me.btnCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.btnCancel.Location = New System.Drawing.Point(697, 336) + Me.btnCancel.Location = New System.Drawing.Point(697, 392) Me.btnCancel.Name = "btnCancel" Me.btnCancel.Size = New System.Drawing.Size(75, 23) Me.btnCancel.TabIndex = 14 @@ -703,7 +708,7 @@ Partial Class frmGameManager 'chkEnabled ' Me.chkEnabled.AutoSize = True - Me.chkEnabled.Location = New System.Drawing.Point(247, 340) + Me.chkEnabled.Location = New System.Drawing.Point(248, 398) Me.chkEnabled.Name = "chkEnabled" Me.chkEnabled.Size = New System.Drawing.Size(109, 17) Me.chkEnabled.TabIndex = 10 @@ -769,7 +774,7 @@ Partial Class frmGameManager ' 'btnImport ' - Me.btnImport.Location = New System.Drawing.Point(84, 526) + Me.btnImport.Location = New System.Drawing.Point(84, 586) Me.btnImport.Name = "btnImport" Me.btnImport.Size = New System.Drawing.Size(75, 23) Me.btnImport.TabIndex = 6 @@ -778,7 +783,7 @@ Partial Class frmGameManager ' 'btnExport ' - Me.btnExport.Location = New System.Drawing.Point(165, 526) + Me.btnExport.Location = New System.Drawing.Point(165, 586) Me.btnExport.Name = "btnExport" Me.btnExport.Size = New System.Drawing.Size(75, 23) Me.btnExport.TabIndex = 7 @@ -839,11 +844,39 @@ Partial Class frmGameManager Me.cmsDeleteAll.Size = New System.Drawing.Size(114, 22) Me.cmsDeleteAll.Text = "&All Files" ' + 'btnSessions + ' + Me.btnSessions.Location = New System.Drawing.Point(323, 586) + Me.btnSessions.Name = "btnSessions" + Me.btnSessions.Size = New System.Drawing.Size(100, 23) + Me.btnSessions.TabIndex = 12 + Me.btnSessions.Text = "&View Sessions..." + Me.btnSessions.UseVisualStyleBackColor = True + ' + 'txtComments + ' + Me.txtComments.Location = New System.Drawing.Point(70, 154) + Me.txtComments.Multiline = True + Me.txtComments.Name = "txtComments" + Me.txtComments.ScrollBars = System.Windows.Forms.ScrollBars.Vertical + Me.txtComments.Size = New System.Drawing.Size(413, 54) + Me.txtComments.TabIndex = 17 + ' + 'lblComments + ' + Me.lblComments.AutoSize = True + Me.lblComments.Location = New System.Drawing.Point(7, 157) + Me.lblComments.Name = "lblComments" + Me.lblComments.Size = New System.Drawing.Size(59, 13) + Me.lblComments.TabIndex = 18 + Me.lblComments.Text = "Comments:" + ' 'frmGameManager ' 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.ClientSize = New System.Drawing.Size(784, 621) + Me.Controls.Add(Me.btnSessions) Me.Controls.Add(Me.lblQuickFilter) Me.Controls.Add(Me.txtQuickFilter) Me.Controls.Add(Me.btnExport) @@ -963,4 +996,7 @@ Partial Class frmGameManager Friend WithEvents chkCleanFolder As CheckBox Friend WithEvents txtParameter As TextBox Friend WithEvents lblParameter As Label + Friend WithEvents btnSessions As Button + Friend WithEvents lblComments As Label + Friend WithEvents txtComments As TextBox End Class diff --git a/GBM/Forms/frmGameManager.vb b/GBM/Forms/frmGameManager.vb index c1daa0e..b7d68f0 100644 --- a/GBM/Forms/frmGameManager.vb +++ b/GBM/Forms/frmGameManager.vb @@ -761,6 +761,7 @@ Public Class frmGameManager chkCleanFolder.Checked = oApp.CleanFolder chkTimeStamp.Checked = oApp.AppendTimeStamp nudLimit.Value = oApp.BackupLimit + txtComments.Text = oApp.Comments chkEnabled.Checked = oApp.Enabled chkMonitorOnly.Checked = oApp.MonitorOnly @@ -906,6 +907,7 @@ Public Class frmGameManager btnExclude.Text = frmGameManager_btnExclude btnImport.Enabled = False btnExport.Enabled = False + btnSessions.Enabled = False Case eModes.Edit grpFilter.Enabled = False lstGames.Enabled = False @@ -930,6 +932,7 @@ Public Class frmGameManager lblTags.Visible = True btnImport.Enabled = False btnExport.Enabled = False + btnSessions.Enabled = False Case eModes.View grpFilter.Enabled = True lstGames.Enabled = True @@ -949,6 +952,7 @@ Public Class frmGameManager lblTags.Visible = True btnImport.Enabled = True btnExport.Enabled = True + btnSessions.Enabled = True Case eModes.ViewTemp grpFilter.Enabled = True lstGames.Enabled = True @@ -971,6 +975,7 @@ Public Class frmGameManager btnExclude.Text = frmGameManager_btnExclude btnImport.Enabled = True btnExport.Enabled = True + btnSessions.Enabled = False Case eModes.Disabled grpFilter.Enabled = True lstGames.Enabled = True @@ -998,6 +1003,7 @@ Public Class frmGameManager btnExclude.Text = frmGameManager_btnExclude btnImport.Enabled = True btnExport.Enabled = True + btnSessions.Enabled = False Case eModes.MultiSelect lstGames.Enabled = True lblQuickFilter.Enabled = False @@ -1024,6 +1030,7 @@ Public Class frmGameManager lblTags.Visible = False btnImport.Enabled = True btnExport.Enabled = True + btnSessions.Enabled = False End Select lstGames.Focus() @@ -1174,6 +1181,7 @@ Public Class frmGameManager oApp.CleanFolder = chkCleanFolder.Checked oApp.AppendTimeStamp = chkTimeStamp.Checked oApp.BackupLimit = nudLimit.Value + oApp.Comments = txtComments.Text oApp.Enabled = chkEnabled.Checked oApp.MonitorOnly = chkMonitorOnly.Checked oApp.ProcessPath = txtAppPath.Text @@ -1547,6 +1555,7 @@ Public Class frmGameManager lblLimit.Text = frmGameManager_lblLimit cmsDeleteOne.Text = frmGameManager_cmsDeleteOne cmsDeleteAll.Text = frmGameManager_cmsDeleteAll + btnSessions.Text = frmGameManager_btnSessions 'Init Filter Timer tmFilterTimer = New Timer() @@ -1726,6 +1735,12 @@ Public Class frmGameManager ExportGameList() End Sub + Private Sub btnSessions_Click(sender As Object, e As EventArgs) Handles btnSessions.Click + Dim frm As New frmSession + frm.Game = CurrentGame + frm.ShowDialog() + End Sub + Private Sub txtQuickFilter_TextChanged(sender As Object, e As EventArgs) Handles txtQuickFilter.TextChanged If Not tmFilterTimer.Enabled Then tmFilterTimer.Enabled = True diff --git a/GBM/Forms/frmSession.Designer.vb b/GBM/Forms/frmSession.Designer.vb new file mode 100644 index 0000000..0af880c --- /dev/null +++ b/GBM/Forms/frmSession.Designer.vb @@ -0,0 +1,63 @@ + _ +Partial Class frmSession + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.dgSessions = New System.Windows.Forms.DataGridView() + CType(Me.dgSessions, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'dgSessions + ' + Me.dgSessions.AllowUserToAddRows = False + Me.dgSessions.AllowUserToDeleteRows = False + Me.dgSessions.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize + Me.dgSessions.Location = New System.Drawing.Point(11, 11) + Me.dgSessions.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2) + Me.dgSessions.Name = "dgSessions" + Me.dgSessions.ReadOnly = True + Me.dgSessions.RowHeadersVisible = False + Me.dgSessions.RowTemplate.Height = 24 + Me.dgSessions.Size = New System.Drawing.Size(612, 389) + Me.dgSessions.TabIndex = 0 + ' + 'frmSession + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(634, 411) + Me.Controls.Add(Me.dgSessions) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle + Me.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2) + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "frmSession" + Me.ShowIcon = False + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Sessions" + CType(Me.dgSessions, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents dgSessions As DataGridView +End Class diff --git a/GBM/Forms/frmSession.resx b/GBM/Forms/frmSession.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/GBM/Forms/frmSession.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GBM/Forms/frmSession.vb b/GBM/Forms/frmSession.vb new file mode 100644 index 0000000..0f62ec7 --- /dev/null +++ b/GBM/Forms/frmSession.vb @@ -0,0 +1,37 @@ +Imports GBM.My.Resources + +Public Class frmSession + + Private oGame As clsGame + + Property Game As clsGame + Set(value As clsGame) + oGame = value + End Set + Get + Return oGame + End Get + End Property + + Private Sub FormatGrid() + dgSessions.Columns.Add("Start", frmSession_ColumnStart) + dgSessions.Columns.Add("End", frmSession_ColumnEnd) + dgSessions.Columns.Add("Name", frmSession_ColumnComputerName) + End Sub + + Private Sub LoadData() + Me.Text = Game.Name & " " & frmSession_Name + + Dim oData As DataSet = mgrSessions.GetSessionsByGame(Game.ID) + + For Each dr As DataRow In oData.Tables(0).Rows + dgSessions.Rows.Add(New Object() {mgrCommon.UnixToDate(dr("Start")), mgrCommon.UnixToDate(dr("End")), dr("ComputerName")}) + Next + dgSessions.AutoResizeColumns() + End Sub + + Private Sub frmSession_Load(sender As Object, e As EventArgs) Handles MyBase.Load + FormatGrid() + LoadData() + End Sub +End Class \ No newline at end of file diff --git a/GBM/Game Backup Monitor.vbproj b/GBM/Game Backup Monitor.vbproj index ea4b379..d747e38 100644 --- a/GBM/Game Backup Monitor.vbproj +++ b/GBM/Game Backup Monitor.vbproj @@ -169,6 +169,12 @@ Form + + frmSession.vb + + + Form + frmStartUpWizard.vb @@ -269,6 +275,9 @@ frmIncludeExclude.vb + + frmSession.vb + frmStartUpWizard.vb Designer diff --git a/GBM/Managers/mgrMonitorList.vb b/GBM/Managers/mgrMonitorList.vb index edd08c7..2364f74 100644 --- a/GBM/Managers/mgrMonitorList.vb +++ b/GBM/Managers/mgrMonitorList.vb @@ -347,11 +347,11 @@ Public Class mgrMonitorList sVersion = "(SELECT Version FROM monitorlist WHERE MonitorID=@ID)" End If - sSQL = "INSERT OR REPLACE INTO monitorlist (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter) " + sSQL = "INSERT OR REPLACE INTO monitorlist (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter, Comments) " sSQL &= "VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, " sSQL &= sTimeStamp & ", @ExcludeList, " & sGamePath & ", " sSQL &= sIcon & ", @Hours, " & sVersion & ", " - sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, " & sBackupLimit & ", @CleanFolder, @Parameter);" + sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, " & sBackupLimit & ", @CleanFolder, @Parameter, @Comments);" For Each oGame As clsGame In hshGames.Values hshParams = New Hashtable diff --git a/GBM/Managers/mgrSessions.vb b/GBM/Managers/mgrSessions.vb index bea09b6..ce92811 100644 --- a/GBM/Managers/mgrSessions.vb +++ b/GBM/Managers/mgrSessions.vb @@ -34,4 +34,16 @@ oDatabase.RunParamQuery(sSQL, hshParams) End Sub + Public Shared Function GetSessionsByGame(ByVal sMonitorID As String) As DataSet + Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Remote) + Dim sSQL As String + Dim hshParams As New Hashtable + + sSQL = "SELECT Start, End, ComputerName FROM sessions WHERE MonitorID = @MonitorID;" + + hshParams.Add("MonitorID", sMonitorID) + + Return oDatabase.ReadParamData(sSQL, hshParams) + End Function + End Class diff --git a/GBM/Managers/mgrXML.vb b/GBM/Managers/mgrXML.vb index b432246..7b4258c 100644 --- a/GBM/Managers/mgrXML.vb +++ b/GBM/Managers/mgrXML.vb @@ -30,6 +30,7 @@ Public Class mgrXML oGame.ExcludeList = g.ExcludeList oGame.MonitorOnly = g.MonitorOnly oGame.Parameter = g.Parameter + oGame.Comments = g.Comments For Each t As Tag In g.Tags oGame.ImportTags.Add(t) Next diff --git a/GBM/My Project/Resources.Designer.vb b/GBM/My Project/Resources.Designer.vb index ef39147..8022671 100644 --- a/GBM/My Project/Resources.Designer.vb +++ b/GBM/My Project/Resources.Designer.vb @@ -22,7 +22,7 @@ Namespace My.Resources ''' ''' A strongly-typed resource class, for looking up localized strings, etc. ''' - _ @@ -1527,6 +1527,15 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized string similar to &View Sessions.... + ''' + Friend ReadOnly Property frmGameManager_btnSessions() As String + Get + Return ResourceManager.GetString("frmGameManager_btnSessions", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to Tags.... ''' @@ -3552,6 +3561,42 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized string similar to Computer Name. + ''' + Friend ReadOnly Property frmSession_ColumnComputerName() As String + Get + Return ResourceManager.GetString("frmSession_ColumnComputerName", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to End. + ''' + Friend ReadOnly Property frmSession_ColumnEnd() As String + Get + Return ResourceManager.GetString("frmSession_ColumnEnd", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Start. + ''' + Friend ReadOnly Property frmSession_ColumnStart() As String + Get + Return ResourceManager.GetString("frmSession_ColumnStart", resourceCulture) + End Get + End Property + + ''' + ''' Looks up a localized string similar to Sessions. + ''' + Friend ReadOnly Property frmSession_Name() As String + Get + Return ResourceManager.GetString("frmSession_Name", resourceCulture) + End Get + End Property + ''' ''' Looks up a localized string similar to Executable. ''' diff --git a/GBM/My Project/Resources.resx b/GBM/My Project/Resources.resx index 468bfb0..cc48879 100644 --- a/GBM/My Project/Resources.resx +++ b/GBM/My Project/Resources.resx @@ -1885,4 +1885,19 @@ Sort Options + + &View Sessions... + + + Computer Name + + + End + + + Start + + + Sessions + \ No newline at end of file