EgtDOORCreator 1.8d1 :
- modifiche e migliorie varie.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Imports EgtUILib
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MainWindowViewModel
|
||||
Implements INotifyPropertyChanged
|
||||
@@ -19,31 +20,6 @@ Public Class MainWindowViewModel
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' questa funzione restituisce il nome del direttorio corrente
|
||||
Friend Function SetTitle(DirectoryTitle As String) As String
|
||||
If Not String.IsNullOrWhiteSpace(DirectoryTitle) Then
|
||||
Dim Items() As String = DirectoryTitle.Split("\".ToCharArray)
|
||||
If Items.Count = 1 Then
|
||||
Items = DirectoryTitle.Split("-".ToCharArray)
|
||||
End If
|
||||
' restituisco il nome dell'ultimo direttorio aperto
|
||||
DirectoryTitle = Items(Items.Count - 1)
|
||||
End If
|
||||
Return DirectoryTitle
|
||||
End Function
|
||||
|
||||
Friend Sub ModifyTitle(bModified As Boolean)
|
||||
If bModified Then
|
||||
If Not m_ProjectNameMsg(m_ProjectNameMsg.Count - 1) = "*" Then
|
||||
ProjectNameMsg &= "*"
|
||||
End If
|
||||
Else
|
||||
If m_ProjectNameMsg(m_ProjectNameMsg.Count - 1) = "*" Then
|
||||
ProjectNameMsg.Trim("*"c)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private m_CompoPanel As CompoPanelView
|
||||
Public ReadOnly Property CompoPanel As CompoPanelView
|
||||
Get
|
||||
@@ -110,6 +86,17 @@ Public Class MainWindowViewModel
|
||||
|
||||
End Property
|
||||
|
||||
Private m_AboutBox As Window
|
||||
Private bFirstAboutBox As Boolean = True
|
||||
Public ReadOnly Property AboutBox As Window
|
||||
Get
|
||||
If bFirstAboutBox Then
|
||||
m_AboutBox = New AboutBoxView()
|
||||
End If
|
||||
Return New AboutBoxView
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' MainWindow Closing Event
|
||||
Private m_cmdClose As ICommand
|
||||
|
||||
@@ -118,8 +105,8 @@ Public Class MainWindowViewModel
|
||||
Case 0
|
||||
' apre la finestra
|
||||
Dim Launcher As New LauncherView
|
||||
Launcher.Height = 500
|
||||
Launcher.Width = 300
|
||||
Launcher.Height = 200
|
||||
Launcher.Width = 250
|
||||
LauncherModule.InitLauncherModule()
|
||||
Launcher.DataContext = New LauncherViewModel(Me)
|
||||
Launcher.Owner = Application.Current.MainWindow
|
||||
@@ -132,11 +119,56 @@ Public Class MainWindowViewModel
|
||||
' apro l'ultimo progetto
|
||||
Me.ProjectManagerViewModel.OpenLastProject()
|
||||
End If
|
||||
Case 2
|
||||
' non fa assolutamente nulla
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
' questa funzione restituisce il nome del direttorio corrente
|
||||
Friend Function SetTitle(DirectoryTitle As String) As String
|
||||
If Not String.IsNullOrWhiteSpace(DirectoryTitle) Then
|
||||
Dim Items() As String = DirectoryTitle.Split("\".ToCharArray)
|
||||
If Items.Count = 1 Then
|
||||
Items = DirectoryTitle.Split("-".ToCharArray)
|
||||
End If
|
||||
' restituisco il nome dell'ultimo direttorio aperto
|
||||
DirectoryTitle = Items(Items.Count - 1)
|
||||
End If
|
||||
Return DirectoryTitle
|
||||
End Function
|
||||
|
||||
Friend Sub ModifyTitle(bModified As Boolean)
|
||||
If bModified Then
|
||||
If Not m_ProjectNameMsg(m_ProjectNameMsg.Count - 1) = "*" Then
|
||||
ProjectNameMsg &= "*"
|
||||
End If
|
||||
Else
|
||||
If m_ProjectNameMsg(m_ProjectNameMsg.Count - 1) = "*" Then
|
||||
ProjectNameMsg.Trim("*"c)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub WinPosToWindow(Window As Window, WinPos As WinPos)
|
||||
Window.WindowStartupLocation = WindowStartupLocation.Manual
|
||||
Window.Top = WinPos.nTop
|
||||
Window.Left = WinPos.nLeft
|
||||
Window.Height = WinPos.nHeight
|
||||
Window.Width = WinPos.nWidth
|
||||
Window.WindowState = If(WinPos.nFlag = 1, WindowState.Maximized, WindowState.Normal)
|
||||
End Sub
|
||||
|
||||
Friend Sub WindowToWinPos(Window As Window, WinPos As WinPos)
|
||||
WinPos.nTop = CInt(Window.Top)
|
||||
WinPos.nLeft = CInt(Window.Left)
|
||||
WinPos.nHeight = CInt(Window.Height)
|
||||
WinPos.nWidth = CInt(Window.Width)
|
||||
WinPos.nFlag = If(Window.WindowState = WindowState.Maximized, 1, 0)
|
||||
If Window.WindowState = WindowState.Maximized Then
|
||||
WinPos.nHeight = CInt(Window.RestoreBounds.Height)
|
||||
WinPos.nWidth = CInt(Window.RestoreBounds.Width)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CloseApplicationCommand"
|
||||
|
||||
''' <summary>
|
||||
@@ -159,12 +191,12 @@ Public Class MainWindowViewModel
|
||||
'Application.Msn.NotifyColleagues(Application.MANAGEMODIFIED)
|
||||
'If m_allowWindowToClose Then
|
||||
' Application.Msn.NotifyColleagues(Application.CLOSEAPPLICATION)
|
||||
' ' Salvo posizione Form (se non minimizzato)
|
||||
' If Application.Current.MainWindow.WindowState <> WindowState.Minimized Then
|
||||
' Dim WinPos As New WinPos
|
||||
' WindowToWinPos(Application.Current.MainWindow, WinPos)
|
||||
' WritePrivateProfileWinPos(S_GENERAL, K_WINPLACE, WinPos.nFlag, WinPos.nLeft, WinPos.nTop, WinPos.nWidth, WinPos.nHeight)
|
||||
' End If
|
||||
' Salvo posizione Form (se non minimizzato)
|
||||
If Application.Current.MainWindow.WindowState <> WindowState.Minimized Then
|
||||
Dim WinPos As New WinPos
|
||||
WindowToWinPos(Application.Current.MainWindow, WinPos)
|
||||
WritePrivateProfileWinPos(S_GENERAL, K_WINPLACE, WinPos.nFlag, WinPos.nLeft, WinPos.nTop, WinPos.nWidth, WinPos.nHeight)
|
||||
End If
|
||||
' ' Terminazione generale di EgtInterface
|
||||
' EgtExit()
|
||||
' ' Rilascio mutex
|
||||
|
||||
Reference in New Issue
Block a user