EgtCAM5 1.6x2 :
- modifiche per Gunstock.
This commit is contained in:
@@ -710,43 +710,81 @@ Namespace EgtCAM5
|
||||
End If
|
||||
If Not bOk Then Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_DOORSERRORS + 2))
|
||||
End Sub)
|
||||
Application.Msn.Register(Application.GUNSTOCKSCRIPT, Sub(sFilePath As String)
|
||||
Dim bOk As Boolean
|
||||
If String.IsNullOrEmpty(sFilePath) Then
|
||||
bOk = ExecGunStock(m_ProjectScene, String.Empty)
|
||||
Else
|
||||
bOk = ExecGunStock(m_ProjectScene, sFilePath)
|
||||
Application.Msn.Register(Application.GUNSTOCKNEW, Sub(sFilePath As String)
|
||||
Dim bOk As Boolean
|
||||
If String.IsNullOrEmpty(sFilePath) Then
|
||||
bOk = ExecGunStockMod(m_ProjectScene, String.Empty)
|
||||
Else
|
||||
bOk = ExecGunStockMod(m_ProjectScene, sFilePath)
|
||||
End If
|
||||
EgtResetCurrPartLayer()
|
||||
OnUpdateUI(Nothing, True)
|
||||
Application.Msn.NotifyColleagues(Application.SELECTIDINOBJTREENOMARK, EgtGetCurrLayer())
|
||||
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
|
||||
Application.Msn.NotifyColleagues(Application.SETMACHININGMODE)
|
||||
End If
|
||||
If bOk Then
|
||||
IniFile.m_MruNewGunStock.Add(IniFile.m_MODFilePath)
|
||||
IniFile.m_MruModifyGunStock.Add(IniFile.m_PEZFilePath)
|
||||
Dim sFile As String = String.Empty
|
||||
If EgtGetCurrFilePath(sFile) Then
|
||||
IniFile.m_MruFiles.Add(sFile)
|
||||
End If
|
||||
EgtResetCurrPartLayer()
|
||||
OnUpdateUI(Nothing, True)
|
||||
Application.Msn.NotifyColleagues(Application.SELECTIDINOBJTREENOMARK, EgtGetCurrLayer())
|
||||
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
|
||||
Application.Msn.NotifyColleagues(Application.SETMACHININGMODE)
|
||||
Else
|
||||
IniFile.m_MruNewGunStock.Remove(IniFile.m_MODFilePath)
|
||||
Try
|
||||
Dim sErrFilePath As String = Path.ChangeExtension(IniFile.m_MODFilePath, ".txt")
|
||||
Dim fileReader As String = My.Computer.FileSystem.ReadAllText(sErrFilePath)
|
||||
Dim Lines() As String = fileReader.Split(ControlChars.CrLf.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim values() As String = Lines(0).Split(CChar("=")).ToArray
|
||||
Lines(0) = EgtMsg(MSG_DOORSERRORS + 1) & " " & Convert.ToInt32(values(1))
|
||||
fileReader = String.Empty
|
||||
For Index = 1 To Lines.Count - 1
|
||||
fileReader &= (Lines(Index) + ControlChars.CrLf.ToCharArray())
|
||||
Next
|
||||
MessageBox.Show(fileReader, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Catch ex As Exception
|
||||
MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 7))
|
||||
End Try
|
||||
End If
|
||||
End Sub)
|
||||
Application.Msn.Register(Application.GUNSTOCKMODIF, Sub(sFilePath As String)
|
||||
Dim bOk As Boolean
|
||||
If String.IsNullOrEmpty(sFilePath) Then
|
||||
bOk = ExecGunStockPez(m_ProjectScene, String.Empty)
|
||||
Else
|
||||
bOk = ExecGunStockPez(m_ProjectScene, sFilePath)
|
||||
End If
|
||||
EgtResetCurrPartLayer()
|
||||
OnUpdateUI(Nothing, True)
|
||||
Application.Msn.NotifyColleagues(Application.SELECTIDINOBJTREENOMARK, EgtGetCurrLayer())
|
||||
If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
|
||||
Application.Msn.NotifyColleagues(Application.SETMACHININGMODE)
|
||||
End If
|
||||
If bOk Then
|
||||
IniFile.m_MruModifyGunStock.Add(IniFile.m_PEZFilePath)
|
||||
Dim sFile As String = String.Empty
|
||||
If EgtGetCurrFilePath(sFile) Then
|
||||
IniFile.m_MruFiles.Add(sFile)
|
||||
End If
|
||||
If bOk Then
|
||||
IniFile.m_MruNewGunStock.Add(IniFile.m_MODFilePath)
|
||||
Dim sFile As String = String.Empty
|
||||
If EgtGetCurrFilePath(sFile) Then
|
||||
IniFile.m_MruFiles.Add(sFile)
|
||||
End If
|
||||
Else
|
||||
IniFile.m_MruNewGunStock.Remove(IniFile.m_MODFilePath)
|
||||
Try
|
||||
Dim sErrFilePath As String = Path.ChangeExtension(IniFile.m_MODFilePath, ".txt")
|
||||
Dim fileReader As String = My.Computer.FileSystem.ReadAllText(sErrFilePath)
|
||||
Dim Lines() As String = fileReader.Split(ControlChars.CrLf.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim values() As String = Lines(0).Split(CChar("=")).ToArray
|
||||
Lines(0) = EgtMsg(MSG_DOORSERRORS + 1) & " " & Convert.ToInt32(values(1))
|
||||
fileReader = String.Empty
|
||||
For Index = 1 To Lines.Count - 1
|
||||
fileReader &= (Lines(Index) + ControlChars.CrLf.ToCharArray())
|
||||
Next
|
||||
MessageBox.Show(fileReader, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Catch ex As Exception
|
||||
MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 7))
|
||||
End Try
|
||||
End If
|
||||
End Sub)
|
||||
Else
|
||||
IniFile.m_MruModifyGunStock.Remove(IniFile.m_PEZFilePath)
|
||||
Try
|
||||
Dim sErrFilePath As String = Path.ChangeExtension(IniFile.m_PEZFilePath, ".txt")
|
||||
Dim fileReader As String = My.Computer.FileSystem.ReadAllText(sErrFilePath)
|
||||
Dim Lines() As String = fileReader.Split(ControlChars.CrLf.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim values() As String = Lines(0).Split(CChar("=")).ToArray
|
||||
Lines(0) = EgtMsg(MSG_DOORSERRORS + 1) & " " & Convert.ToInt32(values(1))
|
||||
fileReader = String.Empty
|
||||
For Index = 1 To Lines.Count - 1
|
||||
fileReader &= (Lines(Index) + ControlChars.CrLf.ToCharArray())
|
||||
Next
|
||||
MessageBox.Show(fileReader, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Catch ex As Exception
|
||||
MessageBox.Show(EgtMsg(MSG_DOORSERRORS + 7))
|
||||
End Try
|
||||
End If
|
||||
End Sub)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user