Compare commits

...

13 Commits

Author SHA1 Message Date
Emmanuele Sassi 5b04080f35 EgtBEAMWALL 2.5f2 :
- aggiornamento versioni
2023-06-13 12:21:08 +02:00
Emmanuele Sassi 0d7cc99a2d Merge branch 'fix/UpdatePriorityInProd' 2023-06-13 12:15:16 +02:00
Emmanuele Sassi d48deed9e0 - gestione presenza Priority da flag su WallData 2023-06-12 12:50:26 +02:00
DarioS 4d8f0d6411 EgtBeamWall :
- aggiornata libreria esterna EgtUILib.dll.
2023-06-12 10:37:54 +02:00
Emmanuele Sassi 1cff7af4a6 EgtBEAMWALL 2.5f1 :
- aggiornamento versioni
2023-06-12 10:25:20 +02:00
Emmanuele Sassi c3cc4518d8 Merge branch 'fix/MacComm' 2023-06-12 10:08:33 +02:00
Emmanuele Sassi 04debf6b51 Merge branch 'feature/MachLogFilter' 2023-06-12 10:08:24 +02:00
Emmanuele Sassi cc71f0a34f - aggiunti messaggi nelle varie lingue 2023-06-12 10:06:49 +02:00
Emmanuele Sassi 3787b4e1f5 - commentati log 2023-06-12 09:16:44 +02:00
Emmanuele Sassi 9f4e025305 - scrittura e lettura da ini dei filtri del log macchina
- Aggiunta testi per filtri log macchina
2023-06-09 17:48:57 +02:00
Emmanuele Sassi ecbd6ecd66 - modifiche per log macchina su supervisore 2023-06-09 14:57:53 +02:00
Emmanuele Sassi c968befafb - aggiunta log 2023-06-09 12:21:58 +02:00
Emmanuele Sassi 93b3ddec79 - gestito sinclock su lista ThreadCommand in Supervisor 2023-06-08 13:01:00 +02:00
22 changed files with 285 additions and 54 deletions
+7
View File
@@ -120,6 +120,13 @@ Public Module ConstIni
Public Const K_WALLBASEDIR As String = "BaseDir"
Public Const K_WALLBWEEXEC As String = "BweExec"
Public Const S_MACHINELOGFILTER As String = "MachineLogFilters"
Public Const K_PARTEVENTTYPE As String = "PartEventType"
Public Const K_ENTITYTYPE As String = "EntityType"
Public Const K_DAYTYPE As String = "DayType"
Public Const K_STARTDATE As String = "StartDate"
Public Const K_ENDDATE As String = "EndDate"
'Public Const S_NEST As String = "Nest"
Public Const K_NESTEXEC As String = "NestExec"
Public Const K_FLIPROT As String = "FlipRot"
+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.5.5.4")>
<Assembly: AssemblyFileVersion("2.5.5.4")>
<Assembly: AssemblyVersion("2.5.6.2")>
<Assembly: AssemblyFileVersion("2.5.6.2")>
@@ -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.5.5.4")]
[assembly: AssemblyFileVersion("2.5.5.4")]
[assembly: AssemblyVersion("2.5.6.2")]
[assembly: AssemblyFileVersion("2.5.6.2")]
@@ -40,7 +40,7 @@ Public Class LeftPanelVM
Return m_SelChannel
End Get
Set(ByVal value As IdNameStruct)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.SETCHANNEL, value.Id))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.SETCHANNEL, value.Id))
m_SelChannel = value
End Set
End Property
@@ -86,7 +86,7 @@ Public Class LeftPanelVM
Return m_SelOPMode
End Get
Set(ByVal value As OPState)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.SETOPMODE, value.Id))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.SETOPMODE, value.Id))
' se MDI
If value.Id = OPModes.Mdi Then
' mostro pagina comandi MDI
+1 -1
View File
@@ -163,7 +163,7 @@ Public Class MDIPageVM
''' </summary>
Friend Sub SendMDI()
If Not String.IsNullOrWhiteSpace(m_sMDICommand_Text) Then
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.MDI, m_sMDICommand_Text))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.MDI, m_sMDICommand_Text))
End If
End Sub
@@ -427,11 +427,11 @@ Public Class MachCommandMessagePanelVM
End Property
Public Sub Disconnect()
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.DISCONNECT))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.DISCONNECT))
End Sub
Public Sub SetOPState(OpState As Integer)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.SETOPMODE))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.SETOPMODE))
End Sub
Public ReadOnly Property Start_Command As ICommand
@@ -442,7 +442,7 @@ Public Class MachCommandMessagePanelVM
End Property
Public Sub Start(ByVal param As Object)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.START))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.START))
End Sub
Public ReadOnly Property Stop_Command As ICommand
@@ -453,7 +453,7 @@ Public Class MachCommandMessagePanelVM
End Property
Public Sub [Stop](ByVal param As Object)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.STOP_))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.STOP_))
End Sub
Public ReadOnly Property Reset_Command As ICommand
@@ -464,7 +464,7 @@ Public Class MachCommandMessagePanelVM
End Property
Public Sub Reset(ByVal param As Object)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.RESET))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.RESET))
' annullo stato di pronto ad essere lavorato di tutti i programmi
If Not IsNothing(Map.refProjectVM.SupervisorMachGroupPanelVM) Then Map.refProjectVM.SupervisorMachGroupPanelVM.ResetAllMachGroups()
End Sub
@@ -477,7 +477,7 @@ Public Class MachCommandMessagePanelVM
End Property
Public Sub [Step](ByVal param As Object)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.STEP_))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.STEP_))
End Sub
Public ReadOnly Property SetPoint_Command As ICommand
@@ -488,7 +488,7 @@ Public Class MachCommandMessagePanelVM
End Property
Public Sub SetPoint(ByVal param As Object)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.SETPOINT))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.SETPOINT))
End Sub
@@ -500,7 +500,7 @@ Public Class MachCommandMessagePanelVM
End Property
Public Sub DeleteAlarms(ByVal param As Object)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.DELETEALARMS))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.DELETEALARMS))
End Sub
Public Function GetVarPathByName(Name As String) As String
@@ -10,6 +10,9 @@ Imports EgtBEAMWALL.Supervisor.CommVar
Public Class MachManaging
' lock per aggiunta elemento a lista MachGroup
Private Shared Lock_CommandList As New Object
Private m_bConnected As Boolean = False
Public ReadOnly Property bConnected As Boolean
Get
@@ -53,6 +56,22 @@ Public Class MachManaging
Return m_CommandList
End Get
End Property
Friend Shared Sub AddToCommandList(value As ThreadCommand)
SyncLock Lock_CommandList
' EgtOutLog("Inizio ciclo rimozioni")
For CommandIndex = m_CommandList.Count - 1 To 0 Step -1
Dim Command As ThreadCommand = m_CommandList(CommandIndex)
If Command.ProcessingStatus = ThreadCommand.ProcessingStatuses.DONE Then
' EgtOutLog("Inizio rimozione comando")
m_CommandList.Remove(Command)
' EgtOutLog("Fine rimozione comando")
End If
Next
' EgtOutLog("Fine ciclo rimozioni")
CommandList.Add(value)
' EgtOutLog("Count dopo aggiunta: " & CommandList.Count)
End SyncLock
End Sub
Private m_bStartPending As Boolean = False
Public ReadOnly Property StartPending As Boolean
@@ -638,7 +657,7 @@ Public Class MachManaging
' se non impostata data start
If MachGroup.dtStartTime = DateTime.MinValue Then
EgtOutLog("Start date not set on Prod " & nP_Prod & " Machgroup " & nP_Machgroup)
' EgtOutLog("Start date not set on Prod " & nP_Prod & " Machgroup " & nP_Machgroup)
Dim dtStart As DateTime = MachGroup.dtEndTime - TimeSpan.FromSeconds(60)
' provo a recuperare tempo stimato
If MachGroup.nCALC_TIME > 0 Then
@@ -722,7 +741,7 @@ Public Class MachManaging
End Function
Private Function SendNextProgram() As Boolean
EgtOutLog("Inizio SendNextProgram")
' EgtOutLog("Inizio SendNextProgram")
Dim bSent As Boolean = False
If (CurrentMachine.NCType = NCTypes.TPA AndAlso Not m_bStartPending AndAlso Tpa.opState = MachineOperatingState.Pending) OrElse
(CurrentMachine.NCType = NCTypes.NUM_FLEXIUM AndAlso Not Num_Flexium.bIsTransferActive) OrElse
@@ -730,20 +749,20 @@ Public Class MachManaging
(CurrentMachine.NCType = NCTypes.NUM_AXIUM_PCTOOLKIT AndAlso Not Num_Axium_PCToolkit.bIsTransferActive) Then ' Or Tpa.opState = MachineOperatingState.Start) Then
' verifico se c'e' un programma da lanciare
If Not IsNothing(Map.refProjectVM.SupervisorMachGroupPanelVM) Then
EgtOutLog("Start " & DateTime.Now())
' EgtOutLog("Start " & DateTime.Now())
Dim bMachGroupNotReady As Boolean = False
SyncLock m_Lock_SendProgram
For Each MyMachGroup As MyMachGroupVM In Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList
EgtOutLog("Ciclo su name: " & MyMachGroup.Name & " id: " & MyMachGroup.Id)
' EgtOutLog("Ciclo su name: " & MyMachGroup.Name & " id: " & MyMachGroup.Id)
If Not MyMachGroup.bSentToMachine AndAlso (MyMachGroup.dtStartTime = DateTime.MinValue OrElse
(Map.refSupervisorManagerVM.CurrProd.nType = BWType.WALL AndAlso MyMachGroup.bResetWhileCutting)) Then
EgtOutLog(MyMachGroup.Name & " id: " & MyMachGroup.Id & " è da fare")
' EgtOutLog(MyMachGroup.Name & " id: " & MyMachGroup.Id & " è da fare")
' verifico se ricalcolo finito
If MyMachGroup.bReadyForMachining AndAlso If(CurrentMachine.NCType = NCTypes.NUM_FLEXIUM Or CurrentMachine.NCType = NCTypes.NUM_AXIUM_APSERVER OrElse CurrentMachine.NCType = NCTypes.NUM_AXIUM_PCTOOLKIT, Not MyMachGroup.bSendingToMachine, True) Then
EgtOutLog(MyMachGroup.Name & " id: " & MyMachGroup.Id & " pronto per essere lavorato")
' EgtOutLog(MyMachGroup.Name & " id: " & MyMachGroup.Id & " pronto per essere lavorato")
' lo lancio
bSent = SendProgram(MyMachGroup.CnFilePath(), MyMachGroup.Name)
EgtOutLog(MyMachGroup.Name & " id: " & MyMachGroup.Id & " mandato " & DateTime.Now() & " " & MyMachGroup.Name & " " & bSent.ToString())
' EgtOutLog(MyMachGroup.Name & " id: " & MyMachGroup.Id & " mandato " & DateTime.Now() & " " & MyMachGroup.Name & " " & bSent.ToString())
Select Case CurrentMachine.NCType
Case NCTypes.TPA
MyMachGroup.SetSentToMachine(bSent)
@@ -755,7 +774,7 @@ Public Class MachManaging
Else
' programma non ancora pronto, esco per attendere
bMachGroupNotReady = True
EgtOutLog(MyMachGroup.Name & " id: " & MyMachGroup.Id & " non ancora pronto per essere mandato")
' EgtOutLog(MyMachGroup.Name & " id: " & MyMachGroup.Id & " non ancora pronto per essere mandato")
Exit For
'Return False
End If
@@ -763,7 +782,7 @@ Public Class MachManaging
Next
End SyncLock
If bMachGroupNotReady Then Return False
EgtOutLog("End " & DateTime.Now())
' EgtOutLog("End " & DateTime.Now())
End If
End If
Return bSent
@@ -771,10 +790,17 @@ Public Class MachManaging
Private Sub CommandList_CollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
If Not IsNothing(e.NewItems) Then
For Each Command In e.NewItems
ExecuteCommand(DirectCast(Command, ThreadCommand))
m_CommandList.Remove(Command)
' EgtOutLog("Inizio ciclo esecuzione comandi")
Dim nCommandCount As Integer = e.NewItems.Count
For CommandIndex = 0 To nCommandCount - 1
Dim Command As ThreadCommand = e.NewItems(CommandIndex)
If Command.ProcessingStatus = ThreadCommand.ProcessingStatuses.WAITING Then
Command.SetProcessingStatus(ThreadCommand.ProcessingStatuses.PROCESSING)
ExecuteCommand(DirectCast(Command, ThreadCommand))
Command.SetProcessingStatus(ThreadCommand.ProcessingStatuses.DONE)
End If
Next
' EgtOutLog("Fine ciclo esecuzione di " & nCommandCount & " comandi")
End If
End Sub
@@ -1044,7 +1070,7 @@ Public Class MachManaging
Num_Axium_APServer.StartTransfer()
Return True
Case NCTypes.NUM_AXIUM_PCTOOLKIT
EgtOutLog("Pre Download")
' EgtOutLog("Pre Download")
Dim nFileType As Integer = 0
If Integer.TryParse(ProgramId, nFileType) AndAlso nFileType > 0 Then
Num_Axium_PCToolkit.FileDownload(nFileType * 10, ProgramPath)
@@ -54,6 +54,12 @@ End Class
Public Class ThreadCommand
Public Enum ProcessingStatuses
WAITING = 1
PROCESSING = 2
DONE = 3
End Enum
Private m_CommandType As CommandTypes
Public ReadOnly Property CommandType As CommandTypes
Get
@@ -95,6 +101,16 @@ Public Class ThreadCommand
End Get
End Property
Private m_ProcessingStatus As ProcessingStatuses = ProcessingStatuses.WAITING
Public ReadOnly Property ProcessingStatus As ProcessingStatuses
Get
Return m_ProcessingStatus
End Get
End Property
Friend Sub SetProcessingStatus(value As ProcessingStatuses)
m_ProcessingStatus = value
End Sub
Protected Sub New()
End Sub
@@ -25,16 +25,37 @@
</Grid>
<StackPanel Orientation="Horizontal" Height="30">
<TextBlock Text="{Binding Entity_Msg}"
Style="{StaticResource Log_TextBlock}"/>
<ComboBox ItemsSource="{Binding EntityTypeList}"
SelectedIndex="{Binding SelEntityType}"
Width="70"
Margin="0,0,2.5,0"
Style="{StaticResource PartParam_ComboBox}"/>
<TextBlock Text="{Binding Event_Msg}"
Style="{StaticResource Log_TextBlock}"/>
<ComboBox ItemsSource="{Binding PartEventTypeList}"
SelectedIndex="{Binding SelPartEventType}"
Width="70"
Margin="0,0,2.5,0"
Style="{StaticResource PartParam_ComboBox}"/>
<TextBlock Text="{Binding Date_Msg}"
Style="{StaticResource Log_TextBlock}"/>
<ComboBox ItemsSource="{Binding DayTypeList}"
SelectedIndex="{Binding SelDayType}"
Width="70"
Margin="0,0,2.5,0"
Style="{StaticResource PartParam_ComboBox}"/>
<StackPanel Orientation="Horizontal" Visibility="{Binding Date_Visibility}">
<TextBlock Text="{Binding From_Msg}"
Style="{StaticResource Log_TextBlock}"/>
<DatePicker SelectedDate="{Binding dtStartDate}"
Style="{StaticResource Log_DatePicker}"/>
<TextBlock Text="{Binding To_Msg}"
Style="{StaticResource Log_TextBlock}"/>
<DatePicker SelectedDate="{Binding dtEndDate}"
Style="{StaticResource Log_DatePicker}"/>
</StackPanel>
<!--<TextBox Text="{Binding MaxRowNumber}"/>-->
<Button Grid.Column="1"
Command="{Binding Refresh_Command}"
@@ -9,6 +9,12 @@ Imports EgtBEAMWALL.Core.MachLog
Public Class MachineLogPageVM
Inherits VMBase
Private Enum DayTypes As Integer
TODAY = 0
YESTERDAY = 1
PERIOD = 2
End Enum
Private m_colMachineLog_Type As EgtDataGridColumn
Public ReadOnly Property colMachineLog_Type As EgtDataGridColumn
Get
@@ -62,7 +68,7 @@ Public Class MachineLogPageVM
End Set
End Property
Private m_PartEventTypeList As New List(Of String)({"", "Inizio", "Fine"})
Private m_PartEventTypeList As New List(Of String)({"", EgtMsg(62527), EgtMsg(62528)})
Public ReadOnly Property PartEventTypeList As List(Of String)
Get
Return m_PartEventTypeList
@@ -76,11 +82,12 @@ Public Class MachineLogPageVM
End Get
Set(value As Integer)
m_SelPartEventType = value
WriteMainPrivateProfileString(S_MACHINELOGFILTER, K_PARTEVENTTYPE, m_SelPartEventType.ToString())
m_MachineLogList_View.Refresh()
End Set
End Property
Private m_EntityTypeList As New List(Of String)({"", "Pezzo", "Barra"})
Private m_EntityTypeList As New List(Of String)({"", EgtMsg(62525), EgtMsg(62526)})
Public ReadOnly Property EntityTypeList As List(Of String)
Get
Return m_EntityTypeList
@@ -94,10 +101,75 @@ Public Class MachineLogPageVM
End Get
Set(value As Integer)
m_SelEntityType = value
WriteMainPrivateProfileString(S_MACHINELOGFILTER, K_ENTITYTYPE, m_SelEntityType.ToString())
m_MachineLogList_View.Refresh()
End Set
End Property
Private m_DayTypeList As New List(Of String)({EgtMsg(62529), EgtMsg(62530), EgtMsg(62531)})
Public ReadOnly Property DayTypeList As List(Of String)
Get
Return m_DayTypeList
End Get
End Property
Private m_SelDayType As DayTypes = DayTypes.TODAY
Public Property SelDayType As Integer
Get
Return m_SelDayType
End Get
Set(value As Integer)
Dim PrevSelDayType As DayTypes = m_SelDayType
m_SelDayType = value
WriteMainPrivateProfileString(S_MACHINELOGFILTER, K_DAYTYPE, Convert.ToInt32(m_SelDayType))
m_Date_Visibility = If(m_SelDayType = DayTypes.PERIOD, Visibility.Visible, Visibility.Collapsed)
If m_SelDayType = DayTypes.PERIOD Then
m_dtStartDate = If(PrevSelDayType = DayTypes.TODAY, DateTime.Today, DateTime.Today - TimeSpan.FromDays(1))
m_dtEndDate = If(PrevSelDayType = DayTypes.TODAY, DateTime.Today, DateTime.Today - TimeSpan.FromDays(1))
NotifyPropertyChanged(NameOf(dtStartDate))
NotifyPropertyChanged(NameOf(dtEndDate))
End If
NotifyPropertyChanged(NameOf(Date_Visibility))
' aggiorno lista da Db
UpdateMachineLogList()
End Set
End Property
Private m_dtStartDate As DateTime = DateTime.Today
Public Property dtStartDate As DateTime
Get
Return m_dtStartDate
End Get
Set(value As DateTime)
m_dtStartDate = value
Dim lStartDate As Long = m_dtStartDate.ToFileTimeUtc()
WriteMainPrivateProfileString(S_MACHINELOGFILTER, K_STARTDATE, lStartDate.ToString())
' aggiorno lista da Db
UpdateMachineLogList()
End Set
End Property
Private m_dtEndDate As DateTime = DateTime.Today
Public Property dtEndDate As DateTime
Get
Return m_dtEndDate
End Get
Set(value As DateTime)
m_dtEndDate = value
Dim lEndDate As Long = m_dtEndDate.ToFileTimeUtc()
WriteMainPrivateProfileString(S_MACHINELOGFILTER, K_ENDDATE, lEndDate.ToString())
' aggiorno lista da Db
UpdateMachineLogList()
End Set
End Property
Private m_Date_Visibility As Visibility = Visibility.Collapsed
Public ReadOnly Property Date_Visibility As Visibility
Get
Return m_Date_Visibility
End Get
End Property
' Definizione comandi
Private m_cmdRefresh As ICommand
@@ -151,6 +223,35 @@ Public Class MachineLogPageVM
End Get
End Property
Public ReadOnly Property Entity_Msg As String
Get
Return EgtMsg(62520)
End Get
End Property
Public ReadOnly Property Event_Msg As String
Get
Return EgtMsg(62521)
End Get
End Property
Public ReadOnly Property Date_Msg As String
Get
Return EgtMsg(62522)
End Get
End Property
Public ReadOnly Property From_Msg As String
Get
Return EgtMsg(62523)
End Get
End Property
Public ReadOnly Property To_Msg As String
Get
Return EgtMsg(62524)
End Get
End Property
#End Region ' Messages
@@ -167,6 +268,30 @@ Public Class MachineLogPageVM
m_colMachineLog_Type = m_MachineLogColumns.FirstOrDefault(Function(x) x.Name = COL_TYPE)
m_colMachineLog_Description = m_MachineLogColumns.FirstOrDefault(Function(x) x.Name = COL_DESCRIPTION)
m_colMachineLog_SupervisorId = m_MachineLogColumns.FirstOrDefault(Function(x) x.Name = COL_SUPERVISORID)
' imposto valori filtri da ini
m_SelPartEventType = GetMainPrivateProfileInt(S_MACHINELOGFILTER, K_PARTEVENTTYPE, 2)
m_SelEntityType = GetMainPrivateProfileInt(S_MACHINELOGFILTER, K_ENTITYTYPE, 1)
m_SelDayType = GetMainPrivateProfileInt(S_MACHINELOGFILTER, K_DAYTYPE, 0)
Select Case m_SelDayType
Case DayTypes.TODAY
m_dtStartDate = DateTime.Today
m_dtEndDate = DateTime.Today
Case DayTypes.YESTERDAY
m_dtStartDate = DateTime.Today - TimeSpan.FromDays(1)
m_dtEndDate = DateTime.Today - TimeSpan.FromDays(1)
Case DayTypes.PERIOD
Dim sStartDate As String = "0"
Dim lStartDate As Long = 0
GetMainPrivateProfileString(S_MACHINELOGFILTER, K_STARTDATE, 0, sStartDate)
Long.TryParse(sStartDate, lStartDate)
m_dtStartDate = If(lStartDate > 0, DateTime.FromFileTimeUtc(lStartDate), DateTime.Today)
Dim sEndDate As String = "0"
Dim lEndDate As Long = 0
GetMainPrivateProfileString(S_MACHINELOGFILTER, K_ENDDATE, 0, sEndDate)
Long.TryParse(sEndDate, lEndDate)
m_dtEndDate = If(lEndDate > 0, DateTime.FromFileTimeUtc(lEndDate), DateTime.Today)
m_Date_Visibility = Visibility.Visible
End Select
End Sub
#End Region ' CONSTRUCTORS
@@ -215,7 +340,15 @@ Public Class MachineLogPageVM
End Sub
Friend Sub UpdateMachineLogList()
m_MachineLogList = New ObservableCollection(Of LogEvent)(DbControllers.m_LogMachineController.GetCoreDesc(DateTime.Now - TimeSpan.FromDays(300), DateTime.Now).Select(Of LogEvent)(Function(x) New LogEvent(x)).ToList())
'm_MachineLogList = New ObservableCollection(Of LogEvent)(DbControllers.m_LogMachineController.GetCoreDesc(DateTime.Now - TimeSpan.FromDays(300), DateTime.Now).Select(Of LogEvent)(Function(x) New LogEvent(x)).ToList())
Select Case m_SelDayType
Case DayTypes.TODAY
m_MachineLogList = New ObservableCollection(Of LogEvent)(DbControllers.m_LogMachineController.GetCoreDesc(DateTime.Today, DateTime.Today + TimeSpan.FromDays(1)).Select(Of LogEvent)(Function(x) New LogEvent(x)).ToList())
Case DayTypes.YESTERDAY
m_MachineLogList = New ObservableCollection(Of LogEvent)(DbControllers.m_LogMachineController.GetCoreDesc(DateTime.Today - TimeSpan.FromDays(1), DateTime.Today).Select(Of LogEvent)(Function(x) New LogEvent(x)).ToList())
Case DayTypes.PERIOD
m_MachineLogList = New ObservableCollection(Of LogEvent)(DbControllers.m_LogMachineController.GetCoreDesc(m_dtStartDate, m_dtEndDate + TimeSpan.FromDays(1)).Select(Of LogEvent)(Function(x) New LogEvent(x)).ToList())
End Select
NotifyPropertyChanged(NameOf(MachineLogList))
m_MachineLogList_View = CollectionViewSource.GetDefaultView(m_MachineLogList)
m_MachineLogList_View.Filter = AddressOf MachineLogFilter
@@ -277,31 +277,31 @@ Public Class MainMenuVM
Private Function InitINPUTS() As Boolean
' fermo e riavvio lettura variabili per includere quelle della pagina input
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.STOPREAD_NUMFLEXIUM))
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.READ_NUMFLEXIUM))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.STOPREAD_NUMFLEXIUM))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.READ_NUMFLEXIUM))
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
Return True
End Function
Private Function ExitINPUTS() As Boolean
' fermo e riavvio lettura variabili per includere quelle della pagina input
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.STOPREAD_NUMFLEXIUM))
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.READ_NUMFLEXIUM))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.STOPREAD_NUMFLEXIUM))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.READ_NUMFLEXIUM))
Return True
End Function
Private Function InitOUTPUTS() As Boolean
' fermo e riavvio lettura variabili per includere quelle della pagina input
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.STOPREAD_NUMFLEXIUM))
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.READ_NUMFLEXIUM))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.STOPREAD_NUMFLEXIUM))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.READ_NUMFLEXIUM))
Map.refMainWindowVM.NotifyPropertyChanged(NameOf(Map.refMainWindowVM.nSelTabPage))
Return True
End Function
Private Function ExitOUTPUTS() As Boolean
' fermo e riavvio lettura variabili per includere quelle della pagina input
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.STOPREAD_NUMFLEXIUM))
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.READ_NUMFLEXIUM))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.STOPREAD_NUMFLEXIUM))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.READ_NUMFLEXIUM))
Return True
End Function
@@ -248,8 +248,8 @@ Public Class MainWindowM
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2505, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2505, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2506, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2506, 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())
@@ -234,7 +234,7 @@ Public Class MainWindowVM
Return
End If
' disconnetto comunicazione con macchina
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.DISCONNECT))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.DISCONNECT))
' termino thread di comunicazione con Db ed altri programmi
ViewerOptimizerCommThread.StopThread()
' Verifico modifica parametri in Configurazione e chiedo il salvataggio
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.5.4")>
<Assembly: AssemblyFileVersion("2.5.5.4")>
<Assembly: AssemblyVersion("2.5.6.2")>
<Assembly: AssemblyFileVersion("2.5.6.2")>
@@ -342,6 +342,11 @@
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="10,0,10,0"/>
</Style>
<Style x:Key="Log_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="5,0,5,0"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
@@ -720,4 +725,13 @@
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- DatePicker -->
<Style x:Key="Log_DatePicker" TargetType="{x:Type DatePicker}">
<Setter Property="Height" Value="22" />
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
</ResourceDictionary>
+4 -3
View File
@@ -1,4 +1,5 @@
Imports EgtWPFLib5
Imports EgtUILib
Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Public Class LogEvent
@@ -77,9 +78,9 @@ Public Class LogEvent
Get
Select Case m_Status
Case 1
Return "Inizio"
Return EgtMsg(62527)
Case 2
Return "Fine"
Return EgtMsg(62528)
Case Else
Return ""
End Select
@@ -64,7 +64,7 @@ Public Class Variable
Return CommVar.sValue
End Get
Set(value As String)
MachManaging.CommandList.Add(ThreadCommand.CreateCommand(CommandTypes.WRITE, {CommVar.nType}, Nothing, {CommVar.sAddress, value}))
MachManaging.AddToCommandList(ThreadCommand.CreateCommand(CommandTypes.WRITE, {CommVar.nType}, Nothing, {CommVar.sAddress, value}))
NotifyPropertyChanged(NameOf(sValue))
End Set
End Property
@@ -29,7 +29,7 @@ Public Class FeatureManagerVM
Public ReadOnly Property Priority_Visibility As Visibility
Get
Return if(CurrentMachine.nType = Core.ConstBeam.MachineType.WALL, Visibility.Visible, Visibility.Collapsed)
Return If(CurrentMachine.nType = Core.ConstBeam.MachineType.WALL AndAlso CurrentMachine.bIsEnabledPriority, Visibility.Visible, Visibility.Collapsed)
End Get
End Property
@@ -62,7 +62,7 @@ Public Class FeatureInPartInRawPartListVM
Friend Sub UpdateColumns(nMachType As MachineType)
If Not IsNothing(m_colFeatureInPartInRawPart_Priority) Then
m_colFeatureInPartInRawPart_Priority.Visible = (nMachType=MachineType.WALL)
m_colFeatureInPartInRawPart_Priority.Visible = (nMachType = MachineType.WALL AndAlso CurrentMachine.bIsEnabledPriority)
End If
End Sub
@@ -235,8 +235,8 @@ Public Class MainWindowM
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2505, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2505, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2506, 1, m_nKeyLevel) And
EgtGetKeyOptions(5327, 2506, 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.5.5.4")>
<Assembly: AssemblyFileVersion("2.5.5.4")>
<Assembly: AssemblyVersion("2.5.6.2")>
<Assembly: AssemblyFileVersion("2.5.6.2")>
@@ -87,6 +87,13 @@ Public Module CurrentMachine
Return m_dMinOffset
End Get
End Property
' Attivazione Priority pareti
Private m_bIsEnabledPriority As Boolean = 0
Public ReadOnly Property bIsEnabledPriority As Boolean
Get
Return m_bIsEnabledPriority
End Get
End Property
#Region "Proprietà che leggono e scrivono i valori anche da o su file ini"
@@ -300,6 +307,11 @@ Public Module CurrentMachine
End Select
EgtLuaGetGlobNumVar("GWD.MIN_HEIGHT", m_dMinRawH)
EgtLuaGetGlobNumVar("GWD.MAX_HEIGHT", m_dMaxRawH)
If EgtLuaGetGlobNumVar("GWD.BTL_PRIORITY", nTemp) Then
m_bIsEnabledPriority = nTemp > 0
Else
m_bIsEnabledPriority = False
End If
Else
m_nViewDir = VT.ISO_SW
m_OrigCorner = MCH_CR.BR
@@ -308,6 +320,7 @@ Public Module CurrentMachine
m_NestingCorner = MCH_CR.BR
m_dMinRawH = 5
m_dMaxRawH = 500
m_bIsEnabledPriority = False
End If
' Cancello tavola globale
EgtLuaResetGlobVar("GWD")