Functional in Mono
This commit is contained in:
Generated
-1
@@ -630,7 +630,6 @@ Partial Class frmGameManager
|
|||||||
Me.lstGames.Name = "lstGames"
|
Me.lstGames.Name = "lstGames"
|
||||||
Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||||
Me.lstGames.Size = New System.Drawing.Size(228, 381)
|
Me.lstGames.Size = New System.Drawing.Size(228, 381)
|
||||||
Me.lstGames.Sorted = True
|
|
||||||
Me.lstGames.TabIndex = 1
|
Me.lstGames.TabIndex = 1
|
||||||
'
|
'
|
||||||
'btnCancel
|
'btnCancel
|
||||||
|
|||||||
+17
-10
@@ -34,7 +34,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
Property BackupFolder As String
|
Property BackupFolder As String
|
||||||
Get
|
Get
|
||||||
Return sBackupFolder & "\"
|
Return sBackupFolder & Path.DirectorySeparatorChar
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sBackupFolder = value
|
sBackupFolder = value
|
||||||
@@ -175,7 +175,7 @@ Public Class frmGameManager
|
|||||||
sFileName = BackupFolder & oBackupItem.FileName
|
sFileName = BackupFolder & oBackupItem.FileName
|
||||||
|
|
||||||
'Rename Backup File
|
'Rename Backup File
|
||||||
sNewFileName = Path.GetDirectoryName(sFileName) & "\" & Path.GetFileName(sFileName).Replace(oOriginalApp.Name, oNewApp.Name)
|
sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(oOriginalApp.Name, oNewApp.Name)
|
||||||
If File.Exists(sFileName) Then
|
If File.Exists(sFileName) Then
|
||||||
FileSystem.Rename(sFileName, sNewFileName)
|
FileSystem.Rename(sFileName, sNewFileName)
|
||||||
End If
|
End If
|
||||||
@@ -265,7 +265,7 @@ Public Class frmGameManager
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
lstGames.Items.Clear()
|
lstGames.DataSource = Nothing
|
||||||
FormatAndFillList()
|
FormatAndFillList()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -365,23 +365,30 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CompareByName(sItem1 As KeyValuePair(Of String, String), sItem2 As KeyValuePair(Of String, String)) As Integer
|
||||||
|
Return String.Compare(sItem1.Value, sItem2.value)
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub FormatAndFillList()
|
Private Sub FormatAndFillList()
|
||||||
IsLoading = True
|
IsLoading = True
|
||||||
|
|
||||||
Dim oApp As clsGame
|
Dim oApp As clsGame
|
||||||
Dim oData As KeyValuePair(Of String, String)
|
Dim oData As KeyValuePair(Of String, String)
|
||||||
|
Dim oList As New List(Of KeyValuePair(Of String, String))
|
||||||
|
|
||||||
lstGames.ValueMember = "Key"
|
lstGames.ValueMember = "Key"
|
||||||
lstGames.DisplayMember = "Value"
|
lstGames.DisplayMember = "Value"
|
||||||
|
|
||||||
lstGames.BeginUpdate()
|
|
||||||
|
|
||||||
For Each de As DictionaryEntry In AppData
|
For Each de As DictionaryEntry In AppData
|
||||||
oApp = DirectCast(de.Value, clsGame)
|
oApp = DirectCast(de.Value, clsGame)
|
||||||
oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name)
|
oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name)
|
||||||
lstGames.Items.Add(oData)
|
oList.Add(oData)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
oList.Sort(AddressOf CompareByName)
|
||||||
|
|
||||||
|
lstGames.BeginUpdate()
|
||||||
|
lstGames.DataSource = oList
|
||||||
lstGames.EndUpdate()
|
lstGames.EndUpdate()
|
||||||
|
|
||||||
IsLoading = False
|
IsLoading = False
|
||||||
@@ -979,13 +986,11 @@ Public Class frmGameManager
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
If bSuccess Then
|
If bSuccess Then
|
||||||
Dim iSelected As Integer
|
|
||||||
IsDirty = False
|
IsDirty = False
|
||||||
LoadData()
|
LoadData()
|
||||||
iSelected = lstGames.Items.IndexOf(New KeyValuePair(Of String, String)(oApp.ID, oApp.Name))
|
|
||||||
If iSelected = -1 Then eCurrentMode = eModes.Disabled
|
|
||||||
ModeChange()
|
ModeChange()
|
||||||
If eCurrentMode = eModes.View Then lstGames.SelectedIndex = iSelected
|
lstGames.ClearSelected()
|
||||||
|
If eCurrentMode = eModes.View Then lstGames.SelectedValue = oApp.ID
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1293,6 +1298,8 @@ Public Class frmGameManager
|
|||||||
AssignDirtyHandlers(grpExtra.Controls)
|
AssignDirtyHandlers(grpExtra.Controls)
|
||||||
AssignDirtyHandlers(grpStats.Controls)
|
AssignDirtyHandlers(grpStats.Controls)
|
||||||
AssignDirtyHandlersMisc()
|
AssignDirtyHandlersMisc()
|
||||||
|
|
||||||
|
LoadData(False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub lstGames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedIndexChanged
|
Private Sub lstGames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedIndexChanged
|
||||||
|
|||||||
Generated
+10
-18
@@ -47,9 +47,9 @@ Partial Class frmMain
|
|||||||
Me.bwMonitor = New System.ComponentModel.BackgroundWorker()
|
Me.bwMonitor = New System.ComponentModel.BackgroundWorker()
|
||||||
Me.txtLog = New System.Windows.Forms.TextBox()
|
Me.txtLog = New System.Windows.Forms.TextBox()
|
||||||
Me.gMonStatusStrip = New System.Windows.Forms.StatusStrip()
|
Me.gMonStatusStrip = New System.Windows.Forms.StatusStrip()
|
||||||
Me.gMonStripAdminButton = New System.Windows.Forms.ToolStripSplitButton()
|
Me.gMonStripAdminButton = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.gMonStripTxtStatus = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.gMonStripTxtStatus = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripSplitButton()
|
Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.gMonMainMenu = New System.Windows.Forms.MenuStrip()
|
Me.gMonMainMenu = New System.Windows.Forms.MenuStrip()
|
||||||
Me.gMonFile = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonFile = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonFileMonitor = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonFileMonitor = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
@@ -238,7 +238,7 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
Me.gMonStatusStrip.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.gMonStatusStrip.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.gMonStatusStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonStripAdminButton, Me.gMonStripTxtStatus, Me.gMonStripStatusButton})
|
Me.gMonStatusStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonStripAdminButton, Me.gMonStripTxtStatus, Me.gMonStripStatusButton})
|
||||||
Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 364)
|
Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 379)
|
||||||
Me.gMonStatusStrip.Name = "gMonStatusStrip"
|
Me.gMonStatusStrip.Name = "gMonStatusStrip"
|
||||||
Me.gMonStatusStrip.ShowItemToolTips = True
|
Me.gMonStatusStrip.ShowItemToolTips = True
|
||||||
Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22)
|
Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22)
|
||||||
@@ -248,33 +248,25 @@ Partial Class frmMain
|
|||||||
'gMonStripAdminButton
|
'gMonStripAdminButton
|
||||||
'
|
'
|
||||||
Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||||
Me.gMonStripAdminButton.DropDownButtonWidth = 0
|
|
||||||
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User
|
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User
|
||||||
Me.gMonStripAdminButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
|
||||||
Me.gMonStripAdminButton.Name = "gMonStripAdminButton"
|
Me.gMonStripAdminButton.Name = "gMonStripAdminButton"
|
||||||
Me.gMonStripAdminButton.Size = New System.Drawing.Size(21, 20)
|
Me.gMonStripAdminButton.Size = New System.Drawing.Size(16, 17)
|
||||||
Me.gMonStripAdminButton.Text = "Elevation"
|
Me.gMonStripAdminButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
||||||
Me.gMonStripAdminButton.ToolTipText = "Elevation"
|
|
||||||
'
|
'
|
||||||
'gMonStripTxtStatus
|
'gMonStripTxtStatus
|
||||||
'
|
'
|
||||||
Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus"
|
Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus"
|
||||||
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(395, 17)
|
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(405, 17)
|
||||||
Me.gMonStripTxtStatus.Spring = True
|
Me.gMonStripTxtStatus.Spring = True
|
||||||
Me.gMonStripTxtStatus.Text = "Monitor Status"
|
Me.gMonStripTxtStatus.Text = "Monitor Status"
|
||||||
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
'
|
'
|
||||||
'gMonStripStatusButton
|
'gMonStripStatusButton
|
||||||
'
|
'
|
||||||
Me.gMonStripStatusButton.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
|
|
||||||
Me.gMonStripStatusButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
|
||||||
Me.gMonStripStatusButton.DropDownButtonWidth = 0
|
|
||||||
Me.gMonStripStatusButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
|
||||||
Me.gMonStripStatusButton.Name = "gMonStripStatusButton"
|
Me.gMonStripStatusButton.Name = "gMonStripStatusButton"
|
||||||
Me.gMonStripStatusButton.Size = New System.Drawing.Size(93, 20)
|
Me.gMonStripStatusButton.Size = New System.Drawing.Size(88, 17)
|
||||||
Me.gMonStripStatusButton.Text = "Monitor Status:"
|
Me.gMonStripStatusButton.Text = "Monitor Status:"
|
||||||
Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
||||||
Me.gMonStripStatusButton.ToolTipText = "Click to toggle monitoring on or off."
|
|
||||||
'
|
'
|
||||||
'gMonMainMenu
|
'gMonMainMenu
|
||||||
'
|
'
|
||||||
@@ -531,7 +523,7 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(524, 386)
|
Me.ClientSize = New System.Drawing.Size(524, 401)
|
||||||
Me.Controls.Add(Me.pbTime)
|
Me.Controls.Add(Me.pbTime)
|
||||||
Me.Controls.Add(Me.lblStatus3)
|
Me.Controls.Add(Me.lblStatus3)
|
||||||
Me.Controls.Add(Me.lblStatus2)
|
Me.Controls.Add(Me.lblStatus2)
|
||||||
@@ -593,7 +585,6 @@ Partial Class frmMain
|
|||||||
Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonStripStatusButton As System.Windows.Forms.ToolStripSplitButton
|
|
||||||
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
|
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
|
||||||
Friend WithEvents btnLogToggle As System.Windows.Forms.Button
|
Friend WithEvents btnLogToggle As System.Windows.Forms.Button
|
||||||
Friend WithEvents lblGameTitle As System.Windows.Forms.Label
|
Friend WithEvents lblGameTitle As System.Windows.Forms.Label
|
||||||
@@ -611,7 +602,6 @@ Partial Class frmMain
|
|||||||
Friend WithEvents gMonHelpManual As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonHelpManual As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents btnCancelOperation As System.Windows.Forms.Button
|
Friend WithEvents btnCancelOperation As System.Windows.Forms.Button
|
||||||
Friend WithEvents gMonStripAdminButton As ToolStripSplitButton
|
|
||||||
Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents lblStatus1 As Label
|
Friend WithEvents lblStatus1 As Label
|
||||||
@@ -629,4 +619,6 @@ Partial Class frmMain
|
|||||||
Friend WithEvents gMonTrayToolsLog As ToolStripMenuItem
|
Friend WithEvents gMonTrayToolsLog As ToolStripMenuItem
|
||||||
Friend WithEvents gMonTrayLogClear As ToolStripMenuItem
|
Friend WithEvents gMonTrayLogClear As ToolStripMenuItem
|
||||||
Friend WithEvents gMonTrayLogSave As ToolStripMenuItem
|
Friend WithEvents gMonTrayLogSave As ToolStripMenuItem
|
||||||
|
Friend WithEvents gMonStripAdminButton As System.Windows.Forms.ToolStripStatusLabel
|
||||||
|
Friend WithEvents gMonStripStatusButton As System.Windows.Forms.ToolStripStatusLabel
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+38
-2899
File diff suppressed because it is too large
Load Diff
@@ -798,14 +798,14 @@ Public Class frmMain
|
|||||||
Private Sub ToggleLog()
|
Private Sub ToggleLog()
|
||||||
If bLogToggle = False Then
|
If bLogToggle = False Then
|
||||||
txtLog.Visible = True
|
txtLog.Visible = True
|
||||||
Me.Size = New System.Drawing.Size(540, 425)
|
Me.Size = New System.Drawing.Size(Me.Size.Width, 440)
|
||||||
bLogToggle = True
|
bLogToggle = True
|
||||||
btnLogToggle.Text = frmMain_btnToggleLog_Hide
|
btnLogToggle.Text = frmMain_btnToggleLog_Hide
|
||||||
txtLog.Select(txtLog.TextLength, 0)
|
txtLog.Select(txtLog.TextLength, 0)
|
||||||
txtLog.ScrollToCaret()
|
txtLog.ScrollToCaret()
|
||||||
Else
|
Else
|
||||||
txtLog.Visible = False
|
txtLog.Visible = False
|
||||||
Me.Size = New System.Drawing.Size(540, 245)
|
Me.Size = New System.Drawing.Size(Me.Size.Width, 245)
|
||||||
bLogToggle = False
|
bLogToggle = False
|
||||||
btnLogToggle.Text = frmMain_btnToggleLog_Show
|
btnLogToggle.Text = frmMain_btnToggleLog_Show
|
||||||
End If
|
End If
|
||||||
@@ -1080,7 +1080,7 @@ Public Class frmMain
|
|||||||
lblLastAction.Text = String.Empty
|
lblLastAction.Text = String.Empty
|
||||||
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
|
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
|
||||||
pbTime.Image = Icon_Clock
|
pbTime.Image = Icon_Clock
|
||||||
Me.Size = New System.Drawing.Size(540, 245)
|
Me.Size = New System.Drawing.Size(Me.Size.Width, 245)
|
||||||
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
|
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
|
||||||
ResetGameInfo()
|
ResetGameInfo()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1386,7 +1386,7 @@ Public Class frmMain
|
|||||||
ToggleLog()
|
ToggleLog()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub gMonStripSplitButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripStatusButton.ButtonClick
|
Private Sub gMonStripSplitStatusButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripStatusButton.Click
|
||||||
ScanToggle()
|
ScanToggle()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1406,7 +1406,7 @@ Public Class frmMain
|
|||||||
OperationCancel()
|
OperationCancel()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub gMonStripAdminButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripAdminButton.ButtonClick
|
Private Sub gMonStripAdminButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripAdminButton.Click
|
||||||
RestartAsAdmin()
|
RestartAsAdmin()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1534,7 +1534,6 @@ Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||||
|
|
||||||
'Init
|
'Init
|
||||||
Try
|
Try
|
||||||
SetForm()
|
SetForm()
|
||||||
@@ -1565,7 +1564,6 @@ Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||||
|
|
||||||
If bFirstRun And Not bInitFail Then
|
If bFirstRun And Not bInitFail Then
|
||||||
OpenStartupWizard()
|
OpenStartupWizard()
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -91,12 +91,12 @@
|
|||||||
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="Mono.Data.Sqlite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>References\Mono.Data.Sqlite.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.94.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>References\System.Data.SQLite.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
@@ -320,7 +320,7 @@
|
|||||||
<Content Include="License\credits.txt">
|
<Content Include="License\credits.txt">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="References\System.Data.SQLite.dll" />
|
<Content Include="References\Mono.Data.Sqlite.dll" />
|
||||||
<None Include="Resources\gbm.ico" />
|
<None Include="Resources\gbm.ico" />
|
||||||
<Content Include="Resources\Admin.png" />
|
<Content Include="Resources\Admin.png" />
|
||||||
<Content Include="Resources\Clock.png" />
|
<Content Include="Resources\Clock.png" />
|
||||||
@@ -332,6 +332,9 @@
|
|||||||
<Content Include="Resources\Inbox.png" />
|
<Content Include="Resources\Inbox.png" />
|
||||||
<Content Include="Resources\type.ico" />
|
<Content Include="Resources\type.ico" />
|
||||||
<Content Include="Resources\User.png" />
|
<Content Include="Resources\User.png" />
|
||||||
|
<Content Include="sqlite3.dll">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="Utilities\x64\7za.dll">
|
<Content Include="Utilities\x64\7za.dll">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@@ -350,12 +353,6 @@
|
|||||||
<Content Include="Utilities\x86\7zxa.dll">
|
<Content Include="Utilities\x86\7zxa.dll">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="x64\SQLite.Interop.dll">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="x86\SQLite.Interop.dll">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<None Include="Resources\Stopped.png" />
|
<None Include="Resources\Stopped.png" />
|
||||||
<None Include="Resources\Detected.png" />
|
<None Include="Resources\Detected.png" />
|
||||||
<None Include="Resources\Ready.png" />
|
<None Include="Resources\Ready.png" />
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ Public Class mgrBackup
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If oSettings.CreateSubFolder Then
|
If oSettings.CreateSubFolder Then
|
||||||
sBackupFile = sBackupFile & "\" & oGame.Name
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name
|
||||||
Try
|
Try
|
||||||
If Not Directory.Exists(sBackupFile) Then
|
If Not Directory.Exists(sBackupFile) Then
|
||||||
Directory.CreateDirectory(sBackupFile)
|
Directory.CreateDirectory(sBackupFile)
|
||||||
@@ -168,7 +168,8 @@ Public Class mgrBackup
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Directory.Exists(sSavePath) Then
|
If Directory.Exists(sSavePath) Then
|
||||||
prs7z.StartInfo.Arguments = "a -bb1 -bt -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
|
'prs7z.StartInfo.Arguments = "a -bb1 -bt -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
|
||||||
|
prs7z.StartInfo.Arguments = "a -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
|
||||||
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
||||||
prs7z.StartInfo.UseShellExecute = False
|
prs7z.StartInfo.UseShellExecute = False
|
||||||
prs7z.StartInfo.RedirectStandardOutput = True
|
prs7z.StartInfo.RedirectStandardOutput = True
|
||||||
|
|||||||
@@ -108,7 +108,18 @@ Public Class mgrCommon
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IsUnix() As Boolean
|
||||||
|
If Path.DirectorySeparatorChar = "/" Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Shared Function IsElevated() As Boolean
|
Public Shared Function IsElevated() As Boolean
|
||||||
|
If IsUnix() Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then
|
If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
|
|||||||
+24
-13
@@ -39,6 +39,10 @@ Public Class mgrPath
|
|||||||
|
|
||||||
Shared ReadOnly Property Utility7zLocation As String
|
Shared ReadOnly Property Utility7zLocation As String
|
||||||
Get
|
Get
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
Return "/usr/bin/7za"
|
||||||
|
End If
|
||||||
|
|
||||||
Select Case oReleaseType
|
Select Case oReleaseType
|
||||||
Case ProcessorArchitecture.Amd64
|
Case ProcessorArchitecture.Amd64
|
||||||
Return Application.StartupPath & "/Utilities/x64/7za.exe"
|
Return Application.StartupPath & "/Utilities/x64/7za.exe"
|
||||||
@@ -91,7 +95,7 @@ Public Class mgrPath
|
|||||||
Return sRemoteDatabaseLocation
|
Return sRemoteDatabaseLocation
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sRemoteDatabaseLocation = value & "\gbm.s3db"
|
sRemoteDatabaseLocation = value & "/gbm.s3db"
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -191,14 +195,11 @@ Public Class mgrPath
|
|||||||
Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
||||||
Dim oCustomVariable As clsPathVariable
|
Dim oCustomVariable As clsPathVariable
|
||||||
|
|
||||||
|
|
||||||
If sValue.Contains("*mydocs*") Then
|
If sValue.Contains("*mydocs*") Then
|
||||||
Return sValue.Replace("*mydocs*", sMyDocs)
|
Return sValue.Replace("*mydocs*", sMyDocs)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sValue.Contains("*publicdocs*") Then
|
|
||||||
Return sValue.Replace("*publicdocs*", sPublicDocs)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sValue.Contains("*appdatalocal*") Then
|
If sValue.Contains("*appdatalocal*") Then
|
||||||
Return sValue.Replace("*appdatalocal*", sAppDataLocal)
|
Return sValue.Replace("*appdatalocal*", sAppDataLocal)
|
||||||
End If
|
End If
|
||||||
@@ -207,8 +208,15 @@ Public Class mgrPath
|
|||||||
Return sValue.Replace("*appdataroaming*", sAppDataRoaming)
|
Return sValue.Replace("*appdataroaming*", sAppDataRoaming)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sValue.Contains("*currentuser*") Then
|
'These don't work on Unix OS
|
||||||
Return sValue.Replace("*currentuser*", sCurrentUser)
|
If Not mgrCommon.IsUnix Then
|
||||||
|
If sValue.Contains("*publicdocs*") Then
|
||||||
|
Return sValue.Replace("*publicdocs*", sPublicDocs)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sValue.Contains("*currentuser*") Then
|
||||||
|
Return sValue.Replace("*currentuser*", sCurrentUser)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each oCustomVariable In hshCustomVariables.Values
|
For Each oCustomVariable In hshCustomVariables.Values
|
||||||
@@ -232,10 +240,6 @@ Public Class mgrPath
|
|||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs)
|
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
|
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then
|
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal)
|
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal)
|
||||||
End If
|
End If
|
||||||
@@ -244,8 +248,15 @@ Public Class mgrPath
|
|||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming)
|
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
|
'These don't work on Unix OS
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
|
If Not mgrCommon.IsUnix Then
|
||||||
|
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
|
||||||
|
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
|
||||||
|
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each oCustomVariable In hshCustomVariables.Values
|
For Each oCustomVariable In hshCustomVariables.Values
|
||||||
|
|||||||
@@ -90,7 +90,11 @@ Public Class mgrProcesses
|
|||||||
Dim sProcessCheck As String = String.Empty
|
Dim sProcessCheck As String = String.Empty
|
||||||
|
|
||||||
For Each prsCurrent As Process In prsList
|
For Each prsCurrent As Process In prsList
|
||||||
sProcessCheck = prsCurrent.ProcessName
|
Try
|
||||||
|
sProcessCheck = prsCurrent.ProcessName
|
||||||
|
Catch ex As Exception
|
||||||
|
'Do Nothing
|
||||||
|
End Try
|
||||||
|
|
||||||
If hshScanList.ContainsKey(sProcessCheck) Then
|
If hshScanList.ContainsKey(sProcessCheck) Then
|
||||||
prsFoundProcess = prsCurrent
|
prsFoundProcess = prsCurrent
|
||||||
@@ -117,10 +121,12 @@ Public Class mgrProcesses
|
|||||||
bNeedsPath = True
|
bNeedsPath = True
|
||||||
iErrorCode = 299
|
iErrorCode = 299
|
||||||
Else
|
Else
|
||||||
|
MsgBox(exWin32.Message & vbCrLf & exWin32.StackTrace)
|
||||||
'A different failure occured, drop out and continue to scan.
|
'A different failure occured, drop out and continue to scan.
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
Catch exAll As Exception
|
Catch exAll As Exception
|
||||||
|
MsgBox(exAll.Message & vbCrLf & exAll.StackTrace)
|
||||||
'A different failure occured, drop out and continue to scan.
|
'A different failure occured, drop out and continue to scan.
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ Public Class mgrRestore
|
|||||||
If bDoRestore Then
|
If bDoRestore Then
|
||||||
Try
|
Try
|
||||||
If File.Exists(sBackupFile) Then
|
If File.Exists(sBackupFile) Then
|
||||||
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & "\"" -aoa -r"
|
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
|
||||||
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
||||||
prs7z.StartInfo.UseShellExecute = False
|
prs7z.StartInfo.UseShellExecute = False
|
||||||
prs7z.StartInfo.RedirectStandardOutput = True
|
prs7z.StartInfo.RedirectStandardOutput = True
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Imports GBM.My.Resources
|
Imports GBM.My.Resources
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Data.SQLite
|
Imports Mono.Data.Sqlite
|
||||||
|
|
||||||
Public Class mgrSQLite
|
Public Class mgrSQLite
|
||||||
|
|
||||||
@@ -232,7 +232,8 @@ Public Class mgrSQLite
|
|||||||
BuildParams(command, hshParams)
|
BuildParams(command, hshParams)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
adapter = New SQLiteDataAdapter(command)
|
adapter = New SqliteDataAdapter()
|
||||||
|
adapter.SelectCommand = command
|
||||||
adapter.Fill(oData)
|
adapter.Fill(oData)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user