EgtCAM5 3.1a2 :
- aggiunta toolbar per ReversePost - gestione protezione da licenza di Trimming e ReversePost - aggiunte info su Window, Trimming e ReversePost in AboutBox.
This commit is contained in:
@@ -70,6 +70,24 @@ Public Class AboutBoxWndV
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||
End If
|
||||
If IniFile.IsActiveWindow() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sWindowDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Window ver. " & sVersion & " " & IniFile.m_sWindowDirPath
|
||||
End If
|
||||
If IniFile.IsActiveTrimming() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sTrimmingDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Trimming ver. " & sVersion & " " & IniFile.m_sTrimmingDirPath
|
||||
End If
|
||||
If IniFile.IsActiveReversePost() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sReversePostDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "ReversePost ver. " & sVersion & " " & IniFile.m_sReversePostDirPath
|
||||
End If
|
||||
If IniFile.IsActiveGunStock() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
|
||||
@@ -167,6 +167,11 @@ Module ConstIni
|
||||
Public Const K_TRIMMINGBASEDIR As String = "BaseDir"
|
||||
Public Const K_TRIMMINGBUTTON As String = "Button"
|
||||
|
||||
Public Const S_REVERSEPOST As String = "ReversePost"
|
||||
Public Const K_REVERSEPOSTENABLE As String = "RevEnable"
|
||||
Public Const K_REVERSEPOSTBASEDIR As String = "BaseDir"
|
||||
Public Const K_REVERSEPOSTBUTTON As String = "Button"
|
||||
|
||||
Public Const S_GUNSTOCK As String = "GunStock"
|
||||
Public Const K_GUNSTOCKENABLE As String = "GsEnable"
|
||||
Public Const K_GUNSTOCKEXEC As String = "GsExec"
|
||||
|
||||
@@ -295,6 +295,10 @@
|
||||
</Compile>
|
||||
<Compile Include="Special-BeamWall\Wall.vb" />
|
||||
<Compile Include="Special-BeamWall\WallPanelVM.vb" />
|
||||
<Compile Include="Special-ReversePost\ReversePostPanelV.xaml.vb">
|
||||
<DependentUpon>ReversePostPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Special-ReversePost\ReversePostPanelVM.vb" />
|
||||
<Compile Include="Special-Trimming\TrimmingPanelV.xaml.vb">
|
||||
<DependentUpon>TrimmingPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -650,6 +654,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Special-ReversePost\ReversePostPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Special-Trimming\TrimmingPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -70,6 +70,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.1.1.1")>
|
||||
<Assembly: AssemblyFileVersion("3.1.1.1")>
|
||||
<Assembly: AssemblyVersion("3.1.1.2")>
|
||||
<Assembly: AssemblyFileVersion("3.1.1.2")>
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ Friend Module OptionModule
|
||||
Friend m_bDoorsOn As Boolean
|
||||
Friend m_bWindowOn As Boolean
|
||||
Friend m_bTrimmingOn As Boolean
|
||||
Friend m_bReversePostOn As Boolean
|
||||
Friend m_bGunstockOn As Boolean
|
||||
|
||||
' inizializzazione lettura variabili ad inizio programma
|
||||
@@ -188,6 +189,7 @@ Friend Module OptionModule
|
||||
m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
|
||||
m_bWindowOn = (GetPrivateProfileInt(S_WINDOW, K_WINDOWENABLE, 0) <> 0)
|
||||
m_bTrimmingOn = (GetPrivateProfileInt(S_TRIMMING, K_TRIMMINGENABLE, 0) <> 0)
|
||||
m_bReversePostOn = (GetPrivateProfileInt(S_REVERSEPOST, K_REVERSEPOSTENABLE, 0) <> 0)
|
||||
m_bGunstockOn = (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -447,6 +447,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding BeamMsg}"
|
||||
Grid.Row="0" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
@@ -477,14 +478,18 @@
|
||||
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding TrimmingOn}" IsEnabled="{Binding TrimmingEnabled}"
|
||||
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
|
||||
<TextBlock Text="{Binding ReversePostMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="5" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
|
||||
<CheckBox IsChecked="{Binding ReversePostOn}" IsEnabled="{Binding ReversePostEnabled}"
|
||||
Grid.Row="5" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding SpecialMsg}"
|
||||
Grid.Row="6" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding SpecialOn}"
|
||||
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="6" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
|
||||
Grid.Row="6" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding SpecialMsg}"
|
||||
Grid.Row="7" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding SpecialOn}"
|
||||
Grid.Row="7" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
@@ -890,7 +890,7 @@ Public Class OptionWindowVM
|
||||
|
||||
Public ReadOnly Property TrimmingEnabled As Boolean
|
||||
Get
|
||||
Return true
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.TRIMMING) <> 0
|
||||
End Get
|
||||
End Property
|
||||
Public Property TrimmingOn As Boolean
|
||||
@@ -903,6 +903,21 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ReversePostEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.REVERSEPOST) <> 0
|
||||
End Get
|
||||
End Property
|
||||
Public Property ReversePostOn As Boolean
|
||||
Get
|
||||
Return OptionModule.m_bReversePostOn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bReversePostOn = value
|
||||
WritePrivateProfileString(S_REVERSEPOST, K_REVERSEPOSTENABLE, If(value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GunstockEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0
|
||||
@@ -1205,6 +1220,11 @@ Public Class OptionWindowVM
|
||||
Return "Trimming"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ReversePostMsg As String
|
||||
Get
|
||||
Return "ReversePost"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property GunstockMsg As String
|
||||
Get
|
||||
Return "Gunstock"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="ReversePostPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding ReversePostPanel_Visibility}">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}" Style="{StaticResource DrawPanelButton}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class ReversePostPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,40 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ReversePostPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ReversePostPanel_Visibility As Visibility
|
||||
Public ReadOnly Property ReversePostPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_ReversePostPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetReversePostPanelVisibility(bValue As Boolean)
|
||||
m_ReversePostPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(ReversePostPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefReversePostPanelVM(Me)
|
||||
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
||||
If IniFile.IsActiveReversePost() Then
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonItem = Nothing
|
||||
While GetPrivateProfileButton(S_REVERSEPOST, K_REVERSEPOSTBUTTON & BtnIndex, IniFile.m_sReversePostDirPath, CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -32,6 +32,7 @@
|
||||
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
|
||||
<local:WindowPanelV DataContext="{StaticResource WindowPanelViewModel}"/>
|
||||
<local:TrimmingPanelV DataContext="{StaticResource TrimmingPanelViewModel}"/>
|
||||
<local:TrimmingPanelV DataContext="{StaticResource ReversePostPanelViewModel}"/>
|
||||
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
|
||||
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<EgtCAM5:DoorPanelVM x:Key="DoorsPanelViewModel"/>
|
||||
<EgtCAM5:WindowPanelVM x:Key="WindowPanelViewModel"/>
|
||||
<EgtCAM5:TrimmingPanelVM x:Key="TrimmingPanelViewModel"/>
|
||||
<EgtCAM5:ReversePostPanelVM x:Key="ReversePostPanelViewModel"/>
|
||||
<EgtCAM5:GunStockPanelVM x:Key="GunStockPanelViewModel"/>
|
||||
<EgtCAM5:MyMachGroupPanelVM x:Key="MachGroupPanelViewModel"/>
|
||||
<!--<EgtCAM5:MachGroupPanelVM x:Key="MachGroupPanelViewModel"/>-->
|
||||
|
||||
+16
-2
@@ -69,6 +69,8 @@ Public Module IniFile
|
||||
PLUGIN = 1024
|
||||
ADVMACHINING = 2048
|
||||
WINDOW = 4096
|
||||
TRIMMING = 8192
|
||||
REVERSEPOST = 16384
|
||||
End Enum
|
||||
Friend m_sDataRoot As String
|
||||
Friend m_sConfigDir As String
|
||||
@@ -89,7 +91,9 @@ Public Module IniFile
|
||||
' path della cartella WINDOW
|
||||
Friend m_sWindowDirPath As String
|
||||
' path della cartella TRIMMING
|
||||
Friend m_strimmingDirPath As String
|
||||
Friend m_sTrimmingDirPath As String
|
||||
' path della cartella REVERSEPOST
|
||||
Friend m_sReversePostDirPath As String
|
||||
' path della cartella GUNSTOCK
|
||||
Friend m_sGunstockDirPath As String
|
||||
' path della cartella Printing3d
|
||||
@@ -320,7 +324,7 @@ Public Module IniFile
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveTrimming() As Boolean
|
||||
Dim bIsActive As Boolean = (GetPrivateProfileInt(S_TRIMMING, K_TRIMMINGENABLE, 0) <> 0)
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.TRIMMING) <> 0 And (GetPrivateProfileInt(S_TRIMMING, K_TRIMMINGENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_TRIMMING, K_TRIMMINGBASEDIR, "", sTemp)
|
||||
@@ -329,6 +333,16 @@ Public Module IniFile
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveReversePost() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.REVERSEPOST) <> 0 And (GetPrivateProfileInt(S_REVERSEPOST, K_REVERSEPOSTENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_REVERSEPOST, K_REVERSEPOSTBASEDIR, "", sTemp)
|
||||
m_sReversePostDirPath = sTemp.TrimEnd( "\"c)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveGunStock() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
|
||||
@@ -35,6 +35,7 @@ Module Map
|
||||
Private m_refBeamWallPanelVM As BeamWallPanelVM
|
||||
Private m_refWindowPanelVM As WindowPanelVM
|
||||
Private m_refTrimmingPanelVM As TrimmingPanelVM
|
||||
Private m_refReversePostPanelVM As ReversePostPanelVM
|
||||
Private m_refGunStockPanelVM As GunStockPanelVM
|
||||
Private m_refMachiningParameterExpanderVM As MachiningParameterExpanderVM
|
||||
|
||||
@@ -331,6 +332,10 @@ Module Map
|
||||
m_refTrimmingPanelVM = TrimmingPanelVM
|
||||
Return Not IsNothing(m_refTrimmingPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefReversePostPanelVM(ReversePostPanelVM As ReversePostPanelVM) As Boolean
|
||||
m_refReversePostPanelVM = ReversePostPanelVM
|
||||
Return Not IsNothing(m_refReversePostPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefGunStockPanelVM(GunStockPanelVM As GunStockPanelVM) As Boolean
|
||||
m_refGunStockPanelVM = GunStockPanelVM
|
||||
Return Not IsNothing(m_refGunStockPanelVM)
|
||||
|
||||
Reference in New Issue
Block a user