Files
EgtCAM5/Special/GunStockWindow/GunStockWndView.xaml.vb
T
Dario Sassi 20b978c19c EgtCAM5 1.6x2 :
- modifiche per Gunstock.
2016-12-13 19:56:29 +00:00

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