20b978c19c
- modifiche per Gunstock.
24 lines
1.0 KiB
VB.net
24 lines
1.0 KiB
VB.net
Imports System.IO
|
|
Imports EgtUILib
|
|
|
|
Public Class GunStockWndView
|
|
|
|
Private Sub SaveBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
|
Dim ViewModel As GunStockWndViewModel = DirectCast(DataContext, GunStockWndViewModel)
|
|
If ViewModel.bNewFile Or ViewModel.IsModifiedParamList() Then
|
|
' Calcolo la path del file
|
|
Dim sFile As String = System.IO.Path.GetDirectoryName(FileNameTxBl.Text) & "\" & FileNameTxBx.Text &
|
|
System.IO.Path.GetExtension(FileNameTxBl.Text)
|
|
' Verifico se esiste già e chiedo conferma di sovrascrittura
|
|
If File.Exists(sFile) Then
|
|
If MessageBox.Show(sFile & " " & EgtMsg(MSG_EGTSAVEFILEDIALOG + 3) & vbCrLf & EgtMsg(MSG_EGTSAVEFILEDIALOG + 4),
|
|
"", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) <> MessageBoxResult.Yes Then
|
|
Exit Sub
|
|
End If
|
|
End If
|
|
End If
|
|
DialogResult = True
|
|
End Sub
|
|
|
|
End Class
|