Compare commits

..

1 Commits

Author SHA1 Message Date
Demetrio Cassarino 0091502aa5 Merge commit 'cf978712bae6c9217370feb1c0fc08bcdc4d7f61' into features/NewProjectGrid 2026-04-23 10:51:10 +02:00
48 changed files with 298 additions and 877 deletions
+19 -25
View File
@@ -25,82 +25,76 @@ Public Class AboutBoxWndV
sAssStatus = "to be renewed by today" sAssStatus = "to be renewed by today"
End If End If
End If End If
sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & vbCrLf, "") sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName & sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & IniFile.m_nInstance.ToString() & " Inst" & IniFile.m_nInstance.ToString() &
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & vbCrLf " Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & vbCrLf sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "SupportPlan " & sAssStatus & vbCrLf sInfo &= "SupportPlan " & sAssStatus & Environment.NewLine
sInfo &= "DataRoot " & IniFile.m_sDataRoot & vbCrLf sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & vbCrLf sInfo &= "MachinesRoot " & IniFile.m_sMachinesRoot & Environment.NewLine
Else Else
sInfo &= "Only Draw Mode" & vbCrLf sInfo &= "Only Draw Mode" & Environment.NewLine
End If End If
Dim sOpSys As String = String.Empty Dim sOpSys As String = String.Empty
EgtGetOsInfo( sOpSys) EgtGetOsInfo( sOpSys)
sInfo &= sOpSys & vbCrLf sInfo &= sOpSys & Environment.NewLine
Dim sCPU As String = String.Empty Dim sCPU As String = String.Empty
EgtGetCpuInfo( sCPU) EgtGetCpuInfo( sCPU)
sInfo &= sCPU & vbCrLf sInfo &= sCPU & Environment.NewLine
Dim sMem As String = String.Empty Dim sMem As String = String.Empty
EgtGetMemoryInfo( sMem) EgtGetMemoryInfo( sMem)
sInfo &= sMem & vbCrLf sInfo &= sMem & Environment.NewLine
Dim sScene As String = String.Empty Dim sScene As String = String.Empty
EgtGetSceneInfo(sScene) EgtGetSceneInfo(sScene)
sInfo &= sScene sInfo &= sScene
' Extensions ' Extensions
sInfo &= vbCrLf & "Extensions :" sInfo &= Environment.NewLine & "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)
sInfo &= vbCrLf & "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath sInfo &= Environment.NewLine & "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
End If
If IniFile.IsActiveBeamNT() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamNTDirPath, sVersion)
sInfo &= vbCrLf & "BeamNT ver. " & sVersion & " " & IniFile.m_sBeamNTDirPath
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)
sInfo &= vbCrLf & "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath sInfo &= Environment.NewLine & "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath
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)
sInfo &= vbCrLf & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
End If End If
If IniFile.IsActiveWindow() Then If IniFile.IsActiveWindow() Then
bExtensions = True bExtensions = True
Dim sVersion As String = "---" Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sWindowDirPath, sVersion) IniFile.GetSpecialLuaVersion( IniFile.m_sWindowDirPath, sVersion)
sInfo &= vbCrLf & "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath sInfo &= Environment.NewLine & "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
End If End If
If IniFile.IsActiveTrimming() Then If IniFile.IsActiveTrimming() Then
bExtensions = True bExtensions = True
Dim sVersion As String = "---" Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sTrimmingDirPath, sVersion) IniFile.GetSpecialLuaVersion( IniFile.m_sTrimmingDirPath, sVersion)
sInfo &= vbCrLf & "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath sInfo &= Environment.NewLine & "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
End If End If
If IniFile.IsActiveReversePost() Then If IniFile.IsActiveReversePost() Then
bExtensions = True bExtensions = True
Dim sVersion As String = "---" Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion( IniFile.m_sReversePostDirPath, sVersion) IniFile.GetSpecialLuaVersion( IniFile.m_sReversePostDirPath, sVersion)
sInfo &= vbCrLf & "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath sInfo &= Environment.NewLine & "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
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)
sInfo &= vbCrLf & "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath sInfo &= Environment.NewLine & "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath
End If End If
If Not bExtensions Then sInfo &= vbCrLf & "---" If Not bExtensions Then sInfo &= Environment.NewLine & "---"
InfoLbl.Text = sInfo InfoLbl.Text = sInfo
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
End Sub End Sub
-7
View File
@@ -125,13 +125,6 @@ Module ConstIni
Public Const K_SPECIALENABLE As String = "SpecialEnable" Public Const K_SPECIALENABLE As String = "SpecialEnable"
Public Const K_BUTTON As String = "Button" Public Const K_BUTTON As String = "Button"
Public Const S_BEAMNT As String = "BeamNT"
Public Const K_BEAMNTENABLE As String = "BntEnable"
Public Const K_BEAMNTSHOW As String = "BntShow"
Public Const K_BEAMNTBASEDIR As String = "BaseDir"
Public Const K_BEAMNTBWEEXEC As String = "BweExec"
Public Const K_BEAMNTBUTTON As String = "Button"
Public Const S_BEAM As String = "Beam" Public Const S_BEAM As String = "Beam"
Public Const K_BEAMENABLE As String = "BtlEnable" Public Const K_BEAMENABLE As String = "BtlEnable"
Public Const K_BEAMBASEDIR As String = "BaseDir" Public Const K_BEAMBASEDIR As String = "BaseDir"
+1 -11
View File
@@ -95,16 +95,6 @@ Public Class CurrSetUpVM
m_SetUpVM.InitSetUp() m_SetUpVM.InitSetUp()
' carico attrezzaggio corrente ' carico attrezzaggio corrente
m_SetUpVM.LoadCurrentSetUp() m_SetUpVM.LoadCurrentSetUp()
' verifico attrezzaggio corrente
Dim vsErrors As String() = Nothing
if Not EgtVerifyCurrSetup( vsErrors) Then
' Errore nell'attrezzaggio:
Dim sMsg As String = EgtMsg(6480) & vbLf
For Each sError As String In vsErrors
sMsg &= sError & vbLf
Next
MessageBox.Show(sMsg, EgtMsg(6471), MessageBoxButton.OK, MessageBoxImage.Error)
End If
End Sub End Sub
' Funzione che verifica se ci sono state modifiche all'attrezzaggio corrente e permette di attivare e disattivare il bottone applica ' Funzione che verifica se ci sono state modifiche all'attrezzaggio corrente e permette di attivare e disattivare il bottone applica
@@ -161,7 +151,7 @@ Public Class CurrSetUpVM
Public Sub Save() Public Sub Save()
' chiedo il nome con cui salvare il setup ' chiedo il nome con cui salvare il setup
Dim SaveFileDialogViewVM As New SaveFileDialogWithListVM With { Dim SaveFileDialogViewVM As New SaveFileDialogWithListVM With {
.Title = EgtMsg(6453) & " " & EgtMsg(6451), .Title = EgtMsg(MSG_SETUP + 3) & " " & EgtMsg(MSG_SETUP + 1),
.Extension = ".stu", .Extension = ".stu",
.Filter = "*.stu", .Filter = "*.stu",
.Directory = m_SetUpDir_FilePath, .Directory = m_SetUpDir_FilePath,
+3 -17
View File
@@ -9,10 +9,9 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>EgtCAM5</RootNamespace> <RootNamespace>EgtCAM5</RootNamespace>
<AssemblyName>EgtCAM5</AssemblyName> <AssemblyName>EgtCAM5</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<MyType>Custom</MyType> <MyType>Custom</MyType>
<TargetFrameworkProfile> <TargetFrameworkProfile>Client</TargetFrameworkProfile>
</TargetFrameworkProfile>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
@@ -52,7 +51,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DefineTrace>false</DefineTrace> <DefineTrace>false</DefineTrace>
@@ -64,7 +62,6 @@
<DebugType>None</DebugType> <DebugType>None</DebugType>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -77,7 +74,6 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DefineTrace>false</DefineTrace> <DefineTrace>false</DefineTrace>
@@ -89,7 +85,6 @@
<DebugType>None</DebugType> <DebugType>None</DebugType>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
@@ -271,6 +266,7 @@
<DependentUpon>SetUpV.xaml</DependentUpon> <DependentUpon>SetUpV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="SetUp\SetUpVM.vb" /> <Compile Include="SetUp\SetUpVM.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" />
<Compile Include="Constants\ConstDoors.vb" /> <Compile Include="Constants\ConstDoors.vb" />
@@ -286,12 +282,6 @@
<DependentUpon>SelMachGroupWndV.xaml</DependentUpon> <DependentUpon>SelMachGroupWndV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="SelMachGroupWnd\SelMachGroupWndVM.vb" /> <Compile Include="SelMachGroupWnd\SelMachGroupWndVM.vb" />
<Compile Include="Special-BeamWall\Beam.vb" />
<Compile Include="Special-BeamWall\BeamNT.vb" />
<Compile Include="Special-BeamWall\BeamNTPanelV.xaml.vb">
<DependentUpon>BeamNTPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="Special-BeamWall\BeamNTPanelVM.vb" />
<Compile Include="Special-BeamWall\BeamWallPanelVM.vb" /> <Compile Include="Special-BeamWall\BeamWallPanelVM.vb" />
<Compile Include="Special-BeamWall\BeamWallPanelV.xaml.vb"> <Compile Include="Special-BeamWall\BeamWallPanelV.xaml.vb">
<DependentUpon>BeamWallPanelV.xaml</DependentUpon> <DependentUpon>BeamWallPanelV.xaml</DependentUpon>
@@ -618,10 +608,6 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Special-BeamWall\BeamNTPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</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>
+1 -1
View File
@@ -32,7 +32,7 @@ Public Class InstrumentPanelVM
Map.refProjectVM.GetScene.SetStatusAnalyze() Map.refProjectVM.GetScene.SetStatusAnalyze()
Else Else
Map.refProjectVM.GetScene.ResetStatusAnalyze() Map.refProjectVM.GetScene.ResetStatusAnalyze()
'Map.refManageLayerExpanderVM.SelectIdInObjTree(GDB_ID.NULL) Map.refManageLayerExpanderVM.SelectIdInObjTree(GDB_ID.NULL)
Map.refStatusBarVM.NotifyStatusOutput("") Map.refStatusBarVM.NotifyStatusOutput("")
Analyze.EraseAnalyzeGroup() Analyze.EraseAnalyzeGroup()
EgtDraw() EgtDraw()
+11 -11
View File
@@ -7,14 +7,14 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<!--Combobox per selezionare la macchina corrente--> <!--Combobox per selezionare la macchina corrente-->
<ComboBox ItemsSource="{Binding Path=MachinesList}" DisplayMemberPath="Name" <ComboBox ItemsSource="{Binding Path=MachinesList}" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name" SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
Height="22" Width="175" IsEnabled="{Binding MachineListIsEnabled}" Margin="2,0"/> Height="22" Width="150" IsEnabled="{Binding MachineListIsEnabled}" Margin="2,0"/>
<Button Content="{Binding ToolDBMsg}" <Button Content="{Binding ToolDBMsg}"
Command="{Binding ToolDbCommand}" Command="{Binding ToolDbCommand}"
IsEnabled="{Binding ToolDb_IsEnabled}" IsEnabled="{Binding ToolDb_IsEnabled}"
Width="55" Width="55"
ToolTip="{Binding ToolDBToolTip}" ToolTip="{Binding ToolDBToolTip}"
Style="{StaticResource GridViewPanelButton}"/> Style="{StaticResource GridViewPanelButton}"/>
<Button Content="{Binding MachiningDbMsg}" <Button Content="{Binding MachiningDbMsg}"
Command="{Binding MachDbCommand}" Command="{Binding MachDbCommand}"
IsEnabled="{Binding MachDb_IsEnabled}" IsEnabled="{Binding MachDb_IsEnabled}"
@@ -28,10 +28,10 @@
ToolTip="{Binding SetUpDbToolTip}" ToolTip="{Binding SetUpDbToolTip}"
Style="{StaticResource GridViewPanelButton}"/> Style="{StaticResource GridViewPanelButton}"/>
<Button Command="{Binding MachOptionsCommand}" <Button Command="{Binding MachOptionsCommand}"
ToolTip="{Binding MachOptionsToolTip}"> ToolTip="{Binding MachOptionsToolTip}">
<Image Source="/Resources/MachinePanel/MachineOptions.png" <Image Source="/Resources/MachinePanel/MachineOptions.png"
Height="22" /> Height="22" />
</Button> </Button>
</StackPanel> </StackPanel>
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
+2 -9
View File
@@ -4,13 +4,13 @@ Imports EgtWPFLib5
Class MainWindowV Class MainWindowV
Inherits EgtCustomWindow Inherits EgtCustomWindow
Private Sub MainWindow_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized Private Sub Me_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
If Not ProjectVM.GetAppToShow() Then If Not ProjectVM.GetAppToShow() Then
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
End If End If
End Sub End Sub
Private Sub MainWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Private Sub EgtCustomWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
' Posizione e dimensioni del Form ' Posizione e dimensioni del Form
Dim WinPos As New WinPos Dim WinPos As New WinPos
If ProjectVM.GetAppToShow() Then If ProjectVM.GetAppToShow() Then
@@ -21,13 +21,6 @@ Class MainWindowV
WinPosToWindow(Me, WinPos) WinPosToWindow(Me, WinPos)
End Sub End Sub
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt AndAlso Keyboard.IsKeyDown(Key.F4) Then
e.Cancel = True
Return
End If
End Sub
Private Sub MainWindow_Drop(sender As Object, e As DragEventArgs) Private Sub MainWindow_Drop(sender As Object, e As DragEventArgs)
' Se drag di file ' Se drag di file
If e.Data.GetDataPresent(DataFormats.FileDrop) Then If e.Data.GetDataPresent(DataFormats.FileDrop) Then
+3 -4
View File
@@ -171,6 +171,7 @@ Public Class MainWindowVM
Public Sub CloseApplication(ByVal param As Object) Public Sub CloseApplication(ByVal param As Object)
If IniFile.m_bScriptRunning Then If IniFile.m_bScriptRunning Then
If Not IniFile.m_bFailedRun Then If Not IniFile.m_bFailedRun Then
'MessageBox.Show("Can't exit now. Wait until the end of the script execution", "", MessageBoxButton.OK, MessageBoxImage.Stop)
Return Return
End If End If
End If End If
@@ -378,8 +379,8 @@ Public Class MainWindowVM
EgtSetLockId(sLockId) EgtSetLockId(sLockId)
End If End If
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 3108, 1, IniFile.m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(3279, 3104, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 3108, 1, IniFile.m_nKeyOptions) EgtGetKeyOptions(3279, 3104, 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 ' Imposto abilitazione lavorazioni avanzate
@@ -608,13 +609,11 @@ Public Class MainWindowVM
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_IsEnable(True) Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_IsEnable(True)
End If End If
ElseIf (e.Key = Key.Left OrElse e.Key = Key.Right) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then ElseIf (e.Key = Key.Left OrElse e.Key = Key.Right) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
If Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander Then Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander = True
Map.refMachiningParameterExpanderVM.FocusSlider() Map.refMachiningParameterExpanderVM.FocusSlider()
Dim nStep As Integer = If(e.Key = Key.Right, 1, -1) Dim nStep As Integer = If(e.Key = Key.Right, 1, -1)
Map.refMachiningParameterExpanderVM.SetSliderValue(nStep) Map.refMachiningParameterExpanderVM.SetSliderValue(nStep)
e.Handled = True e.Handled = True
ElseIf (e.Key = Key.Up OrElse e.Key = Key.Down) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then ElseIf (e.Key = Key.Up OrElse e.Key = Key.Down) AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
If Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander Then Map.refMachiningParameterExpanderVM.CurrOperation.AdvancedParamIsExpander = True
Map.refMachiningParameterExpanderVM.FocusButtonPreview() Map.refMachiningParameterExpanderVM.FocusButtonPreview()
If e.Key = Key.Down Then If e.Key = Key.Down Then
Map.refMachiningParameterExpanderVM.RevertPreviewMachiningTool() Map.refMachiningParameterExpanderVM.RevertPreviewMachiningTool()
+2 -2
View File
@@ -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("3.1.8.2")> <Assembly: AssemblyVersion("3.1.4.1")>
<Assembly: AssemblyFileVersion("3.1.8.2")> <Assembly: AssemblyFileVersion("3.1.4.1")>
@@ -55,10 +55,10 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0" <ToggleButton Style="{StaticResource EgtCAM5_LampToggleButton}" Grid.Column="0"
IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="False" Height="15" Width="15" Margin="0,0,5,0"/> IsChecked="{Binding OnOff}" Visibility="{Binding IsHidden}" Focusable="True" Height="15" Width="15" Margin="0,0,5,0"/>
<Image Grid.Column="1" Source="{Binding PictureString}" Focusable="False" Height="15" Margin="0,0,5,0"/> <Image Grid.Column="1" Source="{Binding PictureString}" Height="15" Margin="0,0,5,0"/>
<TextBlock Grid.Column="2" Text="{Binding Name}" Focusable="False" Margin="0,0,5,0"/> <TextBlock Grid.Column="2" Text="{Binding Name}" Margin="0,0,5,0"/>
<Ellipse Grid.Column="3" Height="10" Width="10" Focusable="False" Fill="{Binding LayerColor}" /> <Ellipse Grid.Column="3" Height="10" Width="10" Fill="{Binding LayerColor}" />
</Grid> </Grid>
</HierarchicalDataTemplate> </HierarchicalDataTemplate>
@@ -535,7 +535,8 @@ Public Class ManageLayerExpanderVM
Public Sub Save(ByVal param As Object) Public Sub Save(ByVal param As Object)
Dim sDir As String = String.Empty Dim sDir As String = String.Empty
GetPrivateProfileString(S_GENERAL, K_LASTNGEOBJDIR, "", sDir) GetPrivateProfileString(S_GENERAL, K_LASTNGEOBJDIR, "", sDir)
Map.refProjectVM.SaveObject(New SaveObjectParam(m_RightClickedTreeItemId, sDir, OptionModule.m_nGeomDBSaveType)) Dim nType As NGE = DirectCast(GetPrivateProfileInt(S_GEOMDB, K_SAVETYPE, NGE.CMPTEXT), NGE)
Map.refProjectVM.SaveObject(New SaveObjectParam(m_RightClickedTreeItemId, sDir, nType))
End Sub End Sub
#End Region ' SaveCommand #End Region ' SaveCommand
@@ -322,7 +322,7 @@ Public Class DispositionParameterExpanderVM
StringToLen(Values(2), dSupp) StringToLen(Values(2), dSupp)
End If End If
Else Else
m_InputErrorMsg = "Il valore non è un punto X,Y o X,Y,Z" m_InputErrorMsg = "Il valore non è un punto X,Y"
OnPropertyChanged("InputErrorMsg") OnPropertyChanged("InputErrorMsg")
Return Return
End If End If
@@ -429,29 +429,6 @@ Public Class DispositionParameterExpanderVM
Select Case m_ActiveObject Select Case m_ActiveObject
Case ObjectType.RAWPART Case ObjectType.RAWPART
If EgtRotateRawPart(nSelId, vtRotAx, InputAngle) Then If EgtRotateRawPart(nSelId, vtRotAx, InputAngle) Then
' Se rotazione attorno ad asse diverso da Z
If Math.Abs( InputAngle) > EPS_ANG_ZERO AndAlso
( Math.Abs( vtRotAx.x) > EPS_ZERO OrElse Math.Abs( vtRotAx.y) > EPS_ZERO) Then
' Elimino eventuale vecchio supporto
Dim nOldSuppId As Integer = EgtGetFirstNameInGroup(nSelId, SUPPORT)
EgtErase( nOldSuppId)
' Se necessario, aggiungo nuovo supporto
Dim ptRawRefPoint As Point3d = DispositionUtility.GetRawPartRefPoint(nSelId, m_RawRefPosition)
Dim dSupp As Double = ptRawRefPoint.z
If dSupp > EPS_SMALL Then
Dim nNewSuppId As Integer = GDB_ID.NULL
Dim nRawOutLnId As Integer = EgtGetFirstNameInGroup(nSelId, RAWOUTLINE)
If nRawOutLnId <> GDB_ID.NULL Then
Dim vtExtr As New Vector3d( 0, 0, -dSupp)
nNewSuppId = EgtCreateSurfTmByRegionExtrusion( nSelId, 1, {nRawOutLnId}, vtExtr, 0.05, GDB_RT.GLOB)
End If
If nNewSuppId <> GDB_ID.NULL Then
EgtSetName( nNewSuppId, SUPPORT)
EgtSetColor( nNewSuppId, New Color3d(150, 75, 0))
If nOldSuppId <> GDB_ID.NULL Then EgtChangeId( nNewSuppId, nOldSuppId)
End If
End If
End If
Dim vtOrigMove As Vector3d = Vector3d.NULL() Dim vtOrigMove As Vector3d = Vector3d.NULL()
Dim vtRefMove As Vector3d = Vector3d.NULL() Dim vtRefMove As Vector3d = Vector3d.NULL()
DispositionUtility.VerifyRawPosition(nSelId, vtOrigMove, vtRefMove) DispositionUtility.VerifyRawPosition(nSelId, vtOrigMove, vtRefMove)
@@ -119,7 +119,11 @@ Public Class MachiningParameterExpanderVM
End Set End Set
End Property End Property
Friend Sub ResetSliderValue() Friend Sub ResetSliderValue()
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER) If m_nPreviewMachiningTool = MCH_LOOK.TAB_TOOL OrElse m_nPreviewMachiningTool = MCH_LOOK.TAB_HEAD Then
m_nPtEntId = EgtPreviewMachiningTool(GDB_ID.NULL, MCH_PTM.AFTER)
Else
m_nPtEntId = GDB_ID.NULL
End If
m_SliderValue = 1 m_SliderValue = 1
NotifyPropertyChanged(NameOf(SliderValue)) NotifyPropertyChanged(NameOf(SliderValue))
End Sub End Sub
@@ -184,11 +188,7 @@ Public Class MachiningParameterExpanderVM
Dim nType As Integer Dim nType As Integer
EgtGetMachiningParam(MCH_MP.NAME, sName) EgtGetMachiningParam(MCH_MP.NAME, sName)
EgtGetMachiningParam(MCH_MP.TYPE, nType) EgtGetMachiningParam(MCH_MP.TYPE, nType)
Dim oldValue As Boolean = If(Not IsNothing(m_CurrOperation), m_CurrOperation.AdvancedParamIsExpander, False)
Dim oldOperation As MachiningTreeViewItem = If(Not IsNothing(m_CurrOperation), m_CurrOperation, Nothing)
m_CurrOperation = New MachiningTreeViewItem(sName, DirectCast(nType, MCH_MY)) m_CurrOperation = New MachiningTreeViewItem(sName, DirectCast(nType, MCH_MY))
m_CurrOperation.AdvancedParamIsExpander = oldValue
m_CurrOperation.ReadOperationParam() m_CurrOperation.ReadOperationParam()
@@ -251,7 +251,8 @@ Public Class MachiningParameterExpanderVM
If MatType = MaterialType.STONE5 Then If MatType = MaterialType.STONE5 Then
' se macchina di tipo STONE ricavo il tipo di utensile ' se macchina di tipo STONE ricavo il tipo di utensile
Dim sMachiningToolName = String.Empty Dim sMachiningToolName = String.Empty
EgtGetMachiningParam(MCH_MP.TOOL, sMachiningToolName) EgtMdbSetCurrMachining(sName)
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sMachiningToolName)
EgtTdbSetCurrTool(sMachiningToolName) EgtTdbSetCurrTool(sMachiningToolName)
Dim dValue As Double = 0 Dim dValue As Double = 0
Dim nToolType As Integer Dim nToolType As Integer
@@ -425,7 +426,7 @@ Public Class MachiningParameterExpanderVM
Dim sErrorList As String = String.Empty Dim sErrorList As String = String.Empty
For Each [property] As String In EgtWPFLib5.MachiningTreeViewItem.ValidatedProperties For Each [property] As String In EgtWPFLib5.MachiningTreeViewItem.ValidatedProperties
If Not String.IsNullOrEmpty(m_CurrOperation.GetErrorString([property])) Then If Not String.IsNullOrEmpty(m_CurrOperation.GetErrorString([property])) Then
sErrorList += vbCrLf + " - " + m_CurrOperation.GetErrorString([property]) sErrorList += Environment.NewLine + " - " + m_CurrOperation.GetErrorString([property])
End If End If
Next [property] Next [property]
MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(EgtMsg(5423) + sErrorList, EgtMsg(30009), MessageBoxButton.OK, MessageBoxImage.Exclamation)
@@ -129,8 +129,13 @@
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=SideAngle, ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
@@ -146,13 +151,8 @@
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}" Style="{DynamicResource StringParamV_Margin}"
Visibility="{Binding Epicycles_Visibility}"/> Visibility="{Binding Epicycles_Visibility}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=OffSr, ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
@@ -119,21 +119,24 @@
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamCmBxList="{Binding Path=LeadOutTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar, ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel> </StackPanel>
</Expander> </Expander>
@@ -249,62 +252,6 @@
</Grid> </Grid>
</Expander> </Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
ParamTxBx="{Binding Path=LiTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevTxBl}"
ParamTxBx="{Binding Path=LiElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamCmBxList="{Binding Path=LeadOutTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
ParamTxBx="{Binding Path=LoTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoElevTxBl}"
ParamTxBx="{Binding Path=LoElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/> <TextBlock Text="{Binding ToolExpanderHeader}"/>
@@ -93,12 +93,6 @@
ParamCmBxSelIndex="{Binding Path=SelectedSubType}" ParamCmBxSelIndex="{Binding Path=SelectedSubType}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}" <TextBlock Text="{Binding UserNotesTxBl}"
@@ -137,24 +131,6 @@
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}" ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel> </StackPanel>
</Expander> </Expander>
@@ -295,6 +271,22 @@
</StackPanel> </StackPanel>
</Expander> </Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<TextBlock Text="{Binding OffsetGpBxLbl}"/>
</Expander.Header>
<UniformGrid Columns="1">
<EgtWPFLib5:StringParamV Grid.Row="0"
ParamTxBl="{Binding OffSrTxBl}"
ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</UniformGrid>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<TextBlock Text="{Binding ToolExpanderHeader}"/> <TextBlock Text="{Binding ToolExpanderHeader}"/>
@@ -82,12 +82,12 @@
Style="{DynamicResource MPExpander_DepthTxBxMargin}"/> Style="{DynamicResource MPExpander_DepthTxBxMargin}"/>
</UniformGrid> </UniformGrid>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=HeadSideList, ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}" ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2"> <UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}" <TextBlock Text="{Binding UserNotesTxBl}"
@@ -111,6 +111,12 @@
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding HeadSideTxBl}"
ParamCmBxList="{Binding Path=HeadSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedHeadSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0" <EgtWPFLib5:StringParamV Grid.Column="0" Grid.Row="0"
ParamTxBl="{Binding StartPosTxBl}" ParamTxBl="{Binding StartPosTxBl}"
ParamTxBx="{Binding Path=StartPos, ParamTxBx="{Binding Path=StartPos,
@@ -123,18 +129,6 @@
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}" ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/> Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel> </StackPanel>
</Expander> </Expander>
@@ -253,13 +247,6 @@
<Expander Header="{Binding StepGpBxLbl}" <Expander Header="{Binding StepGpBxLbl}"
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1"> Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
<StackPanel> <StackPanel>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding StepTypeTxBl}"
ParamCmBxList="{Binding Path=StepTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedStepType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding StepParTxBl}"
ParamTxBx="{Binding Path=StepPar, ParamTxBx="{Binding Path=StepPar,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
@@ -54,22 +54,9 @@ Public Class OperationListBoxItem
End If End If
' E' possibile selezionare più lavorazioni solo se della stessa fase ' E' possibile selezionare più lavorazioni solo se della stessa fase
If value AndAlso indexes.Count > 0 Then If indexes.Count > 0 Then
If EgtGetOperationPhase(Id) <> EgtGetOperationPhase(indexes(0).Id) Then If EgtGetOperationPhase(Id) <> EgtGetOperationPhase(indexes(0).Id) Then
' Se premuto Shift o Ctrl impedisco la selezione Return
If (Keyboard.Modifiers And ( ModifierKeys.Shift Or ModifierKeys.Control)) <> 0 Then Return
' Altrimenti deseleziono i precedenti
For Ind As Integer = 0 To indexes.Count - 1
indexes(Ind).m_IsSelected = False
' La de-evidenzio
Dim bEnabModif As Boolean = EgtGetEnableModified()
EgtDisableModified()
Dim nId As Integer = indexes(Ind).Id
EgtResetMark(EgtGetFirstNameInGroup(nId, MCH_MGR_CL))
EgtResetMark(EgtGetFirstNameInGroup(nId, MCH_MGR_DBL))
EgtSetStatus(EgtGetFirstNameInGroup(nId, MCH_MGR_AUXVIEW), GDB_ST.OFF)
If bEnabModif Then EgtEnableModified()
Next
End If End If
End If End If
@@ -179,6 +179,9 @@ Public Class OperationParametersExpanderVM
Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomProbing Map.refProjectVM.SceneSelMode = OptionModule.m_SelGeomProbing
End Select End Select
' Imposto visualizzazione utensile ' Imposto visualizzazione utensile
'Map.refMachiningParameterExpanderVM.SetPreviewMachiningTool(MCH_LOOK.TAB_TOOL)
'Map.refMachiningParameterExpanderVM.SetToolPreview_Image("pack://application:,,,/Resources/ToolPreview/Tool.png")
'Map.refMachiningParameterExpanderVM.SetSlider_IsEnable(True)
EgtPreparePreviewMachiningTool() EgtPreparePreviewMachiningTool()
Map.refMachiningParameterExpanderVM.PreviewMachiningTool() Map.refMachiningParameterExpanderVM.PreviewMachiningTool()
EgtDraw() EgtDraw()
@@ -464,16 +464,12 @@ Public Class OperationsListExpanderVM
selOperation = Operation selOperation = Operation
End If End If
Next Next
If IsNothing( selOperation) Then Return
If EgtGetOperationMode(selOperation.Id) Then If EgtGetOperationMode(selOperation.Id) Then
Map.refOperationParametersExpanderVM.ParametersIsExpanded = True Map.refOperationParametersExpanderVM.ParametersIsExpanded = True
If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount()) Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.ResetSliderValue() Map.refMachiningParameterExpanderVM.ResetSliderValue()
If Map.refMachiningParameterExpanderVM.CurrOperation.NotesListCombo.Count > 0 Then
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_Visibility(Visibility.Visible)
End If
EgtDraw() EgtDraw()
End If End If
End If End If
@@ -784,10 +780,6 @@ Public Class OperationsListExpanderVM
End If End If
' Ricarico la lista operazioni aggiornata ' Ricarico la lista operazioni aggiornata
LoadOperationList(MachiningId) LoadOperationList(MachiningId)
' Aggiunto controllo visibilita' pulsante aggiungi note
If Map.refMachiningParameterExpanderVM.CurrOperation.NotesListCombo.Count > 0 Then
Map.refMachiningParameterExpanderVM.CurrOperation.SetShowNoteListCombo_Visibility(Visibility.Visible)
End If
End Sub End Sub
#End Region ' DuplicateMachCommand #End Region ' DuplicateMachCommand
@@ -1094,11 +1086,15 @@ Public Class OperationsListExpanderVM
If Operation.Id = nSelectedOperation Then If Operation.Id = nSelectedOperation Then
OperationFound = True OperationFound = True
Operation.IsSelected = True Operation.IsSelected = True
Else Exit For
Operation.IsSelected = False
End If End If
Next Next
If Not OperationFound Then If Not OperationFound Then
For Each Operation In OperationList
If Operation.IsSelected Then
Operation.IsSelected = False
End If
Next
OperationList(0).IsSelected = True OperationList(0).IsSelected = True
End If End If
End If End If
@@ -7,6 +7,8 @@ Public Class SimulationExpanderVM
#Region "FIELDS & PROPERTIES" #Region "FIELDS & PROPERTIES"
'GRAPHICAL PROPERTIES
Private m_Simulation_IsExpanded As Boolean Private m_Simulation_IsExpanded As Boolean
Public Overridable Property Simulation_IsExpanded As Boolean Public Overridable Property Simulation_IsExpanded As Boolean
Get Get
@@ -61,8 +63,6 @@ Public Class SimulationExpanderVM
Private m_bStopOnNextCollision As Boolean = True Private m_bStopOnNextCollision As Boolean = True
Private m_bEnableShowVmill As Boolean = False
#End Region ' FIELDS & PROPERTIES #End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
@@ -91,41 +91,17 @@ Public Class SimulationExpanderVM
' Verifico se richiesta anche visualizzazione del CN ' Verifico se richiesta anche visualizzazione del CN
Dim bNcView As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) Dim bNcView As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift)
' Verifico se richiesto anche nome del CN
Dim bNcName As Boolean = ((Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control)
' Recupero la fase corrente ' Recupero la fase corrente
Dim nPhase As Integer = Math.Max( EgtGetCurrPhase(), 1) Dim nPhase As Integer = EgtGetCurrPhase()
' Aggiorno le lavorazioni ' Aggiorno le lavorazioni
If Not UpdateAllMachinings() Then If Not UpdateAllMachinings() Then
EgtSetCurrPhase(nPhase, True) EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
Return Return
End If End If
' Recupero nome file CN (dopo aver verificato salvataggio progetto) ' Recupero nome file CN (dopo aver verificato salvataggio progetto)
Dim sCncFile As String = "" Dim sCncFile As String = ""
Dim sInfo As String = "" Dim sInfo As String = ""
If Not GetCncFileName(True, sCncFile, sInfo) Then If Not GetCncFileName(True, sCncFile, sInfo) Then Return
EgtSetCurrPhase(nPhase, True)
Return
End If
' Se richiesta scelta del nome file
If bNcName Then
Dim sExt As String = Path.GetExtension( sCncFile)
Dim NewSaveFileDialog As New Windows.Forms.SaveFileDialog With {.Title = "PartProgram File Name",
.Filter = "|*" & sExt,
.FilterIndex = 1,
.InitialDirectory = System.IO.Path.GetDirectoryName(sCncFile),
.FileName = sCncFile,
.CreatePrompt = True,
.OverwritePrompt = True,
.ValidateNames = False}
If NewSaveFileDialog.ShowDialog() = Forms.DialogResult.Ok Then
sCncFile = NewSaveFileDialog.FileName
End If
End If
' Eseguo ' Eseguo
If Not EgtGenerate(sCncFile, sInfo) Then If Not EgtGenerate(sCncFile, sInfo) Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId() Dim nErr As Integer = EgtGetLastMachMgrErrorId()
@@ -144,7 +120,7 @@ Public Class SimulationExpanderVM
Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(5332) & " (" & sCncFile & ")") Map.refStatusBarVM.NotifyStatusOutput(EgtMsg(5332) & " (" & sCncFile & ")")
End If End If
' Torno alla fase originale (o alla prima se non definita) ' Torno alla fase originale (o alla prima se non definita)
EgtSetCurrPhase(nPhase, True) EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
' Se richiesta anche la visualizzazione del CN corrente, procedo ' Se richiesta anche la visualizzazione del CN corrente, procedo
If bNcView Then If bNcView Then
@@ -277,7 +253,6 @@ Public Class SimulationExpanderVM
EgtUILib.GetPrivateProfileInt(S_VMILL, K_VM_ENABLE, 0, m_sCurrMachIniFilePath) <> 0 Then EgtUILib.GetPrivateProfileInt(S_VMILL, K_VM_ENABLE, 0, m_sCurrMachIniFilePath) <> 0 Then
VMill_Visibility = Visibility.Visible VMill_Visibility = Visibility.Visible
VMill_IsEnabled = True VMill_IsEnabled = True
m_bEnableShowVmill = (EgtUILib.GetPrivateProfileInt(S_VMILL, K_VM_ENABLE, 0, m_sCurrMachIniFilePath) = 2)
Dim bVal As Boolean Dim bVal As Boolean
SetVMillActive(EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, bVal) And bVal) SetVMillActive(EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, bVal) And bVal)
Else Else
@@ -328,8 +303,6 @@ Public Class SimulationExpanderVM
End If End If
Dim nShowDataCounter As Integer = 0 Dim nShowDataCounter As Integer = 0
While GetStatus() <> MCH_SIM_ST.UI_STOP While GetStatus() <> MCH_SIM_ST.UI_STOP
' Abilito check VMill
If m_bEnableShowVmill Then VMill_IsEnabled = True
' Se simulazione in svolgimento ' Se simulazione in svolgimento
If GetStatus() = MCH_SIM_ST.UI_PLAY Or GetStatus() = MCH_SIM_ST.UI_STEP Then If GetStatus() = MCH_SIM_ST.UI_PLAY Or GetStatus() = MCH_SIM_ST.UI_STEP Then
' Eseguo movimento ' Eseguo movimento
@@ -441,17 +414,11 @@ Public Class SimulationExpanderVM
End Sub End Sub
Public Overrides Sub VMillActiveInfoTitle(VMillActive As Boolean) Public Overrides Sub VMillActiveInfoTitle(VMillActive As Boolean)
Dim bModified As Boolean = EgtGetModified()
If VMillActive Then If VMillActive Then
EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, VMillActive) EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, VMillActive)
Else Else
EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM) EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM)
End If End If
If m_bEnableShowVmill And Not bModified Then EgtResetModified()
If m_bEnableShowVmill Then
EgtSimShowVMill( VMillActive)
EgtDraw()
End If
Map.refProjectVM.EmitTitle() Map.refProjectVM.EmitTitle()
End Sub End Sub
@@ -492,7 +459,7 @@ Public Class SimulationExpanderVM
sInfo &= "-" & sMGrpName sInfo &= "-" & sMGrpName
End If End If
End If End If
Dim sExt As String = ".cnc" Dim sExt As String = ".cnc"
EgtUILib.GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, sExt, sExt, IniFile.m_sCurrMachIniFilePath) EgtUILib.GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, sExt, sExt, IniFile.m_sCurrMachIniFilePath)
sCncFile = Path.ChangeExtension(sCncFile, sExt) sCncFile = Path.ChangeExtension(sCncFile, sExt)
End If End If
+1 -1
View File
@@ -6,7 +6,7 @@
<Grid x:Name="MachiningGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}"> <Grid x:Name="MachiningGrid" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition MinHeight="100" Height="400" MaxHeight="600" <RowDefinition MinHeight="100" Height="400" MaxHeight="800"
EgtCAM5:MachiningOptionPanelVM.IsExpanded="{Binding OperationsListRowIsExpanded}" EgtCAM5:MachiningOptionPanelVM.IsExpanded="{Binding OperationsListRowIsExpanded}"
EgtCAM5:MachiningOptionPanelVM.TargetSplitter="{Binding ElementName=MachiningGridSplitter}"/> EgtCAM5:MachiningOptionPanelVM.TargetSplitter="{Binding ElementName=MachiningGridSplitter}"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
-7
View File
@@ -16,8 +16,6 @@ Friend Module OptionModule
Friend m_ShowSurfQuality As SceneSurfQualityOpt Friend m_ShowSurfQuality As SceneSurfQualityOpt
' Tipo di visualizzazione delle Zmap ' Tipo di visualizzazione delle Zmap
Friend m_nShowZmapType As Integer Friend m_nShowZmapType As Integer
' Formato di salvataggio del progetto
Friend m_nGeomDBSaveType As NGE
' Colore di default in disegno ' Colore di default in disegno
Friend m_DefMaterialColor As Color3d Friend m_DefMaterialColor As Color3d
@@ -73,7 +71,6 @@ Friend Module OptionModule
' Variabili per gli Extra ' Variabili per gli Extra
Friend m_bSpecialOn As Boolean Friend m_bSpecialOn As Boolean
Friend m_bBeamNTOn As Boolean
Friend m_bBeamOn As Boolean Friend m_bBeamOn As Boolean
Friend m_bWallOn As Boolean Friend m_bWallOn As Boolean
Friend m_bDoorsOn As Boolean Friend m_bDoorsOn As Boolean
@@ -124,9 +121,6 @@ Friend Module OptionModule
m_ShowSurfQuality = DirectCast( Math.Min( Math.Max( nSSQ, -2), 2), SceneSurfQualityOpt) m_ShowSurfQuality = DirectCast( Math.Min( Math.Max( nSSQ, -2), 2), SceneSurfQualityOpt)
' Inizializzo tipo di visualizzazione Zmap ' Inizializzo tipo di visualizzazione Zmap
m_nShowZmapType = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 9) m_nShowZmapType = GetPrivateProfileInt(S_SCENE, K_SHOWZMAP, 9)
' Inizializzo formato di salvataggio del progetto
Dim nGST As Integer = GetPrivateProfileInt(S_GEOMDB, K_SAVETYPE, NGE.CMPTEXT)
m_nGeomDBSaveType = DirectCast( Math.Min( Math.Max( nGST, 0), 3), NGE)
' Inizio colore di default in disegno ' Inizio colore di default in disegno
Dim DefColor As New Color3d(0, 0, 0) Dim DefColor As New Color3d(0, 0, 0)
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor) GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
@@ -190,7 +184,6 @@ Friend Module OptionModule
m_bUseDispositionScript = (GetPrivateProfileInt(S_OPTIONS, K_USEDISPOSITIONSCRIPT, 0) <> 0) m_bUseDispositionScript = (GetPrivateProfileInt(S_OPTIONS, K_USEDISPOSITIONSCRIPT, 0) <> 0)
' Inizializzo variabili per Extra ' Inizializzo variabili per Extra
m_bSpecialOn = (GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0) m_bSpecialOn = (GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0)
m_bBeamNTOn = (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTENABLE, 0) <> 0)
m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0) m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0) m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0) m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
+18 -43
View File
@@ -15,7 +15,6 @@
<EgtWPFLib5:EgtCustomWindow.Resources> <EgtWPFLib5:EgtCustomWindow.Resources>
<local:GeomTypeConverter x:Key="GeomTypeConverter"/> <local:GeomTypeConverter x:Key="GeomTypeConverter"/>
<local:SceneSurfQualityOptConverter x:Key="SceneSurfQualityOptConverter"/> <local:SceneSurfQualityOptConverter x:Key="SceneSurfQualityOptConverter"/>
<local:GeomDBSaveTypeConverter x:Key="GeomDBSaveTypeConverter"/>
<local:VMillTypeConverter x:Key="VMillTypeConverter"/> <local:VMillTypeConverter x:Key="VMillTypeConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources> </EgtWPFLib5:EgtCustomWindow.Resources>
@@ -86,7 +85,7 @@
SelectedItem="{Binding SelectedTextFont}" Height="25" SelectedItem="{Binding SelectedTextFont}" Height="25"
Margin="10,5,0,0"/> Margin="10,5,0,0"/>
</UniformGrid> </UniformGrid>
<GroupBox Header="Show Zmap" <GroupBox Header="ShowZmap"
Visibility="{Binding ShowZmapVisibility}" Visibility="{Binding ShowZmapVisibility}"
Margin="0,0,0,5"> Margin="0,0,0,5">
<Grid> <Grid>
@@ -110,23 +109,7 @@
Grid.Row="0" Grid.Column="3" Margin="5,5,10,5" VerticalAlignment="Center"/> Grid.Row="0" Grid.Column="3" Margin="5,5,10,5" VerticalAlignment="Center"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
<UniformGrid Columns="2" <Grid Margin="5,100,5,5">
Margin="0,0,0,5">
<TextBlock Text="GeomDB SaveType" VerticalAlignment="Center"
Visibility="{Binding GeomDBSaveTypeVisibility}"
Grid.Row="1" Margin="0,5,0,5"/>
<ComboBox ItemsSource="{Binding GeomDBSaveTypeOptList, Mode=OneWay}"
Visibility="{Binding GeomDBSaveTypeVisibility}"
SelectedItem="{Binding SelectedGeomDBSaveType}"
Grid.Column="1" Grid.Row="1" Height="25" Margin="10,5,0,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource GeomDBSaveTypeConverter}}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</UniformGrid>
<Grid Margin="5,75,5,5">
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/> <Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
@@ -465,7 +448,6 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{Binding BeamMsg}" <TextBlock Text="{Binding BeamMsg}"
Grid.Row="0" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="0" Grid.Column="0" Margin="0,5,0,5"/>
@@ -474,47 +456,40 @@
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}" <Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}"
Command="{Binding UpdateBeam_Command}" Command="{Binding UpdateBeam_Command}"
Grid.Row="0" Grid.Column="2" Height="26"/> Grid.Row="0" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding BeamNTMsg}"
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding BeamNTOn}" IsEnabled="{Binding BeamNTEnabled}"
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamNTActive}"
Command="{Binding UpdateBeamNT_Command}"
Grid.Row="1" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding WallMsg}" <TextBlock Text="{Binding WallMsg}"
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}" <CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}"
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}" <Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}"
Command="{Binding UpdateWall_Command}" Command="{Binding UpdateWall_Command}"
Grid.Row="2" Grid.Column="2" Height="26"/> Grid.Row="1" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center" <TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center"
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}" <CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}"
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding DoorsActive}" <Button Content="{Binding UpdateMsg}" IsEnabled="{Binding DoorsActive}"
Command="{Binding UpdateDoors_Command}" Command="{Binding UpdateDoors_Command}"
Grid.Row="3" Grid.Column="2" Height="26"/> Grid.Row="2" Grid.Column="2" Height="26"/>
<TextBlock Text="{Binding WindowMsg}" VerticalAlignment="Center" <TextBlock Text="{Binding WindowMsg}" VerticalAlignment="Center"
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding WindowOn}" IsEnabled="{Binding WindowEnabled}" <CheckBox IsChecked="{Binding WindowOn}" IsEnabled="{Binding WindowEnabled}"
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding TrimmingMsg}" VerticalAlignment="Center" <TextBlock Text="{Binding TrimmingMsg}" VerticalAlignment="Center"
Grid.Row="5" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding TrimmingOn}" IsEnabled="{Binding TrimmingEnabled}" <CheckBox IsChecked="{Binding TrimmingOn}" IsEnabled="{Binding TrimmingEnabled}"
Grid.Row="5" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding ReversePostMsg}" VerticalAlignment="Center" <TextBlock Text="{Binding ReversePostMsg}" VerticalAlignment="Center"
Grid.Row="6" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="5" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding ReversePostOn}" IsEnabled="{Binding ReversePostEnabled}" <CheckBox IsChecked="{Binding ReversePostOn}" IsEnabled="{Binding ReversePostEnabled}"
Grid.Row="6" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="5" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center" <TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
Grid.Row="7" Grid.Column="0" Margin="0,5,0,5"/> Grid.Row="6" Grid.Column="0" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}" <CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
Grid.Row="7" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="6" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding SpecialMsg}" <TextBlock Text="{Binding SpecialMsg}"
Grid.Row="8" Margin="0,5,0,5"/> Grid.Row="7" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SpecialOn}" <CheckBox IsChecked="{Binding SpecialOn}"
Grid.Row="8" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/> Grid.Row="7" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
</Grid> </Grid>
</StackPanel> </StackPanel>
</TabItem> </TabItem>
+6 -179
View File
@@ -58,13 +58,6 @@ Public Class OptionWindowVM
End Get End Get
End Property End Property
Private m_GeomDBSaveType As ObservableCollection(Of NGE) = New ObservableCollection(Of NGE)({NGE.TEXT, NGE.BIN, NGE.CMPTEXT, NGE.CMPBIN})
Public ReadOnly Property GeomDBSaveTypeOptList As ObservableCollection(Of NGE)
Get
Return m_GeomDBSaveType
End Get
End Property
Private m_ScaleDXFList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 46)}) Private m_ScaleDXFList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 46)})
Public ReadOnly Property ScaleDXFList As List(Of String) Public ReadOnly Property ScaleDXFList As List(Of String)
Get Get
@@ -124,17 +117,6 @@ Public Class OptionWindowVM
End Set End Set
End Property End Property
Public Property SelectedGeomDBSaveType As NGE
Get
Return OptionModule.m_nGeomDBSaveType
End Get
Set(value As NGE)
If WritePrivateProfileString(S_GEOMDB, K_SAVETYPE, CInt(value).ToString()) Then
OptionModule.m_nGeomDBSaveType = value
End If
End Set
End Property
Public Property SelectedMillingGeomType As SceneSelModeOpt Public Property SelectedMillingGeomType As SceneSelModeOpt
Get Get
Return OptionModule.m_SelGeomMilling Return OptionModule.m_SelGeomMilling
@@ -195,7 +177,7 @@ Public Class OptionWindowVM
End If End If
End Set End Set
End Property End Property
Public Property SelectedGenGeomType As SceneSelModeOpt Public Property SelectedGenGeomType As SceneSelModeOpt
Get Get
Return OptionModule.m_SelGeomGenMachining Return OptionModule.m_SelGeomGenMachining
End Get End Get
@@ -205,7 +187,7 @@ Public Class OptionWindowVM
End If End If
End Set End Set
End Property End Property
Public Property SelectedSurfRoughGeomType As SceneSelModeOpt Public Property SelectedSurfRoughGeomType As SceneSelModeOpt
Get Get
Return OptionModule.m_SelGeomSurfRoughing Return OptionModule.m_SelGeomSurfRoughing
End Get End Get
@@ -831,26 +813,6 @@ Public Class OptionWindowVM
End Set End Set
End Property End Property
Public ReadOnly Property BeamNTEnabled As Boolean
Get
Return ((IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0) AndAlso (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTENABLE, -1) >= 0)
End Get
End Property
Public ReadOnly Property BeamNTActive As Boolean
Get
Return IniFile.IsActiveBeamNT()
End Get
End Property
Public Property BeamNTOn As Boolean
Get
Return BeamNTEnabled AndAlso OptionModule.m_bBeamNTOn
End Get
Set(value As Boolean)
OptionModule.m_bBeamNTOn = value
WritePrivateProfileString(S_BEAMNT, K_BEAMNTENABLE, If(value, "1", "0"))
End Set
End Property
Public ReadOnly Property BeamEnabled As Boolean Public ReadOnly Property BeamEnabled As Boolean
Get Get
Return (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 Return (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0
@@ -981,7 +943,6 @@ Public Class OptionWindowVM
Private m_cmdDefMaterialColor As ICommand Private m_cmdDefMaterialColor As ICommand
Private m_cmdAddMachineCmd As ICommand Private m_cmdAddMachineCmd As ICommand
Private m_cmdExportMachineCmd As ICommand Private m_cmdExportMachineCmd As ICommand
Private m_cmdUpdateBeamNTCmd As ICommand
Private m_cmdUpdateBeamCmd As ICommand Private m_cmdUpdateBeamCmd As ICommand
Private m_cmdUpdateWallCmd As ICommand Private m_cmdUpdateWallCmd As ICommand
Private m_cmdUpdateDoorsCmd As ICommand Private m_cmdUpdateDoorsCmd As ICommand
@@ -1234,11 +1195,6 @@ Public Class OptionWindowVM
Return "Special" Return "Special"
End Get End Get
End Property End Property
Public ReadOnly Property BeamNTMsg As String
Get
Return "BeamNT"
End Get
End Property
Public ReadOnly Property BeamMsg As String Public ReadOnly Property BeamMsg As String
Get Get
Return "Beam" Return "Beam"
@@ -1333,12 +1289,6 @@ Public Class OptionWindowVM
End Get End Get
End Property End Property
Public ReadOnly Property GeomDBSaveTypeVisibility As Visibility
Get
Return If( (IniFile.m_nUserLevel > 5), Visibility.Visible, Visibility.Collapsed)
End Get
End Property
#End Region #End Region
@@ -1520,7 +1470,7 @@ Public Class OptionWindowVM
End If End If
End Sub End Sub
#End Region ' UpdateLicence #End Region ' AddMachine
#Region "AddMachine" #Region "AddMachine"
@@ -1758,109 +1708,6 @@ Public Class OptionWindowVM
#End Region ' ExportMachine #End Region ' ExportMachine
#Region "UpdateBeamNT"
Public ReadOnly Property UpdateBeamNT_Command() As ICommand
Get
If m_cmdUpdateBeamNTCmd Is Nothing Then
m_cmdUpdateBeamNTCmd = New RelayCommand(AddressOf UpdateBeamNTCmd)
End If
Return m_cmdUpdateBeamNTCmd
End Get
End Property
Public Sub UpdateBeamNTCmd()
' Recupero la versione del programma in esecuzione
Dim sExeVer As String = IniFile.GetProgramVersion()
' Verifico presenza di una precedente installazione del Beam
Dim sBeamNTVer As String = ""
IniFile.GetSpecialLuaVersion(IniFile.m_sBeamNTDirPath, sBeamNTVer)
If String.IsNullOrEmpty(sBeamNTVer) Then
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
Dim sOut As String = String.Format(EgtMsg(6555), "BeamNT")
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Esco
Return
End If
' Apro dialogo per richiesta file zip del BeamNT
Dim BeamNTDlg As New Microsoft.Win32.OpenFileDialog() With {
.DefaultExt = ".zip",
.Filter = "BeamNT (.zip)|*.zip",
.CheckFileExists = True,
.ValidateNames = True
}
If BeamNTDlg.ShowDialog() <> True Then Return
Dim sBeamZip As String = BeamNTDlg.FileName
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "BeamNT")
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sBeamZip)
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Recupero i dati del nuovo Beam
Dim sNewName = ""
Dim sNewVer = ""
Dim sNewMinExe = ""
IniFile.GetSpecialLuaData(sTempDir, sNewName, sNewVer, sNewMinExe)
' Verifico che sia veramente il BeamNT
If String.Compare(sNewName, "BeamNT") <> 0 Then
' Il file zip non contiene il modulo "{0}". - Avviso
Dim sOut As String = String.Format(EgtMsg(6556), "BeamNT")
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione minima del programma
If String.Compare(sExeVer, sNewMinExe) < 0 Then
' Il nuovo modulo "{0}" richiede un programma con versione minima {1}. - Avviso
Dim sOut As String = String.Format(EgtMsg(6557), "BeamNT", sNewMinExe)
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Verifico la versione del BeamNT e se più vecchia chiedo cosa fare
If String.Compare(sNewVer, sBeamNTVer) < 0 Then
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
Dim sOut As String = String.Format(EgtMsg(6558), "BeamNT")
If MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
End If
' Faccio una copia di backup del Beam corrente
Dim sBackupDir As String = IniFile.m_sBeamNTDirPath & ".old"
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
My.Computer.FileSystem.MoveDirectory(IniFile.m_sBeamNTDirPath, sBackupDir, True)
Catch ex As Exception
' Ripristino lo stato originale ed esco
My.Computer.FileSystem.MoveDirectory(sBackupDir, IniFile.m_sBeamNTDirPath, True)
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
Dim sOut As String = String.Format(EgtMsg(6559), "BeamNT")
EgtOutLog(sOut)
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End Try
' Installo il Beam
My.Computer.FileSystem.MoveDirectory(sTempDir, IniFile.m_sBeamNTDirPath, True)
' Il modulo "{0}" è stata aggiornato con successo. - Info
Dim sOk As String = String.Format(EgtMsg(6560), "BeamNT")
EgtOutLog(sOk)
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
End Sub
#End Region ' UpdateBeamNT
#Region "UpdateBeam" #Region "UpdateBeam"
Public ReadOnly Property UpdateBeam_Command() As ICommand Public ReadOnly Property UpdateBeam_Command() As ICommand
Get Get
@@ -1964,6 +1811,7 @@ Public Class OptionWindowVM
#End Region ' UpdateBeam #End Region ' UpdateBeam
#Region "UpdateWall" #Region "UpdateWall"
Public ReadOnly Property UpdateWall_Command() As ICommand Public ReadOnly Property UpdateWall_Command() As ICommand
Get Get
@@ -2067,6 +1915,7 @@ Public Class OptionWindowVM
#End Region ' UpdateWall #End Region ' UpdateWall
#Region "UpdateDoors" #Region "UpdateDoors"
Public ReadOnly Property UpdateDoors_Command() As ICommand Public ReadOnly Property UpdateDoors_Command() As ICommand
Get Get
@@ -2175,6 +2024,7 @@ Public Class OptionWindowVM
#End Region ' UpdateDoors #End Region ' UpdateDoors
#Region "CloseOptionsCommand" #Region "CloseOptionsCommand"
''' <summary> ''' <summary>
@@ -2284,29 +2134,6 @@ Public Class SceneSurfQualityOptConverter
End Function End Function
End Class End Class
Public Class GeomDBSaveTypeConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value)
Case NGE.TEXT
Return "Text"
Case NGE.BIN
Return "Binary"
Case NGE.CMPTEXT
Return "Compressed Text"
Case NGE.CMPBIN
Return "Compressed Binary"
Case Else
Return ""
End Select
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
Public Class VMillTypeConverter Public Class VMillTypeConverter
Implements IValueConverter Implements IValueConverter
+63 -3
View File
@@ -3,7 +3,6 @@
Public Class ProjectV Public Class ProjectV
Private m_bSpecial As Boolean = False Private m_bSpecial As Boolean = False
Private m_bBeamNT As Boolean = False
Private m_bBeam As Boolean = False Private m_bBeam As Boolean = False
Private m_bWall As Boolean = False Private m_bWall As Boolean = False
Private m_bDoors As Boolean = False Private m_bDoors As Boolean = False
@@ -20,9 +19,23 @@ Public Class ProjectV
Dim nIndex As Integer = -1 Dim nIndex As Integer = -1
Dim nLeft As Integer = -1 Dim nLeft As Integer = -1
Dim nTop As Integer = -1 Dim nTop As Integer = -1
'ShowPanel.IsFloating = False
'ViewPanel.IsFloating = False
''InstrumentPanel.IsFloating = False
'GridPanel.IsFloating = False
'DbPanel.IsFloating = False
'ExecutePanel.IsFloating = False
'SpecialPanel.IsFloating = False
'BeamPanel.IsFloating = False
'WallPanel.IsFloating = False
'BeamWallPanel.IsFloating = False
'DoorsPanel.IsFloating = False
'GunStockPanel.IsFloating = False
'DrawPanel.IsFloating = False
'OptionPanel.IsFloating = False
' MachGroupPanel.IsFloating = False
' Carico Pannelli Speciali ' Carico Pannelli Speciali
m_bSpecial = IniFile.IsActiveSpecialPanel() m_bSpecial = IniFile.IsActiveSpecialPanel()
m_bBeamNT = IniFile.IsActiveBeamNT()
m_bBeam = IniFile.IsActiveBeam() m_bBeam = IniFile.IsActiveBeam()
m_bWall = IniFile.IsActiveWall() m_bWall = IniFile.IsActiveWall()
m_bDoors = IniFile.IsActiveDoors() m_bDoors = IniFile.IsActiveDoors()
@@ -30,20 +43,67 @@ Public Class ProjectV
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)
'Select Case sState
' Case "TOP"
' FloatingPanel.ChangePosition(TOPTRAY)
' Case "BOTTOM"
' FloatingPanel.ChangePosition(BOTTOMTRAY)
' Case "LEFT"
' FloatingPanel.ChangePosition(LEFTTRAY)
' Case "RIGHT"
' FloatingPanel.ChangePosition(RIGHTTRAY)
' Case "FLOATING"
' FloatingPanel.ChangePosition(New Point(nLeft, nTop))
'End Select
End Sub End Sub
Friend Sub SetDbPanelVisibility() Friend Sub SetDbPanelVisibility()
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
End Sub End Sub
Friend Sub MachiningMode_IsChecked() Friend Sub MachiningMode_IsChecked()
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup) ''ShowPanel.Visibility = Visibility.Visible
'ViewPanel.Visibility = Visibility.Visible
''InstrumentPanel.Visibility = Visibility.Visible
'GridPanel.Visibility = Visibility.Visible
'DbPanel.Visibility = Visibility.Visible
'ExecutePanel.Visibility = Visibility.Collapsed
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True), Visibility.Visible, Visibility.Collapsed)
'BeamPanel.Visibility = Visibility.Collapsed
'WallPanel.Visibility = Visibility.Collapsed
'BeamWallPanel.Visibility = Visibility.Collapsed
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
'PrintingPanel.Visibility = Visibility.Collapsed
'GunStockPanel.Visibility = Visibility.Collapsed
'DrawPanel.Visibility = Visibility.Collapsed
'OptionPanel.Visibility = Visibility.Visible
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
'ViewPanel.Visibility = Visibility.Visible
''InstrumentPanel.Visibility = Visibility.Visible
'GridPanel.Visibility = Visibility.Visible
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
'ExecutePanel.Visibility = Visibility.Visible
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False), Visibility.Visible, Visibility.Collapsed)
'BeamPanel.Visibility = If(m_bBeam, 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)
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
'PrintingPanel.Visibility = If(m_bPrinting3d, Visibility.Visible, Visibility.Collapsed)
'GunStockPanel.Visibility = If(m_bGunStock, Visibility.Visible, Visibility.Collapsed)
'DrawPanel.Visibility = Visibility.Visible
'OptionPanel.Visibility = Visibility.Visible
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
' 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
' Salvo le posizioni di tutti gli EgtPanel
End Sub End Sub
End Class End Class
+16 -38
View File
@@ -248,13 +248,6 @@ Public Class ProjectVM
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.IsActiveBeamNT() Then
bExtensions = True
Dim sVersion As String = "---"
IniFile.GetSpecialLuaVersion(IniFile.m_sBeamNTDirPath, sVersion)
Dim sOut As String = "BeamNT ver. " & sVersion & " " & IniFile.m_sBeamNTDirPath
EgtOutLog(sOut)
End If
If IniFile.IsActiveWall() Then If IniFile.IsActiveWall() Then
bExtensions = True bExtensions = True
Dim sVersion As String = "---" Dim sVersion As String = "---"
@@ -549,10 +542,9 @@ Public Class ProjectVM
Map.refMainWindowVM.CloseApplicationCmd() Map.refMainWindowVM.CloseApplicationCmd()
Return Return
End If End If
IniFile.UpdateShowBeamNT( False)
' Esecuzione ' Esecuzione
bOk = ExecBeam(sFile, sMachine, nFlag, True, False) 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
@@ -629,42 +621,27 @@ Public Class ProjectVM
Map.refMainWindowVM.CloseApplicationCmd() Map.refMainWindowVM.CloseApplicationCmd()
Return Return
End If End If
' Se file bwe, gestione file da calcolare per Beam&Wall e AEdifica ' Se file bwe, gestione file da calcolare per Beam&Wall
If sExt = ".bwe" And Environment.GetCommandLineArgs.Count() > 2 Then If sExt = ".bwe" And Environment.GetCommandLineArgs.Count() > 2 Then
' recupero tipo di progetto : 1 = travi, 2 = pareti, 3 = sandwich (+10 per New Version) ' recupero tipo di progetto : 1 = travi, 2 = pareti, 3 = sandwich
Dim nBWType As Integer = 0 Dim nBWType As Integer = 0
If Environment.GetCommandLineArgs.Count() > 2 Then Integer.TryParse(Environment.GetCommandLineArgs(2), nBWType) If Environment.GetCommandLineArgs.Count() > 2 Then Integer.TryParse(Environment.GetCommandLineArgs(2), nBWType)
' recupero nome macchina ' recupero nome macchina
Dim sMachine As String = "" Dim sMachine As String = ""
If Environment.GetCommandLineArgs.Count() > 3 Then sMachine = Environment.GetCommandLineArgs(3) If Environment.GetCommandLineArgs.Count() > 3 Then sMachine = Environment.GetCommandLineArgs(3)
' Flag '' Flag
Dim nFlag As Integer = 0 Dim nFlag As Integer = 0
If Environment.GetCommandLineArgs.Count() > 4 Then Integer.TryParse(Environment.GetCommandLineArgs(4), nFlag) If Environment.GetCommandLineArgs.Count() > 4 Then Integer.TryParse(Environment.GetCommandLineArgs(4), nFlag)
' Stato di produzione
Dim nProductionState As Integer = -1
If Environment.GetCommandLineArgs.Count() > 5 Then Integer.TryParse(Environment.GetCommandLineArgs(5), nProductionState)
Dim bOk As Boolean = False Dim bOk As Boolean = False
' Se travi
If nBWType = 1 Then If nBWType = 1 Then
' Verifica abilitazione elaborazione travi ' Verifica abilitazione elaborazione travi
If Not VerifyBeam(sFile, sMachine, nFlag) Then If Not VerifyBeam(sFile, sMachine, nFlag) Then
Map.refMainWindowVM.CloseApplicationCmd() Map.refMainWindowVM.CloseApplicationCmd()
Return Return
End If End If
IniFile.UpdateShowBeamNT( False)
' Esecuzione ' Esecuzione
bOk = ExecBeam(sFile, sMachine, nFlag, False, nProductionState >= 0) bOk = ExecBeam(sFile, sMachine, nFlag, False)
' se altrimenti travi New ' altrimenti pareti
elseIf nBWType = 11 Then
' Verifica abilitazione elaborazione travi
If Not VerifyBeamNT(sFile, sMachine, nFlag) Then
Map.refMainWindowVM.CloseApplicationCmd()
Return
End If
IniFile.UpdateShowBeamNT( True)
' Esecuzione
bOk = ExecBeamNT(sFile, sMachine, nFlag, nProductionState >= 0)
' se 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
@@ -672,7 +649,7 @@ Public Class ProjectVM
Return Return
End If End If
' Esecuzione ' Esecuzione
bOk = ExecWall(sFile, sMachine, nFlag, False, nProductionState >= 0) 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 Or nFlag = 8 Then If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Or nFlag = 8 Then
@@ -793,25 +770,27 @@ Public Class ProjectVM
End Sub End Sub
Friend Sub SaveProject() Friend Sub SaveProject()
Dim nType As NGE = DirectCast(GetPrivateProfileInt(S_GEOMDB, K_SAVETYPE, NGE.CMPTEXT), NGE)
If Not String.IsNullOrWhiteSpace(m_Controller.GetCurrFile()) Then If Not String.IsNullOrWhiteSpace(m_Controller.GetCurrFile()) Then
m_Controller.SaveProject(OptionModule.m_nGeomDBSaveType) m_Controller.SaveProject(nType)
Else Else
Dim sFile As String = String.Empty Dim sFile As String = String.Empty
GetPrivateProfileString(S_GENERAL, K_LASTNGEDIR, "", sFile) GetPrivateProfileString(S_GENERAL, K_LASTNGEDIR, "", sFile)
sFile.TrimEnd("\"c) sFile.TrimEnd("\"c)
sFile += "\New" & IniFile.m_nInstance.ToString() & ".nge" sFile += "\New" & IniFile.m_nInstance.ToString() & ".nge"
m_Controller.SaveAsProject(sFile, OptionModule.m_nGeomDBSaveType) m_Controller.SaveAsProject(sFile, nType)
End If End If
End Sub End Sub
Friend Sub SaveAsProject() Friend Sub SaveAsProject()
Dim nType As NGE = DirectCast(GetPrivateProfileInt(S_GEOMDB, K_SAVETYPE, NGE.CMPTEXT), NGE)
Dim sFile As String = m_Controller.GetCurrFile() Dim sFile As String = m_Controller.GetCurrFile()
If String.IsNullOrWhiteSpace(sFile) Then If String.IsNullOrWhiteSpace(sFile) Then
GetPrivateProfileString(S_GENERAL, K_LASTNGEDIR, "", sFile) GetPrivateProfileString(S_GENERAL, K_LASTNGEDIR, "", sFile)
sFile.TrimEnd("\"c) sFile.TrimEnd("\"c)
sFile += "\New" & IniFile.m_nInstance.ToString() & ".nge" sFile += "\New" & IniFile.m_nInstance.ToString() & ".nge"
End If End If
m_Controller.SaveAsProject(sFile, OptionModule.m_nGeomDBSaveType) m_Controller.SaveAsProject(sFile, nType)
End Sub End Sub
Friend Sub InsertProject() Friend Sub InsertProject()
@@ -1180,7 +1159,6 @@ Public Class ProjectVM
' Per default no drag ' Per default no drag
m_bDrag = False m_bDrag = False
Dim nSel As Integer Dim nSel As Integer
EgtSetObjFilterForSelWin(True, True, True, True, True)
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel) EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
Dim nId As Integer = EgtGetFirstObjInSelWin() Dim nId As Integer = EgtGetFirstObjInSelWin()
While nId <> GDB_ID.NULL While nId <> GDB_ID.NULL
@@ -1489,7 +1467,7 @@ Public Class ProjectVM
' 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 >= 0 Then If nFac >= 0 Then
@@ -1516,7 +1494,7 @@ Public Class ProjectVM
End If End If
Map.refStatusBarVM.NotifyStatusOutput(sOut) Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If End If
' Se Regione, visualizzo dati parte toccata ' Se Regione, visualizzo dati parte toccata
ElseIf EgtGetType(nId) = GDB_TY.SRF_FRGN Then ElseIf EgtGetType(nId) = GDB_TY.SRF_FRGN Then
Dim nChk As Integer = nSub Dim nChk As Integer = nSub
If nChk >= 0 AndAlso nChk < EgtSurfFrChunkCount(nId) Then If nChk >= 0 AndAlso nChk < EgtSurfFrChunkCount(nId) Then
@@ -1537,7 +1515,7 @@ Public Class ProjectVM
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2) " / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut) Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If End If
' Se Superficie di Bezier ' Se Superficie di Bezier
ElseIf EgtGetType(nId) = GDB_TY.SRF_BEZ Then ElseIf EgtGetType(nId) = GDB_TY.SRF_BEZ Then
' Visualizzo il punto selezionato, la normale e le tangenti nelle direzioni dei parametri ' Visualizzo il punto selezionato, la normale e le tangenti nelle direzioni dei parametri
Analyze.CreateAnalyzeGroup() Analyze.CreateAnalyzeGroup()
+5 -5
View File
@@ -419,9 +419,9 @@ Public Class ExitToolAssociation
Dim sLen As String = LenToString(dValue, 4) Dim sLen As String = LenToString(dValue, 4)
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dValue) EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dValue)
Dim MaxMat As String = LenToString(dValue, 4) Dim MaxMat As String = LenToString(dValue, 4)
Return (EgtMsg(MSG_TOOLSDBPAGE + 53) & ": " & ConvertToolTypeToString(nType) & vbCrLf & Return (EgtMsg(MSG_TOOLSDBPAGE + 53) & ": " & ConvertToolTypeToString(nType) & Environment.NewLine &
EgtMsg(MSG_TOOLSDBPAGE + 56) & ": " & sDiam & vbCrLf & EgtMsg(MSG_TOOLSDBPAGE + 56) & ": " & sDiam & Environment.NewLine &
EgtMsg(MSG_TOOLSDBPAGE + 62) & ": " & sLen & vbCrLf & EgtMsg(MSG_TOOLSDBPAGE + 62) & ": " & sLen & Environment.NewLine &
EgtMsg(MSG_TOOLSDBPAGE + 64) & ": " & MaxMat) EgtMsg(MSG_TOOLSDBPAGE + 64) & ": " & MaxMat)
End Get End Get
End Property End Property
@@ -772,8 +772,8 @@ Public Class ToolItem
Public ReadOnly Property ToolTipMsg As String Public ReadOnly Property ToolTipMsg As String
Get Get
Return (EgtMsg(MSG_TOOLSDBPAGE + 75) & ": " & m_Name & vbCrLf & Return (EgtMsg(MSG_TOOLSDBPAGE + 75) & ": " & m_Name & Environment.NewLine &
EgtMsg(MSG_TOOLSDBPAGE + 78) & ": " & m_TcPos & vbCrLf & EgtMsg(MSG_TOOLSDBPAGE + 78) & ": " & m_TcPos & Environment.NewLine &
EgtMsg(MSG_TOOLSDBPAGE + 74) & ": " & m_Head & "." & m_Exit) EgtMsg(MSG_TOOLSDBPAGE + 74) & ": " & m_Head & "." & m_Exit)
End Get End Get
End Property End Property
+7 -7
View File
@@ -319,7 +319,7 @@ Public Class SetUpVM
' verifico che l'indice del gruppo sia compreso nel range di quelli esistenti ' verifico che l'indice del gruppo sia compreso nel range di quelli esistenti
If nGroupIndex <= m_PositionGroupList.Count Then If nGroupIndex <= m_PositionGroupList.Count Then
Return True Return True
' se l'indice è maggiore di quelli presenti nella lista dei gruppi ' se l'indice è maggiore di quelli presenti nella lista dei gruppi
Else Else
' aggiungo i gruppi che mancano fino all'indice del mio ' aggiungo i gruppi che mancano fino all'indice del mio
For GroupIndex = m_PositionGroupList.Count To nGroupIndex - 1 For GroupIndex = m_PositionGroupList.Count To nGroupIndex - 1
@@ -327,7 +327,7 @@ Public Class SetUpVM
Next Next
Return True Return True
End If End If
' altrimenti ' altrimenti
Else Else
' mi assicuro che esista il primo gruppo ' mi assicuro che esista il primo gruppo
VerifyIndexValidity(1) VerifyIndexValidity(1)
@@ -561,11 +561,11 @@ Public Class SetUpVM
' verifico se ci sono errori ' verifico se ci sono errori
If ErrorList.Count > 0 Then If ErrorList.Count > 0 Then
' li raccolgo tutti nello stesso messaggio ' li raccolgo tutti nello stesso messaggio
Dim sError As String = EgtMsg(6476) & vbCrLf Dim sError As String = EgtMsg(MSG_SETUPERRORS + 6) & Environment.NewLine
For ErrorIndex = 0 To ErrorList.Count - 1 For ErrorIndex = 0 To ErrorList.Count - 1
sError &= "- " & ErrorList(ErrorIndex) & vbCrLf sError &= "- " & ErrorList(ErrorIndex) & Environment.NewLine
Next Next
MessageBox.Show(sError, EgtMsg(6472), MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(sError, EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
End If End If
End If End If
End Sub End Sub
@@ -788,9 +788,9 @@ Public Class SetUpVM
' verifico se ci sono errori ' verifico se ci sono errori
If ErrorList.Count > 0 Then If ErrorList.Count > 0 Then
' li raccolgo tutti nello stesso messaggio ' li raccolgo tutti nello stesso messaggio
Dim sError As String = EgtMsg(MSG_SETUPERRORS + 6) & vbCrLf Dim sError As String = EgtMsg(MSG_SETUPERRORS + 6) & Environment.NewLine
For ErrorIndex = 0 To ErrorList.Count - 1 For ErrorIndex = 0 To ErrorList.Count - 1
sError &= "- " & ErrorList(ErrorIndex) & vbCrLf sError &= "- " & ErrorList(ErrorIndex) & Environment.NewLine
Next Next
MessageBox.Show(sError, EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(sError, EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Exclamation)
End If End If
+2 -2
View File
@@ -18,7 +18,7 @@ Module Beam
Return False Return False
End Function End Function
Friend Function ExecBeam(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean, bOnlySimulation As Boolean) As Boolean Friend Function ExecBeam(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean) As Boolean
EgtOutLog("-- Start ExecBeam --") EgtOutLog("-- Start ExecBeam --")
' Recupero lo script da eseguire ' Recupero lo script da eseguire
Dim sExecName As String = "" Dim sExecName As String = ""
@@ -60,7 +60,7 @@ Module Beam
' Se simulazione ' Se simulazione
If bOk And nFlag = 2 Then If bOk And nFlag = 2 Then
' Se da TS3 e non pezzo da Vista, impedisco di fare altro ' Se da TS3 e non pezzo da Vista, impedisco di fare altro
If (bBtl AndAlso sFile.IndexOf("Part_", StringComparison.InvariantCulture) = -1) OrElse bOnlySimulation Then If bBtl AndAlso sFile.IndexOf( "Part_", StringComparison.InvariantCulture) = -1 Then
Map.refSimulationExpanderVM.bOnlySimulation = True Map.refSimulationExpanderVM.bOnlySimulation = True
End If End If
' Vado in simulazione ' Vado in simulazione
-71
View File
@@ -1,71 +0,0 @@
Imports System.IO
Imports System.Globalization
Imports EgtUILib
Imports EgtWPFLib5
Module BeamNT
Friend Function VerifyBeamNT(sFile As String, sMachine As String, nFlag As Integer) As Boolean
' Se abilitato, esco con successo
If IsActiveBeamNT() Then Return True
' Segnalo il problema
Dim sErr As String = "BeamNT processing not enabled by licence"
EgtOutLog(sErr)
Try
File.WriteAllText(Path.ChangeExtension(sFile, ".txt"), "ERR=1" & vbNewLine & sErr & vbNewLine)
Catch
End Try
Return False
End Function
Friend Function ExecBeamNT(sFile As String, sMachine As String, nFlag As Integer, bOnlySimulation As Boolean) As Boolean
EgtOutLog("-- Start ExecBeamNT --")
' Recupero lo script da eseguire
Dim sExecName As String = ""
GetPrivateProfileString(S_BEAMNT, K_BEAMNTBWEEXEC, "", sExecName)
Dim sExecPath As String = (IniFile.m_sBeamNTDirPath & "\" & sExecName).TrimEnd({"\"c})
If Not My.Computer.FileSystem.FileExists(sExecPath) Then
EgtOutLog("Not found BeamNTExec script " & sExecPath)
Return False
End If
' Preparo interfaccia per aggiornamento
Map.refManageLayerExpanderVM.ClearObjTree()
' Assegno i dati
EgtLuaCreateGlobTable("BEAM")
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamNTDirPath)
EgtLuaSetGlobStringVar("BEAM.FILE", sFile)
EgtLuaSetGlobStringVar("BEAM.MACHINE", sMachine)
EgtLuaSetGlobIntVar("BEAM.FLAG", nFlag)
' variabile che comunica al lua che e' stato avviato da interfaccia BEAMWALL (per gestione messaggi errore lua)
EgtLuaSetGlobBoolVar("BEAM.BW", True)
' Eseguo lo script
Dim bOk As Boolean = False
If EgtLuaExecFile(sExecPath) Then
' Recupero i risultati
Dim nErr As Integer = 999
EgtLuaGetGlobIntVar("BEAM.ERR", nErr)
bOk = (nErr <= 0)
If Not bOk Then EgtOutLog("BeamNTExec Err=" & nErr.ToString())
Else
EgtOutLog("Error executing BeamNT Exec script " & sExecPath)
Return False
End If
' Cancello tavola globale
EgtLuaResetGlobVar("BEAM")
' Aggiorno interfaccia
Map.refProjectVM.UpdateProjectUI(True)
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
Map.refTopCommandBarVM.SetMachiningMode()
' Se simulazione
If bOk And nFlag = 2 Then
' Se richiesta sola simulazione
If bOnlySimulation Then Map.refSimulationExpanderVM.bOnlySimulation = True
' Vado in simulazione
Map.refSimulationExpanderVM.Simulation_IsExpanded = True
End If
End If
Return bOk
End Function
End Module
-28
View File
@@ -1,28 +0,0 @@
<EgtFloating:EgtFloatingPanel x:Class="BeamNTPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Visibility="{Binding BeamNTPanel_Visibility}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type local:ButtonItem}">
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
<Image Source="{Binding ImagePath}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type local:SeparatorItem}">
<Border Style="{StaticResource Trimming_Border}">
<Border Style="{StaticResource Separator_Border}"/>
</Border>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
</EgtFloating:EgtFloatingPanel>
-3
View File
@@ -1,3 +0,0 @@
Public Class BeamNTPanelV
End Class
-37
View File
@@ -1,37 +0,0 @@
Public Class BeamNTPanelVM
Inherits VMBase
Private m_ButtonList As New List(Of ButtonListItem)
Public ReadOnly Property ButtonList As List(Of ButtonListItem)
Get
Return m_ButtonList
End Get
End Property
Private m_BeamNTPanel_Visibility As Visibility
Public ReadOnly Property BeamNTPanel_Visibility As Visibility
Get
Return m_BeamNTPanel_Visibility
End Get
End Property
Friend Sub SetBeamNTPanelVisibility(bValue As Boolean)
m_BeamNTPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(BeamNTPanel_Visibility))
End Sub
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefBeamNTPanelVM(Me)
' Se attivo, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveBeamNT() Then
' Inizializzo i bottoni leggendoli da file ini
Dim BtnIndex As Integer = 1
Dim CurrBtn As ButtonListItem = Nothing
While GetPrivateProfileButton(S_BEAMNT, K_BEAMNTBUTTON & BtnIndex, IniFile.m_sBeamNTDirPath, CurrBtn)
m_ButtonList.Add(CurrBtn)
BtnIndex += 1
End While
End If
End Sub
End Class
+2 -2
View File
@@ -22,8 +22,8 @@
Sub New() Sub New()
' Creo riferimento a questa classe in Map ' Creo riferimento a questa classe in Map
Map.SetRefBeamWallPanelVM(Me) Map.SetRefBeamWallPanelVM(Me)
' Se attivo BeamNT, Beam o Wall, inizializzo i bottoni leggendoli da file ini ' Se attivo Beam o Wall, inizializzo i bottoni leggendoli da file ini
If IniFile.IsActiveBeamNT() OrElse IniFile.IsActiveBeam() OrElse 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
+2 -2
View File
@@ -18,7 +18,7 @@ Module Wall
Return False Return False
End Function End Function
Friend Function ExecWall(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean, Optional bOnlySimulation As Boolean = True) As Boolean Friend Function ExecWall(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean) As Boolean
EgtOutLog("-- Start ExecWall --") EgtOutLog("-- Start ExecWall --")
' Recupero lo script da eseguire ' Recupero lo script da eseguire
Dim sExecPath As String = "" Dim sExecPath As String = ""
@@ -61,7 +61,7 @@ Module Wall
' Se simulazione ' Se simulazione
If bOk And nFlag = 2 Then If bOk And nFlag = 2 Then
' Se da TS3 e non pezzo da Vista, impedisco di fare altro ' Se da TS3 e non pezzo da Vista, impedisco di fare altro
If (bBtl AndAlso sFile.IndexOf("Part_", StringComparison.InvariantCulture) = -1) OrElse (Not bBtl AndAlso bOnlySimulation) Then If bBtl AndAlso sFile.IndexOf( "Part_", StringComparison.InvariantCulture) = -1 Then
Map.refSimulationExpanderVM.bOnlySimulation = True Map.refSimulationExpanderVM.bOnlySimulation = True
End If End If
' Vado in simulazione ' Vado in simulazione
+1 -1
View File
@@ -501,7 +501,7 @@ Module TableUtility
If Directory.Exists(IniFile.m_sDoorsDirPath) Then If Directory.Exists(IniFile.m_sDoorsDirPath) Then
Return True Return True
Else Else
If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 15) & vbCrLf & EgtMsg(MSG_DOORSERRORS + 16), IniFile.m_sDoorsDirPath), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 15) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 16), IniFile.m_sDoorsDirPath), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
Return RecursiveVerifyDoorsDir() Return RecursiveVerifyDoorsDir()
End If End If
Return False Return False
+5 -10
View File
@@ -149,7 +149,7 @@ Public Class ButtonItem
m_sImagePath = IniFile.m_sResourcesRoot & "\" & sImagePath m_sImagePath = IniFile.m_sResourcesRoot & "\" & sImagePath
End If End If
m_sLuaCmdPath = sLuaCmdPath m_sLuaCmdPath = sLuaCmdPath
m_sToolTip = Strings.Replace( sToolTip, "<br/>", vbCrLf) m_sToolTip = sToolTip
If Not Integer.TryParse(sDrawMachOrBoth, m_nDrawMachOrBoth) Then m_nDrawMachOrBoth = 0 If Not Integer.TryParse(sDrawMachOrBoth, m_nDrawMachOrBoth) Then m_nDrawMachOrBoth = 0
End Sub End Sub
@@ -178,7 +178,7 @@ Public Class ButtonItem
If m_sLuaCmdPath = BeamPanelVM.BEAM_MACHININGS Then If m_sLuaCmdPath = BeamPanelVM.BEAM_MACHININGS Then
Beam.BeamMachDb() Beam.BeamMachDb()
Return Return
' se altrimenti per pareti ' se altrimenti per pareti
ElseIf m_sLuaCmdPath = WallPanelVM.WALL_MACHININGS Then ElseIf m_sLuaCmdPath = WallPanelVM.WALL_MACHININGS Then
Wall.WallMachDb() Wall.WallMachDb()
Return Return
@@ -187,7 +187,7 @@ Public Class ButtonItem
If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then Return If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then Return
' Abilito eventi se comando lua lanciato da Beam o Wall ' Abilito eventi se comando lua lanciato da Beam o Wall
m_sCurrBarName = m_sBarName m_sCurrBarName = m_sBarName
Dim bRaiseEvent As Boolean = (m_sBarName = "BeamNT" OrElse m_sBarName = "Beam" OrElse m_sBarName = "Wall") Dim bRaiseEvent As Boolean = (m_sBarName = "Beam" OrElse m_sBarName = "Wall")
' eseguo file Lua ' eseguo file Lua
Map.refProjectVM.PreExecScript(False) Map.refProjectVM.PreExecScript(False)
Map.refProjectVM.ExecScript(m_sLuaCmdPath, bRaiseEvent) Map.refProjectVM.ExecScript(m_sLuaCmdPath, bRaiseEvent)
@@ -198,10 +198,7 @@ Public Class ButtonItem
End Sub End Sub
Private Shared Sub OnPreControllerExec(sFilePath As String) Handles m_ProjectVM.OnPreControllerExec Private Shared Sub OnPreControllerExec(sFilePath As String) Handles m_ProjectVM.OnPreControllerExec
If m_sCurrBarName = "BeamNT" Then If m_sCurrBarName = "Beam" Then
EgtLuaCreateGlobTable("BEAM")
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamNTDirPath)
ElseIf m_sCurrBarName = "Beam" Then
EgtLuaCreateGlobTable("BEAM") EgtLuaCreateGlobTable("BEAM")
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamDirPath) EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamDirPath)
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 Then EgtLuaSetGlobBoolVar("BEAM.BW", True) If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 Then EgtLuaSetGlobBoolVar("BEAM.BW", True)
@@ -213,9 +210,7 @@ Public Class ButtonItem
End Sub End Sub
Private Shared Sub OnPostControllerExec() Handles m_ProjectVM.OnPostControllerExec Private Shared Sub OnPostControllerExec() Handles m_ProjectVM.OnPostControllerExec
If m_sCurrBarName = "BeamNT" Then If m_sCurrBarName = "Beam" Then
EgtLuaResetGlobVar("BEAM")
ElseIf m_sCurrBarName = "Beam" Then
EgtLuaResetGlobVar("BEAM") EgtLuaResetGlobVar("BEAM")
ElseIf m_sCurrBarName = "Wall" Then ElseIf m_sCurrBarName = "Wall" Then
EgtLuaResetGlobVar("WALL") EgtLuaResetGlobVar("WALL")
+3 -3
View File
@@ -1,7 +1,7 @@
<StackPanel x:Class="TopCommandBarV" <StackPanel x:Class="TopCommandBarV"
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"
Orientation="Horizontal"> Orientation="Horizontal">
<!--Barra superiore dei comandi--> <!--Barra superiore dei comandi-->
<UniformGrid Rows="1" <UniformGrid Rows="1"
+34 -46
View File
@@ -805,10 +805,9 @@ Public Class TopCommandBarVM
Map.refMachinePanelVM.SetMachinePanelVisibility(IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW) Map.refMachinePanelVM.SetMachinePanelVisibility(IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW)
Map.refExecutePanelVM.SetExecutePanelVisibility(GetPrivateProfileInt(S_GENERAL, K_EXECUTE, 0) = 1) Map.refExecutePanelVM.SetExecutePanelVisibility(GetPrivateProfileInt(S_GENERAL, K_EXECUTE, 0) = 1)
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False)) Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False))
Map.refBeamPanelVM.SetBeamPanelVisibility(IniFile.IsToShowBeam()) Map.refBeamPanelVM.SetBeamPanelVisibility(IniFile.IsActiveBeam())
Map.refBeamNTPanelVM.SetBeamNTPanelVisibility(IniFile.IsToShowBeamNT())
Map.refWallPanelVM.SetWallPanelVisibility(IniFile.IsActiveWall()) Map.refWallPanelVM.SetWallPanelVisibility(IniFile.IsActiveWall())
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeamNT() OrElse IniFile.IsActiveBeam() OrElse IniFile.IsActiveWall()) Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeam() Or IniFile.IsActiveWall())
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors()) Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
Map.refWindowPanelVM.SetWindowPanelVisibility(IniFile.IsActiveWindow()) Map.refWindowPanelVM.SetWindowPanelVisibility(IniFile.IsActiveWindow())
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(IniFile.IsActiveTrimming()) Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(IniFile.IsActiveTrimming())
@@ -843,56 +842,45 @@ Public Class TopCommandBarVM
Friend Sub MachiningMode_IsChecked() Friend Sub MachiningMode_IsChecked()
' ProjectV ' ProjectV
If Not IsNothing(Map.refProjectV) Then If IniFile.IsActivePlugin() Then
If IniFile.IsActivePlugin() Then For Each Panel In Map.refProjectVM.PanelList
For Each Panel In Map.refProjectVM.PanelList If TypeOf Panel Is WinFormPluginControlV Then
If TypeOf Panel Is WinFormPluginControlV Then Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV) If Not IsNothing(WinFormPanel) Then
If Not IsNothing(WinFormPanel) Then WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
End If
End If End If
Next End If
End If Next
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.refBeamNTPanelVM.SetBeamNTPanelVisibility(False)
Map.refWallPanelVM.SetWallPanelVisibility(False)
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(False)
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
Map.refWindowPanelVM.SetWindowPanelVisibility(False)
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(False)
Map.refReversePostPanelVM.SetReversePostPanelVisibility(False)
Map.refGunStockPanelVM.SetGunStockPanelVisibility(False)
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False)
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
End If End If
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(IniFile.IsActiveDoors())
Map.refWindowPanelVM.SetWindowPanelVisibility(False)
Map.refTrimmingPanelVM.SetTrimmingPanelVisibility(False)
Map.refReversePostPanelVM.SetReversePostPanelVisibility(False)
Map.refGunStockPanelVM.SetGunStockPanelVisibility(False)
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False)
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
' ProjectVM ' ProjectVM
If Not IsNothing(Map.refProjectVM) Then Map.refProjectVM.MachiningMode_IsChecked()
Map.refProjectVM.MachiningMode_IsChecked()
End If
' OptionPanelVM ' OptionPanelVM
If Not IsNothing(Map.refOptionPanelVM) Then If Not IsNothing(Map.refOptionPanelVM) Then Map.refOptionPanelVM.MachiningMode_IsChecked()
Map.refOptionPanelVM.MachiningMode_IsChecked()
End If
' MyMachinePanelVM ' MyMachinePanelVM
If Not IsNothing(Map.refMachinePanelVM) Then Map.refMachinePanelVM.MachineListIsEnabled = False
Map.refMachinePanelVM.MachineListIsEnabled = False
End If
' InstrumentPanel ' InstrumentPanel
If Not IsNothing(Map.refInstrumentPanelVM) Then Map.refInstrumentPanelVM.AnalyzeIsChecked = False
Map.refInstrumentPanelVM.AnalyzeIsChecked = False Map.refInstrumentPanelVM.AnalyzeIsEnabled = False
Map.refInstrumentPanelVM.AnalyzeIsEnabled = False
End If
' MyStatusBarVM ' MyStatusBarVM
If Not IsNothing(Map.refStatusBarVM) Then Map.refStatusBarVM.OutputMessage = String.Empty
Map.refStatusBarVM.OutputMessage = String.Empty
End If
End Sub End Sub
#End Region #End Region
-1
View File
@@ -26,7 +26,6 @@
</EgtFloating:EgtFloatingPanel> </EgtFloating:EgtFloatingPanel>
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/> <local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/> <local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
<local:BeamNTPanelV DataContext="{StaticResource BeamNTPanelViewModel}"/>
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/> <local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/> <local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/> <local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
+1 -29
View File
@@ -122,28 +122,6 @@ Module Analyze
Dim dStart, dEnd As Double Dim dStart, dEnd As Double
EgtCurveDomain( nId, dStart, dEnd) EgtCurveDomain( nId, dStart, dEnd)
Dim nCount As Integer = CInt( dEnd - dStart) - 1 Dim nCount As Integer = CInt( dEnd - dStart) - 1
' Gestione OPEN/OPEN2
Const PCK_KEY_OPEN As String = "OPEN"
Const PCK_KEY_OPEN2 As String = "OPEN2"
Dim vOpen(nCount) As Integer
Dim sInfo As String = ""
If EgtGetInfo( nId, PCK_KEY_OPEN, sInfo) Then
Dim vInfo() As String = sInfo.Split( ","C)
For Each sInd As String In vInfo
Dim nInd As Integer = -1
If StringToInt( sInd, nInd) AndAlso nInd >= 0 AndAlso nInd <= nCount Then
vOpen(nInd) = 1
End If
Next
ElseIf EgtGetInfo( nId, PCK_KEY_OPEN2, sInfo) Then
Dim vInfo() As String = sInfo.Split( ","C)
For Each sInd As String In vInfo
Dim nInd As Integer = -1
If StringToInt( sInd, nInd) AndAlso nInd >= 0 AndAlso nInd <= nCount Then
vOpen(nInd) = 2
End If
Next
End If
' Ciclo sulle curve semplici ' Ciclo sulle curve semplici
For i As Integer = 0 To nCount For i As Integer = 0 To nCount
' Scrivo il punto iniziale di ogni curva componente ' Scrivo il punto iniziale di ogni curva componente
@@ -157,13 +135,7 @@ Module Analyze
Dim dLen As Double = 2 * Point3d.Dist( ptS, ptP) Dim dLen As Double = 2 * Point3d.Dist( ptS, ptP)
Dim dH As Double = Math.Min( 0.25 * dLen, 10) Dim dH As Double = Math.Min( 0.25 * dLen, 10)
Dim nTxtId As Integer = EgtCreateTextAdv( m_AnaGrpId, ptP, 0, i.ToString(), "", 100, False, dH, 1, 0, INS_POS.MC, GDB_RT.GRID) Dim nTxtId As Integer = EgtCreateTextAdv( m_AnaGrpId, ptP, 0, i.ToString(), "", 100, False, dH, 1, 0, INS_POS.MC, GDB_RT.GRID)
If vOpen(i) = 1 Then EgtSetColor( nTxtId, New Color3d( 255, 0,0))
EgtSetColor( nTxtId, New Color3d(0, 0, 192))
ElseIf vOpen(i) = 2 Then
EgtSetColor( nTxtId, New Color3d(128, 0, 128))
Else
EgtSetColor( nTxtId, New Color3d(255, 0, 0))
End If
Next Next
' Se curva aperta aggiungo il punto finale ' Se curva aperta aggiungo il punto finale
If Not EgtCurveIsClosed( nId) Then If Not EgtCurveIsClosed( nId) Then
-1
View File
@@ -32,7 +32,6 @@
<EgtCAM5:MyMachinePanelVM x:Key="DbPanelViewModel"/> <EgtCAM5:MyMachinePanelVM x:Key="DbPanelViewModel"/>
<EgtCAM5:ExecutePanelVM x:Key="ExecutePanelViewModel"/> <EgtCAM5:ExecutePanelVM x:Key="ExecutePanelViewModel"/>
<EgtCAM5:SpecialPanelVM x:Key="SpecialPanelViewModel"/> <EgtCAM5:SpecialPanelVM x:Key="SpecialPanelViewModel"/>
<EgtCAM5:BeamNTPanelVM x:Key="BeamNTPanelViewModel"/>
<EgtCAM5:BeamPanelVM x:Key="BeamPanelViewModel"/> <EgtCAM5:BeamPanelVM x:Key="BeamPanelViewModel"/>
<EgtCAM5:WallPanelVM x:Key="WallPanelViewModel"/> <EgtCAM5:WallPanelVM x:Key="WallPanelViewModel"/>
<EgtCAM5:BeamWallPanelVM x:Key="BeamWallPanelViewModel"/> <EgtCAM5:BeamWallPanelVM x:Key="BeamWallPanelViewModel"/>
-29
View File
@@ -82,8 +82,6 @@ Public Module IniFile
Friend m_sLogFile As String Friend m_sLogFile As String
' path della cartella BEAM ' path della cartella BEAM
Friend m_sBeamDirPath As String Friend m_sBeamDirPath As String
' path della cartella BEAMNT
Friend m_sBeamNTDirPath As String
' path della cartella WALL ' path della cartella WALL
Friend m_sWallDirPath As String Friend m_sWallDirPath As String
' path della cartella BEAMWALL ' path della cartella BEAMWALL
@@ -299,33 +297,6 @@ Public Module IniFile
Return bIsActive Return bIsActive
End Function End Function
Friend Function IsToShowBeam() As Boolean
If Not IsActiveBeam() Then Return False
If Not IsActiveBeamNT() Then Return True
Return (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTSHOW, 0) = 0)
End Function
Friend Function IsActiveBeamNT() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 And (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTENABLE, 0) > 0)
If bIsActive Then
Dim sTemp As String = ""
GetPrivateProfileString(S_BEAMNT, K_BEAMNTBASEDIR, "", sTemp)
m_sBeamNTDirPath = sTemp.TrimEnd("\"c)
End If
Return bIsActive
End Function
Friend Function IsToShowBeamNT() As Boolean
If Not IsActiveBeamNT() Then Return False
If Not IsActiveBeam() Then Return True
Return (GetPrivateProfileInt(S_BEAMNT, K_BEAMNTSHOW, 0) > 0)
End Function
Friend Function UpdateShowBeamNT( bShowBeamNT As Boolean) As Boolean
WritePrivateProfileString(S_BEAMNT, K_BEAMNTSHOW, If( bShowBeamNT, "1", "0"))
Return True
End Function
Friend Function IsActiveWall() As Boolean Friend Function IsActiveWall() As Boolean
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 And (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0) Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 And (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
If bIsActive Then If bIsActive Then
+2 -2
View File
@@ -105,7 +105,7 @@ Public Module MachineModel
If EgtSetCurrMachine(sMachineName) Then If EgtSetCurrMachine(sMachineName) Then
Return True Return True
End If End If
If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 13) & vbCrLf & EgtMsg(MSG_DOORSERRORS + 14), sMachineName), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 13) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 14), sMachineName), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
Return EgtTrySettingCurrMachine(sMachineName) Return EgtTrySettingCurrMachine(sMachineName)
End If End If
Return False Return False
@@ -124,7 +124,7 @@ Public Module MachineModel
If Directory.Exists(IniFile.m_sMachinesRoot) Then If Directory.Exists(IniFile.m_sMachinesRoot) Then
Return True Return True
Else Else
If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 13) & vbCrLf & EgtMsg(MSG_DOORSERRORS + 14), IniFile.m_sMachinesRoot), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then If MessageBox.Show(String.Format(EgtMsg(MSG_DOORSERRORS + 13) & Environment.NewLine & EgtMsg(MSG_DOORSERRORS + 14), IniFile.m_sMachinesRoot), EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.YesNo, MessageBoxImage.Error) = MessageBoxResult.Yes Then
Return VerifyMachinesDir() Return VerifyMachinesDir()
End If End If
Return False Return False
-10
View File
@@ -30,7 +30,6 @@ Module Map
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_refExecutePanelVM As ExecutePanelVM
Private m_refBeamNTPanelVM As BeamNTPanelVM
Private m_refBeamPanelVM As BeamPanelVM Private m_refBeamPanelVM As BeamPanelVM
Private m_refWallPanelVM As WallPanelVM Private m_refWallPanelVM As WallPanelVM
Private m_refBeamWallPanelVM As BeamWallPanelVM Private m_refBeamWallPanelVM As BeamWallPanelVM
@@ -189,11 +188,6 @@ Module Map
Return m_refExecutePanelVM Return m_refExecutePanelVM
End Get End Get
End Property End Property
Public ReadOnly Property refBeamNTPanelVM As BeamNTPanelVM
Get
Return m_refBeamNTPanelVM
End Get
End Property
Public ReadOnly Property refBeamPanelVM As BeamPanelVM Public ReadOnly Property refBeamPanelVM As BeamPanelVM
Get Get
Return m_refBeamPanelVM Return m_refBeamPanelVM
@@ -335,10 +329,6 @@ Module Map
m_refExecutePanelVM = ExecutePanelVM m_refExecutePanelVM = ExecutePanelVM
Return Not IsNothing(m_refExecutePanelVM) Return Not IsNothing(m_refExecutePanelVM)
End Function End Function
Friend Function SetRefBeamNTPanelVM(BeamNTPanelVM As BeamNTPanelVM) As Boolean
m_refBeamNTPanelVM = BeamNTPanelVM
Return Not IsNothing(m_refBeamNTPanelVM)
End Function
Friend Function SetRefBeamPanelVM(BeamPanelVM As BeamPanelVM) As Boolean Friend Function SetRefBeamPanelVM(BeamPanelVM As BeamPanelVM) As Boolean
m_refBeamPanelVM = BeamPanelVM m_refBeamPanelVM = BeamPanelVM
Return Not IsNothing(m_refBeamPanelVM) Return Not IsNothing(m_refBeamPanelVM)
+3 -3
View File
@@ -660,8 +660,8 @@
Sawroughing(12) = Visibility.Visible ' StartFeed Sawroughing(12) = Visibility.Visible ' StartFeed
Sawroughing(13) = Visibility.Visible ' EndFeed Sawroughing(13) = Visibility.Visible ' EndFeed
Sawroughing(14) = Visibility.Visible ' TipFeed Sawroughing(14) = Visibility.Visible ' TipFeed
Sawroughing(15) = Visibility.Visible ' OffSr Sawroughing(15) = Visibility.Collapsed ' OffSr
Sawroughing(16) = Visibility.Visible ' OffSl Sawroughing(16) = Visibility.Collapsed ' OffSl
Sawroughing(17) = Visibility.Collapsed ' SideAngle Sawroughing(17) = Visibility.Collapsed ' SideAngle
Sawroughing(18) = Visibility.Collapsed ' Approx Sawroughing(18) = Visibility.Collapsed ' Approx
Sawroughing(19) = Visibility.Visible ' StartPos Sawroughing(19) = Visibility.Visible ' StartPos
@@ -726,7 +726,7 @@
Sawfinishing(12) = Visibility.Visible ' StartFeed Sawfinishing(12) = Visibility.Visible ' StartFeed
Sawfinishing(13) = Visibility.Visible ' EndFeed Sawfinishing(13) = Visibility.Visible ' EndFeed
Sawfinishing(14) = Visibility.Visible ' TipFeed Sawfinishing(14) = Visibility.Visible ' TipFeed
Sawfinishing(15) = Visibility.Visible ' OffSr Sawfinishing(15) = Visibility.Collapsed ' OffSr
Sawfinishing(16) = Visibility.Collapsed ' OffSl Sawfinishing(16) = Visibility.Collapsed ' OffSl
Sawfinishing(17) = Visibility.Collapsed ' SideAngle Sawfinishing(17) = Visibility.Collapsed ' SideAngle
Sawfinishing(18) = Visibility.Collapsed ' Approx Sawfinishing(18) = Visibility.Collapsed ' Approx
+1 -1
View File
@@ -20,4 +20,4 @@
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> --> <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners> </sharedListeners>
</system.diagnostics> </system.diagnostics>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>