Compare commits

..

17 Commits

Author SHA1 Message Date
Demetrio Cassarino d4b55f730a - Aggiornamento di tutte le messagebox a egtmessagebox 2023-05-26 10:21:46 +02:00
Emmanuele Sassi d74bc0f4d2 - ottimizzazione costruttori in EgtMessageBoxVM 2023-05-25 15:54:32 +02:00
Emmanuele Sassi c17e80af2b - Aggiunta EgtMessageBox 2023-05-25 14:57:31 +02:00
DarioS 088be26abf Icarus 2.5e1 :
- ricompilazione con cambio versione
- miglioria indicazione unità di misura di tempo (min:s).
2023-05-03 11:54:59 +02:00
DarioS 2e81f09a85 Icarus :
- modifica per far funzionara la ProgressBar anche con il calcolo dei solidi.
2023-04-24 15:35:11 +02:00
DarioS 21692af684 Icarus 2.5d4 :
- al parametro ScrewBack viene assegnato valore di default 45 (per progetti vecchi o nuove lavorazioni di libreria).
2023-04-20 16:16:10 +02:00
DarioS 6c36f856e6 Icarus 2.5d3 :
- ricompilazione con cambio versione.
2023-04-18 19:36:16 +02:00
Emmanuele Sassi 33b90967c6 - disattivato pannello Instrument quando modifiche in corso
- gestita visibilita' contemporanea di InputPanele MessagePanel
2023-04-18 17:21:03 +02:00
Emmanuele Sassi 47ea4e3646 - correzioni creazione solidi
- migliorata dis/attivazione interfaccia durante creazione solidi
2023-04-18 09:01:20 +02:00
Emmanuele Sassi cc41ca8d82 - correzione disabilitazione parametri LeadOut in CurrMachining
- cambiata gestione della modalita' di modifica selezionata
- corezione impostazione pagina modifica dopo apertura progetto
- verifica che non ci siano operazioni di modifica in corso prima di far partire slice
- correzione errore su chiusura percorso disegnato
- disabilitata interfaccia quando comando in corso in modifica
2023-04-17 20:00:50 +02:00
DarioS 554b1a662e Icarus :
- correzione per caricamento file icrs con drag.
2023-04-11 15:24:16 +02:00
DarioS 10a0745449 Merge remote-tracking branch 'origin/FlowDocument' 2023-04-11 13:38:26 +02:00
DarioS 1a0eb0cb31 Icarus :
- lettura MinMax ora da Ini macchina.
2023-04-11 13:27:10 +02:00
DarioS 33176f40fa Icarus 2.5d2 :
- ricompilazione con cambio versione.
2023-04-11 11:19:41 +02:00
Emmanuele Sassi bbb6d16483 Merge branch 'FlowDocument' 2023-04-11 09:40:29 +02:00
Emmanuele Sassi 57baab72d5 Merge branch 'FlowDocument' 2023-04-08 12:30:03 +02:00
Emmanuele Sassi 91d8e8aa1f Merge branch 'develop' 2023-04-07 15:54:38 +02:00
59 changed files with 972 additions and 929 deletions
@@ -66,7 +66,8 @@ Public Class ChooseMachineWndVM
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
Else Else
' se non seleziono nessuna macchina lo segnalo con un MessageBox ' se non seleziono nessuna macchina lo segnalo con un MessageBox
MessageBox.Show("No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error) ' MessageBox.Show("No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No machine selected", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
End Sub End Sub
-2
View File
@@ -122,8 +122,6 @@ Public Module ConstIni
Public Const K_CLR_MACHSTART As String = "MachStart" Public Const K_CLR_MACHSTART As String = "MachStart"
Public Const K_CLR_OTHERS As String = "Others" Public Const K_CLR_OTHERS As String = "Others"
Public Const S_MINMAX As String = "MinMax"
Public Const S_MRUFILES As String = "MruFiles" Public Const S_MRUFILES As String = "MruFiles"
Public Const S_MRUIMPORTFILES As String = "MruImportFiles" Public Const S_MRUIMPORTFILES As String = "MruImportFiles"
+2 -25
View File
@@ -1,31 +1,6 @@
Public Module ConstMachIni Public Module ConstMachIni
Public Const MACH_INI_FILE_NAME As String = "MachData.ini" Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
Public Const GETWALLDATA_FILE_NAME As String = "GetWallData.lua"
Public Const GETTS3DATA_FILE_NAME As String = "GetTs3Data.lua"
Public Const K_NCTYPE As String = "NCType"
Public Const K_CONNECTIONSTRING As String = "ConnectionString"
Public Const S_CHANNELS As String = "Channels"
Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const S_EXTENSION As String = "Extension"
' Variables della macchina corrente
Public Const S_MAINVARIABLES As String = "MainVariables"
Public Const S_VARIABLES As String = "Variables"
Public Const S_INPUTVARIABLES As String = "InputVariables"
Public Const S_OUTPUTVARIABLES As String = "OutputVariables"
Public Const S_MDI As String = "MDI"
Public Const K_BEAM As String = "Beam"
Public Const K_WALL As String = "Wall"
Public Const K_SCRIPT As String = "Scripts"
Public Const K_SETUP As String = "Setup"
Public Const K_FLOW As String = "Flow"
Public Const TS3DATA_FILE As String = "Ts3Data.lua"
Public Const S_MACHINING As String = "Machining" Public Const S_MACHINING As String = "Machining"
Public Const K_MACH_INITSCRIPT As String = "InitScript" Public Const K_MACH_INITSCRIPT As String = "InitScript"
@@ -36,4 +11,6 @@
Public Const K_SPEED_MIN As String = "SpeedMin" Public Const K_SPEED_MIN As String = "SpeedMin"
Public Const K_SPEED_MAX As String = "SpeedMax" Public Const K_SPEED_MAX As String = "SpeedMax"
Public Const S_MINMAX As String = "MinMax"
End Module End Module
+1 -1
View File
@@ -274,7 +274,7 @@ Public Class CurrMachiningCathegory
' verifico dipendenze tra parametri ' verifico dipendenze tra parametri
Select Case m_Type Select Case m_Type
Case Cathegories.LINK Case Cathegories.LINK
For Each Param In {MachiningParam.Params.LINKTYPE, MachiningParam.Params.LEADIN} For Each Param In {MachiningParam.Params.LINKTYPE, MachiningParam.Params.LEADIN, MachiningParam.Params.LEADOUT}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param) Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam() MachiningParam.ManageDependencyParam()
Next Next
+55
View File
@@ -0,0 +1,55 @@
<EgtWPFLib5:EgtMainWindow x:Class="EgtMessageBoxV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding sTitle}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Style="{StaticResource Dialog_Window}">
<Grid Margin="2.5,2.5,2.5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="20,20,20,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding sIconSource}"
Margin="0,0,0,0"/>
<TextBlock Grid.Column="1"
Text="{Binding sMessage}"
Margin="5,0,5,0"
Style="{StaticResource DialogWindow_TextBlock}"/>
</Grid>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding ButtonList}"
HorizontalAlignment="Center">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button IsDefault="{Binding bIsDefault}"
Content="{Binding sMessage}"
Command="{Binding Command_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--<UniformGrid Grid.Column="1"
Grid.Row="1"
Rows="1">
<Button IsCancel="True"
Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
</UniformGrid>-->
</Grid>
</EgtWPFLib5:EgtMainWindow>
+107
View File
@@ -0,0 +1,107 @@
Public Class EgtMessageBoxV
#Region "FIELDS & PROPERTIES"
Private WithEvents m_EgtMessageBoxVM As EgtMessageBoxVM
Private Shadows DialogResult As MessageBoxResult
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Owner As Window, EgtMessageBoxVM As EgtMessageBoxVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = EgtMessageBoxVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_EgtMessageBoxVM = EgtMessageBoxVM
End Sub
#End Region
#Region "METHODS"
''' <summary>
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
''' <summary>
''' Apre una EgtMessageBox con un titolo ed un messaggio che ritorna un risultato
''' </summary>
''' <param name="Owner">Finestra di appartenenza</param>
''' <param name="sMessageBoxText">Stringa che specifica il messaggio da mostrare</param>
''' <param name="sCaption">Stringa che specifica il titolo da mostrare</param>
''' <param name="Button">Valore che specifica quali bottoni mostrare</param>
''' <param name="Icon">Valore che specifica quale icona mostrare</param>
''' <param name="DefaultResult">Valore che specifica il bottone di default</param>
''' <returns>Valore che specifica quale bottone e' stato premuto dall'utente</returns>
Public Overloads Shared Function Show(Owner As Window, sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult) As MessageBoxResult
Dim NewMessagebox As New EgtMessageBoxV(Owner, New EgtMessageBoxVM(sMessageBoxText, sCaption, Button, Icon, DefaultResult))
NewMessagebox.ShowDialog()
Return NewMessagebox.DialogResult
End Function
#End Region ' METHODS
#Region "EVENTS"
Private Sub CloseWindow(DialogResult As MessageBoxResult) Handles m_EgtMessageBoxVM.m_CloseWindow
Me.DialogResult = DialogResult
Me.Close()
End Sub
#End Region
End Class
+234
View File
@@ -0,0 +1,234 @@
Imports EgtUILib
Imports EgtWPFLib5
Public Class EgtMessageBoxVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(DialogResult As MessageBoxResult)
Private m_sTitle As String = ""
Public ReadOnly Property sTitle As String
Get
Return m_sTitle
End Get
End Property
Private m_sMessage As String = ""
Public ReadOnly Property sMessage As String
Get
Return m_sMessage
End Get
End Property
Private m_Button As MessageBoxButton
Private m_Icon As MessageBoxImage
Public ReadOnly Property sIconSource As String
Get
Select Case m_Icon
Case MessageBoxImage.Hand
Return "\Resources\EgtMessageBox\Error.png"
Case MessageBoxImage.Question
Return "\Resources\EgtMessageBox\Question.png"
Case MessageBoxImage.Exclamation
Return "\Resources\EgtMessageBox\Warning.png"
Case MessageBoxImage.Asterisk
Return "\Resources\EgtMessageBox\Information.png"
Case MessageBoxImage.Stop
Return "\Resources\EgtMessageBox\Error.png"
Case MessageBoxImage.Error
Return "\Resources\EgtMessageBox\Error.png"
Case MessageBoxImage.Warning
Return "\Resources\EgtMessageBox\Warning.png"
Case MessageBoxImage.Information
Return "\Resources\EgtMessageBox\Information.png"
Case Else ' MessageBoxImage.None
Return ""
End Select
End Get
End Property
Private m_ButtonList As New List(Of EgtMsgBoxButton)
Public Property ButtonList As List(Of EgtMsgBoxButton)
Get
Return m_ButtonList
End Get
Set(value As List(Of EgtMsgBoxButton))
m_ButtonList = value
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(sMessageBoxText As String)
EgtMsgBoxButton.SetOwner(Me)
m_sMessage = sMessageBoxText
m_Button = MessageBoxButton.OK
m_Icon = MessageBoxImage.None
NotifyPropertyChanged(NameOf(ButtonList))
NotifyPropertyChanged(NameOf(sIconSource))
End Sub
Sub New(sMessageBoxText As String, sCaption As String)
MyClass.New(sMessageBoxText)
m_sTitle = sCaption
End Sub
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton)
MyClass.New(sMessageBoxText, sCaption)
m_Button = Button
Select Case m_Button
Case MessageBoxButton.OK
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
Case MessageBoxButton.OKCancel
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.OK))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
Case MessageBoxButton.YesNoCancel
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.CANCEL))
Case MessageBoxButton.YesNo
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.YES))
m_ButtonList.Add(New EgtMsgBoxButton(EgtMsgBoxButton.Types.NO))
End Select
NotifyPropertyChanged(NameOf(ButtonList))
End Sub
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage)
MyClass.New(sMessageBoxText, sCaption, Button)
m_Icon = Icon
NotifyPropertyChanged(NameOf(sIconSource))
End Sub
Sub New(sMessageBoxText As String, sCaption As String, Button As MessageBoxButton, Icon As MessageBoxImage, DefaultResult As MessageBoxResult)
MyClass.New(sMessageBoxText, sCaption, Button, Icon)
Dim DefaultBtn As EgtMsgBoxButton = m_ButtonList.FirstOrDefault(Function(x) (x.Type = EgtMsgBoxButton.Types.OK AndAlso DefaultResult = MessageBoxResult.OK) OrElse
(x.Type = EgtMsgBoxButton.Types.CANCEL AndAlso DefaultResult = MessageBoxResult.Cancel) OrElse
(x.Type = EgtMsgBoxButton.Types.YES AndAlso DefaultResult = MessageBoxResult.Yes) OrElse
(x.Type = EgtMsgBoxButton.Types.NO AndAlso DefaultResult = MessageBoxResult.No))
If Not IsNothing(DefaultBtn) Then
DefaultBtn.SetIsDefault(True)
End If
NotifyPropertyChanged(NameOf(ButtonList))
End Sub
#End Region ' CONTRUCTORS
#Region "METHODS"
Friend Sub CloseWindow(DialogResult As MessageBoxResult)
RaiseEvent m_CloseWindow(DialogResult)
End Sub
#End Region ' METHODS
End Class
Public Class EgtMsgBoxButton
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Public Enum Types As Integer
OK = 1
CANCEL = 2
YES = 3
NO = 4
End Enum
Private Shared Owner As EgtMessageBoxVM
Private m_Type As Types
Public ReadOnly Property Type As Types
Get
Return m_Type
End Get
End Property
Private m_sMessage As String
Public ReadOnly Property sMessage As String
Get
Return m_sMessage
End Get
End Property
Private m_bIsDefault As Boolean = False
Public ReadOnly Property bIsDefault As Boolean
Get
Return m_bIsDefault
End Get
End Property
Friend Sub SetIsDefault(bValue As Boolean)
m_bIsDefault = bValue
End Sub
' Definizione comandi
Private m_cmdCommand As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "CONTRUCTORS"
Sub New(Type As Types)
m_Type = Type
Select Case m_Type
Case Types.OK
m_sMessage = EgtMsg(35001)
Case Types.CANCEL
m_sMessage = EgtMsg(35002)
Case Types.YES
m_sMessage = EgtMsg(35003)
Case Types.NO
m_sMessage = EgtMsg(35004)
End Select
End Sub
Sub New(Type As Types, bIsDefault As Boolean)
MyClass.New(Type)
m_bIsDefault = bIsDefault
End Sub
#End Region ' CONTRUCTORS
#Region "METHODS"
Friend Shared Sub SetOwner(value As EgtMessageBoxVM)
Owner = value
End Sub
#End Region ' METHODS
#Region "COMMANDS"
#Region "Command"
Public ReadOnly Property Command_Command As ICommand
Get
If m_cmdCommand Is Nothing Then
m_cmdCommand = New Command(AddressOf Command)
End If
Return m_cmdCommand
End Get
End Property
Public Sub Command()
Select Case m_Type
Case Types.OK
Owner.CloseWindow(MessageBoxResult.OK)
Case Types.CANCEL
Owner.CloseWindow(MessageBoxResult.Cancel)
Case Types.YES
Owner.CloseWindow(MessageBoxResult.Yes)
Case Types.NO
Owner.CloseWindow(MessageBoxResult.No)
End Select
End Sub
#End Region ' Ok
#End Region ' COMMANDS
End Class
+62 -3
View File
@@ -35,6 +35,10 @@ Public Class FilledSolidPanelVM
Return m_SelFilledSolid Return m_SelFilledSolid
End Get End Get
Set(value As FilledSolidEntity) Set(value As FilledSolidEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelFilledSolid))
Return
End If
m_SelFilledSolid = value m_SelFilledSolid = value
EgtDeselectAll() EgtDeselectAll()
If Not IsNothing(value) Then If Not IsNothing(value) Then
@@ -349,6 +353,8 @@ Public Class FilledSolidPanelVM
NotifyPropertyChanged(NameOf(bRotate_IsChecked)) NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.AUXSOLIDPARAM) Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.AUXSOLIDPARAM)
NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled)) NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
' disattivo interfaccia
ManageInterface(False)
Else Else
NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked)) NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
End If End If
@@ -358,6 +364,8 @@ Public Class FilledSolidPanelVM
m_bMachParam_IsChecked = False m_bMachParam_IsChecked = False
NotifyPropertyChanged(NameOf(bMachParam_IsChecked)) NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled)) NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
' riattivo interfaccia
ManageInterface(True)
End Sub End Sub
Public ReadOnly Property Compo_Visibility As Visibility Public ReadOnly Property Compo_Visibility As Visibility
@@ -366,11 +374,17 @@ Public Class FilledSolidPanelVM
End Get End Get
End Property End Property
Private m_FilledSolidList_IsEnabled As Boolean = False
Public ReadOnly Property FilledSolidList_IsEnabled As Boolean Public ReadOnly Property FilledSolidList_IsEnabled As Boolean
Get Get
Return Not m_bMachParam_IsChecked Return If(m_FilledSolidList.Count > 0, m_FilledSolidList_IsEnabled, False)
End Get End Get
End Property End Property
Friend Sub SetFilledSolidListIsEnabled(bValue As Boolean)
m_FilledSolidList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina ' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d Private m_OriginalGridFrame As New Frame3d
@@ -388,6 +402,8 @@ Public Class FilledSolidPanelVM
End Get End Get
End Property End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip" #Region "Tooltip"
Public ReadOnly Property Import_ToolTip As String Public ReadOnly Property Import_ToolTip As String
@@ -571,6 +587,8 @@ Public Class FilledSolidPanelVM
SelFilledSolid = m_FilledSolidList(0) SelFilledSolid = m_FilledSolidList(0)
NotifyPropertyChanged(NameOf(SelFilledSolid)) NotifyPropertyChanged(NameOf(SelFilledSolid))
End If End If
' attivo lista filled solid
SetFilledSolidListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub End Sub
@@ -606,8 +624,13 @@ Public Class FilledSolidPanelVM
EgtSelectObj(m_SelFilledSolid.nCurveId) EgtSelectObj(m_SelFilledSolid.nCurveId)
Case FilledSolidSelectionTypes.EXTRUSION Case FilledSolidSelectionTypes.EXTRUSION
' creo layer per estrusione ' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId) Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION) If nNewExtrusionLayerId = GDB_ID.NULL Then
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Else
EgtEmptyGroup(nNewExtrusionLayerId)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId) EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
EgtSelectObj(m_SelFilledSolid.nCurveId) EgtSelectObj(m_SelFilledSolid.nCurveId)
Case FilledSolidSelectionTypes.BOTH Case FilledSolidSelectionTypes.BOTH
@@ -615,6 +638,8 @@ Public Class FilledSolidPanelVM
EgtSelectObj(m_SelFilledSolid.nExtrusionId) EgtSelectObj(m_SelFilledSolid.nExtrusionId)
End Select End Select
EgtDraw() EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True Return True
End Function End Function
@@ -624,6 +649,7 @@ Public Class FilledSolidPanelVM
End Sub End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD) Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command Select Case command
Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
' leggo altezza estrusione ' leggo altezza estrusione
@@ -663,6 +689,10 @@ Public Class FilledSolidPanelVM
' Imposto flag di ricalcolo slice ' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True) EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select End Select
' se non ho creato percorso riabilito interfaccia
If Not m_bIsCreatingPath Then
ManageInterface(True)
End If
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione ' se finita creazione estrusione
If m_bIsCreatingExtrusion Then If m_bIsCreatingExtrusion Then
@@ -733,6 +763,9 @@ Public Class FilledSolidPanelVM
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True m_bIsCreatingExtrusion = True
Map.refControllerInputPanelVM.IsChecked = True Map.refControllerInputPanelVM.IsChecked = True
If Not EgtCurveIsClosed(nNewEntityId) Then
m_bEscOnLine2P = True
End If
Else Else
' cancello layer ' cancello layer
EgtErase(nNewExtrusionLayerId) EgtErase(nNewExtrusionLayerId)
@@ -757,6 +790,13 @@ Public Class FilledSolidPanelVM
' rimetto la selezione scena a null ' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
End If End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
If m_bIsCreatingExtrusion Then m_bIsCreatingExtrusion = False
ManageInterface(True)
End If
End If End If
End Sub End Sub
@@ -792,6 +832,18 @@ Public Class FilledSolidPanelVM
Return nFilledSolidIndex + 1 Return nFilledSolidIndex + 1
End Function End Function
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetFilledSolidListIsEnabled(bValue)
End Sub
#End Region ' METHODS #End Region ' METHODS
#Region "COMMANDS" #Region "COMMANDS"
@@ -815,7 +867,9 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub Import(ByVal param As Object) Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.InsertFilledSolid() Map.refSceneHostVM.InsertFilledSolid()
ManageInterface(True)
End Sub End Sub
#End Region ' Import #End Region ' Import
@@ -839,6 +893,7 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub Line2P(ByVal param As Object) Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB) Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId) If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB) EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
@@ -887,6 +942,7 @@ Public Class FilledSolidPanelVM
End If End If
NotifyPropertyChanged(NameOf(SelFilledSolid)) NotifyPropertyChanged(NameOf(SelFilledSolid))
End If End If
SetFilledSolidListIsEnabled(True)
End Sub End Sub
#End Region ' Delete #End Region ' Delete
@@ -1171,6 +1227,7 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneElevation(ByVal param As Object) Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub End Sub
@@ -1195,6 +1252,7 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object) Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub End Sub
@@ -1311,6 +1369,7 @@ Public Class FilledSolidPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneObj(ByVal param As Object) Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti ' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear() m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj() Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
-118
View File
@@ -1,118 +0,0 @@
<Grid x:Class="HelpPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PrintApp="clr-namespace:Icarus"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Icarus"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid.Resources>
<SolidColorBrush x:Key="HighlightBorder_Color" Color="Red"/>
<Thickness x:Key="HighlightBorder_Thickness">5</Thickness>
<CornerRadius x:Key="HighlightBorder_CornerRadius">2</CornerRadius>
<Thickness x:Key="HighlightBorder_Margin">-2</Thickness>
<Style x:Key="Highlight_HelpBorder" TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="{StaticResource HighlightBorder_Color}"/>
<Setter Property="BorderThickness" Value="{StaticResource HighlightBorder_Thickness}"/>
<Setter Property="CornerRadius" Value="{StaticResource HighlightBorder_CornerRadius}"/>
<Setter Property="Margin" Value="{StaticResource HighlightBorder_Margin}"/>
</Style>
<Style x:Key="Popup_HelpBorder" TargetType="{x:Type Border}">
<Setter Property="BorderBrush" Value="{StaticResource Icarus_Gray}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="5"/>
<Setter Property="Background" Value="White"/>
</Style>
<Style TargetType="{x:Type Popup}">
<Setter Property="AllowsTransparency" Value="True"/>
<Setter Property="StaysOpen" Value="True"/>
<Setter Property="Placement" Value="Bottom"/>
</Style>
</Grid.Resources>
<Border BorderThickness="{StaticResource WindowBorder_Thickness}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="{StaticResource TitleBarHeight}"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource TopBar_HelpButton}">
<Border Visibility="{Binding Icon_Visibility}"
Style="{StaticResource Highlight_HelpBorder}">
</Border>
</Grid>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="1"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="2"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="3"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="4"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="5"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="6"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="7"
Style="{StaticResource TopBar_HelpButton}"/>
<Grid Grid.Column="8"
Style="{StaticResource TopBar_HelpButton}"/>
<Border Grid.ColumnSpan="9"
Visibility="{Binding ProjectManager_Visibility}"
Style="{StaticResource Highlight_HelpBorder}">
</Border>
</Grid>
<Grid Grid.Column="2" Width="70"/>
<Grid Grid.Column="3"/>
<Grid Grid.Column="4">
<UniformGrid Rows="1">
<Grid Style="{StaticResource TopBar_HelpButton}"/>
<Grid Style="{StaticResource TopBar_HelpButton}"/>
<Grid Style="{StaticResource TopBar_HelpButton}"/>
</UniformGrid>
</Grid>
<Border Grid.Row="1"
Grid.ColumnSpan="5"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="-2,7,0,0"
Visibility="{Binding Icon_Visibility}"
Style="{StaticResource Popup_HelpBorder}">
<PrintApp:Icon_Tooltip/>
</Border>
<Border Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="5"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="-2,7,0,0"
Visibility="{Binding ProjectManager_Visibility}"
Style="{StaticResource Popup_HelpBorder}">
<PrintApp:ProjectManager_Tooltip/>
</Border>
</Grid>
</Border>
</Grid>
-3
View File
@@ -1,3 +0,0 @@
Public Class HelpPanelV
End Class
-81
View File
@@ -1,81 +0,0 @@
Imports EgtWPFLib5
Public Class HelpPanelVM
Inherits VMBase
Public Enum HelpPages As Integer
NULL = 0
ICON = 1
PROJECTMANAGER = 2
End Enum
Private m_CurrHelpPage As HelpPages
Public ReadOnly Property CurrHelpPage As HelpPages
Get
Return m_CurrHelpPage
End Get
End Property
Private m_Icon_Visibility As Boolean = False
Public ReadOnly Property Icon_Visibility As Visibility
Get
Return If(m_Icon_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Public Property Icon_IsOpen As Boolean
Get
Return m_Icon_Visibility
End Get
Set(value As Boolean)
m_Icon_Visibility = value
End Set
End Property
Friend Sub SetIconVisibility(bValue As Boolean)
m_Icon_Visibility = bValue
NotifyPropertyChanged(NameOf(Icon_Visibility))
NotifyPropertyChanged(NameOf(Icon_IsOpen))
End Sub
Private m_ProjectManager_Visibility As Boolean = False
Public ReadOnly Property ProjectManager_Visibility As Visibility
Get
Return If(m_ProjectManager_Visibility, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
Public Property ProjectManager_IsOpen As Boolean
Get
Return m_ProjectManager_Visibility
End Get
Set(value As Boolean)
m_ProjectManager_Visibility = value
End Set
End Property
Friend Sub SetProjectManagerVisibility(bValue As Boolean)
m_ProjectManager_Visibility = bValue
NotifyPropertyChanged(NameOf(ProjectManager_Visibility))
NotifyPropertyChanged(NameOf(ProjectManager_IsOpen))
End Sub
Sub New()
Map.SetRefHelpPanelVM(Me)
End Sub
Friend Sub SelHelpPage(SelHelpPage As HelpPages)
Select Case m_CurrHelpPage
Case HelpPages.ICON
SetIconVisibility(False)
Case HelpPages.PROJECTMANAGER
SetProjectManagerVisibility(False)
End Select
m_CurrHelpPage = SelHelpPage
Select Case m_CurrHelpPage
Case HelpPages.NULL
SetProjectManagerVisibility(False)
Case HelpPages.ICON
SetIconVisibility(True)
Case HelpPages.PROJECTMANAGER
SetProjectManagerVisibility(True)
End Select
End Sub
End Class
-12
View File
@@ -1,12 +0,0 @@
<RichTextBox x:Class="Icon_Tooltip"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
BorderThickness="0"
Width="200"
Margin="5">
<FlowDocument>
<Paragraph FontSize="20">Icon</Paragraph>
<Paragraph FontSize="14">The software logo icon.
If clicked opens the AboutBox.</Paragraph>
</FlowDocument>
</RichTextBox>
-3
View File
@@ -1,3 +0,0 @@
Public Class Icon_Tooltip
End Class
@@ -1,29 +0,0 @@
<RichTextBox x:Class="ProjectManager_Tooltip"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
BorderThickness="0"
Width="300"
Margin="10">
<FlowDocument>
<Paragraph FontSize="20">Project Manager</Paragraph>
<Paragraph FontSize="14">This space permit to manage the project.
The commands available are :</Paragraph>
<List>
<ListItem>
<Paragraph>New</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Open</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Save</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Save As</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Import</Paragraph>
</ListItem>
</List>
</FlowDocument>
</RichTextBox>
@@ -1,3 +0,0 @@
Public Class ProjectManager_Tooltip
End Class
-71
View File
@@ -1,71 +0,0 @@
<EgtWPFLib5:EgtMainWindow x:Class="HelpWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title_Msg}"
Icon="/Resources/Icarus.ico"
Height="600"
Width="800"
CloseCommand="{Binding Close_Command, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource Help_Window}">
<RichTextBox IsReadOnly="True"
IsDocumentEnabled="True">
<!--<FlowDocumentReader ViewingMode="Page"
IsTwoPageViewEnabled="False"
IsScrollViewEnabled="False">-->
<FlowDocument>
<Paragraph FontSize="50"
FontWeight="Bold"
TextAlignment="Center">
Icarus Manual
</Paragraph>
<List FontSize="14">
<ListItem>
<Paragraph>
<Hyperlink Command="{Binding SoftwareStructure_Command}">
Software Structure
</Hyperlink>
</Paragraph>
<List FontSize="14">
<ListItem>
<Paragraph>
<Hyperlink Command="{Binding Icon_Command}">
Icon
</Hyperlink>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<Hyperlink Command="{Binding ProjectManagerBar_Command}">
Project Manager Bar
</Hyperlink>
</Paragraph>
</ListItem>
<ListItem>
<Paragraph>View Bar</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Status Bar</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Top Panel</Paragraph>
</ListItem>
<ListItem>
<Paragraph>Slice Manager</Paragraph>
</ListItem>
</List>
</ListItem>
<ListItem>
<Paragraph>ListItem 2</Paragraph>
</ListItem>
<ListItem>
<Paragraph>ListItem 3</Paragraph>
</ListItem>
</List>
</FlowDocument>
</RichTextBox>
<!--</FlowDocumentReader>-->
</EgtWPFLib5:EgtMainWindow>
-18
View File
@@ -1,18 +0,0 @@
Public Class HelpWndV
Private WithEvents m_HelpWndVM As HelpWndVM
Sub New(Owner As Window, HelpWndVM As HelpWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = HelpWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_HelpWndVM = HelpWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_HelpWndVM.m_CloseWindow
Me.Close()
End Sub
End Class
-108
View File
@@ -1,108 +0,0 @@
Imports System.Collections.ObjectModel
Imports System.Drawing
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.ToolTip
Imports EgtWPFLib5
Public Class HelpWndVM
#Region "FIELDS & PROPERTIES"
Friend Event m_CloseWindow(bDialogResult As Boolean)
#Region "Messages"
Public ReadOnly Property Title_Msg As String
Get
Return "Help"
End Get
End Property
#End Region ' Messages
' Definizione comandi
Private m_cmdSoftwareStructure As ICommand
Private m_cmdIcon As ICommand
Private m_cmdProjectManagerBar As ICommand
Private m_cmdClose As ICommand
#End Region ' FIELDS & PROPERTIES
Sub New()
Map.SetRefHelpWndVM(Me)
End Sub
#Region "COMMANDS"
#Region "SoftwareStructure"
Public ReadOnly Property SoftwareStructure_Command As ICommand
Get
If m_cmdSoftwareStructure Is Nothing Then
m_cmdSoftwareStructure = New Command(AddressOf SoftwareStructure)
End If
Return m_cmdSoftwareStructure
End Get
End Property
Public Sub SoftwareStructure()
End Sub
#End Region ' SoftwareStructure
#Region "Icon"
Public ReadOnly Property Icon_Command As ICommand
Get
If m_cmdIcon Is Nothing Then
m_cmdIcon = New Command(AddressOf Icon)
End If
Return m_cmdIcon
End Get
End Property
Public Sub Icon()
Map.refHelpPanelVM.SelHelpPage(HelpPanelVM.HelpPages.ICON)
End Sub
#End Region ' Icon
#Region "ProjectManagerBar"
Public ReadOnly Property ProjectManagerBar_Command As ICommand
Get
If m_cmdProjectManagerBar Is Nothing Then
m_cmdProjectManagerBar = New Command(AddressOf ProjectManagerBar)
End If
Return m_cmdProjectManagerBar
End Get
End Property
Public Sub ProjectManagerBar()
Map.refHelpPanelVM.SelHelpPage(HelpPanelVM.HelpPages.PROJECTMANAGER)
End Sub
#End Region ' ProjectManagerBar
#Region "Close"
Public ReadOnly Property Close_Command As ICommand
Get
If m_cmdClose Is Nothing Then
m_cmdClose = New Command(AddressOf Close)
End If
Return m_cmdClose
End Get
End Property
Public Sub Close()
Map.refHelpPanelVM.SelHelpPage(HelpPanelVM.HelpPages.NULL)
Map.SetRefHelpWndVM(Nothing)
RaiseEvent m_CloseWindow(True)
End Sub
#End Region ' Close
#End Region ' COMMANDS
End Class
+14 -30
View File
@@ -150,6 +150,10 @@
<DependentUpon>DispositionPanelV.xaml</DependentUpon> <DependentUpon>DispositionPanelV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="DispositionPanel\DispositionPanelVM.vb" /> <Compile Include="DispositionPanel\DispositionPanelVM.vb" />
<Compile Include="EgtMessageBox\EgtMessageBoxV.xaml.vb">
<DependentUpon>EgtMessageBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="EgtMessageBox\EgtMessageBoxVM.vb" />
<Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb"> <Compile Include="FilledSolidPanel\FilledSolidPanelV.xaml.vb">
<DependentUpon>FilledSolidPanelV.xaml</DependentUpon> <DependentUpon>FilledSolidPanelV.xaml</DependentUpon>
</Compile> </Compile>
@@ -158,20 +162,6 @@
<DependentUpon>FilledSolidParamPanelV.xaml</DependentUpon> <DependentUpon>FilledSolidParamPanelV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="FilledSolidParamPanel\FilledSolidParamPanelVM.vb" /> <Compile Include="FilledSolidParamPanel\FilledSolidParamPanelVM.vb" />
<Compile Include="HelpPanel\HelpPanelV.xaml.vb">
<DependentUpon>HelpPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="HelpPanel\HelpPanelVM.vb" />
<Compile Include="HelpPanel\Icon_Tooltip.xaml.vb">
<DependentUpon>Icon_Tooltip.xaml</DependentUpon>
</Compile>
<Compile Include="HelpPanel\ProjectManager_Tooltip.xaml.vb">
<DependentUpon>ProjectManager_Tooltip.xaml</DependentUpon>
</Compile>
<Compile Include="HelpWnd\HelpWndV.xaml.vb">
<DependentUpon>HelpWndV.xaml</DependentUpon>
</Compile>
<Compile Include="HelpWnd\HelpWndVM.vb" />
<Compile Include="ImportExportMachiningPanel\ImportExportMachiningPanelV.xaml.vb"> <Compile Include="ImportExportMachiningPanel\ImportExportMachiningPanelV.xaml.vb">
<DependentUpon>ImportExportMachiningPanelV.xaml</DependentUpon> <DependentUpon>ImportExportMachiningPanelV.xaml</DependentUpon>
</Compile> </Compile>
@@ -376,6 +366,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="EgtMessageBox\EgtMessageBoxV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="FilledSolidPanel\FilledSolidPanelV.xaml"> <Page Include="FilledSolidPanel\FilledSolidPanelV.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -384,22 +378,6 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="HelpPanel\HelpPanelV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="HelpPanel\Icon_Tooltip.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="HelpPanel\ProjectManager_Tooltip.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="HelpWnd\HelpWndV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ImportExportMachiningPanel\ImportExportMachiningPanelV.xaml"> <Page Include="ImportExportMachiningPanel\ImportExportMachiningPanelV.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator> <Generator>XamlIntelliSenseFileGenerator</Generator>
@@ -634,6 +612,7 @@
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None> </None>
<None Include="packages.config" /> <None Include="packages.config" />
<Resource Include="Resources\EgtMessageBox\Error.png" />
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" /> <Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
<Resource Include="Resources\Fonts\Roboto-Light.ttf" /> <Resource Include="Resources\Fonts\Roboto-Light.ttf" />
</ItemGroup> </ItemGroup>
@@ -885,6 +864,11 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\RibParamPanel\CopyFrom.png" /> <Resource Include="Resources\RibParamPanel\CopyFrom.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\EgtMessageBox\Information.png" />
<Resource Include="Resources\EgtMessageBox\Question.png" />
<Resource Include="Resources\EgtMessageBox\Warning.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe <PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
@@ -157,7 +157,8 @@ Public Class ImportExportMachiningPanelVM
nIndex += 1 nIndex += 1
End While End While
If bIsOriginal AndAlso bIsCustom Then If bIsOriginal AndAlso bIsCustom Then
MessageBox.Show("Corrupted file! Impossible to import it!") 'MessageBox.Show("Corrupted file! Impossible to import it!")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Corrupted file! Impossible to import it!")
ElseIf bIsOriginal Then ElseIf bIsOriginal Then
LoadOriginalMaterial() LoadOriginalMaterial()
End If End If
@@ -301,9 +302,12 @@ Public Class ImportExportMachiningPanelVM
sDuplicatedMaterialList &= " - " & m_MachiningList(Index).sName & Environment.NewLine sDuplicatedMaterialList &= " - " & m_MachiningList(Index).sName & Environment.NewLine
End If End If
Next Next
MessageBox.Show("Impossible to import the package because materials named:" & Environment.NewLine & 'MessageBox.Show("Impossible to import the package because materials named:" & Environment.NewLine &
sDuplicatedMaterialList & Environment.NewLine & ' sDuplicatedMaterialList & Environment.NewLine &
"Please modify the names of these machining and then retry to import the materials.") ' "Please modify the names of these machining and then retry to import the materials.")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible to import the package because materials named:" & Environment.NewLine &
sDuplicatedMaterialList & Environment.NewLine &
"Please modify the names of these machining and then retry to import the materials.")
Return Return
End If End If
' aggiorno/aggiungo materiali ' aggiorno/aggiungo materiali
@@ -353,9 +357,12 @@ Public Class ImportExportMachiningPanelVM
For Index = 0 To ImportedMaterialList.Count - 1 For Index = 0 To ImportedMaterialList.Count - 1
sMaterialList &= " - " & m_MachiningList(Index).sName & " (" & If(ImportedMaterialList(Index) = MaterialState.NOTFOUND, "New", "Updated") & ")" & Environment.NewLine sMaterialList &= " - " & m_MachiningList(Index).sName & " (" & If(ImportedMaterialList(Index) = MaterialState.NOTFOUND, "New", "Updated") & ")" & Environment.NewLine
Next Next
MessageBox.Show("List of the materials:" & Environment.NewLine & 'MessageBox.Show("List of the materials:" & Environment.NewLine &
sMaterialList & Environment.NewLine & ' sMaterialList & Environment.NewLine &
"Import successfully completed.") ' "Import successfully completed.")
EgtMessageBoxV.Show(Application.Current.MainWindow, "List of the materials:" & Environment.NewLine &
sMaterialList & Environment.NewLine &
"Import successfully completed.")
Return Return
End Sub End Sub
@@ -471,7 +478,7 @@ Public Class ImportExportMachiningPanelVM
End Select End Select
Case WindowModeEnum.EXPORT, WindowModeEnum.EXPORT_ORIG Case WindowModeEnum.EXPORT, WindowModeEnum.EXPORT_ORIG
' chiedo il nome con cui salvare il file ' chiedo il nome con cui salvare il file
Dim sExtension As String ="" Dim sExtension As String = ""
If m_WindowType = WindowTypeEnum.MATERIAL Then If m_WindowType = WindowTypeEnum.MATERIAL Then
If m_WindowMode = WindowModeEnum.EXPORT_ORIG Then If m_WindowMode = WindowModeEnum.EXPORT_ORIG Then
sExtension = OriginalMaterialDataExtension sExtension = OriginalMaterialDataExtension
@@ -580,7 +587,8 @@ Public Class ImpExpMachiningItem
If m_AlreadyExist Then If m_AlreadyExist Then
Select Case m_WindowType Select Case m_WindowType
Case WindowTypeEnum.MATERIAL Case WindowTypeEnum.MATERIAL
Select Case System.Windows.MessageBox.Show("Material already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
'System.Windows.MessageBox.Show("Material already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_ChangeName = False m_ChangeName = False
m_Active = True m_Active = True
@@ -594,7 +602,8 @@ Public Class ImpExpMachiningItem
End While End While
End If End If
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "") m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
System.Windows.MessageBox.Show("Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK) 'System.Windows.MessageBox.Show("Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Material will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
NotifyPropertyChanged(NameOf(sName)) NotifyPropertyChanged(NameOf(sName))
m_ChangeName = True m_ChangeName = True
m_Active = True m_Active = True
@@ -602,7 +611,8 @@ Public Class ImpExpMachiningItem
m_Active = False m_Active = False
End Select End Select
Case WindowTypeEnum.MACHINING Case WindowTypeEnum.MACHINING
Select Case System.Windows.MessageBox.Show("Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
'System.Windows.MessageBox.Show("Machining already existing in Db. Overwrite it?", "", MessageBoxButton.YesNoCancel)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_ChangeName = False m_ChangeName = False
m_Active = True m_Active = True
@@ -616,7 +626,8 @@ Public Class ImpExpMachiningItem
End While End While
End If End If
m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "") m_sName = m_sOrigName & IMPEXPNAME & If(nImpNameIndex > 0, "_" & nImpNameIndex, "")
System.Windows.MessageBox.Show("Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK) 'System.Windows.MessageBox.Show("Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Machining will be imported with the name: " & m_sName, "", MessageBoxButton.OK)
NotifyPropertyChanged(NameOf(sName)) NotifyPropertyChanged(NameOf(sName))
m_ChangeName = True m_ChangeName = True
m_Active = True m_Active = True
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Icarus" xmlns:local="clr-namespace:Icarus"
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
Orientation="Horizontal"> Orientation="Horizontal">
<local:CheckedImageToggleButton ToolTip="{Binding GetDist_ToolTip}" <local:CheckedImageToggleButton ToolTip="{Binding GetDist_ToolTip}"
@@ -96,8 +96,9 @@ Public Class MyInstrumentPanelVM
EgtDraw() EgtDraw()
' Ripristino stato segnalazione modifica ' Ripristino stato segnalazione modifica
DisableMgr.ReEnable() DisableMgr.ReEnable()
MessageBox.Show(sResult) 'MessageBox.Show(sResult)
Else EgtMessageBoxV.Show(Application.Current.MainWindow, sResult)
Else
' Disabilito segnalazione modificato ' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr Dim DisableMgr As New DisableModifiedMgr
' cancello tutti i gruppi con i chunk ' cancello tutti i gruppi con i chunk
+2 -1
View File
@@ -48,7 +48,8 @@ Public Class MachSaveInDbWndVM
Public Sub Ok() Public Sub Ok()
If Map.refTopPanelVM.MachiningList.Any(Function(x As MachiningIndex) x.sName = m_sName) Then If Map.refTopPanelVM.MachiningList.Any(Function(x As MachiningIndex) x.sName = m_sName) Then
MessageBox.Show("Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show("Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Name already used in Db! Please insert a different name.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
Return Return
End If End If
RaiseEvent m_CloseWindow(True) RaiseEvent m_CloseWindow(True)
+2 -2
View File
@@ -749,7 +749,7 @@ Public Class NumericMachiningParam
MyBase.New(Type, Cathegory) MyBase.New(Type, Cathegory)
' leggo ed imposto eventuali min e max ' leggo ed imposto eventuali min e max
Dim sMinMax As String = "" Dim sMinMax As String = ""
If GetMainPrivateProfileString(S_MINMAX, Type, "", sMinMax) > 0 Then If GetPrivateProfileString(S_MINMAX, Type, "", sMinMax, CurrentMachine.sMachIniFile) > 0 Then
Dim sMinMaxValues() As String = sMinMax.Split(","c) Dim sMinMaxValues() As String = sMinMax.Split(","c)
Dim dMin As Double = 0 Dim dMin As Double = 0
Dim dMax As Double = 0 Dim dMax As Double = 0
@@ -838,7 +838,7 @@ Public Class NumericMachiningParam
m_dValue = ReadMachiningParamDouble(nIndex, MAC_POSTFLOWDELAY, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_POSTFLOWDELAY, 0)
m_bIsLen = False m_bIsLen = False
Case Params.SCREWBACK Case Params.SCREWBACK
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SCREWBACK, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_SCREWBACK, 45)
m_bIsLen = False m_bIsLen = False
Case Params.RIBSOVERLAP Case Params.RIBSOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0) m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0)
+6 -3
View File
@@ -26,7 +26,8 @@ Public Class MachiningDbVM
' verifico se modificato ' verifico se modificato
If m_SelMachining.bIsModified Then If m_SelMachining.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
'MessageBox.Show("Do you want to save the modification done on the selected machining?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMachining.Save() m_SelMachining.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -198,7 +199,8 @@ Public Class MachiningDbVM
Public Sub Ok() Public Sub Ok()
If Not IsNothing(m_SelMachining) AndAlso m_SelMachining.bIsModified Then If Not IsNothing(m_SelMachining) AndAlso m_SelMachining.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
'MessageBox.Show("Do you want to save modified parameters?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMachining.Save() m_SelMachining.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -309,7 +311,8 @@ Public Class MachiningDbVM
Public Sub Delete() Public Sub Delete()
If IsNothing(m_SelMachining) Then Return If IsNothing(m_SelMachining) Then Return
' chiedo conferma ' chiedo conferma
Select Case MessageBox.Show("Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
'MessageBox.Show("Are you sure you want to delete the selected machining?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_MachiningList.Remove(m_SelMachining) m_MachiningList.Remove(m_SelMachining)
SetIsModified(True) SetIsModified(True)
+2 -2
View File
@@ -195,8 +195,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico ' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey) m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2504, 1, m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(5583, 2505, 1, m_nKeyLevel) And
EgtGetKeyOptions(5583, 2504, 1, m_nKeyOptions) EgtGetKeyOptions(5583, 2505, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString()) m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
+3 -2
View File
@@ -148,7 +148,7 @@ Public Class MainWindowVM
End Sub End Sub
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
If Map.refSliceManagerVM.bCalculating Then If Map.refSliceManagerVM.bCalculating OrElse Map.refSliceManagerVM.bCalcSolid Then
Map.refSliceManagerVM.ProcessEvents(nProg, nPause) Map.refSliceManagerVM.ProcessEvents(nProg, nPause)
End If End If
If Not IsNothing(Map.refImportLoadingWndVM) Then If Not IsNothing(Map.refImportLoadingWndVM) Then
@@ -226,7 +226,8 @@ Public Class MainWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub CloseApplication(ByVal param As Object) Public Sub CloseApplication(ByVal param As Object)
If Map.refSliceManagerVM.bCalculating Then If Map.refSliceManagerVM.bCalculating Then
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
CloseApplication() CloseApplication()
+2 -1
View File
@@ -286,7 +286,8 @@ Public Class ManagePartPanelVM
Next Next
Next Next
If sErr.Count > 0 Then If sErr.Count > 0 Then
MessageBox.Show(String.Concat(sErr), "Error") 'MessageBox.Show(String.Concat(sErr), "Error")
EgtMessageBoxV.Show(Application.Current.MainWindow, String.Concat(sErr), "Error")
Return Return
Else Else
' Creo pezzi e layer necessari ' Creo pezzi e layer necessari
+4 -2
View File
@@ -629,7 +629,8 @@ Public Class GeomEntity_MenuItem
Map.refManagePartPanelVM.SetIsEnabled(True) Map.refManagePartPanelVM.SetIsEnabled(True)
Return Return
ElseIf m_Type = ManagePart_Layer.LayerType.DELETE Then ElseIf m_Type = ManagePart_Layer.LayerType.DELETE Then
If MessageBox.Show("Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show("Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to delete this entity?", "Delete confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
EgtErase(m_OrigEntity.nId) EgtErase(m_OrigEntity.nId)
' se l'entita' e' gia' in lista pezzi ' se l'entita' e' gia' in lista pezzi
If Not IsNothing(m_OrigEntity.OrigLayer) Then If Not IsNothing(m_OrigEntity.OrigLayer) Then
@@ -1037,7 +1038,8 @@ Public Class ManagerLayer_MenuItem
Case Else ' PartMenuCmd.IMPORTPRINT Case Else ' PartMenuCmd.IMPORTPRINT
Dim bDeleteOldPrint As Boolean = False Dim bDeleteOldPrint As Boolean = False
If m_OrigLayer.EntityList.Count > 0 Then If m_OrigLayer.EntityList.Count > 0 Then
If MessageBox.Show("Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then 'If MessageBox.Show("Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Importing a new print solid the current one will be deleted. Are you sure you want to proced?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
Return Return
Else Else
bDeleteOldPrint = True bDeleteOldPrint = True
+2 -1
View File
@@ -769,7 +769,8 @@ Public Class StringMaterialParam
End Property End Property
Public Sub Original() Public Sub Original()
If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show("Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Are you sure you want to set this material as original?", "Original material confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
m_sGUID = ORIG_MATERIAL m_sGUID = ORIG_MATERIAL
m_sValue = ORIG_MATERIAL m_sValue = ORIG_MATERIAL
NotifyPropertyChanged(NameOf(sValue)) NotifyPropertyChanged(NameOf(sValue))
+10 -5
View File
@@ -24,7 +24,8 @@ Public Class MaterialDbVM
' verifico se modificato ' verifico se modificato
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question) 'Select Case MessageBox.Show("Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save material modification?", "Info", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMaterial.Save() m_SelMaterial.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -236,7 +237,8 @@ Public Class MaterialDbVM
Public Sub Ok() Public Sub Ok()
If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then If Not IsNothing(m_SelMaterial) AndAlso m_SelMaterial.bIsModified Then
' chiedo se salvare ' chiedo se salvare
Select Case MessageBox.Show("Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning) 'Select Case MessageBox.Show("Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, "Do you want to save material modification?", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_SelMaterial.Save() m_SelMaterial.Save()
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -365,17 +367,20 @@ Public Class MaterialDbVM
' se materiale originale, esco ' se materiale originale, esco
If SelMaterialIsOriginal() Then If SelMaterialIsOriginal() Then
If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then If Map.refMainWindowVM.MainWindowM.nUserLevel >= 5 Then
If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then 'If MessageBox.Show("Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, "Trying to delete an Original Material! Are you sure you want to delete it?", "", MessageBoxButton.YesNo, MessageBoxImage.Warning) <> MessageBoxResult.Yes Then
Return Return
End If End If
sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?" sCheckMessage = "Trying to delete an Original Material! Are you ABSOLUTELY sure you want to delete it?"
Else Else
MessageBox.Show("Original material impossible to delete!") 'MessageBox.Show("Original material impossible to delete!")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Original material impossible to delete!")
Return Return
End If End If
End If End If
' chiedo conferma ' chiedo conferma
Select Case MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) Select Case EgtMessageBoxV.Show(Application.Current.MainWindow, sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
'MessageBox.Show(sCheckMessage, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning)
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
m_MaterialList.Remove(m_SelMaterial) m_MaterialList.Remove(m_SelMaterial)
SetIsModified(True) SetIsModified(True)
+2 -2
View File
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.4.1")> <Assembly: AssemblyVersion("2.5.5.1")>
<Assembly: AssemblyFileVersion("2.5.4.1")> <Assembly: AssemblyFileVersion("2.5.5.1")>
+31 -26
View File
@@ -563,17 +563,17 @@ Public Class OptionWindowVM
End Property End Property
Public ReadOnly Property ThickLineMsg As String Public ReadOnly Property ThickLineMsg As String
Get Get
Return EgtMsg( 6536) ' Linee spesse Return EgtMsg(6536) ' Linee spesse
End Get End Get
End Property End Property
Public ReadOnly Property SmoothTriMeshMsg As String Public ReadOnly Property SmoothTriMeshMsg As String
Get Get
Return EgtMsg( 6518) ' Superfici smussate Return EgtMsg(6518) ' Superfici smussate
End Get End Get
End Property End Property
Public ReadOnly Property UpdateLicenceMsg As String Public ReadOnly Property UpdateLicenceMsg As String
Get Get
Return EgtMsg( 6553) ' Aggiorna licenza Return EgtMsg(6553) ' Aggiorna licenza
End Get End Get
End Property End Property
@@ -953,31 +953,32 @@ Public Class OptionWindowVM
Dim sMachDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, sMachName) Dim sMachDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, sMachName)
' Preparo direttorio temporaneo ' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, "Temp") Dim sTempDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, "Temp")
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If End If
My.Computer.FileSystem.CreateDirectory( sTempDir) My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo ' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sMachZip) Using zip As New Ionic.Zip.ZipFile(sMachZip)
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite) zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using End Using
' Se non è una macchina segnalo il problema ed esco ' Se non è una macchina segnalo il problema ed esco
If Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".ini")) Or If Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".ini")) Or
Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".mlde")) Then Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then
' Il file {0} non contiene una macchina - Avviso ' Il file {0} non contiene una macchina - Avviso
Dim sOut As String = String.Format(EgtMsg(6529), sMachZip) Dim sOut As String = String.Format(EgtMsg(6529), sMachZip)
MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco ' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return Return
End If End If
' Imposto data e ora correnti al file mlde della macchina ' Imposto data e ora correnti al file mlde della macchina
Try Try
File.SetLastWriteTime( Path.Combine( sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now) File.SetLastWriteTime(Path.Combine(sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
Catch ex As Exception Catch ex As Exception
End Try End Try
' Verifico esistenza di una macchina con lo stesso nome ' Verifico esistenza di una macchina con lo stesso nome
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir) Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists(sMachDir)
Dim bUpdate As Boolean = True Dim bUpdate As Boolean = True
If bOldExists Then If bOldExists Then
Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName)) Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName))
@@ -994,23 +995,24 @@ Public Class OptionWindowVM
End Select End Select
' Faccio una copia di backup della macchina corrente ' Faccio una copia di backup della macchina corrente
Dim sBackupDir As String = sMachDir & ".old" Dim sBackupDir As String = sMachDir & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If End If
Try Try
My.Computer.FileSystem.MoveDirectory( sMachDir, sBackupDir, True) My.Computer.FileSystem.MoveDirectory(sMachDir, sBackupDir, True)
Catch ex As Exception Catch ex As Exception
' Ripristino lo stato originale ed esco ' Ripristino lo stato originale ed esco
My.Computer.FileSystem.MoveDirectory( sBackupDir, sMachDir, True) My.Computer.FileSystem.MoveDirectory(sBackupDir, sMachDir, True)
' L'aggiornamento della macchina "{0}" non è riuscito. ' L'aggiornamento della macchina "{0}" non è riuscito.
Dim sKo As String = String.Format(EgtMsg(6535), sMachName) Dim sKo As String = String.Format(EgtMsg(6535), sMachName)
EgtOutLog( sKo) EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK) 'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
Return Return
End Try End Try
End If End If
' Installo la macchina ' Installo la macchina
My.Computer.FileSystem.MoveDirectory( Path.Combine( sTempDir, sMachName), sMachDir, True) My.Computer.FileSystem.MoveDirectory(Path.Combine(sTempDir, sMachName), sMachDir, True)
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi ' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
If bOldExists And bUpdate Then If bOldExists And bUpdate Then
Dim sBackupDir As String = sMachDir & ".old" Dim sBackupDir As String = sMachDir & ".old"
@@ -1047,10 +1049,11 @@ Public Class OptionWindowVM
End If End If
'La macchina "{0}" è stata aggiornata con successo. 'La macchina "{0}" è stata aggiornata con successo.
Dim sOk As String = String.Format(EgtMsg(6530), sMachName) Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
EgtOutLog( sOk) EgtOutLog(sOk)
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK) 'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
' Rimuovo il direttorio temporaneo ' Rimuovo il direttorio temporaneo
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
' Aggiorno la lista delle macchina ' Aggiorno la lista delle macchina
MyMachine.InsertMachine(sMachDir, Map.refMachinePanelVM.MachineList) MyMachine.InsertMachine(sMachDir, Map.refMachinePanelVM.MachineList)
End Sub End Sub
@@ -1096,7 +1099,7 @@ Public Class OptionWindowVM
' aggiungo i file della Macchina ' aggiungo i file della Macchina
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
If Directory.Exists(sMachineDir) Then If Directory.Exists(sMachineDir) Then
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True) zip.AddSelectedFiles("name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
End If End If
' salvo lo zip ' salvo lo zip
zip.Save() zip.Save()
@@ -1106,12 +1109,14 @@ Public Class OptionWindowVM
' L'esportazione della macchina "{0}" non è riuscita. ' L'esportazione della macchina "{0}" non è riuscita.
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName) Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
EgtOutLog(sKo) EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK) 'MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
End Try End Try
'La macchina "{0}" è stata esportata con successo. 'La macchina "{0}" è stata esportata con successo.
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName) Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
EgtOutLog(sOk) EgtOutLog(sOk)
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK) 'MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
End Sub End Sub
#End Region ' ExportMachine #End Region ' ExportMachine
-7
View File
@@ -86,12 +86,5 @@
<Image Source="/Resources/ProjectManager/Send.png" <Image Source="/Resources/ProjectManager/Send.png"
Style="{StaticResource Button_Image}"/> Style="{StaticResource Button_Image}"/>
</Button> </Button>
<Button Command="{Binding Help_Command}"
ToolTip="{Binding Help_ToolTip}"
Margin="2.5,0,0,0"
Style="{StaticResource ProjManager_Button}">
<Image Source="/Resources/ProjectManager/Send.png"
Style="{StaticResource Button_Image}"/>
</Button>
</StackPanel> </StackPanel>
+12 -30
View File
@@ -63,7 +63,6 @@ Public Class ProjManagerVM
Private m_cmdExport As ICommand Private m_cmdExport As ICommand
Private m_cmdOptions As ICommand Private m_cmdOptions As ICommand
Private m_cmdSendFeedback As ICommand Private m_cmdSendFeedback As ICommand
Private m_cmdHelp As ICommand
#Region "ToolTip" #Region "ToolTip"
@@ -150,6 +149,9 @@ Public Class ProjManagerVM
''' Execute the Save. This method is invoked by the SaveCommand. ''' Execute the Save. This method is invoked by the SaveCommand.
''' </summary> ''' </summary>
Public Sub NewProjectCmd() Public Sub NewProjectCmd()
' 'MessageBox.Show("Testo di prova EgtMessageBox", "Titolo di prova")
' Dim x = EgtMessageBoxV.Show(Application.Current.MainWindow, "Testo di prova EgtMessageBox", "Titolo di prova", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning, MessageBoxResult.Yes)
NewProject(True) NewProject(True)
End Sub End Sub
@@ -198,7 +200,7 @@ Public Class ProjManagerVM
End Sub End Sub
Friend Function OpenProject(sFilePath As String) As Boolean Friend Function OpenProject(sFilePath As String) As Boolean
Map.refSceneHostVM.OpenProject(sFilePath) Return Map.refSceneHostVM.OpenProject(sFilePath)
End Function End Function
#End Region ' OpenCommand #End Region ' OpenCommand
@@ -371,7 +373,8 @@ Public Class ProjManagerVM
GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress) GetMainPrivateProfileString(S_GENERAL, K_SUPPORT, "support@egaltech.com", sSupportAddress)
' se vuoto do messaggio di errore ed esco ' se vuoto do messaggio di errore ed esco
If String.IsNullOrWhiteSpace(sSupportAddress) Then If String.IsNullOrWhiteSpace(sSupportAddress) Then
MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 10), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
' Recupero numero chiave ' Recupero numero chiave
@@ -382,14 +385,16 @@ Public Class ProjManagerVM
EgtGetCurrFilePath(sCurrProject) EgtGetCurrFilePath(sCurrProject)
' se nome file vuoto o con estensione non valida, chiedo se si vuole salvare ' se nome file vuoto o con estensione non valida, chiedo se si vuole salvare
If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refSceneHostVM.SaveProject() Map.refSceneHostVM.SaveProject()
End If End If
EgtGetCurrFilePath(sCurrProject) EgtGetCurrFilePath(sCurrProject)
' se modificato, chiedo se si vuole salvare ' se modificato, chiedo se si vuole salvare
Else Else
If EgtGetModified() Then If EgtGetModified() Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then 'If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
Map.refSceneHostVM.SaveProject() Map.refSceneHostVM.SaveProject()
End If End If
End If End If
@@ -476,7 +481,8 @@ Public Class ProjManagerVM
bEx = True bEx = True
End Try End Try
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information) 'MessageBox.Show(String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(MSG_TOPCOMMANDBAR + 12), sSupportAddress, sZipToCreate), EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK, MessageBoxImage.Information)
Else Else
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5) Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(MSG_TOPCOMMANDBAR + 14), 5)
End If End If
@@ -484,30 +490,6 @@ Public Class ProjManagerVM
#End Region ' SendFeedback #End Region ' SendFeedback
#Region "Help"
''' <summary>
''' Returns a command that do SendFeedback.
''' </summary>
Public ReadOnly Property Help_Command As ICommand
Get
If m_cmdHelp Is Nothing Then
m_cmdHelp = New Command(AddressOf Help)
End If
Return m_cmdHelp
End Get
End Property
''' <summary>
''' Execute the SendFeedback. This method is invoked by the SendFeedbackCommand.
''' </summary>
Public Sub Help(ByVal param As Object)
Dim HelpWnd As New HelpWndV(Application.Current.MainWindow, New HelpWndVM())
HelpWnd.Show()
End Sub
#End Region ' Help
#End Region ' Commands #End Region ' Commands
End Class End Class
+20 -3
View File
@@ -2,7 +2,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PrintApp="clr-namespace:Icarus"> xmlns:PrintApp="clr-namespace:Icarus">
<DockPanel.Resources>
<PrintApp:VisibilityToRowConverter x:Key="VisibilityToRowConverter"/>
</DockPanel.Resources>
<Grid DockPanel.Dock="Top"> <Grid DockPanel.Dock="Top">
<PrintApp:TopPanelV Grid.Column="1" <PrintApp:TopPanelV Grid.Column="1"
DataContext="{StaticResource TopPanelVM }"/> DataContext="{StaticResource TopPanelVM }"/>
@@ -27,12 +29,27 @@
DataContext="{StaticResource SliderManagerVM}" DataContext="{StaticResource SliderManagerVM}"
HorizontalAlignment="Stretch"/> HorizontalAlignment="Stretch"/>
<!--StatusBar --> <!--StatusBar -->
<PrintApp:ControllerInputPanelV Grid.Row="1" <Grid Grid.RowSpan="2"
Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="67"/>
</Grid.RowDefinitions>
<PrintApp:MessagePanelV Grid.Row="{Binding DataContext.Message_Visibility, ElementName=ControllerInputPanelV, Converter={StaticResource VisibilityToRowConverter}}"
Grid.ColumnSpan="2"
DataContext="{StaticResource StatusBarVM}"/>
<PrintApp:ControllerInputPanelV x:Name="ControllerInputPanelV" Grid.Row="2"
Grid.ColumnSpan="2"
DataContext="{StaticResource ControllerInputPanelVM}"/>
</Grid>
<!--<PrintApp:ControllerInputPanelV Grid.Row="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
DataContext="{StaticResource ControllerInputPanelVM}"/> DataContext="{StaticResource ControllerInputPanelVM}"/>
<PrintApp:MessagePanelV Grid.Row="1" <PrintApp:MessagePanelV Grid.Row="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
DataContext="{StaticResource StatusBarVM}"/> DataContext="{StaticResource StatusBarVM}"/>-->
<PrintApp:ShowPanelV Grid.Column="2" <PrintApp:ShowPanelV Grid.Column="2"
Grid.Row="1" Grid.Row="1"
DataContext="{StaticResource ShowPanelVM}"/> DataContext="{StaticResource ShowPanelVM}"/>
+13
View File
@@ -3,6 +3,7 @@ Imports EgtWPFLib5
Imports EgtUILib Imports EgtUILib
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports System.IO Imports System.IO
Imports System.Globalization
Public Class ProjectVM Public Class ProjectVM
Inherits VMBase Inherits VMBase
@@ -28,3 +29,15 @@ Public Class ProjectVM
End Class End Class
Public Class VisibilityToRowConverter
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert
If IsNothing(value) Then Return 2
Return If(value = Visibility.Visible, 1, 2)
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New System.NotImplementedException()
End Function
End Class
Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

+63 -6
View File
@@ -42,6 +42,10 @@ Public Class RibPanelVM
Return m_SelRib Return m_SelRib
End Get End Get
Set(value As RibEntity) Set(value As RibEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refRibPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelRib))
Return
End If
m_SelRib = value m_SelRib = value
EgtDeselectAll() EgtDeselectAll()
If Not IsNothing(value) Then If Not IsNothing(value) Then
@@ -374,6 +378,8 @@ Public Class RibPanelVM
NotifyPropertyChanged(NameOf(bRotate_IsChecked)) NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.RIBPARAM) Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.RIBPARAM)
NotifyPropertyChanged(NameOf(RibList_IsEnabled)) NotifyPropertyChanged(NameOf(RibList_IsEnabled))
' disattivo interfaccia
ManageInterface(False)
Else Else
NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked)) NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
End If End If
@@ -383,6 +389,8 @@ Public Class RibPanelVM
m_bMachParam_IsChecked = False m_bMachParam_IsChecked = False
NotifyPropertyChanged(NameOf(bMachParam_IsChecked)) NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
NotifyPropertyChanged(NameOf(RibList_IsEnabled)) NotifyPropertyChanged(NameOf(RibList_IsEnabled))
' riattivo interfaccia
ManageInterface(True)
End Sub End Sub
Public ReadOnly Property Compo_Visibility As Visibility Public ReadOnly Property Compo_Visibility As Visibility
@@ -391,11 +399,17 @@ Public Class RibPanelVM
End Get End Get
End Property End Property
Private m_RibList_IsEnabled As Boolean = False
Public ReadOnly Property RibList_IsEnabled As Boolean Public ReadOnly Property RibList_IsEnabled As Boolean
Get Get
Return Not m_bMachParam_IsChecked Return If(m_RibList.Count > 0, m_RibList_IsEnabled, False)
End Get End Get
End Property End Property
Friend Sub SetRibListIsEnabled(bValue As Boolean)
m_RibList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(RibList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina ' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d Private m_OriginalGridFrame As New Frame3d
@@ -413,6 +427,8 @@ Public Class RibPanelVM
End Get End Get
End Property End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip" #Region "Tooltip"
Public ReadOnly Property Import_ToolTip As String Public ReadOnly Property Import_ToolTip As String
@@ -596,6 +612,8 @@ Public Class RibPanelVM
SelRib = m_RibList(0) SelRib = m_RibList(0)
NotifyPropertyChanged(NameOf(SelRib)) NotifyPropertyChanged(NameOf(SelRib))
End If End If
' abilito lista ribs
SetRibListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub End Sub
@@ -631,8 +649,13 @@ Public Class RibPanelVM
EgtSelectObj(m_SelRib.nCurveId) EgtSelectObj(m_SelRib.nCurveId)
Case RibSelectionTypes.EXTRUSION Case RibSelectionTypes.EXTRUSION
' creo layer per estrusione ' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId) Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION) If nNewExtrusionLayerId = GDB_ID.NULL Then
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Else
EgtEmptyGroup(nNewExtrusionLayerId)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId) EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
EgtSelectObj(m_SelRib.nCurveId) EgtSelectObj(m_SelRib.nCurveId)
Case RibSelectionTypes.BOTH Case RibSelectionTypes.BOTH
@@ -640,6 +663,8 @@ Public Class RibPanelVM
EgtSelectObj(m_SelRib.nExtrusionId) EgtSelectObj(m_SelRib.nExtrusionId)
End Select End Select
EgtDraw() EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True Return True
End Function End Function
@@ -649,6 +674,7 @@ Public Class RibPanelVM
End Sub End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD) Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command Select Case command
Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
' leggo altezza estrusione ' leggo altezza estrusione
@@ -688,6 +714,10 @@ Public Class RibPanelVM
' Imposto flag di ricalcolo slice ' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True) EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select End Select
' se non ho creato percorso riabilito interfaccia
If Not m_bIsCreatingPath Then
ManageInterface(True)
End If
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione ' se finita creazione estrusione
If m_bIsCreatingExtrusion Then If m_bIsCreatingExtrusion Then
@@ -754,9 +784,10 @@ Public Class RibPanelVM
EgtSelectObj(nNewEntityId) EgtSelectObj(nNewEntityId)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True m_bIsCreatingExtrusion = True
If Not EgtCurveIsClosed(nNewEntityId) Then
m_bEscOnLine2P = True
End If
Else Else
' cancello layer
'EgtErase(nNewRibLayerId)
EgtErase(nNewExtrusionLayerId) EgtErase(nNewExtrusionLayerId)
End If End If
End If End If
@@ -779,6 +810,13 @@ Public Class RibPanelVM
' rimetto la selezione scena a null ' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
End If End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
If m_bIsCreatingExtrusion Then m_bIsCreatingExtrusion = False
ManageInterface(True)
End If
End If End If
End Sub End Sub
@@ -814,6 +852,18 @@ Public Class RibPanelVM
Return nRibIndex + 1 Return nRibIndex + 1
End Function End Function
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetRibListIsEnabled(bValue)
End Sub
#End Region ' METHODS #End Region ' METHODS
#Region "COMMANDS" #Region "COMMANDS"
@@ -837,7 +887,9 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub Import(ByVal param As Object) Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.InsertRib() Map.refSceneHostVM.InsertRib()
ManageInterface(True)
End Sub End Sub
#End Region ' Import #End Region ' Import
@@ -861,6 +913,7 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub Line2P(ByVal param As Object) Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB) Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewRibLayerId = GDB_ID.NULL Then nNewRibLayerId = EgtCreateGroup(m_nPartId) If nNewRibLayerId = GDB_ID.NULL Then nNewRibLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewRibLayerId, LAY_NEWRIB) EgtSetName(nNewRibLayerId, LAY_NEWRIB)
@@ -905,10 +958,11 @@ Public Class RibPanelVM
Else Else
SelRib = Nothing SelRib = Nothing
m_bEdit_IsChecked = False m_bEdit_IsChecked = False
NotifyPropertyChanged(NameOf( bEdit_IsChecked)) NotifyPropertyChanged(NameOf(bEdit_IsChecked))
End If End If
NotifyPropertyChanged(NameOf(SelRib)) NotifyPropertyChanged(NameOf(SelRib))
End If End If
SetRibListIsEnabled(True)
End Sub End Sub
#End Region ' Delete #End Region ' Delete
@@ -1192,6 +1246,7 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneElevation(ByVal param As Object) Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub End Sub
@@ -1216,6 +1271,7 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object) Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub End Sub
@@ -1332,6 +1388,7 @@ Public Class RibPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneObj(ByVal param As Object) Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti ' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear() m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj() Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
+2 -1
View File
@@ -51,7 +51,8 @@ Public Class CopyFromWndVM
Public Sub Ok() Public Sub Ok()
If IsNothing(m_SelRib) Then If IsNothing(m_SelRib) Then
MessageBox.Show("Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning) 'MessageBox.Show("Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Please select the rib from which to copy the parameters!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
Return Return
End If End If
' copio i parametri nella rib corrente ' copio i parametri nella rib corrente
+2
View File
@@ -135,6 +135,8 @@ Public Class RibParamPanelVM
Map.refSliceManagerVM.UpdateDimensions() Map.refSliceManagerVM.UpdateDimensions()
End If End If
End If End If
' riattivo lista ribs
Map.refRibPanelVM.SetRibListIsEnabled(False)
' ripristino modalita' standard ' ripristino modalita' standard
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL) Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
Map.refRibPanelVM.ResetMachParamIsChecked() Map.refRibPanelVM.ResetMachParamIsChecked()
+28 -18
View File
@@ -85,21 +85,23 @@ Public Class MySceneHostVM
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore" ' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3) Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1) Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
' Altrimenti manca la licenza ' Altrimenti manca la licenza
Else Else
EgtOutLog("Problems with Licence") EgtOutLog("Problems with Licence")
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore" ' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6) Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1) Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then 'If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
If EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' Apro dialogo per richiesta file licenza ' Apro dialogo per richiesta file licenza
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With { Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".lic", .DefaultExt = ".lic",
.Filter = "Licences (.lic)|*.lic", .Filter = "Licences (.lic)|*.lic",
.CheckFileExists = True, .CheckFileExists = True,
.ValidateNames = True .ValidateNames = True
} }
If LicDlg.ShowDialog() = True Then If LicDlg.ShowDialog() = True Then
' Recupero il direttorio del file ' Recupero il direttorio del file
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName) Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
@@ -274,8 +276,6 @@ Public Class MySceneHostVM
bOk = MainController.OpenProject(sFilePath, False) bOk = MainController.OpenProject(sFilePath, False)
' Imposto stato gestione mouse diretto della scena a nessuno ' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull() MainScene.SetStatusNull()
' imposto modalita' import
Map.refTopPanelVM.SelPage = Pages.NULL
Return bOk Return bOk
End Function End Function
@@ -499,7 +499,8 @@ Public Class MySceneHostVM
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId) Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
' verifico che ci sia una sola entita' ' verifico che ci sia una sola entita'
If EgtGetGroupObjs(nNewLayerId) <> 1 Then If EgtGetGroupObjs(nNewLayerId) <> 1 Then
MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Else Else
' elimino eventuale entita' vecchia ' elimino eventuale entita' vecchia
If MenuItem.OrigLayer.EntityList.Count > 0 AndAlso MenuItem.OrigLayer.EntityList(0).nId <> GDB_ID.NULL Then EgtErase(MenuItem.OrigLayer.EntityList(0).nId) If MenuItem.OrigLayer.EntityList.Count > 0 AndAlso MenuItem.OrigLayer.EntityList(0).nId <> GDB_ID.NULL Then EgtErase(MenuItem.OrigLayer.EntityList(0).nId)
@@ -1023,7 +1024,8 @@ Public Class MySceneHostVM
EgtErase(EgtGetFirstPart()) EgtErase(EgtGetFirstPart())
CurrentMachine.CreateMachineTable() CurrentMachine.CreateMachineTable()
If Not bOk Then If Not bOk Then
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error 'MessageBox.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error on new file - Error
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10002), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Map.refTopPanelVM.PartList.Clear() Map.refTopPanelVM.PartList.Clear()
@@ -1052,7 +1054,8 @@ Public Class MySceneHostVM
Else Else
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
End If End If
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) 'Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
' leggo materiale e macchina ' leggo materiale e macchina
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE) Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
@@ -1064,7 +1067,8 @@ Public Class MySceneHostVM
' imposto la macchina ' imposto la macchina
Map.refMachinePanelVM.SelectedMachine = ProjectMachine Map.refMachinePanelVM.SelectedMachine = ProjectMachine
Else Else
MessageBox.Show("Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Project machine not found! Impossible to open the project.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Map.refProjManagerVM.NewProject(False) Map.refProjManagerVM.NewProject(False)
Return Return
End If End If
@@ -1087,7 +1091,9 @@ Public Class MySceneHostVM
Else Else
Dim sMaterialName As String = "" Dim sMaterialName As String = ""
EgtGetInfo(nTabPartId, KEY_MATERIAL_NAME, sMaterialName) EgtGetInfo(nTabPartId, KEY_MATERIAL_NAME, sMaterialName)
MessageBox.Show("Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine & 'MessageBox.Show("Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine &
' "Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Project material (Guid:" & sMaterialGuid & " Name:""" & sMaterialName & """) not found!" & Environment.NewLine &
"Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning) "Please select another material!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
End If End If
End If End If
@@ -1171,7 +1177,8 @@ Public Class MySceneHostVM
Else Else
Map.refProjManagerVM.MruFiles.Remove(sFile) Map.refProjManagerVM.MruFiles.Remove(sFile)
Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file Dim sMsg As String = EgtMsg(10004) & " '" & sFile & "'" 'Error saving file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
End Sub End Sub
@@ -1179,7 +1186,8 @@ Public Class MySceneHostVM
' Segnalo eventuale errore ' Segnalo eventuale errore
If Not bOk Then If Not bOk Then
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
Map.refProjManagerVM.MruImportFiles.Add(sFile) Map.refProjManagerVM.MruImportFiles.Add(sFile)
EgtSetInfo(EgtGetLastPart(), FILE_PATH, sFile) EgtSetInfo(EgtGetLastPart(), FILE_PATH, sFile)
@@ -1197,7 +1205,8 @@ Public Class MySceneHostVM
' Abilito progress e bottone stop ' Abilito progress e bottone stop
Map.refMyStatusBarVM.StartLoading("", True) Map.refMyStatusBarVM.StartLoading("", True)
Else Else
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error 'MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
End If End If
End Sub End Sub
@@ -1210,7 +1219,8 @@ Public Class MySceneHostVM
' Segnalo eventuale errore ' Segnalo eventuale errore
If Not bOk Then If Not bOk Then
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error 'MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
EgtMessageBoxV.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
ElseIf Path.GetExtension(sFile) <> ".cnc" Then ElseIf Path.GetExtension(sFile) <> ".cnc" Then
' creo oggetto pezzo in lista ' creo oggetto pezzo in lista
'Map.refProjectVM. 'Map.refProjectVM.
+1 -3
View File
@@ -15,9 +15,6 @@
<EgtWPFLib5:EgtMainWindow.TitlePanel> <EgtWPFLib5:EgtMainWindow.TitlePanel>
<PrintApp:ProjManagerV DataContext="{StaticResource ProjManagerVM}"/> <PrintApp:ProjManagerV DataContext="{StaticResource ProjManagerVM}"/>
</EgtWPFLib5:EgtMainWindow.TitlePanel> </EgtWPFLib5:EgtMainWindow.TitlePanel>
<EgtWPFLib5:EgtMainWindow.HelpPanel>
<PrintApp:HelpPanelV DataContext="{StaticResource HelpPanelVM}"/>
</EgtWPFLib5:EgtMainWindow.HelpPanel>
<EgtWPFLib5:EgtMainWindow.OpacityMask> <EgtWPFLib5:EgtMainWindow.OpacityMask>
<SolidColorBrush Color="White" Opacity="{Binding Window_Opacity}"/> <SolidColorBrush Color="White" Opacity="{Binding Window_Opacity}"/>
</EgtWPFLib5:EgtMainWindow.OpacityMask> </EgtWPFLib5:EgtMainWindow.OpacityMask>
@@ -29,4 +26,5 @@
<PrintApp:ProjectV DataContext="{StaticResource ProjectVM}"/> <PrintApp:ProjectV DataContext="{StaticResource ProjectVM}"/>
</DockPanel> </DockPanel>
</EgtWPFLib5:EgtMainWindow> </EgtWPFLib5:EgtMainWindow>
+6 -2
View File
@@ -130,7 +130,10 @@ Public Class SecondaryWindowVM
Dim sFile As String = Environment.GetCommandLineArgs(1) Dim sFile As String = Environment.GetCommandLineArgs(1)
Dim sExt As String = IO.Path.GetExtension(sFile).ToLower() Dim sExt As String = IO.Path.GetExtension(sFile).ToLower()
If String.IsNullOrWhiteSpace(sFile) OrElse String.IsNullOrWhiteSpace(sExt) Then Return False If String.IsNullOrWhiteSpace(sFile) OrElse String.IsNullOrWhiteSpace(sExt) Then Return False
Return OpenStdFile(sFile) Dim bOk As Boolean = OpenStdFile(sFile)
m_Window_Opacity = 1
NotifyPropertyChanged(NameOf(Window_Opacity))
Return bOk
End Function End Function
Friend Function OpenStdFile(sFile As String) As Boolean Friend Function OpenStdFile(sFile As String) As Boolean
@@ -180,7 +183,8 @@ Public Class SecondaryWindowVM
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded. ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub CloseApplication(ByVal param As Object) Public Sub CloseApplication(ByVal param As Object)
If Map.refSliceManagerVM.bCalculating Then If Map.refSliceManagerVM.bCalculating Then
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
Map.refMainWindowVM.CloseApplication() Map.refMainWindowVM.CloseApplication()
+63 -3
View File
@@ -40,6 +40,10 @@ Public Class ShellNumberPanelVM
Return m_SelShellNumber Return m_SelShellNumber
End Get End Get
Set(value As ShellNumberEntity) Set(value As ShellNumberEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refShellNumberPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelShellNumber))
Return
End If
m_SelShellNumber = value m_SelShellNumber = value
EgtDeselectAll() EgtDeselectAll()
If Not IsNothing(value) Then If Not IsNothing(value) Then
@@ -354,6 +358,8 @@ Public Class ShellNumberPanelVM
NotifyPropertyChanged(NameOf(bRotate_IsChecked)) NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.SHELLNUMBERPARAM) Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.SHELLNUMBERPARAM)
NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled)) NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled))
' disattivo interfaccia
ManageInterface(False)
Else Else
NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked)) NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
End If End If
@@ -363,6 +369,8 @@ Public Class ShellNumberPanelVM
m_bMachParam_IsChecked = False m_bMachParam_IsChecked = False
NotifyPropertyChanged(NameOf(bMachParam_IsChecked)) NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled)) NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled))
' riattivo interfaccia
ManageInterface(True)
End Sub End Sub
Public ReadOnly Property Compo_Visibility As Visibility Public ReadOnly Property Compo_Visibility As Visibility
@@ -371,11 +379,17 @@ Public Class ShellNumberPanelVM
End Get End Get
End Property End Property
Private m_ShellNumberList_IsEnabled As Boolean = False
Public ReadOnly Property ShellNumberList_IsEnabled As Boolean Public ReadOnly Property ShellNumberList_IsEnabled As Boolean
Get Get
Return Not m_bMachParam_IsChecked Return If(m_ShellNumberList.Count > 0, m_ShellNumberList_IsEnabled, False)
End Get End Get
End Property End Property
Friend Sub SetShellNumberListIsEnabled(bValue As Boolean)
m_ShellNumberList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina ' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d Private m_OriginalGridFrame As New Frame3d
@@ -393,6 +407,8 @@ Public Class ShellNumberPanelVM
End Get End Get
End Property End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip" #Region "Tooltip"
Public ReadOnly Property Import_ToolTip As String Public ReadOnly Property Import_ToolTip As String
@@ -576,6 +592,8 @@ Public Class ShellNumberPanelVM
SelShellNumber = m_ShellNumberList(0) SelShellNumber = m_ShellNumberList(0)
NotifyPropertyChanged(NameOf(SelShellNumber)) NotifyPropertyChanged(NameOf(SelShellNumber))
End If End If
' abilito lista shell number
SetShellNumberListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub End Sub
@@ -611,8 +629,13 @@ Public Class ShellNumberPanelVM
EgtSelectObj(m_SelShellNumber.nCurveId) EgtSelectObj(m_SelShellNumber.nCurveId)
Case ShellNumberSelectionTypes.EXTRUSION Case ShellNumberSelectionTypes.EXTRUSION
' creo layer per estrusione ' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId) Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION) If nNewExtrusionLayerId = GDB_ID.NULL Then
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Else
EgtEmptyGroup(nNewExtrusionLayerId)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId) EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
EgtSelectObj(m_SelShellNumber.nCurveId) EgtSelectObj(m_SelShellNumber.nCurveId)
Case ShellNumberSelectionTypes.BOTH Case ShellNumberSelectionTypes.BOTH
@@ -620,6 +643,8 @@ Public Class ShellNumberPanelVM
EgtSelectObj(m_SelShellNumber.nExtrusionId) EgtSelectObj(m_SelShellNumber.nExtrusionId)
End Select End Select
EgtDraw() EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True Return True
End Function End Function
@@ -629,6 +654,7 @@ Public Class ShellNumberPanelVM
End Sub End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD) Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command Select Case command
Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
' leggo altezza estrusione ' leggo altezza estrusione
@@ -668,6 +694,10 @@ Public Class ShellNumberPanelVM
' Imposto flag di ricalcolo slice ' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True) EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select End Select
' se non ho creato percorso riabilito interfaccia
If Not m_bIsCreatingPath Then
ManageInterface(True)
End If
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione ' se finita creazione estrusione
If m_bIsCreatingExtrusion Then If m_bIsCreatingExtrusion Then
@@ -738,6 +768,9 @@ Public Class ShellNumberPanelVM
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True m_bIsCreatingExtrusion = True
Map.refControllerInputPanelVM.IsChecked = True Map.refControllerInputPanelVM.IsChecked = True
If Not EgtCurveIsClosed(nNewEntityId) Then
m_bEscOnLine2P = True
End If
Else Else
' cancello layer ' cancello layer
EgtErase(nNewExtrusionLayerId) EgtErase(nNewExtrusionLayerId)
@@ -762,6 +795,13 @@ Public Class ShellNumberPanelVM
' rimetto la selezione scena a null ' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
End If End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
If m_bIsCreatingExtrusion Then m_bIsCreatingExtrusion = False
ManageInterface(True)
End If
End If End If
End Sub End Sub
@@ -797,6 +837,19 @@ Public Class ShellNumberPanelVM
Return nShellNumberIndex + 1 Return nShellNumberIndex + 1
End Function End Function
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetShellNumberListIsEnabled(bValue)
End Sub
#End Region ' METHODS #End Region ' METHODS
#Region "COMMANDS" #Region "COMMANDS"
@@ -820,7 +873,9 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub Import(ByVal param As Object) Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.InsertShellNumber() Map.refSceneHostVM.InsertShellNumber()
ManageInterface(True)
End Sub End Sub
#End Region ' Import #End Region ' Import
@@ -844,6 +899,7 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub Line2P(ByVal param As Object) Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB) Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId) If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB) EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
@@ -892,6 +948,7 @@ Public Class ShellNumberPanelVM
End If End If
NotifyPropertyChanged(NameOf(SelShellNumber)) NotifyPropertyChanged(NameOf(SelShellNumber))
End If End If
SetShellNumberListIsEnabled(True)
End Sub End Sub
#End Region ' Delete #End Region ' Delete
@@ -1176,6 +1233,7 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneElevation(ByVal param As Object) Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub End Sub
@@ -1200,6 +1258,7 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object) Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub End Sub
@@ -1316,6 +1375,7 @@ Public Class ShellNumberPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneObj(ByVal param As Object) Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti ' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear() m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj() Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
+6 -3
View File
@@ -71,11 +71,14 @@ Public Class MySimulation
Case MCH_SIM.OUTSTROKE Case MCH_SIM.OUTSTROKE
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
EgtGetOutstrokeInfo(sInfo) EgtGetOutstrokeInfo(sInfo)
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ... 'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Extracorsa ...
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo, EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
Case MCH_SIM.DIR_ERR Case MCH_SIM.DIR_ERR
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile 'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Direzione utensile irraggiungibile
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 3), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
Case Else Case Else
MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore 'MessageBox.Show(EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop) 'Errore
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SIMULATIONPAGEUC + 4), EgtMsg(MSG_SIMULATIONPAGEUC + 5), MessageBoxButton.OK, MessageBoxImage.Stop)
End Select End Select
End If End If
' Aggiorno stato visualizzazione macchina (dipende anche da utensile) ' Aggiorno stato visualizzazione macchina (dipende anche da utensile)
+6 -4
View File
@@ -88,10 +88,12 @@ Public Class SimulationPanelVM
If Not EgtSimInit() OrElse Not EgtSimStart() Then If Not EgtSimInit() OrElse Not EgtSimStart() Then
If EgtGetLastMachMgrErrorId() <> 0 Then If EgtGetLastMachMgrErrorId() <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString() Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) 'MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else EgtMessageBoxV.Show(Application.Current.MainWindow, sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) Else
End If 'MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End If End If
' Imposto stato corrente ' Imposto stato corrente
MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP) MySimul.SetSimulationStatus(MCH_SIM_ST.UI_STOP)
+27 -10
View File
@@ -44,6 +44,11 @@ Public Class SliceManagerVM
Private m_bCalcTFS As Boolean = False Private m_bCalcTFS As Boolean = False
Private m_bGenerate As Boolean = False Private m_bGenerate As Boolean = False
Private m_bCalcSolid As Boolean = False Private m_bCalcSolid As Boolean = False
Friend ReadOnly Property bCalcSolid As Boolean
Get
Return m_bCalcSolid
End Get
End Property
Friend Sub SetCalcSolid(value As Boolean) Friend Sub SetCalcSolid(value As Boolean)
m_bCalcSolid = value m_bCalcSolid = value
End Sub End Sub
@@ -317,7 +322,8 @@ Public Class SliceManagerVM
End If End If
EgtGetCurrFilePath(sCurrProject) EgtGetCurrFilePath(sCurrProject)
If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then If String.IsNullOrWhiteSpace(sCurrProject) Or EgtGetFileType(sCurrProject) <> FT.NGE Then
MessageBox.Show("Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Save project before calculating slices!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return False Return False
End If End If
' mostro barre di caricamento ' mostro barre di caricamento
@@ -391,7 +397,8 @@ Public Class SliceManagerVM
Map.refTopPanelVM.SelPart.RefreshPrintLayers() Map.refTopPanelVM.SelPart.RefreshPrintLayers()
' in caso di errore, segnalazione ' in caso di errore, segnalazione
If Not bOk Then If Not bOk Then
MessageBox.Show("Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Error in slicing! See log file.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
If bOk And m_bGenerate Then If bOk And m_bGenerate Then
' verifico esistenza e correttezza machgroup ' verifico esistenza e correttezza machgroup
@@ -419,7 +426,8 @@ Public Class SliceManagerVM
Else Else
sOut &= sMsg sOut &= sMsg
End If End If
MessageBox.Show(sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, sOut, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
End If End If
' aggiorno tempo e massa ' aggiorno tempo e massa
@@ -476,7 +484,8 @@ Public Class SliceManagerVM
EgtLuaCreateGlobTable("MACH") EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sInitMachScriptPath) Then If Not EgtLuaExecFile(sInitMachScriptPath) Then
EgtOutLog("Error executing Machining init script " & sInitMachScriptPath) EgtOutLog("Error executing Machining init script " & sInitMachScriptPath)
MessageBox.Show(EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5463) & " " & sInitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
Return False Return False
End If End If
Dim nErr As Integer = 999 Dim nErr As Integer = 999
@@ -495,7 +504,8 @@ Public Class SliceManagerVM
EgtLuaCreateGlobTable("MACH") EgtLuaCreateGlobTable("MACH")
If Not EgtLuaExecFile(sExitMachScriptPath) Then If Not EgtLuaExecFile(sExitMachScriptPath) Then
EgtOutLog("Error executing Machining exit script " & sExitMachScriptPath) EgtOutLog("Error executing Machining exit script " & sExitMachScriptPath)
MessageBox.Show(EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show(EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(5464) & " " & sExitMachScriptPath, EgtMsg(5461), MessageBoxButton.OK, MessageBoxImage.Error)
Return False Return False
End If End If
Dim nErr As Integer = 999 Dim nErr As Integer = 999
@@ -526,26 +536,32 @@ Public Class SliceManagerVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand. ''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary> ''' </summary>
Public Sub Slice() Public Sub Slice()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refStartMachPanelVM.bCPlaneObj_IsActive OrElse Map.refRibPanelVM.bCPlaneObj_IsActive OrElse
Map.refShellNumberPanelVM.bCPlaneObj_IsActive OrElse Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then Return
If m_bCalculating Then Return If m_bCalculating Then Return
m_bCalculating = True m_bCalculating = True
If IsNothing(Map.refTopPanelVM.SelPart) Then If IsNothing(Map.refTopPanelVM.SelPart) Then
MessageBox.Show("No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No parts to slice!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
If IsNothing(Map.refTopPanelVM.SelMaterial) Then If IsNothing(Map.refTopPanelVM.SelMaterial) Then
MessageBox.Show("No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No print material set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
If IsNothing(Map.refTopPanelVM.SelMachining) OrElse IsNothing(Map.refTopPanelVM.CurrMachining) OrElse Map.refTopPanelVM.CurrMachining.dCurrStrandH <= 0 Then If IsNothing(Map.refTopPanelVM.SelMachining) OrElse IsNothing(Map.refTopPanelVM.CurrMachining) OrElse Map.refTopPanelVM.CurrMachining.dCurrStrandH <= 0 Then
MessageBox.Show("No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "No print parameters set!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart) Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
If Not String.IsNullOrWhiteSpace(CurrentMachine.sMachDataIniFile) AndAlso Not CurrentMachine.b3ExtrusionArea.EnclosesXY(b3Print) Then If Not String.IsNullOrWhiteSpace(CurrentMachine.sMachDataIniFile) AndAlso Not CurrentMachine.b3ExtrusionArea.EnclosesXY(b3Print) Then
MessageBox.Show("Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error) 'MessageBox.Show("Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False m_bCalculating = False
Return Return
End If End If
@@ -707,7 +723,8 @@ Public Class SliceManagerVM
Process.Start("Notepad.exe", sIsoFilePath) Process.Start("Notepad.exe", sIsoFilePath)
' altrimenti lo segnalo ' altrimenti lo segnalo
Else Else
MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")") 'MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
EgtMessageBoxV.Show(Application.Current.MainWindow, "Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
End If End If
End If End If
NotifyPropertyChanged(NameOf(Time_Visibility)) NotifyPropertyChanged(NameOf(Time_Visibility))
@@ -28,6 +28,7 @@
ItemsSource="{Binding StartList}" ItemsSource="{Binding StartList}"
SelectedItem="{Binding SelStart}" SelectedItem="{Binding SelStart}"
DisplayMemberPath="ghName" DisplayMemberPath="ghName"
IsEnabled="{Binding StartList_IsEnabled}"
Style="{StaticResource LeftPanel_ComboBox}"/> Style="{StaticResource LeftPanel_ComboBox}"/>
<!-- Add Button --> <!-- Add Button -->
<ToggleButton x:Name="AddBtn" <ToggleButton x:Name="AddBtn"
+72 -27
View File
@@ -35,6 +35,10 @@ Public Class StartMachPanelVM
Return m_SelStart Return m_SelStart
End Get End Get
Set(value As StartEntity) Set(value As StartEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refStartMachPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelStart))
Return
End If
m_SelStart = value m_SelStart = value
EgtDeselectAll() EgtDeselectAll()
If Not IsNothing(value) Then If Not IsNothing(value) Then
@@ -293,6 +297,18 @@ Public Class StartMachPanelVM
End Get End Get
End Property End Property
Private m_StartList_IsEnabled As Boolean = False
Public ReadOnly Property StartList_IsEnabled As Boolean
Get
Return If(m_StartList.Count > 0, m_StartList_IsEnabled, False)
End Get
End Property
Friend Sub SetStartListIsEnabled(bValue As Boolean)
m_StartList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(StartList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina ' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d Private m_OriginalGridFrame As New Frame3d
@@ -304,6 +320,8 @@ Public Class StartMachPanelVM
End Get End Get
End Property End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip" #Region "Tooltip"
Public ReadOnly Property Point_ToolTip As String Public ReadOnly Property Point_ToolTip As String
@@ -458,6 +476,8 @@ Public Class StartMachPanelVM
SelStart = m_StartList(0) SelStart = m_StartList(0)
NotifyPropertyChanged(NameOf(SelStart)) NotifyPropertyChanged(NameOf(SelStart))
End If End If
' abilito lista start mach
SetStartListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub End Sub
@@ -481,16 +501,33 @@ Public Class StartMachPanelVM
' seleziono percorso corrente ' seleziono percorso corrente
EgtDeselectAll() EgtDeselectAll()
EgtSelectObj(m_SelStart.nId) EgtSelectObj(m_SelStart.nId)
EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True Return True
End Function End Function
Friend Sub UpdateUI() Friend Sub UpdateUI()
' se attiva operazione in piu' passaggi, esco ' se attiva operazione in piu' passaggi, esco
If Map.refSceneHostVM.MainController.GetContinue() Then Return If Map.refSceneHostVM.MainController.GetContinue() Then Return
Dim NewEntity As StartEntity = Nothing End Sub
' se finita creazione curva (è stata chiusa)
Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE,
Controller.CMD.MOVE, Controller.CMD.ROTATE
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End Select
' riabilito interfaccia
ManageInterface(True)
' se finita creazione curva
If bIsCreatingPath Then If bIsCreatingPath Then
m_bIsCreatingPath = False m_bIsCreatingPath = False
Dim NewEntity As StartEntity = Nothing
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART) Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewStartLayerId) Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewStartLayerId)
Dim NewGeomType As GDB_TY = EgtGetType(nNewEntityId) Dim NewGeomType As GDB_TY = EgtGetType(nNewEntityId)
@@ -503,37 +540,22 @@ Public Class StartMachPanelVM
NewEntityType = StartMachTypes.COMPO NewEntityType = StartMachTypes.COMPO
End Select End Select
EgtSetName(nNewEntityId, START_GEOM) EgtSetName(nNewEntityId, START_GEOM)
' coloro l'entita' di rosso ' resetto colore entita'
Dim c3Red As Color3d EgtResetColor(nNewEntityId)
c3Red.FromColor(System.Drawing.Color.Red)
EgtSetColor(nNewEntityId, c3Red)
' lo sposto nel layer degli start ' lo sposto nel layer degli start
EgtRelocateGlob(nNewEntityId, m_nStartMachLayerId, GDB_POS.LAST_SON) EgtRelocateGlob(nNewEntityId, m_nStartMachLayerId, GDB_POS.LAST_SON)
' lo aggiungo alla lista ' lo aggiungo alla lista
NewEntity = New StartEntity(nNewEntityId, NewEntityType) NewEntity = New StartEntity(nNewEntityId, NewEntityType)
m_StartList.Add(NewEntity) m_StartList.Add(NewEntity)
' cancello layer di disegno ' lo seleziono
EgtErase(nNewStartLayerId) SelStart = NewEntity
NotifyPropertyChanged(NameOf(SelStart))
End If End If
' cancello layer di disegno
EgtErase(nNewStartLayerId)
End If End If
' aggiorno posizione ' aggiorno posizione
RefreshPos() RefreshPos()
' se aggiunta entita'
If Not IsNothing(NewEntity) Then
SelStart = NewEntity
NotifyPropertyChanged(NameOf(SelStart))
End If
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
Select Case command
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE,
Controller.CMD.MOVE, Controller.CMD.ROTATE
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
End Sub End Sub
Friend Sub OnKeyDown(Key As Forms.Keys) Friend Sub OnKeyDown(Key As Forms.Keys)
@@ -550,6 +572,12 @@ Public Class StartMachPanelVM
' rimetto la selezione scena a null ' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull() Map.refSceneHostVM.MainScene.SetStatusNull()
End If End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
ManageInterface(True)
End If
End If End If
End Sub End Sub
@@ -565,6 +593,18 @@ Public Class StartMachPanelVM
End If End If
End Sub End Sub
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetStartListIsEnabled(bValue)
End Sub
#End Region ' METHODS #End Region ' METHODS
#Region "COMMANDS" #Region "COMMANDS"
@@ -588,13 +628,13 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub Point(ByVal param As Object) Public Sub Point(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART) ManageInterface(False)
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId) nNewStartLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewStartLayerId, LAY_NEWSTART) EgtSetName(nNewStartLayerId, LAY_NEWSTART)
End If End If
EgtSetCurrPartLayer(m_nPartId, nNewStartLayerId) EgtSetCurrPartLayer(m_nPartId, nNewStartLayerId)
'InitCommand(True)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.POINT) Then If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.POINT) Then
m_bIsCreatingPath = True m_bIsCreatingPath = True
End If End If
@@ -621,7 +661,8 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub Line2P(ByVal param As Object) Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART) ManageInterface(False)
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId) nNewStartLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewStartLayerId, LAY_NEWSTART) EgtSetName(nNewStartLayerId, LAY_NEWSTART)
@@ -888,6 +929,7 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneElevation(ByVal param As Object) Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub End Sub
@@ -912,6 +954,7 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object) Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN) Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub End Sub
@@ -952,6 +995,7 @@ Public Class StartMachPanelVM
''' </summary> ''' </summary>
Public Sub CPlaneObj(ByVal param As Object) Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti ' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear() m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj() Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1012,6 +1056,7 @@ Public Class StartMachPanelVM
End If End If
NotifyPropertyChanged(NameOf(SelStart)) NotifyPropertyChanged(NameOf(SelStart))
End If End If
SetStartListIsEnabled(True)
End Sub End Sub
#End Region ' Delete #End Region ' Delete
+1 -1
View File
@@ -337,7 +337,7 @@ Public Class TFSEditorVM
Public ReadOnly Property Seconds_Msg As String Public ReadOnly Property Seconds_Msg As String
Get Get
Return "s" Return "min:s"
End Get End Get
End Property End Property
+1 -1
View File
@@ -58,7 +58,7 @@
<ToggleButton x:Name="ModifyBtn" <ToggleButton x:Name="ModifyBtn"
Grid.Column="2" Grid.Column="2"
Grid.Row="1" Grid.Row="1"
Content="{Binding SelectedItem.sName, ElementName=ModifyModeListBox}" Content="{Binding SelModifyModeName}"
IsChecked="{Binding bModify_IsChecked}" IsChecked="{Binding bModify_IsChecked}"
Margin="2.5,0,2.5,0" Margin="2.5,0,2.5,0"
Style="{StaticResource TopPanel_Modify_ToggleButton}"> Style="{StaticResource TopPanel_Modify_ToggleButton}">
+10 -1
View File
@@ -121,6 +121,7 @@ Public Class TopPanelVM
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.NULL) Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.NULL)
NotifyPropertyChanged(NameOf(SelModifyMode)) NotifyPropertyChanged(NameOf(SelModifyMode))
End If End If
NotifyPropertyChanged(NameOf(SelModifyModeName))
' chiudo il popup ' chiudo il popup
SetModifyIsChecked(False) SetModifyIsChecked(False)
End Set End Set
@@ -128,8 +129,15 @@ Public Class TopPanelVM
Friend Sub SetSelModifyMode(ModifyMode As ModifyModes) Friend Sub SetSelModifyMode(ModifyMode As ModifyModes)
SelModifyMode = m_ModifyModeList.FirstOrDefault(Function(x) x.ModifyMode = ModifyMode) SelModifyMode = m_ModifyModeList.FirstOrDefault(Function(x) x.ModifyMode = ModifyMode)
NotifyPropertyChanged(NameOf(SelModifyMode)) NotifyPropertyChanged(NameOf(SelModifyMode))
NotifyPropertyChanged(NameOf(SelModifyModeName))
End Sub End Sub
Public ReadOnly Property SelModifyModeName As String
Get
Return If(Not IsNothing(m_SelModifyMode) AndAlso m_SelModifyMode.ModifyMode <> ModifyModes.NULL, m_SelModifyMode.sName, "Modify")
End Get
End Property
Private m_bModify_IsChecked As Boolean Private m_bModify_IsChecked As Boolean
Public Property bModify_IsChecked As Boolean Public Property bModify_IsChecked As Boolean
Get Get
@@ -744,7 +752,8 @@ Public Class TopPanelVM
Public Sub Machining() Public Sub Machining()
If IsNothing(m_SelPart) OrElse IsNothing(CurrMachining) Then Return If IsNothing(m_SelPart) OrElse IsNothing(CurrMachining) Then Return
If IsNothing(m_SelMachining) Then If IsNothing(m_SelMachining) Then
MessageBox.Show("Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation) 'MessageBox.Show("Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation)
EgtMessageBoxV.Show(Application.Current.MainWindow, "Select current Db Machining first!", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation)
Return Return
End If End If
SelPage = Pages.CURRMACHINING SelPage = Pages.CURRMACHINING
+1 -1
View File
@@ -160,7 +160,7 @@ Public Module CurrentMachine
' se non esiste file dati macchina, esco ' se non esiste file dati macchina, esco
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then Return If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then Return
' recupero tipo di slice ' recupero tipo di slice
Dim sExtrusionType As String Dim sExtrusionType As String = S_VERTICAL
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL) Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE) Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
Dim SlicingTypeValue As Machining.MPAR_SLICINGTYPE = SlicingTypeParam.SelValue.Id Dim SlicingTypeValue As Machining.MPAR_SLICINGTYPE = SlicingTypeParam.SelValue.Id
+67 -215
View File
@@ -52,7 +52,6 @@
<PrintApp:MachineViewPanelVM x:Key="MachineViewPanelVM"/> <PrintApp:MachineViewPanelVM x:Key="MachineViewPanelVM"/>
<!--<PrintApp:ModifyPartPanelVM x:Key="ModifyPartPanelVM"/>--> <!--<PrintApp:ModifyPartPanelVM x:Key="ModifyPartPanelVM"/>-->
<PrintApp:ManagePartPanelVM x:Key="ManagePartPanelVM"/> <PrintApp:ManagePartPanelVM x:Key="ManagePartPanelVM"/>
<PrintApp:HelpPanelVM x:Key="HelpPanelVM"/>
<!--<EgtBEAMWALL:CALCPanelVM x:Key="CALCPanelVM"/> <!--<EgtBEAMWALL:CALCPanelVM x:Key="CALCPanelVM"/>
<EgtBEAMWALL:PartParametersVM x:Key="PartParametersVM"/> <EgtBEAMWALL:PartParametersVM x:Key="PartParametersVM"/>
<EgtBEAMWALL:LeftPanelVM x:Key="LeftPanelVM"/> <EgtBEAMWALL:LeftPanelVM x:Key="LeftPanelVM"/>
@@ -4191,70 +4190,81 @@
Background="White"> Background="White">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Command="{Binding AboutBoxCommand}" <Button Command="{Binding AboutBoxCommand}"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}" Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource AboutBox_Button}"> Style="{StaticResource AboutBox_Button}">
<Image Source="{TemplateBinding Icon}" <Image Source="{TemplateBinding Icon}"/>
Style="{StaticResource Button_Image}"/>
</Button> </Button>
<ContentPresenter Grid.Column="1" <Grid Grid.Column="1">
Content="{TemplateBinding TitlePanel}" <Grid.ColumnDefinitions>
VerticalAlignment="Center"/> <ColumnDefinition Width="Auto"/>
<TextBlock Text="{TemplateBinding ProjectName}" <ColumnDefinition Width="Auto"/>
ToolTip="{TemplateBinding ProjectPath}" <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<ContentPresenter Content="{TemplateBinding TitlePanel}"
VerticalAlignment="Center"/>
<TextBlock Text="{TemplateBinding ProjectName}"
ToolTip="{TemplateBinding ProjectPath}"
Grid.Column="1"
TextTrimming="CharacterEllipsis"
FontSize="14"
VerticalAlignment="Center"
Background="{StaticResource Icarus_Gray}"
Padding="5,2,5,3"
Margin="10,0,0,0"
Foreground="White"/>
<TextBlock x:Name="PART_MoveRectangle"
Text="{TemplateBinding Title}"
Grid.Column="2"
TextTrimming="CharacterEllipsis"
HorizontalAlignment="Stretch"
FontSize="14"
TextAlignment="Center"
VerticalAlignment="Center"
Width="Auto"
Foreground="{StaticResource Icarus_Gray}"
Panel.ZIndex="0"/>
</Grid>
<Grid x:Name="WindowControlsGrid"
Grid.Column="2"
Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button x:Name="MinimizeButton"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Minimize.png"/>
</Button>
<Button x:Name="MaximizeButton"
Grid.Column="1"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Maximize.png"/>
</Button>
<Button x:Name="RestoreButton"
Grid.Column="1"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}"
Visibility="Collapsed">
<Image Source="\Resources\Common\Restore.png"/>
</Button>
<Button x:Name="CloseButton"
Grid.Column="2" Grid.Column="2"
TextTrimming="CharacterEllipsis" Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
FontSize="14" Command="{TemplateBinding CloseCommand}"
VerticalAlignment="Center" Style="{StaticResource TitleBar_Button}">
Background="{StaticResource Icarus_Gray}" <Image Source="\Resources\Common\Close.png"/>
Padding="5,2,5,3" </Button>
Margin="10,0,0,0" </Grid>
Foreground="White"/>
<TextBlock x:Name="PART_MoveRectangle"
Text="{TemplateBinding Title}"
Grid.Column="3"
TextTrimming="CharacterEllipsis"
HorizontalAlignment="Stretch"
FontSize="14"
TextAlignment="Center"
VerticalAlignment="Center"
Width="Auto"
Foreground="{StaticResource Icarus_Gray}"
Panel.ZIndex="0"/>
<Button x:Name="MinimizeButton"
Grid.Column="4"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Minimize.png"/>
</Button>
<Button x:Name="MaximizeButton"
Grid.Column="5"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Maximize.png"/>
</Button>
<Button x:Name="RestoreButton"
Grid.Column="5"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource TitleBar_Button}"
Visibility="Collapsed">
<Image Source="\Resources\Common\Restore.png"/>
</Button>
<Button x:Name="CloseButton"
Grid.Column="6"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Command="{TemplateBinding CloseCommand}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Close.png"/>
</Button>
</Grid> </Grid>
<Grid x:Name="PART_MainContentGrid" <Grid x:Name="PART_MainContentGrid"
Grid.Row="1" Grid.Row="1"
@@ -4319,9 +4329,6 @@
Height="{StaticResource WindowBorder_Height}" Height="{StaticResource WindowBorder_Height}"
x:Name="topLeft" /> x:Name="topLeft" />
</Grid> </Grid>
<Grid Panel.ZIndex="20">
<ContentPresenter Content="{TemplateBinding HelpPanel}"/>
</Grid>
</Grid> </Grid>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="WindowState" Value="Maximized"> <Trigger Property="WindowState" Value="Maximized">
@@ -4434,150 +4441,6 @@
</Setter> </Setter>
</Style> </Style>
<Style x:Key="Help_Window" TargetType="{x:Type EgtWPFLib5:EgtMainWindow}">
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="MinHeight" Value="320"/>
<Setter Property="MinWidth" Value="480"/>
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality"/>
<Setter Property="Title" Value="{Binding Title}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type EgtWPFLib5:EgtMainWindow}">
<Grid Background="Transparent" x:Name="WindowRoot">
<Border x:Name="ResizeBorder"
BorderBrush="{StaticResource Icarus_Gray}"
BorderThickness="{StaticResource WindowBorder_Thickness}">
<Grid x:Name="LayoutRoot"
Background="{TemplateBinding Background}">
<Grid.RowDefinitions>
<RowDefinition Height="{StaticResource TitleBarHeight}"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitleBar-->
<Grid x:Name="PART_HeaderBar"
Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding AboutBoxCommand}"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Style="{StaticResource AboutBox_Button}">
<Image Source="{TemplateBinding Icon}"/>
</Button>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="PART_MoveRectangle"
Text="{TemplateBinding Title}"
Grid.Column="2"
TextTrimming="CharacterEllipsis"
HorizontalAlignment="Stretch"
FontSize="14"
TextAlignment="Center"
VerticalAlignment="Center"
Width="Auto"
Foreground="{StaticResource Icarus_Gray}"
Panel.ZIndex="0"/>
</Grid>
<Grid x:Name="WindowControlsGrid"
Grid.Column="2"
Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button x:Name="CloseButton"
Grid.Column="2"
Width="{Binding ActualHeight, ElementName=PART_HeaderBar}"
Command="{TemplateBinding CloseCommand}"
Style="{StaticResource TitleBar_Button}">
<Image Source="\Resources\Common\Close.png"/>
</Button>
</Grid>
</Grid>
<Grid x:Name="PART_MainContentGrid"
Grid.Row="1"
Panel.ZIndex="10">
<ContentPresenter x:Name="PART_MainContentPresenter"/>
</Grid>
</Grid>
</Border>
<!-- Resize grid to be inserted here -->
<Grid x:Name="PART_ResizeGrid">
<Rectangle x:Name="top"
Height="{StaticResource WindowBorder_Height}"
VerticalAlignment="Top"
Fill="Transparent"
Stroke="{x:Null}"
Margin="5,0,5,0" />
<Rectangle x:Name="bottom"
Height="{StaticResource WindowBorder_Height}"
VerticalAlignment="Bottom"
Fill="Transparent"
Stroke="{x:Null}"
Margin="5,0,5,0" />
<Rectangle x:Name="left"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Left"
Fill="Transparent"
Stroke="{x:Null}"
Margin="0,5,0,5"/>
<Rectangle x:Name="right"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Right"
Fill="Transparent"
Stroke="{x:Null}"
Margin="0,5,0,5"/>
<Rectangle x:Name="bottomLeft"
Height="{StaticResource WindowBorder_Height}"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Fill="Transparent"
Stroke="{x:Null}"/>
<Rectangle x:Name="bottomRight"
Height="{StaticResource WindowBorder_Height}"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Fill="Transparent"
Stroke="{x:Null}"/>
<Rectangle x:Name="topRight"
Height="{StaticResource WindowBorder_Height}"
Width="{StaticResource WindowBorder_Height}"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Fill="Transparent"
Stroke="{x:Null}"/>
<Rectangle
Stroke="{x:Null}"
Fill="Transparent"
HorizontalAlignment="Left"
Width="{StaticResource WindowBorder_Height}"
VerticalAlignment="Top"
Height="{StaticResource WindowBorder_Height}"
x:Name="topLeft" />
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="WindowState" Value="Maximized">
<Setter TargetName="ResizeBorder" Property="BorderThickness" Value="0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ --> <!-- ______________________________________________________________________________________________________________________________________________ -->
<!--EgtMainWindow--> <!--EgtMainWindow-->
@@ -4838,17 +4701,6 @@
</Style> </Style>
--> -->
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- Help -->
<Style x:Key="TopBar_HelpButton" TargetType="{x:Type Grid}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ --> <!-- ______________________________________________________________________________________________________________________________________________ -->
</ResourceDictionary> </ResourceDictionary>
-24
View File
@@ -35,8 +35,6 @@ Module Map
Private m_refManagePartPanelVM As ManagePartPanelVM Private m_refManagePartPanelVM As ManagePartPanelVM
Private m_refMachineViewPanelVM As MachineViewPanelVM Private m_refMachineViewPanelVM As MachineViewPanelVM
Private m_refImportLoadingWndVM As ImportLoadingWndVM Private m_refImportLoadingWndVM As ImportLoadingWndVM
Private m_refHelpPanelVM As HelpPanelVM
Private m_refHelpWndVM As HelpWndVM
#Region "Get" #Region "Get"
@@ -249,18 +247,6 @@ Module Map
End Get End Get
End Property End Property
Public ReadOnly Property refHelpPanelVM As HelpPanelVM
Get
Return m_refHelpPanelVM
End Get
End Property
Public ReadOnly Property refHelpWndVM As HelpWndVM
Get
Return m_refHelpWndVM
End Get
End Property
#End Region ' Get #End Region ' Get
#Region "Set" #Region "Set"
@@ -429,16 +415,6 @@ Module Map
Return Not IsNothing(m_refImportLoadingWndVM) Return Not IsNothing(m_refImportLoadingWndVM)
End Function End Function
Friend Function SetRefHelpPanelVM(HelpPanelVM As HelpPanelVM) As Boolean
m_refHelpPanelVM = HelpPanelVM
Return Not IsNothing(m_refHelpPanelVM)
End Function
Friend Function SetRefHelpWndVM(HelpWndVM As HelpWndVM) As Boolean
m_refHelpWndVM = HelpWndVM
Return Not IsNothing(m_refHelpWndVM)
End Function
#End Region ' Set #End Region ' Set
#Region "Init" #Region "Init"