diff --git a/GBM/Classes/clsSession.vb b/GBM/Classes/clsSession.vb deleted file mode 100644 index cec5e2b..0000000 --- a/GBM/Classes/clsSession.vb +++ /dev/null @@ -1,44 +0,0 @@ -Public Class clsSession - - Private sMonitorID As String - Private dStart As DateTime - Private dEnd As DateTime - Private sComputerName As String = My.Computer.Name - - Public Property MonitorID As String - Set(value As String) - sMonitorID = value - End Set - Get - Return sMonitorID - End Get - End Property - - Public Property SessionStart As DateTime - Set(value As DateTime) - dStart = value - End Set - Get - Return dStart - End Get - End Property - - Public Property SessionEnd As DateTime - Set(value As DateTime) - dEnd = value - End Set - Get - Return dEnd - End Get - End Property - - Public Property ComputerName As String - Set(value As String) - sComputerName = value - End Set - Get - Return sComputerName - End Get - End Property - -End Class diff --git a/GBM/Forms/frmGameManager.Designer.vb b/GBM/Forms/frmGameManager.Designer.vb index b658e3c..38fb8d0 100644 --- a/GBM/Forms/frmGameManager.Designer.vb +++ b/GBM/Forms/frmGameManager.Designer.vb @@ -28,6 +28,8 @@ Partial Class frmGameManager Me.btnBackup = New System.Windows.Forms.Button() Me.btnClose = New System.Windows.Forms.Button() Me.grpConfig = New System.Windows.Forms.GroupBox() + Me.lblComments = New System.Windows.Forms.Label() + Me.txtComments = New System.Windows.Forms.TextBox() Me.txtParameter = New System.Windows.Forms.TextBox() Me.lblParameter = New System.Windows.Forms.Label() Me.chkCleanFolder = New System.Windows.Forms.CheckBox() @@ -98,9 +100,6 @@ 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() @@ -140,7 +139,7 @@ Partial Class frmGameManager 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 + Me.btnBackup.TabIndex = 18 Me.btnBackup.Text = "&Backup" Me.btnBackup.UseVisualStyleBackColor = True ' @@ -150,7 +149,7 @@ Partial Class frmGameManager 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 + Me.btnClose.TabIndex = 19 Me.btnClose.Text = "C&lose" Me.btnClose.UseVisualStyleBackColor = True ' @@ -187,6 +186,24 @@ Partial Class frmGameManager Me.grpConfig.TabStop = False Me.grpConfig.Text = "Configuration" ' + '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:" + ' + '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 + ' 'txtParameter ' Me.txtParameter.Location = New System.Drawing.Point(333, 45) @@ -662,7 +679,7 @@ Partial Class frmGameManager 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 + Me.btnMarkAsRestored.TabIndex = 16 Me.btnMarkAsRestored.Text = "&Mark as Restored" Me.btnMarkAsRestored.UseVisualStyleBackColor = True ' @@ -672,7 +689,7 @@ Partial Class frmGameManager 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 + Me.btnRestore.TabIndex = 17 Me.btnRestore.Text = "&Restore" Me.btnRestore.UseVisualStyleBackColor = True ' @@ -844,39 +861,11 @@ 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, 621) - Me.Controls.Add(Me.btnSessions) Me.Controls.Add(Me.lblQuickFilter) Me.Controls.Add(Me.txtQuickFilter) Me.Controls.Add(Me.btnExport) @@ -996,7 +985,6 @@ 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 b7d68f0..73b9a42 100644 --- a/GBM/Forms/frmGameManager.vb +++ b/GBM/Forms/frmGameManager.vb @@ -907,7 +907,6 @@ 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 @@ -932,7 +931,6 @@ Public Class frmGameManager lblTags.Visible = True btnImport.Enabled = False btnExport.Enabled = False - btnSessions.Enabled = False Case eModes.View grpFilter.Enabled = True lstGames.Enabled = True @@ -952,7 +950,6 @@ Public Class frmGameManager lblTags.Visible = True btnImport.Enabled = True btnExport.Enabled = True - btnSessions.Enabled = True Case eModes.ViewTemp grpFilter.Enabled = True lstGames.Enabled = True @@ -975,7 +972,6 @@ 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 @@ -1003,7 +999,6 @@ 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 @@ -1030,7 +1025,6 @@ Public Class frmGameManager lblTags.Visible = False btnImport.Enabled = True btnExport.Enabled = True - btnSessions.Enabled = False End Select lstGames.Focus() @@ -1555,7 +1549,6 @@ 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() @@ -1735,12 +1728,6 @@ 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/frmMain.vb b/GBM/Forms/frmMain.vb index db15ac7..f1991d2 100644 --- a/GBM/Forms/frmMain.vb +++ b/GBM/Forms/frmMain.vb @@ -714,17 +714,6 @@ Public Class frmMain UpdateTimeSpent(dCurrentHours, oProcess.TimeSpent.TotalHours) End Sub - Private Sub HandleSession() - Dim oSession As New clsSession - - 'Record Session - oSession.MonitorID = oProcess.GameInfo.ID - oSession.SessionStart = oProcess.StartTime - oSession.SessionEnd = oProcess.EndTime - - mgrSessions.AddSession(oSession) - End Sub - Private Function SupressBackup() As Boolean Dim iSession As Integer If oSettings.SupressBackup Then @@ -1777,7 +1766,6 @@ Public Class frmMain bContinue = False If oSettings.TimeTracking Then HandleTimeSpent() - HandleSession() End If UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupUnknownPath, oProcess.GameInfo.Name), False) oProcess.GameInfo = Nothing @@ -1791,7 +1779,6 @@ Public Class frmMain UpdateLog(mgrCommon.FormatString(frmMain_GameEnded, oProcess.GameInfo.Name), False) If oSettings.TimeTracking Then HandleTimeSpent() - HandleSession() End If RunBackup() Else diff --git a/GBM/Forms/frmSession.Designer.vb b/GBM/Forms/frmSession.Designer.vb deleted file mode 100644 index 0af880c..0000000 --- a/GBM/Forms/frmSession.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ - _ -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 deleted file mode 100644 index 1af7de1..0000000 --- a/GBM/Forms/frmSession.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 deleted file mode 100644 index 0f62ec7..0000000 --- a/GBM/Forms/frmSession.vb +++ /dev/null @@ -1,37 +0,0 @@ -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 b543ad8..52688e2 100644 --- a/GBM/Game Backup Monitor.vbproj +++ b/GBM/Game Backup Monitor.vbproj @@ -125,7 +125,6 @@ - @@ -171,12 +170,6 @@ Form - - frmSession.vb - - - Form - frmStartUpWizard.vb @@ -234,7 +227,6 @@ - @@ -277,9 +269,6 @@ frmIncludeExclude.vb - - frmSession.vb - frmStartUpWizard.vb Designer diff --git a/GBM/Managers/mgrSQLite.vb b/GBM/Managers/mgrSQLite.vb index 937a0a1..f7bc44c 100644 --- a/GBM/Managers/mgrSQLite.vb +++ b/GBM/Managers/mgrSQLite.vb @@ -132,10 +132,6 @@ Public Class mgrSQLite 'Add Tables (Remote Game Tags) sSql &= "CREATE TABLE gametags (TagID TEXT NOT NULL, MonitorID TEXT NOT NULL, PRIMARY KEY(TagID, MonitorID)); " - 'Add Tables (Sessions) - sSql &= "CREATE TABLE sessions (MonitorID TEXT NOT NULL, Start INTEGER NOT NULL, End INTEGER NOT NULL, " & - "ComputerName TEXT NOT NULL, PRIMARY KEY(MonitorID, Start));" - 'Set Version sSql &= "PRAGMA user_version=" & mgrCommon.AppVersion @@ -701,12 +697,8 @@ Public Class mgrSQLite 'Backup DB before starting BackupDB("v102") - 'Add Tables (Sessions) - sSQL = "CREATE TABLE sessions (MonitorID TEXT NOT NULL, Start INTEGER NOT NULL, End INTEGER NOT NULL, " & - "ComputerName TEXT NOT NULL, PRIMARY KEY(MonitorID, Start));" - 'Add new field(s) - sSQL &= "ALTER TABLE monitorlist ADD COLUMN Comments TEXT;" + sSQL = "ALTER TABLE monitorlist ADD COLUMN Comments TEXT;" sSQL &= "PRAGMA user_version=105" diff --git a/GBM/Managers/mgrSessions.vb b/GBM/Managers/mgrSessions.vb deleted file mode 100644 index ce92811..0000000 --- a/GBM/Managers/mgrSessions.vb +++ /dev/null @@ -1,49 +0,0 @@ -Public Class mgrSessions - - Private Shared Function MapToObject(ByVal dr As DataRow) As clsSession - Dim oSession As New clsSession - - oSession.MonitorID = CStr(dr("MonitorID")) - oSession.SessionStart = mgrCommon.UnixToDate(CInt(dr("Start"))) - oSession.SessionEnd = mgrCommon.UnixToDate(CInt(dr("End"))) - oSession.ComputerName = CStr(dr("ComputerName")) - - Return oSession - End Function - - Private Shared Function SetCoreParameters(ByVal oSession As clsSession) As Hashtable - Dim hshParams As New Hashtable - - hshParams.Add("MonitorID", oSession.MonitorID) - hshParams.Add("Start", mgrCommon.DateToUnix(oSession.SessionStart)) - hshParams.Add("End", mgrCommon.DateToUnix(oSession.SessionEnd)) - hshParams.Add("ComputerName", oSession.ComputerName) - - Return hshParams - End Function - - Public Shared Sub AddSession(ByVal oSession As clsSession) - Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Remote) - Dim sSQL As String - Dim hshParams As Hashtable - - sSQL = "INSERT INTO sessions (MonitorID, Start, End, ComputerName) VALUES (@MonitorID, @Start, @End, @ComputerName);" - - hshParams = SetCoreParameters(oSession) - - 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/My Project/Resources.Designer.vb b/GBM/My Project/Resources.Designer.vb index 9acc98a..d1c3aba 100644 --- a/GBM/My Project/Resources.Designer.vb +++ b/GBM/My Project/Resources.Designer.vb @@ -1536,15 +1536,6 @@ 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.... ''' @@ -3570,42 +3561,6 @@ 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 06677f7..d190a54 100644 --- a/GBM/My Project/Resources.resx +++ b/GBM/My Project/Resources.resx @@ -1885,21 +1885,6 @@ Sort Options - - &View Sessions... - - - Computer Name - - - End - - - Start - - - Sessions - Comments