Compare commits

...

32 Commits

Author SHA1 Message Date
Demetrio Cassarino 0a7f872912 -aggiunto focus quando viene mostrata la textbox per inserire la info 2025-11-24 10:13:20 +01:00
Dario Sassi 84b2edd17a EgtCAM5 :
- piccola modifica in simulazione per gestire Flag=12 quasi come 11 (pausa richiesta da sotto).
2025-11-17 14:46:28 +01:00
Dario Sassi 7a8c883259 Merge commit '4f06a19553216a32731114b29b8f7ea5e61d9b22' 2025-11-10 12:15:01 +01:00
Demetrio Cassarino 4f06a19553 -aggiunto controllo su textbox e combobox su stessa info 2025-11-10 12:14:14 +01:00
Dario Sassi 3a7152066b Merge commit '2ce61cd5abfa06958f356ccea4ffad624acd7b8c' 2025-11-10 11:53:54 +01:00
Demetrio Cassarino 2ce61cd5ab -inserito controllo su terminazione stringa 2025-11-10 11:50:33 +01:00
Demetrio Cassarino 50ad698187 -implementato a capo quando viene inserito un testo oltre al valore della combobox 2025-11-10 11:46:04 +01:00
Dario Sassi 85591b39a7 Merge commit '18be9679c5562c309852bfeac06670dea4dfec66' 2025-11-10 11:22:14 +01:00
Demetrio Cassarino 18be9679c5 -sistemata gestione combobox info
-camboata visualizzazione info combobox
2025-11-10 10:26:28 +01:00
Demetrio Cassarino 2c9061619a Merge commit '575bcc02d0c676f3cb82f6b4f7694e03a59f7ac2' into features/AddGetAllInfo 2025-11-10 08:06:52 +01:00
Dario Sassi 575bcc02d0 EgtCAM5 :
- gestione metacomando da Info in PrepareInputBox.
2025-11-09 22:56:01 +01:00
Dario Sassi e965ceb26c EgtCAM5 :
- aggiunto controllo su vettore Info già presenti introdotto in precedente modifica.
2025-11-08 12:17:31 +01:00
Dario Sassi 0c18c822f1 Merge commit 'e6d85c573af905010347a23c874351c984d03529' 2025-11-07 17:01:36 +01:00
Demetrio Cassarino e6d85c573a -aggiornamento versione 2025-11-07 14:34:03 +01:00
Demetrio Cassarino 592e7161ce EgtCAM5 2.7k2
-aggiunto in inputexpander possibilità di visualizzare tutte le info presenti una combobox
2025-11-07 14:29:27 +01:00
Dario Sassi 08c4d9c7b9 EgtCAM5 :
- nell'ordine del TopTray il gruppo di bottoni Special è stato portato alla fine.
2025-11-02 11:10:41 +01:00
Dario Sassi 4ae5efb94b EgtCAM5 2.7k1 :
- possibilità di comandi speciali con indice non consecutivo (1-99 standard, 101-199 avanzati solo per utenti interni).
2025-10-31 15:32:00 +01:00
Dario Sassi 69261c7c73 EgtCAM5 2.7j2 :
- ricompilazione con cambio versione.
2025-10-31 09:19:58 +01:00
Dario Sassi 361dc20f9b EgtCAM5 :
- tolto import inutile.
2025-10-27 17:24:55 +01:00
Dario Sassi 95d1e4b5ac EgtCAM5 :
- in disposizione possibilità di modificare altezza sottopezzo (parametro Z di movimento grezzo).
2025-10-27 17:15:49 +01:00
Dario Sassi 621a31931c EgtCAM5 :
- piccole migliorie in dialogo disposizione.
2025-10-26 19:26:00 +01:00
Dario Sassi 4f7dd6ef17 EgtCAM5 :
- in ProcessEvents quando nPause vale -1 si forza un ridisegno.
2025-10-13 08:51:05 +02:00
Dario Sassi 722e0c243d EgtCAM5 2.7j1 :
- ricompilazione con cambio versione.
2025-10-11 12:41:47 +02:00
Dario Sassi 921e681759 EgtCAM5 :
- correzione gestione LinkType per sgrossature con lama.
2025-09-30 08:30:21 +02:00
Dario Sassi d065c0beeb EgtCAM5 2.7i2 :
- se macchina di tipo Stone ora possibile modifica in configurazione di parametri per archi con lama.
2025-09-29 10:54:12 +02:00
Dario Sassi f8ea19537a EgtCAM5 :
- gestione opzioni visualizzazione Zmap da interfaccia (solo per utenti interni ovvero UserLevel > 5).
2025-09-19 18:54:45 +02:00
Daniele Bariletti 289a6b1608 EgtCAM5 :
- aggiunta modalità bonus per analizza su una trimesh: visualizzazione del triangolo selezionato e del suo id.
2025-09-17 11:26:12 +02:00
Dario Sassi f6baeb6afc EgtCAM5 2.7i1 :
- piccola semplificazione per cambio font di default.
2025-09-11 15:24:19 +02:00
Dario Sassi 9fa231f68a EgtCAM5 :
- corretta impostazione all'avvio dello spessore delle linee.
2025-08-28 09:56:21 +02:00
Dario Sassi bba92a4980 EgtCAM5 :
- modifiche per impostazione qualità di visualizzazione superfici (con eliminazione SmoothTriMesh/ShowTriaAdv).
2025-08-24 19:18:58 +02:00
Dario Sassi cfaf513a91 EgtCAM5 2.7h1 :
- ricompilazione con cambio versione.
2025-08-01 09:56:27 +02:00
Dario Sassi 8d33111af2 Merge commit 'fd565e96cc9495985b0cb8fe57700b6f924c18da' 2025-08-01 08:32:05 +02:00
26 changed files with 561 additions and 342 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ Module ConstIni
Public Const K_SELSURF As String = "SelSurf"
Public Const K_SHOWMODE As String = "ShowMode"
Public Const K_CURVEDIR As String = "CurveDir"
Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
Public Const K_SHOWSURFQUALITY As String = "ShowSurfQuality"
Public Const K_SHOWZMAP As String = "ShowZmap"
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
Public Const K_ZOOMWIN As String = "ZoomWin"
@@ -190,7 +190,7 @@ Module ConstIni
Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing"
Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling"
Public Const K_SELGEOMPROBING As String = "SelGeomProbing"
Public Const K_SELVMILLQUALITY As String = "VMillQuality"
Public Const K_VMILLQUALITY As String = "VMillQuality"
Public Const K_MACHININGGROUP As String = "MachiningGroup"
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
+9
View File
@@ -1,5 +1,8 @@
Module ConstMachIni
Public Const S_MCH_GENERAL As String = "General"
Public Const K_MATERIAL As String = "Material"
Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const K_EXTENSION As String = "Extension"
@@ -67,4 +70,10 @@
Public Const S_ESTIMATIONS As String = "Estimations"
Public Const K_EST_ENABLE As String = "Enable"
' Tipi di materiali previsti attualmente per le macchine
Public Const MCH_MAT_STONE As String = "Stone"
Public Const MCH_MAT_WOOD As String = "Wood"
Public Const MCH_MAT_BEAM As String = "Beam"
Public Const MCH_MAT_ADDITIVE As String = "Additive"
End Module
+6 -6
View File
@@ -311,19 +311,19 @@ Public Class MyMachGroupPanelVM
End Sub
Private Sub LoadMaterialType()
Dim sMatType As String = "Wood"
Dim sMatType As String = MCH_MAT_WOOD
' IniFile.m_sMachineName = Map.refStatusBarVM.SelectedMachine.Name
' IniFile.m_sCurrMachIniFilePath = Map.refStatusBarVM.SelectedMachine.MachineDirPath & "\" & Map.refStatusBarVM.SelectedMachine.Name & ".ini"
Dim sMachineIniPath = IniFile.m_sCurrMachIniFilePath
EgtUILib.GetPrivateProfileString(S_GENERAL, EgtWPFLib5.EstConstMachIni.K_MATERIAL, sMatType, sMatType, sMachineIniPath)
EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, sMatType, sMatType, sMachineIniPath)
Select Case sMatType
Case "Stone"
Case MCH_MAT_STONE
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE
Case "Wood"
Case MCH_MAT_WOOD
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
Case "Beam"
Case MCH_MAT_BEAM
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.BEAM
Case "Additive"
Case MCH_MAT_ADDITIVE
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
Case Else
' Se il materiale specificato nel file INI della macchina non corrisponde ai 4 sopracitati viene emesso un messaggio di errore
+18 -6
View File
@@ -16,10 +16,8 @@
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="40*"/>
<ColumnDefinition Width="20*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -28,6 +26,8 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="2" Margin="0,0,0,5">
@@ -57,12 +57,24 @@
</ComboBox>
</UniformGrid>
<UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5">
<UniformGrid Grid.Row="4" Columns="2" Margin="0,0,0,5"
Visibility="{Binding StoneVisibility}">
<TextBlock Text="{Binding ExtSawArcMinRadMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ExtSawArcMinRad}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="5" Columns="2" Margin="0,0,0,5"
Visibility="{Binding StoneVisibility}">
<TextBlock Text="{Binding IntSawArcMaxSideAngMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding IntSawArcMaxSideAng}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="6" Columns="2" Margin="0,0,0,5">
<TextBlock Text="{Binding ApproxLinTolMsg}" VerticalAlignment="Center"/>
<TextBox Text="{Binding ApproxLinTol}" Height="25" Margin="10,0,0,0"/>
</UniformGrid>
<UniformGrid Grid.Row="5" Columns="2">
<UniformGrid Grid.Row="7" Columns="2">
<TextBlock Text="{Binding DefaultSetUpMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding ArchivedSetUpList}" Height="25" Margin="10,0,0,0"
SelectedItem="{Binding SelectedDefaultSetUp}" IsEnabled="{Binding IsActiveDefaultSetUp}"/>
+83 -20
View File
@@ -1,5 +1,6 @@
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib5
Public Class MachOptionVM
@@ -48,21 +49,6 @@ Public Class MachOptionVM
End Set
End Property
Private m_sApproxLinTol As String
Public Property ApproxLinTol As String
Get
Return m_sApproxLinTol
End Get
Set(value As String)
Dim dApproxLinTol As Double = 0
If StringToLen(value, dApproxLinTol) Then
EgtMdbSetGeneralParam(MCH_GP.APPROXLINTOL, dApproxLinTol)
EgtMdbSave()
m_sApproxLinTol = value
End If
End Set
End Property
Private m_SplitArcsList As New List(Of MCH_SA)({MCH_SA.NEVER, MCH_SA.GEN_PLANE, MCH_SA.NO_XY_PLANE, MCH_SA.ALWAYS})
Public ReadOnly Property SplitArcsList As List(Of MCH_SA)
Get
@@ -82,6 +68,51 @@ Public Class MachOptionVM
End Set
End Property
Private m_sExtSawArcMinRad As String
Public Property ExtSawArcMinRad As String
Get
Return m_sExtSawArcMinRad
End Get
Set(value As String)
Dim dExtSawArcMinRad As Double = 0
If StringToLen(value, dExtSawArcMinRad) Then
EgtMdbSetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dExtSawArcMinRad)
EgtMdbSave()
m_sExtSawArcMinRad = value
End If
End Set
End Property
Private m_sIntSawArcMaxSideAng As String
Public Property IntSawArcMaxSideAng As String
Get
Return m_sIntSawArcMaxSideAng
End Get
Set(value As String)
Dim dIntSawArcMaxSideAng As Double = 0
If StringToLen(value, dIntSawArcMaxSideAng) Then
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dIntSawArcMaxSideAng)
EgtMdbSave()
m_sIntSawArcMaxSideAng = value
End If
End Set
End Property
Private m_sApproxLinTol As String
Public Property ApproxLinTol As String
Get
Return m_sApproxLinTol
End Get
Set(value As String)
Dim dApproxLinTol As Double = 0
If StringToLen(value, dApproxLinTol) Then
EgtMdbSetGeneralParam(MCH_GP.APPROXLINTOL, dApproxLinTol)
EgtMdbSave()
m_sApproxLinTol = value
End If
End Set
End Property
Private m_ArchivedSetUpList As New List(Of String)
Public Property ArchivedSetUpList As List(Of String)
Get
@@ -121,11 +152,6 @@ Public Class MachOptionVM
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 9)
End Get
End Property
Public ReadOnly Property ApproxLinTolMsg As String
Get
Return EgtMsg(6410) ' Tolleranza di approssimazione
End Get
End Property
Public ReadOnly Property SplitArcsMsg As String
Get
@@ -133,6 +159,24 @@ Public Class MachOptionVM
End Get
End Property
Public ReadOnly Property ExtSawArcMinRadMsg As String
Get
Return EgtMsg(6411) ' Minimo raggio arco esterno con lama
End Get
End Property
Public ReadOnly Property IntSawArcMaxSideAngMsg As String
Get
Return EgtMsg(6412) ' Massima inclinazione arco interno con lama
End Get
End Property
Public ReadOnly Property ApproxLinTolMsg As String
Get
Return EgtMsg(6410) ' Tolleranza di approssimazione
End Get
End Property
Public ReadOnly Property DefaultSetUpMsg As String
Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7)
@@ -161,6 +205,14 @@ Public Class MachOptionVM
Dim nVal As Integer = 0
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA)
' Leggo minimo raggio arco esterno lavorabile con lama
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.EXTSAWARCMINRAD, dVal)
m_sExtSawArcMinRad = LenToString(dVal, 4)
' Leggo massima inclinazione lama per lavorare archi interni
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, dVal)
m_sIntSawArcMaxSideAng = LenToString(dVal, 4)
' Leggo tolleranza lineare di approssimazione
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.APPROXLINTOL, dVal)
@@ -185,6 +237,17 @@ Public Class MachOptionVM
End If
End Sub
#Region "Visibility"
Public ReadOnly Property StoneVisibility As Visibility
Get
Dim sGenMat As String = ""
EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, MCH_MAT_WOOD, sGenMat, IniFile.m_sCurrMachIniFilePath)
Return If( sGenMat = MCH_MAT_STONE, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#End Region
#Region "COMMANDS"
#Region "CloseMachOptionsCommand"
+2 -2
View File
@@ -385,8 +385,8 @@ Public Class MainWindowVM
EgtSetLockId(sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2707, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2707, 1, IniFile.m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2711, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2711, 1, IniFile.m_nKeyOptions)
' Leggo e imposto livello utilizzatore
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Imposto abilitazione lavorazioni avanzate
+2 -2
View File
@@ -70,6 +70,6 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.7.2")>
<Assembly: AssemblyFileVersion("2.7.7.2")>
<Assembly: AssemblyVersion("2.7.11.3")>
<Assembly: AssemblyFileVersion("2.7.11.3")>
+2 -2
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.34209
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
+22 -20
View File
@@ -1,7 +1,7 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.34209
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
@@ -12,15 +12,16 @@ Option Strict On
Option Explicit On
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
@@ -28,17 +29,17 @@ Partial Friend NotInheritable Class MySettings
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
@@ -49,10 +50,11 @@ Partial Friend NotInheritable Class MySettings
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
@@ -62,9 +64,9 @@ Namespace My
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.EgtCAM5.MySettings
Friend ReadOnly Property Settings() As Global.EgtCAM5.My.MySettings
Get
Return Global.EgtCAM5.MySettings.Default
Return Global.EgtCAM5.My.MySettings.Default
End Get
End Property
End Module
@@ -23,9 +23,9 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="Txt" Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
PreviewKeyDown="TextBox_PreviewKeyDown" Height="Auto"
Visibility="{Binding TextVisibility}" Margin="5,0,5,5" >
<TextBox x:Name="Txt" Text="{Binding TextBox,UpdateSourceTrigger=PropertyChanged}"
PreviewKeyDown="TextBox_PreviewKeyDown" IsVisibleChanged="Txt_IsVisibleChanged"
Visibility="{Binding TextVisibility}" Height="Auto" Margin="5,0,5,5" >
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DoneCommand}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding ShowCommand}"/>
@@ -34,50 +34,17 @@
<Button Grid.Column="1"
Content="+"
Command="{Binding ShowInfoItemCommand}"
Visibility="Collapsed"
Visibility="{Binding ShowInfoItemVisibility}"
Width="20"
Height="20"
Margin="5,-1,5,0"
VerticalAlignment="Top"/>
<!--Visibility="{Binding ShowInfoItemVisibility}"-->
</Grid>
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
Visibility="{Binding CheckVisibility}" Margin="5,0,5,5"/>
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding ComboVisibility}" Margin="5,5,5,5"/>
<ItemsControl ItemsSource="{Binding InfoList}"
Visibility="{Binding InfoVisibility}"
Margin="5,5,0,10">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Key}"
Width="70"
Margin="0,6,-15,0"/>
<TextBox Grid.Column="1"
Text="{Binding Valour, UpdateSourceTrigger=PropertyChanged}"
Margin="0,5,5,10">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding DoneInfoCommand}"/>
</TextBox.InputBindings>
</TextBox>
<Button Grid.Column="2"
Content="-"
Command="{Binding RemoveInfoItemCommand}"
Width="20"
Height="20"
Margin="5,-2,5,5"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid Margin="5,0,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
@@ -1,11 +1,17 @@
Public Class InputExpanderV
Private Sub TextBox_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If (e.Key = Key.Enter And (Keyboard.Modifiers And ModifierKeys.Shift)= ModifierKeys.Shift) Or
(e.Key = Key.V And (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control) Then
If (e.Key = Key.Enter And (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) Or
(e.Key = Key.V And (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control) Then
Txt.AcceptsReturn = True
Txt.TextWrapping = TextWrapping.Wrap
End If
End Sub
Private Sub Txt_IsVisibleChanged(sender As Object, e As DependencyPropertyChangedEventArgs)
If Txt.IsVisible Then
Txt.Focus()
End If
End Sub
End Class
@@ -8,7 +8,7 @@ Public Class InputExpanderVM
#Region "FIELDS & PROPERTIES"
' Variabile temporanea per salvare bShow
Private m_tmpbShow As Boolean
Private m_bTempShow As Boolean
Private m_tmpInfoList As New ObservableCollection(Of InfoItem)
''' <summary>
@@ -158,47 +158,32 @@ Public Class InputExpanderVM
End Set
End Property
Private m_InfoList As New ObservableCollection(Of InfoItem)
''' <summary>
''' Lista delle info modificate
''' </summary>
Public Property InfoList As ObservableCollection(Of InfoItem)
Get
Return m_InfoList
End Get
Set(value As ObservableCollection(Of InfoItem))
m_InfoList = value
OnPropertyChanged("InfoList")
End Set
End Property
Private m_ComboSelectedIndex As Integer
Public Property ComboSelectedIndex As Integer
Get
Return m_ComboSelectedIndex
End Get
Set(value As Integer)
If m_tmpbShow Then Map.refProjectVM.SetLastInteger(value)
If m_bTempShow Then Map.refProjectVM.SetLastInteger(value)
m_ComboSelectedIndex = value
' Assegno l'indice selezionato ad una variabile temporanea per utilizzarlo quando rimuovo l'info dalla lista
Dim tmpComboSelectedIndex As Integer = ComboSelectedIndex
' Controllo se l'indice è maggiore o uguale a zero e la lista tmp contiene valori
If m_ComboSelectedIndex >= 0 AndAlso tmpInfoList.Count > 0 Then
' Controllo se la info è contenuta nella lista ComboItemsList
If ComboItemsList.Contains(tmpInfoList(m_ComboSelectedIndex).sKey) Then
' Aggiungo la info alla lista per visualizzarla
InfoList.Add(New InfoItem(tmpInfoList(m_ComboSelectedIndex).nId, tmpInfoList(m_ComboSelectedIndex).sKey, m_tmpInfoList(m_ComboSelectedIndex).sValour))
' Nascondo la combobox
ComboVisibility = Visibility.Collapsed
' Rimuovo la info dalla ComboItemsList
ComboItemsList.Remove(tmpInfoList(m_ComboSelectedIndex).sKey)
' se la info è presente la aggiungo alla textbox per modificarla
If m_TextBox IsNot String.Empty Then
If Not m_TextBox.EndsWith(vbCrLf) Then m_TextBox &= vbCrLf
m_TextBox &= (tmpInfoList(m_ComboSelectedIndex).sKey & "=" & m_tmpInfoList(m_ComboSelectedIndex).sValour).Trim()
ElseIf m_TextBox Is String.Empty Then
m_TextBox &= (tmpInfoList(m_ComboSelectedIndex).sKey & "=" & m_tmpInfoList(m_ComboSelectedIndex).sValour).Trim() & vbCrLf
End If
' Rimuovo la info dalla tmpInfoList
ComboVisibility = Visibility.Collapsed
ComboItemsList.Remove((tmpInfoList(m_ComboSelectedIndex).sKey & "=" & m_tmpInfoList(m_ComboSelectedIndex).sValour).Trim())
tmpInfoList.Remove(tmpInfoList(tmpComboSelectedIndex))
End If
m_ComboSelectedIndex = -1
If ComboItemsList.Count <= 0 Then ShowInfoItemVisibility = Visibility.Collapsed
OnPropertyChanged("ComboSelectedIndex")
OnPropertyChanged("ComboItemsList")
OnPropertyChanged("InfoList")
OnPropertyChanged("TextBox")
End Set
End Property
@@ -243,27 +228,10 @@ Public Class InputExpanderVM
End Set
End Property
Private m_InfoVisibility As Visibility
''' <summary>
''' Propietà visibilità lista info modificate
''' </summary>
Public Property InfoVisibility As Visibility
Get
Return m_InfoVisibility
End Get
Set(value As Visibility)
If value <> m_InfoVisibility Then
m_InfoVisibility = value
OnPropertyChanged("InfoVisibility")
End If
End Set
End Property
' Commands definition
Private m_cmdShow As ICommand
Private m_cmdDone As ICommand
Private m_cmdShowInfoItem As ICommand
Private m_cmdRemoveInfoItem As ICommand
#Region "Messages"
@@ -287,6 +255,7 @@ Public Class InputExpanderVM
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefInputExpanderVM(Me)
ComboSelectedIndex = -1
End Sub
#End Region ' Constructor
@@ -341,15 +310,6 @@ Public Class InputExpanderVM
''' Execute the Point. This method is invoked by the PointCommand.
''' </summary>
Public Sub Done(ByVal param As Object)
' Controllo se la lista contenente la info modificata sia presente
If InfoList.Count > 0 Then
' Ciclo sulla lista
For Each Item As InfoItem In InfoList
Map.refProjectVM.NotifyInputText((Item.Key & "=" & Item.Valour).Trim())
' Assegno a m_TextBox la info modificata
m_TextBox &= vbCrLf & (Item.Key & "=" & Item.Valour).Trim() & vbCrLf
Next
End If
Map.refProjectVM.Done(m_TextBox)
End Sub
@@ -381,6 +341,15 @@ Public Class InputExpanderVM
''' </summary>
''' <param name="param"></param>
Public Sub ShowInfoItem(ByVal param As Object)
' Se presente info inserita in textbox
If m_TextBox IsNot String.Empty Then
Dim sSplitItem As String() = m_TextBox.Split("="c)
Dim ItemCombo As InfoItem = tmpInfoList.FirstOrDefault(Function(x) x.sKey = sSplitItem(0))
If Not IsNothing(ItemCombo) Then
ComboItemsList.Remove((ItemCombo.sKey & "=" & ItemCombo.sValour).Trim())
tmpInfoList.Remove(ItemCombo)
End If
End If
ComboVisibility = Visibility.Visible
End Sub
@@ -391,27 +360,18 @@ Public Class InputExpanderVM
#Region "METHODS"
Friend Sub PrepareInputBox(PrepareInputBoxParam As PrepareInputBoxParam)
Title = PrepareInputBoxParam.sTitle
' Divido il titolo che può contenere comandi dopo il ';'
Dim vsSplitTitle As String() = PrepareInputBoxParam.sTitle.Split(";"c)
Title = vsSplitTitle(0)
If PrepareInputBoxParam.sLabel <> "" Then
TextBlock = PrepareInputBoxParam.sLabel
TextBox = ""
TextVisibility = Visibility.Visible
' Controllo se il titolo è uguale a INFO se si
If Title = EgtMsg(5359).ToUpper() Then
' Metto tmpbShow a false
m_tmpbShow = False
' Rendo visibile il pulsante che mostra la lista delle info
ShowInfoItemVisibility = Visibility.Visible
' Rendo visibile la lista delle info selezionate
InfoVisibility = Visibility.Visible
' Pulisco la lista tmpInfoList
tmpInfoList.Clear()
' Pulisco la lista InfoList
InfoList.Clear()
' Pulisco la lista ComboItemsList
ComboItemsList.Clear()
' Popolo la lista ComboItemsList
' Se presente il comando "Sic=1"
If vsSplitTitle.Count() > 1 AndAlso vsSplitTitle(1) = "Sic=1" Then
m_bTempShow = False
ComboInfo()
If ComboItemsList.Count > 0 Then ShowInfoItemVisibility = Visibility.Visible
End If
End If
If PrepareInputBoxParam.sCheckLabel <> "" Then
@@ -419,14 +379,9 @@ Public Class InputExpanderVM
CheckVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowCombo Then
' Assegno a tmpbShow PrepareInputBoxParam.bShowCombo
m_tmpbShow = PrepareInputBoxParam.bShowCombo
' Pulisco la lista ComboItemsList
m_bTempShow = PrepareInputBoxParam.bShowCombo
ComboItemsList.Clear()
' Pulisco la lista tmpInfoList
tmpInfoList.Clear()
' Pulisco la lista InfoList
InfoList.Clear()
ComboVisibility = Visibility.Visible
End If
If PrepareInputBoxParam.bShowBtn Then
@@ -444,7 +399,6 @@ Public Class InputExpanderVM
ComboVisibility = Visibility.Collapsed
ShowBtnVisibility = Visibility.Collapsed
ShowInfoItemVisibility = Visibility.Collapsed
InfoVisibility = Visibility.Collapsed
IsExpanded = False
IsEnabled = False
End Sub
@@ -479,33 +433,26 @@ Public Class InputExpanderVM
Return True
End Function
''' <summary>
''' Rimovi nota da info lista
''' </summary>
''' <param name="InfoItem">Informazione da eliminare</param>
Friend Sub RemoveItemInfo(InfoItem As InfoItem)
' Rimuovo info da lista modifica
InfoList.Remove(InfoItem)
' Riaggiungo la info eliminata
ComboItemsList.Add(InfoItem.sKey)
' Riaggiungo la info eliminata
tmpInfoList.Add(InfoItem)
End Sub
''' <summary>
''' Funzione che popola la lista ComboItemsList
''' </summary>
Private Sub ComboInfo()
'''''''''''''''''''''''''''''' Recuperare funzione egtgetallinfo quando sarà pronta
Dim val As Integer
If Not m_tmpbShow Then
For Ind As Integer = 0 To 6
val += Ind
tmpInfoList.Add(New InfoItem(Ind, "A" & +Ind, val.ToString()))
tmpInfoList.Clear()
ComboItemsList.Clear()
Dim vsVal As String() = Nothing
EgtGetAllInfo(Map.refManageLayerExpanderVM.RightClickedTreeItemId, vsVal)
If Not m_bTempShow And Not IsNothing(vsVal) Then
Dim Ind As Integer = 0
For Each Item As String In vsVal
Dim sSplitItem As String() = Item.Split("="c)
tmpInfoList.Add(New InfoItem(Ind, sSplitItem(0), sSplitItem(1)))
Ind += 1
Next
For Each InfoItem As InfoItem In tmpInfoList
ComboItemsList.Add(InfoItem.sKey)
ComboItemsList.Add((InfoItem.sKey & "=" & InfoItem.sValour).Trim())
Next
End If
End Sub
@@ -313,12 +313,16 @@ Public Class DispositionParameterExpanderVM
' se movimento di traslazione
If m_MoveIsChecked Then
Dim InputPoint As New Point3d(0, 0, 0)
Dim dSupp As Double = -1
Dim Values() As String = m_InputValue.Split(","c)
If Values.Count = 2 Then
If Values.Count >= 2 Then
StringToLen(Values(0), InputPoint.x)
StringToLen(Values(1), InputPoint.y)
If Values.Count >= 3 Then
StringToLen(Values(2), dSupp)
End If
Else
m_InputErrorMsg = "Il valore non è una cordinata XY"
m_InputErrorMsg = "Il valore non è un punto X,Y"
OnPropertyChanged("InputErrorMsg")
Return
End If
@@ -338,8 +342,38 @@ Public Class DispositionParameterExpanderVM
TableRefInputPoint.LocToLoc(EgtGetGridFrame(), New Frame3d(ptTableRef))
' calcolo il vettore di spostamento del grezzo
vtMove = TableRefInputPoint - ptRawRefPoint
vtMove.z = 0
' se è una ventosa
vtMove.z = 0
' verifico ed aggiusto eventuale supporto
Dim dOldSupp As Double = 0
Dim nOldSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
If nOldSuppId <> GDB_ID.NULL Then
Dim bboxSupport As New BBox3d
EgtGetBBoxGlob(nOldSuppId, GDB_BB.STANDARD, bboxSupport)
dOldSupp = bboxSupport.DimZ()
End If
If dSupp > -EPS_SMALL AndAlso Math.Abs( dSupp - dOldSupp) > EPS_SMALL Then
' da cancellare
If dSupp < EPS_SMALL Then
EgtErase( nOldSuppId)
vtMove.z = dSupp - dOldSupp
' da creare o modificare
Else
EgtErase( nOldSuppId)
Dim nNewSuppId As Integer = GDB_ID.NULL
Dim nRawOutLnId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, RAWOUTLINE)
If nRawOutLnId <> GDB_ID.NULL Then
Dim vtExtr As New Vector3d( 0, 0, -dSupp)
nNewSuppId = EgtCreateSurfTmByRegionExtrusion( nFirstSelectedId, 1, {nRawOutLnId}, vtExtr, 0.05, GDB_RT.GLOB)
End If
If nNewSuppId <> GDB_ID.NULL Then
EgtSetName( nNewSuppId, SUPPORT)
EgtSetColor( nNewSuppId, New Color3d(150, 75, 0))
If nOldSuppId <> GDB_ID.NULL Then EgtChangeId( nNewSuppId, nOldSuppId)
vtMove.z = dSupp - dOldSupp
End If
End If
End If
' se è una ventosa
ElseIf EgtVerifyFixture(nFirstSelectedId) Then
Dim SelObjFrame3d As New Frame3d(Frame3d.GLOB)
EgtGetGroupGlobFrame(nFirstSelectedId, SelObjFrame3d)
@@ -364,7 +398,7 @@ vtMove.z = 0
DispositionUtility.MoveRawPartPartAndFixture(GDB_ID.SEL, New Vector3d(0, vtRemainingMove.y, 0), DispositionUtility.SelType.NULL)
End If
End If
' se rotazione
' se rotazione
Else
Dim nSelId As Integer = EgtGetFirstSelectedObj()
If nSelId = GDB_ID.NULL Then Return
@@ -374,7 +408,7 @@ vtMove.z = 0
If EgtVerifyRawPartCurrPhase(nSelId) Then
' Se primo carattere è nome asse
If sVal(0) = "X"c Then
sVal = sVal.Remove( 0, 1)
sVal = sVal.Remove( 0, 1)
vtRotAx = Vector3d.X_AX()
ElseIf sVal(0) = "Y"c Then
sVal = sVal.Remove( 0, 1)
@@ -444,7 +478,15 @@ sVal = sVal.Remove( 0, 1)
Dim nFirstSelectedId As Integer = EgtGetFirstSelectedObj()
If EgtVerifyRawPartCurrPhase(nFirstSelectedId) Then
Dim ptR As Point3d = DispositionUtility.GetRawPartRefPoint(nFirstSelectedId, m_RawRefPosition)
m_InputValue = ptR.x.ToString("F1", CultureInfo.InvariantCulture) & "," & ptR.y.ToString("F1", CultureInfo.InvariantCulture)
Dim sSupp As String = ""
Dim nSuppId As Integer = EgtGetFirstNameInGroup(nFirstSelectedId, SUPPORT)
If nSuppId <> GDB_ID.NULL Then
Dim bboxSupport As New BBox3d
EgtGetBBoxGlob(nSuppId, GDB_BB.STANDARD, bboxSupport)
Dim dSupp As Double = bboxSupport.DimZ()
sSupp = "," & LenToString( dSupp, 2)
End If
m_InputValue = LenToString( ptR.x, 2) & "," & LenToString( ptR.y, 2) & sSupp
OnPropertyChanged( "InputValue")
End If
End Sub
@@ -124,10 +124,10 @@
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding ExtLinkTypeTxBl}"
ParamCmBxList="{Binding Path=ExtLinkTypeList,
ParamCmBxList="{Binding Path=LeadLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedExtLinkType}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</StackPanel>
</Expander>
@@ -468,16 +468,16 @@ Public Class SimulationExpanderVM
Friend Sub SimulationExpander_Update_CncData( nFlag As Integer)
If Simulation_IsExpanded Then
ShowCncData()
' Se fermo per Collisione rilevata da script Lua
If nFlag = 11 Then
' Se fermo per Collisione rilevata da script Lua o per altra richiesta
If nFlag = 11 Or nFlag = 12 Then
' Imposto stato Pausa
SetSimulationStatus(MCH_SIM_ST.UI_PAUSE)
StatusMsg = EgtMsg(MSG_SIMULATION + 11) ' PAUSA
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage")
' Dichiaro di non arrestarsi alla successiva notifica di collisione
m_bStopOnNextCollision = False
' Se fermo per Collisione, dichiaro di non arrestarsi alla successiva notifica di collisione
If nFlag = 11 Then m_bStopOnNextCollision = False
End If
End If
End Sub
+51 -6
View File
@@ -12,8 +12,10 @@ Friend Module OptionModule
Friend m_GridColor As Color3d
' Flag per visualizzazione spessa delle linee
Friend m_bThickLine As Boolean
' Flag per visualizzazione smussata delle superfici
Friend m_bSmoothTriMesh As Boolean
' Qualità di visualizzazione delle superfici
Friend m_ShowSurfQuality As SceneSurfQualityOpt
' Tipo di visualizzazione delle Zmap
Friend m_nShowZmapType As Integer
' Colore di default in disegno
Friend m_DefMaterialColor As Color3d
@@ -60,7 +62,8 @@ Friend Module OptionModule
Friend m_SelGeomWaterJetting As SceneSelModeOpt
Friend m_SelGeomFiveAxMilling As SceneSelModeOpt
Friend m_SelGeomProbing As SceneSelModeOpt
Friend m_SelVMillQuality As VMillSelTypeOpt
' Qualità di calcolo del virtual milling
Friend m_VMillQuality As VMillSelTypeOpt
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
Friend m_bNewMachiningIsLastOne As Boolean
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
@@ -111,13 +114,24 @@ Friend Module OptionModule
' Inizializzo flag linee ingrossate
m_bThickLine = (GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1)
' Inizializzo flag visualizzazione smussata delle superfici
m_bSmoothTriMesh = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
Dim nSSQ As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWSURFQUALITY, 0)
m_ShowSurfQuality = DirectCast( Math.Min( Math.Max( nSSQ, -2), 2), SceneSurfQualityOpt)
' Inizializzo tipo di visualizzazione Zmap
m_nShowZmapType = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 9)
' Inizio colore di default in disegno
Dim DefColor As New Color3d(0, 0, 0)
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
m_DefMaterialColor = DefColor
' Inizializzo tolleranza geometrica
m_dGeometryTolerance = GetPrivateProfileDouble(S_GEOMDB, K_SURFTMTOLER, 0.05)
' Inizializzo stile corrente delle quotature
m_dExtLineLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
m_dArrowLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
m_dTextDist = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
m_nLenIsMM = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
m_nDecDigit = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
m_sFont = "" : GetPrivateProfileStringUtf8(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", m_sFont)
m_dTextHeight = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
' Inizializzo variabili per import
m_dDxfScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
m_dStlScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
@@ -157,9 +171,10 @@ Friend Module OptionModule
m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMPROBING, -1)
m_SelGeomProbing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELVMILLQUALITY, 0)
m_SelVMillQuality = If(Temp < -2 Or Temp > 2, VMillSelTypeOpt.HIGHER, DirectCast(Temp, VMillSelTypeOpt))
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
' Inizializzo qualità di virtual milling
Temp = GetPrivateProfileInt(S_MACH, K_VMILLQUALITY, 0)
m_VMillQuality = DirectCast(Math.Min( Math.Max( Temp, -2), 2), VMillSelTypeOpt)
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
' Inizializzo variabile che indica se usare script di disposizione
@@ -172,6 +187,36 @@ Friend Module OptionModule
m_bGunstockOn = (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
End Sub
' restituisco spessore linee
Friend Function GetLineWidth() As Integer
Return If( m_bThickLine, 2, 1)
End Function
' imposto stato visualizzazione superfici
Friend Sub SetShowSurfQuality( bRedraw As Boolean)
Dim bSmoothTriMesh As Boolean = True
Dim dSrfBezShowTol As Double = 0.2
Select m_ShowSurfQuality
Case SceneSurfQualityOpt.LOWER
bSmoothTriMesh = False
dSrfBezShowTol = 4
Case SceneSurfQualityOpt.LOW
bSmoothTriMesh = False
dSrfBezShowTol = 1
Case SceneSurfQualityOpt.STANDARD
bSmoothTriMesh = True
dSrfBezShowTol = 0.2
Case SceneSurfQualityOpt.HIGH
bSmoothTriMesh = True
dSrfBezShowTol = 0.05
Case SceneSurfQualityOpt.HIGHER
bSmoothTriMesh = True
dSrfBezShowTol = 0.01
End Select
EgtSetShowTriaAdv(bSmoothTriMesh, false)
EgtSetShowSurfBezierTol(dSrfBezShowTol, bRedraw)
End Sub
End Module
' Classe che identifica una lingua del programma con nome e path del file dei messaggi
+51 -19
View File
@@ -14,6 +14,7 @@
<EgtWPFLib5:EgtCustomWindow.Resources>
<local:GeomTypeConverter x:Key="GeomTypeConverter"/>
<local:SceneSurfQualityOptConverter x:Key="SceneSurfQualityOptConverter"/>
<local:VMillTypeConverter x:Key="VMillTypeConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources>
@@ -65,10 +66,17 @@
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"
<TextBlock Text="{Binding SceneSurfQualityMsg}" 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"/>
<ComboBox ItemsSource="{Binding SceneSurfQualityOptList, Mode=OneWay}"
SelectedItem="{Binding SelectedSceneSurfQualityOpt}"
Grid.Column="1" Grid.Row="1" Height="25" Margin="0,5,0,5">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource SceneSurfQualityOptConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<UniformGrid Columns="2"
Margin="0,0,0,5">
@@ -77,7 +85,31 @@
SelectedItem="{Binding SelectedTextFont}" Height="25"
Margin="10,5,0,0"/>
</UniformGrid>
<Grid Margin="5,5,5,5">
<GroupBox Header="ShowZmap"
Visibility="{Binding ShowZmapVisibility}"
Margin="0,0,0,5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding ShowZmapSurf}"
Content="Surfaces" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="0" Margin="5,5,10,5" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding ShowZmapLines}"
Content="Lines" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="1" Margin="5,5,10,5" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding ShowZmapNormals}"
Content="Normals" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="2" Margin="5,5,10,5" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding ShowZmapBiColor}"
Content="BiColor" FlowDirection="RightToLeft"
Grid.Row="0" Grid.Column="3" Margin="5,5,10,5" VerticalAlignment="Center"/>
</Grid>
</GroupBox>
<Grid Margin="5,100,5,5">
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
</Grid>
</StackPanel>
@@ -374,7 +406,7 @@
<UniformGrid Columns="2" Grid.ColumnSpan="2" Margin="0,5,0,0">
<TextBlock Text="{Binding VMillQualityMsg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding VMillTypeList, Mode=OneWay}"
SelectedItem="{Binding SelectedVMillTypeType}" Height="25">
SelectedItem="{Binding SelectedVMillQualityType}" Height="25">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource VMillTypeConverter}}"/>
@@ -414,34 +446,34 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding SpecialMsg}"
Grid.Row="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SpecialOn}"
Grid.Row="0" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding BeamMsg}"
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
Grid.Row="0" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding BeamOn}" IsEnabled="{Binding BeamEnabled}"
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
Grid.Row="0" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}"
Command="{Binding UpdateBeam_Command}"
Grid.Row="1" Grid.Column="2" Height="26"/>
Grid.Row="0" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding WallMsg}"
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}"
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}"
Command="{Binding UpdateWall_Command}"
Grid.Row="2" Grid.Column="2" Height="26"/>
Grid.Row="1" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center"
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}"
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding DoorsActive}"
Command="{Binding UpdateDoors_Command}"
Grid.Row="3" Grid.Column="2" Height="26"/>
Grid.Row="2" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SpecialMsg}"
Grid.Row="4" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SpecialOn}"
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
</Grid>
</StackPanel>
+137 -41
View File
@@ -34,6 +34,13 @@ Public Class OptionWindowVM
End Get
End Property
Private m_SceneSurfQualityOptList As ObservableCollection(Of SceneSurfQualityOpt) = New ObservableCollection(Of SceneSurfQualityOpt)({SceneSurfQualityOpt.LOWER, SceneSurfQualityOpt.LOW, SceneSurfQualityOpt.STANDARD, SceneSurfQualityOpt.HIGH, SceneSurfQualityOpt.HIGHER})
Public ReadOnly Property SceneSurfQualityOptList As ObservableCollection(Of SceneSurfQualityOpt)
Get
Return m_SceneSurfQualityOptList
End Get
End Property
Private m_FontList As New ObservableCollection(Of String)
Public ReadOnly Property FontList As ObservableCollection(Of String)
Get
@@ -98,6 +105,18 @@ Public Class OptionWindowVM
End Set
End Property
Public Property SelectedSceneSurfQualityOpt As SceneSurfQualityOpt
Get
Return OptionModule.m_ShowSurfQuality
End Get
Set(value As SceneSurfQualityOpt)
If WritePrivateProfileString(S_SCENE, K_SHOWSURFQUALITY, CInt(value).ToString()) Then
OptionModule.m_ShowSurfQuality = value
OptionModule.SetShowSurfQuality( true)
End If
End Set
End Property
Public Property SelectedMillingGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomMilling
@@ -158,8 +177,7 @@ Public Class OptionWindowVM
End If
End Set
End Property
Public Property SelectedGenGeomType As SceneSelModeOpt
Public Property SelectedGenGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomGenMachining
End Get
@@ -169,8 +187,7 @@ Public Class OptionWindowVM
End If
End Set
End Property
Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomSurfRoughing
End Get
@@ -180,7 +197,6 @@ Public Class OptionWindowVM
End If
End Set
End Property
Public Property SelectedSurfFinishGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomSurfFinishing
@@ -202,7 +218,6 @@ Public Class OptionWindowVM
' End If
' End Set
'End Property
Public Property SelectedFiveAxGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomFiveAxMilling
@@ -213,7 +228,6 @@ Public Class OptionWindowVM
End If
End Set
End Property
Public Property SelectedProbingGeomType As SceneSelModeOpt
Get
Return OptionModule.m_SelGeomProbing
@@ -225,13 +239,13 @@ Public Class OptionWindowVM
End Set
End Property
Public Property SelectedVMillTypeType As VMillSelTypeOpt
Public Property SelectedVMillQualityType As VMillSelTypeOpt
Get
Return OptionModule.m_SelVMillQuality
Return OptionModule.m_VMillQuality
End Get
Set(value As VMillSelTypeOpt)
If WritePrivateProfileString(S_MACH, K_SELVMILLQUALITY, CInt(value).ToString()) Then
OptionModule.m_SelVMillQuality = value
If WritePrivateProfileString(S_MACH, K_VMILLQUALITY, CInt(value).ToString()) Then
OptionModule.m_VMillQuality = value
End If
End Set
End Property
@@ -312,19 +326,10 @@ Public Class OptionWindowVM
End Get
Set(value As Boolean)
OptionModule.m_bThickLine = value
WritePrivateProfileString(S_SCENE, K_LINEWIDTH, If(value, "2", "1"))
EgtSetLineAttribs(If(value, 2, 1))
End Set
End Property
Public Property SmoothTriMesh As Boolean
Get
Return OptionModule.m_bSmoothTriMesh
End Get
Set(value As Boolean)
OptionModule.m_bSmoothTriMesh = value
WritePrivateProfileString(S_SCENE, K_SHOWTRIAADV, If(value, "1", "0"))
EgtSetShowTriaAdv(value)
Dim nThickLine As Integer = OptionModule.GetLineWidth()
WritePrivateProfileString(S_SCENE, K_LINEWIDTH, nThickLine.ToString())
EgtSetLineAttribs(nThickLine)
EgtDraw()
End Set
End Property
@@ -334,13 +339,68 @@ Public Class OptionWindowVM
End Get
Set(value As String)
OptionModule.m_sFontText = value
Dim sNfeDir As String = String.Empty
GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
EgtSetFont(sNfeDir, OptionModule.m_sFontText)
EgtSetFont("", OptionModule.m_sFontText)
WritePrivateProfileString(S_GEOMDB, K_DEFAULTFONT, OptionModule.m_sFontText)
End Set
End Property
Public Property ShowZmapSurf As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 1) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 1)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 1)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property ShowZmapLines As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 2) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 2)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 2)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property ShowZmapNormals As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 4) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 4)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 4)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property ShowZmapBiColor As Boolean
Get
Return (( OptionModule.m_nShowZmapType And 8) <> 0)
End Get
Set(value As Boolean)
If value Then
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType Or 8)
Else
OptionModule.m_nShowZmapType = ( OptionModule.m_nShowZmapType And Not 8)
End If
WritePrivateProfileString(S_SCENE, K_SHOWZMAP, OptionModule.m_nShowZmapType.ToString())
EgtSetShowZmap( OptionModule.m_nShowZmapType, True)
End Set
End Property
Public Property DxfScaleFactor As String
Get
Return LenToString(OptionModule.m_dDxfScaleFactor, 5)
@@ -886,9 +946,9 @@ Public Class OptionWindowVM
Return EgtMsg(6536) ' Linee spesse
End Get
End Property
Public ReadOnly Property SmoothTriMeshMsg As String
Public ReadOnly Property SceneSurfQualityMsg As String
Get
Return EgtMsg(6518) ' Superfici smussate
Return EgtMsg(6518) ' Qualità visualizzazione superfici
End Get
End Property
Public ReadOnly Property UpdateLicenceMsg As String
@@ -1161,6 +1221,17 @@ Public Class OptionWindowVM
#End Region
#Region "Visibility"
Public ReadOnly Property ShowZmapVisibility As Visibility
Get
Return If( (IniFile.m_nUserLevel > 5), Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#End Region
#Region "COMMANDS"
#Region "TopSceneBackground"
@@ -1978,21 +2049,21 @@ Public Class GeomTypeConverter
End Class
Public Class VMillTypeConverter
Public Class SceneSurfQualityOptConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value)
Case VMillSelTypeOpt.LOWER
Return EgtMsg(31215)
Case VMillSelTypeOpt.LOW
Return EgtMsg(31216)
Case VMillSelTypeOpt.STANDARD
Return EgtMsg(31217)
Case VMillSelTypeOpt.HIGH
Return EgtMsg(31218)
Case VMillSelTypeOpt.HIGHER
Return EgtMsg(31219)
Case SceneSurfQualityOpt.LOWER
Return EgtMsg(31215) ' Inferiore
Case SceneSurfQualityOpt.LOW
Return EgtMsg(31216) ' Bassa
Case SceneSurfQualityOpt.STANDARD
Return EgtMsg(31217) ' Media
Case SceneSurfQualityOpt.HIGH
Return EgtMsg(31218) ' Alta
Case SceneSurfQualityOpt.HIGHER
Return EgtMsg(31219) ' Superiore
Case Else
Return ""
End Select
@@ -2001,4 +2072,29 @@ Public Class VMillTypeConverter
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
End Class
Public Class VMillTypeConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value)
Case VMillSelTypeOpt.LOWER
Return EgtMsg(31215) ' Inferiore
Case VMillSelTypeOpt.LOW
Return EgtMsg(31216) ' Bassa
Case VMillSelTypeOpt.STANDARD
Return EgtMsg(31217) ' Media
Case VMillSelTypeOpt.HIGH
Return EgtMsg(31218) ' Alta
Case VMillSelTypeOpt.HIGHER
Return EgtMsg(31219) ' Superiore
Case Else
Return ""
End Select
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
+19 -26
View File
@@ -294,19 +294,9 @@ Public Class ProjectVM
Private Sub PreInitializeScene()
' imposto colore di default
Dim DefColor As New Color3d(0, 0, 0)
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
m_ProjectScene.SetDefaultMaterial(DefColor)
m_ProjectScene.SetDefaultMaterial(OptionModule.m_DefMaterialColor)
' imposto colori sfondo
Dim BackTopColor As New Color3d(192, 192, 192)
GetPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
Dim BackBotColor As New Color3d(BackTopColor)
GetPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
m_ProjectScene.SetViewBackground(BackTopColor, BackBotColor)
' imposto spessore linee
Dim nLineWidth As Integer = 1
nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth)
m_ProjectScene.SetLineWidth(nLineWidth)
m_ProjectScene.SetViewBackground(OptionModule.m_TopSceneBackground, OptionModule.m_BotSceneBackground)
' imposto colori di evidenziazione
Dim MarkColor As New Color3d(255, 255, 0)
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
@@ -370,27 +360,21 @@ Public Class ProjectVM
' modo di visualizzazione
Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
Map.refShowPanelVM.ShowModeState(nShowMode)
' imposto spessore curve
EgtSetLineAttribs(OptionModule.GetLineWidth())
' visualizzazione direzione curve
Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0)
Map.refShowPanelVM.ShowCurveDir(nShowCurveDir)
' visualizzazione avanzata dei triangoli costituenti le superfici
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
EgtSetShowTriaAdv(bShowTriaAdv)
' qualità di visualizzazione delle superfici
OptionModule.SetShowSurfQuality( False)
' tipo visualizzazione per Zmap
Dim nShowZmap As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 1)
EgtSetShowZmap(nShowZmap, False)
EgtSetShowZmap( OptionModule.m_nShowZmapType, False)
' dimensione lineare max in pixel delle textures
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096)
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
' stile corrente delle quotature
OptionModule.m_dExtLineLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_EXTLINELEN, 5)
OptionModule.m_dArrowLen = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_ARROWLEN, 5)
OptionModule.m_dTextDist = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTDIST, 2)
OptionModule.m_nLenIsMM = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_LENISMM, 2)
OptionModule.m_nDecDigit = GetPrivateProfileInt(S_DIMENSIONSTYLE, K_DECDIGIT, -2)
OptionModule.m_sFont = "" : GetPrivateProfileStringUtf8(S_DIMENSIONSTYLE, K_DIMFONT, "ModernPropS.Nfe", m_sFont)
OptionModule.m_dTextHeight = GetPrivateProfileDouble(S_DIMENSIONSTYLE, K_TEXTHEIGHT, 2)
EgtSetCurrDimensionStyle(m_dExtLineLen, m_dArrowLen, m_dTextDist, m_nLenIsMM, m_nDecDigit, m_sFont, m_dTextHeight)
EgtSetCurrDimensionStyle(OptionModule.m_dExtLineLen, OptionModule.m_dArrowLen, OptionModule.m_dTextDist,
OptionModule.m_nLenIsMM, OptionModule.m_nDecDigit, OptionModule.m_sFont, OptionModule.m_dTextHeight)
' lettura da ini della variabile che abilita i gruppi di lavorazione
IniFile.m_bMachiningGroup = (GetPrivateProfileInt(S_MACH, K_MACHININGGROUP, 0) <> 0)
Map.refTopCommandBarVM.DrawMode_IsChecked()
@@ -1409,6 +1393,11 @@ Public Class ProjectVM
Analyze.CreateAnalyzeGroup()
Analyze.CreateFacetNormal(nId, nFac)
Analyze.CreateFacetLoops(nId, nFac)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Analyze.CreateTriaLoop(nId, nSub)
End If
' Recupero i dati (in globale o griglia a seconda della impostazione)
Dim ptC As Point3d
Dim vtN As Vector3d
@@ -1420,6 +1409,10 @@ Public Class ProjectVM
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
sOut &= ", Triangle " + nSub.ToString()
End If
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
' Se Regione, visualizzo dati parte toccata
@@ -1564,7 +1557,7 @@ Public Class ProjectVM
nFlag = GetPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
ElseIf nType = FT.BTL Or nType = FT.BTLX Then
nFlag = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
ElseIf nType = FT._3MF
ElseIf nType = FT._3MF Then
nFlag = GetPrivateProfileInt(S_IMPORT, K_3MFFLAG, EI3_FL.NONE)
ElseIf nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or
nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then
+1 -1
View File
@@ -175,7 +175,7 @@ Public Class MTableDbV
Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs)
Dim Element As Object = e.OriginalSource
While Not IsNothing(Element) AndAlso Not TypeOf Element Is ScrollBar
Element = VisualTreeHelper.GetParent(Element)
Element = VisualTreeHelper.GetParent(CType(Element, DependencyObject))
End While
' verifico che non sia ScrollBar, di modo che questa continui a funzionare, ma non possa selezionare piu' righe trascinando
If IsNothing(Element) OrElse Not TypeOf Element Is ScrollBar Then
+13 -7
View File
@@ -10,6 +10,11 @@ Public Class SpecialPanelVM
Return m_ButtonList
End Get
End Property
Public ReadOnly Property ButtonCount As Integer
Get
Return m_ButtonList.Count()
End Get
End Property
Private m_SpecialPanel_Visibility As Visibility
Public ReadOnly Property SpecialPanel_Visibility As Visibility
@@ -26,13 +31,14 @@ Public Class SpecialPanelVM
' Creo riferimento a questa classe in Map
Map.SetRefSpecialPanelVM(Me)
' se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveSpecialPanel Then
Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonItem = Nothing
While GetPrivateProfileButton(S_SPECIAL, K_BUTTON & BtnIndex, "", CurrBtn)
m_ButtonList.Add(CurrBtn)
BtnIndex += 1
End While
If IniFile.IsActiveSpecialPanel(False) Then
Dim BtlIndexMax As Integer = If( IniFile.m_nUserLevel > 5, 199, 99)
For BtnIndex As Integer = 1 To BtlIndexMax
Dim CurrBtn As ButtonItem = Nothing
If GetPrivateProfileButton(S_SPECIAL, K_BUTTON & BtnIndex, "", CurrBtn)
m_ButtonList.Add(CurrBtn)
End If
Next
End If
End Sub
+8 -3
View File
@@ -533,7 +533,7 @@ Public Class MyStatusBarVM
Private 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))
' Notifico a simulazione aggiornamento dati
' Se simulazione attiva, notifico aggiornamento dati
If Not IsNothing( Map.refSimulationExpanderVM) Then
' Uso i valori negativi del primo parametro come flag per la Simulazione
Dim nFlag As Integer = If( nProg < 0, -nProg, 0)
@@ -541,8 +541,13 @@ Public Class MyStatusBarVM
End If
' Costringo ad aggiornare
UpdateUI()
' Eventuale attesa
Thread.Sleep(nPause)
' Se richiesta pausa
If nPause >= 0 Then
Thread.Sleep(nPause)
' se altrimenti richiesto aggiornamento visualizzazione
ElseIf nPause = -1
EgtDraw()
End If
' Ritorno eventuale stop
If m_bStopScript Then
m_bStopScript = False
-25
View File
@@ -108,7 +108,6 @@ Public Class InfoItem
#End Region ' Fields & Properties
' Comandi
Private m_cmdRemoveInfoItem As ICommand
Private m_cmdDoneInfo As ICommand
#Region "CONSTRUCTORS"
@@ -123,30 +122,6 @@ Public Class InfoItem
#Region "COMMANDS"
#Region "RemoveItemNoteCommand"
''' <summary>
''' Comando per rimuovere l'informazione selezionata dalla combobox
''' </summary>
Public ReadOnly Property RemoveInfoItemCommand As ICommand
Get
If m_cmdRemoveInfoItem Is Nothing Then
m_cmdRemoveInfoItem = New Command(AddressOf RemoveInfoItem)
End If
Return m_cmdRemoveInfoItem
End Get
End Property
''' <summary>
''' Rimuove l'informazione selezionata dalla combobox
''' </summary>
''' <param name="param"></param>
Public Sub RemoveInfoItem(ByVal param As Object)
Map.refInputExpanderVM.RemoveItemInfo(Me)
End Sub
#End Region ' RemoveItemNoteCommand
#Region "DoneInfoCommand"
''' <summary>
+2 -2
View File
@@ -26,11 +26,11 @@
</EgtFloating:EgtFloatingPanel>
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
</WrapPanel>
+10
View File
@@ -66,6 +66,16 @@ Module Analyze
Return True
End Function
Function CreateTriaLoop( nId As Integer, nT As Integer) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
Dim nCrvId As Integer = EgtExtractSurfTmTriaLoop( nId, nT, m_AnaGrpId)
EgtSetColor( nCrvId, New Color3d( 255, 255,0))
If bEnMod Then EgtEnableModified()
Return True
End Function
Function CreateChunkNormal( nId As Integer, nChk As Integer) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
+12 -3
View File
@@ -17,6 +17,14 @@ Public Module IniFile
ONLYDRAW = 3
End Enum
Public Enum SceneSurfQualityOpt As Integer
LOWER = -2
LOW = -1
STANDARD = 0
HIGH = 1
HIGHER = 2
End Enum
Public Enum SceneSelModeOpt As Integer
NULL = 0
PARTCURVES = 1
@@ -320,9 +328,10 @@ Public Module IniFile
Return (IniFile.m_nKeyOptions And KEY_OPT.ADVMACHINING) <> 0
End Function
Friend Function IsActiveSpecialPanel() As Boolean
Dim btDummy As ButtonItem = Nothing
Return GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0 AndAlso GetPrivateProfileButton(S_SPECIAL, K_BUTTON & "1", "", btDummy)
Friend Function IsActiveSpecialPanel( Optional bTestButton As Boolean = true) As Boolean
If GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) = 0 Then Return False
If Not bTestButton Then Return True
Return (Not IsNothing(Map.refSpecialPanelVM) AndAlso Map.refSpecialPanelVM.ButtonCount > 0)
End Function
Friend Function GetSpecialLuaVersion( sSpecialLuaDir As String, ByRef sVersion As String) As Boolean