Unix fixes and feature lock outs
This commit is contained in:
@@ -178,11 +178,11 @@ Public Class frmAddWizard
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Path.GetExtension(strPath.ToLower) <> ".exe" Then
|
||||
sErrorMessage = frmAddWizard_ErrorNotAProcess
|
||||
txtProcessPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
'If Path.GetExtension(strPath.ToLower) <> ".exe" Then
|
||||
' sErrorMessage = frmAddWizard_ErrorNotAProcess
|
||||
' txtProcessPath.Focus()
|
||||
' Return False
|
||||
'End If
|
||||
|
||||
If Not Path.IsPathRooted(strPath) Then
|
||||
sErrorMessage = frmAddWizard_ErrorBadProcessPath
|
||||
|
||||
+24
-16
@@ -395,13 +395,18 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Sub OpenBackupFile()
|
||||
Dim sFileName As String
|
||||
sFileName = BackupFolder & CurrentBackupItem.FileName
|
||||
'Unix Hanlder
|
||||
If Not mgrCommon.IsUnix Then
|
||||
Dim sFileName As String
|
||||
sFileName = BackupFolder & CurrentBackupItem.FileName
|
||||
|
||||
If File.Exists(sFileName) Then
|
||||
Process.Start("explorer.exe", "/select," & sFileName)
|
||||
If File.Exists(sFileName) Then
|
||||
Process.Start("explorer.exe", "/select," & sFileName)
|
||||
Else
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(App_ErrorUnixNotAvailable, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -477,22 +482,25 @@ Public Class frmGameManager
|
||||
End Function
|
||||
|
||||
Private Sub OpenRestorePath()
|
||||
Dim sPath As String = String.Empty
|
||||
If Not mgrCommon.IsUnix Then
|
||||
Dim sPath As String = String.Empty
|
||||
|
||||
If CurrentBackupItem.AbsolutePath Then
|
||||
sPath = CurrentBackupItem.RestorePath
|
||||
Else
|
||||
If FindRestorePath() Then
|
||||
sPath = CurrentBackupItem.RelativeRestorePath
|
||||
If CurrentBackupItem.AbsolutePath Then
|
||||
sPath = CurrentBackupItem.RestorePath
|
||||
Else
|
||||
If FindRestorePath() Then
|
||||
sPath = CurrentBackupItem.RelativeRestorePath
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Directory.Exists(sPath) Then
|
||||
Process.Start("explorer.exe", sPath)
|
||||
If Directory.Exists(sPath) Then
|
||||
Process.Start("explorer.exe", sPath)
|
||||
Else
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(App_ErrorUnixNotAvailable, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub OpenTags()
|
||||
|
||||
@@ -30,7 +30,7 @@ Public Class frmIncludeExclude
|
||||
Return sRootFolder
|
||||
End Get
|
||||
Set(value As String)
|
||||
sRootFolder = value.TrimEnd("\")
|
||||
sRootFolder = value.TrimEnd(Path.DirectorySeparatorChar)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -52,7 +52,7 @@ Public Class frmIncludeExclude
|
||||
|
||||
If sFolders.Length <> 0 Then
|
||||
For Each sFolder As String In sFolders
|
||||
oChild = New TreeNode(sFolder.Replace(sDirectory, String.Empty).TrimStart("\"), 0, 0)
|
||||
oChild = New TreeNode(sFolder.Replace(sDirectory, String.Empty).TrimStart(Path.DirectorySeparatorChar), 0, 0)
|
||||
oChild.Name = sFolder
|
||||
oChild.Tag = 0
|
||||
oNode.Nodes.Add(oChild)
|
||||
@@ -64,7 +64,7 @@ Public Class frmIncludeExclude
|
||||
|
||||
If sFiles.Length <> 0 Then
|
||||
For Each sFile As String In sFiles
|
||||
oChild = New TreeNode(sFile.Replace(sDirectory, String.Empty).TrimStart("\"), 1, 1)
|
||||
oChild = New TreeNode(sFile.Replace(sDirectory, String.Empty).TrimStart(Path.DirectorySeparatorChar), 1, 1)
|
||||
oChild.Tag = 1
|
||||
oNode.Nodes.Add(oChild)
|
||||
Next
|
||||
@@ -195,7 +195,7 @@ Public Class frmIncludeExclude
|
||||
If Path.GetFileName(txtRootFolder.Text) = sNewLabel Then
|
||||
sFolderCheck = txtRootFolder.Text
|
||||
Else
|
||||
sFolderCheck = txtRootFolder.Text & "\" & sNewLabel
|
||||
sFolderCheck = txtRootFolder.Text & Path.DirectorySeparatorChar & sNewLabel
|
||||
End If
|
||||
If Directory.Exists(sFolderCheck) Then
|
||||
iType = 0
|
||||
|
||||
Generated
+2
-1
@@ -255,8 +255,9 @@ Partial Class frmMain
|
||||
'
|
||||
'gMonStripTxtStatus
|
||||
'
|
||||
Me.gMonStripTxtStatus.Margin = New System.Windows.Forms.Padding(5, 0, 0, 0)
|
||||
Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus"
|
||||
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(405, 17)
|
||||
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(369, 22)
|
||||
Me.gMonStripTxtStatus.Spring = True
|
||||
Me.gMonStripTxtStatus.Text = "Monitor Status"
|
||||
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
|
||||
+2891
-30
File diff suppressed because it is too large
Load Diff
+30
-14
@@ -1245,14 +1245,19 @@ Public Class frmMain
|
||||
|
||||
'Functions to handle other features
|
||||
Private Sub RestartAsAdmin()
|
||||
If mgrCommon.IsElevated Then
|
||||
mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
|
||||
Else
|
||||
If mgrCommon.ShowMessage(frmMain_ConfirmRunAsAdmin, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrCommon.RestartAsAdmin()
|
||||
bShutdown = True
|
||||
ShutdownApp(False)
|
||||
'Unix Hanlder
|
||||
If Not mgrCommon.IsUnix Then
|
||||
If mgrCommon.IsElevated Then
|
||||
mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
|
||||
Else
|
||||
If mgrCommon.ShowMessage(frmMain_ConfirmRunAsAdmin, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrCommon.RestartAsAdmin()
|
||||
bShutdown = True
|
||||
ShutdownApp(False)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(App_ErrorUnixNotAvailable, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1416,11 +1421,18 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub Main_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
'Intercept Exit & Minimize
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix And Not bShutdown Then
|
||||
ShutdownApp()
|
||||
End If
|
||||
|
||||
'Intercept Exit
|
||||
If bShutdown = False Then
|
||||
e.Cancel = True
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
If Not mgrCommon.IsUnix Then
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1541,7 +1553,7 @@ Public Class frmMain
|
||||
LoadAndVerify()
|
||||
VerifyCustomPathVariables()
|
||||
|
||||
If oSettings.StartToTray Then
|
||||
If oSettings.StartToTray And Not mgrCommon.IsUnix Then
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
End If
|
||||
@@ -1553,14 +1565,18 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
HandleScan()
|
||||
CheckForNewBackups()
|
||||
Catch niex As NotImplementedException
|
||||
'Ignore for Mono runtime tests
|
||||
CheckForNewBackups()
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message, MsgBoxStyle.Critical)
|
||||
bInitFail = True
|
||||
End Try
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
gMonTray.Visible = False
|
||||
Me.MinimizeBox = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||
|
||||
@@ -113,6 +113,12 @@ Public Class frmSettings
|
||||
nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold
|
||||
nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked
|
||||
cboCompression.SelectedValue = oSettings.CompressionLevel
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
chkStartToTray.Checked = False
|
||||
chkStartWindows.Checked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCombos()
|
||||
@@ -159,6 +165,12 @@ Public Class frmSettings
|
||||
chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup
|
||||
grp7z.Text = frmSettings_grp7z
|
||||
lblCompression.Text = frmSettings_lblCompression
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
chkStartToTray.Enabled = False
|
||||
chkStartWindows.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
|
||||
|
||||
Reference in New Issue
Block a user