Compare commits
86 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8724a8cee9 | |||
| 17917c682e | |||
| d339d58ad1 | |||
| 6efad10da5 | |||
| 77a708f35f | |||
| 7668db1917 | |||
| 2ad2f50a4f | |||
| 051cbb2a5a | |||
| cf978712ba | |||
| 3e41014f5b | |||
| a62a53ea61 | |||
| 60adc08781 | |||
| 06510d5925 | |||
| d8c97cf352 | |||
| 78310cd711 | |||
| e48cbffa6b | |||
| 4e947f293e | |||
| 014ce6db17 | |||
| 705aeaaab7 | |||
| 228c4f9a48 | |||
| 375c53122c | |||
| bb22395a22 | |||
| e2e365765d | |||
| 4eac19a2ff | |||
| c276398b29 | |||
| e88e19ed3f | |||
| 87fba7e739 | |||
| 92a6cefe67 | |||
| 9193518d4f | |||
| 6e06d76a7c | |||
| dda46787db | |||
| ca2144f058 | |||
| e0ea153122 | |||
| 0b471786cc | |||
| ece48a6523 | |||
| 5e151fd7ec | |||
| ade3d5c1aa | |||
| b3db41c0ae | |||
| ad21ccf4d8 | |||
| 29dd3ca6d4 | |||
| 2174bdfd20 | |||
| d28ac71a5e | |||
| 1f92a28e44 | |||
| 3944eb085f | |||
| 30b436c33b | |||
| d2f947b9b1 | |||
| 50c06fee70 | |||
| 265938c37f | |||
| 3d4cfc0eb8 | |||
| c5ddcff63f | |||
| dc7a3b78cd | |||
| 4147457b7d | |||
| f2d465ff14 | |||
| 3cac37cb0d | |||
| ffa0ce03bb | |||
| 68063e5b39 | |||
| 18505bfa5d | |||
| a7999c4182 | |||
| b0186d096f | |||
| 6e5f917d6f | |||
| 5819bc4bf8 | |||
| dee67518e7 | |||
| 50f5e0528f | |||
| 08ea864a5e | |||
| 7a25e8d634 | |||
| f4163dc818 | |||
| 7beff98f1c | |||
| 4a2928192d | |||
| 1d32d9b634 | |||
| 4a7f552db6 | |||
| f456fedda8 | |||
| 084c4e01ed | |||
| 8d20d1d071 | |||
| a3eae73a52 | |||
| a821341706 | |||
| 9946b15588 | |||
| 4d610cea8b | |||
| 2648b704cc | |||
| e59e8a051a | |||
| 9d8188521e | |||
| 18de1a1ab7 | |||
| 0a7f872912 | |||
| 84b2edd17a | |||
| 7a8c883259 | |||
| 3a7152066b | |||
| 85591b39a7 |
@@ -30,7 +30,7 @@ Public Class AboutBoxWndV
|
||||
" Inst" & IniFile.m_nInstance.ToString() &
|
||||
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
|
||||
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
||||
sInfo &= "SupportPlane " & sAssStatus & Environment.NewLine
|
||||
sInfo &= "SupportPlan " & sAssStatus & Environment.NewLine
|
||||
sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
|
||||
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
|
||||
sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine
|
||||
@@ -70,6 +70,24 @@ Public Class AboutBoxWndV
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||
End If
|
||||
If IniFile.IsActiveWindow() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sWindowDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
|
||||
End If
|
||||
If IniFile.IsActiveTrimming() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sTrimmingDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
|
||||
End If
|
||||
If IniFile.IsActiveReversePost() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sReversePostDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
|
||||
End If
|
||||
If IniFile.IsActiveGunStock() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib.EgtInterface
|
||||
|
||||
' Classe che definisce un elemento di base del TreeView
|
||||
Public Class TreeViewItemBase
|
||||
@@ -34,7 +32,7 @@ Public Class TreeViewItemBase
|
||||
End Property
|
||||
|
||||
Friend m_isExpanded As Boolean
|
||||
Public Property IsExpanded As Boolean
|
||||
Public Property IsExpanded As Boolean
|
||||
Get
|
||||
Return m_isExpanded
|
||||
End Get
|
||||
|
||||
@@ -13,7 +13,7 @@ Public Class BeamMachiningsWindowV
|
||||
m_BeamMachiningsWindowVM = BeamMachiningsWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.m_CloseWindow
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.OnCloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@ Module ConstGen
|
||||
' Chiave di Info in gruppo di lavoro per none part-program
|
||||
Public Const KEY_MCHGRP_NCNAME As String = "NcName"
|
||||
|
||||
' File Dimensioni Griglia CAM5
|
||||
Public Const DIMENSION_FILE_NAME As String = "Dimension.ini"
|
||||
|
||||
' Costante per flag di BBox
|
||||
Public Const BBFLAG As Integer = GDB_BB.ONLY_VISIBLE + GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM
|
||||
|
||||
|
||||
+20
-4
@@ -144,10 +144,6 @@ Module ConstIni
|
||||
Public Const K_BEAMWALLBASEDIR As String = "BaseDir"
|
||||
Public Const K_BEAMWALLBUTTON As String = "Button"
|
||||
|
||||
Public Const S_PRINTING3D As String = "3dPrinting"
|
||||
Public Const K_ENABLE As String = "Enable"
|
||||
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
||||
|
||||
Public Const S_DOORS As String = "Doors"
|
||||
Public Const K_DDFENABLE As String = "DdfEnable"
|
||||
Public Const K_BASEDIR As String = "BaseDir"
|
||||
@@ -161,6 +157,21 @@ Module ConstIni
|
||||
Public Const K_MTABLEWINPLACE As String = "MTableWinPlace"
|
||||
Public Const K_OPTIMIZEMACHFORLINE As String = "OptimizeMachForLine"
|
||||
|
||||
Public Const S_WINDOW As String = "Window"
|
||||
Public Const K_WINDOWENABLE As String = "JwdEnable"
|
||||
Public Const K_WINDOWBASEDIR As String = "BaseDir"
|
||||
Public Const K_WINDOWBUTTON As String = "Button"
|
||||
|
||||
Public Const S_TRIMMING As String = "Trimming"
|
||||
Public Const K_TRIMMINGENABLE As String = "TrimEnable"
|
||||
Public Const K_TRIMMINGBASEDIR As String = "BaseDir"
|
||||
Public Const K_TRIMMINGBUTTON As String = "Button"
|
||||
|
||||
Public Const S_REVERSEPOST As String = "ReversePost"
|
||||
Public Const K_REVERSEPOSTENABLE As String = "RevEnable"
|
||||
Public Const K_REVERSEPOSTBASEDIR As String = "BaseDir"
|
||||
Public Const K_REVERSEPOSTBUTTON As String = "Button"
|
||||
|
||||
Public Const S_GUNSTOCK As String = "GunStock"
|
||||
Public Const K_GUNSTOCKENABLE As String = "GsEnable"
|
||||
Public Const K_GUNSTOCKEXEC As String = "GsExec"
|
||||
@@ -212,4 +223,9 @@ Module ConstIni
|
||||
Public Const S_MRUGUNSTOCKPEZ As String = "MruGunStockPez"
|
||||
Public Const K_FILE As String = "File"
|
||||
|
||||
Public Const S_EXECUTEWINDOW As String = "ExecuteWindow"
|
||||
Public Const K_LEFT As String = "Left"
|
||||
Public Const K_TOP As String = "Top"
|
||||
Public Const K_WIDTH As String = "Width"
|
||||
Public Const K_HEIGHT As String = "Height"
|
||||
End Module
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
m_CurrSetUpVM = CurrSetUpVM
|
||||
End Sub
|
||||
|
||||
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.m_CloseWindow
|
||||
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.OnCloseWindow
|
||||
' Me.DialogResult = bDialogResult
|
||||
'End Sub
|
||||
|
||||
|
||||
@@ -1530,6 +1530,8 @@ Public Class DrawPanelVM
|
||||
Public Sub SolidIntersectSurf(ByVal param As Object)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CUTSURFSURF)
|
||||
ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.TRIMSURFTMWITHCURVE)
|
||||
Else
|
||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SOLIDINTERSECTSURF)
|
||||
End If
|
||||
@@ -2219,6 +2221,7 @@ Public Class DrawPanelVM
|
||||
If Not IniFile.m_ProjectSceneContext = 0 Then
|
||||
bSelOk = EgtGetFirstSelectedObj() <> GDB_ID.NULL
|
||||
bLayerOkAndSelOk = m_bLayerOk And m_bSelOk
|
||||
Map.refStatusBarVM.UpdateSelectedCount()
|
||||
End If
|
||||
|
||||
If Application.m_UpdateLayerTree Then
|
||||
|
||||
+47
-1
@@ -164,6 +164,10 @@
|
||||
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
|
||||
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
|
||||
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
|
||||
<Compile Include="ExecuteWindow\ExecuteWindowV.xaml.vb">
|
||||
<DependentUpon>ExecuteWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ExecuteWindow\ExecuteWindowVM.vb" />
|
||||
<Compile Include="LeftTray\LeftTrayV.xaml.vb">
|
||||
<DependentUpon>LeftTrayV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -289,8 +293,20 @@
|
||||
<Compile Include="Special-BeamWall\WallPanelV.xaml.vb">
|
||||
<DependentUpon>WallPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Special-BeamWall\WallPanelVM.vb" />
|
||||
<Compile Include="Special-BeamWall\Wall.vb" />
|
||||
<Compile Include="Special-BeamWall\WallPanelVM.vb" />
|
||||
<Compile Include="Special-ReversePost\ReversePostPanelV.xaml.vb">
|
||||
<DependentUpon>ReversePostPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Special-ReversePost\ReversePostPanelVM.vb" />
|
||||
<Compile Include="Special-Trimming\TrimmingPanelV.xaml.vb">
|
||||
<DependentUpon>TrimmingPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Special-Trimming\TrimmingPanelVM.vb" />
|
||||
<Compile Include="Special-Window\WindowPanelV.xaml.vb">
|
||||
<DependentUpon>WindowPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Special-Window\WindowPanelVM.vb" />
|
||||
<Compile Include="SpecialPanel\SpecialPanelV.xaml.vb">
|
||||
<DependentUpon>SpecialPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -306,6 +322,7 @@
|
||||
<Compile Include="Utility\Analyze.vb" />
|
||||
<Compile Include="Utility\BasePanelVM.vb" />
|
||||
<Compile Include="Utility\BindingProxy.vb" />
|
||||
<Compile Include="Utility\DynamicGridModule.vb" />
|
||||
<Compile Include="Utility\Map.vb" />
|
||||
<Compile Include="Internals\MruList.vb" />
|
||||
<Compile Include="Utility\MachineModel.vb" />
|
||||
@@ -385,6 +402,7 @@
|
||||
</Compile>
|
||||
<Compile Include="PopUpViewPanel\PopUpViewPanelVM.vb" />
|
||||
<Compile Include="Utility\SelData.vb" />
|
||||
<Compile Include="Utility\WindowStateBehavior.vb" />
|
||||
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
|
||||
<DependentUpon>ViewPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -466,6 +484,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ExecuteWindow\ExecuteWindowV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="LeftTray\LeftTrayV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -634,6 +656,18 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Special-ReversePost\ReversePostPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Special-Trimming\TrimmingPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Special-Window\WindowPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SpecialPanel\SpecialPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -1051,6 +1085,18 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DrawPanel\BiArc.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ExecuteWindow\reload.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolPreview\Head.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolPreview\Tool.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolPreview\Delete.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
|
||||
Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom">
|
||||
Style="{StaticResource GridViewPanelButton}" ContextMenuService.Placement="Bottom">
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding MruScriptNames}" ItemContainerStyle="{StaticResource MruScriptItem}">
|
||||
</ContextMenu>
|
||||
|
||||
@@ -65,8 +65,13 @@ Public Class ExecutePanelVM
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub Exec(ByVal param As Object)
|
||||
Map.refProjectVM.PreExecScript(True)
|
||||
Map.refProjectVM.ExecScript(String.Empty)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
Dim ExecuteWindow As New ExecuteWindowV(Application.Current.MainWindow, New ExecuteWindowVM)
|
||||
ExecuteWindow.ShowDialog()
|
||||
Else
|
||||
Map.refProjectVM.PreExecScript(True)
|
||||
Map.refProjectVM.ExecScript(String.Empty)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ExecCommand
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<EgtWPFLib5:EgtCustomWindow x:Class="ExecuteWindowV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
Title="Execute Window"
|
||||
Height="500" Width="600"
|
||||
IsResizable="True"
|
||||
IsMinimizable="False"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ShowInTaskbar="False"
|
||||
TitleBarHeight="32"
|
||||
PreviewKeyDown="EgtCustomWindow_PreviewKeyDown"
|
||||
EgtCAM5:WindowStateIniBehavior.PersistenceKey="Dimension"
|
||||
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Text="{Binding sScriptText}"
|
||||
Style="{StaticResource ExecuteWindow_TextBox}"/>
|
||||
<Button Grid.Row="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Content="{Binding OkMsg}"
|
||||
Command="{Binding Ok_Command}"
|
||||
Style="{StaticResource EgtCAM5_InputButton}"
|
||||
Margin="0,5,0,10"/>
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding Reload_Command}"
|
||||
IsEnabled="{Binding bReload_IsEnable}"
|
||||
Style="{StaticResource ExecuteWindow_Button}">
|
||||
<Image Source="/Resources/ExecuteWindow/reload.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
@@ -0,0 +1,32 @@
|
||||
Public Class ExecuteWindowV
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private WithEvents m_ExecuteWindowVM As ExecuteWindowVM
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(Owner As Window, ExecuteWindowVM As ExecuteWindowVM)
|
||||
MyBase.New(Owner)
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = ExecuteWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_ExecuteWindowVM = ExecuteWindowVM
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ExecuteWindowVM.OnCloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
Private Sub EgtCustomWindow_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||
If e.Key = Key.Escape Then
|
||||
Me.Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,130 @@
|
||||
Imports System.Text
|
||||
Imports EgtUILib
|
||||
Imports System.IO
|
||||
|
||||
Public Class ExecuteWindowVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Evento per chiusura finestra
|
||||
Friend Event OnCloseWindow(bDialogResult As Boolean)
|
||||
|
||||
Private ReadOnly sScriptFilePath As String = Path.Combine(IniFile.m_sTempDir, "ImmExec" & IniFile.m_nInstance.ToString() & ".lua")
|
||||
|
||||
Private m_sScriptText As String
|
||||
Public Property sScriptText As String
|
||||
Get
|
||||
Return m_sScriptText
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sScriptText = value
|
||||
NotifyPropertyChanged(NameOf(sScriptText))
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetScriptFile(value As String)
|
||||
m_sScriptText = value
|
||||
NotifyPropertyChanged(NameOf(sScriptText))
|
||||
End Sub
|
||||
|
||||
Private m_bReload_IsEnable As Boolean = File.Exists(sScriptFilePath)
|
||||
Public ReadOnly Property bReload_IsEnable As Boolean
|
||||
Get
|
||||
Return m_bReload_IsEnable
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property OkMsg As String
|
||||
Get
|
||||
Return EgtMsg(20041)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SaveMsg As String
|
||||
Get
|
||||
Return EgtMsg(6453)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione Comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdReload As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Sub SaveScript(sPathFileScript As String, sScriptText As String)
|
||||
If String.IsNullOrWhiteSpace(sPathFileScript) OrElse String.IsNullOrWhiteSpace(sScriptText) Then Return
|
||||
File.WriteAllText(sPathFileScript, sScriptText, Encoding.UTF8)
|
||||
End Sub
|
||||
|
||||
Private Function ReadScript(sPathFileScript As String) As String
|
||||
If String.IsNullOrWhiteSpace(sPathFileScript) Then Return String.Empty
|
||||
Return File.ReadAllText(sPathFileScript)
|
||||
End Function
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Ok_Command"
|
||||
|
||||
Public ReadOnly Property Ok_Command As ICommand
|
||||
Get
|
||||
If m_cmdOk Is Nothing Then
|
||||
m_cmdOk = New Command(AddressOf Ok)
|
||||
End If
|
||||
Return m_cmdOk
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Ok()
|
||||
' Verifico ci sia del testo
|
||||
If String.IsNullOrWhiteSpace(m_sScriptText) Then Return
|
||||
' Salva il file script
|
||||
SaveScript(sScriptFilePath, m_sScriptText)
|
||||
' Esegue il file script
|
||||
Map.refProjectVM.PreExecScript(False)
|
||||
Map.refProjectVM.ExecScript(sScriptFilePath)
|
||||
' Se non passato a lavorazione, aggiornamento visualizzazione
|
||||
If IniFile.m_ProjectMode <> ProjectModeOpt.MACHINING Then EgtDraw()
|
||||
' Chiudo finestra
|
||||
RaiseEvent OnCloseWindow(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Ok_Command
|
||||
|
||||
#Region "Reload_Command"
|
||||
|
||||
Public ReadOnly Property Reload_Command As ICommand
|
||||
Get
|
||||
If m_cmdReload Is Nothing Then
|
||||
m_cmdReload = New Command(AddressOf Reload)
|
||||
End If
|
||||
Return m_cmdReload
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Reload()
|
||||
If File.Exists(sScriptFilePath) Then
|
||||
SetScriptFile(ReadScript(sScriptFilePath))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Reload_Command
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
@@ -318,7 +318,7 @@ Public Class MyMachGroupPanelVM
|
||||
EgtUILib.GetPrivateProfileString(S_MCH_GENERAL, K_MATERIAL, sMatType, sMatType, sMachineIniPath)
|
||||
Select Case sMatType
|
||||
Case MCH_MAT_STONE
|
||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE
|
||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.STONE5
|
||||
Case MCH_MAT_WOOD
|
||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
|
||||
Case MCH_MAT_BEAM
|
||||
|
||||
@@ -4,13 +4,13 @@ Imports EgtWPFLib5
|
||||
Class MainWindowV
|
||||
Inherits EgtCustomWindow
|
||||
|
||||
Private Sub Me_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
Private Sub MainWindow_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
If Not ProjectVM.GetAppToShow() Then
|
||||
Me.ShowInTaskbar = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub EgtCustomWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Private Sub MainWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Posizione e dimensioni del Form
|
||||
Dim WinPos As New WinPos
|
||||
If ProjectVM.GetAppToShow() Then
|
||||
@@ -21,6 +21,13 @@ Class MainWindowV
|
||||
WinPosToWindow(Me, WinPos)
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
|
||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt AndAlso Keyboard.IsKeyDown(Key.F4) Then
|
||||
e.Cancel = True
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindow_Drop(sender As Object, e As DragEventArgs)
|
||||
' Se drag di file
|
||||
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||
|
||||
+44
-31
@@ -46,6 +46,13 @@ Public Class MainWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sDimensionDir As String = String.Empty
|
||||
Public ReadOnly Property DimensionDir As String
|
||||
Get
|
||||
Return m_sDimensionDir
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_cmdMainWindow_ContentRendered As ICommand
|
||||
Private m_cmdAboutBox As ICommand
|
||||
' MainWindow Activated Event
|
||||
@@ -97,11 +104,11 @@ Public Class MainWindowVM
|
||||
|
||||
Public ReadOnly Property IconSource As String
|
||||
Get
|
||||
#If PLATFORM = "x64" Then
|
||||
#If PLATFORM = "x64" Then
|
||||
Return "/Resources/EgtCAM5_64.ico"
|
||||
#else
|
||||
Return "/Resources/EgtCAM5.ico"
|
||||
#End If
|
||||
#Else
|
||||
Return "/Resources/EgtCAM5.ico"
|
||||
#End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -164,7 +171,6 @@ Public Class MainWindowVM
|
||||
Public Sub CloseApplication(ByVal param As Object)
|
||||
If IniFile.m_bScriptRunning Then
|
||||
If Not IniFile.m_bFailedRun Then
|
||||
'MessageBox.Show("Can't exit now. Wait until the end of the script execution", "", MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
@@ -189,13 +195,7 @@ Public Class MainWindowVM
|
||||
' Salvo impostazione macchina corrente
|
||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
' Aggiorno istanze usate
|
||||
m_objMutex.WaitOne(1000)
|
||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||
nTmp -= (1 << (IniFile.m_nInstance - 1))
|
||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||
m_objMutex.ReleaseMutex()
|
||||
' Rilascio mutex
|
||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||
ReleaseInstance()
|
||||
' Chiudo la finestra principale del programma
|
||||
Application.Current.MainWindow.Close()
|
||||
Else
|
||||
@@ -203,15 +203,9 @@ Public Class MainWindowVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function OnTerminateProcess( nExitCode As Integer) As Boolean
|
||||
Private Function OnTerminateProcess(nExitCode As Integer) As Boolean
|
||||
' Aggiorno istanze usate
|
||||
m_objMutex.WaitOne(1000)
|
||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||
nTmp -= (1 << (IniFile.m_nInstance - 1))
|
||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||
m_objMutex.ReleaseMutex()
|
||||
' Rilascio mutex
|
||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||
ReleaseInstance()
|
||||
' Dichiaro di procedere con la terminazione del programma
|
||||
Return True
|
||||
End Function
|
||||
@@ -306,12 +300,9 @@ Public Class MainWindowVM
|
||||
Map.refMainWindowVM.ManageClosingApplication()
|
||||
' Terminazione generale di EgtInterface
|
||||
EgtExit()
|
||||
' Rilascio mutex
|
||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||
' Aggiorno istanze usate
|
||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||
nTmp -= (1 << (IniFile.m_nInstance - 1))
|
||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||
ReleaseInstance()
|
||||
' Termino
|
||||
Application.Current.Shutdown()
|
||||
End Sub
|
||||
|
||||
@@ -362,6 +353,8 @@ Public Class MainWindowVM
|
||||
Else
|
||||
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
|
||||
End If
|
||||
' Recupero percorso file Dimension
|
||||
m_sDimensionDir = m_sConfigDir & "\" & DIMENSION_FILE_NAME
|
||||
' Verifico indice di istanza
|
||||
ManageInstance()
|
||||
' Imposto tipo di chiave
|
||||
@@ -385,8 +378,8 @@ Public Class MainWindowVM
|
||||
EgtSetLockId(sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2711, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2711, 1, IniFile.m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 3105, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 3105, 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
|
||||
@@ -529,6 +522,17 @@ Public Class MainWindowVM
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ReleaseInstance()
|
||||
' Aggiorno istanze usate
|
||||
Dim bOk As Boolean = m_objMutex.WaitOne(1000)
|
||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||
nTmp -= (1 << (IniFile.m_nInstance - 1))
|
||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||
If bOk Then m_objMutex.ReleaseMutex()
|
||||
' Rilascio mutex
|
||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||
End Sub
|
||||
|
||||
Friend Sub NotifyMainWindow_ContentRendered()
|
||||
' Notifico ProjectVM
|
||||
@@ -597,18 +601,27 @@ Public Class MainWindowVM
|
||||
' pulisco output
|
||||
Map.refStatusBarVM.NotifyStatusOutput("")
|
||||
Map.refInputExpanderVM.ResetInputBox()
|
||||
If not IsNothing( Map.refMachiningParameterExpanderVM) Then
|
||||
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
|
||||
' Nascondo la combobox delle usernotes
|
||||
Map.refMachiningParameterExpanderVM.CurrOperation.SetComboAddVisibility(Visibility.Collapsed)
|
||||
'riattivo il pulsante per visualizzare la combobox delle note
|
||||
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_IsEnable(True)
|
||||
End If
|
||||
ElseIf e.Key = Key.Left OrElse e.Key = Key.Right OrElse e.Key = Key.Up OrElse e.Key = Key.Down AndAlso
|
||||
Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
|
||||
ElseIf (e.Key = Key.Left OrElse e.Key = Key.Right) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
|
||||
If Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander Then Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander = True
|
||||
Map.refMachiningParameterExpanderVM.FocusSlider()
|
||||
Dim nStep As Integer = If(e.Key = Key.Right OrElse e.Key = Key.Up, 1, -1)
|
||||
Dim nStep As Integer = If(e.Key = Key.Right, 1, -1)
|
||||
Map.refMachiningParameterExpanderVM.SetSliderValue(nStep)
|
||||
e.Handled = True
|
||||
ElseIf (e.Key = Key.Up OrElse e.Key = Key.Down) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
|
||||
If Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander Then Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander = True
|
||||
Map.refMachiningParameterExpanderVM.FocusButtonPreview()
|
||||
If e.Key = Key.Down Then
|
||||
Map.refMachiningParameterExpanderVM.RevertPreviewMachiningTool()
|
||||
Else
|
||||
Map.refMachiningParameterExpanderVM.PreviewMachiningTool()
|
||||
End If
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtCAM5")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2026 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -70,6 +70,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.11.2")>
|
||||
<Assembly: AssemblyFileVersion("2.7.11.2")>
|
||||
<Assembly: AssemblyVersion("3.1.5.2")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.2")>
|
||||
|
||||
|
||||
@@ -7,10 +7,8 @@
|
||||
<Expander.Header>
|
||||
<TextBlock Text="{Binding PropertiesMsg}"/>
|
||||
</Expander.Header>
|
||||
<UniformGrid>
|
||||
<TextBox Text="{Binding InfoBox, Mode=OneWay}" MaxHeight="100" IsReadOnly="True"
|
||||
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
|
||||
</UniformGrid>
|
||||
<TextBox Text="{Binding InfoBox, Mode=OneWay}" IsReadOnly="True"
|
||||
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
|
||||
</Expander>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -21,6 +21,7 @@ Public Class InfoExpanderVM
|
||||
Set(value As Boolean)
|
||||
If value <> m_IsExpanded Then
|
||||
m_IsExpanded = value
|
||||
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(m_IsExpanded)
|
||||
OnPropertyChanged("IsEnabled")
|
||||
End If
|
||||
End Set
|
||||
|
||||
@@ -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}"/>
|
||||
|
||||
@@ -8,4 +8,10 @@
|
||||
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
|
||||
|
||||
@@ -10,19 +10,8 @@ Public Class InputExpanderVM
|
||||
' Variabile temporanea per salvare bShow
|
||||
Private m_bTempShow As Boolean
|
||||
|
||||
Private m_tmpInfoList As New ObservableCollection(Of InfoItem)
|
||||
''' <summary>
|
||||
''' Lista temporanea delle info
|
||||
''' </summary>
|
||||
Private Property tmpInfoList As ObservableCollection(Of InfoItem)
|
||||
Get
|
||||
Return m_tmpInfoList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of InfoItem))
|
||||
m_tmpInfoList = value
|
||||
OnPropertyChanged("tmpInfoList")
|
||||
End Set
|
||||
End Property
|
||||
' Lista temporanea delle Info
|
||||
Private m_TempInfoList As New List(Of InfoItem)
|
||||
|
||||
' Expander fields
|
||||
Private m_IsExpanded As Boolean
|
||||
@@ -166,21 +155,21 @@ Public Class InputExpanderVM
|
||||
Set(value As Integer)
|
||||
If m_bTempShow Then Map.refProjectVM.SetLastInteger(value)
|
||||
m_ComboSelectedIndex = value
|
||||
Dim tmpComboSelectedIndex As Integer = ComboSelectedIndex
|
||||
If m_ComboSelectedIndex >= 0 AndAlso tmpInfoList.Count > 0 Then
|
||||
' se la info è presente la aggiungo alla textbox per modificarla
|
||||
If m_TextBox IsNot String.Empty Then
|
||||
' se la combo è di Info ed è valida, la aggiungo alla textbox
|
||||
If m_ComboSelectedIndex >= 0 AndAlso m_TempInfoList.Count() > 0 Then
|
||||
Dim CurrItem As InfoItem = m_TempInfoList(m_ComboSelectedIndex)
|
||||
If String.IsNullOrEmpty(m_TextBox) Then
|
||||
m_TextBox = CurrItem.sKey & "=" & CurrItem.sValue
|
||||
Else
|
||||
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
|
||||
m_TextBox &= CurrItem.sKey & "=" & CurrItem.sValue
|
||||
End If
|
||||
ComboVisibility = Visibility.Collapsed
|
||||
ComboItemsList.Remove((tmpInfoList(m_ComboSelectedIndex).sKey & "=" & m_tmpInfoList(m_ComboSelectedIndex).sValour).Trim())
|
||||
tmpInfoList.Remove(tmpInfoList(tmpComboSelectedIndex))
|
||||
ComboItemsList.RemoveAt(m_ComboSelectedIndex)
|
||||
m_TempInfoList.RemoveAt(m_ComboSelectedIndex)
|
||||
m_ComboSelectedIndex = -1
|
||||
If ComboItemsList.Count <= 0 Then ShowInfoItemVisibility = Visibility.Collapsed
|
||||
End If
|
||||
m_ComboSelectedIndex = -1
|
||||
If ComboItemsList.Count <= 0 Then ShowInfoItemVisibility = Visibility.Collapsed
|
||||
OnPropertyChanged("ComboSelectedIndex")
|
||||
OnPropertyChanged("ComboItemsList")
|
||||
OnPropertyChanged("TextBox")
|
||||
@@ -342,13 +331,16 @@ Public Class InputExpanderVM
|
||||
''' <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
|
||||
If Not String.IsNullOrWhiteSpace( m_TextBox) Then
|
||||
Dim vLines As String() = m_TextBox.Split( vbCrLf.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
|
||||
For Each sLine As String In vLines
|
||||
Dim vKeyVal As String() = sLine.Split("="c)
|
||||
Dim nInd As Integer = m_TempInfoList.FindIndex( Function(x) x.sKey = vKeyVal(0))
|
||||
If nInd <> -1 Then
|
||||
ComboItemsList.RemoveAt( nInd)
|
||||
m_TempInfoList.RemoveAt( nInd)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
ComboVisibility = Visibility.Visible
|
||||
End Sub
|
||||
@@ -381,7 +373,7 @@ Public Class InputExpanderVM
|
||||
If PrepareInputBoxParam.bShowCombo Then
|
||||
m_bTempShow = PrepareInputBoxParam.bShowCombo
|
||||
ComboItemsList.Clear()
|
||||
tmpInfoList.Clear()
|
||||
m_TempInfoList.Clear()
|
||||
ComboVisibility = Visibility.Visible
|
||||
End If
|
||||
If PrepareInputBoxParam.bShowBtn Then
|
||||
@@ -437,22 +429,18 @@ Public Class InputExpanderVM
|
||||
''' Funzione che popola la lista ComboItemsList
|
||||
''' </summary>
|
||||
Private Sub ComboInfo()
|
||||
tmpInfoList.Clear()
|
||||
|
||||
m_TempInfoList.Clear()
|
||||
ComboItemsList.Clear()
|
||||
|
||||
Dim vsVal As String() = Nothing
|
||||
EgtGetAllInfo(Map.refManageLayerExpanderVM.RightClickedTreeItemId, vsVal)
|
||||
Dim vsInfo As String() = Nothing
|
||||
EgtGetAllInfo( Map.refManageLayerExpanderVM.RightClickedTreeItemId, vsInfo)
|
||||
|
||||
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 & "=" & InfoItem.sValour).Trim())
|
||||
If Not m_bTempShow And Not IsNothing( vsInfo) Then
|
||||
For nInd As Integer = 0 To vsInfo.Count() - 1
|
||||
Dim vKeyVal As String() = vsInfo( nInd).Split("="c)
|
||||
m_TempInfoList.Add(New InfoItem( nInd, vKeyVal(0), vKeyVal(1)))
|
||||
ComboItemsList.Add( vsInfo( nInd))
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -19,11 +19,12 @@ Public Class LayerTreeViewItem
|
||||
''' </summary>
|
||||
Public Overrides Property IsSelected As Boolean
|
||||
Get
|
||||
Return m_IsSelected
|
||||
Return m_isSelected
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If (value <> m_IsSelected) Then
|
||||
m_IsSelected = value
|
||||
If value Then Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(value)
|
||||
If (value <> m_isSelected) Then
|
||||
m_isSelected = value
|
||||
If value Then
|
||||
' recupero l'Id del nuovo oggetto selezionato
|
||||
Map.refManageLayerExpanderVM.IsRightClickedLayerTreeItem(False)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:expression="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
|
||||
xmlns:local="clr-namespace:EgtCAM5">
|
||||
|
||||
<Expander IsExpanded="True" Style="{StaticResource ExpanderStyle}">
|
||||
<Expander IsExpanded="{Binding ManageLayerIsExpanded}" Style="{StaticResource ExpanderStyle}">
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding HeaderName}" Margin="0,0,5,0"/>
|
||||
@@ -13,7 +13,11 @@
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<UniformGrid Rows="1">
|
||||
<Button Content="{Binding NewPartMsg}" Command="{Binding NewPartCommand}" Height="30"/>
|
||||
@@ -21,7 +25,7 @@
|
||||
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TreeView x:Name="LayerTreeView" MinHeight="300" MaxHeight="400"
|
||||
<TreeView Grid.Row="1" x:Name="LayerTreeView"
|
||||
ItemsSource="{Binding Path=LayerList}"
|
||||
VirtualizingStackPanel.IsVirtualizing = "True"
|
||||
VirtualizingStackPanel.VirtualizationMode = "Recycling">
|
||||
@@ -116,6 +120,6 @@
|
||||
</ContextMenu>
|
||||
</TreeView.ContextMenu>
|
||||
</TreeView>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtCAM5.IniFile
|
||||
|
||||
Public Class ManageLayerExpanderVM
|
||||
Inherits ViewModelBase
|
||||
@@ -30,22 +29,6 @@ Public Class ManageLayerExpanderVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNewPart As ICommand
|
||||
Private m_cmdNewLayer As ICommand
|
||||
Private m_cmdLayerColor As ICommand
|
||||
Private m_cmdTreeViewDoubleClick As ICommand
|
||||
Private m_cmdTreeViewMouseUp As ICommand
|
||||
Private m_cmdTreeViewMouseRightButton As ICommand
|
||||
Private m_cmdSelect As ICommand
|
||||
Private m_cmdDeselect As ICommand
|
||||
Private m_cmdName As ICommand
|
||||
Private m_cmdInfo As ICommand
|
||||
Private m_cmdRelocate As ICommand
|
||||
Private m_cmdCopy As ICommand
|
||||
Private m_cmdDelete As ICommand
|
||||
Private m_cmdSave As ICommand
|
||||
|
||||
' Lista dei layer
|
||||
Private m_LayerList As New ObservableCollection(Of LayerTreeViewItem)
|
||||
Public Property LayerList As ObservableCollection(Of LayerTreeViewItem)
|
||||
@@ -54,6 +37,7 @@ Public Class ManageLayerExpanderVM
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of LayerTreeViewItem))
|
||||
m_LayerList = value
|
||||
OnPropertyChanged("LayerList")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -71,6 +55,22 @@ Public Class ManageLayerExpanderVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ManageLayerIsExpanded As Boolean
|
||||
Public Property ManageLayerIsExpanded As Boolean
|
||||
Get
|
||||
Return m_ManageLayerIsExpanded
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_ManageLayerIsExpanded = value
|
||||
Map.refDrawOptionPanelVM.SetManageLayerRowIsExpanded(m_ManageLayerIsExpanded)
|
||||
OnPropertyChanged("ManageLayerIsExpanded")
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetManageLayerIsExpanded(value As Boolean)
|
||||
m_ManageLayerIsExpanded = value
|
||||
OnPropertyChanged("ManageLayerIsExpanded")
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property NewPartMsg As String
|
||||
@@ -131,6 +131,22 @@ Public Class ManageLayerExpanderVM
|
||||
|
||||
#End Region
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNewPart As ICommand
|
||||
Private m_cmdNewLayer As ICommand
|
||||
Private m_cmdLayerColor As ICommand
|
||||
Private m_cmdTreeViewDoubleClick As ICommand
|
||||
Private m_cmdTreeViewMouseUp As ICommand
|
||||
Private m_cmdTreeViewMouseRightButton As ICommand
|
||||
Private m_cmdSelect As ICommand
|
||||
Private m_cmdDeselect As ICommand
|
||||
Private m_cmdName As ICommand
|
||||
Private m_cmdInfo As ICommand
|
||||
Private m_cmdRelocate As ICommand
|
||||
Private m_cmdCopy As ICommand
|
||||
Private m_cmdDelete As ICommand
|
||||
Private m_cmdSave As ICommand
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -140,6 +156,7 @@ Public Class ManageLayerExpanderVM
|
||||
Map.SetRefManageLayerExpanderVM(Me)
|
||||
'Imposto tempo di evidenziazione delle entità clickate
|
||||
ObjTreeTimer.Interval = TimeSpan.FromMilliseconds(1000)
|
||||
SetManageLayerIsExpanded(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
@@ -241,6 +258,7 @@ Public Class ManageLayerExpanderVM
|
||||
If m_nObjTreeOldId <> GDB_ID.NULL Then
|
||||
Map.refProjectVM.SetLastInteger(m_nObjTreeOldId)
|
||||
Map.refProjectVM.ExecuteCommand(Controller.CMD.SETCURRPARTLAYER)
|
||||
Map.refDrawOptionPanelVM.SetInfoRowIsExpanded(True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
<UserControl x:Class="DrawOptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
||||
|
||||
<StackPanel Name="ciao" Background="Transparent" Margin="0,0,3.5001,0" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||
<Grid x:Name="DrawGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MinHeight="100" MaxHeight="800"
|
||||
EgtCAM5:DrawOptionPanelVM.RowId="ManageLayer"
|
||||
EgtCAM5:DrawOptionPanelVM.IsExpanded="{Binding ManageLayerRowIsExpanded}"
|
||||
EgtCAM5:DrawOptionPanelVM.TargetSplitter="{Binding ElementName=ManagerLayerGridSplitter}"/>
|
||||
<RowDefinition MinHeight="100" MaxHeight="400"
|
||||
EgtCAM5:DrawOptionPanelVM.RowId="Info"
|
||||
EgtCAM5:DrawOptionPanelVM.IsExpanded="{Binding InfoRowIsExpanded}"
|
||||
EgtCAM5:DrawOptionPanelVM.TargetSplitter="{Binding ElementName=InfoGridSplitter}"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--ContentPresenter that contains the ManageLayerExpander-->
|
||||
<ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/>
|
||||
<GridSplitter x:Name="ManagerLayerGridSplitter" Style="{StaticResource General_GridSplitter}"/>
|
||||
<!--ContentPresenter that contains the InfoExpander-->
|
||||
<ContentPresenter Content="{Binding InfoExpander}"/>
|
||||
<ContentPresenter Grid.Row="1" Content="{Binding InfoExpander}"/>
|
||||
<GridSplitter x:Name="InfoGridSplitter" Grid.Row="1" Style="{StaticResource General_GridSplitter}"/>
|
||||
<!--ContentPresenter that contains the InputExpander-->
|
||||
<ContentPresenter Content="{Binding InputExpander}"/>
|
||||
</StackPanel>
|
||||
<ContentPresenter Grid.Row="2" Content="{Binding InputExpander}"/>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -1,7 +1,30 @@
|
||||
Public Class DrawOptionPanelV
|
||||
|
||||
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
||||
Dim x = ciao.MaxHeight
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
Map.SetRefDrawOptionPanelV(Me)
|
||||
If Not IsActivePlugin() Then
|
||||
AddHandler DrawGrid.Loaded,
|
||||
Sub()
|
||||
DynamicGridModule.RestoreDrawGridLayout(DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
DynamicGridModule.RestoreDrawGridLayout(DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
DrawGrid.UpdateLayout()
|
||||
End Sub
|
||||
|
||||
AddHandler ManagerLayerGridSplitter.DragCompleted,
|
||||
Sub()
|
||||
DynamicGridModule.SaveDrawGridLayout(DrawGrid, "ManageLayer", If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
End Sub
|
||||
|
||||
AddHandler InfoGridSplitter.DragCompleted,
|
||||
Sub()
|
||||
DynamicGridModule.SaveDrawGridLayout(DrawGrid, "Info", If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
End Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Imports EgtUILib
|
||||
Imports System.IO
|
||||
|
||||
Public Class DrawOptionPanelVM
|
||||
Inherits ViewModelBase
|
||||
@@ -37,6 +37,28 @@ Public Class DrawOptionPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ManageLayerRowIsExpanded As Boolean = True
|
||||
Public ReadOnly Property ManageLayerRowIsExpanded As Boolean
|
||||
Get
|
||||
Return m_ManageLayerRowIsExpanded
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetManageLayerRowIsExpanded(value As Boolean)
|
||||
m_ManageLayerRowIsExpanded = value
|
||||
OnPropertyChanged("ManageLayerRowIsExpanded")
|
||||
End Sub
|
||||
|
||||
Private m_InfoRowIsExpanded As Boolean = True
|
||||
Public ReadOnly Property InfoRowIsExpanded As Boolean
|
||||
Get
|
||||
Return m_InfoRowIsExpanded
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetInfoRowIsExpanded(value As Boolean)
|
||||
m_InfoRowIsExpanded = value
|
||||
OnPropertyChanged("InfoRowIsExpanded")
|
||||
End Sub
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
@@ -60,4 +82,93 @@ Public Class DrawOptionPanelVM
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "DEPENCY PROPERTY"
|
||||
|
||||
Public Shared ReadOnly RowIdProperty As DependencyProperty =
|
||||
DependencyProperty.RegisterAttached(
|
||||
"RowId",
|
||||
GetType(String),
|
||||
GetType(DrawOptionPanelVM),
|
||||
New PropertyMetadata(Nothing)
|
||||
)
|
||||
|
||||
Public Shared Sub SetRowId(element As DependencyObject, value As String)
|
||||
element.SetValue(RowIdProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetRowId(element As DependencyObject) As String
|
||||
Return CType(element.GetValue(RowIdProperty), String)
|
||||
End Function
|
||||
|
||||
Public Shared ReadOnly IsExpandedProperty As DependencyProperty =
|
||||
DependencyProperty.RegisterAttached(
|
||||
"IsExpanded",
|
||||
GetType(Boolean),
|
||||
GetType(DrawOptionPanelVM),
|
||||
New PropertyMetadata(True, AddressOf OnIsExpandedChanged)
|
||||
)
|
||||
|
||||
Public Shared Sub SetIsExpanded(element As DependencyObject, value As Boolean)
|
||||
element.SetValue(IsExpandedProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetIsExpanded(element As DependencyObject) As Boolean
|
||||
Return CType(element.GetValue(IsExpandedProperty), Boolean)
|
||||
End Function
|
||||
|
||||
Public Shared Function GetTargetSplitter(d As DependencyObject) As GridSplitter
|
||||
Return CType(d.GetValue(TargetSplitterProperty), GridSplitter)
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetTargetSplitter(d As DependencyObject, value As GridSplitter)
|
||||
d.SetValue(TargetSplitterProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly TargetSplitterProperty As DependencyProperty =
|
||||
DependencyProperty.RegisterAttached(
|
||||
"TargetSplitter",
|
||||
GetType(GridSplitter),
|
||||
GetType(DrawOptionPanelVM),
|
||||
New PropertyMetadata(Nothing)
|
||||
)
|
||||
|
||||
Private Shared Sub OnIsExpandedChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
|
||||
Dim row As RowDefinition = TryCast(d, RowDefinition)
|
||||
If IsNothing(row) Then Return
|
||||
|
||||
Dim isExpanded As Boolean = CBool(e.NewValue)
|
||||
|
||||
Dim splitter = DrawOptionPanelVM.GetTargetSplitter(row)
|
||||
If splitter IsNot Nothing Then
|
||||
splitter.IsEnabled = isExpanded
|
||||
splitter.Visibility = If(isExpanded, Visibility.Visible, Visibility.Collapsed)
|
||||
End If
|
||||
|
||||
Dim rowId As String = GetRowId(row)
|
||||
Dim rowHeight As Double = 0
|
||||
|
||||
If rowId = "ManageLayer" Then
|
||||
rowHeight = 400
|
||||
ElseIf rowId = "Info" Then
|
||||
rowHeight = 150
|
||||
End If
|
||||
|
||||
If Not isExpanded Then
|
||||
row.ClearValue(RowDefinition.HeightProperty)
|
||||
|
||||
row.Height = New GridLength(1, GridUnitType.Auto)
|
||||
row.MinHeight = 0
|
||||
Else
|
||||
If File.Exists(Map.refMainWindowVM.DimensionDir) Then
|
||||
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
Map.refDrawOptionPanelV.DrawGrid.UpdateLayout()
|
||||
Else
|
||||
row.Height = New GridLength(rowHeight)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Depency Property
|
||||
|
||||
End Class
|
||||
@@ -18,6 +18,7 @@ Public Class EstimationsExpanderVM
|
||||
Set(value As Boolean)
|
||||
If value <> m_Estimation_IsExpanded Then
|
||||
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.ESTIMATIONS, value)
|
||||
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -138,7 +139,7 @@ Public Class EstimationsExpanderVM
|
||||
If Not String.IsNullOrEmpty(sCurrFilePath) Then
|
||||
sInfo = "EgtCAM5 - " & sCurrFilePath
|
||||
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sEstFile) AndAlso Not String.IsNullOrWhiteSpace(sEstFile) Then
|
||||
sEstFile = Path.ChangeExtension(Path.GetDirectoryName(sCurrFilePath) & "\" & sEstFile, ".html")
|
||||
sEstFile = Path.ChangeExtension(Path.GetDirectoryName(sCurrFilePath) & "\" & Path.GetFileName( sEstFile), ".html")
|
||||
Else
|
||||
sEstFile = Path.ChangeExtension(sCurrFilePath, Nothing)
|
||||
If IniFile.m_bMachiningGroup Then
|
||||
|
||||
+5
-20
@@ -94,26 +94,11 @@ Public Class MachiningTreeExpanderVM
|
||||
' Sposto la lavorazione aggiunta subito dopo quella appena selezionata
|
||||
EgtRelocate(MachiningId, nSelectedOperationId, GDB_POS.AFTER)
|
||||
End If
|
||||
' Recupero geometria correntemente selezionata e la metto in un vettore
|
||||
Dim SelectedEntities As New List(Of Integer)
|
||||
Dim EntityId As Integer = EgtGetFirstSelectedObj()
|
||||
While EntityId <> GDB_ID.NULL
|
||||
SelectedEntities.Add(EntityId)
|
||||
EntityId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
' Imposto l'operazione appena creata come corrente
|
||||
EgtSetCurrMachining(MachiningId)
|
||||
' Gestione speciale per superfici ( si aggiunge l'identificazione della faccia)
|
||||
If SelectedEntities.Count() > 0 AndAlso EgtGetType(SelectedEntities(0)) = GDB_TY.SRF_MESH Then
|
||||
Dim vId() As Integer = Nothing
|
||||
Dim vSub() As Integer = Nothing
|
||||
SelData.GetAllIdSub(vId, vSub)
|
||||
EgtSetMachiningGeometry(vId, vSub)
|
||||
' Gestione standard per altre entità (curve, regioni, ...)
|
||||
Else
|
||||
' Imposto il vettore come geometria di lavorazione
|
||||
EgtSetMachiningGeometry(SelectedEntities.ToArray)
|
||||
End If
|
||||
' Imposto geometria da lavorare (tutta quella selezionata)
|
||||
Dim vId() As Integer = Nothing
|
||||
Dim vSub() As Integer = Nothing
|
||||
SelData.GetAllSelectedGeom(vId, vSub)
|
||||
EgtSetMachiningGeometry(vId, vSub)
|
||||
' Calcolo la lavorazione con la nuova geometria
|
||||
EgtApplyMachining(True)
|
||||
EgtDraw()
|
||||
|
||||
+9
-12
@@ -80,28 +80,25 @@
|
||||
|
||||
<Button Name="ApplyMachBtn" Height="30" Content="{Binding UpdateMachiningBtnMsg}"
|
||||
Command="{Binding UpdateMachiningCommand}" Background="{Binding UpdateMachiningBtn_Background}"/>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="0,2.5,0,2.5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<CheckBox Name="ViewToolBtn"
|
||||
Content="{Binding ViewToolBtnMsg}"
|
||||
IsChecked="{Binding ViewTool}"
|
||||
Style="{StaticResource ViewTool_CheckBox}"/>
|
||||
<Button Command="{Binding PreviewMachiningTool_Command}"
|
||||
x:Name="ButtonPreview"
|
||||
Style="{StaticResource PreviewTool_Button}">
|
||||
<Image Source="{Binding sToolPreview_Image}" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
<Slider Grid.Row="1"
|
||||
<Slider Grid.Column="1"
|
||||
x:Name="SliderV"
|
||||
Value="{Binding SliderValue}"
|
||||
IsEnabled="{Binding IsChecked, ElementName=ViewToolBtn}"
|
||||
IsEnabled="{Binding Slider_IsEnable}"
|
||||
TickFrequency="{Binding SliderTick}"
|
||||
Minimum="1"
|
||||
Maximum="{Binding SliderScale}"
|
||||
IsSnapToTickEnabled="False"
|
||||
Style="{StaticResource SliderValue_Slider}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
+13
-3
@@ -1,5 +1,5 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtWPFLib5.EgtFloating
|
||||
Imports EgtCAM5.MachiningParameterExpanderVM
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MachiningParameterExpanderV
|
||||
|
||||
@@ -9,9 +9,12 @@ Public Class MachiningParameterExpanderV
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
|
||||
Me.SliderV.Focusable = False
|
||||
' Associo il gestore evento m_EventFocusOnSlider all'evento generato da FocusOnSlider
|
||||
AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnSlider, AddressOf FocusOnSlider
|
||||
' Associo il gestore evento m_EventFocusOnButtonPreview all'evento generato da FocusOnButtonPreview
|
||||
AddHandler Map.refMachiningParameterExpanderVM.m_EventFocusOnButtonPreview, AddressOf FocusOnButtonPreview
|
||||
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
@@ -21,4 +24,11 @@ Public Class MachiningParameterExpanderV
|
||||
Me.SliderV.Focus()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Funzione che mette il focus sul bottone
|
||||
''' </summary>
|
||||
Friend Sub FocusOnButtonPreview()
|
||||
Me.ButtonPreview.Focus()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+129
-66
@@ -1,6 +1,4 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachiningParameterExpanderVM
|
||||
@@ -10,6 +8,32 @@ Public Class MachiningParameterExpanderVM
|
||||
''' Evento che permette di mettere il focus sullo slider
|
||||
''' </summary>
|
||||
Friend Event m_EventFocusOnSlider()
|
||||
''' <summary>
|
||||
''' Evento che permette di mettere il focus sul bottone
|
||||
''' </summary>
|
||||
Friend Event m_EventFocusOnButtonPreview()
|
||||
|
||||
Private m_nPreviewMachiningTool As Integer = MCH_LOOK.NONE
|
||||
Public ReadOnly Property nPreviewMachiningTool As Integer
|
||||
Get
|
||||
Return m_nPreviewMachiningTool
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetPreviewMachiningTool(value As MCH_LOOK)
|
||||
m_nPreviewMachiningTool = value
|
||||
NotifyPropertyChanged(NameOf(nPreviewMachiningTool))
|
||||
End Sub
|
||||
|
||||
Private m_sToolPreview_Image As String
|
||||
Public ReadOnly Property sToolPreview_Image As String
|
||||
Get
|
||||
Return m_sToolPreview_Image
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetToolPreview_Image(value As String)
|
||||
m_sToolPreview_Image = value
|
||||
NotifyPropertyChanged(NameOf(sToolPreview_Image))
|
||||
End Sub
|
||||
|
||||
Private WithEvents m_CurrOperation As MachiningTreeViewItem
|
||||
Public Property CurrOperation As MachiningTreeViewItem
|
||||
@@ -54,29 +78,6 @@ Public Class MachiningParameterExpanderVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bPreviewTool As Boolean = False
|
||||
Public Property ViewTool As Boolean
|
||||
Get
|
||||
Return m_bPreviewTool
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
EgtPreparePreviewMachiningTool()
|
||||
m_bPreviewTool = True
|
||||
ResetSliderValue()
|
||||
Else
|
||||
EgtRemovePreviewMachiningTool()
|
||||
m_bPreviewTool = False
|
||||
ResetSliderValue()
|
||||
End If
|
||||
EgtDraw()
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetViewTool(value As Boolean)
|
||||
ViewTool = value
|
||||
NotifyPropertyChanged("ViewTool")
|
||||
End Sub
|
||||
|
||||
' Slider per muovere l'utensile in aggiunta ai pulsanti indietro e avanti
|
||||
Private m_SliderScale As Integer = 100
|
||||
Public ReadOnly Property SliderScale As Integer
|
||||
@@ -85,15 +86,15 @@ Public Class MachiningParameterExpanderVM
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetSliderScale(value As Integer)
|
||||
m_SliderScale = Math.Max( value, 1)
|
||||
m_SliderScale = Math.Max(value, 1)
|
||||
If m_SliderScale <= 10 Then
|
||||
m_SliderTick = 1
|
||||
Else
|
||||
m_SliderTick = CInt( m_SliderScale / 10)
|
||||
m_SliderTick = CInt(m_SliderScale / 10)
|
||||
End If
|
||||
NotifyPropertyChanged( NameOf(SliderScale))
|
||||
NotifyPropertyChanged( NameOf(SliderTick))
|
||||
End Sub
|
||||
NotifyPropertyChanged(NameOf(SliderScale))
|
||||
NotifyPropertyChanged(NameOf(SliderTick))
|
||||
End Sub
|
||||
|
||||
Private m_SliderTick As Integer = 10
|
||||
Public ReadOnly Property SliderTick As Integer
|
||||
@@ -109,7 +110,7 @@ Public Class MachiningParameterExpanderVM
|
||||
Return m_SliderValue
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If m_bPreviewTool Then
|
||||
If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
|
||||
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, value - m_SliderValue)
|
||||
If nId <> GDB_ID.NULL Then m_nPtEntId = nId
|
||||
EgtDraw()
|
||||
@@ -118,7 +119,7 @@ Public Class MachiningParameterExpanderVM
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub ResetSliderValue()
|
||||
If m_bPreviewTool Then
|
||||
If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
|
||||
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
|
||||
Else
|
||||
m_nPtEntId = GDB_ID.NULL
|
||||
@@ -127,8 +128,9 @@ Public Class MachiningParameterExpanderVM
|
||||
NotifyPropertyChanged(NameOf(SliderValue))
|
||||
End Sub
|
||||
Friend Sub SetSliderValue(value As Integer)
|
||||
If m_nPreviewMachiningTool = MCH_LOOK.NONE Then Return
|
||||
Dim nOldSliderValue As Integer = m_SliderValue
|
||||
m_SliderValue = Math.Min( Math.Max( m_SliderValue + value, 1), m_SliderScale)
|
||||
m_SliderValue = Math.Min(Math.Max(m_SliderValue + value, 1), m_SliderScale)
|
||||
Dim nStep As Integer = m_SliderValue - nOldSliderValue
|
||||
If nStep = 0 Then Return
|
||||
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, nStep)
|
||||
@@ -137,6 +139,17 @@ Public Class MachiningParameterExpanderVM
|
||||
NotifyPropertyChanged(NameOf(SliderValue))
|
||||
End Sub
|
||||
|
||||
Private m_Slider_IsEnable As Boolean
|
||||
Public ReadOnly Property Slider_IsEnable As Boolean
|
||||
Get
|
||||
Return m_Slider_IsEnable
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetSlider_IsEnable(value As Boolean)
|
||||
m_Slider_IsEnable = value
|
||||
NotifyPropertyChanged(NameOf(Slider_IsEnable))
|
||||
End Sub
|
||||
|
||||
Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
|
||||
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
|
||||
Dim WoodMillParamExpanderV As WoodMillingParameterExpanderV
|
||||
@@ -175,7 +188,11 @@ Public Class MachiningParameterExpanderVM
|
||||
Dim nType As Integer
|
||||
EgtGetMachiningParam(MCH_MP.NAME, sName)
|
||||
EgtGetMachiningParam(MCH_MP.TYPE, nType)
|
||||
Dim oldValue As Boolean = If(Not IsNothing(m_CurrOperation), m_CurrOperation.AdvancedParamIsExpander, False)
|
||||
Dim oldOperation As MachiningTreeViewItem = If(Not IsNothing(m_CurrOperation), m_CurrOperation, Nothing)
|
||||
|
||||
m_CurrOperation = New MachiningTreeViewItem(sName, DirectCast(nType, MCH_MY))
|
||||
m_CurrOperation.AdvancedParamIsExpander = oldValue
|
||||
|
||||
m_CurrOperation.ReadOperationParam()
|
||||
|
||||
@@ -193,7 +210,7 @@ Public Class MachiningParameterExpanderVM
|
||||
|
||||
Select Case nType
|
||||
Case MCH_OY.DRILLING
|
||||
If MatType = MaterialType.STONE Then
|
||||
If MatType = MaterialType.STONE5 Then
|
||||
If IsNothing(StoneDrillParamExpanderV) Then StoneDrillParamExpanderV = New StoneDrillingParameterExpanderV
|
||||
StoneDrillParamExpanderV.DataContext = m_CurrOperation
|
||||
Return StoneDrillParamExpanderV
|
||||
@@ -203,7 +220,7 @@ Public Class MachiningParameterExpanderVM
|
||||
Return WoodDrillParamExpanderV
|
||||
End If
|
||||
Case MCH_OY.SAWING
|
||||
If MatType = MaterialType.STONE Then
|
||||
If MatType = MaterialType.STONE5 Then
|
||||
If IsNothing(StoneSawParamExpanderV) Then StoneSawParamExpanderV = New StoneSawingParameterExpanderV
|
||||
StoneSawParamExpanderV.DataContext = m_CurrOperation
|
||||
Return StoneSawParamExpanderV
|
||||
@@ -217,7 +234,7 @@ Public Class MachiningParameterExpanderVM
|
||||
If IsNothing(BeamMillParamExpanderV) Then BeamMillParamExpanderV = New BeamMillingParameterExpanderV
|
||||
BeamMillParamExpanderV.DataContext = m_CurrOperation
|
||||
Return BeamMillParamExpanderV
|
||||
ElseIf MatType = MaterialType.STONE Then
|
||||
ElseIf MatType = MaterialType.STONE5 Then
|
||||
If IsNothing(StoneMillParamExpanderV) Then StoneMillParamExpanderV = New StoneMillingParameterExpanderV
|
||||
StoneMillParamExpanderV.DataContext = m_CurrOperation
|
||||
Return StoneMillParamExpanderV
|
||||
@@ -235,11 +252,10 @@ Public Class MachiningParameterExpanderVM
|
||||
StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
|
||||
Return StoneSawFinishParamExpanderV
|
||||
Case MCH_OY.POCKETING
|
||||
If MatType = MaterialType.STONE Or MatType = MaterialType.STONE5 Then
|
||||
If MatType = MaterialType.STONE5 Then
|
||||
' se macchina di tipo STONE ricavo il tipo di utensile
|
||||
Dim sMachiningToolName = String.Empty
|
||||
EgtMdbSetCurrMachining(sName)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sMachiningToolName)
|
||||
EgtGetMachiningParam(MCH_MP.TOOL, sMachiningToolName)
|
||||
EgtTdbSetCurrTool(sMachiningToolName)
|
||||
Dim dValue As Double = 0
|
||||
Dim nToolType As Integer
|
||||
@@ -319,9 +335,8 @@ Public Class MachiningParameterExpanderVM
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comando
|
||||
Private m_cmdNextStepTool As ICommand
|
||||
Private m_cmdPrevStepTool As ICommand
|
||||
Private m_cmdUpdateMachining As ICommand
|
||||
Private m_cmdPreviewMachiningTool As ICommand
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
@@ -342,6 +357,51 @@ Public Class MachiningParameterExpanderVM
|
||||
RaiseEvent m_EventFocusOnSlider()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Funzione che attiva l'evento che mette il focus sul bottone
|
||||
''' </summary>
|
||||
Public Sub FocusButtonPreview()
|
||||
RaiseEvent m_EventFocusOnButtonPreview()
|
||||
End Sub
|
||||
|
||||
Friend Sub PreviewMachiningTool()
|
||||
Select Case nPreviewMachiningTool
|
||||
Case MCH_LOOK.NONE
|
||||
SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
|
||||
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
|
||||
SetSlider_IsEnable(True)
|
||||
Case MCH_LOOK.TAB_TOOL
|
||||
SetPreviewMachiningTool(MCH_LOOK.TAB_HEAD)
|
||||
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Head.png")
|
||||
SetSlider_IsEnable(True)
|
||||
Case MCH_LOOK.TAB_HEAD
|
||||
SetPreviewMachiningTool(MCH_LOOK.NONE)
|
||||
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Delete.png")
|
||||
SetSlider_IsEnable(False)
|
||||
End Select
|
||||
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Friend Sub RevertPreviewMachiningTool()
|
||||
Select Case nPreviewMachiningTool
|
||||
Case MCH_LOOK.NONE
|
||||
SetPreviewMachiningTool(MCH_LOOK.TAB_HEAD)
|
||||
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Head.png")
|
||||
SetSlider_IsEnable(True)
|
||||
Case MCH_LOOK.TAB_TOOL
|
||||
SetPreviewMachiningTool(MCH_LOOK.NONE)
|
||||
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Delete.png")
|
||||
SetSlider_IsEnable(False)
|
||||
Case MCH_LOOK.TAB_HEAD
|
||||
SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
|
||||
SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
|
||||
SetSlider_IsEnable(True)
|
||||
End Select
|
||||
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -382,28 +442,11 @@ Public Class MachiningParameterExpanderVM
|
||||
' Aggiorno parametri di lavorazione
|
||||
m_CurrOperation.WriteOperationParam()
|
||||
|
||||
' Carico tutta la geometria selezionata in una lista
|
||||
Dim SelectedGeometry As New List(Of Integer)
|
||||
Dim EntityIndex As Integer = EgtGetFirstSelectedObj()
|
||||
While EntityIndex <> GDB_ID.NULL
|
||||
SelectedGeometry.Add(EntityIndex)
|
||||
EntityIndex = EgtGetNextSelectedObj()
|
||||
End While
|
||||
' Gestione speciale per superfici ( si aggiunge l'identificazione della faccia)
|
||||
If SelectedGeometry.Count() > 0 AndAlso
|
||||
(EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_MESH Or EgtGetType(SelectedGeometry(0)) = GDB_TY.SRF_FRGN) Then
|
||||
' Aggiorno lista speciale con facce
|
||||
SelData.VerifyIdSub()
|
||||
' Imposto geometria
|
||||
Dim vId() As Integer = Nothing
|
||||
Dim vSub() As Integer = Nothing
|
||||
SelData.GetAllIdSub(vId, vSub)
|
||||
EgtSetMachiningGeometry(vId, vSub)
|
||||
' Gestione standard per altre entità (curve, testi, ...)
|
||||
Else
|
||||
' Imposto geometria
|
||||
EgtSetMachiningGeometry(SelectedGeometry.ToArray)
|
||||
End If
|
||||
' Imposto geometria da lavorare (tutta quella selezionata)
|
||||
Dim vId() As Integer = Nothing
|
||||
Dim vSub() As Integer = Nothing
|
||||
SelData.GetAllSelectedGeom(vId, vSub)
|
||||
EgtSetMachiningGeometry(vId, vSub)
|
||||
|
||||
' Rigenero la lavorazione
|
||||
If Not EgtApplyMachining(bRecalc) Then
|
||||
@@ -427,8 +470,11 @@ Public Class MachiningParameterExpanderVM
|
||||
End If
|
||||
|
||||
' Restart visualizzazione utensile
|
||||
SetSliderScale( EgtGetPreviewMachiningToolStepCount())
|
||||
SetViewTool(True)
|
||||
EgtPreparePreviewMachiningTool()
|
||||
EgtChangePreviewMachiningToolShow(nPreviewMachiningTool)
|
||||
SetSliderScale(EgtGetPreviewMachiningToolStepCount())
|
||||
SetSlider_IsEnable(True)
|
||||
ResetSliderValue()
|
||||
IsModified(False)
|
||||
ErrorOnOperation(False)
|
||||
EgtDraw()
|
||||
@@ -437,6 +483,23 @@ Public Class MachiningParameterExpanderVM
|
||||
|
||||
#End Region ' UpdateMachiningCommand
|
||||
|
||||
#Region "PreviewMachiningTool_Command"
|
||||
|
||||
Public ReadOnly Property PreviewMachiningTool_Command As ICommand
|
||||
Get
|
||||
If m_cmdPreviewMachiningTool Is Nothing Then
|
||||
m_cmdPreviewMachiningTool = New RelayCommand(AddressOf PreviewMachiningTool)
|
||||
End If
|
||||
Return m_cmdPreviewMachiningTool
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub PreviewMachiningTool(ByVal param As Object)
|
||||
PreviewMachiningTool()
|
||||
End Sub
|
||||
|
||||
#End Region ' PreviewMachiningTool_Command
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
Private Sub IsModified(IsModified As Boolean) Handles m_CurrOperation.m_IsModified
|
||||
|
||||
+9
-9
@@ -129,13 +129,8 @@
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
|
||||
ParamTxBx="{Binding Path=OffSr,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
|
||||
ParamTxBx="{Binding Path=OffSl,
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
|
||||
ParamTxBx="{Binding Path=SideAngle,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
@@ -151,8 +146,13 @@
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"
|
||||
Visibility="{Binding Epicycles_Visibility}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
|
||||
ParamTxBx="{Binding Path=SideAngle,
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
|
||||
ParamTxBx="{Binding Path=OffSr,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
|
||||
ParamTxBx="{Binding Path=OffSl,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
|
||||
+66
-13
@@ -119,24 +119,21 @@
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
|
||||
ParamCmBxList="{Binding Path=LeadInTypeList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
|
||||
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
|
||||
ParamCmBxList="{Binding Path=LeadOutTypeList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
|
||||
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
|
||||
ParamTxBx="{Binding Path=StepPar,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
|
||||
ParamTxBx="{Binding Path=OffSr,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
|
||||
ParamTxBx="{Binding Path=OffSl,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
|
||||
@@ -252,6 +249,62 @@
|
||||
</Grid>
|
||||
</Expander>
|
||||
|
||||
<Expander Style="{StaticResource ExpanderStyle}">
|
||||
<Expander.Header>
|
||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
|
||||
ParamCmBxList="{Binding Path=LeadInTypeList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
|
||||
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||
</Expander.Header>
|
||||
<StackPanel>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
|
||||
ParamTxBx="{Binding Path=StartAddLen,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
|
||||
ParamTxBx="{Binding Path=LiTang,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevTxBl}"
|
||||
ParamTxBx="{Binding Path=LiElev,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
|
||||
<Expander Style="{StaticResource ExpanderStyle}">
|
||||
<Expander.Header>
|
||||
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
|
||||
ParamCmBxList="{Binding Path=LeadOutTypeList,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
|
||||
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||
</Expander.Header>
|
||||
<StackPanel>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
|
||||
ParamTxBx="{Binding Path=EndAddLen,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
|
||||
ParamTxBx="{Binding Path=LoTang,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoElevTxBl}"
|
||||
ParamTxBx="{Binding Path=LoElev,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
|
||||
<Expander Style="{StaticResource ExpanderStyle}">
|
||||
<Expander.Header>
|
||||
<TextBlock Text="{Binding ToolExpanderHeader}"/>
|
||||
|
||||
+6
-1
@@ -92,7 +92,12 @@
|
||||
ValidatesOnDataErrors=True}"
|
||||
ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
|
||||
Style="{DynamicResource ComboParamV_Margin}"/>
|
||||
<UniformGrid Columns="2">
|
||||
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OverLapTxBl}"
|
||||
ParamTxBx="{Binding Path=OverLap,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<UniformGrid Columns="2">
|
||||
<TextBlock Text="{Binding UserNotesTxBl}"
|
||||
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
|
||||
|
||||
+14
-3
@@ -37,14 +37,23 @@ Public Class OperationListBoxItem
|
||||
If Not IsNothing(value) Then
|
||||
|
||||
Dim indexes As List(Of OperationListBoxItem) = New List(Of OperationListBoxItem)
|
||||
Dim Count As Integer = 0
|
||||
Dim nLastInd As Integer = -1
|
||||
Dim nInd As Integer = 0
|
||||
For Each OperationListBoxItem In Map.refOperationsListExpanderVM.OperationList
|
||||
If OperationListBoxItem.IsSelected And OperationListBoxItem.Id <> m_Id Then
|
||||
Count = Count + 1
|
||||
indexes.Add(OperationListBoxItem)
|
||||
nLastInd = nInd
|
||||
End If
|
||||
nInd += 1
|
||||
Next
|
||||
|
||||
' Per evitare problemi con primo Item selezionato quando ListView non ancora esistente
|
||||
If indexes.Count = 1 And nLastInd = 0 Then
|
||||
Map.refOperationsListExpanderVM.OperationList(0).IsSelected = False
|
||||
indexes.Clear()
|
||||
End If
|
||||
|
||||
' E' possibile selezionare più lavorazioni solo se della stessa fase
|
||||
If indexes.Count > 0 Then
|
||||
If EgtGetOperationPhase(Id) <> EgtGetOperationPhase(indexes(0).Id) Then
|
||||
Return
|
||||
@@ -52,10 +61,11 @@ Public Class OperationListBoxItem
|
||||
End If
|
||||
|
||||
m_IsSelected = value
|
||||
|
||||
' Verifico se c'è l'operazione precedente
|
||||
If Not value Or
|
||||
indexes.Any(Function(i) i.Type = MCH_OY.DISP) Or
|
||||
(Not indexes.Any(Function(i) i.Type = MCH_OY.DISP) And Type = MCH_OY.DISP And Count > 0) Then
|
||||
(Not indexes.Any(Function(i) i.Type = MCH_OY.DISP) And Type = MCH_OY.DISP And indexes.Count > 0) Then
|
||||
|
||||
m_IsSelected = False
|
||||
|
||||
@@ -77,6 +87,7 @@ Public Class OperationListBoxItem
|
||||
If Map.refOperationsListExpanderVM.ForceDrawInIsSelected Then EgtDraw()
|
||||
Return
|
||||
End If
|
||||
|
||||
' Imposto la fase di lavorazione corrente
|
||||
EgtSetCurrPhase(EgtGetOperationPhase(Id))
|
||||
' Abilito la selezione dei Percorsi di Lavorazione
|
||||
|
||||
+12
-6
@@ -1,7 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class OperationParametersExpanderVM
|
||||
Inherits ViewModelBase
|
||||
@@ -32,6 +29,7 @@ Public Class OperationParametersExpanderVM
|
||||
' disattivo MTable e SpecialPanel se vado sulla modifica di una lavorazione
|
||||
Map.refDoorPanelVM.MTableIsEnabled(Not m_ParametersIsExpanded)
|
||||
Map.refSpecialPanelVM.SpecialPanelIsEnabled(Not m_ParametersIsExpanded)
|
||||
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -181,7 +179,12 @@ Public Class OperationParametersExpanderVM
|
||||
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomProbing
|
||||
End Select
|
||||
' Imposto visualizzazione utensile
|
||||
Map.refMachiningParameterExpanderVM.SetViewTool( True)
|
||||
'Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
|
||||
'Map.refMachiningParameterExpanderVM.SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
|
||||
'Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(True)
|
||||
EgtPreparePreviewMachiningTool()
|
||||
Map.refMachiningParameterExpanderVM.PreviewMachiningTool()
|
||||
EgtDraw()
|
||||
End If
|
||||
OnPropertyChanged("ParametersIsExpanded")
|
||||
Return True
|
||||
@@ -211,7 +214,10 @@ Public Class OperationParametersExpanderVM
|
||||
EgtDraw()
|
||||
Else
|
||||
' Nascondo visualizzazione utensile
|
||||
Map.refMachiningParameterExpanderVM.SetViewTool( False)
|
||||
Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.NONE)
|
||||
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(False)
|
||||
Map.refMachiningParameterExpanderVM.ResetSliderValue()
|
||||
EgtRemovePreviewMachiningTool()
|
||||
End If
|
||||
ParametersExpanderName = String.Empty
|
||||
' Disabilito la selezione delle lavorazioni
|
||||
|
||||
+154
-155
@@ -1,177 +1,176 @@
|
||||
<UserControl x:Class="OperationsListExpanderV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
|
||||
<StackPanel Name="OperationsListExpanderViewStackPanel" IsEnabled="{Binding OpersListViewIsEnabled}">
|
||||
<Expander Header="{Binding OperationListHeader}"
|
||||
IsEnabled="{Binding OpersListViewIsEnabled}"
|
||||
IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander"
|
||||
Style="{StaticResource ExpanderStyle}">
|
||||
<Expander.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/>
|
||||
</Expander.InputBindings>
|
||||
|
||||
<Expander Header="{Binding OperationListHeader}" IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander"
|
||||
Style="{StaticResource ExpanderStyle}">
|
||||
<Expander.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/>
|
||||
</Expander.InputBindings>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel>
|
||||
<UniformGrid Rows="1">
|
||||
<Button Content="{Binding NewMachiningBtnContent}" Command="{Binding NewMachiningCommand}" Height="30"/>
|
||||
<Button Content="{Binding NewPositioningBtnContent}" Command="{Binding NewPositioningCommand}" Height="30"/>
|
||||
<Button Content="{Binding CancelOperationBtnContent}" Command="{Binding CancelOperationCommand}" Height="30"/>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Rows="1">
|
||||
<Button Content="{Binding NewMachiningBtnContent}" Command="{Binding NewMachiningCommand}" Height="30"/>
|
||||
<Button Content="{Binding NewPositioningBtnContent}" Command="{Binding NewPositioningCommand}" Height="30"/>
|
||||
<Button Content="{Binding CancelOperationBtnContent}" Command="{Binding CancelOperationCommand}" Height="30"/>
|
||||
</UniformGrid>
|
||||
<ListBox IsSynchronizedWithCurrentItem="False" ItemsSource="{Binding OperationList}"
|
||||
Height="200" x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}" SelectionMode="Extended">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}">
|
||||
<DataTemplate.Resources>
|
||||
<Style x:Key="LayoutRoot" TargetType="Grid">
|
||||
<!--<Style.Triggers>
|
||||
--><!--these are the triggers that make the code cursor jump from box 1 to box 2 to box 3.--><!--
|
||||
<DataTrigger Binding="{Binding ElementName=Box, Path=Visibility}" Value="Visible">
|
||||
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=Box}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>-->
|
||||
</Style>
|
||||
</DataTemplate.Resources>
|
||||
<Border Background="Transparent">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick"
|
||||
<ListBox Grid.Row="1"
|
||||
ItemsSource="{Binding OperationList}"
|
||||
IsSynchronizedWithCurrentItem="True"
|
||||
x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}" SelectionMode="Extended">
|
||||
<ListBox.Resources>
|
||||
<DataTemplate DataType="{x:Type EgtCAM5:MachiningOpListBoxItem}">
|
||||
<DataTemplate.Resources>
|
||||
<Style x:Key="LayoutRoot" TargetType="Grid"/>
|
||||
</DataTemplate.Resources>
|
||||
<Border Background="Transparent">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick"
|
||||
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
|
||||
CommandParameter="{Binding Id}"/>
|
||||
</Border.InputBindings>
|
||||
<Grid Style="{StaticResource LayoutRoot}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/>
|
||||
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
||||
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="1"
|
||||
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
|
||||
</Border.InputBindings>
|
||||
<Grid Style="{StaticResource LayoutRoot}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox IsChecked="{Binding Status}" Margin="0,0,5,0"/>
|
||||
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
||||
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="1"
|
||||
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
|
||||
|
||||
<TextBlock Grid.Column="2" Text="{Binding Name}"
|
||||
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
|
||||
<TextBox Grid.Column="2" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="150"
|
||||
x:Name="Box"
|
||||
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
|
||||
<!--IsVisibleChanged="MachiningOpListBoxItem_IsVisibleChanged"
|
||||
<TextBlock Grid.Column="2" Text="{Binding Name}"
|
||||
Visibility="{Binding Name_Visibility}" Margin="0,0,5,0"/>
|
||||
<TextBox Grid.Column="2" Text="{Binding ModifiedName, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="150"
|
||||
x:Name="Box"
|
||||
Visibility="{Binding ModifyName_Visibility}" Margin="0,0,5,0">
|
||||
<!--IsVisibleChanged="MachiningOpListBoxItem_IsVisibleChanged"
|
||||
LostKeyboardFocus="MachiningOpListBoxItem_LostKeyboardFocus">-->
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding ModifyNameEnterCommand}"/>
|
||||
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
<TextBlock Grid.Column="3" Text="{Binding Info}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtCAM5:DispositionOpListBoxItem}">
|
||||
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick"
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding ModifyNameEnterCommand}"/>
|
||||
<KeyBinding Key="Escape" Command="{Binding ModifyNameEscCommand}"/>
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
<TextBlock Grid.Column="3" Text="{Binding Info}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type EgtCAM5:DispositionOpListBoxItem}">
|
||||
<Border CornerRadius="1" Background="{StaticResource EgaltechBlue3}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding MouseAction="LeftDoubleClick"
|
||||
Command="{Binding DataContext.OperationListDoubleClickCommand, RelativeSource={RelativeSource AncestorType={x:Type EgtCAM5:OperationsListExpanderV}}}"
|
||||
CommandParameter="{Binding Id}"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
||||
<CheckBox IsChecked="{Binding OnOffAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
||||
<!--<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}"
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CheckBox IsChecked="{Binding StatusAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
||||
<CheckBox IsChecked="{Binding OnOffAll}" VerticalAlignment="Center" Margin="0,0,5,0"/>
|
||||
<!--<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}"
|
||||
IsChecked="{Binding OnOffAll}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>-->
|
||||
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
||||
<TextBlock Text="{Binding Name}" Foreground="White"
|
||||
FontSize="15" FontWeight="SemiBold"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<!--<Interactivity:Interaction.Triggers>
|
||||
<Image Source="{Binding Image}" Height="15" Margin="0,0,5,0"/>
|
||||
<TextBlock Text="{Binding Name}" Foreground="White"
|
||||
FontSize="15" FontWeight="SemiBold"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
<!--<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>-->
|
||||
<!--<Interactivity:Interaction.Triggers>
|
||||
<Interactivity:EventTrigger EventName="MouseDoubleClick">
|
||||
<Interactivity:InvokeCommandAction Command="{Binding OperationListDoubleClickCommand}"/>
|
||||
</Interactivity:EventTrigger>
|
||||
</Interactivity:Interaction.Triggers>-->
|
||||
<!--<Interactivity:Interaction.Behaviors>
|
||||
<!--<Interactivity:Interaction.Behaviors>
|
||||
<EgtCAM5:ScrollIntoViewForListBox/>
|
||||
</Interactivity:Interaction.Behaviors>-->
|
||||
<ListBox.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding CancelOperationCommand}"/>
|
||||
</ListBox.InputBindings>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="False"/>
|
||||
<Condition Property="IsSelected" Value="True"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="True"/>
|
||||
<Condition Property="IsSelected" Value="True"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{Binding DuplicateMachMsg}"
|
||||
Command="{Binding DuplicateMachCommand}"
|
||||
IsEnabled="{Binding DuplicateCmd_IsEnabled}">
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding MachToDbMsg}"
|
||||
Command="{Binding MachToDbCommand}"
|
||||
IsEnabled="{Binding MachToDb_IsEnabled}">
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding RenameMsg}"
|
||||
Command="{Binding RenameCommand}"
|
||||
IsEnabled="{Binding Rename_IsEnabled}">
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
<ListBox.Style>
|
||||
<Style TargetType="ListBox">
|
||||
<EventSetter Event="SelectionChanged" Handler="ItemsControl_SelectionChanged"/>
|
||||
</Style>
|
||||
</ListBox.Style>
|
||||
</ListBox>
|
||||
<ListBox.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding CancelOperationCommand}"/>
|
||||
</ListBox.InputBindings>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="False"/>
|
||||
<Condition Property="IsSelected" Value="True"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="Selector.IsSelectionActive" Value="True"/>
|
||||
<Condition Property="IsSelected" Value="True"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource Item.SelectedActive.Border}"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{Binding DuplicateMachMsg}"
|
||||
Command="{Binding DuplicateMachCommand}"
|
||||
IsEnabled="{Binding DuplicateCmd_IsEnabled}">
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding MachToDbMsg}"
|
||||
Command="{Binding MachToDbCommand}"
|
||||
IsEnabled="{Binding MachToDb_IsEnabled}">
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding RenameMsg}"
|
||||
Command="{Binding RenameCommand}"
|
||||
IsEnabled="{Binding Rename_IsEnabled}">
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
<ListBox.Style>
|
||||
<Style TargetType="ListBox">
|
||||
<EventSetter Event="SelectionChanged" Handler="ItemsControl_SelectionChanged"/>
|
||||
</Style>
|
||||
</ListBox.Style>
|
||||
</ListBox>
|
||||
|
||||
<UniformGrid Rows="1">
|
||||
<Button Content="{Binding MoveUpMsg}" Command="{Binding MoveUpCommand}" Height="30" IsEnabled="{Binding MoveUp_IsEnabled}" />
|
||||
<Button Content="{Binding MoveDownMsg}" Command="{Binding MoveDownCommand}" Height="30" IsEnabled="{Binding MoveDown_IsEnabled}"/>
|
||||
<Button Content="{Binding UpdateMsg}" Command="{Binding UpdateCommand}" Height="30"/>
|
||||
<Button Content="{Binding SetUpMsg}" Command="{Binding SetUpCommand}" Height="30"/>
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Row="2" Rows="1">
|
||||
<Button Content="{Binding MoveUpMsg}" Command="{Binding MoveUpCommand}" Height="30" IsEnabled="{Binding MoveUp_IsEnabled}" />
|
||||
<Button Content="{Binding MoveDownMsg}" Command="{Binding MoveDownCommand}" Height="30" IsEnabled="{Binding MoveDown_IsEnabled}"/>
|
||||
<Button Content="{Binding UpdateMsg}" Command="{Binding UpdateCommand}" Height="30"/>
|
||||
<Button Content="{Binding SetUpMsg}" Command="{Binding SetUpCommand}" Height="30"/>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Expander>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+12
-8
@@ -85,6 +85,7 @@ Public Class OperationsListExpanderVM
|
||||
If value <> m_ListIsExpanded Then
|
||||
Map.refMachiningOptionPanelVM.Set_IsExpanded(MachiningOptionPanelVM.MachiningOptionPanelExpander.OPERATIONLIST, value)
|
||||
SetStatusOnLamp()
|
||||
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(value)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -469,8 +470,11 @@ Public Class OperationsListExpanderVM
|
||||
If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then
|
||||
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
|
||||
Map.refMachiningParameterExpanderVM.ResetSliderValue()
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
|
||||
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
|
||||
End Sub
|
||||
|
||||
#End Region ' OperationListDoubleClickCommand
|
||||
@@ -650,20 +654,17 @@ Public Class OperationsListExpanderVM
|
||||
Dim sErr As String = String.Empty
|
||||
Dim bOk As Boolean = EgtApplyAllMachinings(bRecalc, False, sErr)
|
||||
EgtSetModified()
|
||||
' Deseleziono l'Operazione selezionata e la de-evidenzio nel Disegno
|
||||
' Aggiorno geometrie di lavorazione selezionate e marcate
|
||||
m_ForceDrawInIsSelected = False
|
||||
For Each Operation In OperationList
|
||||
If Operation.IsSelected Then
|
||||
Operation.IsSelected = False
|
||||
Operation.IsSelected = True
|
||||
End If
|
||||
Next
|
||||
' Ricarico la lista delle Operazioni
|
||||
LoadOperationList(GDB_ID.NULL)
|
||||
' Rimetto le lampadine in modo corretto
|
||||
tmpStatusLamp.UpdateStatusLamp()
|
||||
m_ForceDrawInIsSelected = True
|
||||
' Aggiorno visualizzazione e ritorno a cursore standard
|
||||
EgtDraw()
|
||||
' Ripristino cursore
|
||||
Application.Current.MainWindow.ForceCursor = False
|
||||
Application.Current.MainWindow.Cursor = Cursors.Arrow
|
||||
' In caso di errori, li segnalo
|
||||
@@ -1301,8 +1302,11 @@ Public Class OperationsListExpanderVM
|
||||
' Annullo creazione nuova lavorazione
|
||||
If m_NewMachining Then EndNewMachining(GDB_ID.NULL)
|
||||
' Disabilito visualizzazione utensile
|
||||
If Not IsNothing(m_MachiningParameterExpander) Then
|
||||
Map.refMachiningParameterExpanderVM.SetViewTool(False)
|
||||
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
|
||||
Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.NONE)
|
||||
Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(False)
|
||||
Map.refMachiningParameterExpanderVM.ResetSliderValue()
|
||||
EgtRemovePreviewMachiningTool()
|
||||
End If
|
||||
' Deseleziono le operazioni correnti per eliminare il mark
|
||||
For Each Operation In OperationList
|
||||
|
||||
@@ -20,6 +20,7 @@ Public Class SimulationExpanderVM
|
||||
Map.refOperationsListExpanderVM.StatusLampList.Clear()
|
||||
Dim tmpStatusLamp As New StatusLamp()
|
||||
Map.refOperationsListExpanderVM.StatusLampList = tmpStatusLamp.LoadStatusLamp()
|
||||
Map.refMachiningOptionPanelVM.SetOperationsListRowIsExpanded(False)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -448,19 +449,19 @@ Public Class SimulationExpanderVM
|
||||
sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
|
||||
#End If
|
||||
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace(sCncFile) Then
|
||||
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & sCncFile
|
||||
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & Path.GetFileName(sCncFile)
|
||||
Else
|
||||
sCncFile = Path.ChangeExtension(sCurrFilePath, Nothing)
|
||||
Dim sExt As String = ".cnc"
|
||||
EgtUILib.GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, sExt, sExt, IniFile.m_sCurrMachIniFilePath)
|
||||
If IniFile.m_bMachiningGroup Then
|
||||
Dim sMGrpName As String = String.Empty
|
||||
If EgtGetMachGroupName(EgtGetCurrMachGroup(), sMGrpName) Then
|
||||
sCncFile &= "_" & sMGrpName
|
||||
sInfo &= "-" & sMGrpName
|
||||
End If
|
||||
sCncFile = Path.ChangeExtension(sCncFile, sExt)
|
||||
End If
|
||||
Dim sExt As String = ".cnc"
|
||||
EgtUILib.GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, sExt, sExt, IniFile.m_sCurrMachIniFilePath)
|
||||
sCncFile = Path.ChangeExtension(sCncFile, sExt)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
@@ -468,16 +469,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
|
||||
|
||||
@@ -1,24 +1,37 @@
|
||||
<UserControl x:Class="MachiningOptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
|
||||
|
||||
<StackPanel Name="ciao" Background="Transparent" Margin="0,0,3.5001,0" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||
<Grid x:Name="MachiningGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MinHeight="100" Height="400" MaxHeight="800"
|
||||
EgtCAM5:MachiningOptionPanelVM.IsExpanded="{Binding OperationsListRowIsExpanded}"
|
||||
EgtCAM5:MachiningOptionPanelVM.TargetSplitter="{Binding ElementName=MachiningGridSplitter}"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--ContentPresenter that contains the OperationsListExpander-->
|
||||
<ContentPresenter Content="{Binding OperationsListExpander,Mode=OneWay}"/>
|
||||
<GridSplitter Name="MachiningGridSplitter" Style="{StaticResource General_GridSplitter}"/>
|
||||
<!--ContentPresenter that contains the OperationParametersExpander-->
|
||||
<ContentPresenter Content="{Binding OperationParametersExpander,Mode=OneWay}"/>
|
||||
<ContentPresenter Grid.Row="1" Content="{Binding OperationParametersExpander,Mode=OneWay}"/>
|
||||
<!--ContentPresenter that contains the MachiningsTreeExpander-->
|
||||
<ContentPresenter Content="{Binding MachiningsTreeExpander}"/>
|
||||
<ContentPresenter Grid.Row="2" Content="{Binding MachiningsTreeExpander}"/>
|
||||
<!--ContentPresenter that contains the SimulationExpander-->
|
||||
<ContentPresenter Content="{Binding SimulationExpander}"/>
|
||||
<ContentPresenter Grid.Row="3" Content="{Binding SimulationExpander}"/>
|
||||
<!--ContentPresenter that contains the EstimationsExpander-->
|
||||
<ContentPresenter Content="{Binding EstimationsExpander}"/>
|
||||
<ContentPresenter Grid.Row="4" Content="{Binding EstimationsExpander}"/>
|
||||
|
||||
<Button Content="{Binding GenerateMsg}" Height="30"
|
||||
<Button Grid.Row="5"
|
||||
Content="{Binding GenerateMsg}" Height="30"
|
||||
IsEnabled="{Binding GenerateIsEnabled}"
|
||||
Command="{Binding GenerateCommand}"/>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
Public Class MachiningOptionPanelV
|
||||
|
||||
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
||||
Dim x = ciao.MaxHeight
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
Map.SetRefMachiningOptionPanelV(Me)
|
||||
|
||||
If Not IsActivePlugin() Then
|
||||
AddHandler MachiningGrid.Loaded,
|
||||
Sub()
|
||||
DynamicGridModule.RestoreMachiningGridLayout(MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
|
||||
MachiningGrid.UpdateLayout()
|
||||
End Sub
|
||||
|
||||
AddHandler MachiningGridSplitter.DragCompleted,
|
||||
Sub()
|
||||
DynamicGridModule.SaveMachiningGridLayout(MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
|
||||
End Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.IO
|
||||
|
||||
Public Class MachiningOptionPanelVM
|
||||
Inherits ViewModelBase
|
||||
@@ -132,6 +133,17 @@ Public Class MachiningOptionPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_OperationsListRowIsExpanded As Boolean = True
|
||||
Public ReadOnly Property OperationsListRowIsExpanded As Boolean
|
||||
Get
|
||||
Return m_OperationsListRowIsExpanded
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetOperationsListRowIsExpanded(value As Boolean)
|
||||
m_OperationsListRowIsExpanded = value
|
||||
OnPropertyChanged("OperationsListRowIsExpanded")
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property GenerateMsg As String
|
||||
@@ -195,4 +207,67 @@ Public Class MachiningOptionPanelVM
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
#Region "DEPENCY PROPERTY"
|
||||
|
||||
Public Shared ReadOnly IsExpandedProperty As DependencyProperty =
|
||||
DependencyProperty.RegisterAttached(
|
||||
"IsExpanded",
|
||||
GetType(Boolean),
|
||||
GetType(MachiningOptionPanelVM),
|
||||
New PropertyMetadata(True, AddressOf OnIsExpandedChanged)
|
||||
)
|
||||
|
||||
Public Shared Sub SetIsExpanded(element As DependencyObject, value As Boolean)
|
||||
element.SetValue(IsExpandedProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetIsExpanded(element As DependencyObject) As Boolean
|
||||
Return CType(element.GetValue(IsExpandedProperty), Boolean)
|
||||
End Function
|
||||
|
||||
Public Shared Function GetTargetSplitter(d As DependencyObject) As GridSplitter
|
||||
Return CType(d.GetValue(TargetSplitterProperty), GridSplitter)
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetTargetSplitter(d As DependencyObject, value As GridSplitter)
|
||||
d.SetValue(TargetSplitterProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly TargetSplitterProperty As DependencyProperty =
|
||||
DependencyProperty.RegisterAttached(
|
||||
"TargetSplitter",
|
||||
GetType(GridSplitter),
|
||||
GetType(MachiningOptionPanelVM),
|
||||
New PropertyMetadata(Nothing)
|
||||
)
|
||||
|
||||
Private Shared Sub OnIsExpandedChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
|
||||
Dim row As RowDefinition = TryCast(d, RowDefinition)
|
||||
If IsNothing(row) Then Return
|
||||
|
||||
Dim isExpanded As Boolean = CBool(e.NewValue)
|
||||
|
||||
Dim splitter = MachiningOptionPanelVM.GetTargetSplitter(row)
|
||||
If Not IsNothing(splitter) Then
|
||||
splitter.IsEnabled = isExpanded
|
||||
splitter.Visibility = If(isExpanded, Visibility.Visible, Visibility.Collapsed)
|
||||
End If
|
||||
|
||||
If Not isExpanded Then
|
||||
row.ClearValue(RowDefinition.HeightProperty)
|
||||
|
||||
row.Height = New GridLength(1, GridUnitType.Auto)
|
||||
row.MinHeight = 0
|
||||
Else
|
||||
If File.Exists(Map.refMainWindowVM.DimensionDir) Then
|
||||
DynamicGridModule.RestoreMachiningGridLayout(Map.refMachiningOptionPanelV.MachiningGrid, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_MACHINING_PLUGIN, DynamicGridModule.PROJECT_MACHINING))
|
||||
Map.refMachiningOptionPanelV.MachiningGrid.UpdateLayout()
|
||||
Else
|
||||
row.Height = New GridLength(350)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Depency Property
|
||||
|
||||
End Class
|
||||
@@ -1,6 +1,6 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
TitleBarOrientation="Vertical"
|
||||
Visibility="{Binding Panel_Visibility}">
|
||||
|
||||
@@ -60,6 +60,7 @@ Public Class OptionPanelVM
|
||||
Map.refSimulationExpanderVM.Simulation_IsExpanded = False
|
||||
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
|
||||
End If
|
||||
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SetManageLayerIsExpanded(True)
|
||||
NotifyPropertyChanged("ModePanel")
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@ Friend Module OptionModule
|
||||
Friend m_bBeamOn As Boolean
|
||||
Friend m_bWallOn As Boolean
|
||||
Friend m_bDoorsOn As Boolean
|
||||
Friend m_bWindowOn As Boolean
|
||||
Friend m_bTrimmingOn As Boolean
|
||||
Friend m_bReversePostOn As Boolean
|
||||
Friend m_bGunstockOn As Boolean
|
||||
|
||||
' inizializzazione lettura variabili ad inizio programma
|
||||
@@ -184,6 +187,9 @@ Friend Module OptionModule
|
||||
m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
|
||||
m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
|
||||
m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
|
||||
m_bWindowOn = (GetPrivateProfileInt(S_WINDOW, K_WINDOWENABLE, 0) <> 0)
|
||||
m_bTrimmingOn = (GetPrivateProfileInt(S_TRIMMING, K_TRIMMINGENABLE, 0) <> 0)
|
||||
m_bReversePostOn = (GetPrivateProfileInt(S_REVERSEPOST, K_REVERSEPOSTENABLE, 0) <> 0)
|
||||
m_bGunstockOn = (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -445,6 +445,9 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding BeamMsg}"
|
||||
Grid.Row="0" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
@@ -467,14 +470,26 @@
|
||||
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding DoorsActive}"
|
||||
Command="{Binding UpdateDoors_Command}"
|
||||
Grid.Row="2" Grid.Column="2" Height="26"/>
|
||||
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
|
||||
<TextBlock Text="{Binding WindowMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
|
||||
<CheckBox IsChecked="{Binding WindowOn}" IsEnabled="{Binding WindowEnabled}"
|
||||
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}"
|
||||
<TextBlock Text="{Binding TrimmingMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding TrimmingOn}" IsEnabled="{Binding TrimmingEnabled}"
|
||||
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding ReversePostMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="5" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding ReversePostOn}" IsEnabled="{Binding ReversePostEnabled}"
|
||||
Grid.Row="5" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="6" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
|
||||
Grid.Row="6" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding SpecialMsg}"
|
||||
Grid.Row="7" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding SpecialOn}"
|
||||
Grid.Row="7" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
@@ -873,6 +873,51 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property WindowEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.WINDOW) <> 0
|
||||
End Get
|
||||
End Property
|
||||
Public Property WindowOn As Boolean
|
||||
Get
|
||||
Return OptionModule.m_bWindowOn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bWindowOn = value
|
||||
WritePrivateProfileString(S_WINDOW, K_WINDOWENABLE, If(value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TrimmingEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.TRIMMING) <> 0
|
||||
End Get
|
||||
End Property
|
||||
Public Property TrimmingOn As Boolean
|
||||
Get
|
||||
Return OptionModule.m_bTrimmingOn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bTrimmingOn = value
|
||||
WritePrivateProfileString(S_TRIMMING, K_TRIMMINGENABLE, If(value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ReversePostEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.REVERSEPOST) <> 0
|
||||
End Get
|
||||
End Property
|
||||
Public Property ReversePostOn As Boolean
|
||||
Get
|
||||
Return OptionModule.m_bReversePostOn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bReversePostOn = value
|
||||
WritePrivateProfileString(S_REVERSEPOST, K_REVERSEPOSTENABLE, If(value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GunstockEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0
|
||||
@@ -1165,6 +1210,21 @@ Public Class OptionWindowVM
|
||||
Return "Doors (" & Path.GetFileName( IniFile.m_sDoorsDirPath) & ")"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property WindowMsg As String
|
||||
Get
|
||||
Return "Window"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TrimmingMsg As String
|
||||
Get
|
||||
Return "Trimming"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ReversePostMsg As String
|
||||
Get
|
||||
Return "ReversePost"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property GunstockMsg As String
|
||||
Get
|
||||
Return "Gunstock"
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<UserControl x:Class="PopUpGridPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<StackPanel Background="Transparent" Orientation="Horizontal">
|
||||
<Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}">
|
||||
<StackPanel Background="#93D5F4" Orientation="Horizontal">
|
||||
<Button Command="{Binding CPlaneViewCommand}" ToolTip="{Binding CPlaneViewToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="3,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}">
|
||||
<Button Command="{Binding CPlaneInvertCommand}" ToolTip="{Binding CPlaneInvertToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneInvert.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}">
|
||||
<Button Command="{Binding CPlaneRotateCommand}" ToolTip="{Binding CPlaneRotateToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneROTATE.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding CPlane3PCommand}" ToolTip="{Binding CPlane3PointsToolTip}" Style="{StaticResource GridViewPanelButton}">
|
||||
<Button Command="{Binding CPlane3PCommand}" ToolTip="{Binding CPlane3PointsToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/Cplane3POINTS.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding CPlanePerpObjCommand}" ToolTip="{Binding CPlanePerpCurveToolTip}" Style="{StaticResource GridViewPanelButton}">
|
||||
<Button Command="{Binding CPlanePerpObjCommand}" ToolTip="{Binding CPlanePerpCurveToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/CplanePERPCURVE.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding CPlaneObjCommand}" ToolTip="{Binding CPlaneObjectToolTip}" Style="{StaticResource GridViewPanelButton}">
|
||||
<Button Command="{Binding CPlaneObjCommand}" ToolTip="{Binding CPlaneObjectToolTip}" Style="{StaticResource GridViewPanelButton}" Margin="1,3,3,3">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneOBJECT.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<UserControl x:Class="PopUpViewPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<StackPanel Background="Transparent" Orientation="Horizontal">
|
||||
<Button ToolTip="{Binding ZoomInToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomInCommand}">
|
||||
<StackPanel Background="#93D5F4" Orientation="Horizontal">
|
||||
<Button ToolTip="{Binding ZoomInToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomInCommand}" Margin="3,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/ZoomIn.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding ZoomOutToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomOutCommand}">
|
||||
<Button ToolTip="{Binding ZoomOutToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomOutCommand}" Margin="1,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/ZoomOut.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}">
|
||||
<Button ToolTip="{Binding ZoomSelToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ZoomSelCommand}" Margin="1,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/ZoomSel.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}">
|
||||
<Button ToolTip="{Binding LookFromIso_NEToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNECommand}" Margin="1,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/LookFromISO_NE.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding LookFromIso_NWToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNWCommand}">
|
||||
<Button ToolTip="{Binding LookFromIso_NWToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding IsoViewNWCommand}" Margin="1,3,1,3">
|
||||
<Image Source="/Resources/GridViewPanel/LookFromISO_NW.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding ViewToCPlaneToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ViewToCPlaneCommand}">
|
||||
<Button ToolTip="{Binding ViewToCPlaneToolTip}" Style="{StaticResource GridViewPanelButton}" Command="{Binding ViewToCPlaneCommand}" Margin="1,3,3,3">
|
||||
<Image Source="/Resources/GridViewPanel/CplaneView.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style>
|
||||
<Setter Property="DockPanel.Dock" Value="{Binding}" />
|
||||
<Setter Property="DockPanel.Dock" Value="{Binding}"/>
|
||||
</Style>
|
||||
</ItemsControl.ItemContainerStyle>
|
||||
|
||||
|
||||
@@ -11,13 +11,6 @@ Public Class ProjectV
|
||||
Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefProjectV(Me)
|
||||
'SpecialPanel.Visibility = Visibility.Collapsed
|
||||
'BeamPanel.Visibility = Visibility.Collapsed
|
||||
'WallPanel.Visibility = Visibility.Collapsed
|
||||
'DoorsPanel.Visibility = Visibility.Collapsed
|
||||
'GunStockPanel.Visibility = Visibility.Collapsed
|
||||
'PrintingPanel.Visibility = Visibility.Collapsed
|
||||
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
||||
End Sub
|
||||
|
||||
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
+134
-34
@@ -1,8 +1,10 @@
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports System.Windows.Interop
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Globalization
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports System.Windows.Interop
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib.EgtInterface
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class ProjectVM
|
||||
@@ -57,9 +59,15 @@ Public Class ProjectVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Private m_DynamicGrid As New Grid()
|
||||
Public ReadOnly Property DynamicGrid As Grid
|
||||
Get
|
||||
Return m_DynamicGrid
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "EGTUILIB FIELDS"
|
||||
|
||||
Private m_bCPlaneTypePos As Boolean
|
||||
@@ -79,6 +87,17 @@ Public Class ProjectVM
|
||||
TMDbParamVisibility.bFirst = True
|
||||
' Inizializza i parametri della scena
|
||||
'InitializeEgtProject()
|
||||
|
||||
Dim m_TopTrayV As New TopTrayV
|
||||
Dim m_LeftTrayV As New LeftTrayV
|
||||
Dim m_RightTrayV As New RightTrayV
|
||||
Dim m_BottomTrayV As New BottomTrayV
|
||||
Dim m_SceneContentControlV As New SceneContentControlV
|
||||
|
||||
DynamicGridModule.CreateDynamicGrid()
|
||||
|
||||
Dim gridSplitter As GridSplitter = DynamicGridModule.CreateGridSplitter()
|
||||
|
||||
' aggiungo componenti interfaccia
|
||||
Dim bPlugin As Boolean = False
|
||||
Dim PluginDirNameList() As String = {}
|
||||
@@ -105,12 +124,17 @@ Public Class ProjectVM
|
||||
Dim ConfigurationData As IPluginConfigData = Map.refMainWindowVM.GetConfigData(Of IPluginConfigData)(PluginName & ".ConfigurationData")
|
||||
If Not IsNothing(ConfigurationData) And ConfigurationData.ControlList.Count > 0 Then
|
||||
For Each Element In ConfigurationData.ControlList
|
||||
PopolateGridWithPlugIn(m_TopTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter)
|
||||
Select Case Element.Name
|
||||
Case PLUGIN_RIGHT_TRAY
|
||||
m_PanelList.Add(New RightTrayV)
|
||||
'm_PanelList.Add(New RightTrayV)
|
||||
'aggiungo RightTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_RightTrayV)
|
||||
Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState)
|
||||
Case PLUGIN_LEFT_TRAY
|
||||
m_PanelList.Add(New LeftTrayV)
|
||||
'm_PanelList.Add(New LeftTrayV)
|
||||
' aggiungo LeftTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_LeftTrayV)
|
||||
Case Else
|
||||
m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
|
||||
End Select
|
||||
@@ -118,17 +142,43 @@ Public Class ProjectVM
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
m_PanelList.Add(New BottomTrayV)
|
||||
m_PanelList.Add(New TopTrayV)
|
||||
'm_PanelList.Add(New BottomTrayV)
|
||||
'm_PanelList.Add(New TopTrayV)
|
||||
' aggiungo gridSplitter alla griglia
|
||||
m_DynamicGrid.Children.Add(gridSplitter)
|
||||
' aggiungo BottomTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_BottomTrayV)
|
||||
' aggiungo TopTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_TopTrayV)
|
||||
' nascondo tasti gestione progetto se attivo plugin
|
||||
Map.refTopCommandBarVM.SetProjectManagerVisibility(False)
|
||||
Else
|
||||
m_PanelList.Add(New TopTrayV)
|
||||
m_PanelList.Add(New LeftTrayV)
|
||||
m_PanelList.Add(New RightTrayV)
|
||||
m_PanelList.Add(New BottomTrayV)
|
||||
'm_PanelList.Add(New TopTrayV)
|
||||
'm_PanelList.Add(New LeftTrayV)
|
||||
'm_PanelList.Add(New RightTrayV)
|
||||
'm_PanelList.Add(New BottomTrayV)
|
||||
DynamicGridModule.PopulateGrid(m_TopTrayV, m_LeftTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter)
|
||||
' aggiungo TopTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_TopTrayV)
|
||||
' aggiungo LeftTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_LeftTrayV)
|
||||
' aggiungo gridSplitter alla griglia
|
||||
m_DynamicGrid.Children.Add(gridSplitter)
|
||||
' aggiungo RightTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_RightTrayV)
|
||||
' aggiungo BottomTrayV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_BottomTrayV)
|
||||
End If
|
||||
m_PanelList.Add(New SceneContentControlV)
|
||||
'm_PanelList.Add(New SceneContentControlV)
|
||||
' aggiungo SceneContentControlV alla griglia
|
||||
m_DynamicGrid.Children.Add(m_SceneContentControlV)
|
||||
' Carico le dimensioni salvate su ini se presenti
|
||||
AddHandler m_DynamicGrid.Loaded,
|
||||
Sub()
|
||||
DynamicGridModule.RestoreGridLayout(If(IsActivePlugin(), DynamicGridModule.PROJECT_EGTCAM5_PLUGIN, DynamicGridModule.PROJECT_EGTCAM5))
|
||||
m_DynamicGrid.UpdateLayout()
|
||||
End Sub
|
||||
m_PanelList.Add(m_DynamicGrid)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -212,6 +262,27 @@ Public Class ProjectVM
|
||||
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||
EgtOutLog(sOut)
|
||||
End If
|
||||
If IniFile.IsActiveWindow() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion(IniFile.m_sWindowDirPath, sVersion)
|
||||
Dim sOut As String = "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
|
||||
EgtOutLog(sOut)
|
||||
End If
|
||||
If IniFile.IsActiveTrimming() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion(IniFile.m_sTrimmingDirPath, sVersion)
|
||||
Dim sOut As String = "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
|
||||
EgtOutLog(sOut)
|
||||
End If
|
||||
If IniFile.IsActiveReversePost() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion(IniFile.m_sReversePostDirPath, sVersion)
|
||||
Dim sOut As String = "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
|
||||
EgtOutLog(sOut)
|
||||
End If
|
||||
If IniFile.IsActiveGunStock() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
@@ -366,9 +437,9 @@ Public Class ProjectVM
|
||||
Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0)
|
||||
Map.refShowPanelVM.ShowCurveDir(nShowCurveDir)
|
||||
' qualità di visualizzazione delle superfici
|
||||
OptionModule.SetShowSurfQuality( False)
|
||||
OptionModule.SetShowSurfQuality(False)
|
||||
' tipo visualizzazione per Zmap
|
||||
EgtSetShowZmap( OptionModule.m_nShowZmapType, 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)
|
||||
@@ -1113,7 +1184,7 @@ Public Class ProjectVM
|
||||
EgtGetPlaneSnapPoint(e.Location, Vector3d.Z_AX, TableRef.z, ptCurr)
|
||||
DispositionUtility.VtHookFinder(nFixtureId, ptCurr)
|
||||
Exit While
|
||||
ElseIf DispositionUtility.VerifyTableAxis( nFixtureId) Then
|
||||
ElseIf DispositionUtility.VerifyTableAxis(nFixtureId) Then
|
||||
m_SelType = DispositionUtility.SelType.BARS
|
||||
m_nIdToSel = nFixtureId
|
||||
' Drag possibile
|
||||
@@ -1211,7 +1282,7 @@ Public Class ProjectVM
|
||||
m_nIdToDesel = GDB_ID.NULL
|
||||
EgtDraw()
|
||||
Return
|
||||
' altrimenti verifico il tipo del primo oggetto selezionato
|
||||
' altrimenti verifico il tipo del primo oggetto selezionato
|
||||
Else
|
||||
Dim nFirstSelId As Integer = EgtGetFirstSelectedObj()
|
||||
' se è un riferimento resetto lo stato di selezione ed esco
|
||||
@@ -1310,18 +1381,29 @@ Public Class ProjectVM
|
||||
ElseIf IniFile.m_ProjectMode = ProjectModeOpt.MACHINING And m_SceneSelType = SceneSelTypeOpt.MACHINING And
|
||||
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
|
||||
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
|
||||
ElseIf Not Keyboard.IsKeyDown(Key.LeftShift) Then
|
||||
m_Controller.MouseSelectedObj(nId, False)
|
||||
If EgtIsSelectedObj(nId) Then
|
||||
' Selezione layer in albero
|
||||
Map.refManageLayerExpanderVM.UpdateObjInObjTreeNoMark(nId)
|
||||
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(nId)
|
||||
Map.refManageLayerExpanderVM.UpdateObjTree()
|
||||
End If
|
||||
EgtDraw()
|
||||
Else
|
||||
m_Controller.MouseSelectedObj(nId, bLast)
|
||||
m_Controller.MouseSelectedObj(nId, False)
|
||||
If bLast Then
|
||||
If EgtIsSelectedObj(nId) Then
|
||||
' Selezione layer in albero
|
||||
Map.refManageLayerExpanderVM.UpdateObjInObjTreeNoMark(nId)
|
||||
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(nId)
|
||||
Map.refManageLayerExpanderVM.UpdateObjTree()
|
||||
End If
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
' Carico se presenti le dimensioni della griglia
|
||||
Application.Current.Dispatcher.BeginInvoke(
|
||||
Sub()
|
||||
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
End Sub,
|
||||
DispatcherPriority.Render)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseSelectedColor(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedColor
|
||||
m_Controller.MouseSelectedColor(nId)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseSelectedPart(ByVal sender As Object, ByVal nId As Integer) Handles m_ProjectScene.OnMouseSelectedPart
|
||||
@@ -1374,7 +1456,7 @@ Public Class ProjectVM
|
||||
m_Controller.MouseMoveInSelectionPoint(PtP)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseAnalyzedEx(sender As Object, nId As Integer, nSub As Integer, ptSel As Point3d) Handles m_ProjectScene.OnMouseAnalyzedEx
|
||||
Private Sub OnMouseAnalyzedEx(sender As Object, nId As Integer, nSub As Integer, ptSel As Point3d, nModKey As Integer) Handles m_ProjectScene.OnMouseAnalyzedEx
|
||||
Map.refManageLayerExpanderVM.UpdateObjInObjTree(nId)
|
||||
Map.refManageLayerExpanderVM.SelectIdInObjTree(nId)
|
||||
' Cancello geometria e info di eventuale precedente analisi
|
||||
@@ -1388,16 +1470,14 @@ Public Class ProjectVM
|
||||
' Se superficie trimesh, visualizzo dati faccetta toccata
|
||||
ElseIf EgtGetType(nId) = GDB_TY.SRF_MESH Then
|
||||
Dim nFac As Integer = EgtSurfTmFacetFromTria(nId, nSub)
|
||||
If nFac <> -1 Then
|
||||
If nFac >= 0 Then
|
||||
' Visualizzo la normale e il contorno della faccia
|
||||
Analyze.CreateAnalyzeGroup()
|
||||
Analyze.CreateFacetNormal(nId, nFac)
|
||||
Analyze.CreateFacetLoops(nId, nFac)
|
||||
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
If nModKey = Scene.MODKEY.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
|
||||
@@ -1409,8 +1489,7 @@ 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
|
||||
If nModKey = Scene.MODKEY.SHIFT Then
|
||||
sOut &= ", Triangle " + nSub.ToString()
|
||||
End If
|
||||
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||
@@ -1436,6 +1515,25 @@ Public Class ProjectVM
|
||||
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
||||
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||
End If
|
||||
' Se Superficie di Bezier
|
||||
ElseIf EgtGetType(nId) = GDB_TY.SRF_BEZ Then
|
||||
' Visualizzo il punto selezionato, la normale e le tangenti nelle direzioni dei parametri
|
||||
Analyze.CreateAnalyzeGroup()
|
||||
Dim dU, dV As Double
|
||||
Dim vtN As Vector3d
|
||||
If Analyze.CreateSBzPointNormalAndTangents(nId, ptSel, dU, dV, vtN) Then
|
||||
Dim dLen, dPhi, dTheta As Double
|
||||
vtN.ToSpherical(dLen, dTheta, dPhi)
|
||||
' Emetto info sulla barra di stato
|
||||
Dim sOut As String = "U=" + DoubleToString(dU, 4) + ",V=" + DoubleToString(dV, 4) +
|
||||
" : P(" + LenToString(ptSel.x, 3) + "," + LenToString(ptSel.y, 3) + "," + LenToString(ptSel.z, 3) + ")" +
|
||||
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
|
||||
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
||||
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||
If nModKey = Scene.MODKEY.SHIFT Then
|
||||
Analyze.CreateSBzIsoParam(nId, dU, dV)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' Aggiorno la visualizzazione
|
||||
EgtDraw()
|
||||
@@ -1450,6 +1548,8 @@ Public Class ProjectVM
|
||||
If e.KeyData = System.Windows.Forms.Keys.Delete AndAlso Map.refTopCommandBarVM.DrawIsChecked Then
|
||||
m_Controller.SetLastInteger(GDB_ID.SEL)
|
||||
m_Controller.ExecuteCommand(Controller.CMD.DELETE)
|
||||
' controllo per chiudere expander info
|
||||
If Not Map.refInfoExpanderVM.IsEnabled Then Map.refDrawOptionPanelV.DrawGrid.RowDefinitions(1).Height = New GridLength(1, GridUnitType.Auto)
|
||||
' Con END eseguo deselezione di tutto
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.End Then
|
||||
m_Controller.MouseDeselectedAll(True)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 683 B |
Binary file not shown.
|
After Width: | Height: | Size: 806 B |
Binary file not shown.
|
After Width: | Height: | Size: 797 B |
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
DockPanel.Dock="Right">
|
||||
DockPanel.Dock="Right"
|
||||
Margin="1,0,0,0">
|
||||
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
|
||||
</Grid>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
m_SetUpDbVM = SetUpDbVM
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.m_CloseWindow
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpDbVM.OnCloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Public Class SetUpDbVM
|
||||
|
||||
Private Const SETUP_FILEEXTENSION As String = ".stu"
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
Friend Event OnCloseWindow(bDialogResult As Boolean)
|
||||
|
||||
Private m_SetUpList As New ObservableCollection(Of String)
|
||||
Public ReadOnly Property SetUpList As ObservableCollection(Of String)
|
||||
@@ -263,7 +263,7 @@ Public Class SetUpDbVM
|
||||
Return
|
||||
End Select
|
||||
End If
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
RaiseEvent OnCloseWindow(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Close
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="BeamPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding BeamPanel_Visibility}">
|
||||
|
||||
@@ -10,13 +11,18 @@
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:ButtonItem}">
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type local:SeparatorItem}">
|
||||
<Border Style="{StaticResource Trimming_Border}">
|
||||
<Border Style="{StaticResource Separator_Border}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class BeamPanelVM
|
||||
Public Class BeamPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Friend Const BEAM_PROCESS As String = "Beam\Process.lua"
|
||||
Friend Const BEAM_MACHININGS As String = "BeamMachinings"
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||
Private m_ButtonList As New List(Of ButtonListItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
@@ -32,7 +29,7 @@ Public Class BeamPanelVM
|
||||
If IniFile.IsActiveBeam() Then
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonItem = Nothing
|
||||
Dim CurrBtn As ButtonListItem = Nothing
|
||||
While GetPrivateProfileButton(S_BEAM, K_BEAMBUTTON & BtnIndex, IniFile.m_sBeamDirPath, CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="BeamWallPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding BeamWallPanel_Visibility}">
|
||||
|
||||
@@ -10,13 +11,18 @@
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:ButtonItem}">
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type local:SeparatorItem}">
|
||||
<Border Style="{StaticResource Trimming_Border}">
|
||||
<Border Style="{StaticResource Separator_Border}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class BeamWallPanelVM
|
||||
Public Class BeamWallPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||
Private m_ButtonList As New List(Of ButtonListItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
@@ -30,7 +27,7 @@ Public Class BeamWallPanelVM
|
||||
GetPrivateProfileString(S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath)
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonItem = Nothing
|
||||
Dim CurrBtn As ButtonListItem = Nothing
|
||||
While GetPrivateProfileButton(S_BEAMWALL, K_BEAMWALLBUTTON & BtnIndex, IniFile.m_sBeamWallDirPath, CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="WallPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding WallPanel_Visibility}">
|
||||
|
||||
@@ -10,13 +11,18 @@
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:ButtonItem}">
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type local:SeparatorItem}">
|
||||
<Border Style="{StaticResource Trimming_Border}">
|
||||
<Border Style="{StaticResource Separator_Border}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class WallPanelVM
|
||||
Public Class WallPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Friend Const WALL_MACHININGS As String = "WallMachinings"
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||
Private m_ButtonList As New List(Of ButtonListItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
@@ -31,7 +28,7 @@ Public Class WallPanelVM
|
||||
If IniFile.IsActiveWall() Then
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonItem = Nothing
|
||||
Dim CurrBtn As ButtonListItem = Nothing
|
||||
While GetPrivateProfileButton(S_WALL, K_WALLBUTTON & BtnIndex, IniFile.m_sWallDirPath, CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="ReversePostPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding ReversePostPanel_Visibility}">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:ButtonItem}">
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type local:SeparatorItem}">
|
||||
<Border Style="{StaticResource Trimming_Border}">
|
||||
<Border Style="{StaticResource Separator_Border}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class ReversePostPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,37 @@
|
||||
Public Class ReversePostPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonListItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ReversePostPanel_Visibility As Visibility
|
||||
Public ReadOnly Property ReversePostPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_ReversePostPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetReversePostPanelVisibility(bValue As Boolean)
|
||||
m_ReversePostPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(ReversePostPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefReversePostPanelVM(Me)
|
||||
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
||||
If IniFile.IsActiveReversePost() Then
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonListItem = Nothing
|
||||
While GetPrivateProfileButton(S_REVERSEPOST, K_REVERSEPOSTBUTTON & BtnIndex, IniFile.m_sReversePostDirPath, CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,28 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="TrimmingPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding TrimmingPanel_Visibility}">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:ButtonItem}">
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type local:SeparatorItem}">
|
||||
<Border Style="{StaticResource Trimming_Border}">
|
||||
<Border Style="{StaticResource Separator_Border}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class TrimmingPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,37 @@
|
||||
Public Class TrimmingPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonListItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_TrimmingPanel_Visibility As Visibility
|
||||
Public ReadOnly Property TrimmingPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_TrimmingPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetTrimmingPanelVisibility(bValue As Boolean)
|
||||
m_TrimmingPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(TrimmingPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefTrimmingPanelVM(Me)
|
||||
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
||||
If IniFile.IsActiveTrimming() Then
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonListItem = Nothing
|
||||
While GetPrivateProfileButton(S_TRIMMING, K_TRIMMINGBUTTON & BtnIndex, IniFile.m_sTrimmingDirPath, CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,28 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="WindowPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding WindowPanel_Visibility}">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:ButtonItem}">
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type local:SeparatorItem}">
|
||||
<Border Style="{StaticResource Trimming_Border}">
|
||||
<Border Style="{StaticResource Separator_Border}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class WindowPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,37 @@
|
||||
Public Class WindowPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonListItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_WindowPanel_Visibility As Visibility
|
||||
Public ReadOnly Property WindowPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_WindowPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetWindowPanelVisibility(bValue As Boolean)
|
||||
m_WindowPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(WindowPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefWindowPanelVM(Me)
|
||||
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
||||
If IniFile.IsActiveWindow() Then
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonListItem = Nothing
|
||||
While GetPrivateProfileButton(S_WINDOW, K_WINDOWBUTTON & BtnIndex, IniFile.m_sWindowDirPath, CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,6 +1,7 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="SpecialPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding SpecialPanel_Visibility}">
|
||||
|
||||
@@ -10,14 +11,19 @@
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type local:ButtonItem}">
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}"
|
||||
Visibility="{Binding Btn_Visibility}" IsEnabled="{Binding Btn_IsEnabled}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type local:SeparatorItem}">
|
||||
<Border Style="{StaticResource Trimming_Border}">
|
||||
<Border Style="{StaticResource Separator_Border}"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
Imports System.IO
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class SpecialPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||
Private m_ButtonList As New List(Of ButtonListItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
@@ -32,10 +33,10 @@ Public Class SpecialPanelVM
|
||||
Map.SetRefSpecialPanelVM(Me)
|
||||
' se attivo, inizializzo i bottoni leggendoli da file ini
|
||||
If IniFile.IsActiveSpecialPanel(False) Then
|
||||
Dim BtlIndexMax As Integer = If( IniFile.m_nUserLevel > 5, 199, 99)
|
||||
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)
|
||||
Dim CurrBtn As ButtonListItem = Nothing
|
||||
If GetPrivateProfileButton(S_SPECIAL, K_BUTTON & BtnIndex, "", CurrBtn) Then
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
End If
|
||||
Next
|
||||
@@ -46,29 +47,35 @@ Public Class SpecialPanelVM
|
||||
|
||||
Public Function SetSpecialPanelButtonsVisibility(IsMachMode As Boolean) As Boolean
|
||||
Dim bSpecialPanel_Visible As Boolean = False
|
||||
For Each BtnItem In m_ButtonList
|
||||
' verifico il valore di nDrawMachOrBoth del bottone e IsMachMode per rendere visibile o meno il bottone in ButtonList
|
||||
Select Case BtnItem.nDrawMachOrBoth
|
||||
Case 0 ' bottone nascosto
|
||||
BtnItem.m_Btn_Visibility = Visibility.Collapsed
|
||||
Case 1 ' bottone visibile solo in Draw
|
||||
BtnItem.m_Btn_Visibility = If(Not IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
||||
Case 2 ' bottone visibile solo in Machining
|
||||
BtnItem.m_Btn_Visibility = If(IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
||||
Case 3 ' bottone visibile sia in Draw che in Machining
|
||||
BtnItem.m_Btn_Visibility = Visibility.Visible
|
||||
End Select
|
||||
' se anche uno solo è visibile anche lo SpecialPanel dovrà esserlo
|
||||
If BtnItem.Btn_Visibility = Visibility.Visible Then bSpecialPanel_Visible = True
|
||||
BtnItem.OnPropertyChanged(NameOf(BtnItem.Btn_Visibility))
|
||||
For Each BtnItemList In m_ButtonList
|
||||
If BtnItemList.Type = ButtonListItem.ButtonListItemTypes.BUTTON Then
|
||||
Dim BtnItem As ButtonItem = DirectCast(BtnItemList, ButtonItem)
|
||||
' verifico il valore di nDrawMachOrBoth del bottone e IsMachMode per rendere visibile o meno il bottone in ButtonList
|
||||
Select Case BtnItem.nDrawMachOrBoth
|
||||
Case 0 ' bottone nascosto
|
||||
BtnItem.m_Btn_Visibility = Visibility.Collapsed
|
||||
Case 1 ' bottone visibile solo in Draw
|
||||
BtnItem.m_Btn_Visibility = If(Not IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
||||
Case 2 ' bottone visibile solo in Machining
|
||||
BtnItem.m_Btn_Visibility = If(IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
||||
Case 3 ' bottone visibile sia in Draw che in Machining
|
||||
BtnItem.m_Btn_Visibility = Visibility.Visible
|
||||
End Select
|
||||
' se anche uno solo è visibile anche lo SpecialPanel dovrà esserlo
|
||||
If BtnItem.Btn_Visibility = Visibility.Visible Then bSpecialPanel_Visible = True
|
||||
BtnItem.NotifyPropertyChanged(NameOf(BtnItem.Btn_Visibility))
|
||||
End If
|
||||
Next
|
||||
Return bSpecialPanel_Visible
|
||||
End Function
|
||||
|
||||
Friend Sub SpecialPanelIsEnabled(SpecialPanelBtn_IsEnabled As Boolean)
|
||||
For Each BtnItem In m_ButtonList
|
||||
BtnItem.m_Btn_IsEnabled = SpecialPanelBtn_IsEnabled
|
||||
BtnItem.OnPropertyChanged(NameOf(BtnItem.Btn_IsEnabled))
|
||||
For Each BtnItemList In m_ButtonList
|
||||
If BtnItemList.Type = ButtonListItem.ButtonListItemTypes.BUTTON Then
|
||||
Dim BtnItem As ButtonItem = DirectCast(BtnItemList, ButtonItem)
|
||||
BtnItem.m_Btn_IsEnabled = SpecialPanelBtn_IsEnabled
|
||||
BtnItem.NotifyPropertyChanged(NameOf(BtnItem.Btn_IsEnabled))
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
@@ -77,7 +84,7 @@ Public Class SpecialPanelVM
|
||||
End Class
|
||||
|
||||
Public Class ButtonItem
|
||||
Inherits ViewModelBase
|
||||
Inherits ButtonListItem
|
||||
|
||||
Friend Shared WithEvents m_ProjectVM As ProjectVM
|
||||
Private Shared m_sCurrBarName As String
|
||||
@@ -90,6 +97,11 @@ Public Class ButtonItem
|
||||
End Get
|
||||
End Property
|
||||
Private m_sLuaCmdPath As String
|
||||
Public ReadOnly Property sLuaCmdPath As String
|
||||
Get
|
||||
Return m_sLuaCmdPath
|
||||
End Get
|
||||
End Property
|
||||
Private m_sToolTip As String
|
||||
Public ReadOnly Property ToolTip As String
|
||||
Get
|
||||
@@ -110,22 +122,26 @@ Public Class ButtonItem
|
||||
End Property
|
||||
|
||||
Friend m_Btn_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property Btn_IsEnabled As Boolean
|
||||
Public Property Btn_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_Btn_IsEnabled
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_Btn_IsEnabled = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdLuaExec As ICommand
|
||||
|
||||
Sub New( sBarName As String, sLuaCmdPath As String, sImagePath As String, sToolTip As String, sDrawMachOrBoth As String)
|
||||
Sub New(sBarName As String, sLuaCmdPath As String, sImagePath As String, sToolTip As String, sDrawMachOrBoth As String)
|
||||
MyBase.New(ButtonListItemTypes.BUTTON)
|
||||
m_sBarName = sBarName
|
||||
If File.Exists(sImagePath) Then
|
||||
' per lasciare libere le immagini le copio (potrebbe fallire perchè bloccate da altro eseguibile)
|
||||
Dim sNewPath As String = Path.Combine(IniFile.m_sResourcesRoot, sBarName & "_" & Path.GetFileName( sImagePath))
|
||||
Dim sNewPath As String = Path.Combine(IniFile.m_sResourcesRoot, sBarName & "_" & Path.GetFileName(sImagePath))
|
||||
Try
|
||||
File.Copy( sImagePath, sNewPath, True)
|
||||
File.Copy(sImagePath, sNewPath, True)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
m_sImagePath = sNewPath
|
||||
@@ -162,31 +178,34 @@ Public Class ButtonItem
|
||||
If m_sLuaCmdPath = BeamPanelVM.BEAM_MACHININGS Then
|
||||
Beam.BeamMachDb()
|
||||
Return
|
||||
' se altrimenti per pareti
|
||||
' se altrimenti per pareti
|
||||
ElseIf m_sLuaCmdPath = WallPanelVM.WALL_MACHININGS Then
|
||||
Wall.WallMachDb()
|
||||
Return
|
||||
End If
|
||||
If Not File.Exists(m_sLuaCmdPath) Then Return
|
||||
If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then Return
|
||||
' Abilito eventi se comando lua termina con Beam\Process.lua
|
||||
' Abilito eventi se comando lua lanciato da Beam o Wall
|
||||
m_sCurrBarName = m_sBarName
|
||||
Dim bRaiseEvent As Boolean = ( m_sBarName = "Beam" OrElse m_sBarName = "Wall")
|
||||
Dim bRaiseEvent As Boolean = (m_sBarName = "Beam" OrElse m_sBarName = "Wall")
|
||||
' eseguo file Lua
|
||||
Map.refProjectVM.PreExecScript(False)
|
||||
Map.refProjectVM.ExecScript(m_sLuaCmdPath, bRaiseEvent)
|
||||
m_sCurrBarName = Nothing
|
||||
' Carico se presenti le dimensioni della griglia
|
||||
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "ManageLayer", 0, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
DynamicGridModule.RestoreDrawGridLayout(Map.refDrawOptionPanelV.DrawGrid, "Info", 1, If(IniFile.IsActivePlugin(), DynamicGridModule.PROJECT_DRAW_PLUGIN, DynamicGridModule.PROJECT_DRAW))
|
||||
End Sub
|
||||
|
||||
Private Shared Sub OnPreControllerExec(sFilePath As String) Handles m_ProjectVM.OnPreControllerExec
|
||||
If m_sCurrBarName = "Beam" Then
|
||||
EgtLuaCreateGlobTable("BEAM")
|
||||
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamDirPath)
|
||||
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 then EgtLuaSetGlobBoolVar("BEAM.BW", true)
|
||||
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 Then EgtLuaSetGlobBoolVar("BEAM.BW", True)
|
||||
ElseIf m_sCurrBarName = "Wall" Then
|
||||
EgtLuaCreateGlobTable("WALL")
|
||||
EgtLuaSetGlobStringVar("WALL.BASEDIR", IniFile.m_sWallDirPath)
|
||||
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 then EgtLuaSetGlobBoolVar("WALL.BW", true)
|
||||
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 Then EgtLuaSetGlobBoolVar("WALL.BW", True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -202,4 +221,34 @@ Public Class ButtonItem
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ButtonListItem
|
||||
Inherits VMBase
|
||||
|
||||
Public Enum ButtonListItemTypes As Integer
|
||||
BUTTON = 1
|
||||
SEPARATOR = 2
|
||||
End Enum
|
||||
|
||||
Private m_Type As ButtonListItemTypes
|
||||
Public ReadOnly Property Type As ButtonListItemTypes
|
||||
Get
|
||||
Return m_Type
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Type As ButtonListItemTypes)
|
||||
m_Type = Type
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class SeparatorItem
|
||||
Inherits ButtonListItem
|
||||
|
||||
Sub New()
|
||||
MyBase.New(ButtonListItemTypes.SEPARATOR)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+25
-210
@@ -14,51 +14,6 @@ Public Class MyStatusBarVM
|
||||
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
|
||||
Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
|
||||
|
||||
' GRAPHICAL ELEMENTS
|
||||
'Private m_StatusOutput As String
|
||||
'Public Property StatusOutput As String
|
||||
' Get
|
||||
' Return m_StatusOutput
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_StatusOutput = value
|
||||
' NotifyPropertyChanged("StatusOutput")
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Private m_StatusCurrPos As String
|
||||
'Public Property StatusCurrPos As String
|
||||
' Get
|
||||
' Return m_StatusCurrPos
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_StatusCurrPos = value
|
||||
' NotifyPropertyChanged("StatusCurrPos")
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Private m_StatusProgress As Integer
|
||||
'Public Property StatusProgress As Integer
|
||||
' Get
|
||||
' Return m_StatusProgress
|
||||
' End Get
|
||||
' Set(value As Integer)
|
||||
' m_StatusProgress = value
|
||||
' NotifyPropertyChanged("StatusProgress")
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Private m_StatusStopIsEnabled As Boolean
|
||||
'Public Property StatusStopIsEnabled As Boolean
|
||||
' Get
|
||||
' Return m_StatusStopIsEnabled
|
||||
' End Get
|
||||
' Set(value As Boolean)
|
||||
' m_StatusStopIsEnabled = value
|
||||
' NotifyPropertyChanged("StatusStopIsEnabled")
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private m_GridDimensionText As String
|
||||
Public Property GridDimensionText As String
|
||||
Get
|
||||
@@ -92,84 +47,32 @@ Public Class MyStatusBarVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private m_StatusUnitsText As String
|
||||
'Public Property StatusUnitsText As String
|
||||
' Get
|
||||
' Return m_StatusUnitsText
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_StatusUnitsText = value
|
||||
' NotifyPropertyChanged("StatusUnitsText")
|
||||
' End Set
|
||||
'End Property
|
||||
Private m_nSelCount As Integer = 0
|
||||
Public ReadOnly Property SelCount As String
|
||||
Get
|
||||
Return "Sel : " & m_nSelCount.ToString()
|
||||
End Get
|
||||
End Property
|
||||
Public Sub UpdateSelectedCount()
|
||||
Dim nSelCnt As Integer = EgtGetSelectedObjCount()
|
||||
If nSelCnt <> m_nSelCount Then
|
||||
m_nSelCount = nSelCnt
|
||||
NotifyPropertyChanged("SelCount")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Private m_SnapPointTypeText As String
|
||||
'Public Property SnapPointTypeText As String
|
||||
' Get
|
||||
' Return m_SnapPointTypeText
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_SnapPointTypeText = value
|
||||
' NotifyPropertyChanged("SnapPointTypeText")
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Private m_SnapPointTypeBackground As SolidColorBrush
|
||||
'Public Property SnapPointTypeBackground As SolidColorBrush
|
||||
' Get
|
||||
' Return m_SnapPointTypeBackground
|
||||
' End Get
|
||||
' Set(value As SolidColorBrush)
|
||||
' m_SnapPointTypeBackground = value
|
||||
' NotifyPropertyChanged("SnapPointTypeBackground")
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'' Lista delle macchine disponibili nel programma
|
||||
'Private m_MachinesList As New ObservableCollection(Of Machine)
|
||||
'Public Property MachinesList As ObservableCollection(Of Machine)
|
||||
' Get
|
||||
' Return m_MachinesList
|
||||
' End Get
|
||||
' Set(value As ObservableCollection(Of Machine))
|
||||
' m_MachinesList = value
|
||||
' End Set
|
||||
'End Property
|
||||
'' Macchina correntemente selezionata e quindi attiva
|
||||
'Private m_SelectedMachine As Machine
|
||||
'Public Property SelectedMachine As Machine
|
||||
' Get
|
||||
' Return m_SelectedMachine
|
||||
' End Get
|
||||
' Set(value As Machine)
|
||||
' If IsNothing(value) Then
|
||||
' m_SelectedMachine = Nothing
|
||||
' ElseIf value IsNot m_SelectedMachine Then
|
||||
' EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
' If EgtSetCurrMachine(value.Name) Then
|
||||
' m_SelectedMachine = value
|
||||
' IniFile.m_sMachineName = m_SelectedMachine.Name
|
||||
' IniFile.m_sCurrMachIniFilePath = m_SelectedMachine.MachineDirPath & "\" & m_SelectedMachine.Name & ".ini"
|
||||
' IniFile.m_sCurrMachToolsDirPath = m_SelectedMachine.MachineDirPath & "\Tools"
|
||||
' IniFile.m_sCurrMachSetUpDirPath = m_SelectedMachine.MachineDirPath & "\SetUp"
|
||||
' IniFile.m_sCurrMachScriptsDirPath = m_SelectedMachine.MachineDirPath & "\Scripts"
|
||||
' UpdateToolAndMachDbParamVisibility()
|
||||
' NotifyPropertyChanged("SelectedMachine")
|
||||
' End If
|
||||
' End If
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'Private m_MachineListIsEnabled As Boolean
|
||||
'Public Property MachineListIsEnabled As Boolean
|
||||
' Get
|
||||
' Return m_MachineListIsEnabled
|
||||
' End Get
|
||||
' Set(value As Boolean)
|
||||
' m_MachineListIsEnabled = value
|
||||
' NotifyPropertyChanged("MachineListIsEnabled")
|
||||
' End Set
|
||||
'End Property
|
||||
Public ReadOnly Property SelCountVisibility As Visibility
|
||||
Get
|
||||
If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then
|
||||
Return Visibility.Visible
|
||||
Else
|
||||
Return Visibility.Hidden
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub UpdateSelCountVisibility()
|
||||
NotifyPropertyChanged("SelCountVisibility")
|
||||
End Sub
|
||||
|
||||
' Commands definition
|
||||
Private m_cmdGridDimension As ICommand
|
||||
@@ -434,94 +337,6 @@ Public Class MyStatusBarVM
|
||||
EgtSetGridShow(bShowGrid, bShowGrid And bShowGridFrame)
|
||||
End Sub
|
||||
|
||||
'''' <summary>
|
||||
'''' Method that search the machines in the correct folder and add to the MachinesList those valid.
|
||||
'''' </summary>
|
||||
'Private Sub SearchMachines()
|
||||
' ' Svuoto la lista delle macchine
|
||||
' m_MachinesList.Clear()
|
||||
' ' Se direttorio base macchine non definito o non esiste, ritorno
|
||||
' If String.IsNullOrWhiteSpace(IniFile.m_sMachinesRoot) OrElse
|
||||
' Not Directory.Exists(IniFile.m_sMachinesRoot) OrElse Directory.GetDirectories(IniFile.m_sMachinesRoot).Count = 0 Then
|
||||
' IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW
|
||||
' EgtOutLog(EgtMsg(MSG_STATUSBAR + 1))
|
||||
' Return
|
||||
' End If
|
||||
' ' Cerco le macchine
|
||||
' Dim TempArray As String() = Directory.GetDirectories(IniFile.m_sMachinesRoot)
|
||||
' For i As Integer = 0 To TempArray.Count - 1
|
||||
' AddMachine(TempArray(i))
|
||||
' Next
|
||||
' If m_MachinesList.Count = 0 Then
|
||||
' IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW
|
||||
' EgtOutLog(EgtMsg(MSG_STATUSBAR + 1))
|
||||
' Return
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Private Function AddMachine(sPath As String) As Boolean
|
||||
' ' Verifico presenza file caratteristici
|
||||
' Dim sName As String = Path.GetFileName(sPath)
|
||||
' Dim MachineIniPath As String = sPath & "\" & sName & ".ini"
|
||||
' Dim MachineMldePath As String = sPath & "\" & sName & ".mlde"
|
||||
' If Not File.Exists(MachineIniPath) Or Not File.Exists(MachineMldePath) Then Return False
|
||||
' ' Aggiungo alla lista
|
||||
' m_MachinesList.Add(New Machine With {.Name = sName, .MachineDirPath = sPath})
|
||||
' Return True
|
||||
'End Function
|
||||
|
||||
'Friend Function InsertMachine(sPath As String) As Boolean
|
||||
' ' Verifico presenza file caratteristici
|
||||
' Dim sName As String = Path.GetFileName(sPath)
|
||||
' Dim MachineIniPath As String = sPath & "\" & sName & ".ini"
|
||||
' Dim MachineMldePath As String = sPath & "\" & sName & ".mlde"
|
||||
' If Not File.Exists(MachineIniPath) Or Not File.Exists(MachineMldePath) Then Return False
|
||||
' ' Cerco la posizione di inserimento
|
||||
' Dim nPos As Integer = 0
|
||||
' For nI As Integer = 0 To m_MachinesList.Count() - 1
|
||||
' Dim nRes As Integer = String.Compare(sName, m_MachinesList(nI).Name, True)
|
||||
' If nRes = 0 Then
|
||||
' Return True
|
||||
' ElseIf nRes < 0 Then
|
||||
' Exit For
|
||||
' Else
|
||||
' nPos += 1
|
||||
' End If
|
||||
' Next
|
||||
' ' Inserisco nella lista
|
||||
' m_MachinesList.Insert(nPos, New Machine With {.Name = sName, .MachineDirPath = sPath})
|
||||
' Return True
|
||||
'End Function
|
||||
|
||||
'''' <summary>
|
||||
'''' Class that create the association Name/IniPath for the machine's
|
||||
'''' </summary>
|
||||
'Class Machine
|
||||
|
||||
' Private m_sName As String
|
||||
' Public Property Name As String
|
||||
' Get
|
||||
' Return m_sName
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_sName = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Friend MachineDirPath As String
|
||||
|
||||
'End Class
|
||||
|
||||
'Private Sub UpdateToolAndMachDbParamVisibility()
|
||||
' If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWINGONARCS, 0, IniFile.m_sCurrMachIniFilePath) <> 0 Then
|
||||
' Sawing(39) = Visibility.Visible ' StepExtArc
|
||||
' Sawing(40) = Visibility.Visible ' StepIntArc
|
||||
' Else
|
||||
' Sawing(39) = Visibility.Collapsed ' StepExtArc
|
||||
' Sawing(40) = Visibility.Collapsed ' StepIntArc
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Public Function OutText(ByRef psText As IntPtr) As Boolean
|
||||
' Assegno stringa
|
||||
OutputMessage = (Marshal.PtrToStringUni(psText))
|
||||
|
||||
@@ -67,6 +67,11 @@
|
||||
<TextBlock Text="{Binding CurrPos}" Foreground="{StaticResource EgaltechWhite}"/>
|
||||
</StatusBarItem>
|
||||
<StatusBarItem Grid.Column="8">
|
||||
<!-- Indica il numero di entità selezionate -->
|
||||
<TextBlock Text="{Binding SelCount}" Foreground="{StaticResource EgaltechWhite}"
|
||||
Visibility="{Binding SelCountVisibility}" Margin="5,0,5,0" />
|
||||
</StatusBarItem>
|
||||
<StatusBarItem Grid.Column="9">
|
||||
<Button Command="{Binding StatusUnitsCommand}" Content="{Binding MeasureUnit}" Width="35"/>
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
|
||||
@@ -91,17 +91,17 @@ Public Class InfoItem
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend sValour As String
|
||||
Friend sValue As String
|
||||
''' <summary>
|
||||
''' Valore lista info note
|
||||
''' </summary>
|
||||
Public Property Valour As String
|
||||
Public Property Value As String
|
||||
Get
|
||||
Return sValour
|
||||
Return sValue
|
||||
End Get
|
||||
Set(value As String)
|
||||
sValour = value
|
||||
NotifyPropertyChanged(NameOf(Valour))
|
||||
sValue = value
|
||||
NotifyPropertyChanged(NameOf(Value))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -115,7 +115,7 @@ Public Class InfoItem
|
||||
Sub New(nId As Integer, sKey As String, sValue As String)
|
||||
Me.nId = nId
|
||||
Me.sKey = sKey
|
||||
Me.sValour = sValue
|
||||
Me.sValue = sValue
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructors
|
||||
|
||||
@@ -99,7 +99,7 @@ Public Class MyToolDbWindowVM
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String) 'Handles m_ToolScene.OnCursorPos
|
||||
Public Overrides Sub OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String)
|
||||
Map.refStatusBarVM.NotifyCurrPos(sCursorPos)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -210,6 +210,10 @@ Public Class TopCommandBarVM
|
||||
If Not IsNothing(Map.refSpecialPanelVM) Then
|
||||
Map.refSpecialPanelVM.SpecialPanelIsEnabled(value)
|
||||
End If
|
||||
' aggiorno visibilità indicatore numero di entità selezionate
|
||||
If Not IsNothing(Map.refStatusBarVM) Then
|
||||
Map.refStatusBarVM.UpdateSelCountVisibility()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -236,7 +240,7 @@ Public Class TopCommandBarVM
|
||||
If EgtGetCurrMachGroup() = GDB_ID.NULL Then
|
||||
ExecExitMachScript()
|
||||
EgtDraw()
|
||||
' altrimenti, aggiusto...
|
||||
' altrimenti, aggiusto...
|
||||
Else
|
||||
' se parametri di una lavorazione aperti, disattivo database utensili, lavorazioni e setup
|
||||
Dim bIsEnabled As Boolean = Not IsNothing(Map.refOperationParametersExpanderVM) AndAlso Not Map.refOperationParametersExpanderVM.ParametersIsExpanded
|
||||
@@ -244,6 +248,8 @@ Public Class TopCommandBarVM
|
||||
' se parametri di una lavorazione aperti, disattivo MTable e SpecialPanel
|
||||
If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled)
|
||||
If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled)
|
||||
' aggiorno visibilità indicatore numero di entità selezionate
|
||||
If Not IsNothing(Map.refStatusBarVM) Then Map.refStatusBarVM.UpdateSelCountVisibility()
|
||||
End If
|
||||
Else
|
||||
' Deseleziono tutto
|
||||
@@ -803,6 +809,9 @@ Public Class TopCommandBarVM
|
||||
Map.refWallPanelVM.SetWallPanelVisibility(IniFile.IsActiveWall())
|
||||
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeam() Or IniFile.IsActiveWall())
|
||||
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
|
||||
Map.refWindowPanelVM.SetWindowPanelVisibility(IniFile.IsActiveWindow())
|
||||
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(IniFile.IsActiveTrimming())
|
||||
Map.refReversePostPanelVM.SetReversePostPanelVisibility(IniFile.IsActiveReversePost())
|
||||
Map.refGunStockPanelVM.SetGunStockPanelVisibility(IniFile.IsActiveGunStock())
|
||||
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(True)
|
||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False)
|
||||
@@ -851,6 +860,9 @@ Public Class TopCommandBarVM
|
||||
Map.refWallPanelVM.SetWallPanelVisibility(False)
|
||||
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(False)
|
||||
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
|
||||
Map.refWindowPanelVM.SetWindowPanelVisibility(False)
|
||||
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(False)
|
||||
Map.refReversePostPanelVM.SetReversePostPanelVisibility(False)
|
||||
Map.refGunStockPanelVM.SetGunStockPanelVisibility(False)
|
||||
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False)
|
||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
DockPanel.Dock="Top"
|
||||
Orientation="Horizontal">
|
||||
|
||||
|
||||
<EgtFloating:EgtFloatingPanel Name="ShowPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:ShowPanelV DataContext="{StaticResource ShowPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="ViewPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:ViewPanelV DataContext="{StaticResource ViewPanelViewModel}"/>
|
||||
<local:PopUpViewPanelV DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -20,7 +20,7 @@
|
||||
<local:InstrumentPanelV DataContext="{StaticResource InstrumentPanelViewModel}"/>
|
||||
<!--</EgtFloating:EgtFloatingPanel>-->
|
||||
<EgtFloating:EgtFloatingPanel Name="GridPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:GridPanelV DataContext="{StaticResource GridPanelViewModel}"/>
|
||||
<local:PopUpGridPanelV DataContext="{StaticResource PopUpGridPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -30,6 +30,9 @@
|
||||
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
|
||||
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
|
||||
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
|
||||
<local:WindowPanelV DataContext="{StaticResource WindowPanelViewModel}"/>
|
||||
<local:TrimmingPanelV DataContext="{StaticResource TrimmingPanelViewModel}"/>
|
||||
<local:ReversePostPanelV DataContext="{StaticResource ReversePostPanelViewModel}"/>
|
||||
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
|
||||
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
|
||||
|
||||
|
||||
+59
-8
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Data
|
||||
Imports EgtUILib
|
||||
|
||||
Module Analyze
|
||||
|
||||
@@ -109,26 +110,26 @@ Module Analyze
|
||||
If m_AnaGrpId = GDB_ID.NULL Then Return False
|
||||
Dim bEnMod As Boolean = EgtGetEnableModified()
|
||||
EgtDisableModified()
|
||||
'Riferimento della griglia corrente
|
||||
' Salvo riferimento della griglia corrente
|
||||
Dim refGrid As Frame3d = EgtGetGridFrame()
|
||||
'Nuovo riferimento griglia con Z come versore estrusione della curva
|
||||
' Nuovo riferimento griglia con Z come versore estrusione della curva
|
||||
Dim vtExtr As Vector3d : EgtCurveExtrusion( nId, vtExtr)
|
||||
If Not vtExtr.IsSmall() Then
|
||||
Dim refCrv As New Frame3d : refCrv.Setup( EgtGetGridOrigin(), vtExtr)
|
||||
EgtSetGridFrame( refCrv)
|
||||
End If
|
||||
'Recupero il numero di curve semplici
|
||||
' Recupero il numero di curve semplici
|
||||
Dim dStart, dEnd As Double
|
||||
EgtCurveDomain( nId, dStart, dEnd)
|
||||
Dim nCount As Integer = CInt( dEnd - dStart) - 1
|
||||
' Ciclo sulle curve semplici
|
||||
For i As Integer = 0 To nCount
|
||||
'Scrivo il punto iniziale di ogni curva componente
|
||||
' Scrivo il punto iniziale di ogni curva componente
|
||||
Dim ptS As Point3d
|
||||
EgtAtParamPoint( nId, i, GDB_ID.GRID, ptS)
|
||||
Dim nPntId As Integer = EgtCreateGeoPoint( m_AnaGrpId, ptS, GDB_RT.GRID)
|
||||
EgtSetColor( nPntId, New Color3d( 255, 0,0))
|
||||
'Scrivo il numero identificativo di ogni curva componente
|
||||
' Scrivo il numero identificativo di ogni curva componente
|
||||
Dim ptP As Point3d
|
||||
EgtAtParamPoint( nId, i + 0.5, GDB_ID.GRID, ptP)
|
||||
Dim dLen As Double = 2 * Point3d.Dist( ptS, ptP)
|
||||
@@ -136,17 +137,67 @@ Module Analyze
|
||||
Dim nTxtId As Integer = EgtCreateTextAdv( m_AnaGrpId, ptP, 0, i.ToString(), "", 100, False, dH, 1, 0, INS_POS.MC, GDB_RT.GRID)
|
||||
EgtSetColor( nTxtId, New Color3d( 255, 0,0))
|
||||
Next
|
||||
'Se curva aperta aggiungo il punto finale
|
||||
' Se curva aperta aggiungo il punto finale
|
||||
If Not EgtCurveIsClosed( nId) Then
|
||||
Dim ptE As Point3d
|
||||
EgtEndPoint( nId, GDB_ID.GRID, ptE)
|
||||
Dim nPntId As Integer = EgtCreateGeoPoint( m_AnaGrpId, ptE, GDB_RT.GRID)
|
||||
EgtSetColor( nPntId, New Color3d( 255, 0,0))
|
||||
End If
|
||||
'Reimposto il riferimento originale alla griglia
|
||||
' Reimposto il riferimento originale alla griglia
|
||||
EgtSetGridFrame( refGrid)
|
||||
If bEnMod Then EgtEnableModified()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Function CreateSBzPointNormalAndTangents( nId As Integer, ptBez As Point3d, ByRef dU As Double, ByRef dV As Double, ByRef vtN As Vector3d) As Boolean
|
||||
Dim ptP As Point3d
|
||||
Dim vtDirU, vtDirV As Vector3d
|
||||
Dim bOk As Boolean = EgtSurfBezierParamsFromPoint( nId, ptBez, GDB_ID.ROOT, dU, dV) AndAlso
|
||||
EgtSurfBezierGetPointNrmD1( nId, dU, dV, SRF_SIDE.FROM_MINUS, SRF_SIDE.FROM_MINUS, GDB_ID.ROOT,
|
||||
ptP, vtN, vtDirU, vtDirV)
|
||||
If bOk AndAlso m_AnaGrpId <> GDB_ID.NULL Then
|
||||
Dim bEnMod As Boolean = EgtGetEnableModified()
|
||||
EgtDisableModified()
|
||||
' Disegno Punto
|
||||
Dim nPntId As Integer = EgtCreateGeoPoint( m_AnaGrpId, ptBez, GDB_RT.GLOB)
|
||||
EgtSetColor( nPntId, New Color3d( 255, 0, 0))
|
||||
EgtSetStatus( nPntId, GDB_ST.SEL)
|
||||
' Disegno Vettore Normale
|
||||
Dim nNormId As Integer = EgtCreateGeoVector( m_AnaGrpId, 50 * vtN, ptBez, GDB_RT.GLOB)
|
||||
EgtSetColor( nNormId, New Color3d( 255, 0, 0))
|
||||
EgtSetStatus( nNormId, GDB_ST.SEL)
|
||||
' Disegno tangente in U
|
||||
Dim dModU As Double = vtDirU.Len()
|
||||
If dModU > EPS_ZERO Then
|
||||
Dim nTgUId As Integer = EgtCreateGeoVector( m_AnaGrpId, 25 / dModU * vtDirU, ptBez, GDB_RT.GLOB)
|
||||
EgtSetColor( nTgUId, New Color3d( 0, 128, 192))
|
||||
EgtSetStatus( nTgUId, GDB_ST.SEL)
|
||||
End If
|
||||
' Disegno tangente in V
|
||||
Dim dModV As Double = vtDirV.Len()
|
||||
If dModV > EPS_ZERO Then
|
||||
Dim nTgVId As Integer = EgtCreateGeoVector( m_AnaGrpId, 25 / dModV * vtDirV, ptBez, GDB_RT.GLOB)
|
||||
EgtSetColor( nTgVId, New Color3d( 255, 128, 0))
|
||||
EgtSetStatus( nTgVId, GDB_ST.SEL)
|
||||
End If
|
||||
If bEnMod Then EgtEnableModified()
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Function CreateSBzIsoParam( nId As Integer, ByRef dU As Double, ByRef dV As Double) As Boolean
|
||||
If m_AnaGrpId = GDB_ID.NULL Then Return False
|
||||
Dim bEnMod As Boolean = EgtGetEnableModified()
|
||||
EgtDisableModified()
|
||||
Dim nCrvUId As Integer = EgtSurfBezierGetCurveU( nId, dV, m_AnaGrpId)
|
||||
EgtSetColor( nCrvUId, New Color3d( 0, 128, 192))
|
||||
EgtSetStatus( nCrvUId, GDB_ST.SEL)
|
||||
Dim nCrvVId As Integer = EgtSurfBezierGetCurveV( nId, dU, m_AnaGrpId)
|
||||
EgtSetColor( nCrvVId, New Color3d( 255, 128, 0))
|
||||
EgtSetStatus( nCrvVId, GDB_ST.SEL)
|
||||
If bEnMod Then EgtEnableModified()
|
||||
Return ( nCrvUId <> GDB_ID.NULL And nCrvVId <> GDB_ID.NULL)
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
+67
-3
@@ -36,10 +36,11 @@
|
||||
<EgtCAM5:WallPanelVM x:Key="WallPanelViewModel"/>
|
||||
<EgtCAM5:BeamWallPanelVM x:Key="BeamWallPanelViewModel"/>
|
||||
<EgtCAM5:DoorPanelVM x:Key="DoorsPanelViewModel"/>
|
||||
<EgtCAM5:WindowPanelVM x:Key="WindowPanelViewModel"/>
|
||||
<EgtCAM5:TrimmingPanelVM x:Key="TrimmingPanelViewModel"/>
|
||||
<EgtCAM5:ReversePostPanelVM x:Key="ReversePostPanelViewModel"/>
|
||||
<EgtCAM5:GunStockPanelVM x:Key="GunStockPanelViewModel"/>
|
||||
<EgtCAM5:MyMachGroupPanelVM x:Key="MachGroupPanelViewModel"/>
|
||||
<!--<EgtCAM5:MachGroupPanelVM x:Key="MachGroupPanelViewModel"/>-->
|
||||
<!--<EgtCAM5:OperationExpanderVM x:Key="OperationExpanderViewModel"/>-->
|
||||
|
||||
<!--
|
||||
This template applies a StatusBarView to an instance
|
||||
@@ -141,6 +142,13 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="PreviewTool_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Width" Value="30"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="IsDefault" Value="True"/>
|
||||
</Style>
|
||||
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- Expander Style -->
|
||||
@@ -600,6 +608,19 @@
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ExecuteOkWindow_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
<Setter Property="Margin" Value="0,5,0,5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ExecuteWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
<Setter Property="Margin" Value="2,5,5,5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DrawOptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
</Style>
|
||||
|
||||
@@ -770,6 +791,14 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ExecuteWindow_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
|
||||
<Setter Property="AcceptsReturn" Value="True"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="FontFamily" Value="Consolas"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToggleButtonTabStyle" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||
@@ -1248,9 +1277,12 @@
|
||||
<!-- Style Slider -->
|
||||
|
||||
<Style x:Key="SliderValue_Slider" TargetType="{x:Type Slider}">
|
||||
<Setter Property="Width" Value="235"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="SmallChange" Value="1"/>
|
||||
<Setter Property="TickPlacement" Value="TopLeft"/>
|
||||
<Setter Property="Margin" Value="1,2,0,2"/>
|
||||
<Setter Property="IsSnapToTickEnabled" Value="False"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" Value="0.5"/>
|
||||
@@ -1272,4 +1304,36 @@
|
||||
</Style.Triggers>-->
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- Style Border-->
|
||||
|
||||
<Style x:Key="Trimming_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Margin" Value="1"/>
|
||||
<Setter Property="Padding" Value="0,2,0,2"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="8"/>
|
||||
<Setter Property="CornerRadius" Value="1"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Separator_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Border}"/>
|
||||
<Setter Property="Width" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="1"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- Style GridSplitter-->
|
||||
|
||||
<Style x:Key="General_GridSplitter" TargetType="{x:Type GridSplitter}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
<Setter Property="Height" Value="5"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -0,0 +1,244 @@
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module DynamicGridModule
|
||||
|
||||
Friend Const PROJECT_EGTCAM5 As String = "Project_EgtCAM5"
|
||||
Friend Const PROJECT_EGTCAM5_PLUGIN As String = "Project_EgtCAM5_PlugIn"
|
||||
|
||||
Friend Const PROJECT_MACHINING As String = "Project_Machinig"
|
||||
Friend Const PROJECT_MACHINING_PLUGIN As String = "Project_Machinig_PlugIn"
|
||||
|
||||
Friend Const PROJECT_DRAW As String = "Project_Draw"
|
||||
Friend Const PROJECT_DRAW_PLUGIN As String = "Project_Draw_PlugIn"
|
||||
|
||||
''' <summary>
|
||||
''' Funzione per popolare la griglia
|
||||
''' </summary>
|
||||
''' <param name="m_TopTrayV"></param>
|
||||
''' <param name="m_LeftTrayV"></param>
|
||||
''' <param name="m_RightTrayV"></param>
|
||||
''' <param name="m_BottomTrayV"></param>
|
||||
''' <param name="m_SceneContentControlV"></param>
|
||||
''' <param name="gridSplitter"></param>
|
||||
Friend Sub PopulateGrid(m_TopTrayV As TopTrayV, m_LeftTrayV As LeftTrayV, m_RightTrayV As RightTrayV, m_BottomTrayV As BottomTrayV, m_SceneContentControlV As SceneContentControlV, gridSplitter As GridSplitter)
|
||||
' aggiungo TopTrayV
|
||||
Grid.SetRow(m_TopTrayV, 0)
|
||||
Grid.SetColumnSpan(m_TopTrayV, 3)
|
||||
|
||||
' aggiungo LeftTrayV
|
||||
Grid.SetRow(m_LeftTrayV, 1)
|
||||
Grid.SetColumn(m_LeftTrayV, 0)
|
||||
|
||||
' aggiungo RightTrayV
|
||||
Grid.SetRow(m_RightTrayV, 1)
|
||||
Grid.SetColumn(m_RightTrayV, 2)
|
||||
|
||||
'aggiungo gridSplitter
|
||||
Grid.SetRow(gridSplitter, 1)
|
||||
Grid.SetColumn(gridSplitter, 2)
|
||||
|
||||
' aggiungo BottomTrayV
|
||||
Grid.SetRow(m_BottomTrayV, 2)
|
||||
Grid.SetColumn(m_BottomTrayV, 1)
|
||||
|
||||
' aggiungo Scena
|
||||
Grid.SetRow(m_SceneContentControlV, 1)
|
||||
Grid.SetColumn(m_SceneContentControlV, 1)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Funzione per popolare la griglia con PlugIn
|
||||
''' </summary>
|
||||
''' <param name="m_TopTrayV"></param>
|
||||
''' <param name="m_RightTrayV"></param>
|
||||
''' <param name="m_BottomTrayV"></param>
|
||||
''' <param name="m_SceneContentControlV"></param>
|
||||
''' <param name="gridSplitter"></param>
|
||||
Friend Sub PopolateGridWithPlugIn(m_TopTrayV As TopTrayV, m_RightTrayV As RightTrayV, m_BottomTrayV As BottomTrayV, m_SceneContentControlV As SceneContentControlV, gridSplitter As GridSplitter)
|
||||
' aggiungo TopTrayV
|
||||
Grid.SetRow(m_TopTrayV, 0)
|
||||
Grid.SetColumn(m_TopTrayV, 1)
|
||||
|
||||
' aggiungo RightTrayV
|
||||
Grid.SetRow(m_RightTrayV, 0)
|
||||
Grid.SetColumn(m_RightTrayV, 2)
|
||||
|
||||
'aggiungo gridSplitter
|
||||
Grid.SetRow(gridSplitter, 0)
|
||||
Grid.SetColumn(gridSplitter, 2)
|
||||
|
||||
' aggiungo BottomTrayV
|
||||
Grid.SetRow(m_BottomTrayV, 2)
|
||||
Grid.SetColumn(m_BottomTrayV, 1)
|
||||
|
||||
' aggiungo Scena
|
||||
Grid.SetRow(m_SceneContentControlV, 1)
|
||||
Grid.SetColumn(m_SceneContentControlV, 1)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Creazione GridSplitter
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Friend Function CreateGridSplitter() As GridSplitter
|
||||
' creo gridsplitter
|
||||
Dim gridSplitter As New GridSplitter With {
|
||||
.Width = 30,
|
||||
.HorizontalAlignment = HorizontalAlignment.Left,
|
||||
.VerticalAlignment = VerticalAlignment.Stretch,
|
||||
.Background = Brushes.Transparent
|
||||
}
|
||||
AddHandler gridSplitter.DragCompleted,
|
||||
Sub()
|
||||
SaveGridLayout(If(IsActivePlugin(), PROJECT_EGTCAM5_PLUGIN, PROJECT_EGTCAM5))
|
||||
End Sub
|
||||
|
||||
Return gridSplitter
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Creazione Griglia Dinamica
|
||||
''' </summary>
|
||||
Friend Sub CreateDynamicGrid()
|
||||
' creo colonne griglia dinamica
|
||||
Dim gridCol1 As New ColumnDefinition With {
|
||||
.Width = New GridLength(1, GridUnitType.Auto)
|
||||
}
|
||||
Dim gridCol2 As New ColumnDefinition With {
|
||||
.Width = New GridLength(1, GridUnitType.Star)
|
||||
}
|
||||
Dim gridCol3 As New ColumnDefinition With {
|
||||
.Width = New GridLength(250),
|
||||
.MinWidth = 150
|
||||
}
|
||||
' aggiungo le colonne alla griglia
|
||||
Map.refProjectVM.DynamicGrid.ColumnDefinitions.Add(gridCol1)
|
||||
Map.refProjectVM.DynamicGrid.ColumnDefinitions.Add(gridCol2)
|
||||
Map.refProjectVM.DynamicGrid.ColumnDefinitions.Add(gridCol3)
|
||||
|
||||
' creo righe griglia dinamica
|
||||
Dim gridRow1 As New RowDefinition With {
|
||||
.Height = New GridLength(1, GridUnitType.Auto)
|
||||
}
|
||||
Dim gridRow2 As New RowDefinition With {
|
||||
.Height = New GridLength(1, GridUnitType.Star)
|
||||
}
|
||||
Dim gridRow3 As New RowDefinition With {
|
||||
.Height = New GridLength(1, GridUnitType.Auto)
|
||||
}
|
||||
' aggiungo righe alla griglia
|
||||
Map.refProjectVM.DynamicGrid.RowDefinitions.Add(gridRow1)
|
||||
Map.refProjectVM.DynamicGrid.RowDefinitions.Add(gridRow2)
|
||||
Map.refProjectVM.DynamicGrid.RowDefinitions.Add(gridRow3)
|
||||
End Sub
|
||||
|
||||
Friend Sub SaveGridLayout(GridTitle As String)
|
||||
Dim Index As Integer = 0
|
||||
|
||||
' Salvo colonna 2
|
||||
Dim valueCol2 As String = 0 & "," & 0 & "," & Map.refProjectVM.DynamicGrid.ColumnDefinitions(2).ActualWidth.ToString()
|
||||
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), valueCol2, Map.refMainWindowVM.DimensionDir)
|
||||
|
||||
Index = 1
|
||||
For i As Integer = 1 To Map.refProjectVM.DynamicGrid.RowDefinitions.Count - 1
|
||||
Dim row = Map.refProjectVM.DynamicGrid.RowDefinitions(i)
|
||||
Dim value As String = i.ToString() & "," & 1 & "," & row.ActualHeight.ToString()
|
||||
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), value, Map.refMainWindowVM.DimensionDir)
|
||||
Index += 1
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Friend Sub RestoreGridLayout(GridTitle As String)
|
||||
Dim Index As Integer = 0
|
||||
Dim IndexRow As Integer = 1
|
||||
Dim sValue = String.Empty
|
||||
While EgtUILib.GetPrivateProfileString(GridTitle, Index.ToString(), String.Empty, sValue, Map.refMainWindowVM.DimensionDir) > 0
|
||||
Dim sValueParams() As String = sValue.Split(","c)
|
||||
If sValueParams.Count >= 3 Then
|
||||
' cancello spazi
|
||||
For I As Integer = 0 To sValueParams.Count - 1
|
||||
sValueParams(I) = sValueParams(I).Trim()
|
||||
Next
|
||||
' creo valore
|
||||
Dim nDimType As Integer
|
||||
Dim GridLenValue As Double
|
||||
Integer.TryParse(sValueParams(1), nDimType)
|
||||
StringToDoubleAdv(sValueParams(2), GridLenValue)
|
||||
If nDimType = 0 Then
|
||||
Map.refProjectVM.DynamicGrid.ColumnDefinitions(2).Width = New GridLength(GridLenValue, GridUnitType.Pixel)
|
||||
Else
|
||||
Map.refProjectVM.DynamicGrid.RowDefinitions(IndexRow).Height = If(GridLenValue = 0, New GridLength(1, GridUnitType.Auto), New GridLength(GridLenValue, GridUnitType.Star))
|
||||
IndexRow += 1
|
||||
End If
|
||||
End If
|
||||
Index += 1
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Friend Sub SaveMachiningGridLayout(MachGrid As Grid, GridTitle As String)
|
||||
Dim Index As Integer = 0
|
||||
' Salvo riga 0
|
||||
Dim valueRow As String = Index & "," & Index & "," & MachGrid.RowDefinitions(Index).ActualHeight.ToString()
|
||||
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), valueRow, Map.refMainWindowVM.DimensionDir)
|
||||
End Sub
|
||||
|
||||
Friend Sub RestoreMachiningGridLayout(MachGrid As Grid, GridTitle As String)
|
||||
Dim Index As Integer = 0
|
||||
Dim sValue = String.Empty
|
||||
While EgtUILib.GetPrivateProfileString(GridTitle, Index.ToString(), String.Empty, sValue, Map.refMainWindowVM.DimensionDir) > 0
|
||||
Dim sValueParams() As String = sValue.Split(","c)
|
||||
If sValueParams.Count >= 3 Then
|
||||
' cancello spazi
|
||||
For I As Integer = 0 To sValueParams.Count - 1
|
||||
sValueParams(I) = sValueParams(I).Trim()
|
||||
Next
|
||||
' creo valore
|
||||
Dim GridLenValue As Double
|
||||
StringToDoubleAdv(sValueParams(2), GridLenValue)
|
||||
MachGrid.RowDefinitions(0).Height = New GridLength(GridLenValue)
|
||||
End If
|
||||
Index += 1
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Friend Sub SaveDrawGridLayout(MachGrid As Grid, RowId As String, GridTitle As String)
|
||||
Dim Index As Integer = 0
|
||||
Dim valueRow As String = String.Empty
|
||||
' Salvo riga 0
|
||||
If RowId = "ManageLayer" Then
|
||||
valueRow = Index & "," & Index & "," & MachGrid.RowDefinitions(Index).ActualHeight.ToString()
|
||||
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), valueRow, Map.refMainWindowVM.DimensionDir)
|
||||
Else
|
||||
Index = 1
|
||||
valueRow = Index & "," & 0 & "," & MachGrid.RowDefinitions(Index).ActualHeight.ToString()
|
||||
EgtUILib.WritePrivateProfileString(GridTitle, Index.ToString(), valueRow, Map.refMainWindowVM.DimensionDir)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub RestoreDrawGridLayout(MachGrid As Grid, RowId As String, Index As Integer, GridTitle As String)
|
||||
Dim sValue = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(GridTitle, Index.ToString(), String.Empty, sValue, Map.refMainWindowVM.DimensionDir)
|
||||
Dim sValueParams() As String = sValue.Split(","c)
|
||||
If sValueParams.Count >= 3 Then
|
||||
' cancello spazi
|
||||
For I As Integer = 0 To sValueParams.Count - 1
|
||||
sValueParams(I) = sValueParams(I).Trim()
|
||||
Next
|
||||
' creo valore
|
||||
Dim GridLenValue As Double
|
||||
StringToDoubleAdv(sValueParams(2), GridLenValue)
|
||||
If RowId = "ManageLayer" Then
|
||||
MachGrid.RowDefinitions(0).Height = New GridLength(GridLenValue)
|
||||
Else
|
||||
MachGrid.RowDefinitions(1).Height = New GridLength(GridLenValue)
|
||||
End If
|
||||
Else
|
||||
If RowId = "ManageLayer" Then
|
||||
MachGrid.RowDefinitions(0).Height = New GridLength(400)
|
||||
Else
|
||||
MachGrid.RowDefinitions(1).Height = New GridLength(150)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
+59
-16
@@ -68,6 +68,9 @@ Public Module IniFile
|
||||
WALL = 512
|
||||
PLUGIN = 1024
|
||||
ADVMACHINING = 2048
|
||||
WINDOW = 4096
|
||||
TRIMMING = 8192
|
||||
REVERSEPOST = 16384
|
||||
End Enum
|
||||
Friend m_sDataRoot As String
|
||||
Friend m_sConfigDir As String
|
||||
@@ -85,6 +88,12 @@ Public Module IniFile
|
||||
Friend m_sBeamWallDirPath As String
|
||||
' path della cartella DOORS
|
||||
Friend m_sDoorsDirPath As String
|
||||
' path della cartella WINDOW
|
||||
Friend m_sWindowDirPath As String
|
||||
' path della cartella TRIMMING
|
||||
Friend m_sTrimmingDirPath As String
|
||||
' path della cartella REVERSEPOST
|
||||
Friend m_sReversePostDirPath As String
|
||||
' path della cartella GUNSTOCK
|
||||
Friend m_sGunstockDirPath As String
|
||||
' path della cartella Printing3d
|
||||
@@ -229,11 +238,15 @@ Public Module IniFile
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileButton(sSection As String, sKey As String, sBaseDir As String, ByRef ReadButtonItem As ButtonItem) As Boolean
|
||||
Public Function GetPrivateProfileButton(sSection As String, sKey As String, sBaseDir As String, ByRef ReadButtonItem As ButtonListItem) As Boolean
|
||||
ReadButtonItem = Nothing
|
||||
Dim sVal As String = String.Empty
|
||||
GetPrivateProfileString(sSection, sKey, "", sVal)
|
||||
If String.IsNullOrWhiteSpace(sVal) Then Return False
|
||||
If sVal = "Separator" Then
|
||||
ReadButtonItem = New SeparatorItem()
|
||||
Return True
|
||||
End If
|
||||
Dim sItems() As String = sVal.Split(","c)
|
||||
If sItems.Count() >= 1 Then
|
||||
Dim sLuaPath As String = sItems(0)
|
||||
@@ -277,9 +290,9 @@ Public Module IniFile
|
||||
Friend Function IsActiveBeam() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 And (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", sTemp)
|
||||
m_sBeamDirPath = sTemp.TrimEnd( "\"c)
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", sTemp)
|
||||
m_sBeamDirPath = sTemp.TrimEnd("\"c)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
@@ -287,9 +300,9 @@ Public Module IniFile
|
||||
Friend Function IsActiveWall() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 And (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_WALL, K_WALLBASEDIR, "", sTemp)
|
||||
m_sWallDirPath = sTemp.TrimEnd( "\"c)
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_WALL, K_WALLBASEDIR, "", sTemp)
|
||||
m_sWallDirPath = sTemp.TrimEnd("\"c)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
@@ -297,9 +310,39 @@ Public Module IniFile
|
||||
Friend Function IsActiveDoors() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.DOORS) <> 0 And (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_DOORS, K_BASEDIR, "", sTemp)
|
||||
m_sDoorsDirPath = sTemp.TrimEnd( "\"c)
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_DOORS, K_BASEDIR, "", sTemp)
|
||||
m_sDoorsDirPath = sTemp.TrimEnd("\"c)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveWindow() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.WINDOW) <> 0 And (GetPrivateProfileInt(S_WINDOW, K_WINDOWENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_WINDOW, K_WINDOWBASEDIR, "", sTemp)
|
||||
m_sWindowDirPath = sTemp.TrimEnd("\"c)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveTrimming() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.TRIMMING) <> 0 And (GetPrivateProfileInt(S_TRIMMING, K_TRIMMINGENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_TRIMMING, K_TRIMMINGBASEDIR, "", sTemp)
|
||||
m_sTrimmingDirPath = sTemp.TrimEnd("\"c)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveReversePost() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.REVERSEPOST) <> 0 And (GetPrivateProfileInt(S_REVERSEPOST, K_REVERSEPOSTENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_REVERSEPOST, K_REVERSEPOSTBASEDIR, "", sTemp)
|
||||
m_sReversePostDirPath = sTemp.TrimEnd("\"c)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
@@ -307,9 +350,9 @@ Public Module IniFile
|
||||
Friend Function IsActiveGunStock() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_GUNSTOCK, K_GUNSTOCKEXEC, "", sTemp)
|
||||
m_sGunstockDirPath = Path.GetDirectoryName( sTemp)
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_GUNSTOCK, K_GUNSTOCKEXEC, "", sTemp)
|
||||
m_sGunstockDirPath = Path.GetDirectoryName(sTemp)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
@@ -328,13 +371,13 @@ Public Module IniFile
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.ADVMACHINING) <> 0
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveSpecialPanel( Optional bTestButton As Boolean = true) As Boolean
|
||||
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
|
||||
Friend Function GetSpecialLuaVersion(sSpecialLuaDir As String, ByRef sVersion As String) As Boolean
|
||||
Dim sExecPath As String = (sSpecialLuaDir & "\Version.lua")
|
||||
If Not EgtLuaExecFile(sExecPath, False) Then Return False
|
||||
If Not EgtLuaGetGlobStringVar("VERSION", sVersion) Then Return False
|
||||
@@ -342,7 +385,7 @@ Public Module IniFile
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function GetSpecialLuaData( sSpecialLuaDir As String,
|
||||
Friend Function GetSpecialLuaData(sSpecialLuaDir As String,
|
||||
ByRef sName As String, ByRef sVersion As String, ByRef sMinExe As String) As Boolean
|
||||
Dim sExecPath As String = (sSpecialLuaDir & "\Version.lua")
|
||||
If Not EgtLuaExecFile(sExecPath, False) Then Return False
|
||||
|
||||
@@ -33,8 +33,13 @@ Module Map
|
||||
Private m_refBeamPanelVM As BeamPanelVM
|
||||
Private m_refWallPanelVM As WallPanelVM
|
||||
Private m_refBeamWallPanelVM As BeamWallPanelVM
|
||||
Private m_refWindowPanelVM As WindowPanelVM
|
||||
Private m_refTrimmingPanelVM As TrimmingPanelVM
|
||||
Private m_refReversePostPanelVM As ReversePostPanelVM
|
||||
Private m_refGunStockPanelVM As GunStockPanelVM
|
||||
Private m_refMachiningParameterExpanderVM As MachiningParameterExpanderVM
|
||||
Private m_refMachiningOptionPanelV As MachiningOptionPanelV
|
||||
Private m_refDrawOptionPanelV As DrawOptionPanelV
|
||||
|
||||
#Region "Get"
|
||||
|
||||
@@ -158,6 +163,21 @@ Module Map
|
||||
Return m_refDoorPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refWindowPanelVM As WindowPanelVM
|
||||
Get
|
||||
Return m_refWindowPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refTrimmingPanelVM As TrimmingPanelVM
|
||||
Get
|
||||
Return m_refTrimmingPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refReversePostPanelVM As ReversePostPanelVM
|
||||
Get
|
||||
Return m_refReversePostPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refSpecialPanelVM As SpecialPanelVM
|
||||
Get
|
||||
Return m_refSpecialPanelVM
|
||||
@@ -193,6 +213,16 @@ Module Map
|
||||
Return m_refMachiningParameterExpanderVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refMachiningOptionPanelV As MachiningOptionPanelV
|
||||
Get
|
||||
Return m_refMachiningOptionPanelV
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refDrawOptionPanelV As DrawOptionPanelV
|
||||
Get
|
||||
Return m_refDrawOptionPanelV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
@@ -311,6 +341,18 @@ Module Map
|
||||
m_refBeamWallPanelVM = BeamWallPanelVM
|
||||
Return Not IsNothing(m_refBeamWallPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefWindowPanelVM(WindowPanelVM As WindowPanelVM) As Boolean
|
||||
m_refWindowPanelVM = WindowPanelVM
|
||||
Return Not IsNothing(m_refWindowPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefTrimmingPanelVM(TrimmingPanelVM As TrimmingPanelVM) As Boolean
|
||||
m_refTrimmingPanelVM = TrimmingPanelVM
|
||||
Return Not IsNothing(m_refTrimmingPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefReversePostPanelVM(ReversePostPanelVM As ReversePostPanelVM) As Boolean
|
||||
m_refReversePostPanelVM = ReversePostPanelVM
|
||||
Return Not IsNothing(m_refReversePostPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefGunStockPanelVM(GunStockPanelVM As GunStockPanelVM) As Boolean
|
||||
m_refGunStockPanelVM = GunStockPanelVM
|
||||
Return Not IsNothing(m_refGunStockPanelVM)
|
||||
@@ -319,6 +361,14 @@ Module Map
|
||||
m_refMachiningParameterExpanderVM = MachiningParameterExpanderVM
|
||||
Return Not IsNothing(m_refMachiningParameterExpanderVM)
|
||||
End Function
|
||||
Friend Function SetRefMachiningOptionPanelV(MachiningOptionPanelV As MachiningOptionPanelV) As Boolean
|
||||
m_refMachiningOptionPanelV = MachiningOptionPanelV
|
||||
Return Not IsNothing(m_refMachiningOptionPanelV)
|
||||
End Function
|
||||
Friend Function SetRefDrawOptionPanelV(DrawOptionPanelV As DrawOptionPanelV) As Boolean
|
||||
m_refDrawOptionPanelV = DrawOptionPanelV
|
||||
Return Not IsNothing(m_refDrawOptionPanelV)
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
|
||||
+24
-19
@@ -96,30 +96,35 @@ Module SelData
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function GetIdSubCount() As Integer
|
||||
Return m_IdSub.Count()
|
||||
End Function
|
||||
|
||||
Friend Function GetIdSub(nInd As Integer, ByRef nId As Integer, ByRef nSub As Integer) As Boolean
|
||||
If nInd < 0 Or nInd > m_IdSub.Count() - 1 Then
|
||||
nId = GDB_ID.NULL
|
||||
Return False
|
||||
End If
|
||||
nId = m_IdSub(nInd).m_nId
|
||||
nSub = m_IdSub(nInd).m_nSub
|
||||
Friend Function GetAllSelectedGeom(ByRef vId() As Integer, ByRef vSub() As Integer) As Boolean
|
||||
VerifyIdSub()
|
||||
' Recupero tutte le entità selezionate con le loro eventuali sotto-parti
|
||||
Dim MyId As New List(Of Integer)
|
||||
Dim MySub As New List(Of Integer)
|
||||
Dim nEntId As Integer = EgtGetFirstSelectedObj()
|
||||
While nEntId <> GDB_ID.NULL
|
||||
Dim MyEntSub As New List(Of Integer)
|
||||
GetSubFromId( nEntId, MyEntSub)
|
||||
For Each nEntSub As Integer In MyEntSub
|
||||
MyId.Add(nEntId)
|
||||
MySub.Add(nEntSub)
|
||||
Next
|
||||
nEntId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
vId = MyId.ToArray()
|
||||
vSub = MySub.ToArray()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function GetAllIdSub(ByRef vId() As Integer, ByRef vSub() As Integer) As Boolean
|
||||
Dim MyId(m_IdSub.Count() - 1) As Integer
|
||||
Dim MySub(m_IdSub.Count() - 1) As Integer
|
||||
Friend Function GetSubFromId(nId As Integer, ByRef vSub As List(Of Integer)) As Boolean
|
||||
For i As Integer = 0 To m_IdSub.Count() - 1
|
||||
MyId(i) = m_IdSub(i).m_nId
|
||||
MySub(i) = m_IdSub(i).m_nSub
|
||||
If m_IdSub(i).m_nId = nId Then
|
||||
vSub.Add(m_IdSub(i).m_nSub)
|
||||
End If
|
||||
Next
|
||||
vId = MyId
|
||||
vSub = MySub
|
||||
Return True
|
||||
If vSub.Count > 0 Then Return True
|
||||
vSub.Add(-1)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function VerifySelGroup() As Boolean
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
Public Class WindowStateIniBehavior
|
||||
|
||||
Private Shared ReadOnly IsReady As New Dictionary(Of Window, Boolean)
|
||||
|
||||
Public Shared Function GetPersistenceKey(obj As DependencyObject) As String
|
||||
Return CStr(obj.GetValue(PersistenceKeyProperty))
|
||||
End Function
|
||||
|
||||
Public Shared Sub SetPersistenceKey(obj As DependencyObject, value As String)
|
||||
obj.SetValue(PersistenceKeyProperty, value)
|
||||
End Sub
|
||||
|
||||
Public Shared ReadOnly PersistenceKeyProperty As DependencyProperty =
|
||||
DependencyProperty.RegisterAttached(
|
||||
"PersistenceKey",
|
||||
GetType(String),
|
||||
GetType(WindowStateIniBehavior),
|
||||
New PropertyMetadata(Nothing, AddressOf OnKeyChanged)
|
||||
)
|
||||
|
||||
Private Shared Sub OnKeyChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
|
||||
Dim Window = TryCast(d, Window)
|
||||
If IsNothing(Window) Then Return
|
||||
|
||||
IsReady(Window) = False
|
||||
|
||||
AddHandler Window.Loaded, Sub() LoadState(Window)
|
||||
|
||||
AddHandler Window.ContentRendered,
|
||||
Sub()
|
||||
IsReady(Window) = True
|
||||
End Sub
|
||||
|
||||
AddHandler Window.LocationChanged, Sub() SaveState(Window)
|
||||
AddHandler Window.SizeChanged, Sub() SaveState(Window)
|
||||
End Sub
|
||||
|
||||
Private Shared Sub SaveState(Window As Window)
|
||||
If Not IsReady(Window) Then Return
|
||||
|
||||
EgtUILib.WritePrivateProfileString(S_EXECUTEWINDOW, K_LEFT, Window.Left.ToString(), Map.refMainWindowVM.DimensionDir)
|
||||
EgtUILib.WritePrivateProfileString(S_EXECUTEWINDOW, K_TOP, Window.Top.ToString(), Map.refMainWindowVM.DimensionDir)
|
||||
EgtUILib.WritePrivateProfileString(S_EXECUTEWINDOW, K_WIDTH, Window.Width.ToString(), Map.refMainWindowVM.DimensionDir)
|
||||
EgtUILib.WritePrivateProfileString(S_EXECUTEWINDOW, K_HEIGHT, Window.Height.ToString(), Map.refMainWindowVM.DimensionDir)
|
||||
End Sub
|
||||
|
||||
Private Shared Sub LoadState(Window As Window)
|
||||
Dim sLeft As String = String.Empty
|
||||
Dim dLeft As Double = 0
|
||||
EgtUILib.GetPrivateProfileString(S_EXECUTEWINDOW, K_LEFT, String.Empty, sLeft, Map.refMainWindowVM.DimensionDir)
|
||||
If sLeft IsNot String.Empty Then StringToDouble(sLeft, dLeft)
|
||||
|
||||
Dim sTopD As String = String.Empty
|
||||
Dim dTop As Double = 0.0
|
||||
EgtUILib.GetPrivateProfileString(S_EXECUTEWINDOW, K_TOP, String.Empty, sTopD, Map.refMainWindowVM.DimensionDir)
|
||||
If sTopD IsNot String.Empty Then StringToDouble(sTopD, dTop)
|
||||
|
||||
Dim sWidth As String = String.Empty
|
||||
Dim dWidth As Double = 0.0
|
||||
EgtUILib.GetPrivateProfileString(S_EXECUTEWINDOW, K_WIDTH, String.Empty, sWidth, Map.refMainWindowVM.DimensionDir)
|
||||
If sWidth IsNot String.Empty Then StringToDouble(sWidth, dWidth)
|
||||
|
||||
Dim sHeight As String = String.Empty
|
||||
Dim dHeight As Double = 0.0
|
||||
EgtUILib.GetPrivateProfileString(S_EXECUTEWINDOW, K_HEIGHT, String.Empty, sHeight, Map.refMainWindowVM.DimensionDir)
|
||||
If sWidth IsNot String.Empty Then StringToDouble(sHeight, dHeight)
|
||||
|
||||
If dLeft > 0 Then Window.Left = dLeft
|
||||
If dTop > 0 Then Window.Top = dTop
|
||||
If dWidth > 0 Then Window.Width = dWidth
|
||||
If dHeight > 0 Then Window.Height = dHeight
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user