cbecb11ab7
-> scrittura messaggi nel file dei messaggi.
67 lines
2.2 KiB
VB.net
67 lines
2.2 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.Collections.ObjectModel
|
|
Imports System.IO
|
|
Imports EgtUILib
|
|
|
|
Public Class MySaveFileDialogVM
|
|
Inherits EgtWPFLib5.SaveFileDialogVM
|
|
|
|
Public ReadOnly Property IsFrameMsg As String
|
|
Get
|
|
' 50727=Frame
|
|
Return EgtMsg(50727)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property VisibilityCreateFrameDir As Visibility
|
|
Get
|
|
If OptionModule.m_ConfigurationSoftware = ConfigType.Assembly Then
|
|
Return Visibility.Collapsed
|
|
Else
|
|
Return Visibility.Visible
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
Private Property m_IsFrame As Boolean = False
|
|
Public Property IsFrame As Boolean
|
|
Get
|
|
Return m_IsFrame
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_IsFrame = value
|
|
End Set
|
|
End Property
|
|
|
|
Friend Function MySave() As Boolean
|
|
If IsFolder And IsFrame Then
|
|
WriteFileName &= FRAME_FOLDER
|
|
End If
|
|
Dim sCompleteFileName As String = Directory & "\" & WriteFileName & If(IsFolder, "", Extension)
|
|
If String.IsNullOrWhiteSpace(WriteFileName) Then
|
|
MessageBox.Show(EgtMsg(MSG_EGTSAVEFILEDIALOG + 8), EgtMsg(MSG_EGTSAVEFILEDIALOG + 7), MessageBoxButton.OK, MessageBoxImage.Error)
|
|
Return False
|
|
End If
|
|
If IsFolder Then
|
|
If System.IO.Directory.Exists(sCompleteFileName) Then
|
|
If MessageBox.Show(FileName & " " & EgtMsg(MSG_EGTSAVEFILEDIALOG + 3) & vbCrLf & EgtMsg(MSG_EGTSAVEFILEDIALOG + 4), EgtMsg(MSG_EGTSAVEFILEDIALOG + 9), MessageBoxButton.YesNo, MessageBoxImage.Exclamation) <> MessageBoxResult.Yes Then
|
|
Return False
|
|
End If
|
|
End If
|
|
Else
|
|
If File.Exists(sCompleteFileName) Then
|
|
If MessageBox.Show(FileName & " " & EgtMsg(MSG_EGTSAVEFILEDIALOG + 3) & vbCrLf & EgtMsg(MSG_EGTSAVEFILEDIALOG + 4), EgtMsg(MSG_EGTSAVEFILEDIALOG + 9), MessageBoxButton.YesNo, MessageBoxImage.Exclamation) <> MessageBoxResult.Yes Then
|
|
Return False
|
|
End If
|
|
End If
|
|
End If
|
|
FileName = sCompleteFileName
|
|
Return True
|
|
End Function
|
|
|
|
Public Sub New()
|
|
MyBase.New()
|
|
End Sub
|
|
|
|
End Class
|