pulizia classe CNC FANUC da calassi inutilizzate
This commit is contained in:
@@ -251,96 +251,6 @@ Namespace CNC
|
||||
Next i
|
||||
End Sub
|
||||
|
||||
Public Overrides Function SetCncWindowSize() As Boolean
|
||||
Dim CncWindowSizeNew As Size
|
||||
|
||||
Select Case Config.Settings.Settings.OpPanel_ScreenSize 'Screen.PrimaryScreen.Bounds.Size
|
||||
Case New Size(800, 600) '10"
|
||||
CncWindowSizeNew = New System.Drawing.Size(640, 500)
|
||||
Case New Size(1024, 768) '15"
|
||||
CncWindowSizeNew = New System.Drawing.Size(800, 620)
|
||||
Case New Size(2048, 768) '15" doppio monitor
|
||||
CncWindowSizeNew = New System.Drawing.Size(800, 620)
|
||||
Case New Size(1280, 800) '15,6" widescreen
|
||||
CncWindowSizeNew = New System.Drawing.Size(800, 620) ''
|
||||
Case New Size(1280, 1024) '17"
|
||||
CncWindowSizeNew = New System.Drawing.Size(960, 740)
|
||||
Case Else
|
||||
CncWindowSizeNew = New System.Drawing.Size(800, 620)
|
||||
End Select
|
||||
If _CncWindowSize <> CncWindowSizeNew Then
|
||||
_CncWindowSize = CncWindowSizeNew
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Overrides Sub RunCnc()
|
||||
Dim szProgramFilesDir As String
|
||||
Dim szPath As String = ""
|
||||
Dim szParam As String = ""
|
||||
Dim key As RegistryKey
|
||||
Dim myProcess As System.Diagnostics.Process
|
||||
|
||||
If Not FindCncWindow() Then
|
||||
key = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion")
|
||||
szProgramFilesDir = key.GetValue("ProgramFilesDir")
|
||||
|
||||
Select Case _CncScreen_connectionType
|
||||
Case FANUC.ConnectionType.Ethernet
|
||||
szPath = szProgramFilesDir & "\CNCScreenE\CNCScrnE.exe"
|
||||
szParam = "/H=" & Config.Settings.Settings.IpFanuc & ":" & CStr(Config.Settings.Settings.PortIpFanuc) & "/T=30"
|
||||
Case FANUC.ConnectionType.Hssb
|
||||
szPath = szProgramFilesDir & "\CNCScreen\CNCScrn.exe"
|
||||
szParam = ""
|
||||
End Select
|
||||
|
||||
'ShellExecute(0, "open", szPath, szParam, vbNullString, SW_SHOWNORMAL)
|
||||
myProcess = System.Diagnostics.Process.Start(szPath, szParam)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub CloseCnc()
|
||||
If FindCncWindow() Then
|
||||
_CncWindowProcess.Kill()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Public Overrides Function FindCncWindow() As Boolean
|
||||
' _CncWindowProcess = FindProcess(CncScreen_ProcessName)
|
||||
' Return _CncWindowProcess IsNot Nothing
|
||||
'End Function
|
||||
|
||||
'Public Overrides Function CncIsIconic() As Boolean
|
||||
' If _CncWindowProcess IsNot Nothing Then
|
||||
' Return ProcessIsIconic(_CncWindowProcess.MainWindowHandle)
|
||||
' End If
|
||||
'End Function
|
||||
|
||||
'Public Overrides Function CncIsZoomed() As Boolean
|
||||
' If _CncWindowProcess IsNot Nothing Then
|
||||
' Return ProcessIsZoomed(_CncWindowProcess.MainWindowHandle)
|
||||
' End If
|
||||
'End Function
|
||||
|
||||
'Public Overrides Sub MinimizeCnc()
|
||||
' MinimizeWindow(CncScreen_ProcessName)
|
||||
'End Sub
|
||||
|
||||
'Public Overrides Sub NormalizeCnc()
|
||||
' ShowNormalWindow(CncScreen_ProcessName)
|
||||
' MoveWindow(CncScreen_ProcessName, _CncWindowPosition)
|
||||
'End Sub
|
||||
|
||||
'Public Overrides Sub SetCncFocus()
|
||||
' SetWindowFocus(CncScreen_ProcessName)
|
||||
'End Sub
|
||||
|
||||
'Public Overrides Sub MoveCnc()
|
||||
' MoveWindow(CncScreen_ProcessName, CncWindowPosition, "CNC Screen Display Function")
|
||||
'End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Get class series of CNC: 16 or 30
|
||||
''' </summary>
|
||||
|
||||
@@ -207,42 +207,12 @@ Namespace CNC
|
||||
Public Overridable Sub GetStaticData()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Stabilisce la risoluzione CncWindow
|
||||
''' </summary>
|
||||
Public Overridable Function SetCncWindowSize() As Boolean
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Esegue l'applicazione CNC
|
||||
''' </summary>
|
||||
Public Overridable Sub RunCnc()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Chiude l'applicazione CNC
|
||||
''' </summary>
|
||||
Public Overridable Sub CloseCnc()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Cerca la finestra CNC e restituisce True se la trova
|
||||
''' </summary>
|
||||
Public Overridable Function FindCncWindow() As Boolean
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Restituisce True se la finestra Cnc è ridotta a icona
|
||||
''' </summary>
|
||||
Public Overridable Function CncIsIconic() As Boolean
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Restituisce True se la finestra Cnc è massimizzata a tutto schermo
|
||||
''' </summary>
|
||||
Public Overridable Function CncIsZoomed() As Boolean
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Riduce a icona la finestra CNC
|
||||
''' </summary>
|
||||
|
||||
@@ -162,14 +162,6 @@ Namespace Config
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Private _ToolTable_GeometryManagement As Control.ToolTable.GeometryManagement
|
||||
|
||||
''' <summary>Tipo di gestione dati dimensioni utensili</summary>
|
||||
'Public ReadOnly Property ToolTable_GeometryManagement() As Control.ToolTable.GeometryManagement
|
||||
' Get
|
||||
' Return Me._ToolTable_GeometryManagement
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Private _ToolTable_MaxToolsManaged As Integer
|
||||
''' <summary>Massimo numero di utensili gestibili</summary>
|
||||
|
||||
Reference in New Issue
Block a user