Compare commits

..

16 Commits

Author SHA1 Message Date
Emmanuele Sassi 121f02fb0c Merge branch 'RawPartLastCreation' into AddBeamPosZ 2022-11-25 15:05:41 +01:00
Emmanuele Sassi 848b6d98a5 - correzione creazione pezzi durante creazione grezzi 2022-11-25 15:02:09 +01:00
Emmanuele Sassi 0589565b8e Merge branch 'AddBeamPosZ' into RawPartLastCreation 2022-11-25 14:46:19 +01:00
Emmanuele Sassi 1109a91dd9 - Aggiunta colonna PosZ per Wall su Gruppo di lavorazione 2022-11-25 13:33:23 +01:00
DarioS 37cb1dbb6a EgtBEAMWALL 2.4k3 :
- correzione gestione spessori per nesting manuale pareti (ora si usano sempre operatori di SectionXMaterial).
2022-11-25 08:04:27 +01:00
Emmanuele Sassi 152788fe1b - modifiche per aggiunta grezzo durante definizione se non definito
- WIP modifiche per salvataggio ultimo usato per sezione
2022-11-24 16:30:56 +01:00
Emmanuele Sassi 534b363a04 Merge branch 'master' of https://gitlab.steamware.net/egaltech/egtbeamwall 2022-11-21 18:33:26 +01:00
DarioS 3f13706b97 EgtBEAMWALL 2.4k2 :
- ricompilazione di tutto con cambio versione.
2022-11-21 12:48:29 +01:00
Emmanuele Sassi 1f804ab6fc Merge branch 'develop' 2022-11-21 11:12:27 +01:00
Emmanuele Sassi 21dd6fbbb1 Merge branch 'RawPartCreation' 2022-11-18 14:15:41 +01:00
Emmanuele Sassi da73acc8a0 - Aggiunti tooltip su statistiche ed ultimi bottoni aggiunti
- Aggiunto bottone cancella tutti i grezzi
2022-11-18 14:15:11 +01:00
Emmanuele Sassi f9825db2ac - Modificata creazione grezzi con due bottoni 2022-11-18 11:44:38 +01:00
Emmanuele Sassi a3ea3bd1eb - Correzione problema check su cambio parametri
- Correzione indentazione DbController ViewerOptimizer
- Aggiornamento DbControllers Supervisor per gestione corretta network
-
2022-11-18 10:30:41 +01:00
DarioS 805a3acf54 EgtBEAMWALL :
- corretta gestione licenza con opzione rete abilitata quando si vuole lavorare con DB locale.
2022-11-08 19:13:10 +01:00
DarioS f21f2a6422 EgtBEAMWALL 2.4k1 :
- modifiche per visualizzazione numeri facce
- modifiche per visualizzazione lato di carico per travi.
2022-11-08 16:45:08 +01:00
Samuele Locatelli 3b2715ee58 Merge branch 'DataLayer' 2022-09-19 19:41:37 +02:00
37 changed files with 619 additions and 303 deletions
+3
View File
@@ -146,6 +146,9 @@ Public Class BTLParamM
Return m_nType
End Get
End Property
Public Sub SetType(value As BTLParamType)
m_nType = value
End Sub
' Feature a cui appartiene il parametro
Protected m_ParentFeature As BTLFeatureM
+1
View File
@@ -251,6 +251,7 @@
Public Const MGR_RPT_PANELLEN As String = "PANELLEN"
Public Const MGR_RPT_PANELWIDTH As String = "PANELWIDTH"
Public Const MGR_RPT_PANELHEIGHT As String = "PANELHEIGHT"
Public Const MGR_RPT_PANELPOSZ As String = "PANELPOSZ"
Public Const MGR_RPT_PART As String = "PART"
' parametri P per comunicazione con la macchina
@@ -6,6 +6,7 @@
Public Const COL_STARTCUT As String = "colSTARTCUT"
Public Const COL_W As String = "colW"
Public Const COL_L As String = "colL"
Public Const COL_POSZ As String = "colPOSZ"
Public Const COL_ROT As String = "colROT"
Public Const COL_FLIP As String = "colFLIP"
Public Const COL_POSX As String = "colPOSX"
@@ -149,6 +149,16 @@ Public Class MyMachGroupM
End Get
End Property
Protected m_dPosZ As Double = 0
Public Property dPosZ As Double
Get
Return m_dPosZ
End Get
Set(value As Double)
m_dPosZ = value
End Set
End Property
#End Region ' Wall
#Region "Calc"
@@ -311,6 +321,7 @@ Public Class MyMachGroupM
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELPOSZ, NewMachGroupM.m_dPosZ)
NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW * NewMachGroupM.m_dH
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
For Each Part In NewMachGroupM.m_PartMList
@@ -343,6 +354,7 @@ Public Class MyMachGroupM
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELLEN, NewMachGroupM.m_dL)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELWIDTH, NewMachGroupM.m_dW)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELHEIGHT, NewMachGroupM.m_dH)
EgtGetInfo(NewMachGroupM.m_Id, MGR_RPT_PANELPOSZ, NewMachGroupM.m_dPosZ)
NewMachGroupM.m_dTotMat = NewMachGroupM.m_dL * NewMachGroupM.m_dW
NewMachGroupM.m_PartMList = LoadParts(NewMachGroupM)
For Each Part In NewMachGroupM.m_PartMList
+2 -2
View File
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.8.2")>
<Assembly: AssemblyFileVersion("2.4.8.2")>
<Assembly: AssemblyVersion("2.4.11.3")>
<Assembly: AssemblyFileVersion("2.4.11.3")>
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.4.8.2")]
[assembly: AssemblyFileVersion("2.4.8.2")]
[assembly: AssemblyVersion("2.4.11.3")]
[assembly: AssemblyFileVersion("2.4.11.3")]
@@ -81,6 +81,13 @@
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<!--PosZ - Posizione in Z-->
<DataGridTextColumn x:Key="colPOSZ" Binding="{Binding sPosZ}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<!--MAT - Materiale-->
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
<DataGridTextColumn.Header>
@@ -13,6 +13,13 @@ Public Class RawPartListVM
End Get
End Property
Private m_colRawPart_PosZ As EgtDataGridColumn
Public ReadOnly Property colRawPart_PosZ As EgtDataGridColumn
Get
Return m_colRawPart_PosZ
End Get
End Property
Private m_RawPartColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property RawPartColumns As ObservableCollection(Of EgtDataGridColumn)
Get
@@ -55,6 +62,12 @@ Public Class RawPartListVM
End Get
End Property
Public ReadOnly Property PosZ_Msg As String
Get
Return EgtMsg(61728)
End Get
End Property
Public ReadOnly Property Material_Msg As String
Get
Return EgtMsg(61607)
@@ -84,23 +97,27 @@ Public Class RawPartListVM
Map.SetRefRawPartListVM(Me)
' carico le colonne della datagrid
GetPrivateProfileColumns(S_RAWPARTLIST_SUPERVISOR, RawPartColumns)
' recupero riferimento a colonna StartCut
' recupero riferimento a colonna StartCut e PosZ
m_colRawPart_StartCut = m_RawPartColumns.FirstOrDefault(Function(x) x.Name = COL_STARTCUT)
m_colRawPart_PosZ = m_RawPartColumns.FirstOrDefault(Function(x) x.Name = COL_POSZ)
End Sub
#End Region ' CONSTRUCTOR
Friend Sub UpdateColumns(nMachType As MachineType)
If nMachType = MachineType.BEAM Then
If Not IsNothing(m_colRawPart_StartCut) Then
m_colRawPart_StartCut.ColumnVisibility = Visibility.Visible
End If
'RawPartColumns.Clear()
'GetPrivateProfileColumns(S_RAWPARTLIST_BEAM, RawPartColumns)
' aggiorno la visibilità delle colonne
For Each col In RawPartColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
If Not IsNothing(m_colRawPart_StartCut) Then
m_colRawPart_StartCut.ColumnVisibility = Visibility.Visible
End If
If Not IsNothing(m_colRawPart_PosZ) Then
m_colRawPart_PosZ.ColumnVisibility = Visibility.Collapsed
End If
'RawPartColumns.Clear()
'GetPrivateProfileColumns(S_RAWPARTLIST_BEAM, RawPartColumns)
ElseIf nMachType = MachineType.WALL Then
' aggiorno la visibilità delle colonne
For Each col In RawPartColumns
@@ -109,6 +126,9 @@ Public Class RawPartListVM
If Not IsNothing(m_colRawPart_StartCut) Then
m_colRawPart_StartCut.ColumnVisibility = Visibility.Collapsed
End If
If Not IsNothing(m_colRawPart_PosZ) Then
m_colRawPart_PosZ.ColumnVisibility = Visibility.Visible
End If
'RawPartColumns.Clear()
'GetPrivateProfileColumns(S_RAWPARTLIST_WALL, RawPartColumns)
End If
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports System.Globalization
Imports System.IO
Imports System.Windows.Threading
Imports EgtBEAMWALL.Core
@@ -1004,41 +1003,14 @@ Public Class LeftPanelVM
Private Sub CreateDataFile(sFilePath As String, SelPart As PartVM, SelMachGroup As MyMachGroupVM)
Dim sFileText As New List(Of String)
Dim nBtlInfoId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
Dim sInfo As String = ""
Dim bOk As Boolean = False
' inserisco il capitolo del [Main]
sFileText.Add("[Main]")
sFileText.Add("Var1=$PRODID$," & Map.refSupervisorManagerVM.CurrProd.sProdId)
sFileText.Add("Var2=$MACHGROUPID$," & SelMachGroup.nName)
sFileText.Add("Var2=$MACHGROUPID$," & SelMachGroup.Id)
sFileText.Add("Var3=$PARTID$," & SelPart.nPDN)
sFileText.Add("Var4=$MATERIAL$," & SelPart.sMATERIAL)
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_PROJNUM, sInfo)
sFileText.Add("Var5=$PROJECTNUMBER$," & If(bOk, sInfo, ""))
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_PROJNAME, sInfo)
sFileText.Add("Var6=$PROJECTNAME$," & If(bOk, sInfo, ""))
bOk = EgtGetInfo(nBtlInfoId, BTL_GEN_CUSTOMER, sInfo)
sFileText.Add("Var7=$CUSTOMER$," & If(bOk, sInfo, ""))
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_ASSEMBLYNUM, sInfo)
sFileText.Add("Var8=$ASSEMBLYNUMBER$," & If(bOk, sInfo, ""))
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_ORDERNUM, sInfo)
sFileText.Add("Var9=$ORDERNUMBER$," & If(bOk, sInfo, ""))
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_DESIGNATION, sInfo)
sFileText.Add("Var10=$DESIGNATION$," & If(bOk, sInfo, ""))
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_ANNOTATION, sInfo)
sFileText.Add("Var11=$ANNOTATION$," & If(bOk, sInfo, ""))
sFileText.Add("Var12=$STOREY$," & SelPart.sSTOREY)
sFileText.Add("Var13=$GROUP$," & SelPart.sGROUP)
bOk = EgtGetInfo(SelPart.nPartId, BTL_PRT_PACKAGE, sInfo)
sFileText.Add("Var14=$PACKAGE$," & If(bOk, sInfo, ""))
sFileText.Add("Var15=$WHL$," & SelPart.sW & "x" & SelPart.sH & "x" & SelPart.sL)
sFileText.Add("Var16=$PRODUCTIONDATE$," & Date.Now().ToString("yyyy-MM-dd"))
' calcolo numero settimana corrente secondo ISO 8601
Dim time As Date = Date.Now()
Dim Day As DayOfWeek = CultureInfo.InvariantCulture.Calendar.GetDayOfWeek(time)
If Day >= DayOfWeek.Monday AndAlso Day <= DayOfWeek.Wednesday Then time = time.AddDays(3)
Dim nWeekOfYear As Integer = CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(time, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday)
sFileText.Add("Var18=$PRODUCTIONWEEK$," & nWeekOfYear)
'sFileText.Add("Var5=$Thickness$," & SelPart.Thickness)
'sFileText.Add("Var6=$Storage$," & SelPart.WarehousePosition)
Try
File.WriteAllLines(sFilePath, sFileText)
Catch ex As Exception
@@ -666,17 +666,10 @@ Public Class MachCommandMessagePanelVM
ErrorAdditionalMsg = "Line Number"
ErrorNumberMsg = "CN:"
End If
Dim sErrorMessage As String = ErrorMessage
If bMsgTranslationActive Then
Dim sTranslatedMsg = MachMsg(MsgParagraphs.CNC, nErrorNumber)
If Not String.IsNullOrWhiteSpace(sTranslatedMsg) Then
sErrorMessage = sTranslatedMsg
End If
End If
ErrorLineMsg = "Number from the Cnc Block"
AlarmMessage = If(nErrorNumber <> 0, ErrorNumberMsg & ": " & nErrorNumber & " - ", "") &
If(nErrorExtNumber <> 0, " - " & ErrorExtNumberMsg & ": " & nErrorExtNumber, "") &
" " & sErrorMessage
" " & ErrorMessage
Case NUM_ErrorTypes.Drive_Error
ErrorIndexMsg = "Azionamento: Asse"
ErrorNumberMsg = "Ext"
@@ -240,8 +240,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2407, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2407, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2411, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2411, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.8.2")>
<Assembly: AssemblyFileVersion("2.4.8.2")>
<Assembly: AssemblyVersion("2.4.11.3")>
<Assembly: AssemblyFileVersion("2.4.11.3")>
+84 -84
View File
@@ -4,99 +4,99 @@ Imports EgtBEAMWALL.Core
Module DbControllers
Friend m_SupervisorId As String = "1"
Public ReadOnly Property SupervisorId As String
Get
Return m_SupervisorId
End Get
End Property
Friend m_SupervisorId As String = "1"
Public ReadOnly Property SupervisorId As String
Get
Return m_SupervisorId
End Get
End Property
Private m_bNetwork As Boolean = False
Friend ReadOnly Property bNetwork As Boolean
Get
Return m_bNetwork
End Get
End Property
Private m_bNetwork As Boolean = False
Friend ReadOnly Property bNetwork As Boolean
Get
Return m_bNetwork
End Get
End Property
Public m_ProjController As DataLayer.Controllers.ProjController
Public m_ProdController As DataLayer.Controllers.ProdController
Public m_MachGroupController As DataLayer.Controllers.MachGroupController
Public m_PartController As DataLayer.Controllers.PartController
Public m_LogMachineController As DataLayer.Controllers.LogMachineController
Public m_StatusMapController As DataLayer.Controllers.StatusMapController
Public m_ProjController As DataLayer.Controllers.ProjController
Public m_ProdController As DataLayer.Controllers.ProdController
Public m_MachGroupController As DataLayer.Controllers.MachGroupController
Public m_PartController As DataLayer.Controllers.PartController
Public m_LogMachineController As DataLayer.Controllers.LogMachineController
Public m_StatusMapController As DataLayer.Controllers.StatusMapController
Sub New()
Sub New()
' se demo--> server = db.steamware.net, nKey e sKey come le hai...
' se demo--> server = db.steamware.net, nKey e sKey come le hai...
Dim sKey = "", sUser = "", sPwd = ""
Dim sKey = "", sUser = "", sPwd = ""
EgtGetKeyInfo(sKey)
sKey = sKey.Replace(" ", "")
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
sUser = sKey.Substring(3, 6)
sPwd = sKey.Substring(10, sKey.Length - 10).Replace("(", "").Replace(")", "")
End If
Try
Dim DbAddress As String = "127.0.0.1"
Dim DbMasterKey As Integer = 0
Dim sDbMasterKey As String = ""
Dim sSharedFolder As String = ""
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
GetMainPrivateProfileString(S_GENERAL, K_DBADDRESS, "", DbAddress)
DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
If DbMasterKey > 0 Then
sDbMasterKey = DbMasterKey.ToString("000000")
End If
If String.IsNullOrWhiteSpace(DbAddress) OrElse DbMasterKey <= 0 Then
DbAddress = "127.0.0.1"
DbMasterKey = 0
Else
m_bNetwork = True
End If
EgtGetKeyInfo(sKey)
sKey = sKey.Replace(" ", "")
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
sUser = sKey.Substring(3, 6)
sPwd = sKey.Substring(10, sKey.Length - 10).Replace("(", "").Replace(")", "")
End If
Try
Dim DbAddress As String = "127.0.0.1"
Dim DbMasterKey As Integer = 0
Dim sDbMasterKey As String = ""
Dim sSharedFolder As String = ""
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
GetMainPrivateProfileString(S_GENERAL, K_DBADDRESS, "", DbAddress)
DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
If DbMasterKey > 0 Then
sDbMasterKey = DbMasterKey.ToString("000000")
End If
If Not m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
If DbMasterKey > 0 Then
sDbMasterKey = DbMasterKey.ToString("000000")
End If
ElseIf GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0) = 0 Then
Dim nKey As Integer = 0
If Integer.TryParse(sKey.Substring(3, 6), nKey) AndAlso nKey > 0 Then
WriteMainPrivateProfileString(S_GENERAL, K_DBMASTERKEY, nKey)
End If
End If
DataLayer.DbConfig.InitDb(DbAddress, sUser, sPwd, sDbMasterKey)
DataLayer.DbConfig.SetupLogDir(Map.refMainWindowVM.MainWindowM.sTempDir)
DataLayer.DbConfig.CheckMigrateDb()
DataLayer.DbConfig.CheckUser(sUser, sPwd, Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK))
DataLayer.DbConfig.CheckViews(sUser, sPwd)
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) And bNetwork Then
' imposto cartella condivisa
GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataRoot, sSharedFolder)
Map.refMainWindowVM.MainWindowM.UpdatePathForNetwork(sSharedFolder)
Dim sSupervisorMachName As String = ""
GetMainPrivateProfileString(S_MACH, K_SUPERVISORMACH, "", sSupervisorMachName)
If Not String.IsNullOrWhiteSpace(sSupervisorMachName) Then m_SupervisorId = sSupervisorMachName
ElseIf Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
' imposto cartella chiave master
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sDbMasterKey)
If String.IsNullOrWhiteSpace(DbAddress) OrElse DbMasterKey <= 0 Then
DbAddress = "127.0.0.1"
DbMasterKey = 0
Else
' imposto cartella chiave locale
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sKey.Substring(3, 6))
m_bNetwork = True
End If
Catch ex As Exception
EgtOutLog("InitDb error: " & ex.ToString())
MessageBox.Show(Application.Current.MainWindow, "Db connection error!!", "Error")
End
End Try
End If
If Not m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
If DbMasterKey > 0 Then
sDbMasterKey = DbMasterKey.ToString("000000")
End If
ElseIf GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0) = 0 Then
Dim nKey As Integer = 0
If Integer.TryParse(sKey.Substring(3, 6), nKey) AndAlso nKey > 0 Then
WriteMainPrivateProfileString(S_GENERAL, K_DBMASTERKEY, nKey)
End If
End If
DataLayer.DbConfig.InitDb(DbAddress, sUser, sPwd, sDbMasterKey)
DataLayer.DbConfig.SetupLogDir(Map.refMainWindowVM.MainWindowM.sTempDir)
DataLayer.DbConfig.CheckMigrateDb()
DataLayer.DbConfig.CheckUser(sUser, sPwd, m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK))
DataLayer.DbConfig.CheckViews(sUser, sPwd)
If m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
' imposto cartella condivisa
GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataRoot, sSharedFolder)
Map.refMainWindowVM.MainWindowM.UpdatePathForNetwork(sSharedFolder)
Dim sSupervisorMachName As String = ""
GetMainPrivateProfileString(S_MACH, K_SUPERVISORMACH, "", sSupervisorMachName)
If Not String.IsNullOrWhiteSpace(sSupervisorMachName) Then m_SupervisorId = sSupervisorMachName
ElseIf Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
' imposto cartella chiave master
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sDbMasterKey)
Else
' imposto cartella chiave locale
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sKey.Substring(3, 6))
End If
Catch ex As Exception
EgtOutLog("InitDb error: " & ex.ToString())
MessageBox.Show(Application.Current.MainWindow, "Db connection error!!", "Error")
End
End Try
m_ProjController = New DataLayer.Controllers.ProjController
m_ProdController = New DataLayer.Controllers.ProdController
m_MachGroupController = New DataLayer.Controllers.MachGroupController
m_PartController = New DataLayer.Controllers.PartController
m_LogMachineController = New DataLayer.Controllers.LogMachineController
m_StatusMapController = New DataLayer.Controllers.StatusMapController
End Sub
m_ProjController = New DataLayer.Controllers.ProjController
m_ProdController = New DataLayer.Controllers.ProdController
m_MachGroupController = New DataLayer.Controllers.MachGroupController
m_PartController = New DataLayer.Controllers.PartController
m_LogMachineController = New DataLayer.Controllers.LogMachineController
m_StatusMapController = New DataLayer.Controllers.StatusMapController
End Sub
End Module
@@ -79,7 +79,8 @@ Public Class BTLStructureVM
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
Case SelectionTypes.HIGHLIGHT
If m_PrevSelectionType = SelectionTypes.SELECT_ Then
EgtBeamShowFacesName( False)
EgtBeamShowLoadingSide( False, False)
End If
If Not IsNothing(m_SelBTLPart) Then
m_SelBTLPart = Nothing
@@ -181,6 +182,8 @@ Public Class BTLStructureVM
End Sub
Private Sub SelectBTLPart(BtlPart As BTLPartVM)
EgtBeamShowFacesName( False)
EgtBeamShowLoadingSide( False, False)
m_SelBTLPart = BtlPart
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
' se modalità building, la tolgo
@@ -191,6 +194,10 @@ Public Class BTLStructureVM
SceneSelPartSelection()
' seleziono pezzo in Db geometrico
EgtBeamSetPart(BtlPart.nPartId)
EgtBeamShowFacesName( True)
Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM)
Dim bLeftToRight As Boolean = Not ( CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
EgtBeamShowLoadingSide( bLoadingSideShow, bLeftToRight)
' seleziono pagina BottomPanel
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART)
'' mostro barra di gestione pezzo
@@ -239,6 +246,8 @@ Public Class BTLStructureVM
Map.refProjectVM.BTLStructureVM.ShowSolid(False, BtlPart.nPartId)
End If
If m_SelBTLPart Is BtlPart Then
EgtBeamShowFacesName( False)
EgtBeamShowLoadingSide( False, False)
m_SelBTLPart = Nothing
NotifyPropertyChanged(NameOf(SelBTLPart))
End If
@@ -34,12 +34,6 @@ Public Class ChangeParameterWndVM
m_ParamList.Add(New Parameters(NewBTLParam))
ParamIndex += 1
End While
'' leggo tutti i Q della feature
'ParamIndex = 1
'While BTLIniFile.GetBeamPrivateProfileParam(m_SelPRC.nGRP, m_SelPRC.nPRC, False, ParamIndex, Nothing, NewBTLParam)
' m_ParamList.Add(New Parameters(NewBTLParam))
' ParamIndex += 1
'End While
' aggiungo bDO come parametro
m_ParamList.Add(New Parameters(NewBTLParam, True))
' seleziono parametro vuoto per dargli un valore iniziale ed evitare che visualizzi sia text che check
@@ -188,21 +182,21 @@ Public Class Parameters
End Property
Private m_bActualValue As Boolean
Public Property bActualValue As String
Public Property bActualValue As Boolean
Get
Return m_bActualValue
End Get
Set(value As String)
Set(value As Boolean)
m_bActualValue = value
End Set
End Property
Private m_bNewValue As String
Public Property bNewValue As String
Private m_bNewValue As Boolean
Public Property bNewValue As Boolean
Get
Return m_bNewValue
End Get
Set(value As String)
Set(value As Boolean)
m_bNewValue = value
End Set
End Property
@@ -234,6 +228,7 @@ Public Class Parameters
Sub New(BTLParamM As BTLParamM, Optional IsCheckBox As Boolean = False)
MyBase.New(BTLParamM)
m_bIsCheckBox = IsCheckBox
If IsCheckBox Then m_BTLParamM.SetType(BTLParamType.CHECKBOX)
End Sub
'Shared Operator =(ByVal S1 As Parameters, ByVal S2 As BTLParam) As Boolean
@@ -949,6 +949,12 @@
<ItemGroup>
<Resource Include="Resources\PartManager\Clock.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\LeftPanel\NewRawPartAuto.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\TopPanel\RemoveAllRawPart.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR32.exe
@@ -271,12 +271,12 @@ Public Class FreeContourManagerVM
Private m_cmdDelete As ICommand
Private m_cmdModifyCurve As ICommand
Private m_cmdAddPointCurve As ICommand
Private m_cmdRemovePointCurve As ICommand
Private m_cmdArcflip As ICommand
Private m_cmdMove As ICommand
Private m_cmdRotate As ICommand
Private m_cmdMirror As ICommand
Private m_cmdScale As ICommand
Private m_cmdRemovePointCurve As ICommand
Private m_cmdChangeStart As ICommand
Private m_cmdInvertCurve As ICommand
Private m_cmdTextAngle As ICommand
@@ -982,21 +982,13 @@ Public Class FreeContourManagerVM
''' Execute the Line2P. This method is invoked by the Line2PCommand.
''' </summary>
Public Sub Line2P(ByVal param As Object)
' cancello eventuale gruppo precedente
Dim nNewPathLayerId As Integer = EgtGetFirstNameInGroup(nSelPartId, "NewPathLayer")
If nNewPathLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewPathLayerId)
Else
nNewPathLayerId = EgtCreateGroup(nSelPartId)
End If
Dim nNewPathLayerId As Integer = EgtCreateGroup(nSelPartId)
EgtSetName(nNewPathLayerId, "NewPathLayer")
EgtSetCurrPartLayer(nSelPartId, nNewPathLayerId)
InitCommand(False)
InitCommand(True)
Map.refSceneHostVM.MainController.SetContinue()
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.LINE2P) Then
m_bIsCreatingPath = True
Else
EgtErase(nNewPathLayerId)
End If
End Sub
@@ -131,6 +131,18 @@
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<!--PosZ - Posizione in Z-->
<DataGridTextColumn x:Key="colPOSZ" Binding="{Binding sPosZ}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:RawPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="Blue" />
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<!--MAT - Materiale-->
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
<DataGridTextColumn.Header>
@@ -69,6 +69,12 @@ Public Class RawPartListVM
End Get
End Property
Public ReadOnly Property PosZ_Msg As String
Get
Return EgtMsg(61728)
End Get
End Property
Public ReadOnly Property Material_Msg As String
Get
Return EgtMsg(61607)
@@ -90,6 +90,13 @@
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding NewRawPartLast_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding NewRawPartLast_ToolTip}"
IsEnabled="{Binding LeftPanel_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPartAuto.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddToRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding AddToRawPart_ToolTip}"
@@ -100,6 +100,7 @@ Public Class LeftPanelVM
' Definizione comandi
Private m_cmdNewRawPart As ICommand
Private m_cmdNewRawPartLast As ICommand
Private m_cmdAddToRawPart As ICommand
Private m_cmdCopyPart As ICommand
Private m_cmdAddPart As ICommand
@@ -155,6 +156,12 @@ Public Class LeftPanelVM
End Get
End Property
Public ReadOnly Property NewRawPartLast_ToolTip As String
Get
Return EgtMsg(61977)
End Get
End Property
Public ReadOnly Property AddToRawPart_ToolTip As String
Get
Return EgtMsg(61904)
@@ -258,7 +265,7 @@ Public Class LeftPanelVM
Public ReadOnly Property NewRawPart_Command As ICommand
Get
If m_cmdNewRawPart Is Nothing Then
m_cmdNewRawPart = New Command(AddressOf NewRawPart)
m_cmdNewRawPart = New Command(AddressOf NewRawPartCmd)
End If
Return m_cmdNewRawPart
End Get
@@ -267,7 +274,11 @@ Public Class LeftPanelVM
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub NewRawPart()
Public Sub NewRawPartCmd()
NewRawPart(False)
End Sub
Public Sub NewRawPart(bLast As Boolean)
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
Dim SelParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
@@ -341,21 +352,28 @@ Public Class LeftPanelVM
Case WarehouseType.MEDIUM
Dim SectionList As List(Of SParam) = WarehouseHelper.GetSectionList()
Dim SParamlist As List(Of SParam) = SectionList.FindAll(Function(x) x.SectXMat = SelParts(0).Section)
If SParamlist.Count = 0 Then
' apro finestra con solo edit
If AddRawPartWnd(AddRawPartWndVM.EditTypes.ONLY_TEXT, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
WarehouseHelper.SetStartOffset(dStartOffset)
Else
WarehouseHelper.SetKerf(dKerf)
End If
If bLast Then
If SParamlist.Count > 0 Then
dRawL = SParamlist(0).dL
dRawW = SParamlist(0).dW
Else
MessageBox.Show(EgtMsg(61975), EgtMsg(30007))
Return
End If
ElseIf SParamlist.Count = 1 Then
' se premuto shift
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Else
If SParamlist.Count = 0 Then
' apro finestra con solo edit
If AddRawPartWnd(AddRawPartWndVM.EditTypes.ONLY_TEXT, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
WarehouseHelper.SetStartOffset(dStartOffset)
Else
WarehouseHelper.SetKerf(dKerf)
End If
Else
Return
End If
ElseIf SParamlist.Count > 0 Then
' imposto finestra con anche edit
If AddRawPartWnd(AddRawPartWndVM.EditTypes.TEXT_AND_COMBO, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
@@ -367,28 +385,6 @@ Public Class LeftPanelVM
Else
Return
End If
Else
' creo grezzo con l'unico materiale
dRawL = SParamlist(0).dL
dRawW = SParamlist(0).dW
End If
Else
' imposto finestra di sola scelta dimensione
Dim EditType As AddRawPartWndVM.EditTypes = AddRawPartWndVM.EditTypes.ONLY_COMBO
' se premuto shift
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
' imposto finestra con anche edit
EditType = AddRawPartWndVM.EditTypes.TEXT_AND_COMBO
End If
If AddRawPartWnd(EditType, SParamlist, dRawW, dRawL, dStartOffset, dOffset, dKerf) Then
WarehouseHelper.SetOffset(Map.refProjectVM.BTLStructureVM.nPROJTYPE, dOffset)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
WarehouseHelper.SetStartOffset(dStartOffset)
Else
WarehouseHelper.SetKerf(dKerf)
End If
Else
Return
End If
End If
End Select
@@ -412,23 +408,23 @@ Public Class LeftPanelVM
Dim nCurrMachGroup As Integer = EgtGetCurrMachGroup()
Dim sCurrMachGroupName As String = ""
EgtGetMachGroupName(nCurrMachGroup, sCurrMachGroupName)
' ordino i pezzi per lunghezza
SelParts = SelParts.OrderBy(Function(x) x.dL).ToList
' creo copie dei pezzi
Dim nPartDuploIdList As New List(Of Integer)
For Each Part In SelParts
Dim nDuploId As Integer = EgtDuploNew(Part.nPartId)
' elimino valori calcolo dell'originale
MyMachGroupPanelVM.DuploRemoveProjCalc(nDuploId)
' lo rendo std
EgtSetMode(nDuploId, GDB_MD.STD)
nPartDuploIdList.Add(nDuploId)
Next
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
' scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
EgtSetInfo(nCurrMachGroup, MGR_RPT_PRODID, Map.refProdManagerVM.CurrProd.nProdId)
EgtSetInfo(nCurrMachGroup, MGR_RPT_PATTID, nCurrMachGroup)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
' ordino i pezzi per lunghezza
SelParts = SelParts.OrderBy(Function(x) x.dL).ToList
' creo copie dei pezzi
Dim nPartDuploIdList As New List(Of Integer)
For Each Part In SelParts
Dim nDuploId As Integer = EgtDuploNew(Part.nPartId)
' elimino valori calcolo dell'originale
MyMachGroupPanelVM.DuploRemoveProjCalc(nDuploId)
' lo rendo std
EgtSetMode(nDuploId, GDB_MD.STD)
nPartDuploIdList.Add(nDuploId)
Next
' scrivo dati costruzione grezzo in gruppo di lavorazione
EgtSetInfo(nCurrMachGroup, MGR_RPT_BARLEN, dRawL)
EgtSetInfo(nCurrMachGroup, MGR_RPT_MATERIAL, SelPart.sMATERIAL)
@@ -546,9 +542,91 @@ Public Class LeftPanelVM
dKerf = AddRawPartWndVM.VariableList(2).dValue
dOffset = AddRawPartWndVM.VariableList(3).dValue
End Select
' verifico se il materiale esiste in magazzino o devo aggiungerlo
Dim CurrSParam As SParam
Select Case EditType
Case AddRawPartWndVM.EditTypes.ONLY_TEXT
' lo aggiungo a lista materiali in magazzino
CurrSParam = AddRawMaterial(dRawW, dRawL)
Case AddRawPartWndVM.EditTypes.ONLY_COMBO
' non faccio nulla
Case AddRawPartWndVM.EditTypes.TEXT_AND_COMBO
' verifico se lunghezza testo corrisponde a materiale
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
CurrSParam = SParamlist.FirstOrDefault(Function(x) x.dL = AddRawPartWndVM.VariableList(0).dValue)
Else
CurrSParam = SParamlist.FirstOrDefault(Function(x) x.dL = AddRawPartWndVM.VariableList(1).dValue AndAlso x.dW = AddRawPartWndVM.VariableList(0).dValue)
End If
If IsNothing(CurrSParam) Then
' lo aggiungo a lista materiali in magazzino
CurrSParam = AddRawMaterial(dRawW, dRawL)
End If
End Select
' imposto il materiale selezionato come ultimo utilizzato
Return True
End Function
Private Function AddRawMaterial(dRawW As Double, ByRef dRawL As Double) As SParam
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
Dim nQuantity As Integer = GetMainPrivateProfileInt(S_WAREHOUSE, K_DEFAULTQUANTITY, 1)
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
' creo sParam
Dim CurrSParam As New SParam(Map.refProjectVM.BTLStructureVM.SelBTLPart.Section, dRawL, nQuantity, False)
Dim sL As String = String.Empty
sL = LenToString(CurrSParam.dL, 3)
' ricavo l'indice del SecionXMaterial dalla Beam_List
Dim SectXMatIndex As Integer = 1
Dim sSxMValue As String = ""
While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, SectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
If sSxMValue = CurrSParam.sValue Then
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
Exit While
End If
SectXMatIndex += 1
End While
' ricavo nuovo indice materiale
Dim ParamIndex As Integer = 1
Dim sParam As String = ""
While GetPrivateProfileString(S_BEAM, K_L & ParamIndex, "", sParam, sWarehousePath) > 0
ParamIndex += 1
End While
' lo aggiungo in warehouse
WritePrivateProfileString(S_BEAM, K_L & ParamIndex,
SectXMatIndex & "," & sL & "," & CurrSParam.nQuantity & "," & If(CurrSParam.bActive, 1, 0),
sWarehousePath)
Return CurrSParam
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
' creo sParam
Dim CurrSParam As New SParam(Map.refProjectVM.BTLStructureVM.SelBTLPart.Section, dRawW, dRawL, nQuantity, False)
Dim sW As String = String.Empty
Dim sL As String = String.Empty
sW = LenToString(CurrSParam.dW, 3)
sL = LenToString(CurrSParam.dL, 3)
' ricavo l'indice del SecionXMaterial dalla Wall_List
Dim SectXMatIndex As Integer = 1
Dim sSxMValue As String = ""
While EgtUILib.GetPrivateProfileString(S_WALL_LIST, SectXMatIndex, String.Empty, sSxMValue, sWarehousePath)
If sSxMValue = CurrSParam.sValue Then
' se l'ho trovato esco dal while, il SectXMatIndex è l'indice che cercavamo
Exit While
End If
SectXMatIndex += 1
End While
' ricavo nuovo indice materiale
Dim ParamIndex As Integer = 1
Dim sParam As String = ""
While GetPrivateProfileString(S_WALL, K_S & ParamIndex, "", sParam, sWarehousePath) = 0
ParamIndex += 1
End While
' lo aggiungo in warehouse
WritePrivateProfileString(S_WALL, K_S & ParamIndex,
SectXMatIndex & "," & sW & "," & sL & "," & CurrSParam.nQuantity & "," & If(CurrSParam.bActive, 1, 0),
sWarehousePath)
Return CurrSParam
End If
End Function
Private Function VerifyPartCount(SelParts As List(Of BTLPartVM)) As Boolean
' verifico se ci sono pezzi da aggiungere
Dim ToAddList As New List(Of String)
@@ -578,6 +656,29 @@ Public Class LeftPanelVM
#End Region ' NewRawPart
#Region "NewRawPartLast"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property NewRawPartLast_Command As ICommand
Get
If m_cmdNewRawPartLast Is Nothing Then
m_cmdNewRawPartLast = New Command(AddressOf NewRawPartLast)
End If
Return m_cmdNewRawPartLast
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub NewRawPartLast()
NewRawPart(True)
End Sub
#End Region ' NewRawPartLast
#Region "AddToRawPart"
''' <summary>
@@ -652,7 +753,7 @@ Public Class LeftPanelVM
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
Dim WallMachGroup As MyMachGroupVM = SelMachGroup
' verifico spessore
If SelPart.dH < WallMachGroup.dH - EPS_SMALL OrElse SelPart.dH > WallMachGroup.dH + EPS_SMALL Then
If SelPart.Section <> WallMachGroup.Section Then
MessageBox.Show(EgtMsg(61868), EgtMsg(30007))
Return
End If
@@ -241,5 +241,4 @@ Public Class MyMachGroupPanelVM
#End Region ' METHODS
End Class
@@ -278,6 +278,38 @@ Public Class MyMachGroupVM
#End Region ' Beam
#Region "Wall"
Public Property sPosZ As String
Get
Return LenToString(MyMachGroupM.dPosZ, 3)
End Get
Set(value As String)
Dim dValue As Double
If StringToLen(value, dValue) Then
Dim nRawPartId As Integer = EgtGetFirstRawPart()
If dValue <> MyMachGroupM.dPosZ Then
Select Case nType
Case BWType.BEAM
' non utilizzato
Case BWType.WALL
' se operazione di spostamento in z ha successo
If True Then
EgtSetInfo(Id, MGR_RPT_PANELPOSZ, dValue)
EgtDraw()
MyMachGroupM.dPosZ = dValue
Else
NotifyPropertyChanged(NameOf(sPosZ))
End If
End Select
ResetCalcTotalMachGroup()
End If
End If
End Set
End Property
#End Region ' Wall
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTORS"
@@ -227,8 +227,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2408, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2408, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2411, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2411, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.8.2")>
<Assembly: AssemblyFileVersion("2.4.8.2")>
<Assembly: AssemblyVersion("2.4.11.3")>
<Assembly: AssemblyFileVersion("2.4.11.3")>
Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

@@ -9,6 +9,7 @@
Style="{StaticResource ToolBar_EgtFloatingPanel}">
<Border BorderThickness="2"
ToolTip="{Binding TotalTime_ToolTip}"
BorderBrush="Crimson"
Background="{StaticResource Omag_LightGray}"
Padding="5,0,5,0"
@@ -21,6 +22,7 @@
VerticalAlignment="Center"/>
</Border>
<Border BorderThickness="2"
ToolTip="{Binding TotalTime_ToolTip}"
BorderBrush="Crimson"
Background="{StaticResource Omag_LightGray}"
Padding="5,0,5,0"
@@ -33,6 +35,7 @@
VerticalAlignment="Center"/>
</Border>
<Border BorderThickness="2"
ToolTip="{Binding DoneTime_ToolTip}"
BorderBrush="Gold"
Padding="5,0,5,0"
Margin="2"
@@ -44,6 +47,7 @@
VerticalAlignment="Center"/>
</Border>
<Border BorderThickness="2"
ToolTip="{Binding RemainingTime_ToolTip}"
BorderBrush="White"
Padding="5,0,5,0"
Margin="2"
@@ -23,6 +23,24 @@ Public Class StatisticsTimePanelVM
#Region "ToolTip"
Public ReadOnly Property TotalTime_ToolTip As String
Get
Return EgtMsg(61978)
End Get
End Property
Public ReadOnly Property DoneTime_ToolTip As String
Get
Return EgtMsg(61979)
End Get
End Property
Public ReadOnly Property RemainingTime_ToolTip As String
Get
Return EgtMsg(61980)
End Get
End Property
#End Region ' ToolTip
#End Region ' Fields & Properties
@@ -58,6 +58,12 @@
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/TopPanel/RemoveRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemoveAllRawPart_Command}"
ToolTip="{Binding RemoveAllRawPart_ToolTip}"
IsEnabled="{Binding TopPanel_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/TopPanel/RemoveAllRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding MovePartInRawPart_Command}"
ToolTip="{Binding MovePartInRawPart_ToolTip}"
IsEnabled="{Binding TopPanel_IsEnabled}"
@@ -80,6 +80,7 @@ Public Class TopPanelVM
Private m_cmdProduceRawPart As ICommand
Private m_cmdCopyRawPart As ICommand
Private m_cmdRemoveRawPart As ICommand
Private m_cmdRemoveAllRawPart As ICommand
Private m_cmdRemovePart As ICommand
Private m_cmdMoveUpPart As ICommand
Private m_cmdMoveDownPart As ICommand
@@ -127,6 +128,12 @@ Public Class TopPanelVM
End Get
End Property
Public ReadOnly Property RemoveAllRawPart_ToolTip As String
Get
Return EgtMsg(61976)
End Get
End Property
Public ReadOnly Property ReOrderPart_ToolTip As String
Get
Return EgtMsg(61916)
@@ -365,7 +372,7 @@ Public Class TopPanelVM
Public ReadOnly Property RemoveRawPart_Command As ICommand
Get
If m_cmdRemoveRawPart Is Nothing Then
m_cmdRemoveRawPart = New Command(AddressOf RemoveRawPart)
m_cmdRemoveRawPart = New Command(AddressOf RemoveRawPartCmd)
End If
Return m_cmdRemoveRawPart
End Get
@@ -374,10 +381,14 @@ Public Class TopPanelVM
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub RemoveRawPart()
Public Sub RemoveRawPartCmd()
RemoveRawPart()
End Sub
Public Sub RemoveRawPart(Optional bAll As Boolean = False)
If IsNothing(Map.refProdManagerVM.CurrProd) Then Return
' se premuto shift
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
If bAll Then
' cancello tutti
For Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
@@ -400,6 +411,29 @@ Public Class TopPanelVM
#End Region ' RemoveRawPart
#Region "RemoveAllRawPart"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property RemoveAllRawPart_Command As ICommand
Get
If m_cmdRemoveAllRawPart Is Nothing Then
m_cmdRemoveAllRawPart = New Command(AddressOf RemoveAllRawPart)
End If
Return m_cmdRemoveAllRawPart
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub RemoveAllRawPart()
RemoveRawPart(True)
End Sub
#End Region ' RemoveRawPart
#Region "RemovePart"
''' <summary>
@@ -179,8 +179,8 @@ Public Module CurrentMachine
' crea l'elenco dei parametri della macchina corrente
CreateMachParams()
' leggo parametri macchina da WallData
If nType = MachineType.BEAM Then
' leggo parametri macchina da BeamData
If nType = MachineType.BEAM OrElse nType = MachineType.BOTH Then
' Assegno i dati
EgtLuaCreateGlobTable("GWD")
EgtLuaSetGlobStringVar("GWD.BASEDIR", Map.refMainWindowVM.MainWindowM.sBeamRoot)
@@ -200,7 +200,7 @@ Public Module CurrentMachine
End If
If bOk Then
EgtLuaGetGlobNumVar("GWD.OVM_MID", m_dMinOffset)
Dim nTemp As Integer
Dim nTemp As Integer = 0
EgtLuaGetGlobIntVar("GWD.SIMUL_VIEW_DIR", nTemp)
Select Case nTemp
Case 0
@@ -222,8 +222,9 @@ Public Module CurrentMachine
EgtLuaResetGlobVar("GWD")
' aggiorno parametro in gestore viste
Core.ViewPanelVM.UpdateMachParam(m_nViewDir)
End If
If nType = MachineType.WALL Then
' leggo parametri macchina da WallData
ElseIf nType = MachineType.WALL Then
' Assegno i dati
EgtLuaCreateGlobTable("GWD")
EgtLuaSetGlobStringVar("GWD.BASEDIR", Map.refMainWindowVM.MainWindowM.sWallRoot)
@@ -243,9 +244,11 @@ Public Module CurrentMachine
End If
If bOk Then
EgtLuaGetGlobIntVar("GWD.HOR_DRILL_DIAM", m_dHorDrillDiam)
Dim nTemp As Integer
Dim nTemp As Integer = 0
EgtLuaGetGlobIntVar("GWD.SIMUL_VIEW_DIR", nTemp)
Select Case nTemp
Case 0
m_nViewDir = VT.ISO_SW
Case 1
m_nViewDir = VT.ISO_NW
Case 2
@@ -5,94 +5,94 @@ Imports EgtBEAMWALL.ViewerOptimizer
Public Module DbControllers
Friend m_SupervisorId As String = "1"
Private m_bNetwork As Boolean = False
Friend ReadOnly Property bNetwork As Boolean
Get
Return m_bNetwork
End Get
End Property
Friend m_SupervisorId As String = "1"
Private m_bNetwork As Boolean = False
Friend ReadOnly Property bNetwork As Boolean
Get
Return m_bNetwork
End Get
End Property
Public m_ProjController As DataLayer.Controllers.ProjController
Public m_ProdController As DataLayer.Controllers.ProdController
Public m_MachGroupController As DataLayer.Controllers.MachGroupController
Public m_StatusMapController As DataLayer.Controllers.StatusMapController
Public m_PartController As DataLayer.Controllers.PartController
Public m_ProjController As DataLayer.Controllers.ProjController
Public m_ProdController As DataLayer.Controllers.ProdController
Public m_MachGroupController As DataLayer.Controllers.MachGroupController
Public m_StatusMapController As DataLayer.Controllers.StatusMapController
Public m_PartController As DataLayer.Controllers.PartController
Sub Init()
End Sub
Sub Init()
End Sub
Sub New()
Sub New()
' se demo--> server = db.steamware.net, nKey e sKey come le hai...
' se demo--> server = db.steamware.net, nKey e sKey come le hai...
Dim sKey = "", sUser = "", sPwd = ""
Dim sKey = "", sUser = "", sPwd = ""
EgtGetKeyInfo(sKey)
sKey = sKey.Replace(" ", "")
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
sUser = sKey.Substring(3, 6)
sPwd = sKey.Substring(10, sKey.Length - 10).Replace("(", "").Replace(")", "")
End If
Try
Dim DbAddress As String = "127.0.0.1"
Dim DbMasterKey As Integer = 0
Dim sDbMasterKey As String = ""
Dim sSharedFolder As String = ""
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
GetMainPrivateProfileString(S_GENERAL, K_DBADDRESS, "", DbAddress)
DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
If DbMasterKey > 0 Then
sDbMasterKey = DbMasterKey.ToString("000000")
End If
If String.IsNullOrWhiteSpace(DbAddress) OrElse DbMasterKey <= 0 Then
DbAddress = "127.0.0.1"
DbMasterKey = 0
Else
m_bNetwork = True
End If
EgtGetKeyInfo(sKey)
sKey = sKey.Replace(" ", "")
If Not IsNothing(sKey) AndAlso sKey.Length > 11 Then
sUser = sKey.Substring(3, 6)
sPwd = sKey.Substring(10, sKey.Length - 10).Replace("(", "").Replace(")", "")
End If
Try
Dim DbAddress As String = "127.0.0.1"
Dim DbMasterKey As Integer = 0
Dim sDbMasterKey As String = ""
Dim sSharedFolder As String = ""
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
GetMainPrivateProfileString(S_GENERAL, K_DBADDRESS, "", DbAddress)
DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
If DbMasterKey > 0 Then
sDbMasterKey = DbMasterKey.ToString("000000")
End If
If Not m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
If DbMasterKey > 0 Then
sDbMasterKey = DbMasterKey.ToString("000000")
End If
ElseIf GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0) = 0 Then
Dim nKey As Integer = 0
If Integer.TryParse(sKey.Substring(3, 6), nKey) AndAlso nKey > 0 Then
WriteMainPrivateProfileString(S_GENERAL, K_DBMASTERKEY, nKey)
End If
End If
DataLayer.DbConfig.InitDb(DbAddress, sUser, sPwd, sDbMasterKey)
DataLayer.DbConfig.SetupLogDir(Map.refMainWindowVM.MainWindowM.sTempDir)
DataLayer.DbConfig.CheckMigrateDb()
DataLayer.DbConfig.CheckUser(sUser, sPwd, Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK))
DataLayer.DbConfig.CheckViews(sUser, sPwd)
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) And bNetwork Then
' imposto cartella condivisa
GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataDir, sSharedFolder)
Map.refMainWindowVM.MainWindowM.UpdatePathForNetwork(sSharedFolder)
Dim sSupervisorMachName As String = ""
GetMainPrivateProfileString(S_MACH, K_SUPERVISORMACH, "", sSupervisorMachName)
If Not String.IsNullOrWhiteSpace(sSupervisorMachName) Then m_SupervisorId = sSupervisorMachName
ElseIf Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
' imposto cartella chiave master
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sDbMasterKey)
If String.IsNullOrWhiteSpace(DbAddress) OrElse DbMasterKey <= 0 Then
DbAddress = "127.0.0.1"
DbMasterKey = 0
Else
' imposto cartella chiave locale
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sKey.Substring(3, 6))
m_bNetwork = True
End If
Catch ex As Exception
EgtOutLog("InitDb error: " & ex.ToString())
MessageBox.Show(Application.Current.MainWindow, "Db connection error!!", "Error")
End
End Try
End If
If Not m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
DbMasterKey = GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0)
If DbMasterKey > 0 Then
sDbMasterKey = DbMasterKey.ToString("000000")
End If
ElseIf GetMainPrivateProfileInt(S_GENERAL, K_DBMASTERKEY, 0) = 0 Then
Dim nKey As Integer = 0
If Integer.TryParse(sKey.Substring(3, 6), nKey) AndAlso nKey > 0 Then
WriteMainPrivateProfileString(S_GENERAL, K_DBMASTERKEY, nKey)
End If
End If
DataLayer.DbConfig.InitDb(DbAddress, sUser, sPwd, sDbMasterKey)
DataLayer.DbConfig.SetupLogDir(Map.refMainWindowVM.MainWindowM.sTempDir)
DataLayer.DbConfig.CheckMigrateDb()
DataLayer.DbConfig.CheckUser(sUser, sPwd, m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK))
DataLayer.DbConfig.CheckViews(sUser, sPwd)
If m_bNetwork AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NETWORK) Then
' imposto cartella condivisa
GetMainPrivateProfileString(S_GENERAL, K_SHAREDFOLDER, Map.refMainWindowVM.MainWindowM.sDataDir, sSharedFolder)
Map.refMainWindowVM.MainWindowM.UpdatePathForNetwork(sSharedFolder)
Dim sSupervisorMachName As String = ""
GetMainPrivateProfileString(S_MACH, K_SUPERVISORMACH, "", sSupervisorMachName)
If Not String.IsNullOrWhiteSpace(sSupervisorMachName) Then m_SupervisorId = sSupervisorMachName
ElseIf Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ANY_DB) Then
' imposto cartella chiave master
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sDbMasterKey)
Else
' imposto cartella chiave locale
Map.refMainWindowVM.MainWindowM.UpdatePathForKey(sKey.Substring(3, 6))
End If
Catch ex As Exception
EgtOutLog("InitDb error: " & ex.ToString())
MessageBox.Show(Application.Current.MainWindow, "Db connection error!!", "Error")
End
End Try
m_ProjController = New DataLayer.Controllers.ProjController
m_ProdController = New DataLayer.Controllers.ProdController
m_MachGroupController = New DataLayer.Controllers.MachGroupController
m_StatusMapController = New DataLayer.Controllers.StatusMapController
m_PartController = New DataLayer.Controllers.PartController
End Sub
m_ProjController = New DataLayer.Controllers.ProjController
m_ProdController = New DataLayer.Controllers.ProdController
m_MachGroupController = New DataLayer.Controllers.MachGroupController
m_StatusMapController = New DataLayer.Controllers.StatusMapController
m_PartController = New DataLayer.Controllers.PartController
End Sub
End Module
@@ -250,4 +250,85 @@ Module WarehouseHelper
SectXMat.dW >= 0
End Function
Friend Function GetLastMaterial(SectXMat As SectionXMaterial) As SParam
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
'If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
' Dim ParamIndex As Integer = 1
' Dim sSxMValue As String = ""
' While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, ParamIndex, String.Empty, sSxMValue, sWarehousePath) > 0
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
' ' creo parametro
' Dim dW As Double = 0
' Dim dH As Double = 0
' Dim sMaterial As String = sSectXMatValues(2)
' StringToLen(sSectXMatValues(0), dW)
' StringToLen(sSectXMatValues(1), dH)
' If SectXMat.dW = dW AndAlso SectXMat.dH = dH AndAlso SectXMat.sMaterial(0) = sMaterial Then
' If sSectXMatValues.Length <= 3 Then Return Nothing
' Dim sValue As String = ""
' If EgtUILib.GetPrivateProfileString(S_BEAM, "L" & sSectXMatValues(3), String.Empty, sValue, sWarehousePath) Then
' End If
' End If
' End While
' If EgtUILib.GetPrivateProfileString(S_BEAM, "L" & ParamIndex, String.Empty, sValue, sWarehousePath) Then
' Dim sParamValues() As String = sValue.Split(","c)
' ' verifico numero minimo di parametri
' If sParamValues.Count < 2 Then Return Nothing
' ' cancello spazi
' For Index = 0 To sParamValues.Count - 1
' sParamValues(Index) = sParamValues(Index).Trim()
' Next
' ' ricavo SectionXMaterial tramite Beam_List
' If EgtUILib.GetPrivateProfileString(S_BEAM_LIST, sParamValues(0), String.Empty, sSxMValue, sWarehousePath) Then
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
' ' creo parametro
' Dim dW As Double = 0
' Dim dH As Double = 0
' Dim dL As Double = 0
' Dim nQty As Integer = 0
' Dim nActive As Integer = 1
' StringToLen(sSectXMatValues(0), dW)
' StringToLen(sSectXMatValues(1), dH)
' StringToLen(sParamValues(1), dL)
' If sParamValues.Count >= 3 Then Integer.TryParse(sParamValues(2), nQty)
' If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nActive)
' Return New SParam(New SectionXMaterial(dW, dH, dL, sSectXMatValues(2)), dL, nQty, nActive > 0)
' End If
' End If
'ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
' If EgtUILib.GetPrivateProfileString(S_WALL, "S" & ParamIndex, String.Empty, sValue, sWarehousePath) Then
' Dim sParamValues() As String = sValue.Split(","c)
' ' verifico numero minimo di parametri
' If sParamValues.Count >= 3 Then
' ' cancello spazi
' For Index = 0 To sParamValues.Count - 1
' sParamValues(Index) = sParamValues(Index).Trim()
' Next
' ' ricavo SectionXMaterial tramite Wall_List
' If EgtUILib.GetPrivateProfileString(S_WALL_LIST, sParamValues(0), String.Empty, sSxMValue, sWarehousePath) Then
' Dim sSectXMatValues() As String = sSxMValue.Split(","c)
' ' creo parametro
' Dim dH As Double = 0
' Dim dW As Double = 0
' Dim dL As Double = 0
' Dim nQty As Integer = 0
' Dim nActive As Integer = 1
' StringToLen(sSectXMatValues(0), dH)
' StringToLen(sParamValues(1), dW)
' StringToLen(sParamValues(2), dL)
' If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nQty)
' If sParamValues.Count >= 5 Then Integer.TryParse(sParamValues(4), nActive)
' Return New SParam(New SectionXMaterial(dW, dH, dL, sSectXMatValues(1)), dW, dL, nQty, nActive > 0)
' End If
' End If
' End If
'End If
End Function
End Module
@@ -1084,7 +1084,9 @@ Public Class WarehouseWndVM
Dim dH As Double = 0
StringToLen(sSectXMatValues(0), dW)
StringToLen(sSectXMatValues(1), dH)
SectXMatList.Add(New SectionXMaterial(dW, dH, 0, sSectXMatValues(2)))
If Not SectXMatList.Any(Function(x) x.dW = dW AndAlso x.dH = dH AndAlso x.sMaterial(0) = sSectXMatValues(2)) Then
SectXMatList.Add(New SectionXMaterial(dW, dH, 0, sSectXMatValues(2)))
End If
sSectXMatIndex += 1
End While
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
Binary file not shown.
Binary file not shown.