75bdbe6b15
-> aggiorno direttorio porte corrente (modalità progetto); -> correzione comando "Duplica"; -> aggiunto nuovo profilo sul top della porta (Angle); -> eliminazione progetti (configurabile); -> configurare la modalità di funzionamento da OptionPage "SingleDoor"/"Project".
56 lines
1.9 KiB
VB.net
56 lines
1.9 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
|
|
Return "Frame"
|
|
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
|