- Divisi i log tra ViewerOptimizer e Supervisor
- Correzioni per scrittura variabili su controllo TPA
This commit is contained in:
@@ -44,7 +44,8 @@ Public Module ConstGen
|
||||
End Enum
|
||||
|
||||
' File di log generale
|
||||
Public Const GENLOG_FILE_NAME As String = "EgtBEAMWALLLog#.txt"
|
||||
Public Const VWOPTGENLOG_FILE_NAME As String = "EgtBEAMWALL.ViewerOptimizerLog#.txt"
|
||||
Public Const SUPGENLOG_FILE_NAME As String = "EgtBEAMWALL.SupervisorLog#.txt"
|
||||
|
||||
' Sottodirettorio di configurazione
|
||||
Public Const CONF_DIR As String = "Config"
|
||||
|
||||
@@ -82,137 +82,137 @@ Public Class MachManaging
|
||||
|
||||
Friend Sub Timer_Tick()
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.TPA
|
||||
'Dim bCancel As Boolean = False
|
||||
'callback(0, "Init", bCancel)
|
||||
'Case NCTypes.TPA
|
||||
' 'Dim bCancel As Boolean = False
|
||||
' 'callback(0, "Init", bCancel)
|
||||
|
||||
' leggo tutte le variabili
|
||||
CN.RWVariableManager.RefreshAllVars()
|
||||
' ' leggo tutte le variabili
|
||||
' CN.RWVariableManager.RefreshAllVars()
|
||||
|
||||
' eseguo ciclo principale
|
||||
Dim nReset_State As Integer
|
||||
Dim nP_Prod As Integer
|
||||
Dim nP_Machgroup As Integer
|
||||
Dim nP_Part As Integer
|
||||
Dim nP_State As Integer
|
||||
CN.RWVariableManager.ReadVar(P_PROD, nP_Prod)
|
||||
CN.RWVariableManager.ReadVar(P_MACHGROUP, nP_Machgroup)
|
||||
CN.RWVariableManager.ReadVar(P_PART, nP_Part)
|
||||
CN.RWVariableManager.ReadVar(P_STATE, nP_State)
|
||||
CN.RWVariableManager.ReadVar(RESET_STATE, nReset_State)
|
||||
' se non ancora fatto, preparo variabili barra successiva
|
||||
If CurrentMachine.Flow = FlowTypes.CONTINUOUS AndAlso m_NextBarId = 0 Then
|
||||
SetNextBarVars()
|
||||
End If
|
||||
'Dim TestOpState As Integer = Tpa.remObject.MachineOperativeStatus
|
||||
' verifico se scattato stato reset
|
||||
If nReset_State <> 0 Then
|
||||
' resetto tutti i programmi
|
||||
If Not IsNothing(Map.refProjectVM.SupervisorMachGroupPanelVM) Then Map.refProjectVM.SupervisorMachGroupPanelVM.ResetAllMachGroups()
|
||||
' resetto variabili P
|
||||
Tpa.RWVariableManager.WriteVar(P_PROD, 0)
|
||||
Tpa.RWVariableManager.WriteVar(P_MACHGROUP, 0)
|
||||
Tpa.RWVariableManager.WriteVar(P_PART, 0)
|
||||
Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||
' cancello tutti i programmi da memoria CN
|
||||
RemoveAllProgram() ' rimuovo programma default per pending
|
||||
' azzero variabile reset
|
||||
Tpa.remObject.SetVariableCommand(CInt(ISOCNC.Remoting.VariableCommands.WriteVar),
|
||||
RWVariableManager.GetReadVarFromName(RESET_STATE).sAddress, "0")
|
||||
' resetto prossima barra e variabili V
|
||||
If CurrentMachine.Flow = FlowTypes.CONTINUOUS Then
|
||||
m_NextBarId = 0
|
||||
For Index As Integer = 1 To 6
|
||||
Tpa.RWVariableManager.WriteVar(VPAR & Index.ToString(), 0)
|
||||
Next
|
||||
End If
|
||||
Return
|
||||
' se macchina pronta e non sta tagliando alcun pezzo
|
||||
ElseIf (nP_Prod = 0 AndAlso
|
||||
nP_Machgroup = 0 AndAlso
|
||||
nP_Part = 0 AndAlso
|
||||
nP_State = PartState.NULL) AndAlso
|
||||
Tpa.opState = MachineOperatingState.Pending AndAlso Tpa.remObject.MachineOperativeStatus = MachineOperatingState.Pending Then
|
||||
' verifico se c'e' un programma da lanciare
|
||||
SendNextProgram()
|
||||
' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||
Threading.Thread.Sleep(300)
|
||||
' verifico stati inizio e fine pezzi
|
||||
ElseIf nP_Prod <> 0 AndAlso
|
||||
nP_Machgroup <> 0 AndAlso
|
||||
nP_Part <> 0 Then
|
||||
If nP_State = PartState.START Then
|
||||
' scrivo data start su Db pezzo
|
||||
Dim dtStart As DateTime = DateTime.Now()
|
||||
DbControllers.m_PartController.UpdateStart(nP_Prod, nP_Machgroup, nP_Part, dtStart)
|
||||
DbControllers.m_PartController.UpdateStatus(nP_Prod, nP_Machgroup, nP_Part, ItemState.WIP)
|
||||
' recupero gruppo di lavorazione del pezzo
|
||||
Dim MachGroup As MyMachGroupVM = Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = nP_Machgroup)
|
||||
' recupero pezzo
|
||||
Dim Part As PartVM = MachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nP_Part)
|
||||
' scrivo stato start
|
||||
Part.nProduction_State = ItemState.WIP
|
||||
Part.dtStartTime = dtStart
|
||||
Part.NotifyPropertyChanged(NameOf(Part.nProduction_State))
|
||||
' azzero variabile per far ripartire macchina
|
||||
Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||
' se nessun pezzo della barra diverso da quello corrente e' in start
|
||||
If Not MachGroup.PartVMList.Any(Function(x) x.nPartId <> nP_Part AndAlso x.nProduction_State = 1) Then
|
||||
' scrivo data start su Db barra
|
||||
DbControllers.m_MachGroupController.UpdateStart(nP_Prod, nP_Machgroup, dtStart)
|
||||
DbControllers.m_MachGroupController.UpdateStatus(nP_Prod, nP_Machgroup, ItemState.WIP)
|
||||
' scrivo stato start
|
||||
MachGroup.MyMachGroupM.SetProductionState(ItemState.WIP)
|
||||
MachGroup.dtStartTime = dtStart
|
||||
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.nProduction_State))
|
||||
End If
|
||||
' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||
Threading.Thread.Sleep(300)
|
||||
ElseIf nP_State = PartState.END_ Then
|
||||
' scrivo data end su Db pezzo
|
||||
Dim dtEnd As DateTime = DateTime.Now()
|
||||
DbControllers.m_PartController.UpdateEnd(nP_Prod, nP_Machgroup, nP_Part, dtEnd)
|
||||
DbControllers.m_PartController.UpdateStatus(nP_Prod, nP_Machgroup, nP_Part, ItemState.Produced)
|
||||
' recupero gruppo di lavorazione del pezzo
|
||||
Dim MachGroup As MyMachGroupVM = Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = nP_Machgroup)
|
||||
' recupero pezzo
|
||||
Dim Part As PartVM = MachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nP_Part)
|
||||
' scrivo stato end
|
||||
Part.nProduction_State = ItemState.Produced
|
||||
Part.dtEndTime = dtEnd
|
||||
Part.NotifyPropertyChanged(NameOf(Part.nProduction_State))
|
||||
' resetto stato redo
|
||||
Part.bRedo = False
|
||||
' azzero variabile per far ripartire macchina
|
||||
Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||
' se tutti i pezzi della barra sono in end
|
||||
If MachGroup.PartVMList.All(Function(x) x.nProduction_State >= 2) Then
|
||||
' scrivo data end su Db barra
|
||||
DbControllers.m_MachGroupController.UpdateEnd(nP_Prod, nP_Machgroup, dtEnd)
|
||||
DbControllers.m_MachGroupController.UpdateStatus(nP_Prod, nP_Machgroup, ItemState.Produced)
|
||||
' scrivo stato end
|
||||
MachGroup.MyMachGroupM.SetProductionState(ItemState.Produced)
|
||||
MachGroup.dtEndTime = dtEnd
|
||||
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.nProduction_State))
|
||||
' azzero tutte le variabilli per iniziare barra successiva
|
||||
Tpa.RWVariableManager.WriteVar(P_PROD, 0)
|
||||
Tpa.RWVariableManager.WriteVar(P_MACHGROUP, 0)
|
||||
Tpa.RWVariableManager.WriteVar(P_PART, 0)
|
||||
Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||
' resetto stati di produzione
|
||||
MachGroup.ResetProduce()
|
||||
' se partenza pezzi uno a uno
|
||||
If CurrentMachine.Flow = FlowTypes.ONEBYONE Then
|
||||
' riattivo bottone produzione per tutti gli altri
|
||||
MyMachGroupVM.UpdateProduceIsEnabledForAll()
|
||||
End If
|
||||
End If
|
||||
Map.refLeftPanelVM.PrintLabel(MachGroup, Part)
|
||||
' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||
Threading.Thread.Sleep(300)
|
||||
End If
|
||||
End If
|
||||
Case NCTypes.NUM_FLEXIUM
|
||||
' ' eseguo ciclo principale
|
||||
' Dim nReset_State As Integer
|
||||
' Dim nP_Prod As Integer
|
||||
' Dim nP_Machgroup As Integer
|
||||
' Dim nP_Part As Integer
|
||||
' Dim nP_State As Integer
|
||||
' CN.RWVariableManager.ReadVar(P_PROD, nP_Prod)
|
||||
' CN.RWVariableManager.ReadVar(P_MACHGROUP, nP_Machgroup)
|
||||
' CN.RWVariableManager.ReadVar(P_PART, nP_Part)
|
||||
' CN.RWVariableManager.ReadVar(P_STATE, nP_State)
|
||||
' CN.RWVariableManager.ReadVar(RESET_STATE, nReset_State)
|
||||
' ' se non ancora fatto, preparo variabili barra successiva
|
||||
' If CurrentMachine.Flow = FlowTypes.CONTINUOUS AndAlso m_NextBarId = 0 Then
|
||||
' SetNextBarVars()
|
||||
' End If
|
||||
' 'Dim TestOpState As Integer = Tpa.remObject.MachineOperativeStatus
|
||||
' ' verifico se scattato stato reset
|
||||
' If nReset_State <> 0 Then
|
||||
' ' resetto tutti i programmi
|
||||
' If Not IsNothing(Map.refProjectVM.SupervisorMachGroupPanelVM) Then Map.refProjectVM.SupervisorMachGroupPanelVM.ResetAllMachGroups()
|
||||
' ' resetto variabili P
|
||||
' Tpa.RWVariableManager.WriteVar(P_PROD, 0)
|
||||
' Tpa.RWVariableManager.WriteVar(P_MACHGROUP, 0)
|
||||
' Tpa.RWVariableManager.WriteVar(P_PART, 0)
|
||||
' Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||
' ' cancello tutti i programmi da memoria CN
|
||||
' RemoveAllProgram() ' rimuovo programma default per pending
|
||||
' ' azzero variabile reset
|
||||
' Tpa.remObject.SetVariableCommand(CInt(ISOCNC.Remoting.VariableCommands.WriteVar),
|
||||
' RWVariableManager.GetReadVarFromName(RESET_STATE).sAddress, "0")
|
||||
' ' resetto prossima barra e variabili V
|
||||
' If CurrentMachine.Flow = FlowTypes.CONTINUOUS Then
|
||||
' m_NextBarId = 0
|
||||
' For Index As Integer = 1 To 6
|
||||
' Tpa.RWVariableManager.WriteVar(VPAR & Index.ToString(), 0)
|
||||
' Next
|
||||
' End If
|
||||
' Return
|
||||
' ' se macchina pronta e non sta tagliando alcun pezzo
|
||||
' ElseIf (nP_Prod = 0 AndAlso
|
||||
' nP_Machgroup = 0 AndAlso
|
||||
' nP_Part = 0 AndAlso
|
||||
' nP_State = PartState.NULL) AndAlso
|
||||
' Tpa.opState = MachineOperatingState.Pending AndAlso Tpa.remObject.MachineOperativeStatus = MachineOperatingState.Pending Then
|
||||
' ' verifico se c'e' un programma da lanciare
|
||||
' SendNextProgram()
|
||||
' ' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||
' Threading.Thread.Sleep(300)
|
||||
' ' verifico stati inizio e fine pezzi
|
||||
' ElseIf nP_Prod <> 0 AndAlso
|
||||
' nP_Machgroup <> 0 AndAlso
|
||||
' nP_Part <> 0 Then
|
||||
' If nP_State = PartState.START Then
|
||||
' ' scrivo data start su Db pezzo
|
||||
' Dim dtStart As DateTime = DateTime.Now()
|
||||
' DbControllers.m_PartController.UpdateStart(nP_Prod, nP_Machgroup, nP_Part, dtStart)
|
||||
' DbControllers.m_PartController.UpdateStatus(nP_Prod, nP_Machgroup, nP_Part, ItemState.WIP)
|
||||
' ' recupero gruppo di lavorazione del pezzo
|
||||
' Dim MachGroup As MyMachGroupVM = Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = nP_Machgroup)
|
||||
' ' recupero pezzo
|
||||
' Dim Part As PartVM = MachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nP_Part)
|
||||
' ' scrivo stato start
|
||||
' Part.nProduction_State = ItemState.WIP
|
||||
' Part.dtStartTime = dtStart
|
||||
' Part.NotifyPropertyChanged(NameOf(Part.nProduction_State))
|
||||
' ' azzero variabile per far ripartire macchina
|
||||
' Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||
' ' se nessun pezzo della barra diverso da quello corrente e' in start
|
||||
' If Not MachGroup.PartVMList.Any(Function(x) x.nPartId <> nP_Part AndAlso x.nProduction_State = 1) Then
|
||||
' ' scrivo data start su Db barra
|
||||
' DbControllers.m_MachGroupController.UpdateStart(nP_Prod, nP_Machgroup, dtStart)
|
||||
' DbControllers.m_MachGroupController.UpdateStatus(nP_Prod, nP_Machgroup, ItemState.WIP)
|
||||
' ' scrivo stato start
|
||||
' MachGroup.MyMachGroupM.SetProductionState(ItemState.WIP)
|
||||
' MachGroup.dtStartTime = dtStart
|
||||
' MachGroup.NotifyPropertyChanged(NameOf(MachGroup.nProduction_State))
|
||||
' End If
|
||||
' ' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||
' Threading.Thread.Sleep(300)
|
||||
' ElseIf nP_State = PartState.END_ Then
|
||||
' ' scrivo data end su Db pezzo
|
||||
' Dim dtEnd As DateTime = DateTime.Now()
|
||||
' DbControllers.m_PartController.UpdateEnd(nP_Prod, nP_Machgroup, nP_Part, dtEnd)
|
||||
' DbControllers.m_PartController.UpdateStatus(nP_Prod, nP_Machgroup, nP_Part, ItemState.Produced)
|
||||
' ' recupero gruppo di lavorazione del pezzo
|
||||
' Dim MachGroup As MyMachGroupVM = Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = nP_Machgroup)
|
||||
' ' recupero pezzo
|
||||
' Dim Part As PartVM = MachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nP_Part)
|
||||
' ' scrivo stato end
|
||||
' Part.nProduction_State = ItemState.Produced
|
||||
' Part.dtEndTime = dtEnd
|
||||
' Part.NotifyPropertyChanged(NameOf(Part.nProduction_State))
|
||||
' ' resetto stato redo
|
||||
' Part.bRedo = False
|
||||
' ' azzero variabile per far ripartire macchina
|
||||
' Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||
' ' se tutti i pezzi della barra sono in end
|
||||
' If MachGroup.PartVMList.All(Function(x) x.nProduction_State >= 2) Then
|
||||
' ' scrivo data end su Db barra
|
||||
' DbControllers.m_MachGroupController.UpdateEnd(nP_Prod, nP_Machgroup, dtEnd)
|
||||
' DbControllers.m_MachGroupController.UpdateStatus(nP_Prod, nP_Machgroup, ItemState.Produced)
|
||||
' ' scrivo stato end
|
||||
' MachGroup.MyMachGroupM.SetProductionState(ItemState.Produced)
|
||||
' MachGroup.dtEndTime = dtEnd
|
||||
' MachGroup.NotifyPropertyChanged(NameOf(MachGroup.nProduction_State))
|
||||
' ' azzero tutte le variabilli per iniziare barra successiva
|
||||
' Tpa.RWVariableManager.WriteVar(P_PROD, 0)
|
||||
' Tpa.RWVariableManager.WriteVar(P_MACHGROUP, 0)
|
||||
' Tpa.RWVariableManager.WriteVar(P_PART, 0)
|
||||
' Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||
' ' resetto stati di produzione
|
||||
' MachGroup.ResetProduce()
|
||||
' ' se partenza pezzi uno a uno
|
||||
' If CurrentMachine.Flow = FlowTypes.ONEBYONE Then
|
||||
' ' riattivo bottone produzione per tutti gli altri
|
||||
' MyMachGroupVM.UpdateProduceIsEnabledForAll()
|
||||
' End If
|
||||
' End If
|
||||
' Map.refLeftPanelVM.PrintLabel(MachGroup, Part)
|
||||
' ' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||
' Threading.Thread.Sleep(300)
|
||||
' End If
|
||||
' End If
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.TPA
|
||||
' eseguo ciclo principale
|
||||
Dim nReset_State As Integer
|
||||
Dim nStart_State As Boolean
|
||||
@@ -239,12 +239,12 @@ Public Class MachManaging
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.TPA
|
||||
' leggo tutte le variabili
|
||||
CN.RWVariableManager.RefreshAllVars()
|
||||
CN.RWVariableManager.ReadVar(P_PROD, nP_Prod)
|
||||
CN.RWVariableManager.ReadVar(P_MACHGROUP, nP_Machgroup)
|
||||
CN.RWVariableManager.ReadVar(P_PART, nP_Part)
|
||||
CN.RWVariableManager.ReadVar(P_STATE, nP_State)
|
||||
CN.RWVariableManager.ReadVar(RESET_STATE, nReset_State)
|
||||
Tpa.RWVariableManager.RefreshAllVars()
|
||||
Tpa.RWVariableManager.ReadVar(P_PROD, nP_Prod)
|
||||
Tpa.RWVariableManager.ReadVar(P_MACHGROUP, nP_Machgroup)
|
||||
Tpa.RWVariableManager.ReadVar(P_PART, nP_Part)
|
||||
Tpa.RWVariableManager.ReadVar(P_STATE, nP_State)
|
||||
Tpa.RWVariableManager.ReadVar(RESET_STATE, nReset_State)
|
||||
Case NCTypes.NUM_FLEXIUM
|
||||
ResetVariable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = RESET_STATE)
|
||||
StartVariable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = START_STATE)
|
||||
@@ -322,7 +322,7 @@ Public Class MachManaging
|
||||
If CurrentMachine.NCType = NCTypes.TPA AndAlso CurrentMachine.Flow = FlowTypes.CONTINUOUS Then
|
||||
m_NextBarId = 0
|
||||
For Index As Integer = 1 To 6
|
||||
Tpa.RWVariableManager.WriteVar(VPAR & Index.ToString(), 0)
|
||||
Tpa.RWVariableManager.WriteVarByName(VPAR & Index.ToString(), 0)
|
||||
Next
|
||||
End If
|
||||
Return
|
||||
@@ -371,7 +371,7 @@ Public Class MachManaging
|
||||
' azzero variabile per far ripartire macchina
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.TPA
|
||||
Tpa.RWVariableManager.WriteVar(P_STATE, 0)
|
||||
Tpa.RWVariableManager.WriteVarByName(P_STATE, 0)
|
||||
Case NCTypes.NUM_FLEXIUM
|
||||
StateVariable.sValue = "0"
|
||||
End Select
|
||||
@@ -496,7 +496,7 @@ Public Class MachManaging
|
||||
Next
|
||||
' li scrivo nel CN
|
||||
For Index As Integer = 1 To 10
|
||||
Tpa.RWVariableManager.WriteVar(VPAR & Index.ToString(), dVPars(Index))
|
||||
Tpa.RWVariableManager.WriteVarByName(VPAR & Index.ToString(), dVPars(Index))
|
||||
Next
|
||||
m_NextBarId = MyMachGroup.Id
|
||||
Return True
|
||||
@@ -787,7 +787,7 @@ Public Class MachManaging
|
||||
Public Sub WriteVar(Address As String, Value As String, Type As CommVar.Types)
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.TPA
|
||||
CN.RWVariableManager.WriteVar(Address, Value)
|
||||
Tpa.RWVariableManager.WriteVarByAddress(Address, Value)
|
||||
Case NCTypes.NUM_FLEXIUM
|
||||
Select Case Type
|
||||
Case CommVar.Types.PLC
|
||||
|
||||
@@ -112,10 +112,14 @@ Public Class RWVariableManager
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub WriteVar(Name As String, Value As String)
|
||||
Public Sub WriteVarByName(Name As String, Value As String)
|
||||
IntWriteVar(GetReadVarFromName(Name).sAddress, Value)
|
||||
End Sub
|
||||
|
||||
Public Sub WriteVarByAddress(Address As String, Value As String)
|
||||
IntWriteVar(Address, Value)
|
||||
End Sub
|
||||
|
||||
Private Sub IntRefreshVar(Address As String)
|
||||
Tpa.remObject.SetVariableCommand(ISOCNC.Remoting.VariableCommands.ReadVar, Address, "")
|
||||
End Sub
|
||||
|
||||
@@ -224,7 +224,7 @@ Public Class MainWindowM
|
||||
EgtGetKeyOptions(5327, 2311, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf &
|
||||
My.Application.Info.Title.ToString() & " ver. " &
|
||||
My.Application.Info.Version.Major.ToString() &
|
||||
@@ -309,7 +309,7 @@ Public Class MainWindowM
|
||||
' porto in primo piano la prima istanza
|
||||
Dim bFound As Boolean = False
|
||||
' processi del programma a 32 bit
|
||||
Dim localProc As Process() = Process.GetProcessesByName("OmagOFFICER32")
|
||||
Dim localProc As Process() = Process.GetProcessesByName("EgtBEAMWALL.SupervisorR32")
|
||||
For Each p As Process In localProc
|
||||
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||
bFound = True
|
||||
@@ -319,7 +319,7 @@ Public Class MainWindowM
|
||||
Next
|
||||
' se non trovati processi a 32 bit provo a 64 bit
|
||||
If Not bFound Then
|
||||
localProc = Process.GetProcessesByName("OmagOFFICER64")
|
||||
localProc = Process.GetProcessesByName("EgtBEAMWALL.SupervisorR64")
|
||||
For Each p As Process In localProc
|
||||
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||
bFound = True
|
||||
|
||||
@@ -225,7 +225,7 @@ Public Class MainWindowM
|
||||
EgtGetKeyOptions(5327, 2311, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf &
|
||||
My.Application.Info.Title.ToString() & " ver. " &
|
||||
My.Application.Info.Version.Major.ToString() &
|
||||
@@ -310,7 +310,7 @@ Public Class MainWindowM
|
||||
' porto in primo piano la prima istanza
|
||||
Dim bFound As Boolean = False
|
||||
' processi del programma a 32 bit
|
||||
Dim localProc As Process() = Process.GetProcessesByName("OmagOFFICER32")
|
||||
Dim localProc As Process() = Process.GetProcessesByName("EgtBEAMWALL.ViewerOptimizerR32")
|
||||
For Each p As Process In localProc
|
||||
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||
bFound = True
|
||||
@@ -320,7 +320,7 @@ Public Class MainWindowM
|
||||
Next
|
||||
' se non trovati processi a 32 bit provo a 64 bit
|
||||
If Not bFound Then
|
||||
localProc = Process.GetProcessesByName("OmagOFFICER64")
|
||||
localProc = Process.GetProcessesByName("EgtBEAMWALL.ViewerOptimizerR64")
|
||||
For Each p As Process In localProc
|
||||
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||
bFound = True
|
||||
|
||||
Reference in New Issue
Block a user