From 20b978c19c6a903dce0d4189d0c1b2b2c5a194d1 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 13 Dec 2016 19:56:29 +0000 Subject: [PATCH] EgtCAM5 1.6x2 : - modifiche per Gunstock. --- Application.xaml.vb | 3 +- Constants/ConstIni.vb | 13 +- IniFile.vb | 3 +- MainWindow/MainWindowViewModel.vb | 4 +- My Project/AssemblyInfo.vb | 4 +- .../GunStockPanel/GunStockPanelView.xaml | 4 +- .../GunStockPanel/GunStockPanelViewModel.vb | 18 +- ProjectPage/ProjectViewModel.vb | 108 +++++-- Special/Doors.vb | 3 +- Special/GunStock.vb | 298 +++++++++++++++--- .../GunStockWindow/GunStockParamListItem.vb | 23 +- Special/GunStockWindow/GunStockWndView.xaml | 32 +- .../GunStockWindow/GunStockWndView.xaml.vb | 16 +- .../GunStockWindow/GunStockWndViewModel.vb | 90 ++++-- 14 files changed, 480 insertions(+), 139 deletions(-) diff --git a/Application.xaml.vb b/Application.xaml.vb index 1b709bc..d320232 100644 --- a/Application.xaml.vb +++ b/Application.xaml.vb @@ -217,7 +217,8 @@ Class Application Friend Const REMOVEDOORTABLE As String = "RemoveDoorTable" ' GunStock - Friend Const GUNSTOCKSCRIPT As String = "GunStockScript" + Friend Const GUNSTOCKNEW As String = "GunStockNew" + Friend Const GUNSTOCKMODIF As String = "GunStockModif" Shared ReadOnly _messenger As New Messenger() diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb index 35f089a..4a96747 100644 --- a/Constants/ConstIni.vb +++ b/Constants/ConstIni.vb @@ -93,10 +93,14 @@ Module ConstIni Public Const K_TABLESDIR As String = "TablesDir" Public Const S_GUNSTOCK As String = "GunStock" - Public Const K_MODENABLE As String = "ModEnable" - Public Const K_MODEXEC As String = "ModExec" - Public Const K_MODFUNCTION As String = "ModFun" + Public Const K_GUNSTOCKENABLE As String = "GsEnable" + Public Const K_GUNSTOCKEXEC As String = "GsExec" + Public Const K_READMODFUNCTION As String = "ReadModFun" + Public Const K_WRITEPEZFUNCTION As String = "WritePezFun" + Public Const K_READPEZFUNCTION As String = "ReadPezFun" + Public Const K_CREATEFUNCTION As String = "CreateFun" Public Const K_MODDIR As String = "ModDir" + Public Const K_PEZDIR As String = "PezDir" Public Const S_MACH As String = "Mach" Public Const K_MACHINESDIR As String = "MachinesDir" @@ -121,7 +125,8 @@ Module ConstIni Public Const S_MRUFILES As String = "MruFiles" Public Const S_MRUSCRIPTS As String = "MruScripts" Public Const S_MRUDOORS As String = "MruDoors" - Public Const S_MRUGUNSTOCK As String = "MruGunStock" + Public Const S_MRUGUNSTOCKMOD As String = "MruGunStockMod" + Public Const S_MRUGUNSTOCKPEZ As String = "MruGunStockPez" Public Const K_FILE As String = "File" End Module diff --git a/IniFile.vb b/IniFile.vb index 3c84db8..e68c5dd 100644 --- a/IniFile.vb +++ b/IniFile.vb @@ -58,6 +58,7 @@ Public Module IniFile Friend m_bStopScript As Boolean = False Friend m_DDFFilePath As String = String.Empty Friend m_MODFilePath As String = String.Empty + Friend m_PEZFilePath As String = String.Empty ' Grid data Friend dSnapStepMm As Double Friend dSnapStepInch As Double @@ -164,7 +165,7 @@ Public Module IniFile End Function Friend Function IsActiveGunStock() As Boolean - Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_MODENABLE, 0) <> 0) + Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0) End Function End Module diff --git a/MainWindow/MainWindowViewModel.vb b/MainWindow/MainWindowViewModel.vb index b61ac1c..7f1eee8 100644 --- a/MainWindow/MainWindowViewModel.vb +++ b/MainWindow/MainWindowViewModel.vb @@ -380,8 +380,8 @@ Namespace EgtCAM5 m_MruDoors.Init(S_MRUDOORS, 8) End If If IniFile.IsActiveGunStock() Then - m_MruNewGunStock.Init(S_MRUGUNSTOCK, 8) - m_MruModifyGunStock.Init(S_MRUGUNSTOCK, 8) + m_MruNewGunStock.Init(S_MRUGUNSTOCKMOD, 8) + m_MruModifyGunStock.Init(S_MRUGUNSTOCKPEZ, 8) End If ' Installo funzione gestione eventi per lua EgtSetProcessEvents(m_ProcEventsCallback) diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 57d8262..74d4979 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/ProjectPage/GunStockPanel/GunStockPanelView.xaml b/ProjectPage/GunStockPanel/GunStockPanelView.xaml index 806e877..225b205 100644 --- a/ProjectPage/GunStockPanel/GunStockPanelView.xaml +++ b/ProjectPage/GunStockPanel/GunStockPanelView.xaml @@ -11,7 +11,7 @@ -->