EgtCAM5 :
- Cambiati nomi classi e file.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="MainWindow"
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="MainWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
@@ -13,7 +13,7 @@
|
||||
AllowDrop="True" Drop="MainWindow_Drop"
|
||||
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||
<EgtWPFLib5:EgtCustomWindow.TitlePanel>
|
||||
<local:TopCommandBarView DataContext="{StaticResource TopCommandBarViewModel}"/>
|
||||
<local:TopCommandBarV DataContext="{StaticResource TopCommandBarViewModel}"/>
|
||||
</EgtWPFLib5:EgtCustomWindow.TitlePanel>
|
||||
|
||||
<interactivity:Interaction.Triggers>
|
||||
@@ -1,6 +1,6 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Class MainWindow
|
||||
Class MainWindowV
|
||||
Inherits EgtCustomWindow
|
||||
|
||||
Private Sub EgtCustomWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -13,14 +13,14 @@ Class MainWindow
|
||||
Private Sub MainWindow_Drop(sender As Object, e As DragEventArgs)
|
||||
' Se drag di file
|
||||
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||
' Attivo il programma
|
||||
Me.Activate()
|
||||
' Recupero l'array di stringhe con i nomi del file
|
||||
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||
' Apro il primo come file standard
|
||||
If EgtCAM5Map.refProjectVM.OpenStdFile(sFiles(0)) Then Return
|
||||
' Riprovo come file descrizione porta
|
||||
EgtCAM5Map.refProjectVM.OpenDoorFile(sFiles(0))
|
||||
' Attivo il programma
|
||||
Me.Activate()
|
||||
' Recupero l'array di stringhe con i nomi del file
|
||||
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
|
||||
' Apro il primo come file standard
|
||||
If Map.refProjectVM.OpenStdFile(sFiles(0)) Then Return
|
||||
' Riprovo come file descrizione porta
|
||||
Map.refProjectVM.OpenDoorFile(sFiles(0))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -7,7 +7,7 @@ Imports EgtUILib
|
||||
|
||||
Namespace EgtCAM5
|
||||
|
||||
Public Class MainWindowViewModel
|
||||
Public Class MainWindowVM
|
||||
Inherits ViewModelBase
|
||||
|
||||
#Region "FIELDS"
|
||||
@@ -31,8 +31,8 @@ Namespace EgtCAM5
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value <> m_Title Then
|
||||
m_Title = value
|
||||
OnPropertyChanged("Title")
|
||||
m_Title = value
|
||||
OnPropertyChanged("Title")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -48,12 +48,12 @@ Namespace EgtCAM5
|
||||
Private m_cmdCloseApplication As ICommand
|
||||
|
||||
' GRAPHICAL ELEMENTS
|
||||
Private m_TopCommandBar As TopCommandBarView
|
||||
Public ReadOnly Property TopCommandBar As TopCommandBarView
|
||||
Private m_TopCommandBar As TopCommandBarV
|
||||
Public ReadOnly Property TopCommandBar As TopCommandBarV
|
||||
Get
|
||||
If IsNothing(m_TopCommandBar) Then
|
||||
m_TopCommandBar = New TopCommandBarView
|
||||
m_TopCommandBar.DataContext = New TopCommandBarViewModel
|
||||
m_TopCommandBar = New TopCommandBarV
|
||||
m_TopCommandBar.DataContext = New TopCommandBarVM
|
||||
End If
|
||||
Return m_TopCommandBar
|
||||
End Get
|
||||
@@ -61,27 +61,27 @@ Namespace EgtCAM5
|
||||
|
||||
' GRAPHICAL FIELDS WITH PROPERTY
|
||||
|
||||
Private m_StatusBar As StatusBarView
|
||||
Private m_StatusBar As StatusBarV
|
||||
Private m_bfirst As Boolean = True
|
||||
Public ReadOnly Property StatusBar As StatusBarView
|
||||
Public ReadOnly Property StatusBar As StatusBarV
|
||||
Get
|
||||
If m_bfirst Then
|
||||
m_bfirst = False
|
||||
m_StatusBar = New StatusBarView
|
||||
m_StatusBar.DataContext = New StatusBarViewModel
|
||||
m_StatusBar = New StatusBarV
|
||||
m_StatusBar.DataContext = New StatusBarVM
|
||||
End If
|
||||
Return m_StatusBar
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ProjectPage As ProjectView
|
||||
Private m_ProjectPage As ProjectV
|
||||
Private m_bFirstProjectPage As Boolean = True
|
||||
Public ReadOnly Property ProjectPage As ProjectView
|
||||
Public ReadOnly Property ProjectPage As ProjectV
|
||||
Get
|
||||
If m_bFirstProjectPage Then
|
||||
m_bFirstProjectPage = False
|
||||
m_ProjectPage = New ProjectView
|
||||
m_ProjectPage.DataContext = New ProjectViewModel
|
||||
m_ProjectPage = New ProjectV
|
||||
m_ProjectPage.DataContext = New ProjectVM
|
||||
End If
|
||||
Return m_ProjectPage
|
||||
End Get
|
||||
@@ -93,7 +93,7 @@ Namespace EgtCAM5
|
||||
|
||||
Sub New()
|
||||
' Inizializzo EgtCAM5Map
|
||||
EgtCAM5Map.BeginInit(Me)
|
||||
Map.BeginInit(Me)
|
||||
' INITIALIZE EGALTECH ENVIRONMENT
|
||||
InitializeEgtEnvironment()
|
||||
|
||||
@@ -109,22 +109,22 @@ Namespace EgtCAM5
|
||||
|
||||
#Region "AboutBoxCommand"
|
||||
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property AboutBoxCommand() As ICommand
|
||||
Get
|
||||
If m_cmdAboutBox Is Nothing Then
|
||||
m_cmdAboutBox = New Command(AddressOf AboutBox)
|
||||
End If
|
||||
Return m_cmdAboutBox
|
||||
End Get
|
||||
End Property
|
||||
' Returns a command that manage the MainWindow_Unloaded command
|
||||
Public ReadOnly Property AboutBoxCommand() As ICommand
|
||||
Get
|
||||
If m_cmdAboutBox Is Nothing Then
|
||||
m_cmdAboutBox = New Command(AddressOf AboutBox)
|
||||
End If
|
||||
Return m_cmdAboutBox
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub AboutBox(ByVal param As Object)
|
||||
Dim AboutBoxWindow As New AboutBoxView
|
||||
AboutBoxWindow.Owner = Application.Current.MainWindow
|
||||
AboutBoxWindow.ShowDialog()
|
||||
End Sub
|
||||
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
||||
Public Sub AboutBox(ByVal param As Object)
|
||||
Dim AboutBoxWindow As New AboutBoxWndV
|
||||
AboutBoxWindow.Owner = Application.Current.MainWindow
|
||||
AboutBoxWindow.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' AboutBoxCommand
|
||||
|
||||
Reference in New Issue
Block a user