Revert all changes for issue #99
This commit is contained in:
@@ -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
|
||||
Generated
+24
-36
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Generated
-63
@@ -1,63 +0,0 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmSession
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
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.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
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
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -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
|
||||
@@ -125,7 +125,6 @@
|
||||
<Compile Include="Classes\clsGameFilter.vb" />
|
||||
<Compile Include="Classes\clsGameFilterField.vb" />
|
||||
<Compile Include="Classes\clsSavedPath.vb" />
|
||||
<Compile Include="Classes\clsSession.vb" />
|
||||
<Compile Include="Classes\XML Serialize Classes\ExportData.vb" />
|
||||
<Compile Include="Classes\XML Serialize Classes\ExportInformation.vb" />
|
||||
<Compile Include="Classes\XML Serialize Classes\Tag.vb" />
|
||||
@@ -171,12 +170,6 @@
|
||||
<Compile Include="Forms\frmIncludeExclude.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSession.Designer.vb">
|
||||
<DependentUpon>frmSession.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSession.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmStartUpWizard.Designer.vb">
|
||||
<DependentUpon>frmStartUpWizard.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -234,7 +227,6 @@
|
||||
<Compile Include="Managers\mgrPath.vb" />
|
||||
<Compile Include="Managers\mgrRestore.vb" />
|
||||
<Compile Include="Managers\mgrSavedPath.vb" />
|
||||
<Compile Include="Managers\mgrSessions.vb" />
|
||||
<Compile Include="Managers\mgrSettings.vb" />
|
||||
<Compile Include="Managers\mgrBackup.vb" />
|
||||
<Compile Include="Managers\mgrSQLite.vb" />
|
||||
@@ -277,9 +269,6 @@
|
||||
<EmbeddedResource Include="Forms\frmIncludeExclude.resx">
|
||||
<DependentUpon>frmIncludeExclude.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmSession.resx">
|
||||
<DependentUpon>frmSession.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmStartUpWizard.resx">
|
||||
<DependentUpon>frmStartUpWizard.vb</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
Generated
-45
@@ -1536,15 +1536,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &View Sessions....
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_btnSessions() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_btnSessions", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Tags....
|
||||
'''</summary>
|
||||
@@ -3570,42 +3561,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Computer Name.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSession_ColumnComputerName() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSession_ColumnComputerName", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to End.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSession_ColumnEnd() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSession_ColumnEnd", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Start.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSession_ColumnStart() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSession_ColumnStart", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Sessions.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSession_Name() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSession_Name", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Executable.
|
||||
'''</summary>
|
||||
|
||||
@@ -1885,21 +1885,6 @@
|
||||
<data name="frmFilter_grpSortOptions" xml:space="preserve">
|
||||
<value>Sort Options</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnSessions" xml:space="preserve">
|
||||
<value>&View Sessions...</value>
|
||||
</data>
|
||||
<data name="frmSession_ColumnComputerName" xml:space="preserve">
|
||||
<value>Computer Name</value>
|
||||
</data>
|
||||
<data name="frmSession_ColumnEnd" xml:space="preserve">
|
||||
<value>End</value>
|
||||
</data>
|
||||
<data name="frmSession_ColumnStart" xml:space="preserve">
|
||||
<value>Start</value>
|
||||
</data>
|
||||
<data name="frmSession_Name" xml:space="preserve">
|
||||
<value>Sessions</value>
|
||||
</data>
|
||||
<data name="frmFilter_FieldComments" xml:space="preserve">
|
||||
<value>Comments</value>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user