Compare commits

...

27 Commits

Author SHA1 Message Date
Emmanuele Sassi fd8af7be3e - Introdotto manuale sotto forma di indice interattivo 2023-04-14 11:58:29 +02:00
Emmanuele Sassi f47b202499 - introdotta EgtTextBox2 su lavorazioni da Db e Curr 2023-04-11 13:36:19 +02:00
Emmanuele Sassi 317321d46c - eliminata funzione import inutile
- trasformate funzioni di gestione progetto da sub a function
2023-04-11 09:40:13 +02:00
Emmanuele Sassi 13401bc486 - aggiunta area di estrusione
- aggiunto file di dati della macchina
- messaggi di errore su slice se pezzo fuori da area stampabile
2023-04-08 12:29:45 +02:00
Emmanuele Sassi 65288427f3 Merge remote-tracking branch 'ICARUS/main' into develop 2023-04-07 15:54:10 +02:00
Emmanuele Sassi a234c6f6f1 - Aggiunta estensione icrs in apertura progetto 2023-04-07 15:53:58 +02:00
DarioS f1819fc61c Icarus 2.5d1 :
- ricompilazione con cambio versione e aggiornamento codici di protezione mensili.
2023-04-07 10:30:15 +02:00
Emmanuele Sassi e67c79992c - aggiornati bottoni Ok, Cancel su molte pagine
- cambiate icone Reference
- aggiunte icone in slice manager
- spostato Update in TFS vicino a Reset
2023-04-07 09:49:44 +02:00
Emmanuele Sassi 209cab548b - aggiunta finestra di caricamento import
- spostato processEvent in main che rimanda alle varie parti del programma
2023-04-03 18:05:01 +02:00
Emmanuele Sassi fa737c7c80 - riattivata visualizzazione macchina su simulazione
- aggiornata icona vista tool
- gestita visualizzazione strati dopo calcolo slice
- uniformata textbox assi macchina in simulazione
2023-04-03 13:33:44 +02:00
Emmanuele Sassi 4811a37fe7 - aggiunto nuovo splashscreen
- aggiunta opacita' finestra all'avvio
2023-04-03 08:53:59 +02:00
Emmanuele Sassi d43acd1678 - aggiunto messaggio input su griglia da oggetto
- migliorata gestione griglia da oggetto
2023-04-01 12:36:00 +02:00
Emmanuele Sassi 2850e07360 - correzione attivazione parametri di lavorazione 2023-03-30 09:03:44 +02:00
Emmanuele Sassi 9ae9a6df88 - aggiunta gestione dipendenze tra parametri di lavorazione
- aggiunti min e max per parametri di lavorazione
2023-03-30 08:58:45 +02:00
Emmanuele Sassi f5206ce8bf - aggiunta possibilita' di impostare min e max per parametri di lavorazione 2023-03-29 16:26:48 +02:00
Emmanuele Sassi f4dea984be - introdotta estensione progetti icrs 2023-03-29 15:15:00 +02:00
Emmanuele Sassi 8a7af066d9 - fermato timer splashscreen
- introdotta estensione progetti icrs
2023-03-29 15:14:34 +02:00
Emmanuele Sassi bbb52b6ade Merge branch 'NewWidow' into develop 2023-03-28 20:34:19 +02:00
Emmanuele Sassi 7fe2c09bca Merge branch 'NewInterface' into NewWidow 2023-03-28 20:31:22 +02:00
Emmanuele Sassi a5be2180ea - aggiornate finestre a EgtMainWindow
- aggiunti nome e path del progetto
- gestito bordo della finestra che sparisce quando massimizzata
- creata finestra UpdateMachine al posto di MachineBox
2023-03-28 20:28:36 +02:00
Emmanuele Sassi 6e5db6e147 - modifiche a finestre 2023-03-24 19:42:58 +01:00
Emmanuele Sassi 589156d963 - modificata grafica delle finestre 2023-03-24 16:44:30 +01:00
Emmanuele Sassi 566770255c - Convertiti alla nuova window ed alla nuova grafica tutti i dialoghi 2023-03-11 11:04:32 +01:00
Emmanuele Sassi 8cac7b43fb - riattivati comandi su aboutBox e CloseApplication 2023-03-08 17:35:36 +01:00
Emmanuele Sassi 3c0490e659 - aggiunte icone finestra
- aggiunta gestione TitlePanel
2023-03-08 10:35:20 +01:00
Emmanuele Sassi db66fa17cd - aggiunti ProjectName e ProjectPath 2023-03-06 10:53:20 +01:00
Emmanuele Sassi 2a248795b1 - work in progress 2023-03-03 15:08:27 +01:00
109 changed files with 4042 additions and 1735 deletions
+47 -68
View File
@@ -1,71 +1,50 @@
<EgtWPFLib5:EgtCustomWindow x:Class="ChooseMachineWndV"
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"
xmlns:Icarus="clr-namespace:Icarus"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
MinWidth="500"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="ProjectType">
<StackPanel Margin="5,5,5,0">
<Border Grid.Row="1"
BorderThickness="1"
BorderBrush="DarkGray"
Background="White"
Margin="5">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<EgtWPFLib5:EgtMainWindow x:Class="ChooseMachineWndV"
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"
xmlns:Icarus="clr-namespace:Icarus"
Title="New Project"
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"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Center"
Grid.Row="0"
Margin="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding ChooseMachine_Msg}"
Style="{StaticResource OptionTextBlock}"
Grid.Row="0" Grid.ColumnSpan="2"/>
<Rectangle Height="22" Grid.Row="1"/>
<ComboBox ItemsSource="{Binding MachineList}" DisplayMemberPath="Name"
SelectedItem="{Binding SelMachine}" SelectedValuePath="Name"
Grid.Row="2"
Style="{StaticResource BtlData_ComboBox}"/>
</Grid>
<TextBlock Text="{Binding ChooseMachine_Msg}"
Margin="20,20,20,2.5"
Style="{StaticResource DialogWindow_TextBlock}"/>
<ComboBox Grid.Row="1"
ItemsSource="{Binding MachineList}"
SelectedItem="{Binding SelMachine}"
DisplayMemberPath="Name"
SelectedValuePath="Name"
Width="160"
HorizontalAlignment="Center"
HorizontalContentAlignment="Center"
Margin="2.5,10,2.5,2.5"
Style="{StaticResource RightPanel_ComboBox}"/>
<Grid Grid.Row="2" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
<UniformGrid Grid.Row="2"
Rows="1"
Margin="0,20,0,0">
<Button Command="{Binding Ok_Command}"
IsDefault="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button IsCancel="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
</StackPanel>
</EgtWPFLib5:EgtCustomWindow>
</Grid>
</EgtWPFLib5:EgtMainWindow>
@@ -40,7 +40,7 @@ Public Class ChooseMachineWndVM
Public ReadOnly Property ChooseMachine_Msg As String
Get
Return "Macchina: "
Return "Select the new project machine from the list"
End Get
End Property
+4
View File
@@ -2,6 +2,7 @@
Public Const TABLE = "Table"
Public Const TABLE_OUTLINE = "TableOutline"
Public Const EXTRUSION_AREA = "ExtrusionArea"
Public Const PART = "Part"
Public Const PRINT_SOLID = "PrintSolid"
Public Const LAY_MACH_START = "MachStart"
@@ -104,6 +105,9 @@
Public Const MAC_G0FEED = "G0Feed"
Public Const MAC_G0FEEDZ = "G0FeedZ"
Public Const MAC_TOOLDIAM = "ToolDiam"
Public Const MAC_PREFLOWDELAY = "PreFlowDelay"
Public Const MAC_POSTFLOWDELAY = "PostFlowDelay"
Public Const MAC_SCREWBACK = "ScrewBack"
Public Const MAC_RIBSTYPE = "RibsType"
Public Const MAC_RIBSOVERLAP = "RibsOverlap"
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
+2
View File
@@ -122,6 +122,8 @@ Public Module ConstIni
Public Const K_CLR_MACHSTART As String = "MachStart"
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_MRUIMPORTFILES As String = "MruImportFiles"
+35
View File
@@ -0,0 +1,35 @@
'----------------------------------------------------------------------------
' EgalTech 2015-2015
'----------------------------------------------------------------------------
' File : ConstIni.vb Data : 12.02.15 Versione : 1.6b3
' Contenuto : Modulo costanti sezione e chiavi per file Ini.
'
'
'
' Modifiche : 12.02.15 DS Creazione modulo.
'
'
'----------------------------------------------------------------------------
Public Module ConstMachDataIni
Public Const MACHDATA_INI_FILE_NAME As String = "Data.ini"
Public Const S_TABLE As String = "Table"
Public Const K_DIMX As String = "DimX"
Public Const K_DIMY As String = "DimY"
Public Const K_POSX As String = "PosX"
Public Const K_POSY As String = "PosY"
Public Const K_POSZ As String = "PosZ"
Public Const S_VERTICAL As String = "Vertical"
Public Const S_45DEGX As String = "45DegX"
Public Const S_45DEGY As String = "45DegY"
Public Const S_HORIZONTAL As String = "Horizontal"
Public Const K_MINX As String = "MinX"
Public Const K_MAXX As String = "MaxX"
Public Const K_MINY As String = "MinY"
Public Const K_MAXY As String = "MaxY"
End Module
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Height="38"
Visibility="{Binding DoneBtn_Visibility}"
Visibility="{Binding Message_Visibility}"
HorizontalAlignment="Left"
Margin="45,0,0,0"
Padding="0"
+125 -74
View File
@@ -199,74 +199,95 @@ Public Class CurrMachiningCathegory
Select Case m_Type
Case Cathegories.GENERAL
m_sName = "General"
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.SLICINGTYPE, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.SPIRALVASE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDH, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDW, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDCOUNT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSET, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDOVERLAP, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.TOOLDIAM, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.DYNAMIC_MODE, nPartId, nIndex, bForceFromDb),
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.SLICINGTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.SPIRALVASE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDH, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDW, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSET, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.TOOLDIAM, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.DYNAMIC_MODE, nPartId, nIndex, bForceFromDb, Me),
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.LINK
m_sName = "Shell"
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb)})
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb, Me)})
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.RIBS
m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.SHELL_NUMBER
m_sName = "Reduce Shell Number"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.AUX_SOLID
m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
End Select
' verifico dipendenze tra parametri
Select Case m_Type
Case Cathegories.LINK
For Each Param In {MachiningParam.Params.LINKTYPE, MachiningParam.Params.LEADIN}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.RIBS
For Each Param In {MachiningParam.Params.RIBSTYPE}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.AUX_SOLID
For Each Param In {MachiningParam.Params.AUXSOLIDSINFILL}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
End Select
End Sub
@@ -292,10 +313,18 @@ Public Class CurrNumericMachiningParam
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2))
End Get
Set(value As String)
Dim dTempValue As Double = 0
If m_bIsLen Then
StringToLen(value, m_dValue)
StringToLen(value, dTempValue)
Else
StringToDouble(value, m_dValue)
StringToDouble(value, dTempValue)
End If
If m_bIsActiveMinMax Then
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
m_dValue = dTempValue
End If
Else
m_dValue = dTempValue
End If
NotifyPropertyChanged(NameOf(sValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
@@ -318,8 +347,8 @@ Public Class CurrNumericMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.STRANDH
@@ -388,6 +417,15 @@ Public Class CurrNumericMachiningParam
Case Params.TOOLDIAM
bReadFromPart = EgtGetInfo(nPartId, MAC_TOOLDIAM, m_dValue)
m_bIsLen = True
Case Params.PREFLOWDELAY
bReadFromPart = EgtGetInfo(nPartId, MAC_PREFLOWDELAY, m_dValue)
m_bIsLen = True
Case Params.POSTFLOWDELAY
bReadFromPart = EgtGetInfo(nPartId, MAC_POSTFLOWDELAY, m_dValue)
m_bIsLen = True
Case Params.SCREWBACK
bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue)
m_bIsLen = True
Case Params.RIBSOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
m_bIsLen = False
@@ -448,9 +486,9 @@ Public Class CurrNumericMachiningParam
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
Select Case Type
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
Params.FLOORCOUNT, Params.G0FEED, Params.G0FEEDZ, Params.TOOLDIAM, Params.FLOWRATE_PC
Params.FLOORCOUNT, Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.LINKPARAM, Params.LINKZUP, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
Case Params.LINKPARAM, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
@@ -529,6 +567,12 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_G0FEEDZ, sWriteValue)
Case Params.TOOLDIAM
EgtSetInfo(nPartId, MAC_TOOLDIAM, sWriteValue)
Case Params.PREFLOWDELAY
EgtSetInfo(nPartId, MAC_PREFLOWDELAY, sWriteValue)
Case Params.POSTFLOWDELAY
EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue)
Case Params.SCREWBACK
EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue)
Case Params.RIBSOVERLAP
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
Case Params.RIBSSTRANDCOUNT
@@ -621,8 +665,8 @@ Public Class CurrStringMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nIndex As Integer)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nIndex As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
m_sValue = sValue
m_sOrigValue = m_sValue
End Sub
@@ -677,6 +721,11 @@ Public Class CurrComboMachiningParam
m_SelValue = value
NotifyPropertyChanged(NameOf(SelValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
ManageDependencyParam()
' se aggiorno SlicingType
If m_Type = Params.SLICINGTYPE Then
CurrentMachine.UpdateExtrusionArea()
End If
End Set
End Property
@@ -696,8 +745,8 @@ Public Class CurrComboMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.SLICINGTYPE
@@ -848,6 +897,7 @@ Public Class CurrComboMachiningParam
Friend Overrides Sub ResetParam()
m_SelValue = m_OrigSelValue
NotifyPropertyChanged(NameOf(SelValue))
CurrentMachine.UpdateExtrusionArea()
End Sub
#Region "COMMANDS"
@@ -867,6 +917,7 @@ Public Class CurrComboMachiningParam
m_SelValue = DbParam.OrigSelValue
NotifyPropertyChanged(NameOf(SelValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
CurrentMachine.UpdateExtrusionArea()
End Sub
#End Region ' ResetParam
@@ -905,8 +956,8 @@ Public Class CurrCheckMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.SPIRALVASE
@@ -1016,8 +1067,8 @@ Public Class CurrOrderedMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.PRINT_ORDER
@@ -1,6 +1,7 @@
<Grid x:Class="CurrMachiningPanelV"
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"
xmlns:PrintApp="clr-namespace:Icarus"
Width="310"
VerticalAlignment="Center">
@@ -46,7 +47,8 @@
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
@@ -55,10 +57,10 @@
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBox Grid.Column="1"
Text="{Binding sValue}"
Margin="2.5,0,2.5,0"
Style="{StaticResource ParameterList_TextBox}"/>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,2.5,0"
Style="{StaticResource ParameterList_TextBox2}"/>
<Button Grid.Column="2"
Content="R"
Command="{Binding ResetParam_Command}"
@@ -70,7 +72,8 @@
</Grid>
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
@@ -97,7 +100,8 @@
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
<Grid Height="22"
Margin="0,1,2.5,1">
Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
+37 -60
View File
@@ -213,7 +213,7 @@ Public Class FilledSolidPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -235,7 +235,7 @@ Public Class FilledSolidPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -259,7 +259,7 @@ Public Class FilledSolidPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -287,7 +287,7 @@ Public Class FilledSolidPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -311,7 +311,7 @@ Public Class FilledSolidPanelVM
Return m_bRotate_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bRotate_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -335,7 +335,7 @@ Public Class FilledSolidPanelVM
Return m_bMachParam_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelFilledSolid) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
If Not IsNothing(m_SelFilledSolid) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
m_bMachParam_IsChecked = True
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
@@ -517,7 +517,6 @@ Public Class FilledSolidPanelVM
Private m_cmdCPlaneObj As ICommand
Private m_cmdDragMove As ICommand
Private m_cmdDragRotate As ICommand
Private m_cmdMachParam As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -718,9 +717,15 @@ Public Class FilledSolidPanelVM
' lo seleziono
SelFilledSolid = NewEntity
NotifyPropertyChanged(NameOf(SelFilledSolid))
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
' verifico se esiste gia' layer estrusione e lo svuoto
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewExtrusionLayerId)
Else
' altrimenti lo creo
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
' seleziono percorso da estrudere
EgtDeselectAll()
@@ -809,7 +814,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.InsertFilledSolid()
End Sub
@@ -833,7 +838,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
@@ -858,7 +863,7 @@ Public Class FilledSolidPanelVM
End Property
Public Sub Delete()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If IsNothing(SelFilledSolid) Then Return
Dim bOk As Boolean = False
Select Case m_SelFilledSolid.Type
@@ -904,7 +909,7 @@ Public Class FilledSolidPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub ModifyCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.CURVE)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -929,7 +934,7 @@ Public Class FilledSolidPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub AddPointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -958,7 +963,7 @@ Public Class FilledSolidPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub RemovePointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -987,7 +992,7 @@ Public Class FilledSolidPanelVM
''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
''' </summary>
Public Sub Extrude(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.EXTRUSION)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
@@ -1015,7 +1020,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1040,7 +1045,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
''' </summary>
Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1065,7 +1070,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
''' </summary>
Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1090,7 +1095,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
''' </summary>
Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1115,7 +1120,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
''' </summary>
Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1140,7 +1145,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
''' </summary>
Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1165,7 +1170,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1189,7 +1194,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -1213,7 +1218,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
Public Sub CPlaneRotate(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
Else
@@ -1241,7 +1246,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
Public Sub CPlane3P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
End Sub
@@ -1265,7 +1270,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
Public Sub CPlanePerpObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
End Sub
@@ -1305,7 +1310,7 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1315,7 +1320,7 @@ Public Class FilledSolidPanelVM
End While
EgtDeselectAll()
m_bCPlaneObj_IsActive = True
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -1332,7 +1337,7 @@ Public Class FilledSolidPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -1351,41 +1356,13 @@ Public Class FilledSolidPanelVM
End Property
Public Sub DragRotate()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.ROTATE)
End Sub
#End Region ' DragRotate
#Region "MachParam"
Public ReadOnly Property MachParam_Command As ICommand
Get
If m_cmdMachParam Is Nothing Then
m_cmdMachParam = New Command(AddressOf MachParam)
End If
Return m_cmdMachParam
End Get
End Property
Public Sub MachParam()
If IsNothing(Map.refTopPanelVM.SelMachining) Then Return
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
m_bGrid_IsChecked = False
m_bMove_IsChecked = False
m_bRotate_IsChecked = False
NotifyPropertyChanged(NameOf(bAdd_IsChecked))
NotifyPropertyChanged(NameOf(bEdit_IsChecked))
NotifyPropertyChanged(NameOf(bGrid_IsChecked))
NotifyPropertyChanged(NameOf(bMove_IsChecked))
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.AUXSOLIDPARAM)
End Sub
#End Region ' MachParam
#End Region ' COMMANDS
End Class
@@ -33,7 +33,8 @@
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
@@ -57,7 +58,8 @@
</Grid>
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
@@ -88,12 +90,19 @@
<UniformGrid Grid.Row="1"
Rows="1"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Command="{Binding Ok_Command}"
IsDefault="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
@@ -42,17 +42,25 @@ Public Class FilledSolidParamPanelVM
m_Type = Cathegories.AUX_SOLID
m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId)})
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId, Me)})
NotifyPropertyChanged(NameOf(MachiningParamList))
NotifyPropertyChanged(NameOf(sName))
' verifico dipendenze tra parametri
Select Case m_Type
Case Cathegories.AUX_SOLID
For Each Param In {MachiningParam.Params.AUXSOLIDSINFILL}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
End Select
End Sub
Friend Sub SaveCurrParams()
@@ -178,8 +186,8 @@ Public Class FilledSolidNumericMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nFilledSolidId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nFilledSolidId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.AUXSOLIDSOVERLAP
@@ -305,6 +313,7 @@ Public Class FilledSolidComboMachiningParam
m_SelValue = value
NotifyPropertyChanged(NameOf(SelValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
ManageDependencyParam()
End Set
End Property
@@ -324,8 +333,8 @@ Public Class FilledSolidComboMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nRibId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nRibId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromRib As Boolean = False
Dim bReadFromPart As Boolean = False
Select Case Type
+118
View File
@@ -0,0 +1,118 @@
<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
@@ -0,0 +1,3 @@
Public Class HelpPanelV
End Class
+81
View File
@@ -0,0 +1,81 @@
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
@@ -0,0 +1,12 @@
<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
@@ -0,0 +1,3 @@
Public Class Icon_Tooltip
End Class
@@ -0,0 +1,29 @@
<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>
@@ -0,0 +1,3 @@
Public Class ProjectManager_Tooltip
End Class
+71
View File
@@ -0,0 +1,71 @@
<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
@@ -0,0 +1,18 @@
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
@@ -0,0 +1,108 @@
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
+98 -3
View File
@@ -124,6 +124,7 @@
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
<Compile Include="Constants\ConstDims.vb" />
<Compile Include="Constants\ConstGen.vb" />
<Compile Include="Constants\ConstMachDataIni.vb" />
<Compile Include="Constants\ConstIni.vb" />
<Compile Include="Constants\ConstMachComm.vb" />
<Compile Include="Constants\ConstMachIni.vb" />
@@ -157,10 +158,28 @@
<DependentUpon>FilledSolidParamPanelV.xaml</DependentUpon>
</Compile>
<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">
<DependentUpon>ImportExportMachiningPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ImportExportMachiningPanel\ImportExportMachiningPanelVM.vb" />
<Compile Include="ImportLoadingWnd\ImportLoadingWndV.xaml.vb">
<DependentUpon>ImportLoadingWndV.xaml</DependentUpon>
</Compile>
<Compile Include="ImportLoadingWnd\ImportLoadingWndVM.vb" />
<Compile Include="InstrumentPanel\InstrumentPanelV.xaml.vb">
<DependentUpon>InstrumentPanelV.xaml</DependentUpon>
</Compile>
@@ -201,8 +220,11 @@
<DependentUpon>MaterialDbV.xaml</DependentUpon>
</Compile>
<Compile Include="MaterialDb\MaterialDbVM.vb" />
<Compile Include="OptionsWindow\MachineBox.xaml.vb">
<DependentUpon>MachineBox.xaml</DependentUpon>
<Compile Include="TSFEditor\ColumnHeader.xaml.vb">
<DependentUpon>ColumnHeader.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateMachine\UpdateMachineV.xaml.vb">
<DependentUpon>UpdateMachineV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionsWindow\OptionModule.vb" />
<Compile Include="OptionsWindow\OptionWindowV.xaml.vb">
@@ -304,6 +326,7 @@
<Compile Include="TSFEditor\TFSEditorV.xaml.vb">
<DependentUpon>TFSEditorV.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateMachine\UpdateMachineVM.vb" />
<Compile Include="Utility\CurrentMachine.vb" />
<Compile Include="Utility\Dictionary.xaml.vb">
<DependentUpon>Dictionary.xaml</DependentUpon>
@@ -361,10 +384,30 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</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">
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="ImportLoadingWnd\ImportLoadingWndV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="InstrumentPanel\InstrumentPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -417,7 +460,11 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="OptionsWindow\MachineBox.xaml">
<Page Include="TSFEditor\ColumnHeader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UpdateMachine\UpdateMachineV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -787,9 +834,57 @@
<ItemGroup>
<Resource Include="Resources\ViewPanel\LookFromISO_SE.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Common\Close.png" />
<Resource Include="Resources\Common\Maximize.png" />
<Resource Include="Resources\Common\Minimize.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Common\Restore.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\StopCalculation.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SplashScreen\BlueSplashscreen.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\Dimensions.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\TFSEditor\Reduce.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ReferencePanel\BC.png" />
<Resource Include="Resources\ReferencePanel\BL.png" />
<Resource Include="Resources\ReferencePanel\BR.png" />
<Resource Include="Resources\ReferencePanel\MC.png" />
<Resource Include="Resources\ReferencePanel\ML.png" />
<Resource Include="Resources\ReferencePanel\MR.png" />
<Resource Include="Resources\ReferencePanel\TC.png" />
<Resource Include="Resources\ReferencePanel\TL.png" />
<Resource Include="Resources\ReferencePanel\TR.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ReferencePanel\White_BC.png" />
<Resource Include="Resources\ReferencePanel\White_BL.png" />
<Resource Include="Resources\ReferencePanel\White_BR.png" />
<Resource Include="Resources\ReferencePanel\White_MC.png" />
<Resource Include="Resources\ReferencePanel\White_ML.png" />
<Resource Include="Resources\ReferencePanel\White_MR.png" />
<Resource Include="Resources\ReferencePanel\White_TC.png" />
<Resource Include="Resources\ReferencePanel\White_TL.png" />
<Resource Include="Resources\ReferencePanel\White_TR.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\Mass.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\Time.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\RibParamPanel\CopyFrom.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
@@ -1,20 +1,21 @@
<EgtWPFLib5:EgtCustomWindow x:Class="ImportExportMachiningPanelV"
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 OkMsg}"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
Width="400" Height="500">
<EgtWPFLib5:EgtMainWindow x:Class="ImportExportMachiningPanelV"
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 OkMsg}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Style="{StaticResource Dialog_Window}">
<Grid>
<Grid Margin="2.5,2.5,2.5,0">
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ListBox ItemsSource="{Binding MachiningList}">
<ListBox ItemsSource="{Binding MachiningList}"
Height="400"
Width="250">
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningItem}">
<Grid Height="20">
@@ -32,7 +33,7 @@
Margin="0,0,5,0"
VerticalContentAlignment="Center"
Visibility="{Binding Path=DataContext.Active_Visibility,
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtMainWindow}}}"/>
<TextBlock Grid.Column="1"
Text="{Binding sName}"
FontSize="15"
@@ -46,17 +47,26 @@
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Command="{Binding OkCommand}"
Content="{Binding OkMsg}"
IsEnabled="{Binding IsEnabledOkBtn, Mode=OneWay}"
Grid.Row="1"
Height="30" Width="100"
Margin="10" />
<UniformGrid Grid.Row="2"
Rows="1"
Margin="0,20,0,0">
<Button Command="{Binding OkCommand}"
IsEnabled="{Binding IsEnabledOkBtn, Mode=OneWay}"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button IsCancel="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
</EgtWPFLib5:EgtMainWindow>
@@ -0,0 +1,38 @@
<EgtWPFLib5:EgtMainWindow x:Class="ImportLoadingWndV"
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="New Project"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Style="{StaticResource Dialog_Window}">
<Grid Margin="2.5,2.5,2.5,2.5">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Loading_Msg}"
Margin="20,20,20,2.5"
Style="{StaticResource DialogWindow_TextBlock}"/>
<Grid Grid.Row="1"
Margin="2.5,2.5,2.5,2.5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ProgressBar Value="{Binding Loading_Value}"
Width="200"
Margin="0,0,2.5,20"
Style="{StaticResource Icarus_ProgressBar}"/>
<!--<Button Grid.Column="1"
Grid.RowSpan="2"
Command="{Binding Stop_Command}"
Margin="2.5,0,0,0"
Style="{StaticResource TopPanel_Button}">
<Image Source="\Resources\SliceManager\StopCalculation.png"
Style="{StaticResource Button_Image}"/>
</Button>-->
</Grid>
</Grid>
</EgtWPFLib5:EgtMainWindow>
@@ -0,0 +1,14 @@
Public Class ImportLoadingWndV
Private WithEvents m_ImportLoadingWndVM As ImportLoadingWndVM
Sub New(Owner As Window, ImportLoadingWndVM As ImportLoadingWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ImportLoadingWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ImportLoadingWndVM = ImportLoadingWndVM
End Sub
End Class
@@ -0,0 +1,91 @@
Imports System.Collections.ObjectModel
Imports EgtUILib.EgtInterface
Imports EgtWPFLib5
Public Class ImportLoadingWndVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
' Funzioni di callback per output in interfaccia da LUA
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
Private m_bStopLoading As Boolean = False
Private m_Loading_Value As Double
Public Property Loading_Value As Double
Get
Return m_Loading_Value
End Get
Set(value As Double)
m_Loading_Value = value
End Set
End Property
' Definizione comandi
Private m_cmdStop As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "MESSAGES"
Public ReadOnly Property Loading_Msg As String
Get
Return "Importing file..."
End Get
End Property
#End Region ' MESSAGES
#Region "CONSTRUCTORS"
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefImportLoadingWndVM(Me)
End Sub
#End Region ' CONSTRUCTORS
#Region "METHODS"
Friend Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
m_Loading_Value = nProg
NotifyPropertyChanged(NameOf(Loading_Value))
' Costringo ad aggiornare
UpdateUI()
' Eventuale attesa
Threading.Thread.Sleep(nPause)
' Ritorno eventuale stop
If m_bStopLoading Then
m_bStopLoading = False
Return 1
Else
Return 0
End If
Return 0
End Function
#End Region ' METHODS
#Region "COMMANDS"
#Region "Stop"
Public ReadOnly Property Stop_Command As ICommand
Get
If m_cmdStop Is Nothing Then
m_cmdStop = New Command(AddressOf StopLoading)
End If
Return m_cmdStop
End Get
End Property
Public Sub StopLoading()
m_bStopLoading = True
End Sub
#End Region ' Stop
#End Region ' COMMANDS
End Class
+35 -43
View File
@@ -1,50 +1,42 @@
<EgtWPFLib5:EgtCustomWindow x:Class="MachSaveInDbWndV"
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"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Title="Machining Param Name"
Height="150" Width="300"
WindowStartupLocation="CenterOwner"
Icon="/Resources/Icarus.ico"
WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False"
IsMinimizable="False">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtWPFLib5:EgtMainWindow x:Class="MachSaveInDbWndV"
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="Save in Database"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Style="{StaticResource Dialog_Window}">
<Grid Margin="2.5,2.5,2.5,0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Column="1"
Grid.Row="1"
Text="Name"
Margin="0,0,10,0"
Style="{Binding OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="2"
Grid.Row="1"
Width="180"
Text="{Binding sName}"
Style="{StaticResource LeftPanel_TextBox}"/>
<UniformGrid Grid.Column="1"
Grid.ColumnSpan="2"
Grid.Row="3"
Rows="1">
<Button Content="Ok"
Command="{Binding Ok_Command}"
<TextBlock Text="Write the new Database machining name"
Margin="20,20,20,2.5"
Style="{StaticResource DialogWindow_TextBlock}"/>
<EgtWPFLib5:EgtTextBox2 Grid.Row="1"
Text="{Binding sName}"
IsExplicitFocused="True"
Width="160"
Margin="20,10,20,2.5"
Style="{StaticResource LeftPanel_TextBox2}"/>
<UniformGrid Grid.Row="3"
Rows="1"
Margin="0,20,0,0">
<Button Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource ToolBar_TextButton}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Style="{StaticResource ToolBar_TextButton}"/>
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
</EgtWPFLib5:EgtMainWindow>
@@ -7,7 +7,7 @@
Width="40"
Style="{StaticResource SelViewSlider_ComboBox}">
<ComboBoxItem>
<Image Source="\Resources\SimulationPanel\HeadMode.png"
<Image Source="\Resources\SimulationPanel\ToolMode.png"
Style="{StaticResource ComboBox.Image}"/>
</ComboBoxItem>
<ComboBoxItem>
+8 -13
View File
@@ -4,32 +4,27 @@ Imports EgtWPFLib5
Public Class MachineViewPanelVM
Inherits VMBase
Private m_nSelMachView As MCH_LOOK
Public Property ghSelMachView As Integer
Get
Return m_nSelMachView - 1
Return If(Not IsNothing(Map.refSimulationPanelVM) AndAlso Not IsNothing(Map.refSimulationPanelVM.MySimul), Map.refSimulationPanelVM.MySimul.GetMachLook() - 1, Nothing)
End Get
Set(value As Integer)
m_nSelMachView = value + 1
If Not IsNothing(Map.refSimulationPanelVM) Then
Dim MySimul As SimulationVM = Map.refSimulationPanelVM.MySimul
MySimul.SetMachLook(m_nSelMachView)
If Not IsNothing(Map.refSimulationPanelVM) AndAlso Not IsNothing(Map.refSimulationPanelVM.MySimul) Then
Map.refSimulationPanelVM.MySimul.SetMachLook(value + 1)
' aggiorno lo stato della macchina e la sua visualizzazione
EgtSetMachineLook(MySimul.GetMachLook())
WriteMainPrivateProfileString(S_SIMUL, K_MACHVIEWMODE, m_nSelMachView)
EgtSetMachineLook(Map.refSimulationPanelVM.MySimul.GetMachLook())
WriteMainPrivateProfileString(S_SIMUL, K_MACHVIEWMODE, value + 1)
End If
EgtDraw()
End Set
End Property
Friend Sub SetSelViewSlider(value As MCH_LOOK)
m_nSelMachView = value
Friend Sub RefreshSelViewSlider()
NotifyPropertyChanged(NameOf(ghSelMachView))
End Sub
Sub New()
' leggo vista macchina da ini e la imposto
Dim DefaultMachViewMode As Integer = GetMainPrivateProfileInt(S_SIMUL, K_MACHVIEWMODE, 3)
SetSelViewSlider(DefaultMachViewMode)
' Creo riferimento a questa classe in OmagOFFICEMap
Map.SetRefMachineViewPanelVM(Me)
End Sub
End Class
+247 -103
View File
@@ -1,8 +1,10 @@
Imports System.Collections.ObjectModel
Imports System.Collections.Specialized
Imports System.ComponentModel
Imports System.Reflection
Imports EgtUILib
Imports EgtWPFLib5
Imports Icarus.Machining
Public Class Machining
Inherits VMBase
@@ -314,74 +316,77 @@ Public Class MachiningCathegory
Select Case m_Type
Case Cathegories.GENERAL
m_sName = "General"
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.SLICINGTYPE, nIndex),
New CheckMachiningParam(MachiningParam.Params.SPIRALVASE, nIndex),
New NumericMachiningParam(MachiningParam.Params.STRANDH, nIndex),
New NumericMachiningParam(MachiningParam.Params.STRANDW, nIndex),
New NumericMachiningParam(MachiningParam.Params.STRANDCOUNT, nIndex),
New NumericMachiningParam(MachiningParam.Params.OFFSET, nIndex),
New NumericMachiningParam(MachiningParam.Params.STRANDOVERLAP, nIndex),
New NumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nIndex),
New ComboMachiningParam(MachiningParam.Params.STRANDORDER, nIndex),
New ComboMachiningParam(MachiningParam.Params.DIRECTION, nIndex),
New NumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nIndex),
New NumericMachiningParam(MachiningParam.Params.G0FEED, nIndex),
New NumericMachiningParam(MachiningParam.Params.G0FEEDZ, nIndex),
New NumericMachiningParam(MachiningParam.Params.TOOLDIAM, nIndex),
New NumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nIndex),
New ComboMachiningParam(MachiningParam.Params.DYNAMIC_MODE, nIndex),
New OrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nIndex)})
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.SLICINGTYPE, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.SPIRALVASE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.STRANDH, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.STRANDW, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.STRANDCOUNT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.OFFSET, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.STRANDOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.STRANDORDER, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.DIRECTION, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.G0FEED, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.G0FEEDZ, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LINKZUP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.TOOLDIAM, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.DYNAMIC_MODE, nIndex, Me),
New OrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.SCREWBACK, nIndex, Me)})
Case Cathegories.LINK
m_sName = "Shell"
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.LINKTYPE, nIndex),
New NumericMachiningParam(MachiningParam.Params.LINKPARAM, nIndex),
New NumericMachiningParam(MachiningParam.Params.LINKZUP, nIndex),
New ComboMachiningParam(MachiningParam.Params.LEADIN, nIndex),
New NumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nIndex),
New NumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nIndex),
New NumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nIndex),
New ComboMachiningParam(MachiningParam.Params.LEADOUT, nIndex),
New NumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nIndex),
New NumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nIndex),
New NumericMachiningParam(MachiningParam.Params.COASTINGLEN, nIndex),
New NumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nIndex),
New NumericMachiningParam(MachiningParam.Params.WIPELEN, nIndex),
New NumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nIndex)})
'New NumericMachiningParam(MachiningParam.Params.WIPEDIR, nIndex)})
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.LINKTYPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LINKPARAM, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.LEADIN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.LEADOUT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.COASTINGLEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.WIPELEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nIndex, Me)})
'New NumericMachiningParam(MachiningParam.Params.WIPEDIR, nIndex, Me)})
Case Cathegories.RIBS
m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.RIBSTYPE, nIndex),
New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex),
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex),
New CheckMachiningParam(MachiningParam.Params.RIBSLINK, nIndex),
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nIndex),
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nIndex),
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nIndex),
New CheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nIndex),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nIndex),
New CheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nIndex),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nIndex),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nIndex),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nIndex),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex),
New CheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nIndex)})
m_MachiningParamList = New List(Of MachiningParam)({New ComboMachiningParam(MachiningParam.Params.RIBSTYPE, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSLINK, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nIndex, Me),
New CheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nIndex, Me)})
Case Cathegories.SHELL_NUMBER
m_sName = "Reduce Shell Number"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nIndex),
New NumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nIndex),
New NumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nIndex),
New NumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nIndex)})
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nIndex, Me)})
Case Cathegories.AUX_SOLID
m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nIndex),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nIndex),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nIndex),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nIndex),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nIndex),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nIndex),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nIndex),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nIndex),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nIndex)})
m_MachiningParamList = New List(Of MachiningParam)({New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nIndex, Me),
New ComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nIndex, Me),
New NumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nIndex, Me)})
Case Cathegories.MATERIALS
m_sName = "Materials"
Dim sMaterials As String = ""
@@ -389,7 +394,25 @@ Public Class MachiningCathegory
Dim MaterialGuidList As List(Of String) = sMaterials.Split(";"c).ToList()
m_MachiningParamList = New List(Of MachiningParam)
For Each Material In Map.refTopPanelVM.MaterialList
m_MachiningParamList.Add(New MaterialMachiningParam(Material.sName, Material.sGUID, MaterialGuidList.Contains(Material.sGUID)))
m_MachiningParamList.Add(New MaterialMachiningParam(Material.sName, Material.sGUID, MaterialGuidList.Contains(Material.sGUID), Me))
Next
End Select
' verifico dipendenze tra parametri
Select Case m_Type
Case Cathegories.LINK
For Each Param In {MachiningParam.Params.LINKTYPE, MachiningParam.Params.LEADIN, MachiningParam.Params.LEADOUT}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.RIBS
For Each Param In {MachiningParam.Params.RIBSTYPE}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.AUX_SOLID
For Each Param In {MachiningParam.Params.AUXSOLIDSINFILL}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
End Select
End Sub
@@ -433,26 +456,29 @@ Public MustInherit Class MachiningParam
DIRECTION = 10
FLOORCOUNT = 11
G0FEED = 12
G0FEEDZ = 13
TOOLDIAM = 14
FLOWRATE_PC = 15
DYNAMIC_MODE = 16
PRINT_ORDER = 17
LINKZUP = 13
G0FEEDZ = 14
TOOLDIAM = 15
FLOWRATE_PC = 16
DYNAMIC_MODE = 17
PRINT_ORDER = 18
PREFLOWDELAY = 19
POSTFLOWDELAY = 20
SCREWBACK = 21
LINKTYPE = 51
LINKPARAM = 52
LINKZUP = 53
LEADIN = 54
LEADINTANGDIST = 55
LEADINORTHODIST = 56
OFFSETLEADPOINT = 57
LEADOUT = 58
LEADOUTTANGDIST = 59
LEADOUTORTHODIST = 60
COASTINGLEN = 61
COASTINGFEED_PC = 62
WIPELEN = 63
WIPEFEED_PC = 64
'WIPEDIR = 65
LEADIN = 53
LEADINTANGDIST = 54
LEADINORTHODIST = 55
OFFSETLEADPOINT = 56
LEADOUT = 57
LEADOUTTANGDIST = 58
LEADOUTORTHODIST = 59
COASTINGLEN = 60
COASTINGFEED_PC = 61
WIPELEN = 62
WIPEFEED_PC = 63
'WIPEDIR = 64
RIBSTYPE = 101
RIBSOVERLAP = 102
RIBSSTRANDCOUNT = 103
@@ -500,8 +526,16 @@ Public MustInherit Class MachiningParam
Public MustOverride ReadOnly Property bIsModified As Boolean
Sub New(Type As Params)
Protected m_Cathegory As MachiningCathegory
Public ReadOnly Property Cathegory As MachiningCathegory
Get
Return m_Cathegory
End Get
End Property
Sub New(Type As Params, Cathegory As MachiningCathegory)
m_Type = Type
m_Cathegory = Cathegory
Select Case m_Type
Case Params.SLICINGTYPE
m_sName = "Slicing direction"
@@ -555,6 +589,12 @@ Public MustInherit Class MachiningParam
m_sName = "G0 Feed Z"
Case Params.TOOLDIAM
m_sName = "Nozzle Diameter"
Case Params.PREFLOWDELAY
m_sName = "Pre Flow Delay"
Case Params.POSTFLOWDELAY
m_sName = "Post Flow Delay"
Case Params.SCREWBACK
m_sName = "Screw Back"
Case Params.RIBSTYPE
m_sName = "Type"
Case Params.RIBSOVERLAP
@@ -626,8 +666,9 @@ Public MustInherit Class MachiningParam
End Select
End Sub
Sub New(sName As String)
Sub New(sName As String, Cathegory As MachiningCathegory)
m_Type = Params.MATERIALS
m_Cathegory = Cathegory
m_sName = sName
End Sub
@@ -644,6 +685,10 @@ Public Class NumericMachiningParam
Protected m_bIsLen As Boolean = False
Protected m_bIsActiveMinMax As Boolean = False
Protected m_dMinValue As Double
Protected m_dMaxValue As Double
Protected m_dValue As Double
Public ReadOnly Property dValue As Double
Get
@@ -655,10 +700,18 @@ Public Class NumericMachiningParam
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2))
End Get
Set(value As String)
Dim dTempValue As Double = 0
If m_bIsLen Then
StringToLen(value, m_dValue)
StringToLen(value, dTempValue)
Else
StringToDouble(value, m_dValue)
StringToDouble(value, dTempValue)
End If
If m_bIsActiveMinMax Then
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
m_dValue = dTempValue
End If
Else
m_dValue = dTempValue
End If
NotifyPropertyChanged(NameOf(sValue))
End Set
@@ -677,12 +730,36 @@ Public Class NumericMachiningParam
End Get
End Property
Sub New(Type As Params)
MyBase.New(Type)
Protected m_bIsActive As Boolean = True
Public ReadOnly Property bIsActive As Boolean
Get
Return m_bIsActive
End Get
End Property
Friend Sub SetIsActive(bValue As Boolean)
m_bIsActive = bValue
NotifyPropertyChanged(NameOf(bIsActive))
End Sub
Sub New(Type As Params, nIndex As Integer)
MyBase.New(Type)
Sub New(Type As Params, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
End Sub
Sub New(Type As Params, nIndex As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
' leggo ed imposto eventuali min e max
Dim sMinMax As String = ""
If GetMainPrivateProfileString(S_MINMAX, Type, "", sMinMax) > 0 Then
Dim sMinMaxValues() As String = sMinMax.Split(","c)
Dim dMin As Double = 0
Dim dMax As Double = 0
If StringToDouble(sMinMaxValues(0), dMin) AndAlso StringToDouble(sMinMaxValues(1), dMax) Then
m_dMinValue = dMin
m_dMaxValue = dMax
m_bIsActiveMinMax = True
End If
End If
' leggo parametri da Db
If nIndex = 0 Then
m_dValue = 0
m_bIsLen = True
@@ -754,6 +831,15 @@ Public Class NumericMachiningParam
Case Params.TOOLDIAM
m_dValue = ReadMachiningParamDouble(nIndex, MAC_TOOLDIAM, 0)
m_bIsLen = True
Case Params.PREFLOWDELAY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_PREFLOWDELAY, 0)
m_bIsLen = False
Case Params.POSTFLOWDELAY
m_dValue = ReadMachiningParamDouble(nIndex, MAC_POSTFLOWDELAY, 0)
m_bIsLen = False
Case Params.SCREWBACK
m_dValue = ReadMachiningParamDouble(nIndex, MAC_SCREWBACK, 0)
m_bIsLen = False
Case Params.RIBSOVERLAP
m_dValue = ReadMachiningParamDouble(nIndex, MAC_RIBSOVERLAP, 0)
m_bIsLen = False
@@ -865,6 +951,12 @@ Public Class NumericMachiningParam
WriteMachiningParam(nIndex, MAC_G0FEEDZ, sWriteValue, sFilePath)
Case Params.TOOLDIAM
WriteMachiningParam(nIndex, MAC_TOOLDIAM, sWriteValue, sFilePath)
Case Params.PREFLOWDELAY
WriteMachiningParam(nIndex, MAC_PREFLOWDELAY, sWriteValue, sFilePath)
Case Params.POSTFLOWDELAY
WriteMachiningParam(nIndex, MAC_POSTFLOWDELAY, sWriteValue, sFilePath)
Case Params.SCREWBACK
WriteMachiningParam(nIndex, MAC_SCREWBACK, sWriteValue, sFilePath)
Case Params.RIBSOVERLAP
WriteMachiningParam(nIndex, MAC_RIBSOVERLAP, sWriteValue, sFilePath)
Case Params.RIBSSTRANDCOUNT
@@ -942,8 +1034,8 @@ Public Class StringMachiningParam
End Get
End Property
Sub New(Type As Params, nIndex As Integer)
MyBase.New(Type)
Sub New(Type As Params, nIndex As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
m_sValue = sValue
m_sOrigValue = m_sValue
End Sub
@@ -984,6 +1076,7 @@ Public Class ComboMachiningParam
Set(value As IdNameStruct)
m_SelValue = value
NotifyPropertyChanged(NameOf(SelValue))
ManageDependencyParam()
End Set
End Property
@@ -1000,12 +1093,23 @@ Public Class ComboMachiningParam
End Get
End Property
Sub New(Type As Params)
MyBase.New(Type)
Protected m_bIsActive As Boolean = True
Public ReadOnly Property bIsActive As Boolean
Get
Return m_bIsActive
End Get
End Property
Friend Sub SetIsActive(bValue As Boolean)
m_bIsActive = bValue
NotifyPropertyChanged(NameOf(bIsActive))
End Sub
Sub New(Type As Params, nIndex As Integer)
MyBase.New(Type)
Sub New(Type As Params, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
End Sub
Sub New(Type As Params, nIndex As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
If nIndex = 0 Then
m_ValueList = New List(Of IdNameStruct)
m_SelValue = Nothing
@@ -1082,6 +1186,35 @@ Public Class ComboMachiningParam
m_OrigSelValue = m_SelValue
End Sub
Friend Sub ManageDependencyParam()
' gestisco dis/attivazione parametri dipendenti
Select Case m_Type
Case Params.LINKTYPE
Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.LINKPARAM)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_LINKTYPES.NONE)
Case Params.LEADIN
Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.LEADINTANGDIST)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_LEADINOUT.NONE)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.LEADINORTHODIST)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_LEADINOUT.NONE)
Case Params.LEADOUT
Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.LEADOUTTANGDIST)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_LEADINOUT.NONE)
NumMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.LEADOUTORTHODIST)
NumMachiningParam.SetIsActive(m_SelValue.Id <> Machining.MPAR_LEADINOUT.NONE)
Case Params.RIBSTYPE
Dim CheckMachiningParam As CheckMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.RIBSLIMITUNBOUNDEDWITHSOLID)
CheckMachiningParam.SetIsActive(m_SelValue.Id = MPAR_RIBSTYPE.UNBOUNDED)
Case Params.AUXSOLIDSINFILL
Dim ComboMachiningParam As ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSSTRANDORDER)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
ComboMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKTYPE)
ComboMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
Dim NumMachiningParam As NumericMachiningParam = m_Cathegory.MachiningParamList.FirstOrDefault(Function(z) z.Type = Params.AUXSOLIDSLINKPARAM)
NumMachiningParam.SetIsActive(m_SelValue.Id = Machining.MPAR_INFILL.OFFSET)
End Select
End Sub
Friend Overrides Sub WriteParamOnDb(nIndex As Integer, Optional sFilePath As String = "")
Select Case Type
Case Params.SLICINGTYPE
@@ -1147,12 +1280,23 @@ Public Class CheckMachiningParam
End Get
End Property
Sub New(Type As Params)
MyBase.New(Type)
Protected m_bIsActive As Boolean = True
Public ReadOnly Property bIsActive As Boolean
Get
Return m_bIsActive
End Get
End Property
Friend Sub SetIsActive(bValue As Boolean)
m_bIsActive = bValue
NotifyPropertyChanged(NameOf(bIsActive))
End Sub
Sub New(Type As Params, nIndex As Integer)
MyBase.New(Type)
Sub New(Type As Params, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
End Sub
Sub New(Type As Params, nIndex As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
If nIndex = 0 Then
m_bValue = 0
Else
@@ -1247,8 +1391,8 @@ Public Class MaterialMachiningParam
End Get
End Property
Sub New(sName As String, sGUID As String, bValue As Boolean)
MyBase.New(sName)
Sub New(sName As String, sGUID As String, bValue As Boolean, Cathegory As MachiningCathegory)
MyBase.New(sName, Cathegory)
m_sGUID = sGUID
m_bValue = bValue
m_bOrigValue = m_bValue
@@ -1373,12 +1517,12 @@ Public Class OrderedMachiningParam
Private m_cmdMoveDownOrder As ICommand
Private m_cmdResetOrder As ICommand
Sub New(Type As Params)
MyBase.New(Type)
Sub New(Type As Params, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
End Sub
Sub New(Type As Params, nIndex As Integer)
MyBase.New(Type)
Sub New(Type As Params, nIndex As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
If nIndex = 0 Then
Select Case Type
Case Params.PRINT_ORDER
+10 -7
View File
@@ -134,7 +134,8 @@
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
@@ -142,14 +143,15 @@
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBox Grid.Column="1"
Text="{Binding sValue}"
Margin="2.5,0,0,0"
Style="{StaticResource ParameterList_TextBox}"/>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,0,0"
Style="{StaticResource ParameterList_TextBox2}"/>
</Grid>
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
@@ -167,7 +169,8 @@
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
<Grid Height="22"
Margin="0,1,2.5,1">
Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
+2 -2
View File
@@ -195,8 +195,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2502, 1, m_nKeyLevel) And
EgtGetKeyOptions(5583, 2502, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2504, 1, m_nKeyLevel) And
EgtGetKeyOptions(5583, 2504, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
+12 -27
View File
@@ -1,20 +1,14 @@
<EgtWPFLib5:EgtCustomWindow x:Class="MainWindowV"
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"
xmlns:PrintApp="clr-namespace:Icarus"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Title="{Binding sTitle}" Icon="/Resources/Icarus.ico"
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
AllowDrop="True" Drop="MainWindowV_Drop"
ShowInTaskbar="True"
Topmost="False"
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<!--<EgtWPFLib5:EgtCustomWindow.TitlePanel>
<PrintApp:ProjManagerV DataContext="{StaticResource ProjManagerVM}"/>
</EgtWPFLib5:EgtCustomWindow.TitlePanel>-->
<EgtWPFLib5:EgtMainWindow x:Class="MainWindowV"
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"
xmlns:PrintApp="clr-namespace:Icarus"
MinHeight="600" MinWidth="800"
AllowDrop="True"
Drop="MainWindowV_Drop"
ShowInTaskbar="True"
Topmost="False"
Style="{StaticResource NoStyle_Window}">
<Grid>
<Grid.RowDefinitions>
@@ -23,14 +17,5 @@
</Grid.RowDefinitions>
<PrintApp:SceneHostV Grid.Row="1"/>
</Grid>
<!--Pannello principale --><!--
<DockPanel>
--><!--StatusBar --><!--
<PrintApp:StatusBarV DataContext="{StaticResource StatusBarVM}"
DockPanel.Dock="Bottom"/>
<PrintApp:ProjectV DataContext="{StaticResource ProjectVM}"/>
</DockPanel>-->
</EgtWPFLib5:EgtCustomWindow>
</EgtWPFLib5:EgtMainWindow>
+16 -3
View File
@@ -5,7 +5,6 @@ Imports System.Windows.Interop
Class MainWindowV
Private m_MainWindowVM As MainWindowVM
Private m_SceneHostWnd As SecondaryWindowV
#Region "CONSTRUCTOR"
@@ -20,6 +19,8 @@ Class MainWindowV
AddHandler Me.Closing, AddressOf MainWindowV_Closing
AddHandler Me.KeyDown, AddressOf MainWindowV_KeyDown
AddHandler Me.StateChanged, AddressOf MainWindowV_StateChanged
'AddHandler Me.LocationChanged, AddressOf MainWindowV_LocationChanged
'AddHandler Me.SizeChanged, AddressOf MainWindowV_SizeChanged
End Sub
#End Region ' CONSTRUCTOR
@@ -60,15 +61,27 @@ Class MainWindowV
Me.Activate()
' Recupero l'array di stringhe con i nomi del file
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
End If
End Sub
Private Sub MainWindowV_LocationChanged(sender As Object, e As EventArgs)
If Not IsNothing(Map.refSecondaryWindowV) Then
Map.refSecondaryWindowV.Top = Me.Top
Map.refSecondaryWindowV.Left = Me.Left
End If
End Sub
Private Sub MainWindowV_SizeChanged(sender As Object, e As SizeChangedEventArgs)
If Not IsNothing(Map.refSecondaryWindowV) Then
If e.WidthChanged Then Map.refSecondaryWindowV.Width = e.NewSize.Width
If e.HeightChanged Then Map.refSecondaryWindowV.Height = e.NewSize.Height
Map.refSecondaryWindowV.InvalidateVisual()
End If
End Sub
Private Sub MainWindowV_StateChanged(sender As Object, e As EventArgs)
If Not IsNothing(Map.refSecondaryWindowV) AndAlso Not Map.refSecondaryWindowV.WindowChangingState Then
Map.refSecondaryWindowV.WindowState = Me.WindowState
'Application.Current.MainWindow.Topmost = True
'Application.Current.MainWindow.Topmost = False
End If
End Sub
+83 -151
View File
@@ -7,9 +7,6 @@ Imports System.Windows.Threading
Public Class MainWindowVM
Inherits VMBase
Private m_SupervisorCommThread As Thread
Private m_Supervisor_Timer As New DispatcherTimer
' Riferimento al Model della MainWindow
Private m_MainWindowM As MainWindowM
Friend ReadOnly Property MainWindowM As MainWindowM
@@ -18,6 +15,9 @@ Public Class MainWindowVM
End Get
End Property
' Funzioni di callback per output in interfaccia da LUA
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
' Variabile che indica che il programma è stato avviato correttamente (sia la mappa che l'ambiente Egt)
Private m_bInitStatus As Boolean
Friend ReadOnly Property bInitStatus As Boolean
@@ -27,25 +27,34 @@ Public Class MainWindowVM
End Property
' Titolo
Private m_sTitle As String
Public Property sTitle As String
Public ReadOnly Property sTitle As String
Get
Return m_sTitle
Return "Icarus"
End Get
Set(value As String)
m_sTitle = value
NotifyPropertyChanged(NameOf(sTitle))
End Set
End Property
' proprietà che seleziona la giusta pagina del TabControl
Public Property nSelTabPage As Integer
Public ReadOnly Property sProjectName As String
Get
' Return If(IsNothing(Map.refMainMenuVM.SelPage) OrElse Map.refMainMenuVM.SelPage = -1 OrElse Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.MACHINING, 0, 1)
Return -1
Dim sFilePath As String = ""
EgtGetCurrFilePath(sFilePath)
If String.IsNullOrEmpty(sFilePath) Then
sFilePath = EgtMsg(MSG_TOPCOMMANDBAR + 1) & Map.refMainWindowVM.MainWindowM.nInstance.ToString()
Return sFilePath
Else
Return Path.GetFileNameWithoutExtension(sFilePath) & If(EgtGetModified(), "*", "")
End If
End Get
End Property
Public ReadOnly Property sProjectPath As String
Get
Dim sFilePath As String = ""
EgtGetCurrFilePath(sFilePath)
If String.IsNullOrEmpty(sFilePath) Then
sFilePath = EgtMsg(MSG_TOPCOMMANDBAR + 1) & Map.refMainWindowVM.MainWindowM.nInstance.ToString()
End If
Return sFilePath
End Get
Set(value As Integer)
End Set
End Property
Private m_MachinePanelVM As MachinePanelVM
@@ -55,9 +64,6 @@ Public Class MainWindowVM
End Get
End Property
'Friend m_SupervisorStop As Boolean = False
'Private BlockedWnd As BlockedWndV
' definizione comandi
Private m_cmdAboutBox As ICommand
Private m_cmdCloseApplication As ICommand
@@ -71,117 +77,18 @@ Public Class MainWindowVM
m_MainWindowM = New MainWindowM
' inizializzo machine panel
m_MachinePanelVM = New MachinePanelVM
' inizializzo contatore per blocco da supervisore
m_Supervisor_Timer.Interval = TimeSpan.FromMilliseconds(500)
' AddHandler m_Supervisor_Timer.Tick, AddressOf SupervisorTimer_Tick
m_Supervisor_Timer.Start()
' Installo funzione gestione eventi per lua
EgtSetProcessEvents(m_ProcEventsCallback)
End Sub
#End Region ' CONSTRUCTOR
'#Region "METHODS"
Friend Sub SetTitle(sTitle As String)
m_sTitle = sTitle
NotifyPropertyChanged(NameOf(sTitle))
' aggiorno titolo nella secondaryPage che e' quello che si vede nella barra in alto
Map.refSecondaryWindowVM.SetTitle(sTitle)
End Sub
'Public Sub UpdateTitle()
' m_Title = ""
' Select Case Map.refMainMenuVM.SelPage
' Case Pages.VIEW
' If Not IsNothing(Map.refProjManagerVM.CurrProj) Then
' If Map.refProjManagerVM.CurrProj.bIsNew Then m_Title = "New - "
' m_Title &= Map.refProjManagerVM.CurrProj.nProjId.ToString("0000") & " - " & Map.refProjManagerVM.CurrProj.sBTLFileName
' End If
' Case Pages.MACHINING
' If Not IsNothing(Map.refProdManagerVM.CurrProd) Then
' If Map.refProdManagerVM.CurrProd.bIsNew Then m_Title = "New - "
' m_Title &= Map.refProdManagerVM.CurrProd.nProdId.ToString("0000") & " - " & Map.refProdManagerVM.CurrProd.sBTLFileName
' End If
' Case Pages.CONFIG
' m_Title = "Configuration Page"
' End Select
' m_Title &= " - EgtBEAMWALL"
' NotifyPropertyChanged(NameOf(Title))
'End Sub
Friend Sub ContentRendered()
'DbControllers.Init()
'' chiamata a caso su Db per inizializzarlo
'DbControllers.m_ProjController.FindByProjDbId(0)
'' Verifico che l'inizializzazione di tutte le parti del programma sia andata a buon fine
'If Map.EndInit() Then
' m_bInitStatus = True
' ' altrimenti chiudo il programma
'Else
' m_bInitStatus = False
'End If
'' Aggiorno visualizzazione unità di misura
''Map.refStatusBarVM.SetMeasureUnit(If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH))
'' imposto MainWindow per finestra di Loading
'LoadingWndHelper.SetMainWindow(Application.Current.MainWindow)
'' leggo riga di comando
'Dim nCommandType As Integer = 0
'Dim nPage As Pages = Pages.VIEW
'Dim nProdId As Integer = 0
'If ProcessCommandLine(nCommandType, nPage, nProdId) Then
' Select Case nCommandType
' Case 1
' Map.refProdManagerVM.SetCurrProd(nProdId)
' Case 2
' ' pagina gia' impostata nella variabile
' End Select
'Else
' ' setto il primo file dalla lista degli MRU come progetto corrente da aprire
' Dim sLastProjectPath As String = String.Empty
' GetMainPrivateProfileString(S_MRUPROJFILES, K_FILE & "1", String.Empty, sLastProjectPath)
' If Not String.IsNullOrWhiteSpace(sLastProjectPath) AndAlso File.Exists(sLastProjectPath) Then
' ' ricavo l'Id e il progetto associato per l'apertura di quest'ultimo
' Dim PjId As Integer = 0
' Dim sPjId As String = Path.GetFileNameWithoutExtension(sLastProjectPath)
' Integer.TryParse(sPjId, PjId)
' Map.refProjManagerVM.SetCurrProj(PjId)
' End If
'End If
'' seleziono pagina da aprire
'Map.refMainMenuVM.SelPage = nPage
'' inizializzo thread di aggiornamento e comunicazione con DB
'' creo thread gestione macchina
'm_SupervisorCommThread = New Thread(Sub()
' SupervisorCommThread.SupervisorCommThreadFunction()
' End Sub)
'm_SupervisorCommThread.SetApartmentState(ApartmentState.STA)
'' avvio thread di gestione della macchina che avvia la connessione
'm_SupervisorCommThread.Start()
End Sub
' Friend Function ProcessCommandLine(ByRef nCommandType As Integer, ByRef nPage As Pages, ByRef nProdId As Integer) As Boolean
' ' Se non ci sono veri parametri su linea di comando, esco (il primo è sempre il nome del programma)
' If Environment.GetCommandLineArgs.Count() <= 1 Then Return False
' ' Recupero primo parametro che dovrebbe essere il tipo di modalita' riga di comando
' Dim sFile As String = Environment.GetCommandLineArgs(1)
' If String.IsNullOrWhiteSpace(sFile) OrElse Not Integer.TryParse(sFile, nCommandType) OrElse nCommandType <= 0 Then Return False
' Select Case nCommandType
' Case 1 ' apri progetto in ottimizzatore
' ' recupero secondo parametro
' Dim sProdId As String = Environment.GetCommandLineArgs(2)
' If Not Integer.TryParse(sProdId, nProdId) OrElse nProdId <= 0 Then Return False
' nPage = Pages.MACHINING
' Return True
' Case 2 ' apri pagina specifica senza progetto specifico
' ' recupero secondo parametro
' Dim sPage As String = Environment.GetCommandLineArgs(2)
' If Not Integer.TryParse(sPage, nPage) OrElse (nPage <> Pages.VIEW AndAlso nPage <> Pages.MACHINING) Then Return False
' Return True
' End Select
' Return False
' End Function
Friend Sub KeyDown(PressedKey As Key)
' Con ESC esco dall'azione corrente
If PressedKey = Key.Escape Then
@@ -240,36 +147,17 @@ Public Class MainWindowVM
End If
End Sub
' Friend m_ManagingSupervisorStop As Boolean = False
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
If Map.refSliceManagerVM.bCalculating Then
Map.refSliceManagerVM.ProcessEvents(nProg, nPause)
End If
If Not IsNothing(Map.refImportLoadingWndVM) Then
Map.refImportLoadingWndVM.ProcessEvents(nProg, nPause)
End If
Map.refMyStatusBarVM.ProcessEvents(nProg, nPause)
Return 0
End Function
' Private Sub SupervisorTimer_Tick()
' If SupervisorCommThread.bViewerOptimizerBlocked And Not m_ManagingSupervisorStop Then
' m_ManagingSupervisorStop = True
' BlockedWnd = New BlockedWndV(Application.Current.MainWindow, New BlockedWndVM)
' BlockedWnd.ShowDialog()
' ElseIf Not SupervisorCommThread.bViewerOptimizerBlocked And m_ManagingSupervisorStop Then
' m_ManagingSupervisorStop = False
' BlockedWnd.Close()
' End If
' End Sub
'#End Region ' METHODS
'#Region "COMMANDS"
'#Region "CloseApplicationCommand"
' ' Returns a command that manage the MainWindow_Unloaded command
' Public ReadOnly Property CloseApplicationCommand() As ICommand
' Get
' If m_cmdCloseApplication Is Nothing Then
' m_cmdCloseApplication = New Command(AddressOf CloseApplication)
' End If
' Return m_cmdCloseApplication
' End Get
' End Property
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Friend Sub CloseApplication()
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
Return
@@ -300,8 +188,52 @@ Public Class MainWindowVM
Application.Current.Shutdown()
End Sub
'#End Region ' CloseApplicationCommand
#Region "COMMANDS"
'#End Region ' COMMANDS
#Region "AboutBoxCommand"
' Returns a command that manage the MainWindow_Unloaded command
Public ReadOnly Property AboutBoxCommand() As ICommand
Get
If m_cmdAboutBox Is Nothing Then
m_cmdAboutBox = New Command(AddressOf AboutBox)
End If
Return m_cmdAboutBox
End Get
End Property
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub AboutBox(ByVal param As Object)
Dim AboutBoxWindow As New AboutBoxV
AboutBoxWindow.Owner = Application.Current.MainWindow
AboutBoxWindow.ShowDialog()
End Sub
#End Region ' AboutBoxCommand
#Region "CloseApplicationCommand"
' Returns a command that manage the MainWindow_Unloaded command
Public ReadOnly Property CloseApplicationCommand() As ICommand
Get
If m_cmdCloseApplication Is Nothing Then
m_cmdCloseApplication = New Command(AddressOf CloseApplication)
End If
Return m_cmdCloseApplication
End Get
End Property
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub CloseApplication(ByVal param As Object)
If Map.refSliceManagerVM.bCalculating Then
MessageBox.Show("Impossible closing software! Wait end of calculation!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
Return
End If
CloseApplication()
End Sub
#End Region ' CloseApplicationCommand
#End Region ' COMMANDS
End Class
+13 -6
View File
@@ -145,13 +145,20 @@
Rows="1"
IsEnabled="{Binding IsEnabled}"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
<Button Command="{Binding Ok_Command}"
IsDefault="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Visibility="{Binding IsImport_Visibility}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
+2 -2
View File
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.3.1")>
<Assembly: AssemblyFileVersion("2.5.3.1")>
<Assembly: AssemblyVersion("2.5.4.1")>
<Assembly: AssemblyFileVersion("2.5.4.1")>
-36
View File
@@ -1,36 +0,0 @@
<EgtWPFLib5:EgtCustomWindow x:Class="MachineBox"
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"
Height="160" Width="380" WindowStyle="None" ResizeMode="NoResize"
TitleBarHeight="30" IsResizable="False" IsMinimizable="False"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
<Border BorderThickness="2" BorderBrush="LightBlue">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="0.25*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="0.25*"/>
</Grid.RowDefinitions>
<TextBlock Name="MessageLbl" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center"
VerticalAlignment="Center" />
<UniformGrid Grid.Column="1" Grid.Row="3" Columns="3">
<Button Name="ReplaceBtn" Height="26" Margin="0,0,5,0"/>
<Button Name="UpdateBtn" Height="26" Margin="5,0,5,0"/>
<Button Name="CancelBtn" IsDefault="True" Height="26" Margin="5,0,0,0"/>
</UniformGrid>
</Grid>
</Border>
</EgtWPFLib5:EgtCustomWindow>
-45
View File
@@ -1,45 +0,0 @@
Imports EgtUILib
Public Class MachineBox
Public Shadows DialogResult As MessageBoxResult = MessageBoxResult.Cancel
Public Sub New( Owner As Window, sMachName As String)
InitializeComponent()
Me.Owner = Owner
Title = EgtMsg( 6534) ' Avviso
MessageLbl.Text = String.Format( EgtMsg( 6528), sMachName) ' La macchina "{0}" esiste già,<br/> cosa vuoi fare ?
ReplaceBtn.Content = EgtMsg( 6531) ' Sostituisci
UpdateBtn.Content = EgtMsg( 6532) ' Aggiorna
CancelBtn.Content = EgtMsg( 6533) ' Annulla
End Sub
Private Sub ReplaceBtn_Click( sender As Object, e As RoutedEventArgs) Handles ReplaceBtn.Click
DialogResult = MessageBoxResult.Yes
Close()
End Sub
Private Sub UpdateBtn_Click( sender As Object, e As RoutedEventArgs) Handles UpdateBtn.Click
DialogResult = MessageBoxResult.No
Close()
End Sub
Private Sub CancelBtn_Click( sender As Object, e As RoutedEventArgs) Handles CancelBtn.Click
DialogResult = MessageBoxResult.Cancel
Close()
End Sub
Public Overloads Function ShowDialog() As MessageBoxResult
MyBase.ShowDialog()
Return DialogResult
End Function
End Class
+330 -316
View File
@@ -1,328 +1,342 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OptionWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Icarus="clr-namespace:Icarus"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Title="{Binding Title}" Icon="/Resources/Icarus.ico"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinWidth="400" MinHeight="382"
Width="400" Height="412">
<EgtWPFLib5:EgtMainWindow x:Class="OptionWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Icarus="clr-namespace:Icarus"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Style="{StaticResource Dialog_Window}"
Title="{Binding Title}" Icon="/Resources/Icarus.ico"
WindowStyle="None" ResizeMode="NoResize"
WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
MinWidth="400" MinHeight="382"
Width="400" Height="412">
<!--<EgtWPFLib5:EgtCustomWindow.Resources>
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources>-->
<TabControl Margin="5,5,5,5">
<TabItem Header="{Binding GenericMsg}">
<StackPanel Margin="5,5,5,0">
<!--<GroupBox Header="{Binding CurrentLanguageMsg}"
Margin="0,0,0,5">
<UniformGrid Rows="2" Margin="3,3,3,3">
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
Margin="0,0,0,5"/>
<TextBlock Text="{Binding LanguageAdvertMsg}" TextWrapping="Wrap"
TextAlignment="Center"/>
</UniformGrid>
</GroupBox>-->
<UniformGrid Columns="2"
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TabControl Margin="5,5,5,5">
<TabItem Header="{Binding GenericMsg}">
<StackPanel Margin="5,5,5,0">
<!--<GroupBox Header="{Binding CurrentLanguageMsg}"
Margin="0,0,0,5">
<TextBlock Text="{Binding TopSceneBackgroundMsg}" VerticalAlignment="Center"/>
<Button Background="{Binding TopSceneBackground}"
Command="{Binding TopSceneBackground_Command}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</UniformGrid>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding BotSceneBackgroundMsg}" VerticalAlignment="Center"/>
<Button Background="{Binding BotSceneBackground}"
Command="{Binding BotSceneBackground_Command}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</UniformGrid>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding GridColorMsg}" VerticalAlignment="Center"/>
<Button Background="{Binding GridColor}"
Command="{Binding GridColor_Command}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</UniformGrid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
Grid.Row="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding ThickLine}"
Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SmoothTriMeshMsg}" VerticalAlignment="Center"
Grid.Row="1" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SmoothTriMesh}"
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
</Grid>
<!--<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
SelectedItem="{Binding SelectedTextFont}" Height="25"
Margin="10,5,0,0"/>
</UniformGrid>-->
<Grid Margin="5,5,5,5">
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
</Grid>
</StackPanel>
</TabItem>
<TabItem Header="{Binding CADMsg}">
<StackPanel Margin="5,5,5,0">
<UniformGrid Grid.ColumnSpan="2" Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding GeometryToleranceMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding GeometryTolerance}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,0"/>
</UniformGrid>
<ItemsControl ItemsSource="{Binding LayerColorList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding Color_Msg}" VerticalAlignment="Center"/>
<Grid Margin="10,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<Button Background="{Binding Background}"
Command="{Binding Color_Command}"
Margin="0,0,5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Slider Grid.Column="1"
Value="{Binding dAlpha}"
Minimum="10"
Maximum="100"
TickPlacement="BottomRight"
TickFrequency="10"
IsSnapToTickEnabled="True"
Margin="0,0,5,0"/>
<TextBlock Grid.Column="2"
Text="{Binding sAlpha}"
TextAlignment="Right"/>
</Grid>
</UniformGrid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--<GroupBox Grid.Column="1" Grid.RowSpan="2"
Header="{Binding DimensionMsg}"
Margin="0,0,0,5">
<UniformGrid Grid.ColumnSpan="2" Columns="2">
<TextBlock Text="{Binding ExtLineLenMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ExtLineLen}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding ArrowLenMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ArrowLen}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding TextDistMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding TextDist}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding LenIsMMMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
SelectedItem="{Binding SelectedUnitMeasure}" Height="25"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding DecDigitMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding DecDigit}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
SelectedItem="{Binding SelectedFont}" Height="25"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding TextHeightMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding TextHeight}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
</UniformGrid>
</GroupBox>-->
</StackPanel>
</TabItem>
<TabItem Header="{Binding ImportMsg}">
<StackPanel Margin="5,5,5,0">
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="1"
VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding UnitScaleMsg}" />
<TextBlock Grid.Row="0" Grid.Column="2"
VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding FactorScaleMsg}"/>
<TextBlock Grid.Row="1" Grid.Column="0"
Text="{Binding DxfScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="1" Grid.Column="1"
ItemsSource="{Binding ScaleDXFList, Mode=OneWay}"
SelectedItem="{Binding SelectedDXFScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="1" Grid.Column="2"
Text="{Binding DxfScaleFactor}" Height="25"
IsEnabled="{Binding DXFScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Grid.Row="2" Grid.Column="0"
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="2" Grid.Column="1"
ItemsSource="{Binding ScaleSTLList, Mode=OneWay}"
SelectedItem="{Binding SelectedSTLScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="2" Grid.Column="2"
Text="{Binding StlScaleFactor}" Height="25"
IsEnabled="{Binding STLScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<!--<TextBlock Grid.Row="3" Grid.Column="0"
Text="{Binding ImageScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="3" Grid.Column="1"
ItemsSource="{Binding ScaleImageList, Mode=OneWay}"
SelectedItem="{Binding SelectedImageScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="3" Grid.Column="2"
Text="{Binding ImageScaleFactor}" Height="25"
IsEnabled="{Binding ImageScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>-->
</Grid>
</StackPanel>
</TabItem>
<!--<TabItem Header="{Binding ExportMsg}">
<StackPanel>
<GroupBox Grid.Column="1" Grid.RowSpan="2"
Header="{Binding ImageMsg}"
Margin="5,5,5,0">
<UniformGrid Grid.ColumnSpan="2" Columns="2">
<TextBlock Text="{Binding ImageWidthMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ImageWidth}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Text="{Binding ImageHeightMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ImageHeight}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
</UniformGrid>
</GroupBox>
</StackPanel>
</TabItem>-->
<TabItem Header="{Binding CAMMsg}">
<StackPanel>
<!--<GroupBox Grid.Column="1" Grid.RowSpan="2"
Header="{Binding MachiningSelGeomMsg}"
Margin="5,5,5,0">
<UniformGrid Columns="2">
<TextBlock Text="{Binding GeomTypeDrillingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedDrillingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeSawingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedSawingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeMillingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedMillingGeomType}" Height="25"
<UniformGrid Rows="2" Margin="3,3,3,3">
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
Margin="0,0,0,5"/>
<TextBlock Text="{Binding LanguageAdvertMsg}" TextWrapping="Wrap"
TextAlignment="Center"/>
</UniformGrid>
</GroupBox>-->
<UniformGrid Columns="2"
Margin="0,0,0,5">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypePocketingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedPocketingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeMortisingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedMortisingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeChiselingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedChiselingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding TopSceneBackgroundMsg}" VerticalAlignment="Center"/>
<Button Background="{Binding TopSceneBackground}"
Command="{Binding TopSceneBackground_Command}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</UniformGrid>
</GroupBox>-->
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding BotSceneBackgroundMsg}" VerticalAlignment="Center"/>
<Button Background="{Binding BotSceneBackground}"
Command="{Binding BotSceneBackground_Command}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</UniformGrid>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding GridColorMsg}" VerticalAlignment="Center"/>
<Button Background="{Binding GridColor}"
Command="{Binding GridColor_Command}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</UniformGrid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
Grid.Row="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding ThickLine}"
Grid.Column="1" Grid.Row="0" Margin="22,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SmoothTriMeshMsg}" VerticalAlignment="Center"
Grid.Row="1" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SmoothTriMesh}"
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
</Grid>
<!--<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
SelectedItem="{Binding SelectedTextFont}" Height="25"
Margin="10,5,0,0"/>
</UniformGrid>-->
<Grid Margin="5,5,5,5">
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
</Grid>
</StackPanel>
</TabItem>
<TabItem Header="{Binding CADMsg}">
<StackPanel Margin="5,5,5,0">
<UniformGrid Grid.ColumnSpan="2" Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding GeometryToleranceMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding GeometryTolerance}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,0"/>
</UniformGrid>
<ItemsControl ItemsSource="{Binding LayerColorList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding Color_Msg}" VerticalAlignment="Center"/>
<Grid Margin="10,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<Button Background="{Binding Background}"
Command="{Binding Color_Command}"
Margin="0,0,5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Slider Grid.Column="1"
Value="{Binding dAlpha}"
Minimum="10"
Maximum="100"
TickPlacement="BottomRight"
TickFrequency="10"
IsSnapToTickEnabled="True"
Margin="0,0,5,0"/>
<TextBlock Grid.Column="2"
Text="{Binding sAlpha}"
TextAlignment="Right"/>
</Grid>
</UniformGrid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!--<GroupBox Grid.Column="1" Grid.RowSpan="2"
Header="{Binding DimensionMsg}"
Margin="0,0,0,5">
<UniformGrid Grid.ColumnSpan="2" Columns="2">
<TextBlock Text="{Binding ExtLineLenMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ExtLineLen}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding ArrowLenMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ArrowLen}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding TextDistMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding TextDist}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding LenIsMMMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
SelectedItem="{Binding SelectedUnitMeasure}" Height="25"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding DecDigitMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding DecDigit}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding FontMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding FontList, Mode=OneWay}"
SelectedItem="{Binding SelectedFont}" Height="25"
Margin="10,5,0,0"/>
<TextBlock Text="{Binding TextHeightMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding TextHeight}" Height="25"
VerticalContentAlignment="Center"
Margin="10,5,0,0"/>
</UniformGrid>
</GroupBox>-->
</StackPanel>
<!--<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
Grid.Row="0" Margin="0,0,0,5"/>
<CheckBox IsChecked="{Binding NewMachiningIsLastOne}"
Grid.Column="1" Grid.Row="0" Margin="4,0,0,0" VerticalAlignment="Center"/>
<TextBlock Text="{Binding UseDispositionScriptMsg}" VerticalAlignment="Center"
Grid.Row="1" Margin="0,0,0,5"/>
<CheckBox IsChecked="{Binding UseDispositionScript}"
Grid.Column="1" Grid.Row="1" Margin="4,0,0,0" VerticalAlignment="Center"/>
</Grid>-->
</TabItem>
<TabItem Header="{Binding ImportMsg}">
<StackPanel Margin="5,5,5,0">
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="1"
VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding UnitScaleMsg}" />
<TextBlock Grid.Row="0" Grid.Column="2"
VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding FactorScaleMsg}"/>
<Grid Margin="5,5,5,0">
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,1"/>
</Grid>
<TextBlock Grid.Row="1" Grid.Column="0"
Text="{Binding DxfScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="1" Grid.Column="1"
ItemsSource="{Binding ScaleDXFList, Mode=OneWay}"
SelectedItem="{Binding SelectedDXFScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="1" Grid.Column="2"
Text="{Binding DxfScaleFactor}" Height="25"
IsEnabled="{Binding DXFScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Grid.Row="2" Grid.Column="0"
Text="{Binding StlScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="2" Grid.Column="1"
ItemsSource="{Binding ScaleSTLList, Mode=OneWay}"
SelectedItem="{Binding SelectedSTLScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="2" Grid.Column="2"
Text="{Binding StlScaleFactor}" Height="25"
IsEnabled="{Binding STLScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<!--<TextBlock Grid.Row="3" Grid.Column="0"
Text="{Binding ImageScaleFactorMsg}" VerticalAlignment="Center"/>
<ComboBox Grid.Row="3" Grid.Column="1"
ItemsSource="{Binding ScaleImageList, Mode=OneWay}"
SelectedItem="{Binding SelectedImageScale, UpdateSourceTrigger=PropertyChanged}" Height="25"
Margin="10,0,0,5"/>
<TextBox Grid.Row="3" Grid.Column="2"
Text="{Binding ImageScaleFactor}" Height="25"
IsEnabled="{Binding ImageScaleEnable, UpdateSourceTrigger=LostFocus}"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>-->
</Grid>
</StackPanel>
</TabItem>
<!--<TabItem Header="{Binding ExportMsg}">
<StackPanel>
<GroupBox Grid.Column="1" Grid.RowSpan="2"
Header="{Binding ImageMsg}"
Margin="5,5,5,0">
<UniformGrid Grid.ColumnSpan="2" Columns="2">
<TextBlock Text="{Binding ImageWidthMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ImageWidth}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
<TextBlock Text="{Binding ImageHeightMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ImageHeight}" Height="25"
VerticalContentAlignment="Center"
Margin="10,0,0,5"/>
</UniformGrid>
</GroupBox>
</StackPanel>
</TabItem>-->
<TabItem Header="{Binding CAMMsg}">
<StackPanel>
<!--<GroupBox Grid.Column="1" Grid.RowSpan="2"
Header="{Binding MachiningSelGeomMsg}"
Margin="5,5,5,0">
<UniformGrid Columns="2">
<TextBlock Text="{Binding GeomTypeDrillingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedDrillingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeSawingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedSawingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeMillingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedMillingGeomType}" Height="25"
Margin="0,0,0,5">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypePocketingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedPocketingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeMortisingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedMortisingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="{Binding GeomTypeChiselingMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding GeomTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedChiselingGeomType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</UniformGrid>
</GroupBox>-->
<Grid Margin="5,5,5,0">
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
</Grid>
</StackPanel>
</TabItem>
</TabControl>
<!--<Grid Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
Grid.Row="0" Margin="0,0,0,5"/>
<CheckBox IsChecked="{Binding NewMachiningIsLastOne}"
Grid.Column="1" Grid.Row="0" Margin="4,0,0,0" VerticalAlignment="Center"/>
<TextBlock Text="{Binding UseDispositionScriptMsg}" VerticalAlignment="Center"
Grid.Row="1" Margin="0,0,0,5"/>
<CheckBox IsChecked="{Binding UseDispositionScript}"
Grid.Column="1" Grid.Row="1" Margin="4,0,0,0" VerticalAlignment="Center"/>
</Grid>-->
</EgtWPFLib5:EgtCustomWindow>
<Grid Margin="5,5,5,0">
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,1"/>
</Grid>
<Grid Margin="5,5,5,0">
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
</Grid>
</StackPanel>
</TabItem>
</TabControl>
<Button Grid.Row="1"
Command="{Binding Ok_Command}"
IsCancel="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
</Grid>
</EgtWPFLib5:EgtMainWindow>
+21 -58
View File
@@ -980,16 +980,17 @@ Public Class OptionWindowVM
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir)
Dim bUpdate As Boolean = True
If bOldExists Then
Dim MachBox As New MachineBox( Application.Current.MainWindow, sMachName)
Select MachBox.ShowDialog()
Case MessageBoxResult.Yes
bUpdate = False
Case MessageBoxResult.No
bUpdate = True
Case MessageBoxResult.Cancel
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName))
MachBox.ShowDialog()
Select Case MachBox.DialogResult
Case MessageBoxResult.Yes
bUpdate = False
Case MessageBoxResult.No
bUpdate = True
Case MessageBoxResult.Cancel
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End Select
' Faccio una copia di backup della macchina corrente
Dim sBackupDir As String = sMachDir & ".old"
@@ -1013,11 +1014,11 @@ Public Class OptionWindowVM
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
If bOldExists And bUpdate Then
Dim sBackupDir As String = sMachDir & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Tools") Then
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Tools") Then
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Tools") Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Tools") Then
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Tools", sMachDir & "\Tools", True)
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Tools", sMachDir & "\Tools", True)
End If
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Machinings") Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Machinings") Then
@@ -1037,50 +1038,12 @@ Public Class OptionWindowVM
End If
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
End If
'If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Beam") Then
' ' Flag per sovrascrivere vecchio file BeamData.lua con nuovo
' Dim bBeamDataExists As Boolean = False
' Const sBeamData As String = "\BeamData.lua"
' ' Flag per sovrascrivere vecchio file MachiningTypes.ini
' Dim bMchgTypesExists As Boolean = False
' Const sMchgTypes As String = "\MachiningTypes.ini"
' If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Beam") Then
' If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sBeamData) Then
' bBeamDataExists = True
' My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sBeamData, sMachDir & sBeamData, True)
' End If
' If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sMchgTypes) Then
' bMchgTypesExists = True
' My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sMchgTypes, sMachDir & sMchgTypes, True)
' End If
' My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Beam", FileIO.DeleteDirectoryOption.DeleteAllContents)
' End If
' My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Beam", sMachDir & "\Beam", True)
' If bBeamDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sBeamData, sMachDir & "\Beam" & sBeamData, True)
' If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Beam" & sMchgTypes, True)
'End If
'If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Wall") Then
' ' Flag per sovrascrittura vecchio file WallData.lua con nuovo
' Dim bWallDataExists As Boolean = False
' Const sWallData As String = "\WallData.lua"
' ' Flag per sovrascrivere vecchio file MachiningTypes.ini
' Dim bMchgTypesExists As Boolean = False
' Const sMchgTypes As String = "\MachiningTypes.ini"
' If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Wall") Then
' If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sWallData) Then
' bWallDataExists = True
' My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sWallData, sMachDir & sWallData, True)
' End If
' If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sMchgTypes) Then
' bMchgTypesExists = True
' My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sMchgTypes, sMachDir & sMchgTypes, True)
' End If
' My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Wall", FileIO.DeleteDirectoryOption.DeleteAllContents)
' End If
' My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Wall", sMachDir & "\Wall", True)
' If bWallDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sWallData, sMachDir & "\Wall" & sWallData, True)
' If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Wall" & sMchgTypes, True)
'End If
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\CustomData") Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\CustomData") Then
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\CustomData", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\CustomData", sMachDir & "\CustomData", True)
End If
End If
'La macchina "{0}" è stata aggiornata con successo.
Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
+7
View File
@@ -86,5 +86,12 @@
<Image Source="/Resources/ProjectManager/Send.png"
Style="{StaticResource Button_Image}"/>
</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>
+28 -15
View File
@@ -63,6 +63,7 @@ Public Class ProjManagerVM
Private m_cmdExport As ICommand
Private m_cmdOptions As ICommand
Private m_cmdSendFeedback As ICommand
Private m_cmdHelp As ICommand
#Region "ToolTip"
@@ -193,23 +194,11 @@ Public Class ProjManagerVM
''' Execute the Open. This method is invoked by the OpenCommand.
''' </summary>
Friend Sub Open()
OpenProject(Nothing)
OpenProject("")
End Sub
Friend Function OpenProject(sFilePath As String) As Boolean
If String.IsNullOrEmpty(sFilePath) Then
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = Map.refSceneHostVM.MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
GetMainPrivateProfileString(S_MRUFILES, K_FILE & 1, "", sDir)
End If
If Not String.IsNullOrWhiteSpace(sDir) Then
sDir = Path.GetDirectoryName(sDir)
End If
Return Map.refSceneHostVM.MainController.OpenProject(sDir)
Else
Return Map.refSceneHostVM.MainController.OpenProject(sFilePath, False)
End If
Map.refSceneHostVM.OpenProject(sFilePath)
End Function
#End Region ' OpenCommand
@@ -397,7 +386,7 @@ Public Class ProjManagerVM
Map.refSceneHostVM.SaveProject()
End If
EgtGetCurrFilePath(sCurrProject)
' se modificato, chiedo se si vuole salvare
' se modificato, chiedo se si vuole salvare
Else
If EgtGetModified() Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
@@ -495,6 +484,30 @@ Public Class ProjManagerVM
#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 Class
+29 -7
View File
@@ -1,6 +1,7 @@
<UserControl x:Class="ReferencePanelV"
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">
<Border Padding="2.5"
Style="{StaticResource LeftPanel_PopupButton_Border}">
<Grid>
@@ -33,12 +34,33 @@
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<RadioButton Content="{Binding sText}"
IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
FontSize="40"
GroupName="ReferenceRadio"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource OptionPanel_NestingToggleButton}"/>
<PrintApp:CheckedImageRadioButton IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
ImageSource="{Binding sText}"
CheckedImageSource="{Binding sSelText}"
FontSize="40"
GroupName="ReferenceRadio"
Margin="2.5,2.5,2.5,2.5">
<!--<RadioButton.Resources>
<DataTemplate x:Key="Normal">
<Image Source="{Binding sText}"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
<DataTemplate x:Key="Selected">
<Image Source="{Binding sSelText}"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
</RadioButton.Resources>
<RadioButton.Style>
<Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource OptionPanel_NestingToggleButton}">
<Setter Property="ContentTemplate" Value="{StaticResource Normal}"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="ContentTemplate" Value="{StaticResource Selected}"/>
</Trigger>
</Style.Triggers>
</Style>
</RadioButton.Style>-->
</PrintApp:CheckedImageRadioButton>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
+37 -10
View File
@@ -190,25 +190,52 @@ Public Class ReferenceBtn
Get
Select Case Type
Case References.TL
Return ""
Return "/Resources/ReferencePanel/TL.png" '""
Case References.TR
Return ""
Return "/Resources/ReferencePanel/TR.png" '""
Case References.BL
Return ""
Return "/Resources/ReferencePanel/BL.png" '""
Case References.BR
Return ""
Return "/Resources/ReferencePanel/BR.png" '""
Case References.TC
Return ""
Return "/Resources/ReferencePanel/TC.png" '""
Case References.ML
Return ""
Return "/Resources/ReferencePanel/ML.png" '""
Case References.MR
Return ""
Return "/Resources/ReferencePanel/MR.png" '""
Case References.BC
Return ""
Return "/Resources/ReferencePanel/BC.png" '""
Case References.MC
Return ""
Return "/Resources/ReferencePanel/MC.png" '""
Case Else
Return "X"
Return "" '"X"
End Select
End Get
End Property
Public ReadOnly Property sSelText As String
Get
Select Case Type
Case References.TL
Return "/Resources/ReferencePanel/White_TL.png" '""
Case References.TR
Return "/Resources/ReferencePanel/White_TR.png" '""
Case References.BL
Return "/Resources/ReferencePanel/White_BL.png" '""
Case References.BR
Return "/Resources/ReferencePanel/White_BR.png" '""
Case References.TC
Return "/Resources/ReferencePanel/White_TC.png" '""
Case References.ML
Return "/Resources/ReferencePanel/White_ML.png" '""
Case References.MR
Return "/Resources/ReferencePanel/White_MR.png" '""
Case References.BC
Return "/Resources/ReferencePanel/White_BC.png" '""
Case References.MC
Return "/Resources/ReferencePanel/White_MC.png" '""
Case Else
Return "" '"X"
End Select
End Get
End Property
Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

+37 -58
View File
@@ -238,7 +238,7 @@ Public Class RibPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -260,7 +260,7 @@ Public Class RibPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -284,7 +284,7 @@ Public Class RibPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -312,7 +312,7 @@ Public Class RibPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -336,7 +336,7 @@ Public Class RibPanelVM
Return m_bRotate_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bRotate_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -360,7 +360,7 @@ Public Class RibPanelVM
Return m_bMachParam_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
If Not IsNothing(m_SelRib) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
m_bMachParam_IsChecked = True
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
@@ -542,7 +542,6 @@ Public Class RibPanelVM
Private m_cmdCPlaneObj As ICommand
Private m_cmdDragMove As ICommand
Private m_cmdDragRotate As ICommand
Private m_cmdMachParam As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -740,9 +739,15 @@ Public Class RibPanelVM
' lo seleziono
SelRib = NewEntity
NotifyPropertyChanged(NameOf(SelRib))
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
' verifico se esiste gia' layer estrusione e lo svuoto
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewExtrusionLayerId)
Else
' altrimenti lo creo
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
' seleziono percorso da estrudere
EgtDeselectAll()
@@ -831,7 +836,7 @@ Public Class RibPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.InsertRib()
End Sub
@@ -855,7 +860,7 @@ Public Class RibPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewRibLayerId = GDB_ID.NULL Then nNewRibLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewRibLayerId, LAY_NEWRIB)
@@ -880,7 +885,7 @@ Public Class RibPanelVM
End Property
Public Sub Delete()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If IsNothing(SelRib) Then Return
Dim bOk As Boolean = False
Select Case m_SelRib.Type
@@ -926,7 +931,7 @@ Public Class RibPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub ModifyCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.CURVE)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -951,7 +956,7 @@ Public Class RibPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub AddPointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -980,7 +985,7 @@ Public Class RibPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub RemovePointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -1009,7 +1014,7 @@ Public Class RibPanelVM
''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
''' </summary>
Public Sub Extrude(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.EXTRUSION)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
@@ -1036,7 +1041,7 @@ Public Class RibPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1061,7 +1066,7 @@ Public Class RibPanelVM
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
''' </summary>
Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1086,7 +1091,7 @@ Public Class RibPanelVM
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
''' </summary>
Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1111,7 +1116,7 @@ Public Class RibPanelVM
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
''' </summary>
Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1136,7 +1141,7 @@ Public Class RibPanelVM
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
''' </summary>
Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1161,7 +1166,7 @@ Public Class RibPanelVM
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
''' </summary>
Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1186,7 +1191,7 @@ Public Class RibPanelVM
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1210,7 +1215,7 @@ Public Class RibPanelVM
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -1234,7 +1239,7 @@ Public Class RibPanelVM
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
Public Sub CPlaneRotate(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
Else
@@ -1262,7 +1267,7 @@ Public Class RibPanelVM
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
Public Sub CPlane3P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
End Sub
@@ -1286,7 +1291,7 @@ Public Class RibPanelVM
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
Public Sub CPlanePerpObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
End Sub
@@ -1326,7 +1331,7 @@ Public Class RibPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1336,7 +1341,7 @@ Public Class RibPanelVM
End While
EgtDeselectAll()
m_bCPlaneObj_IsActive = True
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -1353,6 +1358,7 @@ Public Class RibPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -1371,40 +1377,13 @@ Public Class RibPanelVM
End Property
Public Sub DragRotate()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.ROTATE)
End Sub
#End Region ' DragRotate
#Region "MachParam"
Public ReadOnly Property MachParam_Command As ICommand
Get
If m_cmdMachParam Is Nothing Then
m_cmdMachParam = New Command(AddressOf MachParam)
End If
Return m_cmdMachParam
End Get
End Property
Public Sub MachParam()
If IsNothing(Map.refTopPanelVM.SelMachining) Then Return
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
m_bGrid_IsChecked = False
m_bMove_IsChecked = False
m_bRotate_IsChecked = False
NotifyPropertyChanged(NameOf(bAdd_IsChecked))
NotifyPropertyChanged(NameOf(bEdit_IsChecked))
NotifyPropertyChanged(NameOf(bGrid_IsChecked))
NotifyPropertyChanged(NameOf(bMove_IsChecked))
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.RIBPARAM)
End Sub
#End Region ' MachParam
#End Region ' COMMANDS
End Class
+31 -21
View File
@@ -1,35 +1,45 @@
<EgtWPFLib5:EgtCustomWindow x:Class="CopyFromWndV"
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"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Title="{Binding sTitle}" Icon="/Resources/Icarus.ico"
WindowStyle="None" ResizeMode="NoResize" IsClosable="False"
WindowStartupLocation="CenterOwner"
SizeToContent="WidthAndHeight">
<Grid Margin="5">
<EgtWPFLib5:EgtMainWindow x:Class="CopyFromWndV"
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="Copy From"
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"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Select Rib to Copy"
HorizontalAlignment="Center"
Margin="0,0,0,2.5"/>
Margin="20,20,20,2.5"
Style="{StaticResource DialogWindow_TextBlock}"/>
<ComboBox Grid.Row="1"
ItemsSource="{Binding RibList}"
SelectedItem="{Binding SelRib}"
DisplayMemberPath="ghName"
Margin="0,2.5,0,2.5"/>
Width="160"
HorizontalAlignment="Center"
HorizontalContentAlignment="Center"
Margin="2.5,10,2.5,2.5"
Style="{StaticResource RightPanel_ComboBox}"/>
<UniformGrid Grid.Row="2"
Rows="1"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource ToolBar_TextButton}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Style="{StaticResource ToolBar_TextButton}"/>
Margin="0,20,0,0">
<Button Command="{Binding Ok_Command}"
IsDefault="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button IsCancel="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
</EgtWPFLib5:EgtMainWindow>
+19 -9
View File
@@ -114,15 +114,25 @@
<UniformGrid Grid.Row="1"
Rows="1"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Copy From"
Command="{Binding CopyFrom_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Command="{Binding Ok_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding CopyFrom_Command}"
ToolTip="Copy From"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\RibParamPanel\CopyFrom.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
+19 -19
View File
@@ -42,19 +42,19 @@ Public Class RibParamPanelVM
m_Type = Cathegories.RIBS
m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLINK, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nRibId, nPartId)})
m_MachiningParamList = New List(Of MachiningParam)({New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLINK, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nRibId, nPartId, Me)})
NotifyPropertyChanged(NameOf(MachiningParamList))
NotifyPropertyChanged(NameOf(sName))
End Sub
@@ -224,8 +224,8 @@ Public Class RibNumericMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nRibId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nRibId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.RIBSOVERLAP
@@ -420,8 +420,8 @@ Public Class RibComboMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nRibId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nRibId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromRib As Boolean = False
Dim bReadFromPart As Boolean = False
Select Case Type
@@ -525,8 +525,8 @@ Public Class RibCheckMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nRibId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nRibId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.RIBSLINK
+123 -93
View File
@@ -234,32 +234,22 @@ Public Class MySceneHostVM
End Sub
Friend Sub EmitTitle()
' nome file
Dim sTitle As String = MainController.GetCurrFile()
If String.IsNullOrEmpty(sTitle) Then
sTitle = EgtMsg(MSG_TOPCOMMANDBAR + 1) & Map.refMainWindowVM.MainWindowM.nInstance.ToString()
End If
' indicazione di modificato
If MainController.GetModified() Then
sTitle += "*"
End If
' dati del prodotto
sTitle += " - Icarus"
' emissione del titolo
Map.refMainWindowVM.SetTitle(sTitle)
Map.refSecondaryWindowVM.SetTitle()
End Sub
#End Region ' METHODS
#Region "ProjectManager"
Public Overrides Sub NewProject()
Public Overrides Function NewProject() As Boolean
EgtSetCurrentContext(MainScene.GetCtx())
Dim bOk As Boolean = MainController.NewProject()
MainScene.SetStatusNull()
End Sub
Return bOk
End Function
Public Overrides Sub OpenProject(sFilePath As String)
Public Overrides Function OpenProject(sFilePath As String) As Boolean
EgtSetCurrentContext(MainScene.GetCtx())
Dim bOk As Boolean = False
If String.IsNullOrEmpty(sFilePath) Then
@@ -271,39 +261,78 @@ Public Class MySceneHostVM
If Not String.IsNullOrWhiteSpace(sDir) Then
sDir = Path.GetDirectoryName(sDir)
End If
bOk = MainController.OpenProject(sDir)
Else
bOk = MainController.OpenProject(sFilePath, False)
Dim OpenFileDialog As New Windows.Forms.OpenFileDialog With {
.Title = "Open",
.Filter = "Icarus project(*.icrs)|*.icrs" &
"|New geometry EgalTech(*.nge)|*.nge",
.FilterIndex = 1,
.InitialDirectory = sDir
}
If Not OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then Return False
sFilePath = OpenFileDialog.FileName
End If
bOk = MainController.OpenProject(sFilePath, False)
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
' imposto modalita' import
Map.refTopPanelVM.SelPage = Pages.NULL
End Sub
Return bOk
End Function
Public Overrides Sub SaveProject()
Public Overrides Function SaveProject() As Boolean
' Se nome progetto non definito o con estensione non valida lo chiedo
Dim sCurrFile As String = ""
EgtGetCurrFilePath(sCurrFile)
Dim bOk As Boolean = False
If String.IsNullOrWhiteSpace(sCurrFile) Or EgtGetFileType(sCurrFile) <> FT.NGE Then
MyBase.SaveAsProject()
Return
bOk = SaveAsProject()
Else
Dim bDeleteNgeFile As Boolean = Path.GetExtension(sCurrFile) = ".nge"
EgtSetCurrFilePath(Path.ChangeExtension(sCurrFile, "icrs"))
' Salvataggio standard
bOk = MainController.SaveProject()
If bOk AndAlso bDeleteNgeFile AndAlso File.Exists(sCurrFile) Then
Try
File.Delete(sCurrFile)
Catch ex As Exception
EgtOutLog("Delete nge file failed!")
End Try
End If
End If
' Salvataggio standard
MyBase.SaveProject()
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
End Sub
Return bOk
End Function
Public Overrides Sub SaveAsProject()
Public Overrides Function SaveAsProject() As Boolean
m_bIsSaveAs = True
MyBase.SaveAsProject()
Dim sFile As String = ""
EgtGetCurrFilePath(sFile)
Dim bOk As Boolean = False
' Se nome vuoto, assegno "New"
If String.IsNullOrWhiteSpace(sFile) Then sFile = "New.icrs"
' Eventuale sistemazione estensione
sFile = IO.Path.ChangeExtension(sFile, "icrs")
' Assegnazione nome file con dialogo
Dim SaveFileDialog As New Windows.Forms.SaveFileDialog With {
.Title = "Save",
.Filter = "Icarus Project(*.icrs)|*.icrs",
.FileName = sFile,
.InitialDirectory = IO.Path.GetDirectoryName(sFile)
}
If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim sFileName As String = SaveFileDialog.FileName
EgtSetCurrFilePath(sFileName)
' Salvataggio standard
bOk = MainController.SaveProject()
End If
m_bIsSaveAs = False
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
End Sub
Return bOk
End Function
Public Overrides Sub InsertProject()
' eseguo
Public Overrides Function InsertProject() As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -324,7 +353,7 @@ Public Class MySceneHostVM
.FilterIndex = ExtIndex,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
WriteMainPrivateProfileString(S_PRINTING3D, K_IMPORTCURREXTENSION, OpenFileDialog.FilterIndex)
Dim sFile As String = String.Empty
@@ -338,8 +367,12 @@ Public Class MySceneHostVM
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False)
Map.refSliderManagerVM.SetSliderVisibility(False)
' mostro finestra di caricamento
Dim ImportLoadingWnd As ImportLoadingWndV = New ImportLoadingWndV(Application.Current.MainWindow, New ImportLoadingWndVM)
ImportLoadingWnd.Show()
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True)
' la sposto in centro tavola
Dim nNewPartId As Integer = EgtGetLastPart()
@@ -357,10 +390,13 @@ Public Class MySceneHostVM
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True)
Map.refSliderManagerVM.SetSliderVisibility(True)
End If
' chiudo finestra di caricamento
ImportLoadingWnd.Close()
EgtDraw()
End Sub
Return bOk
End Function
Public Sub InsertRib()
Public Function InsertRib() As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -380,12 +416,13 @@ Public Class MySceneHostVM
.FilterIndex = 1,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
' sposto le nuove geometrie nel layer rib del pezzo
Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
@@ -427,9 +464,10 @@ Public Class MySceneHostVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End If
End Sub
Return bOk
End Function
Public Sub InsertPrint(MenuItem As ManagerLayer_MenuItem)
Public Function InsertPrint(MenuItem As ManagerLayer_MenuItem) As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -449,12 +487,13 @@ Public Class MySceneHostVM
.FilterIndex = 1,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
' sposto le nuove geometrie nel layer rib del pezzo
Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
@@ -483,9 +522,10 @@ Public Class MySceneHostVM
EgtErase(nNewPartId)
EgtDraw()
End If
End Sub
Return bOk
End Function
Public Sub InsertShellNumber()
Public Function InsertShellNumber() As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -505,12 +545,13 @@ Public Class MySceneHostVM
.FilterIndex = 1,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
' sposto le nuove geometrie nel layer ShellNumber del pezzo
Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
@@ -552,9 +593,10 @@ Public Class MySceneHostVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End If
End Sub
Return bOk
End Function
Public Sub InsertFilledSolid()
Public Function InsertFilledSolid() As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -574,12 +616,13 @@ Public Class MySceneHostVM
.FilterIndex = 1,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
' sposto le nuove geometrie nel layer ShellNumber del pezzo
Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
@@ -621,21 +664,10 @@ Public Class MySceneHostVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End If
End Sub
Return bOk
End Function
Public Overrides Sub ImportProject()
Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_MRUIMPORT, K_FILE & "1", "", sDir)
If Not String.IsNullOrWhiteSpace(sDir) Then
sDir = Path.GetDirectoryName(sDir)
End If
sDir.TrimEnd("\"c)
MainController.ImportProject(sDir)
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
End Sub
Public Overrides Sub ExportProject()
Public Overrides Function ExportProject() As Boolean
' Reset controller e scena
MainController.ResetStatus()
'Assegnazione nome file con dialogo
@@ -647,18 +679,19 @@ Public Class MySceneHostVM
.FileName = Path.ChangeExtension(MainController.GetCurrFile(), "").TrimEnd("."c)
}
Dim DialogResult As Boolean? = SaveFileDialog.ShowDialog
If IsNothing(DialogResult) OrElse Not DialogResult Then Return
If IsNothing(DialogResult) OrElse Not DialogResult Then Return False
MainController.SetDefaultFilterForExport(EEX_FLT.DEFAULT + EEX_FLT.LEV_TEMP)
MainController.ExportProject(SaveFileDialog.FileName, False)
End Sub
Return MainController.ExportProject(SaveFileDialog.FileName, False)
End Function
Friend Shadows Sub ExecScript(sFilePath As String)
Public Overrides Function ExecScript(sFilePath As String) As Boolean
Dim bOk As Boolean = False
If String.IsNullOrEmpty(sFilePath) Then
Dim sDir As String = String.Empty
'GetMainPrivateProfileString(S_GENERAL, K_LASTLUADIR, "", sDir)
MainController.Exec(sDir)
bOk = MainController.Exec(sDir)
Else
MainController.Exec(sFilePath, False)
bOk = MainController.Exec(sFilePath, False)
End If
Dim bMachiningMode As Boolean = EgtGetCurrMachGroup() <> GDB_ID.NULL
If Not bMachiningMode And EgtGetCurrLayer() = GDB_ID.NULL Then
@@ -667,7 +700,8 @@ Public Class MySceneHostVM
EgtResetCurrPartLayer()
End If
End If
End Sub
Return bOk
End Function
#End Region ' ProjectManager
@@ -961,33 +995,15 @@ Public Class MySceneHostVM
Map.refDispositionPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.REFERENCE
Case ModifyModes.STARTMACH
Map.refStartMachPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.RIBS
Map.refRibPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.SHELLNUMBER
Map.refShellNumberPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.AUXSOLIDS
Map.refFilledSolidPanelVM.OnKeyDown(e.KeyData)
End Select
End If
'' Se in modalità edit L250
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
' ' Con DEL eseguo cancellazione delle entità selezionate
' If e.KeyData = System.Windows.Forms.Keys.Delete Then
' MainController.SetLastInteger(GDB_ID.SEL)
' MainController.ExecuteCommand(Controller.CMD.DELETE)
' ' Con SPAZIO ripeto l'ultimo comando
' ElseIf e.KeyData = System.Windows.Forms.Keys.Space Then
' MainController.RepeatLastCommand()
' ' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
' ElseIf e.KeyData = System.Windows.Forms.Keys.A And MainController.GetContinue() Then
' MainController.ContinueArcPDP()
' ' Con 'L' e in modalità continuazione, forzo il passaggio a retta
' ElseIf e.KeyData = System.Windows.Forms.Keys.L And MainController.GetContinue() Then
' MainController.ContinueLine2P()
' ' Con 'V' cambio lo stato del check
' ElseIf e.KeyData = System.Windows.Forms.Keys.V Then
' Map.refFreeContourInputVM.ChangeInputBoxCheck()
' End If
'End If
End Sub
Private Sub OnCloseGetDist(sender As System.Object)
@@ -1013,6 +1029,7 @@ Public Class MySceneHostVM
Map.refTopPanelVM.PartList.Clear()
Map.refTopPanelVM.SetSelModifyMode(ModifyModes.NULL)
Map.refSliceManagerVM.UpdateTimeAndMass()
Map.refSliceManagerVM.UpdateDimensions()
Map.refSliderManagerVM.RefreshSlider(0, 0)
Map.refSliderManagerVM.SetLayerIndexToMax()
@@ -1119,6 +1136,7 @@ Public Class MySceneHostVM
' aggiorno tempo e massa
Map.refSliceManagerVM.UpdateTimeAndMass()
Map.refSliceManagerVM.UpdateDimensions()
Map.refSliderManagerVM.SetLayerIndexToMax()
@@ -1462,7 +1480,10 @@ Public Class MySceneHostVM
Friend Sub StartMach_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refStartMachPanelVM.bCPlaneObj_IsActive Then
@@ -1543,7 +1564,10 @@ Public Class MySceneHostVM
Friend Sub Rib_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
@@ -1625,7 +1649,10 @@ Public Class MySceneHostVM
Friend Sub ShellNumber_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refShellNumberPanelVM.bCPlaneObj_IsActive Then
@@ -1707,7 +1734,10 @@ Public Class MySceneHostVM
Friend Sub FilledSolid_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then
+23 -23
View File
@@ -1,24 +1,27 @@
<EgtWPFLib5:EgtCustomWindow x:Class="SecondaryWindowV"
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"
xmlns:PrintApp="clr-namespace:Icarus"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
Title="{Binding sTitle}" Icon="/Resources/Icarus.ico"
WindowStyle="None" ResizeMode="NoResize"
ShowInTaskbar="False"
AllowsTransparency="True"
Background="Transparent"
AboutBoxCommand="{Binding AboutBoxCommand}"
CloseCommand="{Binding CloseApplicationCommand,
Mode=OneWay,
UpdateSourceTrigger=PropertyChanged}"
>
<EgtWPFLib5:EgtCustomWindow.TitlePanel>
<EgtWPFLib5:EgtMainWindow x:Class="SecondaryWindowV"
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"
xmlns:PrintApp="clr-namespace:Icarus"
Title="{Binding sTitle}"
ProjectName="{Binding sProjectName}"
ProjectPath="{Binding sProjectPath}"
Icon="/Resources/Icarus.ico"
CloseCommand="{Binding CloseApplicationCommand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
ShowInTaskbar="False"
AllowsTransparency="True"
Background="Transparent"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtMainWindow}}">
<EgtWPFLib5:EgtMainWindow.TitlePanel>
<PrintApp:ProjManagerV DataContext="{StaticResource ProjManagerVM}"/>
</EgtWPFLib5:EgtMainWindow.TitlePanel>
<EgtWPFLib5:EgtMainWindow.HelpPanel>
<PrintApp:HelpPanelV DataContext="{StaticResource HelpPanelVM}"/>
</EgtWPFLib5:EgtMainWindow.HelpPanel>
<EgtWPFLib5:EgtMainWindow.OpacityMask>
<SolidColorBrush Color="White" Opacity="{Binding Window_Opacity}"/>
</EgtWPFLib5:EgtMainWindow.OpacityMask>
</EgtWPFLib5:EgtCustomWindow.TitlePanel>
<!--Pannello principale -->
<DockPanel>
@@ -26,7 +29,4 @@
<PrintApp:ProjectV DataContext="{StaticResource ProjectVM}"/>
</DockPanel>
<!--<PrintApp:SceneHostV/>-->
</EgtWPFLib5:EgtCustomWindow>
</EgtWPFLib5:EgtMainWindow>
@@ -27,15 +27,15 @@ Public Class SecondaryWindowV
AddHandler Me.StateChanged, AddressOf SecondaryWindowV_StateChanged
End Sub
Private Sub SecondaryWindowV_ContentRendered(sender As Object, e As EventArgs)
m_SecondaryWindowVM.ContentRendered()
End Sub
Private Sub SecondaryWindowV_Loaded(sender As Object, e As RoutedEventArgs)
' Carico e imposto posizione finestra
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
End Sub
Private Sub SecondaryWindowV_ContentRendered(sender As Object, e As EventArgs)
m_SecondaryWindowVM.ContentRendered()
End Sub
Private Sub SecondaryWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
e.Cancel = True
+42 -12
View File
@@ -1,5 +1,6 @@
Imports EgtWPFLib5
Imports EgtUILib
Imports System.IO
Imports System.Windows.Threading
Public Class SecondaryWindowVM
@@ -8,16 +9,42 @@ Public Class SecondaryWindowVM
Private m_SplashScreen_Timer As New DispatcherTimer
Private m_WaitAfterRender As Integer = 0
' Titolo
Private m_sTitle As String
Public Property sTitle As String
Private m_Window_Opacity As Double = 0.2
Public ReadOnly Property Window_Opacity As Double
Get
Return m_sTitle
Return m_Window_Opacity
End Get
End Property
' Titolo
Public ReadOnly Property sTitle As String
Get
Return "Icarus"
End Get
End Property
Public ReadOnly Property sProjectName As String
Get
Dim sFilePath As String = ""
EgtGetCurrFilePath(sFilePath)
If String.IsNullOrEmpty(sFilePath) Then
sFilePath = EgtMsg(MSG_TOPCOMMANDBAR + 1) & Map.refMainWindowVM.MainWindowM.nInstance.ToString()
Return sFilePath
Else
Return Path.GetFileNameWithoutExtension(sFilePath) & If(EgtGetModified(), "*", "")
End If
End Get
End Property
Public ReadOnly Property sProjectPath As String
Get
Dim sFilePath As String = ""
EgtGetCurrFilePath(sFilePath)
If String.IsNullOrEmpty(sFilePath) Then
sFilePath = EgtMsg(MSG_TOPCOMMANDBAR + 1) & Map.refMainWindowVM.MainWindowM.nInstance.ToString()
End If
Return sFilePath
End Get
Set(value As String)
m_sTitle = value
NotifyPropertyChanged(NameOf(sTitle))
End Set
End Property
Private m_Visibility As Boolean
@@ -37,11 +64,13 @@ Public Class SecondaryWindowVM
End If
End Sub
Friend Sub SetTitle(sTitle As String)
m_sTitle = sTitle
Friend Sub SetTitle()
NotifyPropertyChanged(NameOf(sTitle))
NotifyPropertyChanged(NameOf(sProjectName))
NotifyPropertyChanged(NameOf(sProjectPath))
End Sub
' definizione comandi
Private m_cmdAboutBox As ICommand
Private m_cmdCloseApplication As ICommand
@@ -84,8 +113,11 @@ Public Class SecondaryWindowVM
Private Sub SplashScreenTimer_Tick()
If m_WaitAfterRender > 1 Then
m_Window_Opacity = 1
NotifyPropertyChanged(NameOf(Window_Opacity))
' chiudo SplashScreen
Map.refSplashScreen.Close()
m_SplashScreen_Timer.Stop()
ElseIf m_WaitAfterRender > 0 Then
m_WaitAfterRender += 1
End If
@@ -106,8 +138,6 @@ Public Class SecondaryWindowVM
Select Case nFileType
Case FT.NGE
Return Map.refProjManagerVM.OpenProject(sFile)
'Case FT.DXF, FT.STL, FT._3MF, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
' Return m_Controller.ImportProject(sFile, False)
End Select
Return False
End Function
+37 -60
View File
@@ -218,7 +218,7 @@ Public Class ShellNumberPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -240,7 +240,7 @@ Public Class ShellNumberPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -264,7 +264,7 @@ Public Class ShellNumberPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -292,7 +292,7 @@ Public Class ShellNumberPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -316,7 +316,7 @@ Public Class ShellNumberPanelVM
Return m_bRotate_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bRotate_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -340,7 +340,7 @@ Public Class ShellNumberPanelVM
Return m_bMachParam_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
If Not IsNothing(m_SelShellNumber) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
m_bMachParam_IsChecked = True
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
@@ -522,7 +522,6 @@ Public Class ShellNumberPanelVM
Private m_cmdCPlaneObj As ICommand
Private m_cmdDragMove As ICommand
Private m_cmdDragRotate As ICommand
Private m_cmdMachParam As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -723,9 +722,15 @@ Public Class ShellNumberPanelVM
' lo seleziono
SelShellNumber = NewEntity
NotifyPropertyChanged(NameOf(SelShellNumber))
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
' verifico se esiste gia' layer estrusione e lo svuoto
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewExtrusionLayerId)
Else
' altrimenti lo creo
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
' seleziono percorso da estrudere
EgtDeselectAll()
@@ -814,7 +819,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.InsertShellNumber()
End Sub
@@ -838,7 +843,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
@@ -863,7 +868,7 @@ Public Class ShellNumberPanelVM
End Property
Public Sub Delete()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If IsNothing(SelShellNumber) Then Return
Dim bOk As Boolean = False
Select Case m_SelShellNumber.Type
@@ -909,7 +914,7 @@ Public Class ShellNumberPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub ModifyCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.CURVE)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -934,7 +939,7 @@ Public Class ShellNumberPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub AddPointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -963,7 +968,7 @@ Public Class ShellNumberPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub RemovePointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -992,7 +997,7 @@ Public Class ShellNumberPanelVM
''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
''' </summary>
Public Sub Extrude(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.EXTRUSION)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
@@ -1020,7 +1025,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1045,7 +1050,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
''' </summary>
Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1070,7 +1075,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
''' </summary>
Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1095,7 +1100,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
''' </summary>
Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1120,7 +1125,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
''' </summary>
Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1145,7 +1150,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
''' </summary>
Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1170,7 +1175,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1194,7 +1199,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -1218,7 +1223,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
Public Sub CPlaneRotate(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
Else
@@ -1246,7 +1251,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
Public Sub CPlane3P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
End Sub
@@ -1270,7 +1275,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
Public Sub CPlanePerpObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
End Sub
@@ -1310,7 +1315,7 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1320,7 +1325,7 @@ Public Class ShellNumberPanelVM
End While
EgtDeselectAll()
m_bCPlaneObj_IsActive = True
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -1337,7 +1342,7 @@ Public Class ShellNumberPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -1356,41 +1361,13 @@ Public Class ShellNumberPanelVM
End Property
Public Sub DragRotate()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.ROTATE)
End Sub
#End Region ' DragRotate
#Region "MachParam"
Public ReadOnly Property MachParam_Command As ICommand
Get
If m_cmdMachParam Is Nothing Then
m_cmdMachParam = New Command(AddressOf MachParam)
End If
Return m_cmdMachParam
End Get
End Property
Public Sub MachParam()
If IsNothing(Map.refTopPanelVM.SelMachining) Then Return
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
m_bGrid_IsChecked = False
m_bMove_IsChecked = False
m_bRotate_IsChecked = False
NotifyPropertyChanged(NameOf(bAdd_IsChecked))
NotifyPropertyChanged(NameOf(bEdit_IsChecked))
NotifyPropertyChanged(NameOf(bGrid_IsChecked))
NotifyPropertyChanged(NameOf(bMove_IsChecked))
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.SHELLNUMBERPARAM)
End Sub
#End Region ' MachParam
#End Region ' COMMANDS
End Class
@@ -41,10 +41,10 @@ Public Class ShellNumberParamPanelVM
m_Type = Cathegories.SHELL_NUMBER
m_sName = "Reduce Shell Number"
m_MachiningParamList = New List(Of MachiningParam)({New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nShellNumberId, nPartId),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nShellNumberId, nPartId),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nShellNumberId, nPartId),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nShellNumberId, nPartId)})
m_MachiningParamList = New List(Of MachiningParam)({New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nShellNumberId, nPartId, Me),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nShellNumberId, nPartId, Me),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nShellNumberId, nPartId, Me),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nShellNumberId, nPartId, Me)})
NotifyPropertyChanged(NameOf(MachiningParamList))
NotifyPropertyChanged(NameOf(sName))
End Sub
@@ -164,8 +164,8 @@ Public Class ShellNumberNumericMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nShellNumberId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nShellNumberId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.SHELLNBRDIFFERENCE
+141 -133
View File
@@ -2,146 +2,154 @@
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"
Width="310"
xmlns:PrintApp="clr-namespace:Icarus"
VerticalAlignment="Center">
<Grid.Resources>
<SolidColorBrush x:Key="SliderThumb.Track.Background" Color="{StaticResource Icarus_Blue_Color}"/>
<SolidColorBrush x:Key="SliderThumb.Track.Border" Color="{StaticResource Icarus_Blue_Color}"/>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Margin="0,0,0,2.5"
Style="{StaticResource Title_Border}">
<TextBlock Text="SIMULATION"
Style="{StaticResource Title_TextBlock}"/>
</Border>
<Border Grid.Row="1"
Margin="0,2.5,0,0"
Style="{StaticResource BottomGrayRow_Border}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<PrintApp:MachineViewPanelV DataContext="{StaticResource MachineViewPanelVM}"
Margin="0,0,5,0"/>
<Grid Grid.Column="1"
Width="310">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Margin="0,0,0,2.5"
Style="{StaticResource Title_Border}">
<TextBlock Text="SIMULATION"
Style="{StaticResource Title_TextBlock}"/>
</Border>
<Border Grid.Row="1"
Margin="0,2.5,0,0"
Style="{StaticResource BottomGrayRow_Border}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel DataContext="{Binding MySimul}"
Margin="2.5">
<UniformGrid Columns="3"
Margin="0,2.5,0,2.5">
<Button Grid.Column="0"
Grid.Row="3"
Command="{Binding StepCommand}"
ToolTip="{Binding OneStepToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="/Resources/SimulationPanel/PlayStep.png"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<Button Grid.Column="1"
Grid.Row="3"
Command="{Binding PlayPauseCommand}"
ToolTip="{Binding PlayPauseToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="{Binding PlayPauseImage}"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<Button Grid.Column="2" Grid.Row="3"
Command="{Binding StopCommand}"
ToolTip="{Binding StopHomeToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="/Resources/SimulationPanel/Stop.png"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<StackPanel DataContext="{Binding MySimul}"
Margin="2.5">
<UniformGrid Columns="3"
Margin="0,2.5,0,2.5">
<Button Grid.Column="0"
Grid.Row="3"
Command="{Binding StepCommand}"
ToolTip="{Binding OneStepToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="/Resources/SimulationPanel/PlayStep.png"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<Button Grid.Column="1"
Grid.Row="3"
Command="{Binding PlayPauseCommand}"
ToolTip="{Binding PlayPauseToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="{Binding PlayPauseImage}"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<Button Grid.Column="2" Grid.Row="3"
Command="{Binding StopCommand}"
ToolTip="{Binding StopHomeToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="/Resources/SimulationPanel/Stop.png"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
</UniformGrid>
<TextBlock Text="{Binding StatusMsg}"
TextAlignment="Center"
Margin="2.5"
Style="{StaticResource Simulation_TextBlock}"/>
<Slider Name="SpeedSlider"
Foreground="{StaticResource Icarus_Gray}"
Value="{Binding SliderValue}"
Minimum="1"
Maximum="100"
TickPlacement="TopLeft"
TickFrequency="5"
Margin="2.5"
Style="{StaticResource LayerIndex_Slider}"/>
<Grid Margin="2.5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding TName}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Column="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding SValue}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Row="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding GCode}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Column="1"
Grid.Row="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding FValue}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
</Grid>
<ItemsControl ItemsSource="{Binding MachineAxisList}"
</UniformGrid>
<TextBlock Text="{Binding StatusMsg}"
TextAlignment="Center"
Margin="2.5"
BorderThickness="0"
Padding="0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Style="{StaticResource SimulPanel_KeyValue_Border}"
Margin="0,1,0,1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Token}"
Style="{StaticResource Simulation_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
BorderThickness="0"
Text="{Binding Value, UpdateSourceTrigger=Explicit}"
IsReadOnly="{Binding IsReadOnlyAxesValue}"
IsEnabled="{Binding IsEnabledAxesValue}"
Style="{StaticResource SimulationPanel_Axes_TextBox}">
</EgtWPFLib5:EgtTextBox>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
<Button Grid.Row="3"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
</Grid>
</Border>
Style="{StaticResource Simulation_TextBlock}"/>
<Slider Name="SpeedSlider"
Foreground="{StaticResource Icarus_Gray}"
Value="{Binding SliderValue}"
Minimum="1"
Maximum="100"
TickPlacement="TopLeft"
TickFrequency="5"
Margin="2.5"
Style="{StaticResource LayerIndex_Slider}"/>
<Grid Margin="2.5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding TName}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Column="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding SValue}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Row="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding GCode}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Column="1"
Grid.Row="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding FValue}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
</Grid>
<ItemsControl ItemsSource="{Binding MachineAxisList}"
Margin="2.5"
BorderThickness="0"
Padding="0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Style="{StaticResource SimulPanel_KeyValue_Border}"
Margin="0,1,0,1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Token}"
Style="{StaticResource Simulation_TextBlock}"/>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1"
BorderThickness="0"
Text="{Binding Value, UpdateSourceTrigger=Explicit}"
IsReadOnly="{Binding IsReadOnlyAxesValue}"
IsEnabled="{Binding IsEnabledAxesValue}"
Style="{StaticResource SimulationPanel_Axes_TextBox}">
</EgtWPFLib5:EgtTextBox2>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
<Button Grid.Row="3"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
</Grid>
</Border>
</Grid>
</Grid>
+5 -4
View File
@@ -52,6 +52,10 @@ Public Class SimulationPanelVM
' Creo riferimento a questa classe in OmagOFFICEMap
Map.SetRefSimulationPanelVM(Me)
MySimul = New MySimulation
' leggo vista macchina da ini e la imposto
Dim DefaultMachViewMode As Integer = GetMainPrivateProfileInt(S_SIMUL, K_MACHVIEWMODE, 3)
MySimul.SetMachLook(DefaultMachViewMode)
Map.refMachineViewPanelVM.RefreshSelViewSlider()
End Sub
#End Region ' CONSTRUCTOR
@@ -76,7 +80,6 @@ Public Class SimulationPanelVM
'Cambio la vista della scena
EgtGetGenericView(m_dPrevAngVertDegView, m_dPrevAngHorizDegView)
EgtSetView(VT.ISO_SW, False)
MySimul.SetMachLook(MCH_LOOK.ALL)
EgtSetMachineLook(MySimul.GetMachLook())
' Nascondo griglia
EgtSetGridShow(False, False)
@@ -111,6 +114,7 @@ Public Class SimulationPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False)
EgtDraw()
End Sub
Private Function LoadCurrTools() As Boolean
@@ -138,9 +142,6 @@ Public Class SimulationPanelVM
Map.refMyStatusBarVM.ClearOutputMessage()
' Mi assicuro di terminare la simulazione
MySimul.ResetSimulation()
' Ripristino visibilità standard
MySimul.SetMachLook(MCH_LOOK.TAB)
EgtSetMachineLook(MySimul.GetMachLook())
'' Nascondo tutte le lavorazioni
'CamAuto.HideAllMachinings()
' Abilito impostazione modificato
+59 -17
View File
@@ -15,21 +15,63 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding ghTime}"
Visibility="{Binding Time_Visibility}"
FontSize="35"
Style="{StaticResource SliceManager_TextBlock}"/>
<TextBlock Grid.Row="1"
Text="{Binding ghDimensions}"
FontSize="18"
Margin="0,0,0,5"
Style="{StaticResource SliceManager_TextBlock}"/>
<TextBlock Grid.Row="2"
Text="{Binding ghMass}"
Visibility="{Binding Mass_Visibility}"
FontSize="18"
Margin="0,0,0,5"
Style="{StaticResource SliceManager_TextBlock}"/>
<Grid HorizontalAlignment="Center"
Visibility="{Binding Time_Visibility}"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="\Resources\SliceManager\Time.png"
Height="25"
Width="25"
Margin="0,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding ghTime}"
FontSize="35"
Style="{StaticResource SliceManager_TextBlock}"/>
</Grid>
<Grid Grid.Row="1"
HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="\Resources\SliceManager\Dimensions.png"
Visibility="{Binding ghDimensions, Converter={StaticResource StringToVisibilityConverter}}"
Height="25"
Width="25"
Margin="0,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding ghDimensions}"
FontSize="18"
HorizontalAlignment="Left"
Margin="2.5,0,0,0"
Style="{StaticResource SliceManager_TextBlock}"/>
</Grid>
<Grid Grid.Row="2"
HorizontalAlignment="Center"
Visibility="{Binding Mass_Visibility}"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="\Resources\SliceManager\Mass.png"
Height="25"
Width="25"
Margin="0,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding ghMass}"
FontSize="18"
HorizontalAlignment="Left"
Margin="2.5,0,0,0"
Style="{StaticResource SliceManager_TextBlock}"/>
</Grid>
<TextBlock Grid.Row="3"
Text="{Binding sLoadingText}"
Visibility="{Binding Loading_Visibility}"
@@ -76,12 +118,12 @@
Visibility="{Binding ModifyMode_Visibility}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SliceMannager_Button}"/>
<Button Content="Update"
<!--<Button Content="Update"
Command="{Binding Update_Command}"
IsEnabled="{Binding Buttons_IsEnabled}"
Visibility="{Binding SliceMode_Visibility}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SliceMannager_Button}"/>
Style="{StaticResource SliceMannager_Button}"/>-->
<Button Content="Generate"
Command="{Binding Generate_Command}"
IsEnabled="{Binding Buttons_IsEnabled}"
+21 -12
View File
@@ -36,6 +36,11 @@ Public Class SliceManagerVM
Private m_bStopScriptToManage As Boolean = False
Private m_bSlice As Boolean = False
Friend ReadOnly Property bSlice As Boolean
Get
Return m_bSlice
End Get
End Property
Private m_bCalcTFS As Boolean = False
Private m_bGenerate As Boolean = False
Private m_bCalcSolid As Boolean = False
@@ -118,7 +123,7 @@ Public Class SliceManagerVM
Public ReadOnly Property ghTime As String
Get
Dim dtTime As TimeSpan = TimeSpan.FromSeconds(m_dTime)
Return Math.Floor(dtTime.TotalHours) & ":" & (Math.Floor(dtTime.Minutes)).ToString("00") & ":" & (Math.Ceiling(dtTime.Seconds)).ToString("00")
Return Math.Floor(dtTime.TotalHours) & "h " & (Math.Floor(dtTime.Minutes)).ToString("00") & "m" '& (Math.Ceiling(dtTime.Seconds)).ToString("00")
End Get
End Property
@@ -133,7 +138,7 @@ Public Class SliceManagerVM
Get
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
Return "[ " & DoubleToString(b3Print.DimX, 1) & " x " & DoubleToString(b3Print.DimY, 1) & " x " & DoubleToString(b3Print.DimZ, 1) & " ]"
Return DoubleToString(b3Print.DimX, 1) & " x " & DoubleToString(b3Print.DimY, 1) & " x " & DoubleToString(b3Print.DimZ, 1) & " mm"
End If
Return ""
End Get
@@ -194,8 +199,6 @@ Public Class SliceManagerVM
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefSliceManagerVM(Me)
' Installo funzione gestione eventi per lua
EgtSetProcessEvents(m_ProcEventsCallback)
UpdateState(False)
End Sub
@@ -230,7 +233,7 @@ Public Class SliceManagerVM
NotifyPropertyChanged(NameOf(Mass_Visibility))
End Sub
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
Friend Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
' Se previsto, imposto progress
If nProg >= 0 Then
Dim dPartialProgress As Integer = 0
@@ -433,9 +436,6 @@ Public Class SliceManagerVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
SetButtonsIsEnabled(True)
m_bSlice = False
m_bCalcTFS = False
m_bGenerate = False
Return bOk
End Function
@@ -543,8 +543,12 @@ Public Class SliceManagerVM
m_bCalculating = False
Return
End If
'' esco da altre pagine
'Dim PreviousPage As Pages = Map.refTopPanelVM.SelPage
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
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)
m_bCalculating = False
Return
End If
' eseguo calcoli
CalcSlice(False)
' se non ho interrotto calcoli
@@ -554,11 +558,16 @@ Public Class SliceManagerVM
Map.refSliderManagerVM.SetLayerIndexToMax()
NotifyPropertyChanged(NameOf(Time_Visibility))
NotifyPropertyChanged(NameOf(Mass_Visibility))
'Else
' Map.refTopPanelVM.SelPage = PreviousPage
' se ricalcolato slice attivo vista SliceToolpath e modo TillSelected
If m_bSlice Then
Map.refSliderManagerVM.SetSelViewSlider(SliderManagerVM.ViewSliderType.UNTIL_SELECTED)
End If
Else
m_bStopScriptToManage = False
End If
m_bSlice = False
m_bCalcTFS = False
m_bGenerate = False
m_bCalculating = False
End Sub
+3 -2
View File
@@ -368,7 +368,7 @@ Public Class SliderManagerVM
End Set
End Property
Friend Sub SetSelViewSlider(value As ViewSliderType)
m_nSelViewSlider = value
ghSelViewSlider = value - 1
NotifyPropertyChanged(NameOf(ghSelViewSlider))
End Sub
@@ -381,7 +381,8 @@ Public Class SliderManagerVM
Map.SetRefSliderManagerVM(Me)
' leggo valore default ViewSlider
Dim nViewSlider As Integer = GetMainPrivateProfileInt(S_PRINTING3D, K_VIEWSLIDER, 1)
SetSelViewSlider(nViewSlider)
m_nSelViewSlider = nViewSlider
NotifyPropertyChanged(NameOf(ghSelViewSlider))
End Sub
#End Region ' CONSTRUCTOR
+10 -23
View File
@@ -10,32 +10,19 @@
Height="600"
Width="1000">
<Grid>
<Image Source="/Resources/SplashScreen/GoldSplashscreen.png"
<Image Source="/Resources/SplashScreen/BlueSplashscreen.png"
Stretch="UniformToFill"/>
<TextBlock Text="ICARUS"
Foreground="#b9984c"
FontSize="47"
FontFamily="/Resources/Fonts/#Roboto"
FontWeight="Light"
Margin="463,125,0,0"/>
<TextBlock x:Name="VersionTxBl"
FontSize="14"
FontFamily="/Resources/Fonts/#Roboto"
Margin="500,175,0,0"/>
<Grid Height="180"
Width="92"
VerticalAlignment="Bottom"
Margin="620,0,0,0">
<Image Source="/Resources/SplashScreen/LogoEgalware.png"
Height="180"
Width="92"
Stretch="UniformToFill"/>
<TextBlock Text="2022-2023"
FontSize="12"
FontFamily="/Resources/Fonts/#Roboto"
HorizontalAlignment="Center"
Margin="0,140,0,0"/>
</Grid>
Foreground="White"
HorizontalAlignment="Center"
Margin="591,140,0,0"/>
<!--<TextBlock Text="2022-2023"
FontSize="6"
FontFamily="/Resources/Fonts/#Roboto"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Margin="0,0,254,60"/>-->
</Grid>
</Window>
+21 -20
View File
@@ -199,7 +199,7 @@ Public Class StartMachPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Map.refSceneHostVM.MainController.GetStep = 0 Then
If Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -221,7 +221,7 @@ Public Class StartMachPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -243,7 +243,7 @@ Public Class StartMachPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Map.refSceneHostVM.MainController.GetStep = 0 Then
If Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -271,7 +271,7 @@ Public Class StartMachPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -587,7 +587,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Point(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId)
@@ -620,7 +620,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId)
@@ -653,7 +653,7 @@ Public Class StartMachPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub ModifyCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand()
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -678,7 +678,7 @@ Public Class StartMachPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub AddPointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand()
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -707,7 +707,7 @@ Public Class StartMachPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub RemovePointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
InitCommand()
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -737,7 +737,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -762,7 +762,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
''' </summary>
Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -787,7 +787,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
''' </summary>
Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -812,7 +812,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
''' </summary>
Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -837,7 +837,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
''' </summary>
Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -862,7 +862,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
''' </summary>
Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -887,7 +887,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -911,7 +911,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -951,7 +951,7 @@ Public Class StartMachPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -961,7 +961,7 @@ Public Class StartMachPanelVM
End While
EgtDeselectAll()
m_bCPlaneObj_IsActive = True
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -978,6 +978,7 @@ Public Class StartMachPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand()
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -996,7 +997,7 @@ Public Class StartMachPanelVM
End Property
Public Sub Delete()
If IsNothing(SelStart) Then Return
If IsNothing(SelStart) OrElse Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If EgtErase(m_SelStart.nId) Then
Dim nSelStartIndex As Integer = m_StartList.IndexOf(SelStart)
m_StartList.Remove(SelStart)
+1 -4
View File
@@ -8,7 +8,6 @@ Public Class MyStatusBarVM
Inherits EgtWPFLib5.StatusBarVM
' Funzioni di callback per output in interfaccia da LUA
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
Private m_bStopProgress As Boolean
@@ -115,8 +114,6 @@ Public Class MyStatusBarVM
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefMyStatusBarVM(Me)
' Installo funzione gestione eventi per lua
EgtSetProcessEvents(m_ProcEventsCallback)
' Installo funzione output testo su status per lua
EgtSetOutText(m_OutTextCallback)
' imposto stato di visualizzazione della griglia
@@ -163,7 +160,7 @@ Public Class MyStatusBarVM
Return True
End Function
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
Friend Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
' Se previsto, imposto progress
If nProg > 0 Then SetLoadingProgress(Math.Min(nProg, 100))
' Costringo ad aggiornare
+1
View File
@@ -42,6 +42,7 @@
IsChecked="{Binding bGridVisibility}"
ImageSource="/Resources/StatusBar/GridVisibility.png"
CheckedImageSource="/Resources/StatusBar/GridVisibilityWhite.png"
ToolTip="Grid Visibility"
Margin="0,2.5,0,0"
Style="{StaticResource StatusBar_ToggleButton}"/>
</Grid>
+13
View File
@@ -0,0 +1,13 @@
<Grid x:Class="ColumnHeader"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"
Style="{StaticResource BaseTextBlock}"/>
<TextBlock Grid.Row="1"
Text="{Binding MeasureUnit, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"
Style="{StaticResource MeasureUnit_TextBlock}"/>
</Grid>
+25
View File
@@ -0,0 +1,25 @@
Public Class ColumnHeader
Public Shared ReadOnly HeaderProperty As DependencyProperty = DependencyProperty.Register("Header", GetType(String), GetType(ColumnHeader), New FrameworkPropertyMetadata(""))
Public Property Header As String
Get
Return CStr(MyBase.GetValue(HeaderProperty))
End Get
Set(value As String)
MyBase.SetValue(HeaderProperty, value)
End Set
End Property
Public Shared ReadOnly MeasureUnitProperty As DependencyProperty = DependencyProperty.Register("MeasureUnit", GetType(String), GetType(ColumnHeader), New FrameworkPropertyMetadata(""))
Public Property MeasureUnit As String
Get
Return CStr(MyBase.GetValue(MeasureUnitProperty))
End Get
Set(value As String)
MyBase.SetValue(MeasureUnitProperty, value)
End Set
End Property
End Class
+161 -41
View File
@@ -29,13 +29,13 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.ColumnSpan="2"
Orientation="Horizontal"
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
Margin="0,2.5,0,2.5">
<TextBlock Text="Modify"
@@ -45,7 +45,7 @@
<ComboBox ItemsSource="{Binding MediaTypeList}"
SelectedIndex="{Binding ghSelMediaType}"
Margin="2.5,0,0,0"
Width="160"
Width="150"
Style="{StaticResource RightPanel_ComboBox}"/>
</StackPanel>
<StackPanel Grid.Row="1"
@@ -77,12 +77,20 @@
Style="{StaticResource RightPanel_Button}"/>
</StackPanel>
<Button Grid.Column="1"
Grid.RowSpan="2"
Content="Update"
Command="{Binding Update_Command}"
Height="45"
Width="45"
Margin="0,2.5,2.5,2.5"
Style="{StaticResource RightPanel_Button}"/>
<Button Grid.Column="2"
Grid.RowSpan="2"
Content="Reset"
Command="{Binding Reset_Command}"
Height="45"
Width="45"
Margin="0,2.5,5,2.5"
Margin="2.5,2.5,5,2.5"
Style="{StaticResource RightPanel_Button}"/>
</Grid>
<ContentControl.Style>
@@ -106,7 +114,7 @@
<ComboBox ItemsSource="{Binding MediaTypeList}"
SelectedIndex="{Binding ghSelMediaType}"
Margin="2.5,0,2.5,0"
Width="160"
Width="150"
Style="{StaticResource RightPanel_ComboBox}"/>
</StackPanel>
<StackPanel Grid.Column="1"
@@ -136,12 +144,22 @@
Margin="2.5,0,0,0"
Style="{StaticResource RightPanel_Button}"/>
</StackPanel>
<Button Grid.Column="1"
Content="Reset"
Command="{Binding Reset_Command}"
HorizontalAlignment="Right"
Margin="0,0,5,0"
Style="{StaticResource RightPanel_Button}"/>
<StackPanel Grid.Column="1"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Grid.Column="1"
Content="Update"
Command="{Binding Update_Command}"
HorizontalAlignment="Right"
Margin="0,0,5,0"
Style="{StaticResource RightPanel_Button}"/>
<Button Grid.Column="1"
Content="Reset"
Command="{Binding Reset_Command}"
HorizontalAlignment="Right"
Margin="0,0,5,0"
Style="{StaticResource RightPanel_Button}"/>
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
@@ -158,69 +176,150 @@
SelectionMode="Extended"
HorizontalGridLinesBrush="White"
VerticalGridLinesBrush="White"
ColumnHeaderHeight="40"
Margin="0,2.5,0,2.5">
<DataGrid.Columns>
<DataGridTextColumn Header="Index"
<DataGridTextColumn Header="Layer"
Binding="{Binding nIndex}"
IsReadOnly="True"
Width="Auto"/>
Width="Auto">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.Layer_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Index_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="Length"
Binding="{Binding sLength}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="2*"
TextBlock.TextAlignment="Center"/>
Width="1.5*"
TextBlock.TextAlignment="Center">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.Length_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Millimeters_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TMin"
Binding="{Binding sTMin}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TTrg"
Binding="{Binding sTTrg}"
IsReadOnly="True"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TTrg_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TMax"
Binding="{Binding sTMax}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TMax_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TCurr"
Binding="{Binding sTCurr}"
IsReadOnly="True"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TCurr_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TWait"
Binding="{Binding sTWait}"
Visibility="{Binding DataContext.ColWait_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TWait_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="FMin"
Binding="{Binding sFMin}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FTrg"
Binding="{Binding sFTrg}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sFTrg}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FMax"
Binding="{Binding sFMax}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FTrg_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sFMax}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FCurr"
Binding="{Binding sFCurr}"
Width="1*"/>
<DataGridTextColumn Header="Speed"
Binding="{Binding sSpeed}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FMax_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sFCurr}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FCurr_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sSpeed}"
IsReadOnly="True"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.Speed_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Rpm_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
</DataGrid.Columns>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
@@ -243,16 +342,37 @@
SelectedIndex="{Binding nSelFilter}"
Width="125"
Margin="2.5,0,2.5,0"
ToolTip="Filter"
Style="{StaticResource RightPanel_ComboBox}"/>
<Button DockPanel.Dock="Right"
Command="{Binding Extend_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/TFSEditor/Expand.png"
Style="{StaticResource Button_Image}"/>
</Button>
<ToggleButton DockPanel.Dock="Right"
IsChecked="{Binding bColExtend}"
Margin="2.5,0,2.5,0">
<ToggleButton.Resources>
<DataTemplate x:Key="Expand">
<Image Source="/Resources/TFSEditor/Expand.png"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
<DataTemplate x:Key="Reduce">
<Image Source="/Resources/TFSEditor/Reduce.png"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
</ToggleButton.Resources>
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource ToolBar_ToggleButton}">
<Setter Property="ContentTemplate" Value="{StaticResource Expand}"/>
<Setter Property="ToolTip" Value="Expand"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="ContentTemplate" Value="{StaticResource Reduce}"/>
<Setter Property="ToolTip" Value="Reduce"/>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
<Grid VerticalAlignment="Center"
HorizontalAlignment="Center">
HorizontalAlignment="Left"
Margin="2.5,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>

Some files were not shown because too many files have changed in this diff Show More