From cb5ebfb4b2ef3a7d600f1d76cf57566c4d84f99f Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 15 Feb 2018 07:56:02 +0000 Subject: [PATCH] =?UTF-8?q?OmagCUT=201.9b4=20:=20-=20aggiunta=20possibilit?= =?UTF-8?q?=C3=A0=20in=20DB=20utensili=20di=20visualizzare=20TC=20sulle=20?= =?UTF-8?q?sole=20lame=20(=20da=20Ini=20macchina=20[Tools]=20ShowToolChang?= =?UTF-8?q?er=3D2).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CurrentMachine.vb | 12 ++++++------ My Project/AssemblyInfo.vb | 4 ++-- ToolsDbPageUC.xaml.vb | 5 +++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CurrentMachine.vb b/CurrentMachine.vb index dd98ce4..66e50f6 100644 --- a/CurrentMachine.vb +++ b/CurrentMachine.vb @@ -56,7 +56,7 @@ Public Class CurrentMachine Private m_bMill As Boolean = False ' Flag per visualizzazione TcPos e Testa/uscita - Private m_bShowToolChanger As Boolean = False + Private m_nShowToolChanger As Integer = 0 Private m_bShowHeadExit As Boolean = False ' Flag che indicano presenza tipologia lavorazioni (attivo/non attivo) @@ -284,9 +284,9 @@ Public Class CurrentMachine End Get End Property - Friend ReadOnly Property bShowToolChanger As Boolean + Friend ReadOnly Property ShowToolChanger As Integer Get - Return m_bShowToolChanger + Return m_nShowToolChanger End Get End Property @@ -450,7 +450,7 @@ Public Class CurrentMachine Friend Property dAdditionalTable As Double Get - Select GetCurrentTable() + Select Case GetCurrentTable() Case 3 Return m_dTab3AdditionalTable Case 2 @@ -460,7 +460,7 @@ Public Class CurrentMachine End Select End Get Set(value As Double) - Select GetCurrentTable() + Select Case GetCurrentTable() Case 3 If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And WritePrivateProfileString(S_TABLE, K_TAB3_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then @@ -725,7 +725,7 @@ Public Class CurrentMachine m_bMill = (GetPrivateProfileInt(S_TOOLS, K_MILL, 0, sMachIniFile) > 0) And m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL) ' Leggo abilitazione visualizzazione TcPos e Head/exit - m_bShowToolChanger = (GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile) > 0) + m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile) m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0) ' Leggo limiti diametro lama per altre operazioni m_dMaxSawDiamForVac = GetPrivateProfileDouble(S_TOOLS, K_MAXSAWDIAMFORVAC, 630, sMachIniFile) diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 9a13c57..f0e97c1 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -62,5 +62,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/ToolsDbPageUC.xaml.vb b/ToolsDbPageUC.xaml.vb index 96f85d8..73d7969 100644 --- a/ToolsDbPageUC.xaml.vb +++ b/ToolsDbPageUC.xaml.vb @@ -243,7 +243,7 @@ Public Class ToolsDbPageUC EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H1") EgtTdbSetCurrToolParam(MCH_TP.EXIT_, If(bSaw, 1, 2)) ' Per macchine senza ToolChanger, resetto la posizione su questo - If Not m_CurrMachine.bShowToolChanger Then + If m_CurrMachine.ShowToolChanger = 0 Then EgtTdbSetCurrToolParam(MCH_TP.TCPOS, "") End If ' Imposto dimensioni standard @@ -478,7 +478,8 @@ Public Class ToolsDbPageUC Private Sub ViewToolParams() NameTxBl.Visibility = Windows.Visibility.Visible NameTxBx.Visibility = Windows.Visibility.Visible - TCPosBrd.Visibility = If(m_CurrMachine.bShowToolChanger, Windows.Visibility.Visible, Windows.Visibility.Hidden) + Dim bShowTcPos As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowToolChanger <> 0) Or m_CurrMachine.ShowToolChanger = 1) + TCPosBrd.Visibility = If(bShowTcPos, Windows.Visibility.Visible, Windows.Visibility.Hidden) HeadExitBrd.Visibility = If(m_CurrMachine.bShowHeadExit, Windows.Visibility.Visible, Windows.Visibility.Hidden) SpeedGpBx.Visibility = Windows.Visibility.Visible FeedGpBx.Visibility = Windows.Visibility.Visible