Functional in Mono
This commit is contained in:
Generated
-1
@@ -630,7 +630,6 @@ Partial Class frmGameManager
|
||||
Me.lstGames.Name = "lstGames"
|
||||
Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstGames.Size = New System.Drawing.Size(228, 381)
|
||||
Me.lstGames.Sorted = True
|
||||
Me.lstGames.TabIndex = 1
|
||||
'
|
||||
'btnCancel
|
||||
|
||||
+19
-12
@@ -34,7 +34,7 @@ Public Class frmGameManager
|
||||
|
||||
Property BackupFolder As String
|
||||
Get
|
||||
Return sBackupFolder & "\"
|
||||
Return sBackupFolder & Path.DirectorySeparatorChar
|
||||
End Get
|
||||
Set(value As String)
|
||||
sBackupFolder = value
|
||||
@@ -175,7 +175,7 @@ Public Class frmGameManager
|
||||
sFileName = BackupFolder & oBackupItem.FileName
|
||||
|
||||
'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
|
||||
FileSystem.Rename(sFileName, sNewFileName)
|
||||
End If
|
||||
@@ -265,7 +265,7 @@ Public Class frmGameManager
|
||||
Next
|
||||
End If
|
||||
|
||||
lstGames.Items.Clear()
|
||||
lstGames.DataSource = Nothing
|
||||
FormatAndFillList()
|
||||
End Sub
|
||||
|
||||
@@ -365,24 +365,31 @@ Public Class frmGameManager
|
||||
|
||||
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()
|
||||
IsLoading = True
|
||||
|
||||
Dim oApp As clsGame
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim oList As New List(Of KeyValuePair(Of String, String))
|
||||
|
||||
lstGames.ValueMember = "Key"
|
||||
lstGames.DisplayMember = "Value"
|
||||
|
||||
lstGames.BeginUpdate()
|
||||
|
||||
For Each de As DictionaryEntry In AppData
|
||||
oApp = DirectCast(de.Value, clsGame)
|
||||
oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name)
|
||||
lstGames.Items.Add(oData)
|
||||
oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name)
|
||||
oList.Add(oData)
|
||||
Next
|
||||
|
||||
lstGames.EndUpdate()
|
||||
oList.Sort(AddressOf CompareByName)
|
||||
|
||||
lstGames.BeginUpdate()
|
||||
lstGames.DataSource = oList
|
||||
lstGames.EndUpdate()
|
||||
|
||||
IsLoading = False
|
||||
End Sub
|
||||
@@ -979,13 +986,11 @@ Public Class frmGameManager
|
||||
End Select
|
||||
|
||||
If bSuccess Then
|
||||
Dim iSelected As Integer
|
||||
IsDirty = False
|
||||
LoadData()
|
||||
iSelected = lstGames.Items.IndexOf(New KeyValuePair(Of String, String)(oApp.ID, oApp.Name))
|
||||
If iSelected = -1 Then eCurrentMode = eModes.Disabled
|
||||
ModeChange()
|
||||
If eCurrentMode = eModes.View Then lstGames.SelectedIndex = iSelected
|
||||
lstGames.ClearSelected()
|
||||
If eCurrentMode = eModes.View Then lstGames.SelectedValue = oApp.ID
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1293,6 +1298,8 @@ Public Class frmGameManager
|
||||
AssignDirtyHandlers(grpExtra.Controls)
|
||||
AssignDirtyHandlers(grpStats.Controls)
|
||||
AssignDirtyHandlersMisc()
|
||||
|
||||
LoadData(False)
|
||||
End Sub
|
||||
|
||||
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.txtLog = New System.Windows.Forms.TextBox()
|
||||
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.gMonStripStatusButton = New System.Windows.Forms.ToolStripSplitButton()
|
||||
Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.gMonMainMenu = New System.Windows.Forms.MenuStrip()
|
||||
Me.gMonFile = 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.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.ShowItemToolTips = True
|
||||
Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22)
|
||||
@@ -248,33 +248,25 @@ Partial Class frmMain
|
||||
'gMonStripAdminButton
|
||||
'
|
||||
Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.gMonStripAdminButton.DropDownButtonWidth = 0
|
||||
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User
|
||||
Me.gMonStripAdminButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.gMonStripAdminButton.Name = "gMonStripAdminButton"
|
||||
Me.gMonStripAdminButton.Size = New System.Drawing.Size(21, 20)
|
||||
Me.gMonStripAdminButton.Text = "Elevation"
|
||||
Me.gMonStripAdminButton.ToolTipText = "Elevation"
|
||||
Me.gMonStripAdminButton.Size = New System.Drawing.Size(16, 17)
|
||||
Me.gMonStripAdminButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
||||
'
|
||||
'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.Text = "Monitor Status"
|
||||
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'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.Size = New System.Drawing.Size(93, 20)
|
||||
Me.gMonStripStatusButton.Size = New System.Drawing.Size(88, 17)
|
||||
Me.gMonStripStatusButton.Text = "Monitor Status:"
|
||||
Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
||||
Me.gMonStripStatusButton.ToolTipText = "Click to toggle monitoring on or off."
|
||||
'
|
||||
'gMonMainMenu
|
||||
'
|
||||
@@ -531,7 +523,7 @@ Partial Class frmMain
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
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.lblStatus3)
|
||||
Me.Controls.Add(Me.lblStatus2)
|
||||
@@ -593,7 +585,6 @@ Partial Class frmMain
|
||||
Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents gMonTraySetupGameManager 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 btnLogToggle As System.Windows.Forms.Button
|
||||
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 gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents btnCancelOperation As System.Windows.Forms.Button
|
||||
Friend WithEvents gMonStripAdminButton As ToolStripSplitButton
|
||||
Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents lblStatus1 As Label
|
||||
@@ -629,4 +619,6 @@ Partial Class frmMain
|
||||
Friend WithEvents gMonTrayToolsLog As ToolStripMenuItem
|
||||
Friend WithEvents gMonTrayLogClear 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
|
||||
|
||||
+38
-2899
File diff suppressed because it is too large
Load Diff
@@ -798,14 +798,14 @@ Public Class frmMain
|
||||
Private Sub ToggleLog()
|
||||
If bLogToggle = False Then
|
||||
txtLog.Visible = True
|
||||
Me.Size = New System.Drawing.Size(540, 425)
|
||||
Me.Size = New System.Drawing.Size(Me.Size.Width, 440)
|
||||
bLogToggle = True
|
||||
btnLogToggle.Text = frmMain_btnToggleLog_Hide
|
||||
txtLog.Select(txtLog.TextLength, 0)
|
||||
txtLog.ScrollToCaret()
|
||||
Else
|
||||
txtLog.Visible = False
|
||||
Me.Size = New System.Drawing.Size(540, 245)
|
||||
Me.Size = New System.Drawing.Size(Me.Size.Width, 245)
|
||||
bLogToggle = False
|
||||
btnLogToggle.Text = frmMain_btnToggleLog_Show
|
||||
End If
|
||||
@@ -1080,7 +1080,7 @@ Public Class frmMain
|
||||
lblLastAction.Text = String.Empty
|
||||
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
|
||||
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
|
||||
ResetGameInfo()
|
||||
End Sub
|
||||
@@ -1386,7 +1386,7 @@ Public Class frmMain
|
||||
ToggleLog()
|
||||
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()
|
||||
End Sub
|
||||
|
||||
@@ -1406,7 +1406,7 @@ Public Class frmMain
|
||||
OperationCancel()
|
||||
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()
|
||||
End Sub
|
||||
|
||||
@@ -1534,7 +1534,6 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
'Init
|
||||
Try
|
||||
SetForm()
|
||||
@@ -1554,18 +1553,17 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
HandleScan()
|
||||
CheckForNewBackups()
|
||||
CheckForNewBackups()
|
||||
Catch niex As NotImplementedException
|
||||
'Ignore for Mono runtime tests
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message, MsgBoxStyle.Critical)
|
||||
bInitFail = True
|
||||
bInitFail = True
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||
|
||||
If bFirstRun And Not bInitFail Then
|
||||
OpenStartupWizard()
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user