Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d4b55f730a | |||
| d74bc0f4d2 | |||
| c17e80af2b |
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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>
|
||||||
@@ -362,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>
|
||||||
@@ -604,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>
|
||||||
@@ -855,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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -149,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
|
||||||
|
|
||||||
@@ -370,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
|
||||||
@@ -381,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
|
||||||
@@ -475,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
|
||||||
|
|||||||
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 |
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
@@ -497,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)
|
||||||
@@ -1021,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()
|
||||||
@@ -1050,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)
|
||||||
@@ -1062,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
|
||||||
@@ -1085,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
|
||||||
@@ -1169,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
|
||||||
|
|
||||||
@@ -1177,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)
|
||||||
@@ -1195,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
|
||||||
|
|
||||||
@@ -1208,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.
|
||||||
|
|||||||
@@ -183,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()
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -322,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
|
||||||
@@ -396,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
|
||||||
@@ -424,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
|
||||||
@@ -481,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
|
||||||
@@ -500,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
|
||||||
@@ -536,23 +541,27 @@ Public Class SliceManagerVM
|
|||||||
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
|
||||||
@@ -714,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))
|
||||||
|
|||||||
@@ -752,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
|
||||||
|
|||||||
Reference in New Issue
Block a user