Compare commits

...

19 Commits

Author SHA1 Message Date
Emmanuele Sassi 96dd92c3d3 - aggiunta pausa di rilettura variabile programma inviato su cn Axium 2022-12-07 09:45:31 +01:00
Emmanuele Sassi ebc41183bc - correzione lettura dimensioni se bottone assemblato premuto ma progetto in stato non assemblato per esecuzione calcoli 2022-12-07 09:44:45 +01:00
Emmanuele Sassi feb7982bef - Modifica icone 2022-12-07 09:43:18 +01:00
Emmanuele Sassi f241b72453 - Aggiunta gestione ultimo grezzo utilizzato
- Migliorata gestione bottone cancella tutti
2022-12-06 18:30:20 +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
87 changed files with 721 additions and 279 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
@@ -632,13 +632,17 @@ Public MustInherit Class MyMachGroupVM
Public ReadOnly Property DeleteMachGroup_Command As ICommand
Get
If m_cmdDeleteMachGroup Is Nothing Then
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroup)
m_cmdDeleteMachGroup = New Command(AddressOf DeleteMachGroupCmd)
End If
Return m_cmdDeleteMachGroup
End Get
End Property
Public Overridable Sub DeleteMachGroup()
Public Sub DeleteMachGroupCmd()
DeleteMachGroup()
End Sub
Public Overridable Sub DeleteMachGroup(Optional bMultipleCommand As Boolean = False)
' elimino tutte le copie
Dim nRawPartId As Integer = EgtGetFirstRawPart()
Dim nBeamId As Integer = EgtGetFirstPartInRawPart(nRawPartId)
+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")]
@@ -701,6 +701,9 @@ Public Class NUMAxiumPcToolkitComm
Try
ISONumVariable.sValue = SentMachGroup.Name
ISOSentVariable.sValue = 0
While ISOSentVariable.sValue <> 0
Threading.Thread.Sleep(100)
End While
SentMachGroup.SetSentToMachine(True)
Catch ex As Exception
EgtOutLog("Error write var after download: " & ex.Message)
@@ -710,6 +713,7 @@ Public Class NUMAxiumPcToolkitComm
nRes = DownLoadFileAsyn(nPortFileTransfer, nFileType, sFilePath, DNC_MODE_ABORT, nIndex)
SendPermissionVariable.sValue = 0
m_BytesTransferedCounter = 0
Threading.Thread.Sleep(500)
m_bIsTransferActive = False
Return
End Sub)
@@ -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
@@ -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")>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 B

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 832 B

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 B

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 899 B

After

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 782 B

+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
@@ -102,7 +102,12 @@ Public Class AddRawPartWndVM
End Select
m_DimensionsList = DimensionsList
If m_DimensionsList.Count > 0 Then
SelDimension = m_DimensionsList(0)
Dim LastMaterial As SParam = WarehouseHelper.GetLastMaterial(DimensionsList(0).SectXMat)
If IsNothing(LastMaterial) Then
SelDimension = m_DimensionsList(0)
Else
SelDimension = m_DimensionsList.FirstOrDefault(Function(x) x.SectXMat = LastMaterial.SectXMat AndAlso x.dL = LastMaterial.dL AndAlso x.dW = LastMaterial.dW AndAlso x.nQuantity = LastMaterial.nQuantity)
End If
End If
' riduco lista parametri a solo quelli che utilizzati
m_VariableList_View = CollectionViewSource.GetDefaultView(m_VariableList)
@@ -156,7 +156,7 @@ Public Class BTLPartVM
Public Property sL As String
Get
Dim nOrigGroupId As Integer = nPartId
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId)
End If
Dim frBeam As New Frame3d
@@ -214,7 +214,7 @@ Public Class BTLPartVM
Public Property sW As String
Get
Dim nOrigGroupId As Integer = nPartId
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId)
End If
Dim frBeam As New Frame3d
@@ -272,7 +272,7 @@ Public Class BTLPartVM
Public Property sH As String
Get
Dim nOrigGroupId As Integer = nPartId
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId)
End If
Dim frBeam As New Frame3d
@@ -1395,7 +1395,7 @@ Public Class BTLPartVM
Public ReadOnly Property Section As SectionXMaterial
Get
Dim nOrigGroupId As Integer = nPartId
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
nOrigGroupId = GetOrigFrameGroup(nPartId)
End If
Dim frBeam As New Frame3d
@@ -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
@@ -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,32 @@ 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
Dim LastMaterial As SParam = WarehouseHelper.GetLastMaterial(SelParts(0).Section)
If Not IsNothing(LastMaterial) Then
dRawL = LastMaterial.dL
dRawW = LastMaterial.dW
ElseIf 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 +389,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 +412,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 +546,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
SetLastMaterial(CurrSParam.SectXMat, CurrSParam)
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 +660,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 +757,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"
@@ -778,7 +810,7 @@ Public Class MyMachGroupVM
#Region "DeleteMachGroup"
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Overrides Sub DeleteMachGroup()
Public Overrides Sub DeleteMachGroup(Optional bMultipleCommand As Boolean = False)
If EgtSetCurrMachGroup(Me.Id) Then
' elimino tutte le copie
Dim nRawPartId As Integer = EgtGetFirstRawPart()
@@ -807,25 +839,28 @@ Public Class MyMachGroupVM
' elimino MachGroup
EgtRemoveMachGroup(Me.Id)
End If
' rimuovo dalla lista grezzi
Dim Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.IndexOf(Me)
If Index = 0 Then
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(1)
' cambio pezzo selezionato
If bMultipleCommand Then
Dim Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.IndexOf(Me)
If Index = 0 Then
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(1)
Else
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
EgtDraw()
End If
ElseIf Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 Then
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 2)
Else
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
EgtDraw()
End If
Else
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
EgtDraw()
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1)
End If
ElseIf Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 Then
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 2)
Else
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
EgtDraw()
End If
Else
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1)
End If
' rimuovo dalla lista grezzi
Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me)
End Sub
@@ -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.

Before

Width:  |  Height:  |  Size: 947 B

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 B

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 B

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 B

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 478 B

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 681 B

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 711 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 797 B

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 435 B

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 B

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 508 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,16 +381,20 @@ 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
' se tutti
If bAll Then
' cancello tutti
For Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 To 0 Step -1
Dim CurrMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.MachGroupVMList(Index)
' se barra gia' assegnata a supervisore, esco
If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Continue For
CurrMachGroup.DeleteMachGroup()
CurrMachGroup.DeleteMachGroup(True)
Next
Else
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
@@ -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,148 @@ 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
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
Dim dL As Double = 0
Dim nQty As Integer = 0
Dim nActive As Integer = 1
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
ParamIndex += 1
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
Friend Sub SetLastMaterial(SectXMat As SectionXMaterial, SParam As SParam)
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
' cerco sezione
Dim SectIndex As Integer = 1
Dim sSxMValue As String = ""
While EgtUILib.GetPrivateProfileString(S_BEAM_LIST, SectIndex, 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
' recupero indice di SParam
Dim SParamIndex As Integer = 1
Dim sValue As String = ""
While EgtUILib.GetPrivateProfileString(S_BEAM, "L" & SParamIndex, String.Empty, sValue, sWarehousePath)
Dim sParamValues() As String = sValue.Split(","c)
' verifico numero minimo di parametri
If sParamValues.Count < 2 Then Return
' cancello spazi
For Index = 0 To sParamValues.Count - 1
sParamValues(Index) = sParamValues(Index).Trim()
Next
Dim dL As Double = 0
Dim nSectIndex As Integer = sParamValues(0)
Dim nQty As Integer = 0
Dim nActive As Integer = 1
StringToLen(sParamValues(1), dL)
If sParamValues.Count >= 3 Then Integer.TryParse(sParamValues(2), nQty)
If sParamValues.Count >= 4 Then Integer.TryParse(sParamValues(3), nActive)
Dim bActive As Boolean = nActive = 1
If dL = SParam.dL AndAlso nQty = SParam.nQuantity AndAlso bActive = SParam.bActive Then
' scrivo indice ultimo materiale
EgtUILib.WritePrivateProfileString(S_BEAM_LIST, SectIndex, LenToString(dW, 3) & "," &
LenToString(dH, 3) & "," &
sMaterial & "," &
SParamIndex, sWarehousePath)
End If
SParamIndex += 1
End While
End If
SectIndex += 1
End While
End If
End Sub
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.