Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 786362b31e | |||
| 423a88b049 | |||
| 64867f25dc | |||
| 78a9b32973 | |||
| d210f63296 | |||
| 1273279c1f | |||
| 978de597ad | |||
| 75d05a8b31 | |||
| 045a7fa731 | |||
| 29b2b495c3 | |||
| 89a73457c7 | |||
| 5f2b1adf98 | |||
| ab11f069e9 | |||
| 880dbeb7b9 | |||
| 6090527b2a | |||
| 6dc81030c9 | |||
| b889f75963 | |||
| ffd1c3d437 | |||
| 87ddc23ecc | |||
| 6b9808027f | |||
| e9570187bb | |||
| cfdf3b392e | |||
| c256a49bb2 | |||
| 3e50c6151b | |||
| b8c1368154 |
@@ -0,0 +1,12 @@
|
|||||||
|
<Grid x:Class="BottomTrayV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
DockPanel.Dock="Bottom">
|
||||||
|
<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"
|
||||||
|
RepaetButtonStyle="{StaticResource CustomScrollBarButton}"
|
||||||
|
MachGroupButtonStyle="{StaticResource {x:Type ToggleButton}}"
|
||||||
|
IsToolBar="False"
|
||||||
|
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False"
|
||||||
|
IsRightDockable="False" />
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class BottomTrayV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -22,6 +22,7 @@ Module ConstGen
|
|||||||
' File con dati di licenza
|
' File con dati di licenza
|
||||||
Public Const LIC_FILE_NAME As String = "EgtCAM5.lic"
|
Public Const LIC_FILE_NAME As String = "EgtCAM5.lic"
|
||||||
Public Const S_LICENCE As String = "Licence"
|
Public Const S_LICENCE As String = "Licence"
|
||||||
|
Public Const K_LOCKID As String = "LockId"
|
||||||
Public Const K_KEY As String = "Key"
|
Public Const K_KEY As String = "Key"
|
||||||
Public Const K_NESTKEY As String = "NestKey"
|
Public Const K_NESTKEY As String = "NestKey"
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ Module ConstIni
|
|||||||
Public Const S_GENERAL As String = "General"
|
Public Const S_GENERAL As String = "General"
|
||||||
Public Const K_DEBUG As String = "Debug"
|
Public Const K_DEBUG As String = "Debug"
|
||||||
Public Const K_LICENCE As String = "Licence"
|
Public Const K_LICENCE As String = "Licence"
|
||||||
|
Public Const K_NETKEY As String = "NetKey"
|
||||||
Public Const K_USERLEVEL As String = "UserLevel"
|
Public Const K_USERLEVEL As String = "UserLevel"
|
||||||
Public Const K_MAXINST As String = "MaxInstances"
|
Public Const K_MAXINST As String = "MaxInstances"
|
||||||
Public Const K_INSTANCES As String = "Instances"
|
Public Const K_INSTANCES As String = "Instances"
|
||||||
@@ -28,6 +29,7 @@ Module ConstIni
|
|||||||
Public Const K_HIDEPLACE As String = "HidePlace"
|
Public Const K_HIDEPLACE As String = "HidePlace"
|
||||||
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
||||||
Public Const K_LASTNGEOBJDIR As String = "LastNgeObjDir"
|
Public Const K_LASTNGEOBJDIR As String = "LastNgeObjDir"
|
||||||
|
Public Const K_LASTNGEINSDIR As String = "LastNgeInsDir"
|
||||||
Public Const K_LASTLUADIR As String = "LastLuaDir"
|
Public Const K_LASTLUADIR As String = "LastLuaDir"
|
||||||
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||||
Public Const K_LASTEXPDIR As String = "LastExpDir"
|
Public Const K_LASTEXPDIR As String = "LastExpDir"
|
||||||
@@ -37,6 +39,8 @@ Module ConstIni
|
|||||||
Public Const K_TRANSFORM As String = "Transform"
|
Public Const K_TRANSFORM As String = "Transform"
|
||||||
Public Const K_ONLYDRAW As String = "OnlyDraw"
|
Public Const K_ONLYDRAW As String = "OnlyDraw"
|
||||||
Public Const K_SUPPORT As String = "Support"
|
Public Const K_SUPPORT As String = "Support"
|
||||||
|
Public Const K_PLUGIN As String = "Plugin"
|
||||||
|
Public Const K_EXECUTE As String = "Execute"
|
||||||
|
|
||||||
Public Const S_LANGUAGES As String = "Languages"
|
Public Const S_LANGUAGES As String = "Languages"
|
||||||
Public Const K_LANGUAGE As String = "Language"
|
Public Const K_LANGUAGE As String = "Language"
|
||||||
@@ -183,6 +187,7 @@ Module ConstIni
|
|||||||
Public Const K_MACHININGGROUP As String = "MachiningGroup"
|
Public Const K_MACHININGGROUP As String = "MachiningGroup"
|
||||||
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
|
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
|
||||||
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
|
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
|
||||||
|
Public Const K_AUTOUPDATEALLMACHININGS As String = "AutoUpdateAllMachinings"
|
||||||
|
|
||||||
Public Const S_SIMUL As String = "Simul"
|
Public Const S_SIMUL As String = "Simul"
|
||||||
Public Const K_SLIDERX As String = "SliderX"
|
Public Const K_SLIDERX As String = "SliderX"
|
||||||
|
|||||||
@@ -33,7 +33,9 @@
|
|||||||
Public Const K_SAWFINISHING As String = "SawFinishing"
|
Public Const K_SAWFINISHING As String = "SawFinishing"
|
||||||
Public Const K_GENMACHINING As String = "GenMachining"
|
Public Const K_GENMACHINING As String = "GenMachining"
|
||||||
Public Const K_CHISELING As String = "Chiseling"
|
Public Const K_CHISELING As String = "Chiseling"
|
||||||
|
Public Const K_SURFROUGHING As String = "SurfRoughing"
|
||||||
Public Const K_SURFFINISHING As String = "SurfFinishing"
|
Public Const K_SURFFINISHING As String = "SurfFinishing"
|
||||||
|
Public Const K_5AXMACHINING As String = "5axMachining"
|
||||||
Public Const K_WATERJETTING As String = "WaterJetting"
|
Public Const K_WATERJETTING As String = "WaterJetting"
|
||||||
Public Const K_SAWINGONARCS As String = "SawingOnArcs"
|
Public Const K_SAWINGONARCS As String = "SawingOnArcs"
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<UserControl x:Class="DrawPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="DrawPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5">
|
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||||
|
TitleBarOrientation="Vertical"
|
||||||
|
Visibility="{Binding DrawPanel_Visibility}">
|
||||||
|
|
||||||
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||||
<Expander Name="Draw2D" Style="{StaticResource ExpanderStyle}" Grid.Row="0"
|
<Expander Name="Draw2D" Style="{StaticResource ExpanderStyle}" Grid.Row="0"
|
||||||
@@ -352,4 +354,4 @@
|
|||||||
</Interactivity:Interaction.Behaviors>
|
</Interactivity:Interaction.Behaviors>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -393,6 +393,18 @@ Public Class DrawPanelVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_DrawPanel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property DrawPanel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_DrawPanel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetDrawPanelVisibility(bValue As Boolean)
|
||||||
|
m_DrawPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
OnPropertyChanged(NameOf(DrawPanel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region "Button state"
|
#Region "Button state"
|
||||||
|
|
||||||
Private m_bLayerOk As Boolean
|
Private m_bLayerOk As Boolean
|
||||||
|
|||||||
+52
-12
@@ -97,6 +97,9 @@
|
|||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="DotNetZip">
|
||||||
|
<HintPath>..\..\EgtProg\EgtCAM5\DotNetZip.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="EgtUILib, Version=2.4.6.1, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="EgtUILib, Version=2.4.6.1, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||||
@@ -109,13 +112,11 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Ionic.Zip">
|
|
||||||
<HintPath>..\..\EgtProg\EgtCAM5\Ionic.Zip.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\EgtProg\EgtCAM5\Microsoft.Expression.Interactions.dll</HintPath>
|
<HintPath>..\..\EgtProg\EgtCAM5\Microsoft.Expression.Interactions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
@@ -153,11 +154,18 @@
|
|||||||
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml.vb">
|
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml.vb">
|
||||||
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
|
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="BottomTray\BottomTrayV.xaml.vb">
|
||||||
|
<DependentUpon>BottomTrayV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="CurrSetUp\CurrSetUpV.xaml.vb">
|
<Compile Include="CurrSetUp\CurrSetUpV.xaml.vb">
|
||||||
<DependentUpon>CurrSetUpV.xaml</DependentUpon>
|
<DependentUpon>CurrSetUpV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="CurrSetUp\CurrSetUpVM.vb" />
|
<Compile Include="CurrSetUp\CurrSetUpVM.vb" />
|
||||||
|
<Compile Include="LeftTray\LeftTrayV.xaml.vb">
|
||||||
|
<DependentUpon>LeftTrayV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||||
|
<Compile Include="MEFPlugin\MefPlugin.vb" />
|
||||||
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpanderV.xaml.vb">
|
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpanderV.xaml.vb">
|
||||||
<DependentUpon>EstimationsExpanderV.xaml</DependentUpon>
|
<DependentUpon>EstimationsExpanderV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -227,6 +235,12 @@
|
|||||||
<Compile Include="OptionsWindow\MachineBox.xaml.vb">
|
<Compile Include="OptionsWindow\MachineBox.xaml.vb">
|
||||||
<DependentUpon>MachineBox.xaml</DependentUpon>
|
<DependentUpon>MachineBox.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="RightTray\RightTrayV.xaml.vb">
|
||||||
|
<DependentUpon>RightTrayV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SceneContentControl\SceneContentControlV.xaml.vb">
|
||||||
|
<DependentUpon>SceneContentControlV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="SetUpDb\SetUpDbV.xaml.vb">
|
<Compile Include="SetUpDb\SetUpDbV.xaml.vb">
|
||||||
<DependentUpon>SetUpDbV.xaml</DependentUpon>
|
<DependentUpon>SetUpDbV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -236,10 +250,6 @@
|
|||||||
<DependentUpon>SetUpV.xaml</DependentUpon>
|
<DependentUpon>SetUpV.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="SetUp\SetUpVM.vb" />
|
<Compile Include="SetUp\SetUpVM.vb" />
|
||||||
<Compile Include="Special-3dPrinting\Printing3DPanelV.xaml.vb">
|
|
||||||
<DependentUpon>Printing3DPanelV.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Special-3dPrinting\Printing3DPanelVM.vb" />
|
|
||||||
<Compile Include="Special-BeamWall\Beam.vb" />
|
<Compile Include="Special-BeamWall\Beam.vb" />
|
||||||
<Compile Include="Command\Command.vb" />
|
<Compile Include="Command\Command.vb" />
|
||||||
<Compile Include="Command\RelayCommand.vb" />
|
<Compile Include="Command\RelayCommand.vb" />
|
||||||
@@ -278,7 +288,11 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="StatusBar\MyStatusBarVM.vb" />
|
<Compile Include="StatusBar\MyStatusBarVM.vb" />
|
||||||
<Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" />
|
<Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" />
|
||||||
|
<Compile Include="TopTray\TopTrayV.xaml.vb">
|
||||||
|
<DependentUpon>TopTrayV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Utility\Analyze.vb" />
|
<Compile Include="Utility\Analyze.vb" />
|
||||||
|
<Compile Include="Utility\BasePanelVM.vb" />
|
||||||
<Compile Include="Utility\BindingProxy.vb" />
|
<Compile Include="Utility\BindingProxy.vb" />
|
||||||
<Compile Include="Utility\Map.vb" />
|
<Compile Include="Utility\Map.vb" />
|
||||||
<Compile Include="Internals\MruList.vb" />
|
<Compile Include="Internals\MruList.vb" />
|
||||||
@@ -416,6 +430,10 @@
|
|||||||
<Compile Include="Utility\Utility.vb" />
|
<Compile Include="Utility\Utility.vb" />
|
||||||
<Compile Include="Utility\VMBase.vb" />
|
<Compile Include="Utility\VMBase.vb" />
|
||||||
<Compile Include="ValidationGroup.vb" />
|
<Compile Include="ValidationGroup.vb" />
|
||||||
|
<Compile Include="WinFormPluginControl\WinFormPluginControlVM.vb" />
|
||||||
|
<Compile Include="WinFormPluginControl\WinFormPluginControlV.xaml.vb">
|
||||||
|
<DependentUpon>WinFormPluginControlV.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Page Include="AboutBoxWindow\AboutBoxView.xaml">
|
<Page Include="AboutBoxWindow\AboutBoxView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -424,6 +442,10 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="BottomTray\BottomTrayV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="CurrSetUp\CurrSetUpV.xaml">
|
<Page Include="CurrSetUp\CurrSetUpV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -432,6 +454,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="LeftTray\LeftTrayV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="MachOptionsWindow\MachOptionV.xaml">
|
<Page Include="MachOptionsWindow\MachOptionV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -520,6 +546,14 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="RightTray\RightTrayV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
|
<Page Include="SceneContentControl\SceneContentControlV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="SetUpDb\SetUpDbV.xaml">
|
<Page Include="SetUpDb\SetUpDbV.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -528,10 +562,6 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Special-3dPrinting\Printing3DPanelV.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Special-BeamWall\BeamWallPanelV.xaml">
|
<Page Include="Special-BeamWall\BeamWallPanelV.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -588,6 +618,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="TopTray\TopTrayV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Utility\Dictionary.xaml">
|
<Page Include="Utility\Dictionary.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -680,6 +714,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="WinFormPluginControl\WinFormPluginControlV.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Import Include="System.Linq" />
|
<Import Include="System.Linq" />
|
||||||
@@ -729,7 +767,6 @@
|
|||||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<AppDesigner Include="My Project\" />
|
<AppDesigner Include="My Project\" />
|
||||||
<None Include="packages.config" />
|
|
||||||
<Resource Include="Resources\Fonts\gothic.ttf" />
|
<Resource Include="Resources\Fonts\gothic.ttf" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -962,6 +999,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\TopCommandBar\Print.png" />
|
<Resource Include="Resources\TopCommandBar\Print.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\EgtCAM5_64.ico" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
|
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<UserControl x:Class="ExecutePanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="ExecutePanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
Visibility="{Binding ExecutePanel_Visibility}">
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
|
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
|
||||||
@@ -13,4 +15,4 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -12,6 +12,18 @@ Public Class ExecutePanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_ExecutePanel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property ExecutePanel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_ExecutePanel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Friend Sub SetExecutePanelVisibility(bValue As Boolean)
|
||||||
|
m_ExecutePanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
OnPropertyChanged(NameOf(ExecutePanel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdExec As ICommand
|
Private m_cmdExec As ICommand
|
||||||
Private Shared m_cmdOpenMruScript As ICommand
|
Private Shared m_cmdOpenMruScript As ICommand
|
||||||
@@ -28,6 +40,11 @@ Public Class ExecutePanelVM
|
|||||||
|
|
||||||
#End Region ' FIELDS & PROPERTIES
|
#End Region ' FIELDS & PROPERTIES
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefExecutePanelVM(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "ExecCommand"
|
#Region "ExecCommand"
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<Grid x:Class="LeftTrayV"
|
||||||
|
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="Left">
|
||||||
|
|
||||||
|
<local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class LeftTrayV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
Imports System.ComponentModel.Composition
|
||||||
|
Imports System.ComponentModel.Composition.hosting
|
||||||
|
|
||||||
|
Public Class MEFLoader
|
||||||
|
Private importers As Dictionary(Of String, List(Of Object)) = New Dictionary(Of String, List(Of Object))()
|
||||||
|
|
||||||
|
Public Overridable Function LoadByTag(Of T)(ByVal path As String, ByVal tag As String) As ICollection(Of T)
|
||||||
|
Dim importer = GetImporter(Of T)(path)
|
||||||
|
Return importer.LoadByMEF(path, tag)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Protected Function GetImporter(Of T)(ByVal path As String) As MEFImporter(Of T)
|
||||||
|
Dim importerList = GetImporterList(path)
|
||||||
|
Dim importer = importerList.OfType(Of MEFImporter(Of T))().FirstOrDefault()
|
||||||
|
|
||||||
|
If importer Is Nothing Then
|
||||||
|
importer = New MEFImporter(Of T)(path)
|
||||||
|
importerList.Add(importer)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return importer
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Protected Function GetImporterList(ByVal path As String) As List(Of Object)
|
||||||
|
If importers.ContainsKey(path) = False Then importers.Add(path, New List(Of Object)())
|
||||||
|
Return importers(path)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function LoadByType(Of T)(ByVal path As String) As ICollection(Of T)
|
||||||
|
Return LoadByTag(Of T)(path, String.Empty)
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Interface IMetadata
|
||||||
|
ReadOnly Property Name As String
|
||||||
|
End Interface
|
||||||
|
|
||||||
|
Public Class MEFImporter(Of T)
|
||||||
|
|
||||||
|
<ImportMany(AllowRecomposition:=True)>
|
||||||
|
Public Property [imports] As IEnumerable(Of Lazy(Of T, IMetadata))
|
||||||
|
|
||||||
|
Private Sub New()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub New(ByVal path As String)
|
||||||
|
Me.New()
|
||||||
|
directoryCatalog = New DirectoryCatalog(path)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected directoryCatalog As DirectoryCatalog = Nothing
|
||||||
|
|
||||||
|
Protected Sub DoImport(ByVal path As String)
|
||||||
|
Dim catalog = New AggregateCatalog()
|
||||||
|
catalog.Catalogs.Add(directoryCatalog)
|
||||||
|
Dim container As CompositionContainer = New CompositionContainer(catalog)
|
||||||
|
container.ComposeParts(Me)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function LoadByMEF(ByVal path As String, ByVal name As String) As ICollection(Of T)
|
||||||
|
Dim res = New List(Of T)()
|
||||||
|
DoImport(path)
|
||||||
|
|
||||||
|
For Each [module] As Lazy(Of T, IMetadata) In [imports]
|
||||||
|
|
||||||
|
If [module].Metadata.Name = name OrElse String.IsNullOrEmpty(name) Then
|
||||||
|
res.Add([module].Value)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return res
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports EgtCAM5.MyMachinePanelVM
|
||||||
|
Imports System.Security.Cryptography
|
||||||
|
Imports System.Windows.Forms.AxHost
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
@@ -95,7 +98,7 @@ Public Class MyMachGroupPanelVM
|
|||||||
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA
|
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA
|
||||||
If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||||
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
|
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
|
||||||
Else
|
Else
|
||||||
Return -2
|
Return -2
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -309,15 +312,36 @@ Public Class MyMachGroupPanelVM
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Overrides Sub AddMachGroup()
|
Public Overrides Sub AddMachGroup()
|
||||||
'If AddNewMachGroup() Then
|
|
||||||
' Dim sMachName As String = String.Empty
|
Dim nNewMachGrpId As Integer = GDB_ID.NULL
|
||||||
' EgtGetMachGroupName(EgtGetCurrMachGroup(), sMachName)
|
Dim sNewMachGrpName As String = ""
|
||||||
' MachGroupList.Add(sMachName)
|
|
||||||
' SelectedMachGroup = sMachName
|
' Se premuto Shift, copio il gruppo corrente
|
||||||
' EgtDraw()
|
If (Keyboard.Modifiers And Input.ModifierKeys.Shift) = Input.ModifierKeys.Shift Then
|
||||||
' Map.refOperationsListExpanderVM.LoadOperationList(GDB_ID.NULL)
|
' Eseguo una copia del gruppo corrente
|
||||||
' Map.refOperationsListExpanderVM.UpdateCurrentMachine()
|
Dim sMachGrpName As String = ""
|
||||||
'End If
|
If Not EgtGetMachGroupName(EgtGetCurrMachGroup(), sMachGrpName) Then Return
|
||||||
|
sNewMachGrpName = "Mach_1"
|
||||||
|
EgtGetMachGroupNewName(sNewMachGrpName)
|
||||||
|
nNewMachGrpId = EgtCopyMachGroup(sMachGrpName, sNewMachGrpName)
|
||||||
|
' altrimenti ne aggiungo uno vuoto
|
||||||
|
Else
|
||||||
|
Dim vPart As New List(Of Integer)
|
||||||
|
AddNewMachGroup(nNewMachGrpId, vPart)
|
||||||
|
EgtGetMachGroupName(nNewMachGrpId, sNewMachGrpName)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Se creazione non riuscita, esco subito
|
||||||
|
If nNewMachGrpId = GDB_ID.NULL Then Return
|
||||||
|
' altrimenti sistemo interfaccia
|
||||||
|
Dim sMachine As String = String.Empty
|
||||||
|
EgtGetMachGroupMachineName(nNewMachGrpId, sMachine)
|
||||||
|
Dim machGroup As New MachGroup(nNewMachGrpId, sNewMachGrpName, sMachine)
|
||||||
|
MachGroupList.Add(machGroup)
|
||||||
|
SelectedMachGroup = machGroup
|
||||||
|
Map.refMachGroupPanelVM.SetMachGroupState(True)
|
||||||
|
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub RemoveMachGroup()
|
Public Overrides Sub RemoveMachGroup()
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<UserControl x:Class="MachinePanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="MachinePanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
Visibility="{Binding MachinePanel_Visibility}">
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<!--Combobox per selezionare la macchina corrente-->
|
<!--Combobox per selezionare la macchina corrente-->
|
||||||
@@ -32,4 +34,4 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -82,6 +82,17 @@ Public Class MyMachinePanelVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_MachinePanel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property MachinePanel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_MachinePanel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetMachinePanelVisibility(bValue As Boolean)
|
||||||
|
m_MachinePanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(MachinePanel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property ToolDBMsg As String
|
Public ReadOnly Property ToolDBMsg As String
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
xmlns:local="clr-namespace:EgtCAM5"
|
xmlns:local="clr-namespace:EgtCAM5"
|
||||||
Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico"
|
Title="{Binding Title}" Icon="{Binding IconSource}"
|
||||||
TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarHeight="32"
|
TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarHeight="32"
|
||||||
BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="2"
|
BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="2"
|
||||||
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
|
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
|
||||||
|
|||||||
+100
-15
@@ -4,6 +4,7 @@ Imports System.Windows.Threading
|
|||||||
Imports System.Runtime.InteropServices
|
Imports System.Runtime.InteropServices
|
||||||
Imports System.Math
|
Imports System.Math
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class MainWindowVM
|
Public Class MainWindowVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
@@ -14,6 +15,7 @@ Public Class MainWindowVM
|
|||||||
Private m_objMutex As Mutex
|
Private m_objMutex As Mutex
|
||||||
Private m_sDataRoot As String = String.Empty
|
Private m_sDataRoot As String = String.Empty
|
||||||
Private m_sConfigDir As String = String.Empty
|
Private m_sConfigDir As String = String.Empty
|
||||||
|
Private m_OnTerminateProcessCallback As New OnTerminateProcessCallback(AddressOf OnTerminateProcess)
|
||||||
|
|
||||||
' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY
|
' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY
|
||||||
|
|
||||||
@@ -93,6 +95,16 @@ Public Class MainWindowVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property IconSource As String
|
||||||
|
Get
|
||||||
|
#If PLATFORM = "x64" Then
|
||||||
|
Return "/Resources/EgtCAM5_64.ico"
|
||||||
|
#else
|
||||||
|
Return "/Resources/EgtCAM5.ico"
|
||||||
|
#End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
@@ -191,6 +203,19 @@ Public Class MainWindowVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
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()
|
||||||
|
' Dichiaro di procedere con la terminazione del programma
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' CloseApplicationCommand
|
#End Region ' CloseApplicationCommand
|
||||||
|
|
||||||
#Region "cmdMainWindow_ContentRendered"
|
#Region "cmdMainWindow_ContentRendered"
|
||||||
@@ -332,10 +357,10 @@ Public Class MainWindowVM
|
|||||||
' Impostazione direttorio toolmakers
|
' Impostazione direttorio toolmakers
|
||||||
Dim sToolMakersDir As String = String.Empty
|
Dim sToolMakersDir As String = String.Empty
|
||||||
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", sToolMakersDir)
|
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", sToolMakersDir)
|
||||||
#If PLATFORM = "x64" Then
|
#If PLATFORM = "x64" Then
|
||||||
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR64, sToolMakersDir, sToolMakersDir)
|
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR64, sToolMakersDir, sToolMakersDir)
|
||||||
#End If
|
#End If
|
||||||
If Not String.IsNullOrWhiteSpace( sToolMakersDir) Then
|
If Not String.IsNullOrWhiteSpace(sToolMakersDir) Then
|
||||||
IniFile.m_sToolMakersDir = sToolMakersDir
|
IniFile.m_sToolMakersDir = sToolMakersDir
|
||||||
Else
|
Else
|
||||||
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
|
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
|
||||||
@@ -346,19 +371,29 @@ Public Class MainWindowVM
|
|||||||
EgtSetLockType(KEY_TYPE.HW)
|
EgtSetLockType(KEY_TYPE.HW)
|
||||||
' Leggo e imposto chiave di protezione ed eventuale chiave nesting
|
' Leggo e imposto chiave di protezione ed eventuale chiave nesting
|
||||||
Dim sLicFileName As String = ""
|
Dim sLicFileName As String = ""
|
||||||
GetPrivateProfileString( S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
|
GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
|
||||||
Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName
|
Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName
|
||||||
Dim sKey As String = ""
|
Dim sKey As String = ""
|
||||||
EgtUILib.GetPrivateProfileString( S_LICENCE, K_KEY, "", sKey, sLicFile)
|
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||||
EgtSetKey( sKey)
|
EgtSetKey(sKey)
|
||||||
Dim sNestKey As String = ""
|
Dim sNestKey As String = ""
|
||||||
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||||
EgtSetNestKey( sNestKey)
|
EgtSetNestKey(sNestKey)
|
||||||
|
' Impostazioni per chiave di rete
|
||||||
|
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
|
||||||
|
EgtSetNetHwKey(bNetKey)
|
||||||
|
Dim sLockId As String = ""
|
||||||
|
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||||
|
If Not String.IsNullOrEmpty(sLockId) Then
|
||||||
|
EgtSetLockId(sLockId)
|
||||||
|
End If
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2505, 1, IniFile.m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2511, 1, IniFile.m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(3279, 2505, 1, IniFile.m_nKeyOptions)
|
EgtGetKeyOptions(3279, 2511, 1, IniFile.m_nKeyOptions)
|
||||||
' Leggo e imposto livello utilizzatore
|
' Leggo e imposto livello utilizzatore
|
||||||
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||||
|
' Imposto abilitazione lavorazioni avanzate
|
||||||
|
MachineUtility.EnableAdvMachinings = IniFile.IsKeyEnabledAdvancedMachining()
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
|
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
|
||||||
@@ -368,9 +403,10 @@ Public Class MainWindowVM
|
|||||||
IniFile.m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", IniFile.m_nInstance.ToString())
|
IniFile.m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", IniFile.m_nInstance.ToString())
|
||||||
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName &
|
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||||
" Inst" & IniFile.m_nInstance.ToString() &
|
" Inst" & IniFile.m_nInstance.ToString() &
|
||||||
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & DebugLevel().ToString() & vbLf &
|
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & DebugLevel().ToString() & vbLf &
|
||||||
My.Application.Info.Title.ToString() & " ver. " & m_sVersion
|
My.Application.Info.Title.ToString() & " ver. " & m_sVersion
|
||||||
EgtInit(m_nDebug, IniFile.m_sLogFile, sLogMsg)
|
EgtInit(m_nDebug, IniFile.m_sLogFile, sLogMsg)
|
||||||
|
EgtSetOnTerminateProcess( m_OnTerminateProcessCallback)
|
||||||
EgtSetUserLevel( IniFile.m_nUserLevel)
|
EgtSetUserLevel( IniFile.m_nUserLevel)
|
||||||
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
|
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
|
||||||
Dim sMsgDir As String = String.Empty
|
Dim sMsgDir As String = String.Empty
|
||||||
@@ -400,9 +436,9 @@ Public Class MainWindowVM
|
|||||||
' Imposto dir di default per libreria Lua e lancio libreria di base
|
' Imposto dir di default per libreria Lua e lancio libreria di base
|
||||||
Dim sLuaLibsDir As String = String.Empty
|
Dim sLuaLibsDir As String = String.Empty
|
||||||
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
||||||
#If PLATFORM = "x64" Then
|
#If PLATFORM = "x64" Then
|
||||||
GetPrivateProfileString(S_LUA, K_LIBSDIR64, sLuaLibsDir, sLuaLibsDir)
|
GetPrivateProfileString(S_LUA, K_LIBSDIR64, sLuaLibsDir, sLuaLibsDir)
|
||||||
#End If
|
#End If
|
||||||
EgtSetLuaLibs(sLuaLibsDir)
|
EgtSetLuaLibs(sLuaLibsDir)
|
||||||
Dim sLuaBaseLib As String = String.Empty
|
Dim sLuaBaseLib As String = String.Empty
|
||||||
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||||
@@ -544,7 +580,7 @@ Public Class MainWindowVM
|
|||||||
WritePrivateProfileString(S_GRID, K_SNAPSTEPINCH, DoubleToString(IniFile.dSnapStepInch, 4))
|
WritePrivateProfileString(S_GRID, K_SNAPSTEPINCH, DoubleToString(IniFile.dSnapStepInch, 4))
|
||||||
End If
|
End If
|
||||||
' gestisco la chiusura di DrawPanelVM
|
' gestisco la chiusura di DrawPanelVM
|
||||||
If Not IniFile.m_bFailedRun Then
|
If Not IniFile.m_bFailedRun AndAlso Not IsNothing(Map.refDrawPanelVM) Then
|
||||||
WritePrivateProfileString(S_GENERAL, K_DRAW2D, If(Map.refDrawPanelVM.Draw2DIsExpanded, "1", "0"))
|
WritePrivateProfileString(S_GENERAL, K_DRAW2D, If(Map.refDrawPanelVM.Draw2DIsExpanded, "1", "0"))
|
||||||
WritePrivateProfileString(S_GENERAL, K_DRAW3D, If(Map.refDrawPanelVM.Draw3DIsExpanded, "1", "0"))
|
WritePrivateProfileString(S_GENERAL, K_DRAW3D, If(Map.refDrawPanelVM.Draw3DIsExpanded, "1", "0"))
|
||||||
WritePrivateProfileString(S_GENERAL, K_MODIFY, If(Map.refDrawPanelVM.ModifyIsExpanded, "1", "0"))
|
WritePrivateProfileString(S_GENERAL, K_MODIFY, If(Map.refDrawPanelVM.ModifyIsExpanded, "1", "0"))
|
||||||
@@ -556,7 +592,7 @@ Public Class MainWindowVM
|
|||||||
|
|
||||||
#Region "Events"
|
#Region "Events"
|
||||||
|
|
||||||
Private Sub MainWindow_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs)
|
Private Sub MainWindow_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
|
||||||
' Con ESC esco dall'azione corrente
|
' Con ESC esco dall'azione corrente
|
||||||
If e.Key = Key.Escape Then
|
If e.Key = Key.Escape Then
|
||||||
' reset Azione corrente
|
' reset Azione corrente
|
||||||
@@ -582,4 +618,53 @@ Public Class MainWindowVM
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
#Region "MEF Plugin"
|
||||||
|
|
||||||
|
Private m_Loader As MEFLoader = New MEFLoader()
|
||||||
|
|
||||||
|
Private Function GetPathByName(ByVal name As String) As String
|
||||||
|
Dim PluginNameSplit() As String = name.Split("."c)
|
||||||
|
Dim res = Map.refMainWindowVM.m_sDataRoot & "\Plugin\" & PluginNameSplit(0)
|
||||||
|
Return res
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function GetControlByName(Of T)(Element As PluginControl) As Panel
|
||||||
|
Dim PlugInControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(Element.Name), Element.Name).FirstOrDefault()
|
||||||
|
Dim PluginPanel As Panel = Nothing
|
||||||
|
Select Case PlugInControl.GetType().BaseType.FullName
|
||||||
|
Case GetType(Panel).FullName, GetType(Grid).FullName
|
||||||
|
PluginPanel = TryCast(PlugInControl, Panel)
|
||||||
|
Case GetType(Forms.UserControl).FullName
|
||||||
|
Dim PluginUserControl As Forms.UserControl = TryCast(PlugInControl, Forms.UserControl)
|
||||||
|
Dim PluginControlInterface As IPluginControl = TryCast(PlugInControl, IPluginControl)
|
||||||
|
If Not IsNothing(PluginControlInterface) Then
|
||||||
|
AddHandler PluginControlInterface.UpdateProjectName, AddressOf UpdateProjectName
|
||||||
|
AddHandler PluginControlInterface.UpdateUI, AddressOf UpdateUI
|
||||||
|
End If
|
||||||
|
PluginPanel = New WinFormPluginControlV(New WinFormPluginControlVM(PluginUserControl, Element.ViewPanelState))
|
||||||
|
End Select
|
||||||
|
Return PluginPanel
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function GetConfigData(Of T)(ByVal name As String) As IPluginConfigData
|
||||||
|
Dim PlugInControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(name), name).FirstOrDefault()
|
||||||
|
Dim PluginConfigData As IPluginConfigData = Nothing
|
||||||
|
Dim v = PlugInControl.GetType()
|
||||||
|
If PlugInControl.GetType().Name = PLUGIN_CONFIGURATION_DATA Then
|
||||||
|
Return TryCast(PlugInControl, IPluginConfigData)
|
||||||
|
Else
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub UpdateProjectName(ProjectName As String)
|
||||||
|
Map.refMainWindowVM.Title = ProjectName & " - EgtCAM5"
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UpdateUI()
|
||||||
|
Map.refProjectVM.UpdateProjectUI(True)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' MEF Plugin
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -70,6 +70,6 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.5.5.2")>
|
<Assembly: AssemblyVersion("2.5.11.2")>
|
||||||
<Assembly: AssemblyFileVersion("2.5.5.2")>
|
<Assembly: AssemblyFileVersion("2.5.11.2")>
|
||||||
|
|
||||||
|
|||||||
@@ -107,24 +107,6 @@ Public Class EstimationsExpanderVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Private Function UpdateAllMachinings() As Boolean
|
|
||||||
' Eseguo ricalcolo
|
|
||||||
Dim bModified As Boolean = EgtGetModified()
|
|
||||||
Dim sErr As String = String.Empty
|
|
||||||
Dim bOk As Boolean = EgtApplyAllMachinings(False, False, sErr)
|
|
||||||
' In caso di errori, li segnalo
|
|
||||||
If Not bOk Then
|
|
||||||
If Not String.IsNullOrEmpty(sErr) Then
|
|
||||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
|
||||||
Else
|
|
||||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If Not bModified Then EgtResetModified()
|
|
||||||
Return bOk
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Overrides Function GetEstimationFileName(bAskSave As Boolean, ByRef sEstFile As String, ByRef sInfo As String) As Boolean
|
Public Overrides Function GetEstimationFileName(bAskSave As Boolean, ByRef sEstFile As String, ByRef sInfo As String) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
' Recupero e verifico la path del progetto corrente
|
' Recupero e verifico la path del progetto corrente
|
||||||
@@ -177,7 +159,7 @@ Public Class EstimationsExpanderVM
|
|||||||
' Recupero la fase corrente
|
' Recupero la fase corrente
|
||||||
Dim nPhase As Integer = EgtGetCurrPhase()
|
Dim nPhase As Integer = EgtGetCurrPhase()
|
||||||
' Aggiorno le lavorazioni
|
' Aggiorno le lavorazioni
|
||||||
If Not UpdateAllMachinings() Then
|
If Not Map.refSimulationExpanderVM.UpdateAllMachinings() Then
|
||||||
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
|
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|||||||
-2
@@ -15,8 +15,6 @@
|
|||||||
<Expander Header="RawPart" IsExpanded="{Binding RawPartIsExpanded}"
|
<Expander Header="RawPart" IsExpanded="{Binding RawPartIsExpanded}"
|
||||||
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
|
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<!--<CheckBox Content="Move with Fixture" IsChecked="{Binding MoveWithFixture, Mode=TwoWay}"/>-->
|
|
||||||
<!--ContentPresenter that contains the RawPart options -->
|
|
||||||
<ContentPresenter Name="RawPartOptions" Content="{Binding RawPartOptions ,Mode=OneWay}"/>
|
<ContentPresenter Name="RawPartOptions" Content="{Binding RawPartOptions ,Mode=OneWay}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Expander>
|
</Expander>
|
||||||
|
|||||||
+2
-39
@@ -59,7 +59,7 @@ Public Class DispositionParameterExpanderVM
|
|||||||
PartIsExpanded = False
|
PartIsExpanded = False
|
||||||
FixtureIsExpanded = False
|
FixtureIsExpanded = False
|
||||||
' verifico se è attiva l'opzione muovi con ventose
|
' verifico se è attiva l'opzione muovi con ventose
|
||||||
If m_MoveWithFixture Then
|
If Map.refRawPartOptionVM.MoveWithFixture() Then
|
||||||
' Abilito la selezione dei RawPart con ventose
|
' Abilito la selezione dei RawPart con ventose
|
||||||
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
|
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
|
||||||
Else
|
Else
|
||||||
@@ -168,42 +168,6 @@ Public Class DispositionParameterExpanderVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_MoveWithFixture As Boolean = False
|
|
||||||
Public Property MoveWithFixture As Boolean
|
|
||||||
Get
|
|
||||||
Return m_MoveWithFixture
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If value <> m_MoveWithFixture Then
|
|
||||||
If value Then
|
|
||||||
' Abilito la selezione di RawPart con autoselezione delle sue ventose
|
|
||||||
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
|
|
||||||
' Seleziono le ventose associate ad uno dei grezzi selezionati
|
|
||||||
' ciclo sui grezzi selezionati
|
|
||||||
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
|
|
||||||
While nSelRawPartId <> GDB_ID.NULL
|
|
||||||
' seleziono i sottopezzi del grezzo
|
|
||||||
DispositionUtility.SelectRawPartFixture(nSelRawPartId)
|
|
||||||
nSelRawPartId = EgtGetNextSelectedObj()
|
|
||||||
End While
|
|
||||||
Else
|
|
||||||
' Abilito la selezione di RawPart
|
|
||||||
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART
|
|
||||||
' ciclo sui grezzi selezionati
|
|
||||||
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
|
|
||||||
While nSelRawPartId <> GDB_ID.NULL
|
|
||||||
' deseleziono i sottopezzi del grezzo
|
|
||||||
DispositionUtility.DeselectRawPartFixture(nSelRawPartId)
|
|
||||||
nSelRawPartId = EgtGetNextSelectedObj()
|
|
||||||
End While
|
|
||||||
End If
|
|
||||||
EgtDraw()
|
|
||||||
m_MoveWithFixture = value
|
|
||||||
OnPropertyChanged("MoveWithFixture")
|
|
||||||
End If
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private m_InputValue As String
|
Private m_InputValue As String
|
||||||
Public Property InputValue As String
|
Public Property InputValue As String
|
||||||
Get
|
Get
|
||||||
@@ -315,8 +279,7 @@ Public Class DispositionParameterExpanderVM
|
|||||||
' Abilito la selezione delle Fixture
|
' Abilito la selezione delle Fixture
|
||||||
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.FIXTURE
|
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.FIXTURE
|
||||||
End Select
|
End Select
|
||||||
m_MoveWithFixture = False
|
Map.refRawPartOptionVM.SetMoveWithFixture(False)
|
||||||
OnPropertyChanged("MoveWithFixture")
|
|
||||||
Map.refFixtureParametersVM.UpdateFixtureTypeList()
|
Map.refFixtureParametersVM.UpdateFixtureTypeList()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
+8
-1
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports System.ComponentModel
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class RawPartOptionVM
|
Public Class RawPartOptionVM
|
||||||
Inherits ViewModelBase
|
Inherits ViewModelBase
|
||||||
@@ -38,6 +39,11 @@ Public Class RawPartOptionVM
|
|||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
friend Sub SetMoveWithFixture(value As Boolean)
|
||||||
|
m_MoveWithFixture=value
|
||||||
|
OnPropertyChanged(NameOf(MoveWithFixture))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private m_bRawPartParamVisibility As Visibility
|
Private m_bRawPartParamVisibility As Visibility
|
||||||
Public ReadOnly Property RawPartParamVisibility As Visibility
|
Public ReadOnly Property RawPartParamVisibility As Visibility
|
||||||
@@ -86,6 +92,7 @@ Public Class RawPartOptionVM
|
|||||||
Private m_cmdRemoveRawPart As ICommand
|
Private m_cmdRemoveRawPart As ICommand
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
|
Map.SetRefRawPartOptionVM(Me)
|
||||||
If EgtGetFirstSelectedObj() <> GDB_ID.NULL Then
|
If EgtGetFirstSelectedObj() <> GDB_ID.NULL Then
|
||||||
m_bRawPartParamVisibility = Visibility.Visible
|
m_bRawPartParamVisibility = Visibility.Visible
|
||||||
Else
|
Else
|
||||||
|
|||||||
+2
@@ -63,6 +63,7 @@ Public Class OperationListBoxItem
|
|||||||
Dim bEnabModif As Boolean = EgtGetEnableModified()
|
Dim bEnabModif As Boolean = EgtGetEnableModified()
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
|
EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
|
||||||
|
EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_DBL))
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
|
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
|
||||||
SelData.ClearIdSub()
|
SelData.ClearIdSub()
|
||||||
If bEnabModif Then EgtEnableModified()
|
If bEnabModif Then EgtEnableModified()
|
||||||
@@ -96,6 +97,7 @@ Public Class OperationListBoxItem
|
|||||||
Dim bEnabModif As Boolean = EgtGetEnableModified()
|
Dim bEnabModif As Boolean = EgtGetEnableModified()
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
|
EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
|
||||||
|
EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_DBL))
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.ON_)
|
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.ON_)
|
||||||
If bEnabModif Then EgtEnableModified()
|
If bEnabModif Then EgtEnableModified()
|
||||||
' Seleziono la geometria della lavorazione
|
' Seleziono la geometria della lavorazione
|
||||||
|
|||||||
@@ -723,6 +723,7 @@ Public Class OperationsListExpanderVM
|
|||||||
selOperation.m_Type = MCH_OY.DISP Then Return
|
selOperation.m_Type = MCH_OY.DISP Then Return
|
||||||
' Tolgo Mark da lavorazione originale
|
' Tolgo Mark da lavorazione originale
|
||||||
EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_CL))
|
EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_CL))
|
||||||
|
EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_DBL))
|
||||||
EgtSetStatus(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
|
EgtSetStatus(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
|
||||||
SelData.ClearIdSub()
|
SelData.ClearIdSub()
|
||||||
' Eseguo la copia
|
' Eseguo la copia
|
||||||
@@ -970,8 +971,8 @@ Public Class OperationsListExpanderVM
|
|||||||
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
|
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
|
||||||
OnPropertyChanged("ListIsExpanded")
|
OnPropertyChanged("ListIsExpanded")
|
||||||
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True)
|
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True)
|
||||||
Map.refDoorPanelVM.MTableIsEnabled(True)
|
If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(True)
|
||||||
Map.refSpecialPanelVM.SpecialPanelIsEnabled(True)
|
If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(True)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -1187,15 +1188,15 @@ Public Class OperationsListExpanderVM
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Function IsInOperationList(nId As Integer) As Boolean
|
Friend Function GetOperationId(nId As Integer) As Integer
|
||||||
Dim nOpId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nId)))
|
Dim nOpeId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nId)))
|
||||||
For Index = 0 To OperationList.Count - 1
|
For Index = 0 To OperationList.Count - 1
|
||||||
Dim nOpType As Integer = EgtGetOperationType(nOpId)
|
Dim nOpeType As Integer = EgtGetOperationType(nOpeId)
|
||||||
If OperationList(Index).Id = nOpId And nOpType <> MCH_OY.NONE And nOpType <> MCH_OY.DISP Then
|
If OperationList(Index).Id = nOpeId And nOpeType <> MCH_OY.NONE And nOpeType <> MCH_OY.DISP Then
|
||||||
Return True
|
Return nOpeId
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return False
|
Return GDB_ID.NULL
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Sub DeselOperationFromId()
|
Friend Sub DeselOperationFromId()
|
||||||
|
|||||||
@@ -176,7 +176,9 @@ Public Class SimulationExpanderVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function UpdateAllMachinings() As Boolean
|
Friend Function UpdateAllMachinings() As Boolean
|
||||||
|
' Se disabilitato, esco
|
||||||
|
If GetPrivateProfileInt( S_MACH, K_AUTOUPDATEALLMACHININGS, 1) = 0 Then Return True
|
||||||
' Eseguo ricalcolo
|
' Eseguo ricalcolo
|
||||||
Dim bModified As Boolean = EgtGetModified()
|
Dim bModified As Boolean = EgtGetModified()
|
||||||
Dim sErr As String = String.Empty
|
Dim sErr As String = String.Empty
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<UserControl x:Class="OptionPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
|
TitleBarOrientation="Vertical"
|
||||||
|
Visibility="{Binding Panel_Visibility}">
|
||||||
|
|
||||||
<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||||
|
|
||||||
<!--ContentPresenter that contains the ModePanel-->
|
<!--ContentPresenter that contains the ModePanel-->
|
||||||
<ContentPresenter Content="{Binding ModePanel}"/>
|
<ContentPresenter Content="{Binding ModePanel}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
Public Class OptionPanelV
|
Public Class OptionPanelV
|
||||||
|
|
||||||
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
|
||||||
Dim x = ciao.MaxHeight
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,20 +1,12 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class OptionPanelVM
|
Public Class OptionPanelVM
|
||||||
Inherits ViewModelBase
|
Inherits BasePanelVM
|
||||||
|
|
||||||
Private m_DrawIsChecked As Boolean = True
|
Private m_DrawIsChecked As Boolean = True
|
||||||
|
|
||||||
Private m_MachiningIsChecked As Boolean = False
|
Private m_MachiningIsChecked As Boolean = False
|
||||||
|
|
||||||
Sub New()
|
|
||||||
Map.SetRefOptionPanelVM(Me)
|
|
||||||
|
|
||||||
DrawOptPanelV = New DrawOptionPanelV
|
|
||||||
MachOptPanelV = New MachiningOptionPanelV
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Dim DrawOptPanelV As DrawOptionPanelV
|
Dim DrawOptPanelV As DrawOptionPanelV
|
||||||
Dim MachOptPanelV As MachiningOptionPanelV
|
Dim MachOptPanelV As MachiningOptionPanelV
|
||||||
|
|
||||||
@@ -23,31 +15,43 @@ Public Class OptionPanelVM
|
|||||||
|
|
||||||
Public ReadOnly Property ModePanel As ContentControl
|
Public ReadOnly Property ModePanel As ContentControl
|
||||||
Get
|
Get
|
||||||
|
|
||||||
DrawOptPanelV.DataContext = Nothing
|
|
||||||
MachOptPanelV.DataContext = Nothing
|
|
||||||
|
|
||||||
If Not IsNothing(Map.refDrawOptionPanelVM) And Not IsNothing(Map.refMachiningOptionPanelVM) Then
|
If Not IsNothing(Map.refDrawOptionPanelVM) And Not IsNothing(Map.refMachiningOptionPanelVM) Then
|
||||||
|
|
||||||
If m_DrawIsChecked And Not m_MachiningIsChecked Then
|
If m_DrawIsChecked And Not m_MachiningIsChecked Then
|
||||||
Map.refMachiningOptionPanelVM.ExitMachiningOptionPanel()
|
Map.refMachiningOptionPanelVM.ExitMachiningOptionPanel()
|
||||||
Map.refDrawOptionPanelVM.InitDrawOptionPanel()
|
Map.refDrawOptionPanelVM.InitDrawOptionPanel()
|
||||||
DrawOptPanelV.DataContext = Map.refDrawOptionPanelVM
|
If DrawOptPanelV.DataContext IsNot Map.refDrawOptionPanelVM Then
|
||||||
|
DrawOptPanelV.DataContext = Map.refDrawOptionPanelVM
|
||||||
|
End If
|
||||||
Return DrawOptPanelV
|
Return DrawOptPanelV
|
||||||
End If
|
End If
|
||||||
If m_MachiningIsChecked And Not m_DrawIsChecked Then
|
If m_MachiningIsChecked And Not m_DrawIsChecked Then
|
||||||
Map.refDrawOptionPanelVM.ExitDrawOptionPanel()
|
Map.refDrawOptionPanelVM.ExitDrawOptionPanel()
|
||||||
Map.refMachiningOptionPanelVM.InitMachiningOptionPanel()
|
Map.refMachiningOptionPanelVM.InitMachiningOptionPanel()
|
||||||
MachOptPanelV.DataContext = Map.refMachiningOptionPanelVM
|
If MachOptPanelV.DataContext IsNot Map.refMachiningOptionPanelVM Then
|
||||||
|
MachOptPanelV.DataContext = Map.refMachiningOptionPanelVM
|
||||||
|
End If
|
||||||
Return MachOptPanelV
|
Return MachOptPanelV
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DrawOptPanelV.DataContext = Nothing
|
||||||
|
MachOptPanelV.DataContext = Nothing
|
||||||
|
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
Map.SetRefOptionPanelVM(Me)
|
||||||
|
|
||||||
|
SetPanelViewState(ViewPanelStates.ALWAYS)
|
||||||
|
|
||||||
|
DrawOptPanelV = New DrawOptionPanelV
|
||||||
|
MachOptPanelV = New MachiningOptionPanelV
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub DrawMode_IsChecked()
|
Friend Sub DrawMode_IsChecked()
|
||||||
m_DrawIsChecked = True
|
m_DrawIsChecked = True
|
||||||
m_MachiningIsChecked = False
|
m_MachiningIsChecked = False
|
||||||
@@ -56,14 +60,14 @@ Public Class OptionPanelVM
|
|||||||
Map.refSimulationExpanderVM.Simulation_IsExpanded = False
|
Map.refSimulationExpanderVM.Simulation_IsExpanded = False
|
||||||
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
|
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
|
||||||
End If
|
End If
|
||||||
OnPropertyChanged("ModePanel")
|
NotifyPropertyChanged("ModePanel")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub MachiningMode_IsChecked()
|
Friend Sub MachiningMode_IsChecked()
|
||||||
m_DrawIsChecked = False
|
m_DrawIsChecked = False
|
||||||
m_MachiningIsChecked = True
|
m_MachiningIsChecked = True
|
||||||
EgtZoom(ZM.ALL, False)
|
EgtZoom(ZM.ALL, False)
|
||||||
OnPropertyChanged("ModePanel")
|
NotifyPropertyChanged("ModePanel")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1090,7 +1090,7 @@ Public Class OptionWindowVM
|
|||||||
}
|
}
|
||||||
If MachDlg.ShowDialog() <> True Then Return
|
If MachDlg.ShowDialog() <> True Then Return
|
||||||
Dim sMachZip As String = MachDlg.FileName
|
Dim sMachZip As String = MachDlg.FileName
|
||||||
Dim sMachName As String = Path.GetFileNameWithoutExtension(sMachZip)
|
Dim sMachName As String = Path.GetFileNameWithoutExtension(Path.GetFileNameWithoutExtension(sMachZip))
|
||||||
Dim sMachDir As String = Path.Combine(IniFile.m_sMachinesRoot, sMachName)
|
Dim sMachDir As String = Path.Combine(IniFile.m_sMachinesRoot, sMachName)
|
||||||
' Preparo direttorio temporaneo
|
' Preparo direttorio temporaneo
|
||||||
Dim sTempDir As String = Path.Combine(IniFile.m_sMachinesRoot, "Temp")
|
Dim sTempDir As String = Path.Combine(IniFile.m_sMachinesRoot, "Temp")
|
||||||
@@ -1265,6 +1265,8 @@ Public Class OptionWindowVM
|
|||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate)
|
Using zip As New Ionic.Zip.ZipFile(sZipToCreate)
|
||||||
|
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||||
|
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||||
' aggiungo i file della Macchina
|
' aggiungo i file della Macchina
|
||||||
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sCurrMachineName
|
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sCurrMachineName
|
||||||
If Directory.Exists(sMachineDir) Then
|
If Directory.Exists(sMachineDir) Then
|
||||||
|
|||||||
+19
-101
@@ -1,10 +1,21 @@
|
|||||||
<UserControl x:Class="ProjectV"
|
<ItemsControl x:Class="ProjectV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:EgtCAM5"
|
xmlns:local="clr-namespace:EgtCAM5"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
|
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||||
|
ItemsSource="{Binding PanelList}">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<DockPanel />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemContainerStyle>
|
||||||
|
<Style>
|
||||||
|
<Setter Property="DockPanel.Dock" Value="{Binding}" />
|
||||||
|
</Style>
|
||||||
|
</ItemsControl.ItemContainerStyle>
|
||||||
|
|
||||||
<interactivity:Interaction.Triggers>
|
<interactivity:Interaction.Triggers>
|
||||||
<interactivity:EventTrigger EventName="Loaded">
|
<interactivity:EventTrigger EventName="Loaded">
|
||||||
@@ -12,97 +23,4 @@
|
|||||||
</interactivity:EventTrigger>
|
</interactivity:EventTrigger>
|
||||||
</interactivity:Interaction.Triggers>
|
</interactivity:Interaction.Triggers>
|
||||||
|
|
||||||
<EgtFloating:EgtFloatingManager>
|
</ItemsControl>
|
||||||
<EgtFloating:EgtFloatingTray x:Name="TOPTRAY" DockPanel.Dock="Top">
|
|
||||||
<WrapPanel Orientation="Horizontal" Width="{Binding ActualWidth, ElementName=TOPTRAY}">
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="ShowPanel"
|
|
||||||
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">
|
|
||||||
<local:ViewPanelV DataContext="{StaticResource ViewPanelViewModel}"/>
|
|
||||||
<local:PopUpViewPanelV DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<!--<EgtFloating:EgtFloatingPanel Name="InstrumentPanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">-->
|
|
||||||
<local:InstrumentPanelV DataContext="{StaticResource InstrumentPanelViewModel}"/>
|
|
||||||
<!--</EgtFloating:EgtFloatingPanel>-->
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="GridPanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:GridPanelV DataContext="{StaticResource GridPanelViewModel}"/>
|
|
||||||
<local:PopUpGridPanelV DataContext="{StaticResource PopUpGridPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="DbPanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="ExecutePanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="SpecialPanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="BeamPanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="WallPanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="BeamWallPanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="DoorsPanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="GunStockPanel"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="PrintingPanel"
|
|
||||||
IsTopDockable="True"
|
|
||||||
IsBottomDockable="True"
|
|
||||||
IsLeftDockable="False"
|
|
||||||
IsRightDockable="False">
|
|
||||||
<local:Printing3DPanelV DataContext="{StaticResource Printing3DPanelVM}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
</WrapPanel>
|
|
||||||
</EgtFloating:EgtFloatingTray>
|
|
||||||
<EgtFloating:EgtFloatingTray x:Name="LEFTTRAY" DockPanel.Dock="Left">
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="DrawPanel" TitleBarOrientation="Vertical"
|
|
||||||
IsTopDockable="False" IsBottomDockable="False" IsLeftDockable="True" IsRightDockable="True">
|
|
||||||
<local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
</EgtFloating:EgtFloatingTray>
|
|
||||||
<EgtFloating:EgtFloatingTray x:Name="RIGHTTRAY" DockPanel.Dock="Right">
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="OptionPanel" TitleBarOrientation="Vertical"
|
|
||||||
IsTopDockable="False" IsBottomDockable="False" IsLeftDockable="True" IsRightDockable="True">
|
|
||||||
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
</EgtFloating:EgtFloatingTray>
|
|
||||||
<!--<EgtFloating:EgtFloatingTray x:Name="BOTTOMTRAY" DockPanel.Dock="Bottom">
|
|
||||||
<EgtFloating:EgtFloatingPanel Name="MachGroupPanel"
|
|
||||||
IsToolBar="False"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
|
||||||
<local:MachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"/>
|
|
||||||
</EgtFloating:EgtFloatingPanel>
|
|
||||||
</EgtFloating:EgtFloatingTray>-->
|
|
||||||
<EgtFloating:EgtFloatingTray x:Name="BOTTOMTRAY" DockPanel.Dock="Bottom">
|
|
||||||
<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"
|
|
||||||
RepaetButtonStyle="{StaticResource CustomScrollBarButton}"
|
|
||||||
MachGroupButtonStyle="{StaticResource {x:Type ToggleButton}}"
|
|
||||||
IsToolBar="False"
|
|
||||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False"
|
|
||||||
IsRightDockable="False" />
|
|
||||||
</EgtFloating:EgtFloatingTray>
|
|
||||||
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
|
||||||
<ContentControl Content="{Binding ProjectSceneHost}"/>
|
|
||||||
</EgtFloating:EgtFloatingManager>
|
|
||||||
|
|
||||||
</UserControl>
|
|
||||||
|
|||||||
+40
-42
@@ -7,18 +7,17 @@ Public Class ProjectV
|
|||||||
Private m_bWall As Boolean = False
|
Private m_bWall As Boolean = False
|
||||||
Private m_bDoors As Boolean = False
|
Private m_bDoors As Boolean = False
|
||||||
Private m_bGunStock As Boolean = False
|
Private m_bGunStock As Boolean = False
|
||||||
Private m_bPrinting3d As Boolean = False
|
|
||||||
|
|
||||||
Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo riferimento a questa classe in Map
|
' Creo riferimento a questa classe in Map
|
||||||
Map.SetRefProjectV(Me)
|
Map.SetRefProjectV(Me)
|
||||||
SpecialPanel.Visibility = Visibility.Collapsed
|
'SpecialPanel.Visibility = Visibility.Collapsed
|
||||||
BeamPanel.Visibility = Visibility.Collapsed
|
'BeamPanel.Visibility = Visibility.Collapsed
|
||||||
WallPanel.Visibility = Visibility.Collapsed
|
'WallPanel.Visibility = Visibility.Collapsed
|
||||||
DoorsPanel.Visibility = Visibility.Collapsed
|
'DoorsPanel.Visibility = Visibility.Collapsed
|
||||||
GunStockPanel.Visibility = Visibility.Collapsed
|
'GunStockPanel.Visibility = Visibility.Collapsed
|
||||||
PrintingPanel.Visibility = Visibility.Collapsed
|
'PrintingPanel.Visibility = Visibility.Collapsed
|
||||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
@@ -48,7 +47,6 @@ Public Class ProjectV
|
|||||||
m_bWall = IniFile.IsActiveWall()
|
m_bWall = IniFile.IsActiveWall()
|
||||||
m_bDoors = IniFile.IsActiveDoors()
|
m_bDoors = IniFile.IsActiveDoors()
|
||||||
m_bGunStock = IniFile.IsActiveGunStock()
|
m_bGunStock = IniFile.IsActiveGunStock()
|
||||||
m_bPrinting3d = IniFile.IsActivePrinting3d()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub PanelPositioning(FloatingPanel As EgtFloatingPanel, sState As String, nIndex As Integer, nLeft As Integer, nTop As Integer)
|
Private Sub PanelPositioning(FloatingPanel As EgtFloatingPanel, sState As String, nIndex As Integer, nLeft As Integer, nTop As Integer)
|
||||||
@@ -67,47 +65,47 @@ Public Class ProjectV
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub SetDbPanelVisibility()
|
Friend Sub SetDbPanelVisibility()
|
||||||
DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
|
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub MachiningMode_IsChecked()
|
Friend Sub MachiningMode_IsChecked()
|
||||||
'ShowPanel.Visibility = Visibility.Visible
|
''ShowPanel.Visibility = Visibility.Visible
|
||||||
ViewPanel.Visibility = Visibility.Visible
|
'ViewPanel.Visibility = Visibility.Visible
|
||||||
'InstrumentPanel.Visibility = Visibility.Visible
|
''InstrumentPanel.Visibility = Visibility.Visible
|
||||||
GridPanel.Visibility = Visibility.Visible
|
'GridPanel.Visibility = Visibility.Visible
|
||||||
DbPanel.Visibility = Visibility.Visible
|
'DbPanel.Visibility = Visibility.Visible
|
||||||
ExecutePanel.Visibility = Visibility.Collapsed
|
'ExecutePanel.Visibility = Visibility.Collapsed
|
||||||
SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True), Visibility.Visible, Visibility.Collapsed)
|
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True), Visibility.Visible, Visibility.Collapsed)
|
||||||
BeamPanel.Visibility = Visibility.Collapsed
|
'BeamPanel.Visibility = Visibility.Collapsed
|
||||||
WallPanel.Visibility = Visibility.Collapsed
|
'WallPanel.Visibility = Visibility.Collapsed
|
||||||
BeamWallPanel.Visibility = Visibility.Collapsed
|
'BeamWallPanel.Visibility = Visibility.Collapsed
|
||||||
DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
|
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
|
||||||
PrintingPanel.Visibility = Visibility.Collapsed
|
'PrintingPanel.Visibility = Visibility.Collapsed
|
||||||
GunStockPanel.Visibility = Visibility.Collapsed
|
'GunStockPanel.Visibility = Visibility.Collapsed
|
||||||
DrawPanel.Visibility = Visibility.Collapsed
|
'DrawPanel.Visibility = Visibility.Collapsed
|
||||||
OptionPanel.Visibility = Visibility.Visible
|
'OptionPanel.Visibility = Visibility.Visible
|
||||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup) ' MachGroupPanel.Visibility = If(IniFile.m_bMachiningGroup, Visibility.Visible, Visibility.Collapsed)
|
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup) ' MachGroupPanel.Visibility = If(IniFile.m_bMachiningGroup, Visibility.Visible, Visibility.Collapsed)
|
||||||
If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
|
If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub DrawMode_IsChecked()
|
Friend Sub DrawMode_IsChecked()
|
||||||
'ShowPanel.Visibility = Visibility.Visible
|
''ShowPanel.Visibility = Visibility.Visible
|
||||||
ViewPanel.Visibility = Visibility.Visible
|
'ViewPanel.Visibility = Visibility.Visible
|
||||||
'InstrumentPanel.Visibility = Visibility.Visible
|
''InstrumentPanel.Visibility = Visibility.Visible
|
||||||
GridPanel.Visibility = Visibility.Visible
|
'GridPanel.Visibility = Visibility.Visible
|
||||||
DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
|
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
|
||||||
ExecutePanel.Visibility = Visibility.Visible
|
'ExecutePanel.Visibility = Visibility.Visible
|
||||||
SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False), Visibility.Visible, Visibility.Collapsed)
|
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False), Visibility.Visible, Visibility.Collapsed)
|
||||||
BeamPanel.Visibility = If(m_bBeam, Visibility.Visible, Visibility.Collapsed)
|
'BeamPanel.Visibility = If(m_bBeam, Visibility.Visible, Visibility.Collapsed)
|
||||||
WallPanel.Visibility = If(m_bWall, Visibility.Visible, Visibility.Collapsed)
|
'WallPanel.Visibility = If(m_bWall, Visibility.Visible, Visibility.Collapsed)
|
||||||
BeamWallPanel.Visibility = If(m_bBeam Or m_bWall, Visibility.Visible, Visibility.Collapsed)
|
'BeamWallPanel.Visibility = If(m_bBeam Or m_bWall, Visibility.Visible, Visibility.Collapsed)
|
||||||
DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
|
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
|
||||||
PrintingPanel.Visibility = If(m_bPrinting3d, Visibility.Visible, Visibility.Collapsed)
|
'PrintingPanel.Visibility = If(m_bPrinting3d, Visibility.Visible, Visibility.Collapsed)
|
||||||
GunStockPanel.Visibility = If(m_bGunStock, Visibility.Visible, Visibility.Collapsed)
|
'GunStockPanel.Visibility = If(m_bGunStock, Visibility.Visible, Visibility.Collapsed)
|
||||||
DrawPanel.Visibility = Visibility.Visible
|
'DrawPanel.Visibility = Visibility.Visible
|
||||||
OptionPanel.Visibility = Visibility.Visible
|
'OptionPanel.Visibility = Visibility.Visible
|
||||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
||||||
If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
|
' If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UserControl_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Private Sub UserControl_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
|
|||||||
+193
-127
@@ -7,86 +7,141 @@ Imports EgtWPFLib5
|
|||||||
Imports EgtWPFLib5.EgtFloating
|
Imports EgtWPFLib5.EgtFloating
|
||||||
|
|
||||||
Public Class ProjectVM
|
Public Class ProjectVM
|
||||||
Inherits TabViewModel
|
Inherits TabViewModel
|
||||||
|
|
||||||
#Region "FIELDS"
|
#Region "FIELDS"
|
||||||
|
|
||||||
Friend Event OnPreControllerExec(sFilePath As String)
|
Friend Event OnPreControllerExec(sFilePath As String)
|
||||||
Friend Event OnPostControllerExec()
|
Friend Event OnPostControllerExec()
|
||||||
|
|
||||||
' Variabili in cui salvo i filtri di selezione della modalità Draw e che poi ripristino all'uscita dalla modalità Machining
|
' Variabili in cui salvo i filtri di selezione della modalità Draw e che poi ripristino all'uscita dalla modalità Machining
|
||||||
Private m_bSelZeroDim As Boolean = True
|
Private m_bSelZeroDim As Boolean = True
|
||||||
Private m_bSelCurve As Boolean = True
|
Private m_bSelCurve As Boolean = True
|
||||||
Private m_bSelSurf As Boolean = True
|
Private m_bSelSurf As Boolean = True
|
||||||
Private m_bSelVolume As Boolean = True
|
Private m_bSelVolume As Boolean = True
|
||||||
Private m_bSelExtra As Boolean = True
|
Private m_bSelExtra As Boolean = True
|
||||||
|
|
||||||
Private m_bLoaded As Boolean = False
|
Private m_bLoaded As Boolean = False
|
||||||
|
|
||||||
' Variabile che contiene il Frame di disegno per poterlo ripristinare dopo essere passato dalla lavorazioneù
|
' Variabile che contiene il Frame di disegno per poterlo ripristinare dopo essere passato dalla lavorazioneù
|
||||||
Private m_GridDrawFrame3d As Frame3d = New Frame3d(New Point3d(0, 0, 0))
|
Private m_GridDrawFrame3d As Frame3d = New Frame3d(New Point3d(0, 0, 0))
|
||||||
|
|
||||||
'PROJECT PAGE'S SCENE FIELDS AND PROPERTIES
|
'PROJECT PAGE'S SCENE FIELDS AND PROPERTIES
|
||||||
' Reference to the ProjectScene
|
' Reference to the ProjectScene
|
||||||
Private WithEvents m_ProjectScene As New Scene
|
Private WithEvents m_ProjectScene As New Scene
|
||||||
' Reference to the ProjectSceneHost
|
' Reference to the ProjectSceneHost
|
||||||
Private SceneHost As WindowsFormsHost
|
Private SceneHost As WindowsFormsHost
|
||||||
' Property used to bind the scene to the WindowsFormsHost in XAML
|
' Property used to bind the scene to the WindowsFormsHost in XAML
|
||||||
Private m_bfirst As Boolean = True
|
Private m_bfirst As Boolean = True
|
||||||
Public ReadOnly Property ProjectSceneHost As WindowsFormsHost
|
Public ReadOnly Property ProjectSceneHost As WindowsFormsHost
|
||||||
Get
|
Get
|
||||||
If m_bfirst Then
|
If m_bfirst Then
|
||||||
SceneHost = New WindowsFormsHost() With {.Child = m_ProjectScene}
|
SceneHost = New WindowsFormsHost() With {.Child = m_ProjectScene}
|
||||||
m_bfirst = False
|
m_bfirst = False
|
||||||
End If
|
End If
|
||||||
Return SceneHost
|
Return SceneHost
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
' Scene controller
|
' Scene controller
|
||||||
Private WithEvents m_Controller As New Controller
|
Private WithEvents m_Controller As New Controller
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdLoaded As ICommand
|
Private m_cmdLoaded As ICommand
|
||||||
|
|
||||||
' Flag per non salvare Script appena eseguito in elenco MruScript
|
' Flag per non salvare Script appena eseguito in elenco MruScript
|
||||||
Private m_bScriptInMru As Boolean = True
|
Private m_bScriptInMru As Boolean = True
|
||||||
|
|
||||||
|
Private m_PanelList As New List(Of Panel)
|
||||||
|
Public ReadOnly Property PanelList As List(Of Panel)
|
||||||
|
Get
|
||||||
|
Return m_PanelList
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "EGTUILIB FIELDS"
|
#Region "EGTUILIB FIELDS"
|
||||||
|
|
||||||
Private m_bCPlaneTypePos As Boolean
|
Private m_bCPlaneTypePos As Boolean
|
||||||
'Private m_bStopExec As Boolean = False
|
|
||||||
'Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
|
|
||||||
'Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
|
|
||||||
|
|
||||||
' Variabile per implementazione eventi
|
' Variabile per implementazione eventi
|
||||||
Private m_InputText As String
|
Private m_InputText As String
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
' Creo riferimento a questa classe in EgtCAM5Map e in ButtonItem
|
' Creo riferimento a questa classe in EgtCAM5Map e in ButtonItem
|
||||||
Map.SetRefProjectVM(Me)
|
Map.SetRefProjectVM(Me)
|
||||||
ButtonItem.m_ProjectVM = Me
|
ButtonItem.m_ProjectVM = Me
|
||||||
' Creo classe di supporto per la visualizzazione dei parametri utensile e di lavorazione per Db e operazioni
|
' Creo classe di supporto per la visualizzazione dei parametri utensile e di lavorazione per Db e operazioni
|
||||||
TMDbParamVisibility.bFirst = True
|
TMDbParamVisibility.bFirst = True
|
||||||
' Inizializza i parametri della scena
|
' Inizializza i parametri della scena
|
||||||
'InitializeEgtProject()
|
'InitializeEgtProject()
|
||||||
End Sub
|
' aggiungo componenti interfaccia
|
||||||
|
Dim bPlugin As Boolean = False
|
||||||
|
Dim PluginDirNameList() As String = {}
|
||||||
|
If IsActivePlugin() Then
|
||||||
|
Dim sPluginDirPath As String = IniFile.m_sDataRoot & "\Plugin"
|
||||||
|
If Directory.Exists(sPluginDirPath) Then
|
||||||
|
' recupero nome del plugin
|
||||||
|
PluginDirNameList = Directory.GetDirectories(IniFile.m_sDataRoot & "\Plugin")
|
||||||
|
' verifico che il nome delle cartelle corrisponda al nome delle dll
|
||||||
|
For PluginDirIndex As Integer = 0 To PluginDirNameList.Count - 1
|
||||||
|
Dim sPluginDirName As String = Path.GetFileName(PluginDirNameList(PluginDirIndex))
|
||||||
|
Dim sPluginFileNameList() As String = Directory.GetFiles(PluginDirNameList(PluginDirIndex))
|
||||||
|
If sPluginFileNameList.Count = 0 OrElse Not sPluginFileNameList.Any(Function(x) Path.GetFileNameWithoutExtension(x) = sPluginDirName) Then
|
||||||
|
PluginDirNameList(PluginDirIndex) = ""
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
bPlugin = PluginDirNameList.Count(Function(x) Not String.IsNullOrWhiteSpace(x)) > 0
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If bPlugin Then
|
||||||
|
For Each PluginDirName In PluginDirNameList
|
||||||
|
If Not String.IsNullOrWhiteSpace(PluginDirName) Then
|
||||||
|
Dim PluginName As String = Path.GetFileName(PluginDirName)
|
||||||
|
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
|
||||||
|
Select Case Element.Name
|
||||||
|
Case PLUGIN_RIGHT_TRAY
|
||||||
|
m_PanelList.Add(New RightTrayV)
|
||||||
|
Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState)
|
||||||
|
Case PLUGIN_LEFT_TRAY
|
||||||
|
m_PanelList.Add(New LeftTrayV)
|
||||||
|
Case Else
|
||||||
|
m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
m_PanelList.Add(New BottomTrayV)
|
||||||
|
m_PanelList.Add(New 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)
|
||||||
|
End If
|
||||||
|
m_PanelList.Add(New SceneContentControlV)
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Get & Set"
|
#Region "Get & Set"
|
||||||
|
|
||||||
Friend Function GetScene() As Scene
|
Friend Function GetScene() As Scene
|
||||||
Return m_ProjectScene
|
Return m_ProjectScene
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function GetController() As Controller
|
Friend Function GetController() As Controller
|
||||||
Return m_Controller
|
Return m_Controller
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region ' Get & Set
|
#End Region ' Get & Set
|
||||||
|
|
||||||
@@ -100,7 +155,7 @@ Public Class ProjectVM
|
|||||||
Public ReadOnly Property LoadedCommand As ICommand
|
Public ReadOnly Property LoadedCommand As ICommand
|
||||||
Get
|
Get
|
||||||
If m_cmdLoaded Is Nothing Then
|
If m_cmdLoaded Is Nothing Then
|
||||||
m_cmdLoaded = New RelayCommand(AddressOf Loaded)
|
m_cmdLoaded = New RelayCommand(AddressOf Loaded)
|
||||||
End If
|
End If
|
||||||
Return m_cmdLoaded
|
Return m_cmdLoaded
|
||||||
End Get
|
End Get
|
||||||
@@ -129,42 +184,42 @@ Public Class ProjectVM
|
|||||||
Map.refProjectV.SetDbPanelVisibility()
|
Map.refProjectV.SetDbPanelVisibility()
|
||||||
End If
|
End If
|
||||||
' Inizializzo gestore travi e pareti
|
' Inizializzo gestore travi e pareti
|
||||||
If ( IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 Or ( IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 Then
|
If (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 Or (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 Then
|
||||||
Dim nFlag As Integer = GetPrivateProfileInt( S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
|
Dim nFlag As Integer = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
|
||||||
EgtInitBeamMgr( nFlag)
|
EgtInitBeamMgr(nFlag)
|
||||||
End If
|
End If
|
||||||
' Log di eventuali estensioni
|
' Log di eventuali estensioni
|
||||||
EgtOutLog( "Extensions :")
|
EgtOutLog("Extensions :")
|
||||||
Dim bExtensions As Boolean = False
|
Dim bExtensions As Boolean = False
|
||||||
If IniFile.IsActiveBeam() Then
|
If IniFile.IsActiveBeam() Then
|
||||||
bExtensions = True
|
bExtensions = True
|
||||||
Dim sVersion As String = "---"
|
Dim sVersion As String = "---"
|
||||||
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sVersion)
|
IniFile.GetSpecialLuaVersion(IniFile.m_sBeamDirPath, sVersion)
|
||||||
Dim sOut As String = "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
|
Dim sOut As String = "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
|
||||||
EgtOutLog( sOut)
|
EgtOutLog(sOut)
|
||||||
End If
|
End If
|
||||||
If IniFile.IsActiveWall() Then
|
If IniFile.IsActiveWall() Then
|
||||||
bExtensions = True
|
bExtensions = True
|
||||||
Dim sVersion As String = "---"
|
Dim sVersion As String = "---"
|
||||||
IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sVersion)
|
IniFile.GetSpecialLuaVersion(IniFile.m_sWallDirPath, sVersion)
|
||||||
Dim sOut As String = "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath
|
Dim sOut As String = "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath
|
||||||
EgtOutLog( sOut)
|
EgtOutLog(sOut)
|
||||||
End If
|
End If
|
||||||
If IniFile.IsActiveDoors() Then
|
If IniFile.IsActiveDoors() Then
|
||||||
bExtensions = True
|
bExtensions = True
|
||||||
Dim sVersion As String = "---"
|
Dim sVersion As String = "---"
|
||||||
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
|
IniFile.GetSpecialLuaVersion(IniFile.m_sDoorsDirPath, sVersion)
|
||||||
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||||
EgtOutLog( sOut)
|
EgtOutLog(sOut)
|
||||||
End If
|
End If
|
||||||
If IniFile.IsActiveGunStock() Then
|
If IniFile.IsActiveGunStock() Then
|
||||||
bExtensions = True
|
bExtensions = True
|
||||||
Dim sVersion As String = "---"
|
Dim sVersion As String = "---"
|
||||||
IniFile.GetSpecialLuaVersion( IniFile.m_sGunstockDirPath, sVersion)
|
IniFile.GetSpecialLuaVersion(IniFile.m_sGunstockDirPath, sVersion)
|
||||||
Dim sOut As String = "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath
|
Dim sOut As String = "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath
|
||||||
EgtOutLog( sOut)
|
EgtOutLog(sOut)
|
||||||
End If
|
End If
|
||||||
If Not bExtensions Then EgtOutLog( "---")
|
If Not bExtensions Then EgtOutLog("---")
|
||||||
' Apro progetto vuoto
|
' Apro progetto vuoto
|
||||||
Map.refTopCommandBarVM.NewCmd()
|
Map.refTopCommandBarVM.NewCmd()
|
||||||
' Seleziono la macchina impostata nel file ini
|
' Seleziono la macchina impostata nel file ini
|
||||||
@@ -270,8 +325,8 @@ Public Class ProjectVM
|
|||||||
If Not m_Controller.SetCommandLog(bLuaReg, m_sTempDir, sCmdLogFile) Then
|
If Not m_Controller.SetCommandLog(bLuaReg, m_sTempDir, sCmdLogFile) Then
|
||||||
EgtOutLog("Command log not started")
|
EgtOutLog("Command log not started")
|
||||||
If Environment.GetCommandLineArgs.Count() <= 1 Then
|
If Environment.GetCommandLineArgs.Count() <= 1 Then
|
||||||
MessageBox.Show("Command log not started", "EgtCAM5 Warning",
|
MessageBox.Show("Command log not started", "EgtCAM5 Warning",
|
||||||
MessageBoxButton.OK, MessageBoxImage.Warning)
|
MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
m_Controller.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
m_Controller.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
||||||
@@ -323,9 +378,9 @@ Public Class ProjectVM
|
|||||||
' lettura flag visualizzazione solo tavola in definizione lavorazioni
|
' lettura flag visualizzazione solo tavola in definizione lavorazioni
|
||||||
IniFile.m_bShowOnlyTable = (GetPrivateProfileInt(S_MACH, K_SHOWONLYTABLE, 1) <> 0)
|
IniFile.m_bShowOnlyTable = (GetPrivateProfileInt(S_MACH, K_SHOWONLYTABLE, 1) <> 0)
|
||||||
' ObjTree non selezionato
|
' ObjTree non selezionato
|
||||||
Map.refManageLayerExpanderVM.UpdateObjTreeOldId(GDB_ID.NULL)
|
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateObjTreeOldId(GDB_ID.NULL)
|
||||||
' nascondo input box
|
' nascondo input box
|
||||||
Map.refInputExpanderVM.ResetInputBox()
|
If Not IsNothing(Map.refInputExpanderVM) Then Map.refInputExpanderVM.ResetInputBox()
|
||||||
' Imposto stato filtro selezione
|
' Imposto stato filtro selezione
|
||||||
m_ProjectScene.GetObjFilterForSel(m_bSelZeroDim, m_bSelCurve, m_bSelSurf, m_bSelVolume, m_bSelExtra)
|
m_ProjectScene.GetObjFilterForSel(m_bSelZeroDim, m_bSelCurve, m_bSelSurf, m_bSelVolume, m_bSelExtra)
|
||||||
m_Controller.MouseSetObjFilterForSelect(m_bSelZeroDim, m_bSelCurve, m_bSelSurf, m_bSelVolume, m_bSelExtra)
|
m_Controller.MouseSetObjFilterForSelect(m_bSelZeroDim, m_bSelCurve, m_bSelSurf, m_bSelVolume, m_bSelExtra)
|
||||||
@@ -412,8 +467,8 @@ Public Class ProjectVM
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Esecuzione
|
' Esecuzione
|
||||||
bOk = ExecBeam(sFile, sMachine, nFlag, true)
|
bOk = ExecBeam(sFile, sMachine, nFlag, True)
|
||||||
' altrimenti pareti
|
' altrimenti pareti
|
||||||
Else
|
Else
|
||||||
' Verifica abilitazione elaborazione pareti
|
' Verifica abilitazione elaborazione pareti
|
||||||
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
||||||
@@ -421,18 +476,18 @@ Public Class ProjectVM
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Esecuzione
|
' Esecuzione
|
||||||
bOk = ExecWall(sFile, sMachine, nFlag, true)
|
bOk = ExecWall(sFile, sMachine, nFlag, True)
|
||||||
End If
|
End If
|
||||||
' Se richiesta uscita immediata
|
' Se richiesta uscita immediata
|
||||||
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se richiesta visualizzazione DB utensili
|
' Altrimenti se richiesta visualizzazione DB utensili
|
||||||
ElseIf nFlag = 11 And bOk Then
|
ElseIf nFlag = 11 And bOk Then
|
||||||
MyMachinePanelVM.ToolDb()
|
MyMachinePanelVM.ToolDb()
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
||||||
ElseIf nFlag = 12 And bOk Then
|
ElseIf nFlag = 12 And bOk Then
|
||||||
MyMachinePanelVM.MachDb()
|
MyMachinePanelVM.MachDb()
|
||||||
If bBeam Then
|
If bBeam Then
|
||||||
@@ -442,7 +497,7 @@ Public Class ProjectVM
|
|||||||
End If
|
End If
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se errore
|
' Altrimenti se errore
|
||||||
ElseIf Not bOk Then
|
ElseIf Not bOk Then
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
End If
|
End If
|
||||||
@@ -503,8 +558,8 @@ Public Class ProjectVM
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Esecuzione
|
' Esecuzione
|
||||||
bOk = ExecBeam(sFile, sMachine, nFlag, false)
|
bOk = ExecBeam(sFile, sMachine, nFlag, False)
|
||||||
' altrimenti pareti
|
' altrimenti pareti
|
||||||
ElseIf nBWType = 2 Then
|
ElseIf nBWType = 2 Then
|
||||||
' Verifica abilitazione elaborazione pareti
|
' Verifica abilitazione elaborazione pareti
|
||||||
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
||||||
@@ -512,13 +567,13 @@ Public Class ProjectVM
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Esecuzione
|
' Esecuzione
|
||||||
bOk = ExecWall(sFile, sMachine, nFlag, false)
|
bOk = ExecWall(sFile, sMachine, nFlag, False)
|
||||||
End If
|
End If
|
||||||
' Se richiesta uscita immediata
|
' Se richiesta uscita immediata
|
||||||
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
||||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||||
Map.refMainWindowVM.CloseApplicationCmd()
|
Map.refMainWindowVM.CloseApplicationCmd()
|
||||||
' Altrimenti se errore
|
' Altrimenti se errore
|
||||||
ElseIf Not bOk Then
|
ElseIf Not bOk Then
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
End If
|
End If
|
||||||
@@ -534,7 +589,7 @@ Public Class ProjectVM
|
|||||||
Select Case nFileType
|
Select Case nFileType
|
||||||
Case FT.NGE, FT.NFE
|
Case FT.NGE, FT.NFE
|
||||||
Return m_Controller.OpenProject(sFile, False)
|
Return m_Controller.OpenProject(sFile, False)
|
||||||
Case FT.DXF, FT.STL, FT._3MF, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
|
Case FT.DXF, FT.STL, FT._3MF, FT._3DM, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
|
||||||
Return m_Controller.ImportProject(sFile, False)
|
Return m_Controller.ImportProject(sFile, False)
|
||||||
Case FT.TSC, FT.LUA
|
Case FT.TSC, FT.LUA
|
||||||
Return m_Controller.Exec(sFile, False)
|
Return m_Controller.Exec(sFile, False)
|
||||||
@@ -660,7 +715,7 @@ Public Class ProjectVM
|
|||||||
Friend Sub InsertProject()
|
Friend Sub InsertProject()
|
||||||
' eseguo
|
' eseguo
|
||||||
Dim sDir As String = String.Empty
|
Dim sDir As String = String.Empty
|
||||||
GetPrivateProfileString(S_GENERAL, K_LASTNGEDIR, "", sDir)
|
GetPrivateProfileString(S_GENERAL, K_LASTNGEINSDIR, "", sDir)
|
||||||
m_Controller.InsertProject(sDir)
|
m_Controller.InsertProject(sDir)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -685,7 +740,7 @@ Public Class ProjectVM
|
|||||||
GetPrivateProfileString(S_GENERAL, K_LASTLUADIR, "", sDir)
|
GetPrivateProfileString(S_GENERAL, K_LASTLUADIR, "", sDir)
|
||||||
m_Controller.Exec(sDir)
|
m_Controller.Exec(sDir)
|
||||||
Else
|
Else
|
||||||
If bRaiseEvent Then RaiseEvent OnPreControllerExec( sFilePath)
|
If bRaiseEvent Then RaiseEvent OnPreControllerExec(sFilePath)
|
||||||
m_Controller.Exec(sFilePath, False)
|
m_Controller.Exec(sFilePath, False)
|
||||||
If bRaiseEvent Then RaiseEvent OnPostControllerExec()
|
If bRaiseEvent Then RaiseEvent OnPostControllerExec()
|
||||||
End If
|
End If
|
||||||
@@ -809,7 +864,7 @@ Public Class ProjectVM
|
|||||||
' Copia dei file terminata con successo ...
|
' Copia dei file terminata con successo ...
|
||||||
Dim sMsg As String = EgtMsg(8216) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
|
Dim sMsg As String = EgtMsg(8216) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
|
||||||
MessageBox.Show(sMsg, EgtMsg(8214), MessageBoxButton.OK, MessageBoxImage.Information)
|
MessageBox.Show(sMsg, EgtMsg(8214), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
else
|
Else
|
||||||
' Errore nella copia dei file ...
|
' Errore nella copia dei file ...
|
||||||
Dim sMsg As String = EgtMsg(8255) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
|
Dim sMsg As String = EgtMsg(8255) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
|
||||||
MessageBox.Show(sMsg, EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
|
MessageBox.Show(sMsg, EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
@@ -995,7 +1050,7 @@ Public Class ProjectVM
|
|||||||
Private m_nIdToSel As Integer = GDB_ID.NULL
|
Private m_nIdToSel As Integer = GDB_ID.NULL
|
||||||
Private m_SelType As DispositionUtility.SelType = DispositionUtility.SelType.NULL
|
Private m_SelType As DispositionUtility.SelType = DispositionUtility.SelType.NULL
|
||||||
Private m_nIdToDesel As Integer = GDB_ID.NULL
|
Private m_nIdToDesel As Integer = GDB_ID.NULL
|
||||||
'Private m_nFirstRawPartId As Integer = GDB_ID.NULL
|
Private m_nSelOpeId As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
' Dati per Drag
|
' Dati per Drag
|
||||||
Private m_nRestRadius As Integer = 3
|
Private m_nRestRadius As Integer = 3
|
||||||
@@ -1005,14 +1060,18 @@ Public Class ProjectVM
|
|||||||
Private m_locPrev As System.Drawing.Point
|
Private m_locPrev As System.Drawing.Point
|
||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
|
|
||||||
Private Sub OnMouseDown(ByVal sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_ProjectScene.OnMouseDownScene
|
Private Sub OnStartingMouseDown(ByVal sender As Object, e As System.Windows.Forms.MouseEventArgs, ByRef bContinue As Boolean) Handles m_ProjectScene.OnStartingMouseDownScene
|
||||||
' Se in modalità Draw accetto tutto
|
' Se in modalità Draw accetto tutto
|
||||||
If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then Return
|
If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then Return
|
||||||
' Sono in modalità Machining
|
' Sono in modalità Machining
|
||||||
' se non posso selezionare nulla o in lavorazione esco
|
' se non posso selezionare nulla o in lavorazione esco
|
||||||
If m_SceneSelType = SceneSelTypeOpt.NULL OrElse m_SceneSelType = SceneSelTypeOpt.MACHINING Then Return
|
If m_SceneSelType = SceneSelTypeOpt.NULL OrElse
|
||||||
|
m_SceneSelType = SceneSelTypeOpt.MACHINING OrElse
|
||||||
|
m_SceneSelType = SceneSelTypeOpt.MACHPATH Then Return
|
||||||
' Si può selezionare solo con il tasto sinistro
|
' Si può selezionare solo con il tasto sinistro
|
||||||
If e.Button <> Forms.MouseButtons.Left Then Return
|
If e.Button <> Forms.MouseButtons.Left Then Return
|
||||||
|
' Si Sostituisce completamente la gestione dell'evento chiamante
|
||||||
|
bContinue = False
|
||||||
' Dati per drag
|
' Dati per drag
|
||||||
Dim TableRef As Point3d
|
Dim TableRef As Point3d
|
||||||
EgtGetTableRef(1, TableRef)
|
EgtGetTableRef(1, TableRef)
|
||||||
@@ -1130,10 +1189,10 @@ Public Class ProjectVM
|
|||||||
' Se eseguito drag
|
' Se eseguito drag
|
||||||
If Not m_bDragToStart Then
|
If Not m_bDragToStart Then
|
||||||
' Basta reset alla fine
|
' Basta reset alla fine
|
||||||
' se sono in modalità movimento barre
|
' se sono in modalità movimento barre
|
||||||
ElseIf m_SelType = DispositionUtility.SelType.BARS Then
|
ElseIf m_SelType = DispositionUtility.SelType.BARS Then
|
||||||
' Basta reset alla fine
|
' Basta reset alla fine
|
||||||
' Se selezione da eseguire
|
' Se selezione da eseguire
|
||||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||||
' se sono in modalità sottopezzi
|
' se sono in modalità sottopezzi
|
||||||
If m_SceneSelType = SceneSelTypeOpt.FIXTURE Then
|
If m_SceneSelType = SceneSelTypeOpt.FIXTURE Then
|
||||||
@@ -1145,7 +1204,7 @@ Public Class ProjectVM
|
|||||||
m_nIdToDesel = GDB_ID.NULL
|
m_nIdToDesel = GDB_ID.NULL
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
Return
|
Return
|
||||||
' altrimenti verifico il tipo del primo oggetto selezionato
|
' altrimenti verifico il tipo del primo oggetto selezionato
|
||||||
Else
|
Else
|
||||||
Dim nFirstSelId As Integer = EgtGetFirstSelectedObj()
|
Dim nFirstSelId As Integer = EgtGetFirstSelectedObj()
|
||||||
' se è un riferimento resetto lo stato di selezione ed esco
|
' se è un riferimento resetto lo stato di selezione ed esco
|
||||||
@@ -1171,7 +1230,7 @@ Public Class ProjectVM
|
|||||||
End If
|
End If
|
||||||
' Eseguo la selezione
|
' Eseguo la selezione
|
||||||
EgtSelectObj(m_nIdToSel)
|
EgtSelectObj(m_nIdToSel)
|
||||||
' Se deselezione da eseguire
|
' Se deselezione da eseguire
|
||||||
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
||||||
' se l'elemento da deselezionare è marcato
|
' se l'elemento da deselezionare è marcato
|
||||||
Dim bMarked As Boolean = False
|
Dim bMarked As Boolean = False
|
||||||
@@ -1204,12 +1263,16 @@ Public Class ProjectVM
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnStartingMouseSelectingObj(ByVal sender As Object) Handles m_ProjectScene.OnStartingMouseSelectingObj
|
||||||
|
m_nSelOpeId = GDB_ID.NULL
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub OnMouseSelectingObj(ByVal sender As Object, ByVal nId As Integer, ByRef bOk As Boolean) Handles m_ProjectScene.OnMouseSelectingObj
|
Private Sub OnMouseSelectingObj(ByVal sender As Object, ByVal nId As Integer, ByRef bOk As Boolean) Handles m_ProjectScene.OnMouseSelectingObj
|
||||||
' Se oggetto già rifiutato non faccio le verifiche
|
' Se oggetto già rifiutato non faccio le verifiche
|
||||||
If Not bOk Then Return
|
If Not bOk Then Return
|
||||||
' Impedisco la selezione di oggetti in modo Locked o Hidden
|
' Impedisco la selezione di oggetti in modo Locked o Hidden
|
||||||
Dim nMode As Integer = GDB_MD.STD
|
Dim nMode As Integer = GDB_MD.STD
|
||||||
EgtGetCalcMode( nId, nMode)
|
EgtGetCalcMode(nId, nMode)
|
||||||
If nMode <> GDB_MD.STD Then
|
If nMode <> GDB_MD.STD Then
|
||||||
bOk = False
|
bOk = False
|
||||||
Return
|
Return
|
||||||
@@ -1226,7 +1289,9 @@ Public Class ProjectVM
|
|||||||
bOk = False
|
bOk = False
|
||||||
End If
|
End If
|
||||||
Case SceneSelTypeOpt.MACHPATH
|
Case SceneSelTypeOpt.MACHPATH
|
||||||
bOk = Map.refOperationsListExpanderVM.IsInOperationList(nId)
|
Dim nCurrOpeId As Integer = Map.refOperationsListExpanderVM.GetOperationId(nId)
|
||||||
|
bOk = (nCurrOpeId <> GDB_ID.NULL AndAlso nCurrOpeId <> m_nSelOpeId)
|
||||||
|
If m_nSelOpeId = GDB_ID.NULL Then m_nSelOpeId = nCurrOpeId
|
||||||
Case Else
|
Case Else
|
||||||
bOk = False
|
bOk = False
|
||||||
End Select
|
End Select
|
||||||
@@ -1258,15 +1323,15 @@ Public Class ProjectVM
|
|||||||
Private Sub OnMousePointFromSelection(ByVal sender As Object, ByVal nId As Integer, ByVal PtP As Point3d, ByVal nAux As Integer) Handles m_ProjectScene.OnMousePointFromSelection
|
Private Sub OnMousePointFromSelection(ByVal sender As Object, ByVal nId As Integer, ByVal PtP As Point3d, ByVal nAux As Integer) Handles m_ProjectScene.OnMousePointFromSelection
|
||||||
m_Controller.SetPointFromSelection(nId, PtP, nAux)
|
m_Controller.SetPointFromSelection(nId, PtP, nAux)
|
||||||
If IniFile.m_ProjectMode = ProjectModeOpt.MACHINING And m_SceneSelType = SceneSelTypeOpt.MACHINING And
|
If 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
|
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
|
||||||
If EgtIsSelectedObj( nId) Then
|
If EgtIsSelectedObj(nId) Then
|
||||||
Dim nFac As Integer = If( EgtGetType( nId) = GDB_TY.SRF_MESH, Math.Max( EgtSurfTmFacetFromTria( nId, nAux), 0), nAux)
|
Dim nFac As Integer = If(EgtGetType(nId) = GDB_TY.SRF_MESH, Math.Max(EgtSurfTmFacetFromTria(nId, nAux), 0), nAux)
|
||||||
If Not SelData.FindIdSub( nId, nFac) Then
|
If Not SelData.FindIdSub(nId, nFac) Then
|
||||||
SelData.AddIdSub(nId, nFac)
|
SelData.AddIdSub(nId, nFac)
|
||||||
Else
|
Else
|
||||||
SelData.RemoveIdSub(nId, nFac)
|
SelData.RemoveIdSub(nId, nFac)
|
||||||
If Not SelData.FindId( nId) Then
|
If Not SelData.FindId(nId) Then
|
||||||
EgtDeselectObj( nId)
|
EgtDeselectObj(nId)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -1300,29 +1365,29 @@ Public Class ProjectVM
|
|||||||
Analyze.ClearAnalyzeGroup()
|
Analyze.ClearAnalyzeGroup()
|
||||||
Map.refStatusBarVM.NotifyStatusOutput("")
|
Map.refStatusBarVM.NotifyStatusOutput("")
|
||||||
' Se curva composita, visualizzo numerazione curve semplici
|
' Se curva composita, visualizzo numerazione curve semplici
|
||||||
If EgtGetType( nId) = GDB_TY.CRV_COMPO Then
|
If EgtGetType(nId) = GDB_TY.CRV_COMPO Then
|
||||||
' Visualizzo numerazione
|
' Visualizzo numerazione
|
||||||
Analyze.CreateAnalyzeGroup()
|
Analyze.CreateAnalyzeGroup()
|
||||||
Analyze.CreateCurveCompoPntNbrs( nId)
|
Analyze.CreateCurveCompoPntNbrs(nId)
|
||||||
' Se superficie trimesh, visualizzo dati faccetta toccata
|
' Se superficie trimesh, visualizzo dati faccetta toccata
|
||||||
ElseIf EgtGetType( nId) = GDB_TY.SRF_MESH Then
|
ElseIf EgtGetType(nId) = GDB_TY.SRF_MESH Then
|
||||||
Dim nFac As Integer = EgtSurfTmFacetFromTria( nId, nSub)
|
Dim nFac As Integer = EgtSurfTmFacetFromTria(nId, nSub)
|
||||||
If nFac <> -1 Then
|
If nFac <> -1 Then
|
||||||
' Visualizzo la normale e il contorno della faccia
|
' Visualizzo la normale e il contorno della faccia
|
||||||
Analyze.CreateAnalyzeGroup()
|
Analyze.CreateAnalyzeGroup()
|
||||||
Analyze.CreateNormal( nId, nFac)
|
Analyze.CreateNormal(nId, nFac)
|
||||||
Analyze.CreateFacetLoops( nId, nFac)
|
Analyze.CreateFacetLoops(nId, nFac)
|
||||||
' Recupero i dati (in globale o griglia a seconda della impostazione)
|
' Recupero i dati (in globale o griglia a seconda della impostazione)
|
||||||
Dim ptC As Point3d
|
Dim ptC As Point3d
|
||||||
Dim vtN As Vector3d
|
Dim vtN As Vector3d
|
||||||
EgtSurfTmFacetCenter( nId, nFac, If( m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
|
EgtSurfTmFacetCenter(nId, nFac, If(m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
|
||||||
Dim dLen, dPhi, dTheta As Double
|
Dim dLen, dPhi, dTheta As Double
|
||||||
vtN.ToSpherical( dLen, dTheta, dPhi)
|
vtN.ToSpherical(dLen, dTheta, dPhi)
|
||||||
' Emetto info sulla barra di stato
|
' Emetto info sulla barra di stato
|
||||||
Dim sOut As String = "Facet " + nFac.ToString() +
|
Dim sOut As String = "Facet " + nFac.ToString() +
|
||||||
" : C(" + LenToString( ptC.x, 3) + "," + LenToString( ptC.y, 3) + "," + LenToString( ptC.z, 3) + ")" +
|
" : 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) + ")" +
|
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
|
||||||
" / φ=" + DoubleToString( dPhi, 2) + " θ=" + DoubleToString( dTheta, 2)
|
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
||||||
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1339,19 +1404,19 @@ Public Class ProjectVM
|
|||||||
If e.KeyData = System.Windows.Forms.Keys.Delete AndAlso Map.refTopCommandBarVM.DrawIsChecked Then
|
If e.KeyData = System.Windows.Forms.Keys.Delete AndAlso Map.refTopCommandBarVM.DrawIsChecked Then
|
||||||
m_Controller.SetLastInteger(GDB_ID.SEL)
|
m_Controller.SetLastInteger(GDB_ID.SEL)
|
||||||
m_Controller.ExecuteCommand(Controller.CMD.DELETE)
|
m_Controller.ExecuteCommand(Controller.CMD.DELETE)
|
||||||
' Con END eseguo deselezione di tutto
|
' Con END eseguo deselezione di tutto
|
||||||
ElseIf e.KeyData = System.Windows.Forms.Keys.End Then
|
ElseIf e.KeyData = System.Windows.Forms.Keys.End Then
|
||||||
m_Controller.MouseDeselectedAll( True)
|
m_Controller.MouseDeselectedAll(True)
|
||||||
' Con SPAZIO ripeto l'ultimo comando
|
' Con SPAZIO ripeto l'ultimo comando
|
||||||
ElseIf e.KeyData = System.Windows.Forms.Keys.Space Then
|
ElseIf e.KeyData = System.Windows.Forms.Keys.Space Then
|
||||||
m_Controller.RepeatLastCommand()
|
m_Controller.RepeatLastCommand()
|
||||||
' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
|
' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
|
||||||
ElseIf e.KeyData = System.Windows.Forms.Keys.A AndAlso m_Controller.GetContinue() Then
|
ElseIf e.KeyData = System.Windows.Forms.Keys.A AndAlso m_Controller.GetContinue() Then
|
||||||
m_Controller.ContinueArcPDP()
|
m_Controller.ContinueArcPDP()
|
||||||
' Con 'L' e in modalità continuazione, forzo il passaggio a retta
|
' Con 'L' e in modalità continuazione, forzo il passaggio a retta
|
||||||
ElseIf e.KeyData = System.Windows.Forms.Keys.L AndAlso m_Controller.GetContinue() Then
|
ElseIf e.KeyData = System.Windows.Forms.Keys.L AndAlso m_Controller.GetContinue() Then
|
||||||
m_Controller.ContinueLine2P()
|
m_Controller.ContinueLine2P()
|
||||||
' Con 'V' cambio lo stato del check
|
' Con 'V' cambio lo stato del check
|
||||||
ElseIf e.KeyData = System.Windows.Forms.Keys.V Then
|
ElseIf e.KeyData = System.Windows.Forms.Keys.V Then
|
||||||
Map.refInputExpanderVM.ChangeInputBoxCheck()
|
Map.refInputExpanderVM.ChangeInputBoxCheck()
|
||||||
End If
|
End If
|
||||||
@@ -1377,7 +1442,7 @@ Public Class ProjectVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnOpeningProject(ByVal sender As Object) Handles m_Controller.OnOpeningProject
|
Private Sub OnOpeningProject(ByVal sender As Object) Handles m_Controller.OnOpeningProject
|
||||||
Map.refManageLayerExpanderVM.ClearObjTree()
|
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.ClearObjTree()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnOpenProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnOpenProject
|
Private Sub OnOpenProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnOpenProject
|
||||||
@@ -1388,7 +1453,7 @@ Public Class ProjectVM
|
|||||||
Else
|
Else
|
||||||
IniFile.m_MruFiles.Remove(sFile)
|
IniFile.m_MruFiles.Remove(sFile)
|
||||||
Dim sMsg As String
|
Dim sMsg As String
|
||||||
If My.Computer.FileSystem.FileExists( sFile) Then
|
If My.Computer.FileSystem.FileExists(sFile) Then
|
||||||
sMsg = EgtMsg(10003) & " '" & sFile & "'" 'Error opening file
|
sMsg = EgtMsg(10003) & " '" & sFile & "'" 'Error opening file
|
||||||
Else
|
Else
|
||||||
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
|
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
|
||||||
@@ -1399,6 +1464,7 @@ Public Class ProjectVM
|
|||||||
|
|
||||||
Private Sub OnInsertedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnInsertedProject
|
Private Sub OnInsertedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnInsertedProject
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
|
WritePrivateProfileString(S_GENERAL, K_LASTNGEINSDIR, Path.GetDirectoryName(sFile))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnSavingProject(ByVal sender As Object, ByVal sFile As String) Handles m_Controller.OnSavingProject
|
Private Sub OnSavingProject(ByVal sender As Object, ByVal sFile As String) Handles m_Controller.OnSavingProject
|
||||||
@@ -1489,7 +1555,7 @@ Public Class ProjectVM
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If m_bScriptInMru Then
|
If m_bScriptInMru Then
|
||||||
If File.Exists( sFile) Then
|
If File.Exists(sFile) Then
|
||||||
IniFile.m_MruScripts.Add(sFile)
|
IniFile.m_MruScripts.Add(sFile)
|
||||||
WritePrivateProfileString(S_GENERAL, K_LASTLUADIR, Path.GetDirectoryName(sFile))
|
WritePrivateProfileString(S_GENERAL, K_LASTLUADIR, Path.GetDirectoryName(sFile))
|
||||||
Else
|
Else
|
||||||
@@ -1524,7 +1590,7 @@ Public Class ProjectVM
|
|||||||
|
|
||||||
Private Sub OnUpdateUI(ByVal sender As Object, ByVal bReloadUI As Boolean) Handles m_Controller.UpdateUI
|
Private Sub OnUpdateUI(ByVal sender As Object, ByVal bReloadUI As Boolean) Handles m_Controller.UpdateUI
|
||||||
' pulisco input e relativi messaggi
|
' pulisco input e relativi messaggi
|
||||||
Map.refInputExpanderVM.ResetInputBox()
|
If Not IsNothing(Map.refInputExpanderVM) Then Map.refInputExpanderVM.ResetInputBox()
|
||||||
If m_Controller.GetContinue() Then
|
If m_Controller.GetContinue() Then
|
||||||
Map.refStatusBarVM.NotifyStatusOutput((EgtMsg(399))) ' Continue : 'L' with line, 'A' with arc
|
Map.refStatusBarVM.NotifyStatusOutput((EgtMsg(399))) ' Continue : 'L' with line, 'A' with arc
|
||||||
Else
|
Else
|
||||||
@@ -1534,9 +1600,9 @@ Public Class ProjectVM
|
|||||||
EmitTitle()
|
EmitTitle()
|
||||||
EmitCurrPartLayer()
|
EmitCurrPartLayer()
|
||||||
If bReloadUI Then
|
If bReloadUI Then
|
||||||
Map.refManageLayerExpanderVM.LoadObjTree()
|
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.LoadObjTree()
|
||||||
Else
|
Else
|
||||||
Map.refManageLayerExpanderVM.UpdateObjTree()
|
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateObjTree()
|
||||||
End If
|
End If
|
||||||
' aggiorno macchina corrente
|
' aggiorno macchina corrente
|
||||||
Map.refMachinePanelVM.UpdateCurrentMachine()
|
Map.refMachinePanelVM.UpdateCurrentMachine()
|
||||||
@@ -1611,9 +1677,9 @@ Public Class ProjectVM
|
|||||||
EgtGetCalcColor(nCurrLayer, colObj)
|
EgtGetCalcColor(nCurrLayer, colObj)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Map.refManageLayerExpanderVM.UpdateHeaderName(sText)
|
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateHeaderName(sText)
|
||||||
colObj.A = 100
|
colObj.A = 100
|
||||||
Map.refManageLayerExpanderVM.UpdateHeaderColor(colObj)
|
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateHeaderColor(colObj)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region 'DrawOptionPanel
|
#End Region 'DrawOptionPanel
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
@@ -0,0 +1,7 @@
|
|||||||
|
<Grid x:Class="RightTrayV"
|
||||||
|
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">
|
||||||
|
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class RightTrayV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<Grid x:Class="SceneContentControlV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
|
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
||||||
|
<ContentControl Content="{Binding ProjectSceneHost}"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class SceneContentControlV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<UserControl x:Class="Printing3DPanelV"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
||||||
|
|
||||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
|
||||||
<ItemsControl.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal"/>
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ItemsControl.ItemsPanel>
|
|
||||||
<ItemsControl.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
|
||||||
<Image Source="{Binding ImagePath}"/>
|
|
||||||
</Button>
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Public Class Printing3DPanelV
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
Imports System.IO
|
|
||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class Printing3DPanelVM
|
|
||||||
|
|
||||||
Private m_ButtonList As New List(Of ButtonItem)
|
|
||||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
|
||||||
Get
|
|
||||||
Return m_ButtonList
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Sub New()
|
|
||||||
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
|
||||||
If IniFile.IsActivePrinting3d() Then
|
|
||||||
' Inizializzo i bottoni leggendoli da file ini
|
|
||||||
Dim BtnIndex As Integer = 1
|
|
||||||
Dim CurrBtn As ButtonItem = Nothing
|
|
||||||
While GetPrivateProfileButton(S_PRINTING3D, K_BUTTON & BtnIndex, IniFile.m_sPrinting3dDirPath, CurrBtn)
|
|
||||||
m_ButtonList.Add(CurrBtn)
|
|
||||||
BtnIndex += 1
|
|
||||||
End While
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
<UserControl x:Class="BeamPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="BeamPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
Visibility="{Binding BeamPanel_Visibility}">
|
||||||
|
|
||||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
@@ -17,4 +19,4 @@
|
|||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class BeamPanelVM
|
Public Class BeamPanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
Friend Const BEAM_PROCESS As String = "Beam\Process.lua"
|
Friend Const BEAM_PROCESS As String = "Beam\Process.lua"
|
||||||
Friend Const BEAM_MACHININGS As String = "BeamMachinings"
|
Friend Const BEAM_MACHININGS As String = "BeamMachinings"
|
||||||
@@ -13,7 +14,20 @@ Public Class BeamPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_BeamPanel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property BeamPanel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_BeamPanel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetBeamPanelVisibility(bValue As Boolean)
|
||||||
|
m_BeamPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(BeamPanel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefBeamPanelVM(Me)
|
||||||
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
||||||
If IniFile.IsActiveBeam() Then
|
If IniFile.IsActiveBeam() Then
|
||||||
' Inizializzo i bottoni leggendoli da file ini
|
' Inizializzo i bottoni leggendoli da file ini
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<UserControl x:Class="BeamWallPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="BeamWallPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
Visibility="{Binding BeamWallPanel_Visibility}">
|
||||||
|
|
||||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
@@ -17,4 +19,4 @@
|
|||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class BeamWallPanelVM
|
Public Class BeamWallPanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
Private m_ButtonList As New List(Of ButtonItem)
|
Private m_ButtonList As New List(Of ButtonItem)
|
||||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||||
@@ -10,14 +11,27 @@ Public Class BeamWallPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_BeamWallPanel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property BeamWallPanel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_BeamWallPanel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetBeamWallPanelVisibility(bValue As Boolean)
|
||||||
|
m_BeamWallPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(BeamWallPanel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefBeamWallPanelVM(Me)
|
||||||
' Se attivo Beam o Wall, inizializzo i bottoni leggendoli da file ini
|
' Se attivo Beam o Wall, inizializzo i bottoni leggendoli da file ini
|
||||||
If IniFile.IsActiveBeam() Or IniFile.IsActiveWall() Then
|
If IniFile.IsActiveBeam() Or IniFile.IsActiveWall() Then
|
||||||
GetPrivateProfileString( S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath)
|
GetPrivateProfileString(S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath)
|
||||||
' Inizializzo i bottoni leggendoli da file ini
|
' Inizializzo i bottoni leggendoli da file ini
|
||||||
Dim BtnIndex As Integer = 1
|
Dim BtnIndex As Integer = 1
|
||||||
Dim CurrBtn As ButtonItem = Nothing
|
Dim CurrBtn As ButtonItem = Nothing
|
||||||
While GetPrivateProfileButton( S_BEAMWALL, K_BEAMWALLBUTTON & BtnIndex, IniFile.m_sBeamWallDirPath, CurrBtn)
|
While GetPrivateProfileButton(S_BEAMWALL, K_BEAMWALLBUTTON & BtnIndex, IniFile.m_sBeamWallDirPath, CurrBtn)
|
||||||
m_ButtonList.Add(CurrBtn)
|
m_ButtonList.Add(CurrBtn)
|
||||||
BtnIndex += 1
|
BtnIndex += 1
|
||||||
End While
|
End While
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<UserControl x:Class="WallPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="WallPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
Visibility="{Binding WallPanel_Visibility}">
|
||||||
|
|
||||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
@@ -17,4 +19,4 @@
|
|||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class WallPanelVM
|
Public Class WallPanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
Friend Const WALL_MACHININGS As String = "WallMachinings"
|
Friend Const WALL_MACHININGS As String = "WallMachinings"
|
||||||
|
|
||||||
@@ -12,7 +13,20 @@ Public Class WallPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_WallPanel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property WallPanel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_WallPanel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetWallPanelVisibility(bValue As Boolean)
|
||||||
|
m_WallPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(WallPanel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefWallPanelVM(Me)
|
||||||
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
||||||
If IniFile.IsActiveWall() Then
|
If IniFile.IsActiveWall() Then
|
||||||
' Inizializzo i bottoni leggendoli da file ini
|
' Inizializzo i bottoni leggendoli da file ini
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<UserControl x:Class="DoorPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="DoorPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
Visibility="{Binding DoorPanel_Visibility}">
|
||||||
|
|
||||||
<!--Barra superiore dei comandi-->
|
<!--Barra superiore dei comandi-->
|
||||||
<StackPanel Background="Transparent" Orientation="Horizontal">
|
<StackPanel Background="Transparent" Orientation="Horizontal">
|
||||||
@@ -18,4 +20,4 @@
|
|||||||
IsEnabled="{Binding MTableDb_IsEnabled}"/>
|
IsEnabled="{Binding MTableDb_IsEnabled}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -31,6 +31,17 @@ Public Class DoorPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_DoorPanel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property DoorPanel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_DoorPanel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetDoorPanelVisibility(bValue As Boolean)
|
||||||
|
m_DoorPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
OnPropertyChanged(NameOf(DoorPanel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdDoors As ICommand
|
Private m_cmdDoors As ICommand
|
||||||
Private m_cmdDMach As ICommand
|
Private m_cmdDMach As ICommand
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<UserControl x:Class="GunStockPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="GunStockPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
Visibility="{Binding GunStockPanel_Visibility}">
|
||||||
|
|
||||||
<StackPanel Background="Transparent" Orientation="Horizontal">
|
<StackPanel Background="Transparent" Orientation="Horizontal">
|
||||||
<Button Command="{Binding NewGunStockCommand}" Style="{StaticResource GridViewPanelButton}"
|
<Button Command="{Binding NewGunStockCommand}" Style="{StaticResource GridViewPanelButton}"
|
||||||
@@ -27,4 +29,4 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -16,6 +16,25 @@ Public Class GunStockPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CopyGunStock_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Dim sFunction As String = String.Empty
|
||||||
|
GetPrivateProfileString(S_GUNSTOCK, K_COPYFUNCTION, "", sFunction)
|
||||||
|
Return If(String.IsNullOrWhiteSpace(sFunction), Visibility.Collapsed, Visibility.Visible)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_GunStockPanel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property GunStockPanel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_GunStockPanel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetGunStockPanelVisibility(bValue As Boolean)
|
||||||
|
m_GunStockPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
OnPropertyChanged(NameOf(GunStockPanel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property NewGunStockMsg As String
|
Public ReadOnly Property NewGunStockMsg As String
|
||||||
@@ -56,13 +75,6 @@ Public Class GunStockPanelVM
|
|||||||
|
|
||||||
#End Region ' ToolTip
|
#End Region ' ToolTip
|
||||||
|
|
||||||
Public ReadOnly Property CopyGunStock_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Dim sFunction As String = String.Empty
|
|
||||||
GetPrivateProfileString(S_GUNSTOCK, K_COPYFUNCTION, "", sFunction)
|
|
||||||
Return If( String.IsNullOrWhiteSpace( sFunction), Visibility.Collapsed, Visibility.Visible)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
@@ -72,6 +84,10 @@ Public Class GunStockPanelVM
|
|||||||
Private Shared m_cmdOpenMruNewGunStock As ICommand
|
Private Shared m_cmdOpenMruNewGunStock As ICommand
|
||||||
Private Shared m_cmdOpenMruModifyGunStock As ICommand
|
Private Shared m_cmdOpenMruModifyGunStock As ICommand
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
' Creo riferimento a questa classe in Map
|
||||||
|
Map.SetRefGunStockPanelVM(Me)
|
||||||
|
End Sub
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "NewGunStockCommand"
|
#Region "NewGunStockCommand"
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<UserControl x:Class="SpecialPanelV"
|
<EgtFloating:EgtFloatingPanel x:Class="SpecialPanelV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
|
Visibility="{Binding SpecialPanel_Visibility}">
|
||||||
|
|
||||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||||
<ItemsControl.ItemsPanel>
|
<ItemsControl.ItemsPanel>
|
||||||
@@ -18,4 +20,4 @@
|
|||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
</UserControl>
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class SpecialPanelVM
|
Public Class SpecialPanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
Private m_ButtonList As New List(Of ButtonItem)
|
Private m_ButtonList As New List(Of ButtonItem)
|
||||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||||
@@ -10,6 +11,17 @@ Public Class SpecialPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_SpecialPanel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property SpecialPanel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_SpecialPanel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetSpecialPanelVisibility(bValue As Boolean)
|
||||||
|
m_SpecialPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(SpecialPanel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
' Creo riferimento a questa classe in Map
|
' Creo riferimento a questa classe in Map
|
||||||
Map.SetRefSpecialPanelVM(Me)
|
Map.SetRefSpecialPanelVM(Me)
|
||||||
@@ -31,12 +43,14 @@ Public Class SpecialPanelVM
|
|||||||
For Each BtnItem In m_ButtonList
|
For Each BtnItem In m_ButtonList
|
||||||
' verifico il valore di nDrawMachOrBoth del bottone e IsMachMode per rendere visibile o meno il bottone in ButtonList
|
' verifico il valore di nDrawMachOrBoth del bottone e IsMachMode per rendere visibile o meno il bottone in ButtonList
|
||||||
Select Case BtnItem.nDrawMachOrBoth
|
Select Case BtnItem.nDrawMachOrBoth
|
||||||
Case 0 ' bottone visibile sia in Draw che in Machining
|
Case 0 ' bottone nascosto
|
||||||
BtnItem.m_Btn_Visibility = Visibility.Visible
|
BtnItem.m_Btn_Visibility = Visibility.Collapsed
|
||||||
Case 1 ' bottone visibile solo in Draw
|
Case 1 ' bottone visibile solo in Draw
|
||||||
BtnItem.m_Btn_Visibility = If(Not IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
BtnItem.m_Btn_Visibility = If(Not IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
||||||
Case 2 ' bottone visibile solo in Machining
|
Case 2 ' bottone visibile solo in Machining
|
||||||
BtnItem.m_Btn_Visibility = If(IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
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
|
End Select
|
||||||
' se anche uno solo è visibile anche lo SpecialPanel dovrà esserlo
|
' se anche uno solo è visibile anche lo SpecialPanel dovrà esserlo
|
||||||
If BtnItem.Btn_Visibility = Visibility.Visible Then bSpecialPanel_Visible = True
|
If BtnItem.Btn_Visibility = Visibility.Visible Then bSpecialPanel_Visible = True
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
|
|
||||||
<!--Barra superiore dei comandi-->
|
<!--Barra superiore dei comandi-->
|
||||||
|
<UniformGrid Rows="1"
|
||||||
|
Visibility="{Binding ProjectManager_Visibility}">
|
||||||
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}"
|
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}"
|
||||||
IsEnabled="{Binding DrawIsChecked}">
|
IsEnabled="{Binding DrawIsChecked}">
|
||||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding OpenCommand}" ToolTip="{Binding OpenToolTip}"
|
<Button Command="{Binding OpenCommand}" ToolTip="{Binding OpenToolTip}"
|
||||||
ContextMenuService.Placement="Bottom" IsEnabled="{Binding DrawIsChecked}"
|
ContextMenuService.Placement="Bottom" IsEnabled="{Binding DrawIsChecked}"
|
||||||
Tag="{Binding}">
|
Tag="{Binding}">
|
||||||
<Button.ContextMenu>
|
<Button.ContextMenu>
|
||||||
<ContextMenu ItemsSource="{Binding MruFileNames}">
|
<ContextMenu ItemsSource="{Binding MruFileNames}">
|
||||||
<ContextMenu.Resources>
|
<ContextMenu.Resources>
|
||||||
@@ -33,35 +35,36 @@
|
|||||||
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform"/>
|
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding InsertCommand}" ToolTip="{Binding InsertToolTip}"
|
<Button Command="{Binding InsertCommand}" ToolTip="{Binding InsertToolTip}"
|
||||||
IsEnabled="{Binding DrawIsChecked}">
|
IsEnabled="{Binding DrawIsChecked}">
|
||||||
<Image Source="/Resources/TopCommandBar/Insert.png" Stretch="Uniform"/>
|
<Image Source="/Resources/TopCommandBar/Insert.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding ImportCommand}" ToolTip="{Binding ImportToolTip}"
|
<Button Command="{Binding ImportCommand}" ToolTip="{Binding ImportToolTip}"
|
||||||
IsEnabled="{Binding DrawIsChecked}">
|
IsEnabled="{Binding DrawIsChecked}">
|
||||||
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
|
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}"
|
<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}"
|
||||||
IsEnabled="{Binding DrawIsChecked}">
|
IsEnabled="{Binding DrawIsChecked}">
|
||||||
<Image Source="/Resources/TopCommandBar/Export.png" Stretch="Uniform"/>
|
<Image Source="/Resources/TopCommandBar/Export.png" Stretch="Uniform"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding PrintCommand}" ToolTip="{Binding PrintToolTip}"
|
<Button Command="{Binding PrintCommand}" ToolTip="{Binding PrintToolTip}"
|
||||||
IsEnabled="True">
|
IsEnabled="True">
|
||||||
<Image Source="/Resources/TopCommandBar/Print.png" Height="22" />
|
<Image Source="/Resources/TopCommandBar/Print.png" Height="22" />
|
||||||
</Button>
|
|
||||||
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}"
|
|
||||||
IsEnabled="{Binding SaveIsEnabled}">
|
|
||||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
|
||||||
</Button>
|
|
||||||
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}"
|
|
||||||
IsEnabled="{Binding SaveIsEnabled}">
|
|
||||||
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
|
|
||||||
</Button>
|
</Button>
|
||||||
<UniformGrid Rows="1">
|
</UniformGrid>
|
||||||
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding DrawMsg}"
|
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}"
|
||||||
IsChecked="{Binding DrawIsChecked}" IsEnabled="{Binding DrawIsEnabled}"/>
|
IsEnabled="{Binding SaveIsEnabled}">
|
||||||
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding MachiningMsg}"
|
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||||
IsChecked="{Binding MachiningIsChecked}" IsEnabled="{Binding MachiningIsEnabled}"/>
|
</Button>
|
||||||
</UniformGrid>
|
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}"
|
||||||
|
IsEnabled="{Binding SaveIsEnabled}">
|
||||||
|
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
|
||||||
|
</Button>
|
||||||
|
<UniformGrid Rows="1">
|
||||||
|
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding DrawMsg}"
|
||||||
|
IsChecked="{Binding DrawIsChecked}" IsEnabled="{Binding DrawIsEnabled}"/>
|
||||||
|
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding MachiningMsg}"
|
||||||
|
IsChecked="{Binding MachiningIsChecked}" IsEnabled="{Binding MachiningIsEnabled}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,17 @@ Public Class TopCommandBarVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_ProjectManager_Visibility As Visibility = Visibility.Visible
|
||||||
|
Public ReadOnly Property ProjectManager_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_ProjectManager_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetProjectManagerVisibility(bValue As Boolean)
|
||||||
|
m_ProjectManager_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
OnPropertyChanged(NameOf(ProjectManager_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdNew As ICommand
|
Private m_cmdNew As ICommand
|
||||||
Private m_cmdOpen As ICommand
|
Private m_cmdOpen As ICommand
|
||||||
@@ -220,10 +231,10 @@ Public Class TopCommandBarVM
|
|||||||
Dim bIsEnabled As Boolean = Not IsNothing(Map.refOperationParametersExpanderVM) AndAlso Not Map.refOperationParametersExpanderVM.ParametersIsExpanded
|
Dim bIsEnabled As Boolean = Not IsNothing(Map.refOperationParametersExpanderVM) AndAlso Not Map.refOperationParametersExpanderVM.ParametersIsExpanded
|
||||||
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(bIsEnabled, bIsEnabled, bIsEnabled)
|
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(bIsEnabled, bIsEnabled, bIsEnabled)
|
||||||
' se parametri di una lavorazione aperti, disattivo MTable e SpecialPanel
|
' se parametri di una lavorazione aperti, disattivo MTable e SpecialPanel
|
||||||
Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled)
|
If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled)
|
||||||
Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled)
|
If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
' Deseleziono tutto
|
' Deseleziono tutto
|
||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
' Pulisco lista e geometria faccette di superfici di lavorazione corrente
|
' Pulisco lista e geometria faccette di superfici di lavorazione corrente
|
||||||
@@ -307,7 +318,7 @@ Public Class TopCommandBarVM
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Friend Sub NewCmd()
|
Friend Sub NewCmd()
|
||||||
Map.refProjectVM.GetController.NewProject(True)
|
Map.refProjectVM.GetController.NewProject(True)
|
||||||
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
||||||
OnPropertyChanged("MruFileNames")
|
OnPropertyChanged("MruFileNames")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -342,7 +353,7 @@ Public Class TopCommandBarVM
|
|||||||
Else
|
Else
|
||||||
Map.refProjectVM.GetController.OpenProject(sFilePath, False)
|
Map.refProjectVM.GetController.OpenProject(sFilePath, False)
|
||||||
End If
|
End If
|
||||||
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' OpenCommand
|
#End Region ' OpenCommand
|
||||||
@@ -652,9 +663,13 @@ Public Class TopCommandBarVM
|
|||||||
If Not String.IsNullOrWhiteSpace(sCurrProject) Then
|
If Not String.IsNullOrWhiteSpace(sCurrProject) Then
|
||||||
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
|
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
|
||||||
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
|
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
|
||||||
|
Dim sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper()
|
||||||
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
|
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
|
||||||
For FileIndex = 0 To TempFiles.Count - 1
|
For FileIndex = 0 To TempFiles.Count - 1
|
||||||
If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
|
If TempFiles(FileIndex) = sCurrProject Then Continue For
|
||||||
|
Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper()
|
||||||
|
If ( String.Compare(sCurrFileName, sCurrProjName) = 0 OrElse
|
||||||
|
sCurrFileName.Contains( sCurrProjName & "_")) Then
|
||||||
OtherFiles.Add(TempFiles(FileIndex))
|
OtherFiles.Add(TempFiles(FileIndex))
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -667,6 +682,8 @@ Public Class TopCommandBarVM
|
|||||||
End If
|
End If
|
||||||
Try
|
Try
|
||||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate)
|
Using zip As New Ionic.Zip.ZipFile(sZipToCreate)
|
||||||
|
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||||
|
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||||
' aggiungo file macchine
|
' aggiungo file macchine
|
||||||
For Each sMachineName As String In Machines
|
For Each sMachineName As String In Machines
|
||||||
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sMachineName
|
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sMachineName
|
||||||
@@ -731,7 +748,7 @@ Public Class TopCommandBarVM
|
|||||||
If nErr = 0 Then
|
If nErr = 0 Then
|
||||||
Map.refMachinePanelVM.UpdateCurrentMachine()
|
Map.refMachinePanelVM.UpdateCurrentMachine()
|
||||||
MachiningMode_IsChecked()
|
MachiningMode_IsChecked()
|
||||||
Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
|
If Not IsNothing(Map.refMachiningTreeExpanderVM) Then Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
|
||||||
IniFile.m_ProjectMode = ProjectModeOpt.MACHINING
|
IniFile.m_ProjectMode = ProjectModeOpt.MACHINING
|
||||||
Else
|
Else
|
||||||
m_MachiningIsChecked = False
|
m_MachiningIsChecked = False
|
||||||
@@ -757,7 +774,29 @@ Public Class TopCommandBarVM
|
|||||||
End If
|
End If
|
||||||
' ProjectV
|
' ProjectV
|
||||||
If Not IsNothing(Map.refProjectV) Then
|
If Not IsNothing(Map.refProjectV) Then
|
||||||
|
If IniFile.IsActivePlugin() Then
|
||||||
|
For Each Panel In Map.refProjectVM.PanelList
|
||||||
|
If TypeOf Panel Is WinFormPluginControlV Then
|
||||||
|
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
|
||||||
|
If Not IsNothing(WinFormPanel) Then
|
||||||
|
WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.DRAW)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
Map.refProjectV.DrawMode_IsChecked()
|
Map.refProjectV.DrawMode_IsChecked()
|
||||||
|
Map.refMachinePanelVM.SetMachinePanelVisibility(IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW)
|
||||||
|
Map.refExecutePanelVM.SetExecutePanelVisibility(GetPrivateProfileInt(S_GENERAL, K_EXECUTE, 0) = 1)
|
||||||
|
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False))
|
||||||
|
Map.refBeamPanelVM.SetBeamPanelVisibility(IniFile.IsActiveBeam())
|
||||||
|
Map.refWallPanelVM.SetWallPanelVisibility(IniFile.IsActiveWall())
|
||||||
|
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeam() Or IniFile.IsActiveWall())
|
||||||
|
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
|
||||||
|
Map.refGunStockPanelVM.SetGunStockPanelVisibility(IniFile.IsActiveGunStock())
|
||||||
|
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(True)
|
||||||
|
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False)
|
||||||
|
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
|
||||||
|
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.DRAW)
|
||||||
End If
|
End If
|
||||||
' ProjectVM
|
' ProjectVM
|
||||||
If Not IsNothing(Map.refProjectVM) Then
|
If Not IsNothing(Map.refProjectVM) Then
|
||||||
@@ -783,11 +822,35 @@ Public Class TopCommandBarVM
|
|||||||
|
|
||||||
Friend Sub MachiningMode_IsChecked()
|
Friend Sub MachiningMode_IsChecked()
|
||||||
' ProjectV
|
' ProjectV
|
||||||
|
If IniFile.IsActivePlugin() Then
|
||||||
|
For Each Panel In Map.refProjectVM.PanelList
|
||||||
|
If TypeOf Panel Is WinFormPluginControlV Then
|
||||||
|
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
|
||||||
|
If Not IsNothing(WinFormPanel) Then
|
||||||
|
WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
Map.refProjectV.MachiningMode_IsChecked()
|
Map.refProjectV.MachiningMode_IsChecked()
|
||||||
|
Map.refMachinePanelVM.SetMachinePanelVisibility(True)
|
||||||
|
Map.refExecutePanelVM.SetExecutePanelVisibility(False)
|
||||||
|
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True))
|
||||||
|
Map.refBeamPanelVM.SetBeamPanelVisibility(False)
|
||||||
|
Map.refWallPanelVM.SetWallPanelVisibility(False)
|
||||||
|
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(False)
|
||||||
|
Map.refDoorPanelVM.SetDoorPanelVisibility(False)
|
||||||
|
Map.refGunStockPanelVM.SetGunStockPanelVisibility(False)
|
||||||
|
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False)
|
||||||
|
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
|
||||||
|
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
|
||||||
|
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
|
||||||
|
|
||||||
|
|
||||||
' ProjectVM
|
' ProjectVM
|
||||||
Map.refProjectVM.MachiningMode_IsChecked()
|
Map.refProjectVM.MachiningMode_IsChecked()
|
||||||
' OptionPanelVM
|
' OptionPanelVM
|
||||||
Map.refOptionPanelVM.MachiningMode_IsChecked()
|
If Not IsNothing(Map.refOptionPanelVM) Then Map.refOptionPanelVM.MachiningMode_IsChecked()
|
||||||
' MyMachinePanelVM
|
' MyMachinePanelVM
|
||||||
Map.refMachinePanelVM.MachineListIsEnabled = False
|
Map.refMachinePanelVM.MachineListIsEnabled = False
|
||||||
' InstrumentPanel
|
' InstrumentPanel
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<WrapPanel x:Class="TopTrayV"
|
||||||
|
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"
|
||||||
|
DockPanel.Dock="Top"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
|
||||||
|
<EgtFloating:EgtFloatingPanel Name="ShowPanel"
|
||||||
|
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">
|
||||||
|
<local:ViewPanelV DataContext="{StaticResource ViewPanelViewModel}"/>
|
||||||
|
<local:PopUpViewPanelV DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
||||||
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
<!--<EgtFloating:EgtFloatingPanel Name="InstrumentPanel"
|
||||||
|
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">-->
|
||||||
|
<local:InstrumentPanelV DataContext="{StaticResource InstrumentPanelViewModel}"/>
|
||||||
|
<!--</EgtFloating:EgtFloatingPanel>-->
|
||||||
|
<EgtFloating:EgtFloatingPanel Name="GridPanel"
|
||||||
|
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||||
|
<local:GridPanelV DataContext="{StaticResource GridPanelViewModel}"/>
|
||||||
|
<local:PopUpGridPanelV DataContext="{StaticResource PopUpGridPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
||||||
|
</EgtFloating:EgtFloatingPanel>
|
||||||
|
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
|
||||||
|
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
|
||||||
|
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
|
||||||
|
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
|
||||||
|
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
|
||||||
|
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
|
||||||
|
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
|
||||||
|
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
|
||||||
|
|
||||||
|
</WrapPanel>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Public Class TopTrayV
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class BasePanelVM
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_PanelViewState As ViewPanelStates = ViewPanelStates.NEVER
|
||||||
|
Friend Sub SetPanelViewState(value As ViewPanelStates)
|
||||||
|
m_PanelViewState = value
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_Panel_Visibility As Visibility
|
||||||
|
Public ReadOnly Property Panel_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_Panel_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetPanelVisibility(ProjectMode As ProjectModeOpt)
|
||||||
|
Dim bValue As Boolean = True
|
||||||
|
Select Case ProjectMode
|
||||||
|
Case ProjectModeOpt.DRAW, ProjectModeOpt.ONLYDRAW
|
||||||
|
m_Panel_Visibility = If(m_PanelViewState = ViewPanelStates.ONLYDRAW Or m_PanelViewState = ViewPanelStates.ALWAYS, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
Case ProjectModeOpt.MACHINING
|
||||||
|
m_Panel_Visibility = If(m_PanelViewState = ViewPanelStates.ONLYMACHINING Or m_PanelViewState = ViewPanelStates.ALWAYS, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
End Select
|
||||||
|
NotifyPropertyChanged(NameOf(Panel_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -37,7 +37,6 @@
|
|||||||
<EgtCAM5:BeamWallPanelVM x:Key="BeamWallPanelViewModel"/>
|
<EgtCAM5:BeamWallPanelVM x:Key="BeamWallPanelViewModel"/>
|
||||||
<EgtCAM5:DoorPanelVM x:Key="DoorsPanelViewModel"/>
|
<EgtCAM5:DoorPanelVM x:Key="DoorsPanelViewModel"/>
|
||||||
<EgtCAM5:GunStockPanelVM x:Key="GunStockPanelViewModel"/>
|
<EgtCAM5:GunStockPanelVM x:Key="GunStockPanelViewModel"/>
|
||||||
<EgtCAM5:Printing3DPanelVM x:Key="Printing3DPanelVM"/>
|
|
||||||
<EgtCAM5:MyMachGroupPanelVM x:Key="MachGroupPanelViewModel"/>
|
<EgtCAM5:MyMachGroupPanelVM x:Key="MachGroupPanelViewModel"/>
|
||||||
<!--<EgtCAM5:MachGroupPanelVM x:Key="MachGroupPanelViewModel"/>-->
|
<!--<EgtCAM5:MachGroupPanelVM x:Key="MachGroupPanelViewModel"/>-->
|
||||||
<!--<EgtCAM5:OperationExpanderVM x:Key="OperationExpanderViewModel"/>-->
|
<!--<EgtCAM5:OperationExpanderVM x:Key="OperationExpanderViewModel"/>-->
|
||||||
|
|||||||
+12
-10
@@ -32,7 +32,6 @@ Public Module IniFile
|
|||||||
RAWPART = 3
|
RAWPART = 3
|
||||||
RAWPARTWITHFIXTURE = 4
|
RAWPARTWITHFIXTURE = 4
|
||||||
MACHPATH = 5
|
MACHPATH = 5
|
||||||
ALL = 99
|
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
' MainWindow Page
|
' MainWindow Page
|
||||||
@@ -51,7 +50,8 @@ Public Module IniFile
|
|||||||
CAD2D = 128
|
CAD2D = 128
|
||||||
STEELDORS = 256
|
STEELDORS = 256
|
||||||
WALL = 512
|
WALL = 512
|
||||||
_3DPRINT = 1024
|
PLUGIN = 1024
|
||||||
|
ADVMACHINING = 2048
|
||||||
End Enum
|
End Enum
|
||||||
Friend m_sDataRoot As String
|
Friend m_sDataRoot As String
|
||||||
Friend m_sConfigDir As String
|
Friend m_sConfigDir As String
|
||||||
@@ -284,14 +284,6 @@ Public Module IniFile
|
|||||||
Return bIsActive
|
Return bIsActive
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function IsActivePrinting3d() As Boolean
|
|
||||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT._3DPRINT) <> 0 And (GetPrivateProfileInt(S_PRINTING3D, K_ENABLE, 0) <> 0)
|
|
||||||
If bIsActive Then
|
|
||||||
GetPrivateProfileString(S_PRINTING3D, K_3PRNBASEDIR, "", m_sPrinting3dDirPath)
|
|
||||||
End If
|
|
||||||
Return bIsActive
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Friend Function IsActiveDoors() As Boolean
|
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)
|
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.DOORS) <> 0 And (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
|
||||||
If bIsActive Then GetPrivateProfileString(S_DOORS, K_BASEDIR, "", m_sDoorsDirPath)
|
If bIsActive Then GetPrivateProfileString(S_DOORS, K_BASEDIR, "", m_sDoorsDirPath)
|
||||||
@@ -308,10 +300,20 @@ Public Module IniFile
|
|||||||
Return bIsActive
|
Return bIsActive
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function IsActivePlugin() As Boolean
|
||||||
|
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.PLUGIN) <> 0
|
||||||
|
Dim nTemp As Integer = GetPrivateProfileInt(S_GENERAL, K_PLUGIN, 0)
|
||||||
|
Return bIsActive And nTemp = 1
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function IsKeyEnabledVirtualMilling() As Boolean
|
Friend Function IsKeyEnabledVirtualMilling() As Boolean
|
||||||
Return (IniFile.m_nKeyOptions And KEY_OPT.VIRTUALMILLING) <> 0
|
Return (IniFile.m_nKeyOptions And KEY_OPT.VIRTUALMILLING) <> 0
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function IsKeyEnabledAdvancedMachining() As Boolean
|
||||||
|
Return (IniFile.m_nKeyOptions And KEY_OPT.ADVMACHINING) <> 0
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function IsActiveSpecialPanel() As Boolean
|
Friend Function IsActiveSpecialPanel() As Boolean
|
||||||
Dim btDummy As ButtonItem = Nothing
|
Dim btDummy As ButtonItem = Nothing
|
||||||
Return GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0 AndAlso GetPrivateProfileButton(S_SPECIAL, K_BUTTON & "1", "", btDummy)
|
Return GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0 AndAlso GetPrivateProfileButton(S_SPECIAL, K_BUTTON & "1", "", btDummy)
|
||||||
|
|||||||
+19
-4
@@ -38,8 +38,14 @@ Public Module MachineModel
|
|||||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.CHISELING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 9)})
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.CHISELING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 9)})
|
||||||
End If
|
End If
|
||||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFROUGHING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 11)})
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFROUGHING, .TypeName = EgtMsg(31212)})
|
||||||
|
End If
|
||||||
|
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(31211)})
|
||||||
|
End If
|
||||||
|
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_5AXMACHINING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY._5AXMACHINING, .TypeName = EgtMsg(31213)})
|
||||||
End If
|
End If
|
||||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.WATERJETTING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 12)})
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.WATERJETTING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 12)})
|
||||||
@@ -76,8 +82,17 @@ Public Module MachineModel
|
|||||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, sMachineName) <> 0 Then
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, sMachineName) <> 0 Then
|
||||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.CHISELING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 9)})
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.CHISELING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 9)})
|
||||||
End If
|
End If
|
||||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineName) <> 0 Then
|
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFROUGHING, 0, sMachineName) <> 0 Then
|
||||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 11)})
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFROUGHING, .TypeName = EgtMsg(31212)})
|
||||||
|
End If
|
||||||
|
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineName) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(31211)})
|
||||||
|
End If
|
||||||
|
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_5AXMACHINING, 0, sMachineName) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY._5AXMACHINING, .TypeName = EgtMsg(31213)})
|
||||||
|
End If
|
||||||
|
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, sMachineName) <> 0 Then
|
||||||
|
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.WATERJETTING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 12)})
|
||||||
End If
|
End If
|
||||||
Return ActiveMachiningsFamiliesList.ToArray
|
Return ActiveMachiningsFamiliesList.ToArray
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Module Map
|
|||||||
Private m_refTopCommandBarVM As TopCommandBarVM
|
Private m_refTopCommandBarVM As TopCommandBarVM
|
||||||
Private m_refProjectVM As ProjectVM
|
Private m_refProjectVM As ProjectVM
|
||||||
Private m_refFixtureParametersVM As FixtureParametersVM
|
Private m_refFixtureParametersVM As FixtureParametersVM
|
||||||
|
Private m_refRawPartOptionVM As RawPartOptionVM
|
||||||
Private m_refSimulationExpanderVM As SimulationExpanderVM
|
Private m_refSimulationExpanderVM As SimulationExpanderVM
|
||||||
Private m_refMachinePanelVM As MyMachinePanelVM
|
Private m_refMachinePanelVM As MyMachinePanelVM
|
||||||
Private m_refOptionPanelVM As OptionPanelVM
|
Private m_refOptionPanelVM As OptionPanelVM
|
||||||
@@ -28,6 +29,11 @@ Module Map
|
|||||||
Private m_refProjectV As ProjectV
|
Private m_refProjectV As ProjectV
|
||||||
Private m_refDoorPanelVM As DoorPanelVM
|
Private m_refDoorPanelVM As DoorPanelVM
|
||||||
Private m_refSpecialPanelVM As SpecialPanelVM
|
Private m_refSpecialPanelVM As SpecialPanelVM
|
||||||
|
Private m_refExecutePanelVM As ExecutePanelVM
|
||||||
|
Private m_refBeamPanelVM As BeamPanelVM
|
||||||
|
Private m_refWallPanelVM As WallPanelVM
|
||||||
|
Private m_refBeamWallPanelVM As BeamWallPanelVM
|
||||||
|
Private m_refGunStockPanelVM As GunStockPanelVM
|
||||||
|
|
||||||
#Region "Get"
|
#Region "Get"
|
||||||
|
|
||||||
@@ -56,6 +62,11 @@ Module Map
|
|||||||
Return m_refFixtureParametersVM
|
Return m_refFixtureParametersVM
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property refRawPartOptionVM As RawPartOptionVM
|
||||||
|
Get
|
||||||
|
Return m_refRawPartOptionVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
Public ReadOnly Property refSimulationExpanderVM As SimulationExpanderVM
|
Public ReadOnly Property refSimulationExpanderVM As SimulationExpanderVM
|
||||||
Get
|
Get
|
||||||
Return m_refSimulationExpanderVM
|
Return m_refSimulationExpanderVM
|
||||||
@@ -151,6 +162,31 @@ Module Map
|
|||||||
Return m_refSpecialPanelVM
|
Return m_refSpecialPanelVM
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Public ReadOnly Property refExecutePanelVM As ExecutePanelVM
|
||||||
|
Get
|
||||||
|
Return m_refExecutePanelVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property refBeamPanelVM As BeamPanelVM
|
||||||
|
Get
|
||||||
|
Return m_refBeamPanelVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property refWallPanelVM As WallPanelVM
|
||||||
|
Get
|
||||||
|
Return m_refWallPanelVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property refBeamWallPanelVM As BeamWallPanelVM
|
||||||
|
Get
|
||||||
|
Return m_refBeamWallPanelVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property refGunStockPanelVM As GunStockPanelVM
|
||||||
|
Get
|
||||||
|
Return m_refGunStockPanelVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' Get
|
#End Region ' Get
|
||||||
|
|
||||||
@@ -172,6 +208,11 @@ Module Map
|
|||||||
m_refFixtureParametersVM = FixtureParametersVM
|
m_refFixtureParametersVM = FixtureParametersVM
|
||||||
Return Not IsNothing(m_refFixtureParametersVM)
|
Return Not IsNothing(m_refFixtureParametersVM)
|
||||||
End Function
|
End Function
|
||||||
|
Friend Function SetRefRawPartOptionVM(RawPartOptionVM As RawPartOptionVM) As Boolean
|
||||||
|
m_refRawPartOptionVM = RawPartOptionVM
|
||||||
|
Return Not IsNothing(m_refRawPartOptionVM)
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function SetRefSimulationExpanderVM(SimulationExpanderVM As SimulationExpanderVM) As Boolean
|
Friend Function SetRefSimulationExpanderVM(SimulationExpanderVM As SimulationExpanderVM) As Boolean
|
||||||
m_refSimulationExpanderVM = SimulationExpanderVM
|
m_refSimulationExpanderVM = SimulationExpanderVM
|
||||||
Return Not IsNothing(m_refSimulationExpanderVM)
|
Return Not IsNothing(m_refSimulationExpanderVM)
|
||||||
@@ -248,6 +289,26 @@ Module Map
|
|||||||
m_refSpecialPanelVM = SpecialPanelVM
|
m_refSpecialPanelVM = SpecialPanelVM
|
||||||
Return Not IsNothing(m_refSpecialPanelVM)
|
Return Not IsNothing(m_refSpecialPanelVM)
|
||||||
End Function
|
End Function
|
||||||
|
Friend Function SetRefExecutePanelVM(ExecutePanelVM As ExecutePanelVM) As Boolean
|
||||||
|
m_refExecutePanelVM = ExecutePanelVM
|
||||||
|
Return Not IsNothing(m_refExecutePanelVM)
|
||||||
|
End Function
|
||||||
|
Friend Function SetRefBeamPanelVM(BeamPanelVM As BeamPanelVM) As Boolean
|
||||||
|
m_refBeamPanelVM = BeamPanelVM
|
||||||
|
Return Not IsNothing(m_refBeamPanelVM)
|
||||||
|
End Function
|
||||||
|
Friend Function SetRefWallPanelVM(WallPanelVM As WallPanelVM) As Boolean
|
||||||
|
m_refWallPanelVM = WallPanelVM
|
||||||
|
Return Not IsNothing(m_refWallPanelVM)
|
||||||
|
End Function
|
||||||
|
Friend Function SetRefBeamWallPanelVM(BeamWallPanelVM As BeamWallPanelVM) As Boolean
|
||||||
|
m_refBeamWallPanelVM = BeamWallPanelVM
|
||||||
|
Return Not IsNothing(m_refBeamWallPanelVM)
|
||||||
|
End Function
|
||||||
|
Friend Function SetRefGunStockPanelVM(GunStockPanelVM As GunStockPanelVM) As Boolean
|
||||||
|
m_refGunStockPanelVM = GunStockPanelVM
|
||||||
|
Return Not IsNothing(m_refGunStockPanelVM)
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region ' Set
|
#End Region ' Set
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<Grid x:Class="WinFormPluginControlV"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
DockPanel.Dock="{Binding DockSide}"
|
||||||
|
Height="{Binding Height}"
|
||||||
|
Width="{Binding Width}"
|
||||||
|
Visibility="{Binding Panel_Visibility}">
|
||||||
|
|
||||||
|
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
||||||
|
<!--<ContentControl Content="{Binding WinFormUserControlHost}"/>-->
|
||||||
|
<WindowsFormsHost Name="WinFormHost"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
Imports System.Windows.Forms.Integration
|
||||||
|
|
||||||
|
Public Class WinFormPluginControlV
|
||||||
|
|
||||||
|
Private m_WinFormPluginControlVM As WinFormPluginControlVM
|
||||||
|
Public ReadOnly Property WinFormPluginControlVM As WinFormPluginControlVM
|
||||||
|
Get
|
||||||
|
Return m_WinFormPluginControlVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_WinFormUserControlHost As WindowsFormsHost
|
||||||
|
Public ReadOnly Property WinFormUserControlHost As WindowsFormsHost
|
||||||
|
Get
|
||||||
|
Return m_WinFormUserControlHost
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(WinFormPluginControlVM As WinFormPluginControlVM)
|
||||||
|
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Add any initialization after the InitializeComponent() call.
|
||||||
|
WinFormHost.Child = WinFormPluginControlVM.WinFormUserControl
|
||||||
|
Me.DataContext = WinFormPluginControlVM
|
||||||
|
m_WinFormPluginControlVM = WinFormPluginControlVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
Imports System.Windows.Forms.Integration
|
||||||
|
Imports EgtUILib
|
||||||
|
|
||||||
|
Public Class WinFormPluginControlVM
|
||||||
|
Inherits BasePanelVM
|
||||||
|
|
||||||
|
Private m_WinFormUserControl As Forms.Control
|
||||||
|
Public ReadOnly Property WinFormUserControl As Forms.Control
|
||||||
|
Get
|
||||||
|
Return m_WinFormUserControl
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_DockSide As Dock
|
||||||
|
Public ReadOnly Property DockSide As Dock
|
||||||
|
Get
|
||||||
|
Select Case TryCast(m_WinFormUserControl, IPluginControl).DockSide
|
||||||
|
Case Forms.DockStyle.Top
|
||||||
|
Return Dock.Top
|
||||||
|
Case Forms.DockStyle.Bottom
|
||||||
|
Return Dock.Bottom
|
||||||
|
Case Forms.DockStyle.Left
|
||||||
|
Return Dock.Left
|
||||||
|
Case Forms.DockStyle.Right
|
||||||
|
Return Dock.Right
|
||||||
|
Case Else
|
||||||
|
Return Nothing
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Height As Double
|
||||||
|
Get
|
||||||
|
Return If(TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Left Or TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Right, Double.NaN, m_WinFormUserControl.Height)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Width As Double
|
||||||
|
Get
|
||||||
|
Return If(TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Top Or TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Bottom, Double.NaN, m_WinFormUserControl.Width)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(WinFormControl As Forms.Control, ViewPanelState As ViewPanelStates)
|
||||||
|
m_WinFormUserControl = WinFormControl
|
||||||
|
' imposto visibilita' standard
|
||||||
|
SetPanelViewState(ViewPanelState)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="EgtUILib" version="2.4.6.1" targetFramework="net40-client" />
|
|
||||||
<package id="EgtWPFLib" version="2.3.12.1" targetFramework="net40-client" />
|
|
||||||
<package id="EgtWPFLib5" version="2.4.6.1" targetFramework="net40-client" />
|
|
||||||
</packages>
|
|
||||||
Reference in New Issue
Block a user