Compare commits
120 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 786362b31e | |||
| 423a88b049 | |||
| 64867f25dc | |||
| 78a9b32973 | |||
| d210f63296 | |||
| 1273279c1f | |||
| 978de597ad | |||
| 75d05a8b31 | |||
| 045a7fa731 | |||
| 29b2b495c3 | |||
| 89a73457c7 | |||
| 5f2b1adf98 | |||
| ab11f069e9 | |||
| 880dbeb7b9 | |||
| 6090527b2a | |||
| 6dc81030c9 | |||
| b889f75963 | |||
| ffd1c3d437 | |||
| 87ddc23ecc | |||
| 6b9808027f | |||
| e9570187bb | |||
| cfdf3b392e | |||
| c256a49bb2 | |||
| 3e50c6151b | |||
| b8c1368154 | |||
| 3f2888f5d3 | |||
| 17e8be7ab4 | |||
| 958a2f005f | |||
| 3f02f139fa | |||
| f8291c6da0 | |||
| dc9dc9a916 | |||
| 562497bfe7 | |||
| f3eb475348 | |||
| b428469294 | |||
| 9bd1da86b6 | |||
| 495a8a9f66 | |||
| cbd4f6c810 | |||
| e72d30c392 | |||
| 82a8ee2230 | |||
| ccf74a8644 | |||
| f0e95a97d7 | |||
| 4fc98f419b | |||
| 6123aced14 | |||
| bec2d24aac | |||
| 3b73ee84fd | |||
| a019f5cce4 | |||
| 9d420795d8 | |||
| 5c0a68bfcc | |||
| a7c8701512 | |||
| 67a769e1fb | |||
| da7d6da74c | |||
| 3ed56120e2 | |||
| c6aba04921 | |||
| fabfdf026a | |||
| 954ea2f120 | |||
| 18883cdbb3 | |||
| 5ecfb960b5 | |||
| 6caf32aa67 | |||
| 0125a5b7c7 | |||
| 35735866a6 | |||
| cf13d51a84 | |||
| 173145ade7 | |||
| 07b9ff800d | |||
| 9e2a9fa1ec | |||
| ef0c2b1f74 | |||
| f42b9c5399 | |||
| 827871073b | |||
| 53ace07386 | |||
| f24c18d0c2 | |||
| 1f1e7d6d70 | |||
| 797d1dd70f | |||
| e2a14a746a | |||
| be6eea1054 | |||
| 2e70a7c944 | |||
| 6a9885d365 | |||
| 52b08d92b2 | |||
| 2ca14c2fce | |||
| 1c870d55d7 | |||
| 2dd55286c1 | |||
| 55aca03daa | |||
| 3fa1c51129 | |||
| 455f3c6949 | |||
| 3ed7a3593c | |||
| f9d459134a | |||
| 00d2054cd3 | |||
| 2b6a9d49ff | |||
| ac8577206e | |||
| d6395f6b9b | |||
| 3c96fec59b | |||
| 320c5ab1c6 | |||
| 3bf58d9069 | |||
| 4ad745b7ce | |||
| 86e30a0cc0 | |||
| f1096b3f15 | |||
| bc2603436f | |||
| 65b01a750b | |||
| f607d7e12c | |||
| 534fa33a09 | |||
| 9dbd69b0bd | |||
| d0412f4e07 | |||
| 8b9c4c63c3 | |||
| 687933571d | |||
| 5b01e4ebfe | |||
| 211eb17c49 | |||
| 4d898e6423 | |||
| bc97e3599f | |||
| 8eae142985 | |||
| 921996c39c | |||
| 747a34d443 | |||
| e338d3d9ea | |||
| 12c65ff40c | |||
| 672686978d | |||
| dca32c5dcc | |||
| bc7b5d1da3 | |||
| 908d0bf187 | |||
| fee8a11358 | |||
| 8cbb54a541 | |||
| fdf1661f78 | |||
| 63a7ea25ba | |||
| 00b02e3a6b |
@@ -16,3 +16,4 @@
|
||||
/bin
|
||||
/obj
|
||||
/.vs
|
||||
/packages
|
||||
|
||||
@@ -4,10 +4,7 @@ Public Class AboutBoxWndV
|
||||
|
||||
Private Sub AboutBoxWD_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
DescriptionLbl.Text = My.Application.Info.Description.ToString()
|
||||
VersionLbl.Text = "Version : " & My.Application.Info.Version.Major.ToString() &
|
||||
"." & My.Application.Info.Version.Minor.ToString() &
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
VersionLbl.Text = "Version : " & GetProgramVersion()
|
||||
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||
Dim sInfo As String = String.Empty
|
||||
Dim sKey As String = String.Empty
|
||||
@@ -19,7 +16,8 @@ Public Class AboutBoxWndV
|
||||
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
|
||||
sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
|
||||
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||
" (" & IniFile.m_nInstance.ToString() & ")" & Environment.NewLine
|
||||
" Inst" & IniFile.m_nInstance.ToString() &
|
||||
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & Map.refMainWindowVM.DebugLevel().ToString() & Environment.NewLine
|
||||
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
|
||||
sInfo &= "DataRoot " & IniFile.m_sDataRoot & Environment.NewLine
|
||||
If IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW Then
|
||||
@@ -27,7 +25,6 @@ Public Class AboutBoxWndV
|
||||
Else
|
||||
sInfo &= "Only Draw Mode" & Environment.NewLine
|
||||
End If
|
||||
If IniFile.IsActiveDoors() Then sInfo &= "Doors " & IniFile.m_sDoorsDirPath & Environment.NewLine
|
||||
Dim sOpSys As String = String.Empty
|
||||
EgtGetOsInfo( sOpSys)
|
||||
sInfo &= sOpSys & Environment.NewLine
|
||||
@@ -40,6 +37,34 @@ Public Class AboutBoxWndV
|
||||
Dim sScene As String = String.Empty
|
||||
EgtGetSceneInfo(sScene)
|
||||
sInfo &= sScene
|
||||
' Extensions
|
||||
sInfo &= Environment.NewLine & "Extensions :"
|
||||
Dim bExtensions As Boolean = False
|
||||
If IniFile.IsActiveBeam() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
|
||||
End If
|
||||
If IniFile.IsActiveWall() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath
|
||||
End If
|
||||
If IniFile.IsActiveDoors() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||
End If
|
||||
If IniFile.IsActiveGunStock() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sGunstockDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath
|
||||
End If
|
||||
If Not bExtensions Then sInfo &= Environment.NewLine & "---"
|
||||
InfoLbl.Text = sInfo
|
||||
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
|
||||
End Sub
|
||||
|
||||
@@ -107,6 +107,7 @@ Class Application
|
||||
Friend Const SWEPT As String = "Swept"
|
||||
Friend Const MERGESURF As String = "MergeSurf"
|
||||
Friend Const EXPLODESURF As String = "ExplodeSurf"
|
||||
Friend Const APPROXSURF As String = "ApproxSurf"
|
||||
Friend Const INVERTSURF As String = "InvertSurf"
|
||||
Friend Const DELETE As String = "Delete"
|
||||
Friend Const CHANGELAYER As String = "ChangeLayer"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Public Class BeamMachiningsWindowV
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class BeamMachiningsWindowV
|
||||
|
||||
Private WithEvents m_BeamMachiningsWindowVM As BeamMachiningsWindowVM
|
||||
|
||||
|
||||
@@ -1,543 +0,0 @@
|
||||
Imports System.IO
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class BeamMachiningsWindowVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private Const MACH_CUT As String = "Cut"
|
||||
Private Const MACH_DRILL As String = "Drill"
|
||||
Private Const MACH_MILLING As String = "Milling"
|
||||
Private Const MACH_POCKETING As String = "Pocketing"
|
||||
Private Const MACH_SAWING As String = "Sawing"
|
||||
Private Const MACH_SURFACING As String = "Surfacing"
|
||||
Private Const ONCONST As String = "On"
|
||||
Private Const NAME As String = "Name"
|
||||
Private Const TYPE As String = "Type"
|
||||
Private Const DATETIME As String = "%DATE_TIME%"
|
||||
Private Const TABLENAME As String = "%TABLE_NAME%"
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
Private m_MachiningList As New ObservableCollection(Of String)({MACH_CUT, MACH_DRILL, MACH_MILLING, MACH_POCKETING, MACH_SAWING})
|
||||
Public ReadOnly Property MachiningList As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_MachiningList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_SelMachining As String
|
||||
Public Property SelMachining As String
|
||||
Get
|
||||
Return m_SelMachining
|
||||
End Get
|
||||
Set(value As String)
|
||||
' verifico se pagina precedente modificata
|
||||
Dim TableModified As Boolean = False
|
||||
For Each Line In m_TableRowList
|
||||
If Line.IsModified Then
|
||||
TableModified = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' se modificata, chiedo se salvare
|
||||
If TableModified Then
|
||||
' Salvare le modifiche apportate? - Salva
|
||||
Select Case MessageBox.Show(EgtMsg(9007), EgtMsg(9006), MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
Case MessageBoxResult.Yes
|
||||
Save()
|
||||
Case MessageBoxResult.No
|
||||
' non devo fare nulla
|
||||
End Select
|
||||
End If
|
||||
m_SelMachining = value
|
||||
LoadMachiningList()
|
||||
LoadTypeList()
|
||||
ReadTableFile()
|
||||
NotifyPropertyChanged("SelMachining")
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetSelMachining(value As String)
|
||||
m_SelMachining = value
|
||||
LoadMachiningList()
|
||||
LoadTypeList()
|
||||
ReadTableFile()
|
||||
NotifyPropertyChanged("SelMachining")
|
||||
End Sub
|
||||
|
||||
Private m_TableRowList As ObservableCollection(Of GridLine)
|
||||
Public Property TableRowList As ObservableCollection(Of GridLine)
|
||||
Get
|
||||
Return m_TableRowList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of GridLine))
|
||||
m_TableRowList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SelRowIndex As Integer = -1
|
||||
Public Property SelRowIndex As Integer
|
||||
Get
|
||||
Return m_SelRowIndex
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SelRowIndex = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_sTitle As String
|
||||
Private m_BaseDir As String
|
||||
Private m_MachTypeFilePath As String
|
||||
Private m_TableTemplateFilePath As String
|
||||
Private m_IsBeam As Boolean = True
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Title As String
|
||||
Get
|
||||
Return m_sTitle
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OnHdr As String
|
||||
Get
|
||||
Return EgtMsg( 9001) 'On
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property NameHdr As String
|
||||
Get
|
||||
Return EgtMsg( 9002) 'Nome
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TypeHdr As String
|
||||
Get
|
||||
Return EgtMsg( 9003) 'Tipo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property AddRowMsg As String
|
||||
Get
|
||||
Return EgtMsg( 9004) 'Aggiungi
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DeleteRowMsg As String
|
||||
Get
|
||||
Return EgtMsg( 9005) 'Elimina
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SaveMsg As String
|
||||
Get
|
||||
Return EgtMsg( 9006) 'Salva
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdMoveRowUp As ICommand
|
||||
Private m_cmdMoveRowDown As ICommand
|
||||
Private m_cmdAddRow As ICommand
|
||||
Private m_cmdDeleteRow As ICommand
|
||||
Private m_cmdSave As ICommand
|
||||
Private m_cmdClose As ICommand
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New( sTitle As String, sBaseDir As String, sMachTypePath As String, sTabTemplPath As String, Optional bIsBeam As Boolean = True)
|
||||
' Titolo del dialogo
|
||||
m_sTitle = sTitle
|
||||
' Imposto direttorio base e nomi dei file
|
||||
m_BaseDir = sBaseDir
|
||||
m_MachTypeFilePath = sMachTypePath
|
||||
m_TableTemplateFilePath = sTabTemplPath
|
||||
' Imposto se per travi o pareti
|
||||
m_IsBeam = bIsBeam
|
||||
' Se previste, aggiungo lavorazioni di superfici
|
||||
Dim sDummy As String = ""
|
||||
If EgtUILib.GetPrivateProfileString( MACH_SURFACING, "1", "", sDummy, m_MachTypeFilePath) > 0 Then
|
||||
m_MachiningList.Add(MACH_SURFACING)
|
||||
End If
|
||||
' Seleziono la prima lavorazione
|
||||
If m_MachiningList.Count > 0 Then
|
||||
SetSelMachining( m_MachiningList(0))
|
||||
End If
|
||||
NotifyPropertyChanged( "MachiningList")
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Function LoadMachiningList() As Boolean
|
||||
Dim MachiningList As New List(Of String)
|
||||
Select Case SelMachining
|
||||
Case MACH_CUT
|
||||
If m_IsBeam Then
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.MILLING, MCH_TF.SAWBLADE)
|
||||
Else
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.SAWING, 0)
|
||||
End If
|
||||
Case MACH_DRILL
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.DRILLING, 0)
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.POCKETING, 0, False)
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.MILLING, MCH_TF.MILL, False)
|
||||
Case MACH_MILLING
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.MILLING, MCH_TF.MILL)
|
||||
Case MACH_POCKETING
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.POCKETING, 0)
|
||||
Case MACH_SAWING
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.MORTISING, 0)
|
||||
Case MACH_SURFACING
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.SURFROUGHING, 0)
|
||||
LoadMachiningListByType(MachiningList, MCH_MY.SURFFINISHING, 0, False)
|
||||
End Select
|
||||
GridLine.SetNamesList(New ObservableCollection(Of String)(MachiningList))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function LoadTypeList() As Boolean
|
||||
Dim TypeList As New List(Of String)
|
||||
Dim Index As Integer = 1
|
||||
Dim Type As String = ""
|
||||
While EgtUILib.GetPrivateProfileString( SelMachining, Index.ToString, "", Type, m_MachTypeFilePath) > 0
|
||||
TypeList.Add(Type)
|
||||
Index += 1
|
||||
End While
|
||||
GridLine.SetTypeList( New ObservableCollection(Of String)( TypeList))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function ReadTableFile() As Boolean
|
||||
' svuoto la lista
|
||||
m_TableRowList = New ObservableCollection(Of GridLine)
|
||||
Dim FilePath As String = m_BaseDir & "\" & SelMachining & "Data.lua"
|
||||
If Not File.Exists(FilePath) Then Return False
|
||||
Dim FileContent As String() = File.ReadAllLines(FilePath)
|
||||
Dim FoundTableName As Boolean = False
|
||||
For LineIndex As Integer = 0 To FileContent.Count - 1
|
||||
If FileContent(LineIndex).Contains(SelMachining & "Data") Then
|
||||
FoundTableName = True
|
||||
End If
|
||||
Dim Open As Integer = CountCharacter(FileContent(LineIndex), "{"c)
|
||||
Dim Close As Integer = CountCharacter(FileContent(LineIndex), "}"c)
|
||||
If Close > Open Then
|
||||
If FoundTableName Then
|
||||
FoundTableName = False
|
||||
End If
|
||||
End If
|
||||
If FoundTableName Then
|
||||
Dim sOn As String = SearchKey(FileContent(LineIndex), ONCONST)
|
||||
Dim sName As String = SearchKey(FileContent(LineIndex), NAME)
|
||||
Dim sType As String = SearchKey(FileContent(LineIndex), TYPE)
|
||||
If Not String.IsNullOrWhiteSpace(sOn) AndAlso Not String.IsNullOrWhiteSpace(sName) AndAlso Not String.IsNullOrWhiteSpace(sType) Then
|
||||
If String.Compare(sOn, "true", True) = 0 Then
|
||||
TableRowList.Add(New GridLine(True, sName, sType))
|
||||
ElseIf String.Compare(sOn, "false", True) = 0 Then
|
||||
TableRowList.Add(New GridLine(False, sName, sType))
|
||||
Else
|
||||
Continue For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
NotifyPropertyChanged("TableRowList")
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function WriteTableFile() As Boolean
|
||||
' inizio routine di scrittura
|
||||
Dim FileContent As String() = File.ReadAllLines(m_TableTemplateFilePath)
|
||||
Dim NewTableFileContent As New List(Of String)
|
||||
Dim bBeamTable As Boolean = False
|
||||
For LineIndex As Integer = 0 To FileContent.Count - 1
|
||||
Dim sCurrLine As String = FileContent(LineIndex)
|
||||
sCurrLine = sCurrLine.Replace(DATETIME, System.DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"))
|
||||
sCurrLine = sCurrLine.Replace(TABLENAME, SelMachining & "Data")
|
||||
|
||||
If sCurrLine.Contains(SelMachining & "Data") AndAlso sCurrLine.Contains("=") Then
|
||||
bBeamTable = True
|
||||
NewTableFileContent.Add(sCurrLine)
|
||||
PrintActiveMachiningList(NewTableFileContent)
|
||||
End If
|
||||
|
||||
If Not bBeamTable Then
|
||||
NewTableFileContent.Add(sCurrLine)
|
||||
Else
|
||||
bBeamTable = False
|
||||
End If
|
||||
Next
|
||||
Dim FilePath As String = m_BaseDir & "\" & SelMachining & "Data.lua"
|
||||
File.WriteAllLines(FilePath, NewTableFileContent, Text.Encoding.UTF8)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub PrintActiveMachiningList(NewTableFileContent As List(Of String))
|
||||
For Index As Integer = 0 To m_TableRowList.Count - 1
|
||||
If String.IsNullOrEmpty(m_TableRowList(Index).Name) Then Continue For
|
||||
Dim CurrentLine As String = " { On = " & If(m_TableRowList(Index).OnPar, "true", "false") & ", Name = '" & m_TableRowList(Index).Name & "', Type = '" & m_TableRowList(Index).Type & "'}"
|
||||
If Index < m_TableRowList.Count - 1 Then
|
||||
CurrentLine &= ","
|
||||
End If
|
||||
NewTableFileContent.Add(CurrentLine)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "MoveRowUp"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property MoveRowUp_Command As ICommand
|
||||
Get
|
||||
If m_cmdMoveRowUp Is Nothing Then
|
||||
m_cmdMoveRowUp = New Command(AddressOf MoveRowUp)
|
||||
End If
|
||||
Return m_cmdMoveRowUp
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub MoveRowUp()
|
||||
If SelRowIndex > 0 Then
|
||||
m_TableRowList.Move(SelRowIndex, SelRowIndex - 1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' MoveRowUp
|
||||
|
||||
#Region "MoveRowDown"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property MoveRowDown_Command As ICommand
|
||||
Get
|
||||
If m_cmdMoveRowDown Is Nothing Then
|
||||
m_cmdMoveRowDown = New Command(AddressOf MoveRowDown)
|
||||
End If
|
||||
Return m_cmdMoveRowDown
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub MoveRowDown()
|
||||
If SelRowIndex < m_TableRowList.Count - 1 Then
|
||||
m_TableRowList.Move(SelRowIndex, SelRowIndex + 1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' MoveRowDown
|
||||
|
||||
#Region "AddRow"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property AddRow_Command As ICommand
|
||||
Get
|
||||
If m_cmdAddRow Is Nothing Then
|
||||
m_cmdAddRow = New Command(AddressOf AddRow)
|
||||
End If
|
||||
Return m_cmdAddRow
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub AddRow()
|
||||
m_TableRowList.Insert(SelRowIndex + 1, New GridLine(False, "", ""))
|
||||
End Sub
|
||||
|
||||
#End Region ' AddRow
|
||||
|
||||
#Region "DeleteRow"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property DeleteRow_Command As ICommand
|
||||
Get
|
||||
If m_cmdDeleteRow Is Nothing Then
|
||||
m_cmdDeleteRow = New Command(AddressOf DeleteRow)
|
||||
End If
|
||||
Return m_cmdDeleteRow
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub DeleteRow()
|
||||
m_TableRowList.RemoveAt(SelRowIndex)
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteRow
|
||||
|
||||
#Region "Save"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Save_Command As ICommand
|
||||
Get
|
||||
If m_cmdSave Is Nothing Then
|
||||
m_cmdSave = New Command(AddressOf Save)
|
||||
End If
|
||||
Return m_cmdSave
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub Save()
|
||||
' scrivo il file
|
||||
WriteTableFile()
|
||||
' resetto le modifiche
|
||||
For Each Line In m_TableRowList
|
||||
Line.ResetIsModified()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' Save
|
||||
|
||||
#Region "Close"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Exec.
|
||||
''' </summary>
|
||||
Public ReadOnly Property Close_Command As ICommand
|
||||
Get
|
||||
If m_cmdClose Is Nothing Then
|
||||
m_cmdClose = New Command(AddressOf Close)
|
||||
End If
|
||||
Return m_cmdClose
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
Public Sub Close()
|
||||
' verifico se pagina precedente modificata
|
||||
Dim TableModified As Boolean = False
|
||||
For Each Line In m_TableRowList
|
||||
If Line.IsModified Then
|
||||
TableModified = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' se modificata, chiedo se salvare
|
||||
If TableModified Then
|
||||
' Salvare le modifiche apportate? - Salva
|
||||
Select Case MessageBox.Show( EgtMsg( 9007), EgtMsg( 9006), MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||
Case MessageBoxResult.Yes
|
||||
Save()
|
||||
Case MessageBoxResult.No
|
||||
' non devo fare nulla
|
||||
End Select
|
||||
End If
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Close
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
Public Class GridLine
|
||||
Inherits VMBase
|
||||
|
||||
Friend ReadOnly Property IsModified As Boolean
|
||||
Get
|
||||
Return m_IsOnModified Or m_IsNameModified Or m_IsTypeModified
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub ResetIsModified()
|
||||
m_IsOnModified = False
|
||||
m_IsNameModified = False
|
||||
m_IsTypeModified = False
|
||||
End Sub
|
||||
|
||||
Private m_IsOnModified As Boolean = False
|
||||
Private m_On As Boolean
|
||||
Public Property OnPar As Boolean
|
||||
Get
|
||||
Return m_On
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_On = value
|
||||
m_IsOnModified = True
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Shared m_NamesList As ObservableCollection(Of String)
|
||||
Public ReadOnly Property NamesList As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_NamesList
|
||||
End Get
|
||||
End Property
|
||||
Friend Shared Sub SetNamesList(NamesList As ObservableCollection(Of String))
|
||||
m_NamesList = NamesList
|
||||
End Sub
|
||||
|
||||
Private m_IsNameModified As Boolean = False
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Name = value
|
||||
m_IsNameModified = True
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Shared m_TypeList As ObservableCollection(Of String)
|
||||
Public ReadOnly Property TypeList As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_TypeList
|
||||
End Get
|
||||
End Property
|
||||
Friend Shared Sub SetTypeList(TypeList As ObservableCollection(Of String))
|
||||
m_TypeList = TypeList
|
||||
End Sub
|
||||
|
||||
Private m_IsTypeModified As Boolean = False
|
||||
Private m_Type As String
|
||||
Public Property Type As String
|
||||
Get
|
||||
Return m_Type
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Type = value
|
||||
m_IsTypeModified = True
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(bOnPar As Boolean, sName As String, sType As String)
|
||||
m_On = bOnPar
|
||||
m_Name = sName
|
||||
m_Type = sType
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,12 @@
|
||||
<Grid x:Class="BottomTrayV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
DockPanel.Dock="Bottom">
|
||||
<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"
|
||||
RepaetButtonStyle="{StaticResource CustomScrollBarButton}"
|
||||
MachGroupButtonStyle="{StaticResource {x:Type ToggleButton}}"
|
||||
IsToolBar="False"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False"
|
||||
IsRightDockable="False" />
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class BottomTrayV
|
||||
|
||||
End Class
|
||||
@@ -22,6 +22,7 @@ Module ConstGen
|
||||
' File con dati di licenza
|
||||
Public Const LIC_FILE_NAME As String = "EgtCAM5.lic"
|
||||
Public Const S_LICENCE As String = "Licence"
|
||||
Public Const K_LOCKID As String = "LockId"
|
||||
Public Const K_KEY As String = "Key"
|
||||
Public Const K_NESTKEY As String = "NestKey"
|
||||
|
||||
|
||||
+15
-1
@@ -18,6 +18,7 @@ Module ConstIni
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_USERLEVEL As String = "UserLevel"
|
||||
Public Const K_MAXINST As String = "MaxInstances"
|
||||
Public Const K_INSTANCES As String = "Instances"
|
||||
@@ -28,6 +29,7 @@ Module ConstIni
|
||||
Public Const K_HIDEPLACE As String = "HidePlace"
|
||||
Public Const K_LASTNGEDIR As String = "LastNgeDir"
|
||||
Public Const K_LASTNGEOBJDIR As String = "LastNgeObjDir"
|
||||
Public Const K_LASTNGEINSDIR As String = "LastNgeInsDir"
|
||||
Public Const K_LASTLUADIR As String = "LastLuaDir"
|
||||
Public Const K_LASTIMPDIR As String = "LastImpDir"
|
||||
Public Const K_LASTEXPDIR As String = "LastExpDir"
|
||||
@@ -37,6 +39,8 @@ Module ConstIni
|
||||
Public Const K_TRANSFORM As String = "Transform"
|
||||
Public Const K_ONLYDRAW As String = "OnlyDraw"
|
||||
Public Const K_SUPPORT As String = "Support"
|
||||
Public Const K_PLUGIN As String = "Plugin"
|
||||
Public Const K_EXECUTE As String = "Execute"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -45,6 +49,7 @@ Module ConstIni
|
||||
Public Const K_LIBSDIR As String = "LibsDir"
|
||||
Public Const K_LIBSDIR64 As String = "LibsDir64"
|
||||
Public Const K_BASELIB As String = "BaseLib"
|
||||
Public Const K_BWSIM As String = "BWSim"
|
||||
|
||||
Public Const S_GEOMDB As String = "GeomDB"
|
||||
Public Const K_DEFAULTFONT As String = "DefaultFont"
|
||||
@@ -109,6 +114,7 @@ Module ConstIni
|
||||
Public Const K_DXFFLAG As String = "DxfFlag"
|
||||
Public Const K_IMGWIDTH As String = "ImgWidth"
|
||||
Public Const K_IMGHEIGHT As String = "ImgHeight"
|
||||
Public Const K_THREEJSLIBDIR As String = "ThreeJSLibDir"
|
||||
|
||||
Public Const S_SPECIAL As String = "Special"
|
||||
Public Const K_SPECIALENABLE As String = "SpecialEnable"
|
||||
@@ -117,6 +123,7 @@ Module ConstIni
|
||||
Public Const S_BEAM As String = "Beam"
|
||||
Public Const K_BEAMENABLE As String = "BtlEnable"
|
||||
Public Const K_BEAMBASEDIR As String = "BaseDir"
|
||||
Public Const K_BEAMBASEDIR64 As String = "BaseDir64"
|
||||
Public Const K_BEAMBTLEXEC As String = "BtlExec"
|
||||
Public Const K_BEAMBWEEXEC As String = "BweExec"
|
||||
Public Const K_BEAMMACHINES As String = "Machines"
|
||||
@@ -125,15 +132,19 @@ Module ConstIni
|
||||
Public Const S_WALL As String = "Wall"
|
||||
Public Const K_WALLENABLE As String = "BtlEnable"
|
||||
Public Const K_WALLBASEDIR As String = "BaseDir"
|
||||
Public Const K_WALLBASEDIR64 As String = "BaseDir64"
|
||||
Public Const K_WALLBTLEXEC As String = "BtlExec"
|
||||
Public Const K_WALLBWEEXEC As String = "BweExec"
|
||||
Public Const K_WALLBUTTON As String = "Button"
|
||||
|
||||
Public Const S_BEAMWALL As String = "BeamWall"
|
||||
Public Const K_BEAMWALLENABLE As String = "BtlEnable"
|
||||
Public Const K_BEAMWALLBASEDIR As String = "BaseDir"
|
||||
Public Const K_BEAMWALLBUTTON As String = "Button"
|
||||
|
||||
Public Const S_PRINTING3D As String = "3dPrinting"
|
||||
Public Const K_ENABLE As String = "Enable"
|
||||
Public Const K_3PRNBASEDIR As String = "BaseDir"
|
||||
|
||||
Public Const S_DOORS As String = "Doors"
|
||||
Public Const K_DDFENABLE As String = "DdfEnable"
|
||||
Public Const K_BASEDIR As String = "BaseDir"
|
||||
@@ -153,8 +164,10 @@ Module ConstIni
|
||||
Public Const K_WRITEPEZFUNCTION As String = "WritePezFun"
|
||||
Public Const K_READPEZFUNCTION As String = "ReadPezFun"
|
||||
Public Const K_CREATEFUNCTION As String = "CreateFun"
|
||||
Public Const K_COPYFUNCTION As String = "CopyFun"
|
||||
Public Const K_MODDIR As String = "ModDir"
|
||||
Public Const K_PEZDIR As String = "PezDir"
|
||||
Public Const K_COPYDIR As String = "CopyDir"
|
||||
|
||||
Public Const S_MACH As String = "Mach"
|
||||
Public Const K_MACHINESDIR As String = "MachinesDir"
|
||||
@@ -174,6 +187,7 @@ Module ConstIni
|
||||
Public Const K_MACHININGGROUP As String = "MachiningGroup"
|
||||
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
|
||||
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
|
||||
Public Const K_AUTOUPDATEALLMACHININGS As String = "AutoUpdateAllMachinings"
|
||||
|
||||
Public Const S_SIMUL As String = "Simul"
|
||||
Public Const K_SLIDERX As String = "SliderX"
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
Public Const K_SAWFINISHING As String = "SawFinishing"
|
||||
Public Const K_GENMACHINING As String = "GenMachining"
|
||||
Public Const K_CHISELING As String = "Chiseling"
|
||||
Public Const K_SURFROUGHING As String = "SurfRoughing"
|
||||
Public Const K_SURFFINISHING As String = "SurfFinishing"
|
||||
Public Const K_5AXMACHINING As String = "5axMachining"
|
||||
Public Const K_WATERJETTING As String = "WaterJetting"
|
||||
Public Const K_SAWINGONARCS As String = "SawingOnArcs"
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<UserControl x:Class="DrawPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="DrawPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
|
||||
TitleBarOrientation="Vertical"
|
||||
Visibility="{Binding DrawPanel_Visibility}">
|
||||
|
||||
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||
<Expander Name="Draw2D" Style="{StaticResource ExpanderStyle}" Grid.Row="0"
|
||||
@@ -170,6 +172,11 @@
|
||||
Command="{Binding InvertSurfCommand}" IsEnabled="{Binding bSelOk}">
|
||||
<Image Source="/Resources/DrawPanel/InvertSurf.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding ApproxSurfToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||
ToolTipService.ShowOnDisabled="True"
|
||||
Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}">
|
||||
<Image Source="/Resources/DrawPanel/ApproxSurf.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
</Expander>
|
||||
<Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}">
|
||||
@@ -284,6 +291,11 @@
|
||||
Command="{Binding ApproxCurveCommand}" IsEnabled="{Binding bSelOk}">
|
||||
<Image Source="/Resources/DrawPanel/ApproxCurve.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding ModifyArcRadiusToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||
ToolTipService.ShowOnDisabled="True"
|
||||
Command="{Binding ModifyArcRadiusCommand}" IsEnabled="{Binding bSelOk}">
|
||||
<Image Source="/Resources/DrawPanel/ModifyArcRadius.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding ModifyTextToolTip}" Style="{StaticResource DrawPanelButton}"
|
||||
ToolTipService.ShowOnDisabled="True"
|
||||
Command="{Binding ModifyTextCommand}" IsEnabled="{Binding bSelOk}">
|
||||
@@ -342,4 +354,4 @@
|
||||
</Interactivity:Interaction.Behaviors>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -146,6 +146,11 @@ Public Class DrawPanelVM
|
||||
Return EgtMsg( 5221) 'Esplodi Superfici e Regioni Piane
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ApproxSurfToolTip As String
|
||||
Get
|
||||
Return EgtMsg( 5165) 'Approssima Superfici e Regioni Piane
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ExtractSurfFacetToolTip As String
|
||||
Get
|
||||
Return EgtMsg( 5158) 'Estrai Faccia da Superficie
|
||||
@@ -289,12 +294,17 @@ Public Class DrawPanelVM
|
||||
End Property
|
||||
Public ReadOnly Property ApproxCurveToolTip As String
|
||||
Get
|
||||
Return EgtMsg( 5163)
|
||||
Return EgtMsg(5163)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ModifyArcRadiusToolTip As String
|
||||
Get
|
||||
Return EgtMsg(5164)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ModifyTextToolTip As String
|
||||
Get
|
||||
Return EgtMsg(MSG_DRAWPANEL + 49)
|
||||
Return EgtMsg(5249)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -383,6 +393,18 @@ Public Class DrawPanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_DrawPanel_Visibility As Visibility
|
||||
Public ReadOnly Property DrawPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_DrawPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetDrawPanelVisibility(bValue As Boolean)
|
||||
m_DrawPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
OnPropertyChanged(NameOf(DrawPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "Button state"
|
||||
|
||||
Private m_bLayerOk As Boolean
|
||||
@@ -443,6 +465,7 @@ Public Class DrawPanelVM
|
||||
Private m_cmdRuled As ICommand
|
||||
Private m_cmdMergeSurf As ICommand
|
||||
Private m_cmdExplodeSurf As ICommand
|
||||
Private m_cmdApproxSurf As ICommand
|
||||
Private m_cmdExtractSurfFacet As ICommand
|
||||
Private m_cmdInvertSurf As ICommand
|
||||
Private m_cmdExtractLoops As ICommand
|
||||
@@ -467,6 +490,7 @@ Public Class DrawPanelVM
|
||||
Private m_cmdFillet As ICommand
|
||||
Private m_cmdChamfer As ICommand
|
||||
Private m_cmdArcFlip As ICommand
|
||||
Private m_cmdModifyArcRadius As ICommand
|
||||
Private m_cmdModifyText As ICommand
|
||||
Private m_cmdMove As ICommand
|
||||
Private m_cmdRotate As ICommand
|
||||
@@ -1140,7 +1164,7 @@ Public Class DrawPanelVM
|
||||
''' </summary>
|
||||
Public Sub ExplodeSurf(ByVal param As Object)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACET)
|
||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SURFTMTOTRIANGLES)
|
||||
Else
|
||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXPLODESURF)
|
||||
End If
|
||||
@@ -1148,6 +1172,29 @@ Public Class DrawPanelVM
|
||||
|
||||
#End Region ' ExplodeSurfCommand
|
||||
|
||||
#Region "ApproxSurfCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do ApproxSurf.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ApproxSurfCommand As ICommand
|
||||
Get
|
||||
If m_cmdApproxSurf Is Nothing Then
|
||||
m_cmdApproxSurf = New RelayCommand(AddressOf ApproxSurf)
|
||||
End If
|
||||
Return m_cmdApproxSurf
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the ApproxSurf. This method is invoked by the ApproxSurfCommand.
|
||||
''' </summary>
|
||||
Public Sub ApproxSurf(ByVal param As Object)
|
||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.APPROXSURF)
|
||||
End Sub
|
||||
|
||||
#End Region ' ApproxSurfCommand
|
||||
|
||||
#Region "ExtractSurfFacetCommand"
|
||||
|
||||
''' <summary>
|
||||
@@ -1169,7 +1216,7 @@ Public Class DrawPanelVM
|
||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACET)
|
||||
End Sub
|
||||
|
||||
#End Region ' ExplodeSurfCommand
|
||||
#End Region ' ExtractSurfFacetCommand
|
||||
|
||||
#Region "InvertSurfCommand"
|
||||
|
||||
@@ -1726,6 +1773,29 @@ Public Class DrawPanelVM
|
||||
|
||||
#End Region ' ArcFlipCommand
|
||||
|
||||
#Region "ModifyArcRadiusCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do ModifyArcRadius.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ModifyArcRadiusCommand As ICommand
|
||||
Get
|
||||
If m_cmdModifyArcRadius Is Nothing Then
|
||||
m_cmdModifyArcRadius = New RelayCommand(AddressOf ModifyArcRadius)
|
||||
End If
|
||||
Return m_cmdModifyArcRadius
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the ModifyArcRadius. This method is invoked by the ModifyArcRadiusCommand.
|
||||
''' </summary>
|
||||
Public Sub ModifyArcRadius(ByVal param As Object)
|
||||
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MODIFYARCRADIUS)
|
||||
End Sub
|
||||
|
||||
#End Region ' ModifyTextCommand
|
||||
|
||||
#Region "ModifyTextCommand"
|
||||
|
||||
''' <summary>
|
||||
|
||||
+70
-11
@@ -97,27 +97,31 @@
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtUILib">
|
||||
<Reference Include="DotNetZip">
|
||||
<HintPath>..\..\EgtProg\EgtCAM5\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtUILib, Version=2.4.6.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<Reference Include="EgtWPFLib, Version=2.4.5.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5, Version=2.4.6.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip">
|
||||
<HintPath>..\..\EgtProg\EgtCAM5\Ionic.Zip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\EgtCAM5\Microsoft.Expression.Interactions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\EgtCAM5\System.Windows.Interactivity.dll</HintPath>
|
||||
<HintPath>packages\EgtWPFLib5.2.4.6.1\lib\System.Windows.Interactivity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
@@ -150,12 +154,18 @@
|
||||
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowV.xaml.vb">
|
||||
<DependentUpon>BeamMachiningsWindowV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BeamMachiningsWindow\BeamMachiningsWindowVM.vb" />
|
||||
<Compile Include="BottomTray\BottomTrayV.xaml.vb">
|
||||
<DependentUpon>BottomTrayV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CurrSetUp\CurrSetUpV.xaml.vb">
|
||||
<DependentUpon>CurrSetUpV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CurrSetUp\CurrSetUpVM.vb" />
|
||||
<Compile Include="LeftTray\LeftTrayV.xaml.vb">
|
||||
<DependentUpon>LeftTrayV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||
<Compile Include="MEFPlugin\MefPlugin.vb" />
|
||||
<Compile Include="OptionPanel\MachiningOptionPanel\EstimationsExpander\EstimationsExpanderV.xaml.vb">
|
||||
<DependentUpon>EstimationsExpanderV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -225,6 +235,12 @@
|
||||
<Compile Include="OptionsWindow\MachineBox.xaml.vb">
|
||||
<DependentUpon>MachineBox.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RightTray\RightTrayV.xaml.vb">
|
||||
<DependentUpon>RightTrayV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SceneContentControl\SceneContentControlV.xaml.vb">
|
||||
<DependentUpon>SceneContentControlV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SetUpDb\SetUpDbV.xaml.vb">
|
||||
<DependentUpon>SetUpDbV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -272,7 +288,11 @@
|
||||
</Compile>
|
||||
<Compile Include="StatusBar\MyStatusBarVM.vb" />
|
||||
<Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" />
|
||||
<Compile Include="TopTray\TopTrayV.xaml.vb">
|
||||
<DependentUpon>TopTrayV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Analyze.vb" />
|
||||
<Compile Include="Utility\BasePanelVM.vb" />
|
||||
<Compile Include="Utility\BindingProxy.vb" />
|
||||
<Compile Include="Utility\Map.vb" />
|
||||
<Compile Include="Internals\MruList.vb" />
|
||||
@@ -344,7 +364,6 @@
|
||||
<DependentUpon>MachiningParameterExpanderV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanel\MachiningOptionPanel\OperationExpander\OperationListBoxItem\OperationListBoxItem.vb" />
|
||||
<Compile Include="OptionPanel\MachiningOptionPanel\SimulationExpander\MachineAxis.vb" />
|
||||
<Compile Include="PopUpGridPanel\PopUpGridPanelV.xaml.vb">
|
||||
<DependentUpon>PopUpGridPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -411,6 +430,10 @@
|
||||
<Compile Include="Utility\Utility.vb" />
|
||||
<Compile Include="Utility\VMBase.vb" />
|
||||
<Compile Include="ValidationGroup.vb" />
|
||||
<Compile Include="WinFormPluginControl\WinFormPluginControlVM.vb" />
|
||||
<Compile Include="WinFormPluginControl\WinFormPluginControlV.xaml.vb">
|
||||
<DependentUpon>WinFormPluginControlV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Page Include="AboutBoxWindow\AboutBoxView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -419,6 +442,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="BottomTray\BottomTrayV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="CurrSetUp\CurrSetUpV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -427,6 +454,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="LeftTray\LeftTrayV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MachOptionsWindow\MachOptionV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -515,6 +546,14 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="RightTray\RightTrayV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="SceneContentControl\SceneContentControlV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="SetUpDb\SetUpDbV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -579,6 +618,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="TopTray\TopTrayV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Utility\Dictionary.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -671,6 +714,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="WinFormPluginControl\WinFormPluginControlV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="System.Linq" />
|
||||
@@ -943,6 +990,18 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DrawPanel\ApproxCurve.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DrawPanel\ModifyArcRadius.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DrawPanel\ApproxSurf.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\Print.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\EgtCAM5_64.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<UserControl x:Class="ExecutePanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="ExecutePanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding ExecutePanel_Visibility}">
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Command="{Binding ExecCommand}" ToolTip="{Binding ExecToolTip}"
|
||||
@@ -13,4 +15,4 @@
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -12,6 +12,18 @@ Public Class ExecutePanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ExecutePanel_Visibility As Visibility
|
||||
Public ReadOnly Property ExecutePanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_ExecutePanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub SetExecutePanelVisibility(bValue As Boolean)
|
||||
m_ExecutePanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
OnPropertyChanged(NameOf(ExecutePanel_Visibility))
|
||||
End Sub
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdExec As ICommand
|
||||
Private Shared m_cmdOpenMruScript As ICommand
|
||||
@@ -28,6 +40,11 @@ Public Class ExecutePanelVM
|
||||
|
||||
#End Region ' FIELDS & PROPERTIES
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefExecutePanelVM(Me)
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ExecCommand"
|
||||
|
||||
@@ -59,7 +59,7 @@ Public Class MruList
|
||||
End Sub
|
||||
|
||||
'---------------------------------------------------------------------------
|
||||
Public Sub Add(ByVal sFileName As String)
|
||||
Public Sub Add(sFileName As String)
|
||||
' Gestione '_'
|
||||
Dim sMyFileName As String = sFileName.Replace("_", "__")
|
||||
' Se stringa vuota, esco subito
|
||||
@@ -84,7 +84,7 @@ Public Class MruList
|
||||
End Sub
|
||||
|
||||
'---------------------------------------------------------------------------
|
||||
Private Function FileNameIndex(ByVal sFileName As String) As Integer
|
||||
Private Function FileNameIndex(sFileName As String) As Integer
|
||||
For i As Integer = 0 To m_FileNames.Count - 1
|
||||
If String.Compare(m_FileNames(i).ToString, sFileName, True) = 0 Then
|
||||
Return i
|
||||
@@ -94,7 +94,7 @@ Public Class MruList
|
||||
End Function
|
||||
|
||||
'---------------------------------------------------------------------------
|
||||
Public Sub Remove(ByVal sFileName As String)
|
||||
Public Sub Remove(sFileName As String)
|
||||
' Gestione '_'
|
||||
Dim sMyFileName As String = sFileName.Replace("_", "__")
|
||||
' Rimozione
|
||||
@@ -108,8 +108,8 @@ Public Class MruList
|
||||
End Sub
|
||||
|
||||
'---------------------------------------------------------------------------
|
||||
Public Function GetFileName(ByVal nInd As Integer, ByRef sFileName As String) As Boolean
|
||||
If nInd > 0 And nInd <= m_FileNames.Count() Then
|
||||
Public Function GetFileName(nInd As Integer, ByRef sFileName As String) As Boolean
|
||||
If nInd >= 0 And nInd < m_FileNames.Count() Then
|
||||
' Gestione '_'
|
||||
sFileName = m_FileNames(nInd).ToString().Replace("__", "_")
|
||||
Return True
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<Grid x:Class="LeftTrayV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
DockPanel.Dock="Left">
|
||||
|
||||
<local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class LeftTrayV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,74 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports System.ComponentModel.Composition.hosting
|
||||
|
||||
Public Class MEFLoader
|
||||
Private importers As Dictionary(Of String, List(Of Object)) = New Dictionary(Of String, List(Of Object))()
|
||||
|
||||
Public Overridable Function LoadByTag(Of T)(ByVal path As String, ByVal tag As String) As ICollection(Of T)
|
||||
Dim importer = GetImporter(Of T)(path)
|
||||
Return importer.LoadByMEF(path, tag)
|
||||
End Function
|
||||
|
||||
Protected Function GetImporter(Of T)(ByVal path As String) As MEFImporter(Of T)
|
||||
Dim importerList = GetImporterList(path)
|
||||
Dim importer = importerList.OfType(Of MEFImporter(Of T))().FirstOrDefault()
|
||||
|
||||
If importer Is Nothing Then
|
||||
importer = New MEFImporter(Of T)(path)
|
||||
importerList.Add(importer)
|
||||
End If
|
||||
|
||||
Return importer
|
||||
End Function
|
||||
|
||||
Protected Function GetImporterList(ByVal path As String) As List(Of Object)
|
||||
If importers.ContainsKey(path) = False Then importers.Add(path, New List(Of Object)())
|
||||
Return importers(path)
|
||||
End Function
|
||||
|
||||
Public Overridable Function LoadByType(Of T)(ByVal path As String) As ICollection(Of T)
|
||||
Return LoadByTag(Of T)(path, String.Empty)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Interface IMetadata
|
||||
ReadOnly Property Name As String
|
||||
End Interface
|
||||
|
||||
Public Class MEFImporter(Of T)
|
||||
|
||||
<ImportMany(AllowRecomposition:=True)>
|
||||
Public Property [imports] As IEnumerable(Of Lazy(Of T, IMetadata))
|
||||
|
||||
Private Sub New()
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal path As String)
|
||||
Me.New()
|
||||
directoryCatalog = New DirectoryCatalog(path)
|
||||
End Sub
|
||||
|
||||
Protected directoryCatalog As DirectoryCatalog = Nothing
|
||||
|
||||
Protected Sub DoImport(ByVal path As String)
|
||||
Dim catalog = New AggregateCatalog()
|
||||
catalog.Catalogs.Add(directoryCatalog)
|
||||
Dim container As CompositionContainer = New CompositionContainer(catalog)
|
||||
container.ComposeParts(Me)
|
||||
End Sub
|
||||
|
||||
Public Function LoadByMEF(ByVal path As String, ByVal name As String) As ICollection(Of T)
|
||||
Dim res = New List(Of T)()
|
||||
DoImport(path)
|
||||
|
||||
For Each [module] As Lazy(Of T, IMetadata) In [imports]
|
||||
|
||||
If [module].Metadata.Name = name OrElse String.IsNullOrEmpty(name) Then
|
||||
res.Add([module].Value)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return res
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -1,5 +1,8 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtCAM5.MyMachinePanelVM
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.Windows.Forms.AxHost
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
@@ -95,20 +98,20 @@ Public Class MyMachGroupPanelVM
|
||||
' Vuoi creare un nuovo Gruppo di Lavoro con i pezzi selezionati ? - LAVORA
|
||||
If MessageBox.Show(EgtMsg(5552), EgtMsg(5002), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
|
||||
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
|
||||
Else
|
||||
Else
|
||||
Return -2
|
||||
End If
|
||||
End If
|
||||
' Se non ci sono pezzi selezionati
|
||||
' Se non ci sono pezzi selezionati
|
||||
Else
|
||||
' se ci sono gruppi di lavorazione
|
||||
If bMachGroup Then
|
||||
nGroupId = EgtGetLastMachGroup()
|
||||
Return If(EgtSetCurrMachGroup(nGroupId), 0, 1)
|
||||
' se altrimenti ammessi gruppi di lavoro vuoti
|
||||
' se altrimenti ammessi gruppi di lavoro vuoti
|
||||
ElseIf bAllowEmpty Then
|
||||
Return If(AddNewMachGroup(nGroupId, vPart), 0, 1)
|
||||
' altrimenti esco
|
||||
' altrimenti esco
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
@@ -208,6 +211,13 @@ Public Class MyMachGroupPanelVM
|
||||
EgtOutLog("Errore nel posizionamento dei pezzi")
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
Dim sTabNames As String = ""
|
||||
EgtGetAllTablesNames(sTabNames)
|
||||
Dim sItems() As String = sTabNames.Split(","c).ToArray
|
||||
If sItems.Count() > 0 Then
|
||||
EgtSetTable( sItems(0))
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
EgtOutLog("Machine without InitDisp script.")
|
||||
@@ -290,8 +300,10 @@ Public Class MyMachGroupPanelVM
|
||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
|
||||
Case "Beam"
|
||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.BEAM
|
||||
Case "Additive"
|
||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = MaterialType.WOOD
|
||||
Case Else
|
||||
' Se il materiale spcificato nel file INI della macchina non corrisponde ai 2 sopracitati viene emesso un messaggio di errore
|
||||
' Se il materiale specificato nel file INI della macchina non corrisponde ai 4 sopracitati viene emesso un messaggio di errore
|
||||
EgtWPFLib5.MachiningTreeViewItem.m_MatType = Nothing
|
||||
MsgBox(EgtMsg(31409), MsgBoxStyle.Exclamation, EgtMsg(31551))
|
||||
End Select
|
||||
@@ -300,15 +312,36 @@ Public Class MyMachGroupPanelVM
|
||||
#End Region
|
||||
|
||||
Public Overrides Sub AddMachGroup()
|
||||
'If AddNewMachGroup() Then
|
||||
' Dim sMachName As String = String.Empty
|
||||
' EgtGetMachGroupName(EgtGetCurrMachGroup(), sMachName)
|
||||
' MachGroupList.Add(sMachName)
|
||||
' SelectedMachGroup = sMachName
|
||||
' EgtDraw()
|
||||
' Map.refOperationsListExpanderVM.LoadOperationList(GDB_ID.NULL)
|
||||
' Map.refOperationsListExpanderVM.UpdateCurrentMachine()
|
||||
'End If
|
||||
|
||||
Dim nNewMachGrpId As Integer = GDB_ID.NULL
|
||||
Dim sNewMachGrpName As String = ""
|
||||
|
||||
' Se premuto Shift, copio il gruppo corrente
|
||||
If (Keyboard.Modifiers And Input.ModifierKeys.Shift) = Input.ModifierKeys.Shift Then
|
||||
' Eseguo una copia del gruppo corrente
|
||||
Dim sMachGrpName As String = ""
|
||||
If Not EgtGetMachGroupName(EgtGetCurrMachGroup(), sMachGrpName) Then Return
|
||||
sNewMachGrpName = "Mach_1"
|
||||
EgtGetMachGroupNewName(sNewMachGrpName)
|
||||
nNewMachGrpId = EgtCopyMachGroup(sMachGrpName, sNewMachGrpName)
|
||||
' altrimenti ne aggiungo uno vuoto
|
||||
Else
|
||||
Dim vPart As New List(Of Integer)
|
||||
AddNewMachGroup(nNewMachGrpId, vPart)
|
||||
EgtGetMachGroupName(nNewMachGrpId, sNewMachGrpName)
|
||||
End If
|
||||
|
||||
' Se creazione non riuscita, esco subito
|
||||
If nNewMachGrpId = GDB_ID.NULL Then Return
|
||||
' altrimenti sistemo interfaccia
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetMachGroupMachineName(nNewMachGrpId, sMachine)
|
||||
Dim machGroup As New MachGroup(nNewMachGrpId, sNewMachGrpName, sMachine)
|
||||
MachGroupList.Add(machGroup)
|
||||
SelectedMachGroup = machGroup
|
||||
Map.refMachGroupPanelVM.SetMachGroupState(True)
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub RemoveMachGroup()
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<UserControl x:Class="MachinePanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="MachinePanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding MachinePanel_Visibility}">
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<!--Combobox per selezionare la macchina corrente-->
|
||||
@@ -32,4 +34,4 @@
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -82,6 +82,17 @@ Public Class MyMachinePanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MachinePanel_Visibility As Visibility
|
||||
Public ReadOnly Property MachinePanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_MachinePanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetMachinePanelVisibility(bValue As Boolean)
|
||||
m_MachinePanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(MachinePanel_Visibility))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property ToolDBMsg As String
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
Title="{Binding Title}" Icon="/Resources/EgtCAM5.ico"
|
||||
Title="{Binding Title}" Icon="{Binding IconSource}"
|
||||
TitleBarBrush="{StaticResource EgaltechBlue1}" TitleBarHeight="32"
|
||||
BorderBrush="{StaticResource EgaltechBlue1}" BorderThickness="2"
|
||||
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
|
||||
|
||||
+123
-30
@@ -4,6 +4,7 @@ Imports System.Windows.Threading
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Math
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MainWindowVM
|
||||
Inherits ViewModelBase
|
||||
@@ -14,13 +15,16 @@ Public Class MainWindowVM
|
||||
Private m_objMutex As Mutex
|
||||
Private m_sDataRoot As String = String.Empty
|
||||
Private m_sConfigDir As String = String.Empty
|
||||
Private m_nDebug As Integer = 0
|
||||
Private m_OnTerminateProcessCallback As New OnTerminateProcessCallback(AddressOf OnTerminateProcess)
|
||||
|
||||
' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY
|
||||
|
||||
' GRAPHICAL FIELDS
|
||||
' Event commands
|
||||
' MainWindow ContentRendered Event
|
||||
Private m_nDebug As Integer = 0
|
||||
Public ReadOnly Property DebugLevel As Integer
|
||||
Get
|
||||
Return m_nDebug
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sVersion As String = "1.1a1"
|
||||
Public ReadOnly Property Version As String
|
||||
@@ -65,7 +69,6 @@ Public Class MainWindowVM
|
||||
End Property
|
||||
|
||||
' GRAPHICAL FIELDS WITH PROPERTY
|
||||
|
||||
Private m_StatusBar As StatusBarV
|
||||
Private m_bfirst As Boolean = True
|
||||
Public ReadOnly Property StatusBar As StatusBarV
|
||||
@@ -92,6 +95,16 @@ Public Class MainWindowVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IconSource As String
|
||||
Get
|
||||
#If PLATFORM = "x64" Then
|
||||
Return "/Resources/EgtCAM5_64.ico"
|
||||
#else
|
||||
Return "/Resources/EgtCAM5.ico"
|
||||
#End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -190,6 +203,19 @@ Public Class MainWindowVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function OnTerminateProcess( nExitCode As Integer) As Boolean
|
||||
' Aggiorno istanze usate
|
||||
m_objMutex.WaitOne(1000)
|
||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||
nTmp -= (1 << (IniFile.m_nInstance - 1))
|
||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString())
|
||||
m_objMutex.ReleaseMutex()
|
||||
' Rilascio mutex
|
||||
If Not IsNothing(m_objMutex) Then m_objMutex.Close()
|
||||
' Dichiaro di procedere con la terminazione del programma
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' CloseApplicationCommand
|
||||
|
||||
#Region "cmdMainWindow_ContentRendered"
|
||||
@@ -331,31 +357,43 @@ Public Class MainWindowVM
|
||||
' Impostazione direttorio toolmakers
|
||||
Dim sToolMakersDir As String = String.Empty
|
||||
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", sToolMakersDir)
|
||||
#If PLATFORM = "x64" Then
|
||||
#If PLATFORM = "x64" Then
|
||||
GetPrivateProfileString(S_MACH, K_TOOLMAKERSDIR64, sToolMakersDir, sToolMakersDir)
|
||||
#End If
|
||||
If Not String.IsNullOrWhiteSpace( sToolMakersDir) Then
|
||||
#End If
|
||||
If Not String.IsNullOrWhiteSpace(sToolMakersDir) Then
|
||||
IniFile.m_sToolMakersDir = sToolMakersDir
|
||||
Else
|
||||
IniFile.m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKER_DFL_DIR
|
||||
End If
|
||||
End If
|
||||
' Verifico indice di istanza
|
||||
ManageInstance()
|
||||
' Imposto tipo di chiave
|
||||
EgtSetLockType(KEY_TYPE.HW)
|
||||
' Leggo e imposto chiave di protezione ed eventuale chiave nesting
|
||||
Dim sLicFileName As String = ""
|
||||
GetPrivateProfileString( S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
|
||||
GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
|
||||
Dim sLicFile As String = m_sConfigDir & "\" & sLicFileName
|
||||
Dim sKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString( S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey( sKey)
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey( sNestKey)
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey(sNestKey)
|
||||
' Impostazioni per chiave di rete
|
||||
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
|
||||
EgtSetNetHwKey(bNetKey)
|
||||
Dim sLockId As String = ""
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||
If Not String.IsNullOrEmpty(sLockId) Then
|
||||
EgtSetLockId(sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2310, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2310, 1, IniFile.m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2511, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2511, 1, IniFile.m_nKeyOptions)
|
||||
' Leggo e imposto livello utilizzatore
|
||||
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||
' Imposto abilitazione lavorazioni avanzate
|
||||
MachineUtility.EnableAdvMachinings = IniFile.IsKeyEnabledAdvancedMachining()
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
|
||||
@@ -363,9 +401,13 @@ Public Class MainWindowVM
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
IniFile.m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", IniFile.m_nInstance.ToString())
|
||||
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & IniFile.m_nInstance.ToString() & ")" & vbLf &
|
||||
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||
" Inst" & IniFile.m_nInstance.ToString() &
|
||||
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & DebugLevel().ToString() & vbLf &
|
||||
My.Application.Info.Title.ToString() & " ver. " & m_sVersion
|
||||
EgtInit(m_nDebug, IniFile.m_sLogFile, sLogMsg)
|
||||
EgtSetOnTerminateProcess( m_OnTerminateProcessCallback)
|
||||
EgtSetUserLevel( IniFile.m_nUserLevel)
|
||||
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
|
||||
Dim sMsgDir As String = String.Empty
|
||||
If GetPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
|
||||
@@ -378,32 +420,34 @@ Public Class MainWindowVM
|
||||
If Not EgtLoadMessages(sMsgFilePath) Then
|
||||
EgtOutLog("Error in EgtLoadMessages")
|
||||
End If
|
||||
' Leggo e imposto livello utilizzatore
|
||||
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||
' imposto dir font Nfe e font default
|
||||
' Imposto dir font Nfe e font default
|
||||
Dim sNfeDir As String = String.Empty
|
||||
GetPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
|
||||
GetPrivateProfileString(S_GEOMDB, K_DEFAULTFONT, "", OptionModule.m_sFontText)
|
||||
EgtSetFont(sNfeDir, OptionModule.m_sFontText)
|
||||
' imposto direttorio ausiliario per import/gestione BTL
|
||||
' Imposto direttorio ausiliario per import/gestione BTL
|
||||
Dim sBtlAuxDir As String = String.Empty
|
||||
GetPrivateProfileString(S_IMPORT, K_BTLAUXDIR, "", sBtlAuxDir)
|
||||
EgtSetBtlAuxDir(sBtlAuxDir)
|
||||
' imposto dir di default per libreria Lua e lancio libreria di base
|
||||
' Imposto direttorio libreria per export ThreeJs
|
||||
Dim sThreeJSLibDir As String = String.Empty
|
||||
GetPrivateProfileString(S_EXPORT, K_THREEJSLIBDIR, "", sThreeJSLibDir)
|
||||
EgtSetThreeJSLibDir(sThreeJSLibDir)
|
||||
' Imposto dir di default per libreria Lua e lancio libreria di base
|
||||
Dim sLuaLibsDir As String = String.Empty
|
||||
GetPrivateProfileString(S_LUA, K_LIBSDIR, "", sLuaLibsDir)
|
||||
#If PLATFORM = "x64" Then
|
||||
#If PLATFORM = "x64" Then
|
||||
GetPrivateProfileString(S_LUA, K_LIBSDIR64, sLuaLibsDir, sLuaLibsDir)
|
||||
#End If
|
||||
#End If
|
||||
EgtSetLuaLibs(sLuaLibsDir)
|
||||
Dim sLuaBaseLib As String = String.Empty
|
||||
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib)
|
||||
EgtLuaRequire(sLuaBaseLib)
|
||||
' imposto direttorio temporaneo a EgtInterface
|
||||
' Imposto direttorio temporaneo a EgtInterface
|
||||
EgtSetTempDir(m_sTempDir)
|
||||
' imposto IniFile a EgtInterface
|
||||
' Imposto IniFile a EgtInterface
|
||||
EgtSetIniFile(m_sIniFile)
|
||||
' verifico se avviare programma in modalità CAD-ONLY
|
||||
' Verifico se avviare programma in modalità CAD-ONLY
|
||||
IniFile.m_ProjectMode = If(GetPrivateProfileInt(S_GENERAL, K_ONLYDRAW, 0) = 0, ProjectModeOpt.DRAW, ProjectModeOpt.ONLYDRAW)
|
||||
' Impostazioni MruLists
|
||||
m_MruFiles.Init(S_MRUFILES, 8)
|
||||
@@ -448,7 +492,7 @@ Public Class MainWindowVM
|
||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0)
|
||||
IniFile.m_nInstance = 1
|
||||
Dim nMask As Integer = 1
|
||||
While (nTmp And nMask) <> 0 And IniFile.m_nInstance < MAX_INST
|
||||
While (nTmp And nMask) <> 0 And IniFile.m_nInstance <= MAX_INST
|
||||
IniFile.m_nInstance += 1
|
||||
nMask *= 2
|
||||
End While
|
||||
@@ -536,7 +580,7 @@ Public Class MainWindowVM
|
||||
WritePrivateProfileString(S_GRID, K_SNAPSTEPINCH, DoubleToString(IniFile.dSnapStepInch, 4))
|
||||
End If
|
||||
' gestisco la chiusura di DrawPanelVM
|
||||
If Not IniFile.m_bFailedRun Then
|
||||
If Not IniFile.m_bFailedRun AndAlso Not IsNothing(Map.refDrawPanelVM) Then
|
||||
WritePrivateProfileString(S_GENERAL, K_DRAW2D, If(Map.refDrawPanelVM.Draw2DIsExpanded, "1", "0"))
|
||||
WritePrivateProfileString(S_GENERAL, K_DRAW3D, If(Map.refDrawPanelVM.Draw3DIsExpanded, "1", "0"))
|
||||
WritePrivateProfileString(S_GENERAL, K_MODIFY, If(Map.refDrawPanelVM.ModifyIsExpanded, "1", "0"))
|
||||
@@ -548,7 +592,7 @@ Public Class MainWindowVM
|
||||
|
||||
#Region "Events"
|
||||
|
||||
Private Sub MainWindow_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs)
|
||||
Private Sub MainWindow_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
|
||||
' Con ESC esco dall'azione corrente
|
||||
If e.Key = Key.Escape Then
|
||||
' reset Azione corrente
|
||||
@@ -574,4 +618,53 @@ Public Class MainWindowVM
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "MEF Plugin"
|
||||
|
||||
Private m_Loader As MEFLoader = New MEFLoader()
|
||||
|
||||
Private Function GetPathByName(ByVal name As String) As String
|
||||
Dim PluginNameSplit() As String = name.Split("."c)
|
||||
Dim res = Map.refMainWindowVM.m_sDataRoot & "\Plugin\" & PluginNameSplit(0)
|
||||
Return res
|
||||
End Function
|
||||
|
||||
Friend Function GetControlByName(Of T)(Element As PluginControl) As Panel
|
||||
Dim PlugInControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(Element.Name), Element.Name).FirstOrDefault()
|
||||
Dim PluginPanel As Panel = Nothing
|
||||
Select Case PlugInControl.GetType().BaseType.FullName
|
||||
Case GetType(Panel).FullName, GetType(Grid).FullName
|
||||
PluginPanel = TryCast(PlugInControl, Panel)
|
||||
Case GetType(Forms.UserControl).FullName
|
||||
Dim PluginUserControl As Forms.UserControl = TryCast(PlugInControl, Forms.UserControl)
|
||||
Dim PluginControlInterface As IPluginControl = TryCast(PlugInControl, IPluginControl)
|
||||
If Not IsNothing(PluginControlInterface) Then
|
||||
AddHandler PluginControlInterface.UpdateProjectName, AddressOf UpdateProjectName
|
||||
AddHandler PluginControlInterface.UpdateUI, AddressOf UpdateUI
|
||||
End If
|
||||
PluginPanel = New WinFormPluginControlV(New WinFormPluginControlVM(PluginUserControl, Element.ViewPanelState))
|
||||
End Select
|
||||
Return PluginPanel
|
||||
End Function
|
||||
|
||||
Friend Function GetConfigData(Of T)(ByVal name As String) As IPluginConfigData
|
||||
Dim PlugInControl As Object = m_Loader.LoadByTag(Of T)(GetPathByName(name), name).FirstOrDefault()
|
||||
Dim PluginConfigData As IPluginConfigData = Nothing
|
||||
Dim v = PlugInControl.GetType()
|
||||
If PlugInControl.GetType().Name = PLUGIN_CONFIGURATION_DATA Then
|
||||
Return TryCast(PlugInControl, IPluginConfigData)
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub UpdateProjectName(ProjectName As String)
|
||||
Map.refMainWindowVM.Title = ProjectName & " - EgtCAM5"
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateUI()
|
||||
Map.refProjectVM.UpdateProjectUI(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' MEF Plugin
|
||||
|
||||
End Class
|
||||
@@ -28,9 +28,9 @@ Imports System.Windows
|
||||
<Assembly: AssemblyDescription("EgtCAM5 32 bit")>
|
||||
#End If
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtCAM5")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2021 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtCAM5")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -70,6 +70,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.10.6")>
|
||||
<Assembly: AssemblyFileVersion("2.3.10.6")>
|
||||
<Assembly: AssemblyVersion("2.5.11.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.11.2")>
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ Public Class LayerTreeViewItem
|
||||
Return m_bOnOff
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If Map.refProjectVM.GetController().GetStep() <> 0 Then Return
|
||||
If m_bOnOff <> value Then
|
||||
m_bOnOff = value
|
||||
' se abilitato, eseguo operazione
|
||||
@@ -82,20 +83,24 @@ Public Class LayerTreeViewItem
|
||||
End If
|
||||
Dim bOnOffGroup As Boolean = ((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift) AndAlso Items.Count > 0
|
||||
If bOnOffGroup Then
|
||||
EgtEnableCommandLogger()
|
||||
' abilito/disabilito tutti i nodi del livello sotto di esso (e non oltre)
|
||||
For Each Node In Items
|
||||
Node.m_bOnOff = value
|
||||
' se abilitato, eseguo operazione
|
||||
If m_SendCmd Then
|
||||
Map.refProjectVM.SetLastInteger(Node.Id)
|
||||
If value Then
|
||||
Map.refProjectVM.ExecuteCommand(Controller.CMD.SHOW)
|
||||
Else
|
||||
Map.refProjectVM.ExecuteCommand(Controller.CMD.HIDE)
|
||||
Dim nStat As Integer
|
||||
EgtGetStatus(Node.Id, nStat)
|
||||
If value AndAlso nStat <> GDB_ST.ON_ Then
|
||||
EgtSetStatus(Node.Id, GDB_ST.ON_)
|
||||
ElseIf nStat <> GDB_ST.OFF Then
|
||||
EgtSetStatus(Node.Id, GDB_ST.OFF)
|
||||
End If
|
||||
End If
|
||||
Node.NotifyPropertyChanged(NameOf(OnOff))
|
||||
Next
|
||||
EgtDisableCommandLogger()
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
|
||||
@@ -107,24 +107,6 @@ Public Class EstimationsExpanderVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
Private Function UpdateAllMachinings() As Boolean
|
||||
' Eseguo ricalcolo
|
||||
Dim bModified As Boolean = EgtGetModified()
|
||||
Dim sErr As String = String.Empty
|
||||
Dim bOk As Boolean = EgtApplyAllMachinings(False, False, sErr)
|
||||
' In caso di errori, li segnalo
|
||||
If Not bOk Then
|
||||
If Not String.IsNullOrEmpty(sErr) Then
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End If
|
||||
If Not bModified Then EgtResetModified()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetEstimationFileName(bAskSave As Boolean, ByRef sEstFile As String, ByRef sInfo As String) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' Recupero e verifico la path del progetto corrente
|
||||
@@ -177,7 +159,7 @@ Public Class EstimationsExpanderVM
|
||||
' Recupero la fase corrente
|
||||
Dim nPhase As Integer = EgtGetCurrPhase()
|
||||
' Aggiorno le lavorazioni
|
||||
If Not UpdateAllMachinings() Then
|
||||
If Not Map.refSimulationExpanderVM.UpdateAllMachinings() Then
|
||||
EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
|
||||
Return False
|
||||
End If
|
||||
|
||||
-2
@@ -15,8 +15,6 @@
|
||||
<Expander Header="RawPart" IsExpanded="{Binding RawPartIsExpanded}"
|
||||
Style="{StaticResource ExpanderStyle}" Margin="0,1,0,1">
|
||||
<StackPanel>
|
||||
<!--<CheckBox Content="Move with Fixture" IsChecked="{Binding MoveWithFixture, Mode=TwoWay}"/>-->
|
||||
<!--ContentPresenter that contains the RawPart options -->
|
||||
<ContentPresenter Name="RawPartOptions" Content="{Binding RawPartOptions ,Mode=OneWay}"/>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
|
||||
+2
-39
@@ -59,7 +59,7 @@ Public Class DispositionParameterExpanderVM
|
||||
PartIsExpanded = False
|
||||
FixtureIsExpanded = False
|
||||
' verifico se è attiva l'opzione muovi con ventose
|
||||
If m_MoveWithFixture Then
|
||||
If Map.refRawPartOptionVM.MoveWithFixture() Then
|
||||
' Abilito la selezione dei RawPart con ventose
|
||||
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
|
||||
Else
|
||||
@@ -168,42 +168,6 @@ Public Class DispositionParameterExpanderVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_MoveWithFixture As Boolean = False
|
||||
Public Property MoveWithFixture As Boolean
|
||||
Get
|
||||
Return m_MoveWithFixture
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_MoveWithFixture Then
|
||||
If value Then
|
||||
' Abilito la selezione di RawPart con autoselezione delle sue ventose
|
||||
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPARTWITHFIXTURE
|
||||
' Seleziono le ventose associate ad uno dei grezzi selezionati
|
||||
' ciclo sui grezzi selezionati
|
||||
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
|
||||
While nSelRawPartId <> GDB_ID.NULL
|
||||
' seleziono i sottopezzi del grezzo
|
||||
DispositionUtility.SelectRawPartFixture(nSelRawPartId)
|
||||
nSelRawPartId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Else
|
||||
' Abilito la selezione di RawPart
|
||||
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.RAWPART
|
||||
' ciclo sui grezzi selezionati
|
||||
Dim nSelRawPartId As Integer = EgtGetFirstSelectedObj()
|
||||
While nSelRawPartId <> GDB_ID.NULL
|
||||
' deseleziono i sottopezzi del grezzo
|
||||
DispositionUtility.DeselectRawPartFixture(nSelRawPartId)
|
||||
nSelRawPartId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
End If
|
||||
EgtDraw()
|
||||
m_MoveWithFixture = value
|
||||
OnPropertyChanged("MoveWithFixture")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_InputValue As String
|
||||
Public Property InputValue As String
|
||||
Get
|
||||
@@ -315,8 +279,7 @@ Public Class DispositionParameterExpanderVM
|
||||
' Abilito la selezione delle Fixture
|
||||
Map.refProjectVM.SceneSelType = SceneSelTypeOpt.FIXTURE
|
||||
End Select
|
||||
m_MoveWithFixture = False
|
||||
OnPropertyChanged("MoveWithFixture")
|
||||
Map.refRawPartOptionVM.SetMoveWithFixture(False)
|
||||
Map.refFixtureParametersVM.UpdateFixtureTypeList()
|
||||
End Sub
|
||||
|
||||
|
||||
+8
-1
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class RawPartOptionVM
|
||||
Inherits ViewModelBase
|
||||
@@ -38,6 +39,11 @@ Public Class RawPartOptionVM
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
friend Sub SetMoveWithFixture(value As Boolean)
|
||||
m_MoveWithFixture=value
|
||||
OnPropertyChanged(NameOf(MoveWithFixture))
|
||||
End Sub
|
||||
|
||||
|
||||
Private m_bRawPartParamVisibility As Visibility
|
||||
Public ReadOnly Property RawPartParamVisibility As Visibility
|
||||
@@ -86,6 +92,7 @@ Public Class RawPartOptionVM
|
||||
Private m_cmdRemoveRawPart As ICommand
|
||||
|
||||
Sub New()
|
||||
Map.SetRefRawPartOptionVM(Me)
|
||||
If EgtGetFirstSelectedObj() <> GDB_ID.NULL Then
|
||||
m_bRawPartParamVisibility = Visibility.Visible
|
||||
Else
|
||||
|
||||
+15
-2
@@ -168,6 +168,18 @@ Public Class MachiningParameterExpanderVM
|
||||
StoneSawFinishParamExpanderV.DataContext = m_CurrOperation
|
||||
Return StoneSawFinishParamExpanderV
|
||||
Case MCH_OY.POCKETING
|
||||
If MatType = MaterialType.STONE Or MatType = MaterialType.STONE5 Then
|
||||
' se macchina di tipo STONE ricavo il tipo di utensile
|
||||
Dim sMachiningToolName = String.Empty
|
||||
EgtMdbSetCurrMachining(sName)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sMachiningToolName)
|
||||
EgtTdbSetCurrTool(sMachiningToolName)
|
||||
Dim dValue As Double = 0
|
||||
Dim nToolType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nToolType)
|
||||
' se utensile di tipo POLISHING rendo visibili i campi sugli epicicli
|
||||
If nToolType = MCH_TY.MILL_POLISHING Then m_CurrOperation.Epicycles_Visibility = Visibility.Visible
|
||||
End If
|
||||
PocketParamExpanderV.DataContext = m_CurrOperation
|
||||
Return PocketParamExpanderV
|
||||
Case MCH_OY.MORTISING
|
||||
@@ -402,9 +414,10 @@ Public Class MachiningParameterExpanderVM
|
||||
Dim sInfo As String = String.Empty
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
If Not String.IsNullOrEmpty(sInfo) Then sErr &= " " & sInfo
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(MSG_SIMULATION + 6), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Errore nel calcolo della lavorazione!
|
||||
MessageBox.Show(EgtMsg(5345), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
Else
|
||||
If EgtGetMachMgrWarningId(0) <> 0 Then
|
||||
|
||||
+14
@@ -146,6 +146,20 @@
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"/>
|
||||
<EgtWPFLib5:StringParamV
|
||||
ParamTxBl="{Binding EpicyclesRadTxBl}"
|
||||
ParamTxBx="{Binding Path=EpicyclesRad,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"
|
||||
Visibility="{Binding Epicycles_Visibility}"/>
|
||||
<EgtWPFLib5:StringParamV
|
||||
ParamTxBl="{Binding EpicyclesDistTxBl}"
|
||||
ParamTxBx="{Binding Path=EpicyclesDist,
|
||||
UpdateSourceTrigger=PropertyChanged,
|
||||
ValidatesOnDataErrors=True}"
|
||||
Style="{DynamicResource StringParamV_Margin}"
|
||||
Visibility="{Binding Epicycles_Visibility}"/>
|
||||
<EgtWPFLib5:StringParamV
|
||||
ParamTxBl="{Binding SideAngleTxBl}"
|
||||
ParamTxBx="{Binding Path=SideAngle,
|
||||
|
||||
+2
@@ -63,6 +63,7 @@ Public Class OperationListBoxItem
|
||||
Dim bEnabModif As Boolean = EgtGetEnableModified()
|
||||
EgtDisableModified()
|
||||
EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
|
||||
EgtResetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_DBL))
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
|
||||
SelData.ClearIdSub()
|
||||
If bEnabModif Then EgtEnableModified()
|
||||
@@ -96,6 +97,7 @@ Public Class OperationListBoxItem
|
||||
Dim bEnabModif As Boolean = EgtGetEnableModified()
|
||||
EgtDisableModified()
|
||||
EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_CL))
|
||||
EgtSetMark(EgtGetFirstNameInGroup(Id, MCH_MGR_DBL))
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(Id, MCH_MGR_AUXVIEW), GDB_ST.ON_)
|
||||
If bEnabModif Then EgtEnableModified()
|
||||
' Seleziono la geometria della lavorazione
|
||||
|
||||
+3
@@ -109,6 +109,7 @@ Public Class OperationParametersExpanderVM
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(selOperation) Then Return False
|
||||
|
||||
If IsValidDispositionType(selOperation.m_Type) Then
|
||||
ParametersExpanderName = selOperation.Name
|
||||
@@ -136,6 +137,8 @@ Public Class OperationParametersExpanderVM
|
||||
End While
|
||||
EgtDraw()
|
||||
ElseIf IsValidMachiningType(selOperation.m_Type) Then
|
||||
' Imposto la fase di lavorazione corrente
|
||||
EgtSetCurrPhase(EgtGetOperationPhase(selOperation.m_Id))
|
||||
' Leggo il tipo di operazione per impostare il tipo di selezione
|
||||
EgtSetCurrMachining(selOperation.m_Id)
|
||||
Dim sOpMach As String = String.Empty
|
||||
|
||||
+12
-8
@@ -488,6 +488,7 @@ Public Class OperationsListExpanderVM
|
||||
OnPropertyChanged( "MoveDown_IsEnabled")
|
||||
Map.refProjectVM.EmitTitle()
|
||||
Else
|
||||
Dim nCurrPhase As Integer = EgtGetOperationPhase(LastSelectedId)
|
||||
For index As Integer = 0 To indexes.Count - 1
|
||||
Dim nOpeId As Integer = OperationList( indexes( index) - 1).Id
|
||||
If EgtGetOperationType( nOpeId) <> MCH_OY.DISP Then
|
||||
@@ -500,6 +501,8 @@ Public Class OperationsListExpanderVM
|
||||
EgtSetCurrMachining( PreviousId)
|
||||
EgtApplyMachining( False)
|
||||
End If
|
||||
Dim nNewPhase As Integer = EgtGetOperationPhase(LastSelectedId)
|
||||
If nNewPhase <> nCurrPhase Then EgtSetCurrPhase( nNewPhase)
|
||||
EgtDraw()
|
||||
OnPropertyChanged( NameOf(MoveUp_IsEnabled))
|
||||
OnPropertyChanged( NameOf(MoveDown_IsEnabled))
|
||||
@@ -720,6 +723,7 @@ Public Class OperationsListExpanderVM
|
||||
selOperation.m_Type = MCH_OY.DISP Then Return
|
||||
' Tolgo Mark da lavorazione originale
|
||||
EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_CL))
|
||||
EgtResetMark(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_DBL))
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(selOperation.Id, MCH_MGR_AUXVIEW), GDB_ST.OFF)
|
||||
SelData.ClearIdSub()
|
||||
' Eseguo la copia
|
||||
@@ -967,8 +971,8 @@ Public Class OperationsListExpanderVM
|
||||
Map.refProjectVM.SceneSelMode = SceneSelModeOpt.ALL
|
||||
OnPropertyChanged("ListIsExpanded")
|
||||
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(True, True, True)
|
||||
Map.refDoorPanelVM.MTableIsEnabled(True)
|
||||
Map.refSpecialPanelVM.SpecialPanelIsEnabled(True)
|
||||
If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(True)
|
||||
If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(True)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -1184,15 +1188,15 @@ Public Class OperationsListExpanderVM
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Friend Function IsInOperationList(nId As Integer) As Boolean
|
||||
Dim nOpId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nId)))
|
||||
Friend Function GetOperationId(nId As Integer) As Integer
|
||||
Dim nOpeId As Integer = EgtGetParent(EgtGetParent(EgtGetParent(nId)))
|
||||
For Index = 0 To OperationList.Count - 1
|
||||
Dim nOpType As Integer = EgtGetOperationType(nOpId)
|
||||
If OperationList(Index).Id = nOpId And nOpType <> MCH_OY.NONE And nOpType <> MCH_OY.DISP Then
|
||||
Return True
|
||||
Dim nOpeType As Integer = EgtGetOperationType(nOpeId)
|
||||
If OperationList(Index).Id = nOpeId And nOpeType <> MCH_OY.NONE And nOpeType <> MCH_OY.DISP Then
|
||||
Return nOpeId
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
Return GDB_ID.NULL
|
||||
End Function
|
||||
|
||||
Friend Sub DeselOperationFromId()
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MachineAxis
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Private m_IsReadOnlyAxesValue As Boolean
|
||||
Public Property IsReadOnlyAxesValue As Boolean
|
||||
Get
|
||||
Return m_IsReadOnlyAxesValue
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_IsReadOnlyAxesValue Then
|
||||
m_IsReadOnlyAxesValue = value
|
||||
NotifyPropertyChanged("IsReadOnlyAxesValue")
|
||||
NotifyPropertyChanged("IsEnabledAxesValue")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsEnabledAxesValue As Boolean
|
||||
Get
|
||||
Return Not m_IsReadOnlyAxesValue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdManualAxisModify As ICommand
|
||||
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Name = value
|
||||
UpdateInvert()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Token As String
|
||||
Public Property Token As String
|
||||
Get
|
||||
Return m_Token
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value <> m_Token Then
|
||||
m_Token = value
|
||||
NotifyPropertyChanged("Token")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bLinear As Boolean = True
|
||||
Public WriteOnly Property Linear As Boolean
|
||||
Set(value As Boolean)
|
||||
m_bLinear = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bInvert As Boolean = False
|
||||
Private Function UpdateInvert() As Boolean
|
||||
Return EgtGetAxisInvert(m_Name, m_bInvert)
|
||||
End Function
|
||||
|
||||
Private m_Value As String
|
||||
Public Property Value As String
|
||||
Get
|
||||
Return m_Value
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Value = value
|
||||
NotifyPropertyChanged("Value")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
IsReadOnlyAxesValue = True
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "ManualAxisModifyCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that create a new tool.
|
||||
''' </summary>
|
||||
Public ReadOnly Property ManualAxisModifyCommand As ICommand
|
||||
Get
|
||||
If m_cmdManualAxisModify Is Nothing Then
|
||||
m_cmdManualAxisModify = New Command(AddressOf ManualAxisModify)
|
||||
End If
|
||||
Return m_cmdManualAxisModify
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Creata the new tool. This method is invoked by the NewCommand.
|
||||
''' </summary>
|
||||
Public Sub ManualAxisModify(ByVal param As Object)
|
||||
Dim dVal As Double
|
||||
If m_bLinear Then
|
||||
StringToLen(m_Value, dVal)
|
||||
Else
|
||||
StringToDouble(m_Value, dVal)
|
||||
End If
|
||||
If m_bInvert Then dVal = -dVal
|
||||
EgtSetAxisPos(m_Name, dVal)
|
||||
EgtGetAxisPos(m_Name, dVal)
|
||||
If m_bInvert Then dVal = -dVal
|
||||
If m_bLinear Then
|
||||
Value = LenToString(dVal, -3)
|
||||
Else
|
||||
Value = DoubleToString(dVal, -3)
|
||||
End If
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' ManualAxisModifyCommand
|
||||
|
||||
#End Region
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -87,14 +87,12 @@
|
||||
<TextBlock Text="{Binding Token}" FontSize="15"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
TextWrapping="Wrap" TextAlignment="Center"/>
|
||||
<TextBox Text="{Binding Value, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1"
|
||||
IsReadOnly="{Binding IsReadOnlyAxesValue}"
|
||||
IsEnabled="{Binding IsEnabledAxesValue}"
|
||||
TextAlignment="Right">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding ManualAxisModifyCommand}"/>
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Value, UpdateSourceTrigger=Explicit}" Grid.Column="1"
|
||||
ExplicitUpdateSource="EnterKeyPress"
|
||||
IsReadOnly="{Binding IsReadOnlyAxesValue}"
|
||||
IsEnabled="{Binding IsEnabledAxesValue}"
|
||||
TextAlignment="Right">
|
||||
</EgtWPFLib5:EgtTextBox>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -176,7 +176,9 @@ Public Class SimulationExpanderVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function UpdateAllMachinings() As Boolean
|
||||
Friend Function UpdateAllMachinings() As Boolean
|
||||
' Se disabilitato, esco
|
||||
If GetPrivateProfileInt( S_MACH, K_AUTOUPDATEALLMACHININGS, 1) = 0 Then Return True
|
||||
' Eseguo ricalcolo
|
||||
Dim bModified As Boolean = EgtGetModified()
|
||||
Dim sErr As String = String.Empty
|
||||
@@ -198,10 +200,12 @@ Public Class SimulationExpanderVM
|
||||
Dim nPhase As Integer = EgtGetCurrPhase()
|
||||
' Aggiorno le lavorazioni
|
||||
If Not UpdateAllMachinings() Then EgtSetCurrPhase(If(nPhase = 0, 1, nPhase), True)
|
||||
' Inizio simulazione
|
||||
Dim bOk As Boolean = EgtSimInit() AndAlso EgtSimStart()
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Inizio simulazione
|
||||
If Not EgtSimInit() OrElse Not EgtSimStart() Then
|
||||
' Messaggio in caso di errore
|
||||
If Not bOk Then
|
||||
If EgtGetLastMachMgrErrorId() <> 0 Then
|
||||
Dim sErr As String = EgtGetLastMachMgrErrorString()
|
||||
MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
|
||||
@@ -385,7 +389,11 @@ Public Class SimulationExpanderVM
|
||||
End If
|
||||
End If
|
||||
sCncFile = ""
|
||||
sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
|
||||
#If PLATFORM = "x64" Then
|
||||
sInfo = "EgtCAM5 64bit ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
|
||||
#Else
|
||||
sInfo = "EgtCAM5 ver." & Map.refMainWindowVM.Version() & " - " & sCurrFilePath
|
||||
#End If
|
||||
If EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_NCNAME, sCncFile) AndAlso Not String.IsNullOrWhiteSpace(sCncFile) Then
|
||||
sCncFile = Path.GetDirectoryName(sCurrFilePath) & "\" & sCncFile
|
||||
Else
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<UserControl x:Class="OptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
TitleBarOrientation="Vertical"
|
||||
Visibility="{Binding Panel_Visibility}">
|
||||
|
||||
<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||
<StackPanel Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
|
||||
|
||||
<!--ContentPresenter that contains the ModePanel-->
|
||||
<ContentPresenter Content="{Binding ModePanel}"/>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
Public Class OptionPanelV
|
||||
|
||||
Private Sub Me_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
||||
Dim x = ciao.MaxHeight
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,20 +1,12 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class OptionPanelVM
|
||||
Inherits ViewModelBase
|
||||
Inherits BasePanelVM
|
||||
|
||||
Private m_DrawIsChecked As Boolean = True
|
||||
|
||||
Private m_MachiningIsChecked As Boolean = False
|
||||
|
||||
Sub New()
|
||||
Map.SetRefOptionPanelVM(Me)
|
||||
|
||||
DrawOptPanelV = New DrawOptionPanelV
|
||||
MachOptPanelV = New MachiningOptionPanelV
|
||||
|
||||
End Sub
|
||||
|
||||
Dim DrawOptPanelV As DrawOptionPanelV
|
||||
Dim MachOptPanelV As MachiningOptionPanelV
|
||||
|
||||
@@ -23,31 +15,43 @@ Public Class OptionPanelVM
|
||||
|
||||
Public ReadOnly Property ModePanel As ContentControl
|
||||
Get
|
||||
|
||||
DrawOptPanelV.DataContext = Nothing
|
||||
MachOptPanelV.DataContext = Nothing
|
||||
|
||||
If Not IsNothing(Map.refDrawOptionPanelVM) And Not IsNothing(Map.refMachiningOptionPanelVM) Then
|
||||
|
||||
If m_DrawIsChecked And Not m_MachiningIsChecked Then
|
||||
Map.refMachiningOptionPanelVM.ExitMachiningOptionPanel()
|
||||
Map.refDrawOptionPanelVM.InitDrawOptionPanel()
|
||||
DrawOptPanelV.DataContext = Map.refDrawOptionPanelVM
|
||||
If DrawOptPanelV.DataContext IsNot Map.refDrawOptionPanelVM Then
|
||||
DrawOptPanelV.DataContext = Map.refDrawOptionPanelVM
|
||||
End If
|
||||
Return DrawOptPanelV
|
||||
End If
|
||||
If m_MachiningIsChecked And Not m_DrawIsChecked Then
|
||||
Map.refDrawOptionPanelVM.ExitDrawOptionPanel()
|
||||
Map.refMachiningOptionPanelVM.InitMachiningOptionPanel()
|
||||
MachOptPanelV.DataContext = Map.refMachiningOptionPanelVM
|
||||
If MachOptPanelV.DataContext IsNot Map.refMachiningOptionPanelVM Then
|
||||
MachOptPanelV.DataContext = Map.refMachiningOptionPanelVM
|
||||
End If
|
||||
Return MachOptPanelV
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
DrawOptPanelV.DataContext = Nothing
|
||||
MachOptPanelV.DataContext = Nothing
|
||||
|
||||
Return Nothing
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
Map.SetRefOptionPanelVM(Me)
|
||||
|
||||
SetPanelViewState(ViewPanelStates.ALWAYS)
|
||||
|
||||
DrawOptPanelV = New DrawOptionPanelV
|
||||
MachOptPanelV = New MachiningOptionPanelV
|
||||
|
||||
End Sub
|
||||
|
||||
Friend Sub DrawMode_IsChecked()
|
||||
m_DrawIsChecked = True
|
||||
m_MachiningIsChecked = False
|
||||
@@ -56,14 +60,14 @@ Public Class OptionPanelVM
|
||||
Map.refSimulationExpanderVM.Simulation_IsExpanded = False
|
||||
Map.refEstimationsExpanderVM.Estimation_IsExpanded = False
|
||||
End If
|
||||
OnPropertyChanged("ModePanel")
|
||||
NotifyPropertyChanged("ModePanel")
|
||||
End Sub
|
||||
|
||||
Friend Sub MachiningMode_IsChecked()
|
||||
m_DrawIsChecked = False
|
||||
m_MachiningIsChecked = True
|
||||
EgtZoom(ZM.ALL, False)
|
||||
OnPropertyChanged("ModePanel")
|
||||
NotifyPropertyChanged("ModePanel")
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -59,6 +59,13 @@ Friend Module OptionModule
|
||||
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
|
||||
Friend m_bUseDispositionScript As Boolean
|
||||
|
||||
' Variabili per gli Extra
|
||||
Friend m_bSpecialOn As Boolean
|
||||
Friend m_bBeamOn As Boolean
|
||||
Friend m_bWallOn As Boolean
|
||||
Friend m_bDoorsOn As Boolean
|
||||
Friend m_bGunstockOn As Boolean
|
||||
|
||||
' inizializzazione lettura variabili ad inizio programma
|
||||
Friend Sub InitOptionModule()
|
||||
' Leggo elenco lingue disponibili da file ini
|
||||
@@ -95,9 +102,9 @@ Friend Module OptionModule
|
||||
GetPrivateProfileColor(S_GRID, K_MINLNCOLOR, GridColor)
|
||||
m_GridColor = GridColor
|
||||
' Inizializzo flag linee ingrossate
|
||||
m_bThickLine = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1
|
||||
m_bThickLine = ( GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1)
|
||||
' Inizializzo flag visualizzazione smussata delle superfici
|
||||
m_bSmoothTriMesh = GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0
|
||||
m_bSmoothTriMesh = ( GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
|
||||
' Inizio colore di default in disegno
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||
@@ -136,9 +143,15 @@ Friend Module OptionModule
|
||||
m_SelGeomSurfFinishing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
|
||||
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
|
||||
m_bNewMachiningIsLastOne = If(GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0, True, False)
|
||||
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
|
||||
' Inizializzo variabile che indica se usare script di disposizione
|
||||
m_bUseDispositionScript = If(GetPrivateProfileInt(S_OPTIONS, K_USEDISPOSITIONSCRIPT, 0) <> 0, True, False)
|
||||
m_bUseDispositionScript = (GetPrivateProfileInt(S_OPTIONS, K_USEDISPOSITIONSCRIPT, 0) <> 0)
|
||||
' Inizializzo variabili per Extra
|
||||
m_bSpecialOn = (GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0)
|
||||
m_bBeamOn = (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
|
||||
m_bWallOn = (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
|
||||
m_bDoorsOn = (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
|
||||
m_bGunstockOn = (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
BorderBrush="{StaticResource EgaltechBlue1}"
|
||||
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
||||
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
||||
MinWidth="400" MinHeight="372"
|
||||
Width="400" Height="402"
|
||||
MinWidth="400" MinHeight="382"
|
||||
Width="400" Height="412"
|
||||
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
|
||||
|
||||
<EgtWPFLib5:EgtCustomWindow.Resources>
|
||||
@@ -75,6 +75,9 @@
|
||||
SelectedItem="{Binding SelectedTextFont}" Height="25"
|
||||
Margin="10,5,0,0"/>
|
||||
</UniformGrid>
|
||||
<Grid Margin="5,5,5,5">
|
||||
<Button Content="{Binding UpdateLicenceMsg}" Command="{Binding UpdateLicence_Command}" Height="26" Margin="100,1"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding CADMsg}">
|
||||
@@ -297,6 +300,52 @@
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="{Binding ExtraMsg}">
|
||||
<StackPanel>
|
||||
<Grid Margin="5,20,5,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding SpecialMsg}"
|
||||
Grid.Row="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding SpecialOn}"
|
||||
Grid.Row="0" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding BeamMsg}"
|
||||
Grid.Row="1" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding BeamOn}" IsEnabled="{Binding BeamEnabled}"
|
||||
Grid.Row="1" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding BeamActive}"
|
||||
Command="{Binding UpdateBeam_Command}"
|
||||
Grid.Row="1" Grid.Column="2" Height="26"/>
|
||||
<TextBlock Text="{Binding WallMsg}"
|
||||
Grid.Row="2" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding WallOn}" IsEnabled="{Binding WallEnabled}"
|
||||
Grid.Row="2" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<Button Content="{Binding UpdateMsg}" IsEnabled="{Binding WallActive}"
|
||||
Command="{Binding UpdateWall_Command}"
|
||||
Grid.Row="2" Grid.Column="2" Height="26"/>
|
||||
<TextBlock Text="{Binding DoorsMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="3" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding DoorsOn}" IsEnabled="{Binding DoorsEnabled}"
|
||||
Grid.Row="3" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding GunstockMsg}" VerticalAlignment="Center"
|
||||
Grid.Row="4" Grid.Column="0" Margin="0,5,0,5"/>
|
||||
<CheckBox IsChecked="{Binding GunstockOn}" IsEnabled="{Binding GunstockEnabled}"
|
||||
Grid.Row="4" Grid.Column="1" Margin="4,5,0,5" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
|
||||
</TabControl>
|
||||
|
||||
</EgtWPFLib5:EgtCustomWindow>
|
||||
|
||||
+399
-24
@@ -528,14 +528,98 @@ Public Class OptionWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SpecialOn As Boolean
|
||||
Get
|
||||
Return OptionModule.m_bSpecialOn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bSpecialOn = value
|
||||
WritePrivateProfileString(S_SPECIAL, K_SPECIALENABLE, If( value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property BeamEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property BeamActive As Boolean
|
||||
Get
|
||||
Return IniFile.IsActiveBeam()
|
||||
End Get
|
||||
End Property
|
||||
Public Property BeamOn As Boolean
|
||||
Get
|
||||
Return BeamEnabled AndAlso OptionModule.m_bBeamOn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bBeamOn = value
|
||||
WritePrivateProfileString(S_BEAM, K_BEAMENABLE, If( value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property WallEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property WallActive As Boolean
|
||||
Get
|
||||
Return IniFile.IsActiveWall()
|
||||
End Get
|
||||
End Property
|
||||
Public Property WallOn As Boolean
|
||||
Get
|
||||
Return WallEnabled AndAlso OptionModule.m_bWallOn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bWallOn = value
|
||||
WritePrivateProfileString(S_WALL, K_WALLENABLE, If( value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DoorsEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.DOORS) <> 0
|
||||
End Get
|
||||
End Property
|
||||
Public Property DoorsOn As Boolean
|
||||
Get
|
||||
Return DoorsEnabled AndAlso OptionModule.m_bDoorsOn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bDoorsOn = value
|
||||
WritePrivateProfileString(S_DOORS, K_DDFENABLE, If( value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property GunstockEnabled As Boolean
|
||||
Get
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0
|
||||
End Get
|
||||
End Property
|
||||
Public Property GunstockOn As Boolean
|
||||
Get
|
||||
Return OptionModule.m_bGunstockOn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
OptionModule.m_bGunstockOn = value
|
||||
WritePrivateProfileString(S_GUNSTOCK, K_GUNSTOCKENABLE, If( value, "1", "0"))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdCloseOptions As ICommand
|
||||
Private m_cmdTopSceneBackground As ICommand
|
||||
Private m_cmdBotSceneBackground As ICommand
|
||||
Private m_cmdGridColor As ICommand
|
||||
Private m_cmdUpdateLicenceCmd As ICommand
|
||||
Private m_cmdDefMaterialColor As ICommand
|
||||
Private m_cmdAddMachineCmd As ICommand
|
||||
Private m_cmdExportMachineCmd As ICommand
|
||||
Private m_cmdUpdateBeamCmd As ICommand
|
||||
Private m_cmdUpdateWallCmd As ICommand
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
@@ -586,6 +670,11 @@ Public Class OptionWindowVM
|
||||
Return EgtMsg( 6518) ' Superfici smussate
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property UpdateLicenceMsg As String
|
||||
Get
|
||||
Return EgtMsg( 6553) ' Aggiorna licenza
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CADMsg As String
|
||||
Get
|
||||
@@ -602,6 +691,46 @@ Public Class OptionWindowVM
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 12)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property DimensionMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 44) ' Quotatura
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ExtLineLenMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 37) ' Estensione linea
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ArrowLenMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 38) ' Dimensione freccia
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TextDistMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 39) ' Distanza messaggio
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property LenIsMMMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 40) ' Unità di misura
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property DecDigitMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 41) ' Numero dicmali
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property FontMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 42) ' Caretteri
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TextHeightMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 43) ' Dimensione testo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ImportMsg As String
|
||||
Get
|
||||
@@ -710,52 +839,45 @@ Public Class OptionWindowVM
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 27) ' Aggiungi macchina
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ExportMachineMsg As String
|
||||
Get
|
||||
Return EgtMsg(6549) ' Esporta macchina
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DimensionMsg As String
|
||||
Public ReadOnly Property ExtraMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 44) ' Quotatura
|
||||
Return "Extra"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ExtLineLenMsg As String
|
||||
Public ReadOnly Property SpecialMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 37) ' Estensione linea
|
||||
Return "Special"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ArrowLenMsg As String
|
||||
Public ReadOnly Property BeamMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 38) ' Dimensione freccia
|
||||
Return "Beam"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TextDistMsg As String
|
||||
Public ReadOnly Property WallMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 39) ' Distanza messaggio
|
||||
Return "Wall"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property LenIsMMMsg As String
|
||||
Public ReadOnly Property DoorsMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 40) ' Unità di misura
|
||||
Return "Doors"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property DecDigitMsg As String
|
||||
Public ReadOnly Property GunstockMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 41) ' Numero dicmali
|
||||
Return "Gunstock"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property FontMsg As String
|
||||
Public ReadOnly Property UpdateMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 42) ' Caretteri
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property TextHeightMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_OPTIONPAGE + 43) ' Dimensione testo
|
||||
Return EgtMsg(6554) ' Aggiorna
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -898,6 +1020,49 @@ Public Class OptionWindowVM
|
||||
|
||||
#End Region ' DefMaterialColor
|
||||
|
||||
#Region "UpdateLicence"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that update the licence.
|
||||
''' </summary>
|
||||
Public ReadOnly Property UpdateLicence_Command() As ICommand
|
||||
Get
|
||||
If m_cmdUpdateLicenceCmd Is Nothing Then
|
||||
m_cmdUpdateLicenceCmd = New RelayCommand(AddressOf UpdateLicenceCmd)
|
||||
End If
|
||||
Return m_cmdUpdateLicenceCmd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Update the licence.
|
||||
''' </summary>
|
||||
Public Sub UpdateLicenceCmd()
|
||||
' Apro dialogo per richiesta file licenza
|
||||
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.DefaultExt = ".lic",
|
||||
.Filter = "Licences (.lic)|*.lic",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
If LicDlg.ShowDialog() = True Then
|
||||
' Recupero il direttorio del file
|
||||
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
|
||||
' Se il file non è già nel direttorio di configurazione lo copio
|
||||
If Not String.Equals(Path.GetFullPath(sDir), Path.GetFullPath(IniFile.m_sConfigDir), StringComparison.OrdinalIgnoreCase) Then
|
||||
Try
|
||||
File.Copy(LicDlg.FileName, Path.Combine(IniFile.m_sConfigDir, LicDlg.SafeFileName), True)
|
||||
Catch ex As Exception
|
||||
Return
|
||||
End Try
|
||||
End If
|
||||
' Imposto il nuovo file di licenza nell'Ini
|
||||
WritePrivateProfileString(S_GENERAL, K_LICENCE, LicDlg.SafeFileName)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' AddMachine
|
||||
|
||||
#Region "AddMachine"
|
||||
|
||||
''' <summary>
|
||||
@@ -925,7 +1090,7 @@ Public Class OptionWindowVM
|
||||
}
|
||||
If MachDlg.ShowDialog() <> True Then Return
|
||||
Dim sMachZip As String = MachDlg.FileName
|
||||
Dim sMachName As String = Path.GetFileNameWithoutExtension(sMachZip)
|
||||
Dim sMachName As String = Path.GetFileNameWithoutExtension(Path.GetFileNameWithoutExtension(sMachZip))
|
||||
Dim sMachDir As String = Path.Combine(IniFile.m_sMachinesRoot, sMachName)
|
||||
' Preparo direttorio temporaneo
|
||||
Dim sTempDir As String = Path.Combine(IniFile.m_sMachinesRoot, "Temp")
|
||||
@@ -1099,11 +1264,13 @@ Public Class OptionWindowVM
|
||||
File.Delete(sZipToCreate)
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate)
|
||||
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
' aggiungo i file della Macchina
|
||||
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sCurrMachineName
|
||||
If Directory.Exists(sMachineDir) Then
|
||||
zip.AddItem(sMachineDir, sCurrMachineName)
|
||||
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
|
||||
End If
|
||||
' salvo lo zip
|
||||
zip.Save()
|
||||
@@ -1114,6 +1281,7 @@ Public Class OptionWindowVM
|
||||
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
|
||||
EgtOutLog(sKo)
|
||||
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
|
||||
return
|
||||
End Try
|
||||
'La macchina "{0}" è stata esportata con successo.
|
||||
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
|
||||
@@ -1123,6 +1291,213 @@ Public Class OptionWindowVM
|
||||
|
||||
#End Region ' ExportMachine
|
||||
|
||||
#Region "UpdateBeam"
|
||||
Public ReadOnly Property UpdateBeam_Command() As ICommand
|
||||
Get
|
||||
If m_cmdUpdateBeamCmd Is Nothing Then
|
||||
m_cmdUpdateBeamCmd = New RelayCommand(AddressOf UpdateBeamCmd)
|
||||
End If
|
||||
Return m_cmdUpdateBeamCmd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub UpdateBeamCmd()
|
||||
' Recupero la versione del programma in esecuzione
|
||||
Dim sExeVer As String = IniFile.GetProgramVersion()
|
||||
' Verifico presenza di una precedente installazione del Beam
|
||||
Dim sBeamVer As String = ""
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sBeamVer)
|
||||
If String.IsNullOrEmpty( sBeamVer) Then
|
||||
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
|
||||
Dim sOut As String = String.Format(EgtMsg(6555), "Beam")
|
||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Esco
|
||||
Return
|
||||
End If
|
||||
' Apro dialogo per richiesta file zip del Beam
|
||||
Dim BeamDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.DefaultExt = ".zip",
|
||||
.Filter = "Beam (.zip)|*.zip",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
If BeamDlg.ShowDialog() <> True Then Return
|
||||
Dim sBeamZip As String = BeamDlg.FileName
|
||||
' Preparo direttorio temporaneo
|
||||
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Beam")
|
||||
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
End If
|
||||
My.Computer.FileSystem.CreateDirectory( sTempDir)
|
||||
' Unzip nel direttorio temporaneo
|
||||
Using zip As New Ionic.Zip.ZipFile(sBeamZip)
|
||||
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
||||
End Using
|
||||
' Recupero i dati del nuovo Beam
|
||||
Dim sNewName = ""
|
||||
Dim sNewVer = ""
|
||||
Dim sNewMinExe = ""
|
||||
IniFile.GetSpecialLuaData( sTempDir, sNewName, sNewVer, sNewMinExe)
|
||||
' Verifico che sia veramente il Beam
|
||||
If String.Compare(sNewName, "Beam") <> 0 Then
|
||||
' Il file zip non contiene il modulo "{0}". - Avviso
|
||||
Dim sOut As String = String.Format(EgtMsg(6556), "Beam")
|
||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
End If
|
||||
' Verifico la versione minima del programma
|
||||
If String.Compare(sExeVer, sNewMinExe) < 0 Then
|
||||
' Il nuovo modulo "{0}" richiede un programma con versione minima {1}. - Avviso
|
||||
Dim sOut As String = String.Format(EgtMsg(6557), "Beam", sNewMinExe)
|
||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
End If
|
||||
' Verifico la versione del Beam e se più vecchia chiedo cosa fare
|
||||
If String.Compare(sNewVer, sBeamVer) < 0 Then
|
||||
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
|
||||
Dim sOut As String = String.Format(EgtMsg(6558), "Beam")
|
||||
if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' Faccio una copia di backup del Beam corrente
|
||||
Dim sBackupDir As String = IniFile.m_sBeamDirPath & ".old"
|
||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
|
||||
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
End If
|
||||
Try
|
||||
My.Computer.FileSystem.MoveDirectory( IniFile.m_sBeamDirPath, sBackupDir, True)
|
||||
Catch ex As Exception
|
||||
' Ripristino lo stato originale ed esco
|
||||
My.Computer.FileSystem.MoveDirectory( sBackupDir, IniFile.m_sBeamDirPath, True)
|
||||
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
|
||||
Dim sOut As String = String.Format(EgtMsg(6559), "Beam")
|
||||
EgtOutLog( sOut)
|
||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
End Try
|
||||
' Installo il Beam
|
||||
My.Computer.FileSystem.MoveDirectory( sTempDir, IniFile.m_sBeamDirPath, True)
|
||||
' Il modulo "{0}" è stata aggiornato con successo. - Info
|
||||
Dim sOk As String = String.Format(EgtMsg(6560), "Beam")
|
||||
EgtOutLog( sOk)
|
||||
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
|
||||
End Sub
|
||||
|
||||
#End Region ' UpdateBeam
|
||||
|
||||
|
||||
#Region "UpdateWall"
|
||||
Public ReadOnly Property UpdateWall_Command() As ICommand
|
||||
Get
|
||||
If m_cmdUpdateWallCmd Is Nothing Then
|
||||
m_cmdUpdateWallCmd = New RelayCommand(AddressOf UpdateWallCmd)
|
||||
End If
|
||||
Return m_cmdUpdateWallCmd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub UpdateWallCmd()
|
||||
' Recupero la versione del programma in esecuzione
|
||||
Dim sExeVer As String = IniFile.GetProgramVersion()
|
||||
' Verifico presenza di una precedente installazione del Wall
|
||||
Dim sWallVer As String = ""
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sWallVer)
|
||||
If String.IsNullOrEmpty( sWallVer) Then
|
||||
' Il modulo "{0}" non è stato trovato, impossibile aggiornare. - Avviso
|
||||
Dim sOut As String = String.Format(EgtMsg(6555), "Wall")
|
||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Esco
|
||||
Return
|
||||
End If
|
||||
' Apro dialogo per richiesta file zip del Wall
|
||||
Dim WallDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.DefaultExt = ".zip",
|
||||
.Filter = "Wall (.zip)|*.zip",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
If WallDlg.ShowDialog() <> True Then Return
|
||||
Dim sWallZip As String = WallDlg.FileName
|
||||
' Preparo direttorio temporaneo
|
||||
Dim sTempDir As String = Path.Combine(IniFile.m_sTempDir, "Wall")
|
||||
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
End If
|
||||
My.Computer.FileSystem.CreateDirectory( sTempDir)
|
||||
' Unzip nel direttorio temporaneo
|
||||
Using zip As New Ionic.Zip.ZipFile(sWallZip)
|
||||
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
|
||||
End Using
|
||||
' Recupero i dati del nuovo Wall
|
||||
Dim sNewName = ""
|
||||
Dim sNewVer = ""
|
||||
Dim sNewMinExe = ""
|
||||
IniFile.GetSpecialLuaData( sTempDir, sNewName, sNewVer, sNewMinExe)
|
||||
' Verifico che sia veramente il Wall
|
||||
If String.Compare(sNewName, "Wall") <> 0 Then
|
||||
' Il file zip non contiene il modulo "{0}". - Avviso
|
||||
Dim sOut As String = String.Format(EgtMsg(6556), "Wall")
|
||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
End If
|
||||
' Verifico la versione minima del programma
|
||||
If String.Compare(sExeVer, sNewMinExe) < 0 Then
|
||||
' Il nuovo modulo "{0}" richiede un programma con versione minima {1}. - Avviso
|
||||
Dim sOut As String = String.Format(EgtMsg(6557), "Wall", sNewMinExe)
|
||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15002), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
End If
|
||||
' Verifico la versione del Wall e se più vecchia chiedo cosa fare
|
||||
If String.Compare(sNewVer, sWallVer) < 0 Then
|
||||
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
|
||||
Dim sOut As String = String.Format(EgtMsg(6558), "Wall")
|
||||
if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' Faccio una copia di backup del Wall corrente
|
||||
Dim sBackupDir As String = IniFile.m_sWallDirPath & ".old"
|
||||
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
|
||||
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
End If
|
||||
Try
|
||||
My.Computer.FileSystem.MoveDirectory( IniFile.m_sWallDirPath, sBackupDir, True)
|
||||
Catch ex As Exception
|
||||
' Ripristino lo stato originale ed esco
|
||||
My.Computer.FileSystem.MoveDirectory( sBackupDir, IniFile.m_sWallDirPath, True)
|
||||
' L'aggiornamento del modulo "{0}" non è riuscito. - Errore
|
||||
Dim sOut As String = String.Format(EgtMsg(6559), "Wall")
|
||||
EgtOutLog( sOut)
|
||||
MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Rimuovo il direttorio temporaneo ed esco
|
||||
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
|
||||
Return
|
||||
End Try
|
||||
' Installo il Wall
|
||||
My.Computer.FileSystem.MoveDirectory( sTempDir, IniFile.m_sWallDirPath, True)
|
||||
' Il modulo "{0}" è stata aggiornato con successo. - Info
|
||||
Dim sOk As String = String.Format(EgtMsg(6560), "Wall")
|
||||
EgtOutLog( sOk)
|
||||
MessageBox.Show(Application.Current.MainWindow, sOk, EgtMsg(15003), MessageBoxButton.OK)
|
||||
End Sub
|
||||
|
||||
#End Region ' UpdateWall
|
||||
|
||||
#Region "CloseOptionsCommand"
|
||||
|
||||
''' <summary>
|
||||
|
||||
+25
-100
@@ -1,101 +1,26 @@
|
||||
<UserControl x:Class="ProjectV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">
|
||||
<ItemsControl x:Class="ProjectV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
ItemsSource="{Binding PanelList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<DockPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style>
|
||||
<Setter Property="DockPanel.Dock" Value="{Binding}" />
|
||||
</Style>
|
||||
</ItemsControl.ItemContainerStyle>
|
||||
|
||||
<interactivity:Interaction.Triggers>
|
||||
<interactivity:EventTrigger EventName="Loaded">
|
||||
<interactivity:InvokeCommandAction Command="{Binding LoadedCommand}"/>
|
||||
</interactivity:EventTrigger>
|
||||
</interactivity:Interaction.Triggers>
|
||||
|
||||
<interactivity:Interaction.Triggers>
|
||||
<interactivity:EventTrigger EventName="Loaded">
|
||||
<interactivity:InvokeCommandAction Command="{Binding LoadedCommand}"/>
|
||||
</interactivity:EventTrigger>
|
||||
</interactivity:Interaction.Triggers>
|
||||
|
||||
<EgtFloating:EgtFloatingManager>
|
||||
<EgtFloating:EgtFloatingTray x:Name="TOPTRAY" DockPanel.Dock="Top">
|
||||
<WrapPanel Orientation="Horizontal" Width="{Binding ActualWidth, ElementName=TOPTRAY}">
|
||||
<EgtFloating:EgtFloatingPanel Name="ShowPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:ShowPanelV DataContext="{StaticResource ShowPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="ViewPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:ViewPanelV DataContext="{StaticResource ViewPanelViewModel}"/>
|
||||
<local:PopUpViewPanelV DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<!--<EgtFloating:EgtFloatingPanel Name="InstrumentPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">-->
|
||||
<local:InstrumentPanelV DataContext="{StaticResource InstrumentPanelViewModel}"/>
|
||||
<!--</EgtFloating:EgtFloatingPanel>-->
|
||||
<EgtFloating:EgtFloatingPanel Name="GridPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:GridPanelV DataContext="{StaticResource GridPanelViewModel}"/>
|
||||
<local:PopUpGridPanelV DataContext="{StaticResource PopUpGridPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="DbPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="ExecutePanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="SpecialPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="BeamPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="WallPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="BeamWallPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="DoorsPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="GunStockPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
</WrapPanel>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
<EgtFloating:EgtFloatingTray x:Name="LEFTTRAY" DockPanel.Dock="Left">
|
||||
<EgtFloating:EgtFloatingPanel Name="DrawPanel" TitleBarOrientation="Vertical"
|
||||
IsTopDockable="False" IsBottomDockable="False" IsLeftDockable="True" IsRightDockable="True">
|
||||
<local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
<EgtFloating:EgtFloatingTray x:Name="RIGHTTRAY" DockPanel.Dock="Right">
|
||||
<EgtFloating:EgtFloatingPanel Name="OptionPanel" TitleBarOrientation="Vertical"
|
||||
IsTopDockable="False" IsBottomDockable="False" IsLeftDockable="True" IsRightDockable="True">
|
||||
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
<!--<EgtFloating:EgtFloatingTray x:Name="BOTTOMTRAY" DockPanel.Dock="Bottom">
|
||||
<EgtFloating:EgtFloatingPanel Name="MachGroupPanel"
|
||||
IsToolBar="False"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:MachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
</EgtFloating:EgtFloatingTray>-->
|
||||
<EgtFloating:EgtFloatingTray x:Name="BOTTOMTRAY" DockPanel.Dock="Bottom">
|
||||
<EgtWPFLib5:EgtMachGroupPanelV DataContext="{StaticResource MachGroupPanelViewModel}"
|
||||
RepaetButtonStyle="{StaticResource CustomScrollBarButton}"
|
||||
MachGroupButtonStyle="{StaticResource {x:Type ToggleButton}}"
|
||||
IsToolBar="False"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False"
|
||||
IsRightDockable="False" />
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
||||
<ContentControl Content="{Binding ProjectSceneHost}"/>
|
||||
</EgtFloating:EgtFloatingManager>
|
||||
|
||||
</UserControl>
|
||||
</ItemsControl>
|
||||
|
||||
+40
-37
@@ -11,12 +11,13 @@ Public Class ProjectV
|
||||
Private Sub UserControl_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefProjectV(Me)
|
||||
SpecialPanel.Visibility = Visibility.Collapsed
|
||||
BeamPanel.Visibility = Visibility.Collapsed
|
||||
WallPanel.Visibility = Visibility.Collapsed
|
||||
DoorsPanel.Visibility = Visibility.Collapsed
|
||||
GunStockPanel.Visibility = Visibility.Collapsed
|
||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
||||
'SpecialPanel.Visibility = Visibility.Collapsed
|
||||
'BeamPanel.Visibility = Visibility.Collapsed
|
||||
'WallPanel.Visibility = Visibility.Collapsed
|
||||
'DoorsPanel.Visibility = Visibility.Collapsed
|
||||
'GunStockPanel.Visibility = Visibility.Collapsed
|
||||
'PrintingPanel.Visibility = Visibility.Collapsed
|
||||
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
||||
End Sub
|
||||
|
||||
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -64,45 +65,47 @@ Public Class ProjectV
|
||||
End Sub
|
||||
|
||||
Friend Sub SetDbPanelVisibility()
|
||||
DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
|
||||
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
|
||||
End Sub
|
||||
|
||||
Friend Sub MachiningMode_IsChecked()
|
||||
'ShowPanel.Visibility = Visibility.Visible
|
||||
ViewPanel.Visibility = Visibility.Visible
|
||||
'InstrumentPanel.Visibility = Visibility.Visible
|
||||
GridPanel.Visibility = Visibility.Visible
|
||||
DbPanel.Visibility = Visibility.Visible
|
||||
ExecutePanel.Visibility = Visibility.Collapsed
|
||||
SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True), Visibility.Visible, Visibility.Collapsed)
|
||||
BeamPanel.Visibility = Visibility.Collapsed
|
||||
WallPanel.Visibility = Visibility.Collapsed
|
||||
BeamWallPanel.Visibility = Visibility.Collapsed
|
||||
DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
|
||||
GunStockPanel.Visibility = Visibility.Collapsed
|
||||
DrawPanel.Visibility = Visibility.Collapsed
|
||||
OptionPanel.Visibility = Visibility.Visible
|
||||
''ShowPanel.Visibility = Visibility.Visible
|
||||
'ViewPanel.Visibility = Visibility.Visible
|
||||
''InstrumentPanel.Visibility = Visibility.Visible
|
||||
'GridPanel.Visibility = Visibility.Visible
|
||||
'DbPanel.Visibility = Visibility.Visible
|
||||
'ExecutePanel.Visibility = Visibility.Collapsed
|
||||
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True), Visibility.Visible, Visibility.Collapsed)
|
||||
'BeamPanel.Visibility = Visibility.Collapsed
|
||||
'WallPanel.Visibility = Visibility.Collapsed
|
||||
'BeamWallPanel.Visibility = Visibility.Collapsed
|
||||
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
|
||||
'PrintingPanel.Visibility = Visibility.Collapsed
|
||||
'GunStockPanel.Visibility = Visibility.Collapsed
|
||||
'DrawPanel.Visibility = Visibility.Collapsed
|
||||
'OptionPanel.Visibility = Visibility.Visible
|
||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup) ' MachGroupPanel.Visibility = If(IniFile.m_bMachiningGroup, Visibility.Visible, Visibility.Collapsed)
|
||||
If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
|
||||
End Sub
|
||||
|
||||
Friend Sub DrawMode_IsChecked()
|
||||
'ShowPanel.Visibility = Visibility.Visible
|
||||
ViewPanel.Visibility = Visibility.Visible
|
||||
'InstrumentPanel.Visibility = Visibility.Visible
|
||||
GridPanel.Visibility = Visibility.Visible
|
||||
DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
|
||||
ExecutePanel.Visibility = Visibility.Visible
|
||||
SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False), Visibility.Visible, Visibility.Collapsed)
|
||||
BeamPanel.Visibility = If(m_bBeam, Visibility.Visible, Visibility.Collapsed)
|
||||
WallPanel.Visibility = If(m_bWall, Visibility.Visible, Visibility.Collapsed)
|
||||
BeamWallPanel.Visibility = If(m_bBeam Or m_bWall, Visibility.Visible, Visibility.Collapsed)
|
||||
DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
|
||||
GunStockPanel.Visibility = If(m_bGunStock, Visibility.Visible, Visibility.Collapsed)
|
||||
DrawPanel.Visibility = Visibility.Visible
|
||||
OptionPanel.Visibility = Visibility.Visible
|
||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
||||
If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
|
||||
''ShowPanel.Visibility = Visibility.Visible
|
||||
'ViewPanel.Visibility = Visibility.Visible
|
||||
''InstrumentPanel.Visibility = Visibility.Visible
|
||||
'GridPanel.Visibility = Visibility.Visible
|
||||
'DbPanel.Visibility = If(IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW, Visibility.Collapsed, Visibility.Visible)
|
||||
'ExecutePanel.Visibility = Visibility.Visible
|
||||
'SpecialPanel.Visibility = If(m_bSpecial And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False), Visibility.Visible, Visibility.Collapsed)
|
||||
'BeamPanel.Visibility = If(m_bBeam, Visibility.Visible, Visibility.Collapsed)
|
||||
'WallPanel.Visibility = If(m_bWall, Visibility.Visible, Visibility.Collapsed)
|
||||
'BeamWallPanel.Visibility = If(m_bBeam Or m_bWall, Visibility.Visible, Visibility.Collapsed)
|
||||
'DoorsPanel.Visibility = If(m_bDoors, Visibility.Visible, Visibility.Collapsed)
|
||||
'PrintingPanel.Visibility = If(m_bPrinting3d, Visibility.Visible, Visibility.Collapsed)
|
||||
'GunStockPanel.Visibility = If(m_bGunStock, Visibility.Visible, Visibility.Collapsed)
|
||||
'DrawPanel.Visibility = Visibility.Visible
|
||||
'OptionPanel.Visibility = Visibility.Visible
|
||||
' Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False) ' MachGroupPanel.Visibility = Visibility.Collapsed
|
||||
' If m_bDoors Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
|
||||
End Sub
|
||||
|
||||
Private Sub UserControl_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
|
||||
+262
-137
@@ -7,82 +7,141 @@ Imports EgtWPFLib5
|
||||
Imports EgtWPFLib5.EgtFloating
|
||||
|
||||
Public Class ProjectVM
|
||||
Inherits TabViewModel
|
||||
Inherits TabViewModel
|
||||
|
||||
#Region "FIELDS"
|
||||
|
||||
' Variabili in cui salvo i filtri di selezione della modalità Draw e che poi ripristino all'uscita dalla modalità Machining
|
||||
Private m_bSelZeroDim As Boolean = True
|
||||
Private m_bSelCurve As Boolean = True
|
||||
Private m_bSelSurf As Boolean = True
|
||||
Private m_bSelVolume As Boolean = True
|
||||
Private m_bSelExtra As Boolean = True
|
||||
Friend Event OnPreControllerExec(sFilePath As String)
|
||||
Friend Event OnPostControllerExec()
|
||||
|
||||
Private m_bLoaded As Boolean = False
|
||||
' Variabili in cui salvo i filtri di selezione della modalità Draw e che poi ripristino all'uscita dalla modalità Machining
|
||||
Private m_bSelZeroDim As Boolean = True
|
||||
Private m_bSelCurve As Boolean = True
|
||||
Private m_bSelSurf As Boolean = True
|
||||
Private m_bSelVolume As Boolean = True
|
||||
Private m_bSelExtra As Boolean = True
|
||||
|
||||
' Variabile che contiene il Frame di disegno per poterlo ripristinare dopo essere passato dalla lavorazioneù
|
||||
Private m_GridDrawFrame3d As Frame3d = New Frame3d(New Point3d(0, 0, 0))
|
||||
Private m_bLoaded As Boolean = False
|
||||
|
||||
'PROJECT PAGE'S SCENE FIELDS AND PROPERTIES
|
||||
' Reference to the ProjectScene
|
||||
Private WithEvents m_ProjectScene As New Scene
|
||||
' Reference to the ProjectSceneHost
|
||||
Private SceneHost As WindowsFormsHost
|
||||
' Property used to bind the scene to the WindowsFormsHost in XAML
|
||||
Private m_bfirst As Boolean = True
|
||||
Public ReadOnly Property ProjectSceneHost As WindowsFormsHost
|
||||
Get
|
||||
If m_bfirst Then
|
||||
SceneHost = New WindowsFormsHost() With {.Child = m_ProjectScene}
|
||||
m_bfirst = False
|
||||
End If
|
||||
Return SceneHost
|
||||
End Get
|
||||
End Property
|
||||
' Scene controller
|
||||
Private WithEvents m_Controller As New Controller
|
||||
' Variabile che contiene il Frame di disegno per poterlo ripristinare dopo essere passato dalla lavorazioneù
|
||||
Private m_GridDrawFrame3d As Frame3d = New Frame3d(New Point3d(0, 0, 0))
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdLoaded As ICommand
|
||||
'PROJECT PAGE'S SCENE FIELDS AND PROPERTIES
|
||||
' Reference to the ProjectScene
|
||||
Private WithEvents m_ProjectScene As New Scene
|
||||
' Reference to the ProjectSceneHost
|
||||
Private SceneHost As WindowsFormsHost
|
||||
' Property used to bind the scene to the WindowsFormsHost in XAML
|
||||
Private m_bfirst As Boolean = True
|
||||
Public ReadOnly Property ProjectSceneHost As WindowsFormsHost
|
||||
Get
|
||||
If m_bfirst Then
|
||||
SceneHost = New WindowsFormsHost() With {.Child = m_ProjectScene}
|
||||
m_bfirst = False
|
||||
End If
|
||||
Return SceneHost
|
||||
End Get
|
||||
End Property
|
||||
' Scene controller
|
||||
Private WithEvents m_Controller As New Controller
|
||||
|
||||
' Flag per non salvare Script appena eseguito in elenco MruScript
|
||||
Private m_bScriptInMru As Boolean = True
|
||||
' Definizione comandi
|
||||
Private m_cmdLoaded As ICommand
|
||||
|
||||
' Flag per non salvare Script appena eseguito in elenco MruScript
|
||||
Private m_bScriptInMru As Boolean = True
|
||||
|
||||
Private m_PanelList As New List(Of Panel)
|
||||
Public ReadOnly Property PanelList As List(Of Panel)
|
||||
Get
|
||||
Return m_PanelList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "EGTUILIB FIELDS"
|
||||
|
||||
Private m_bCPlaneTypePos As Boolean
|
||||
'Private m_bStopExec As Boolean = False
|
||||
'Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
|
||||
'Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
|
||||
|
||||
' Variabile per implementazione eventi
|
||||
Private m_InputText As String
|
||||
' Variabile per implementazione eventi
|
||||
Private m_InputText As String
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in EgtCAM5Map
|
||||
Map.SetRefProjectVM(Me)
|
||||
' Creo classe di supporto per la visualizzazione dei parametri utensile e di lavorazione per Db e operazioni
|
||||
TMDbParamVisibility.bFirst = True
|
||||
' Inizializza i parametri della scena
|
||||
'InitializeEgtProject()
|
||||
End Sub
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in EgtCAM5Map e in ButtonItem
|
||||
Map.SetRefProjectVM(Me)
|
||||
ButtonItem.m_ProjectVM = Me
|
||||
' Creo classe di supporto per la visualizzazione dei parametri utensile e di lavorazione per Db e operazioni
|
||||
TMDbParamVisibility.bFirst = True
|
||||
' Inizializza i parametri della scena
|
||||
'InitializeEgtProject()
|
||||
' aggiungo componenti interfaccia
|
||||
Dim bPlugin As Boolean = False
|
||||
Dim PluginDirNameList() As String = {}
|
||||
If IsActivePlugin() Then
|
||||
Dim sPluginDirPath As String = IniFile.m_sDataRoot & "\Plugin"
|
||||
If Directory.Exists(sPluginDirPath) Then
|
||||
' recupero nome del plugin
|
||||
PluginDirNameList = Directory.GetDirectories(IniFile.m_sDataRoot & "\Plugin")
|
||||
' verifico che il nome delle cartelle corrisponda al nome delle dll
|
||||
For PluginDirIndex As Integer = 0 To PluginDirNameList.Count - 1
|
||||
Dim sPluginDirName As String = Path.GetFileName(PluginDirNameList(PluginDirIndex))
|
||||
Dim sPluginFileNameList() As String = Directory.GetFiles(PluginDirNameList(PluginDirIndex))
|
||||
If sPluginFileNameList.Count = 0 OrElse Not sPluginFileNameList.Any(Function(x) Path.GetFileNameWithoutExtension(x) = sPluginDirName) Then
|
||||
PluginDirNameList(PluginDirIndex) = ""
|
||||
End If
|
||||
Next
|
||||
bPlugin = PluginDirNameList.Count(Function(x) Not String.IsNullOrWhiteSpace(x)) > 0
|
||||
End If
|
||||
End If
|
||||
If bPlugin Then
|
||||
For Each PluginDirName In PluginDirNameList
|
||||
If Not String.IsNullOrWhiteSpace(PluginDirName) Then
|
||||
Dim PluginName As String = Path.GetFileName(PluginDirName)
|
||||
Dim ConfigurationData As IPluginConfigData = Map.refMainWindowVM.GetConfigData(Of IPluginConfigData)(PluginName & ".ConfigurationData")
|
||||
If Not IsNothing(ConfigurationData) And ConfigurationData.ControlList.Count > 0 Then
|
||||
For Each Element In ConfigurationData.ControlList
|
||||
Select Case Element.Name
|
||||
Case PLUGIN_RIGHT_TRAY
|
||||
m_PanelList.Add(New RightTrayV)
|
||||
Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState)
|
||||
Case PLUGIN_LEFT_TRAY
|
||||
m_PanelList.Add(New LeftTrayV)
|
||||
Case Else
|
||||
m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
m_PanelList.Add(New BottomTrayV)
|
||||
m_PanelList.Add(New TopTrayV)
|
||||
' nascondo tasti gestione progetto se attivo plugin
|
||||
Map.refTopCommandBarVM.SetProjectManagerVisibility(False)
|
||||
Else
|
||||
m_PanelList.Add(New TopTrayV)
|
||||
m_PanelList.Add(New LeftTrayV)
|
||||
m_PanelList.Add(New RightTrayV)
|
||||
m_PanelList.Add(New BottomTrayV)
|
||||
End If
|
||||
m_PanelList.Add(New SceneContentControlV)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Get & Set"
|
||||
|
||||
Friend Function GetScene() As Scene
|
||||
Return m_ProjectScene
|
||||
End Function
|
||||
Friend Function GetScene() As Scene
|
||||
Return m_ProjectScene
|
||||
End Function
|
||||
|
||||
Friend Function GetController() As Controller
|
||||
Return m_Controller
|
||||
End Function
|
||||
Friend Function GetController() As Controller
|
||||
Return m_Controller
|
||||
End Function
|
||||
|
||||
#End Region ' Get & Set
|
||||
|
||||
@@ -96,7 +155,7 @@ Public Class ProjectVM
|
||||
Public ReadOnly Property LoadedCommand As ICommand
|
||||
Get
|
||||
If m_cmdLoaded Is Nothing Then
|
||||
m_cmdLoaded = New RelayCommand(AddressOf Loaded)
|
||||
m_cmdLoaded = New RelayCommand(AddressOf Loaded)
|
||||
End If
|
||||
Return m_cmdLoaded
|
||||
End Get
|
||||
@@ -125,10 +184,42 @@ Public Class ProjectVM
|
||||
Map.refProjectV.SetDbPanelVisibility()
|
||||
End If
|
||||
' Inizializzo gestore travi e pareti
|
||||
If ( IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 Or ( IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 Then
|
||||
Dim nFlag As Integer = GetPrivateProfileInt( S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
|
||||
EgtInitBeamMgr( nFlag)
|
||||
If (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 Or (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 Then
|
||||
Dim nFlag As Integer = GetPrivateProfileInt(S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
|
||||
EgtInitBeamMgr(nFlag)
|
||||
End If
|
||||
' Log di eventuali estensioni
|
||||
EgtOutLog("Extensions :")
|
||||
Dim bExtensions As Boolean = False
|
||||
If IniFile.IsActiveBeam() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion(IniFile.m_sBeamDirPath, sVersion)
|
||||
Dim sOut As String = "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
|
||||
EgtOutLog(sOut)
|
||||
End If
|
||||
If IniFile.IsActiveWall() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion(IniFile.m_sWallDirPath, sVersion)
|
||||
Dim sOut As String = "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath
|
||||
EgtOutLog(sOut)
|
||||
End If
|
||||
If IniFile.IsActiveDoors() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion(IniFile.m_sDoorsDirPath, sVersion)
|
||||
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||
EgtOutLog(sOut)
|
||||
End If
|
||||
If IniFile.IsActiveGunStock() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion(IniFile.m_sGunstockDirPath, sVersion)
|
||||
Dim sOut As String = "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath
|
||||
EgtOutLog(sOut)
|
||||
End If
|
||||
If Not bExtensions Then EgtOutLog("---")
|
||||
' Apro progetto vuoto
|
||||
Map.refTopCommandBarVM.NewCmd()
|
||||
' Seleziono la macchina impostata nel file ini
|
||||
@@ -161,17 +252,17 @@ Public Class ProjectVM
|
||||
.ValidateNames = True
|
||||
}
|
||||
If LicDlg.ShowDialog() = True Then
|
||||
' Recupero il direttorio del file
|
||||
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
|
||||
' Se il file non è già nel direttorio di configurazione lo copio
|
||||
If Not String.Equals(Path.GetFullPath(sDir), Path.GetFullPath(IniFile.m_sConfigDir), StringComparison.OrdinalIgnoreCase) Then
|
||||
Try
|
||||
File.Copy(LicDlg.FileName, Path.Combine(IniFile.m_sConfigDir, LicDlg.SafeFileName), True)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
' Imposto il nuovo file di licenza nell'Ini
|
||||
WritePrivateProfileString(S_GENERAL, K_LICENCE, LicDlg.SafeFileName)
|
||||
' Recupero il direttorio del file
|
||||
Dim sDir As String = Path.GetDirectoryName(LicDlg.FileName)
|
||||
' Se il file non è già nel direttorio di configurazione lo copio
|
||||
If Not String.Equals(Path.GetFullPath(sDir), Path.GetFullPath(IniFile.m_sConfigDir), StringComparison.OrdinalIgnoreCase) Then
|
||||
Try
|
||||
File.Copy(LicDlg.FileName, Path.Combine(IniFile.m_sConfigDir, LicDlg.SafeFileName), True)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
' Imposto il nuovo file di licenza nell'Ini
|
||||
WritePrivateProfileString(S_GENERAL, K_LICENCE, LicDlg.SafeFileName)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -228,15 +319,14 @@ Public Class ProjectVM
|
||||
|
||||
Private Sub PostInitializeScene()
|
||||
' Impostazioni Controller
|
||||
m_Controller.SetUserLevel( IniFile.m_nUserLevel)
|
||||
m_Controller.SetScene(m_ProjectScene)
|
||||
Dim bLuaReg As Boolean = (GetPrivateProfileInt(S_GENERAL, K_COMMANDLOG, 0) <> 0)
|
||||
Dim sCmdLogFile As String = CMDLOG_FILE_NAME.Replace("#", IniFile.m_nInstance.ToString())
|
||||
If Not m_Controller.SetCommandLog(bLuaReg, m_sTempDir, sCmdLogFile) Then
|
||||
EgtOutLog("Command log not started")
|
||||
If Environment.GetCommandLineArgs.Count() <= 1 Then
|
||||
MessageBox.Show("Command log not started", "EgtCAM5 Warning",
|
||||
MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
MessageBox.Show("Command log not started", "EgtCAM5 Warning",
|
||||
MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
End If
|
||||
End If
|
||||
m_Controller.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
|
||||
@@ -288,9 +378,9 @@ Public Class ProjectVM
|
||||
' lettura flag visualizzazione solo tavola in definizione lavorazioni
|
||||
IniFile.m_bShowOnlyTable = (GetPrivateProfileInt(S_MACH, K_SHOWONLYTABLE, 1) <> 0)
|
||||
' ObjTree non selezionato
|
||||
Map.refManageLayerExpanderVM.UpdateObjTreeOldId(GDB_ID.NULL)
|
||||
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateObjTreeOldId(GDB_ID.NULL)
|
||||
' nascondo input box
|
||||
Map.refInputExpanderVM.ResetInputBox()
|
||||
If Not IsNothing(Map.refInputExpanderVM) Then Map.refInputExpanderVM.ResetInputBox()
|
||||
' Imposto stato filtro selezione
|
||||
m_ProjectScene.GetObjFilterForSel(m_bSelZeroDim, m_bSelCurve, m_bSelSurf, m_bSelVolume, m_bSelExtra)
|
||||
m_Controller.MouseSetObjFilterForSelect(m_bSelZeroDim, m_bSelCurve, m_bSelSurf, m_bSelVolume, m_bSelExtra)
|
||||
@@ -353,7 +443,7 @@ Public Class ProjectVM
|
||||
' Verifico se travi o pareti (dal nome della macchina)
|
||||
Dim sBeamMachines As String = ""
|
||||
GetPrivateProfileString(S_BEAM, K_BEAMMACHINES, "", sBeamMachines)
|
||||
Dim vsBMachs() As String = sBeamMachines.Split(","c).ToArray
|
||||
Dim vsBMachs() As String = sBeamMachines.Split(","c)
|
||||
Dim bBeam As Boolean = False
|
||||
For Each sBMach In vsBMachs
|
||||
If Not String.IsNullOrWhiteSpace(sBMach) AndAlso sMachine.StartsWith(sBMach, True, CultureInfo.InvariantCulture) Then
|
||||
@@ -377,8 +467,8 @@ Public Class ProjectVM
|
||||
Return
|
||||
End If
|
||||
' Esecuzione
|
||||
bOk = ExecBeam(sFile, sMachine, nFlag, true)
|
||||
' altrimenti pareti
|
||||
bOk = ExecBeam(sFile, sMachine, nFlag, True)
|
||||
' altrimenti pareti
|
||||
Else
|
||||
' Verifica abilitazione elaborazione pareti
|
||||
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
||||
@@ -386,18 +476,18 @@ Public Class ProjectVM
|
||||
Return
|
||||
End If
|
||||
' Esecuzione
|
||||
bOk = ExecWall(sFile, sMachine, nFlag, true)
|
||||
bOk = ExecWall(sFile, sMachine, nFlag, True)
|
||||
End If
|
||||
' Se richiesta uscita immediata
|
||||
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
Map.refMainWindowVM.CloseApplicationCmd()
|
||||
' Altrimenti se richiesta visualizzazione DB utensili
|
||||
' Altrimenti se richiesta visualizzazione DB utensili
|
||||
ElseIf nFlag = 11 And bOk Then
|
||||
MyMachinePanelVM.ToolDb()
|
||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
Map.refMainWindowVM.CloseApplicationCmd()
|
||||
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
||||
' Altrimenti se richiesta visualizzazione DB lavorazioni
|
||||
ElseIf nFlag = 12 And bOk Then
|
||||
MyMachinePanelVM.MachDb()
|
||||
If bBeam Then
|
||||
@@ -407,7 +497,7 @@ Public Class ProjectVM
|
||||
End If
|
||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
Map.refMainWindowVM.CloseApplicationCmd()
|
||||
' Altrimenti se errore
|
||||
' Altrimenti se errore
|
||||
ElseIf Not bOk Then
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
@@ -468,8 +558,8 @@ Public Class ProjectVM
|
||||
Return
|
||||
End If
|
||||
' Esecuzione
|
||||
bOk = ExecBeam(sFile, sMachine, nFlag, false)
|
||||
' altrimenti pareti
|
||||
bOk = ExecBeam(sFile, sMachine, nFlag, False)
|
||||
' altrimenti pareti
|
||||
ElseIf nBWType = 2 Then
|
||||
' Verifica abilitazione elaborazione pareti
|
||||
If Not VerifyWall(sFile, sMachine, nFlag) Then
|
||||
@@ -477,13 +567,13 @@ Public Class ProjectVM
|
||||
Return
|
||||
End If
|
||||
' Esecuzione
|
||||
bOk = ExecWall(sFile, sMachine, nFlag, false)
|
||||
bOk = ExecWall(sFile, sMachine, nFlag, False)
|
||||
End If
|
||||
' Se richiesta uscita immediata
|
||||
If nFlag = 0 Or nFlag = 3 Or nFlag = 4 Then
|
||||
Map.refMachinePanelVM.SaveCurrentMachine()
|
||||
Map.refMainWindowVM.CloseApplicationCmd()
|
||||
' Altrimenti se errore
|
||||
' Altrimenti se errore
|
||||
ElseIf Not bOk Then
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
@@ -499,7 +589,7 @@ Public Class ProjectVM
|
||||
Select Case nFileType
|
||||
Case FT.NGE, FT.NFE
|
||||
Return m_Controller.OpenProject(sFile, False)
|
||||
Case FT.DXF, FT.STL, FT._3MF, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
|
||||
Case FT.DXF, FT.STL, FT._3MF, FT._3DM, FT.OBJ, FT.CNC, FT.CSF, FT.BTL, FT.BTLX, FT.IMG, FT.PNT, FT.IGES, FT.STEP_, FT.ACIS, FT.PARASOLID, FT.JT, FT.VRML, FT.C3D
|
||||
Return m_Controller.ImportProject(sFile, False)
|
||||
Case FT.TSC, FT.LUA
|
||||
Return m_Controller.Exec(sFile, False)
|
||||
@@ -511,7 +601,7 @@ Public Class ProjectVM
|
||||
Dim nErr As Integer = 0
|
||||
' Formato descrizione porte
|
||||
If Path.GetExtension(sFile).ToLower() = ".ddf" Then
|
||||
nErr = ExecDoors(m_ProjectScene, sFile)
|
||||
nErr = ExecDoors(m_ProjectScene, sFile, bNcGen, bBatch, nProbing)
|
||||
'CreateDoors(sFile, bNcGen, bBatch, nProbing)
|
||||
Map.refProjectVM.EmitTitle()
|
||||
Return True
|
||||
@@ -625,7 +715,7 @@ Public Class ProjectVM
|
||||
Friend Sub InsertProject()
|
||||
' eseguo
|
||||
Dim sDir As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, K_LASTNGEDIR, "", sDir)
|
||||
GetPrivateProfileString(S_GENERAL, K_LASTNGEINSDIR, "", sDir)
|
||||
m_Controller.InsertProject(sDir)
|
||||
End Sub
|
||||
|
||||
@@ -644,13 +734,15 @@ Public Class ProjectVM
|
||||
m_bScriptInMru = bScriptInMru
|
||||
End Sub
|
||||
|
||||
Friend Sub ExecScript(sFilePath As String)
|
||||
Friend Sub ExecScript(sFilePath As String, Optional bRaiseEvent As Boolean = False)
|
||||
If String.IsNullOrEmpty(sFilePath) Then
|
||||
Dim sDir As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, K_LASTLUADIR, "", sDir)
|
||||
m_Controller.Exec(sDir)
|
||||
Else
|
||||
If bRaiseEvent Then RaiseEvent OnPreControllerExec(sFilePath)
|
||||
m_Controller.Exec(sFilePath, False)
|
||||
If bRaiseEvent Then RaiseEvent OnPostControllerExec()
|
||||
End If
|
||||
Dim bMachiningMode As Boolean = EgtGetCurrMachGroup() <> GDB_ID.NULL
|
||||
If Not bMachiningMode And EgtGetCurrLayer() = GDB_ID.NULL Then
|
||||
@@ -714,7 +806,7 @@ Public Class ProjectVM
|
||||
Try
|
||||
Dim sErrFilePath As String = Path.ChangeExtension(IniFile.m_PEZFilePath, ".txt")
|
||||
Dim Lines() As String = File.ReadAllLines(sErrFilePath)
|
||||
Dim values() As String = Lines(0).Split("="c).ToArray
|
||||
Dim values() As String = Lines(0).Split("="c)
|
||||
Lines(0) = EgtMsg(MSG_DOORSERRORS + 1) & " " & Convert.ToInt32(values(1))
|
||||
Dim sErrMsg As String = String.Empty
|
||||
For Index = 1 To Lines.Count - 1
|
||||
@@ -765,6 +857,20 @@ Public Class ProjectVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub GunStockCopy(sFilePath As String, sDirDest As String)
|
||||
Dim bOk As Boolean
|
||||
bOk = ExecGunStockCopy(m_ProjectScene, sFilePath, sDirDest)
|
||||
If bOk Then
|
||||
' Copia dei file terminata con successo ...
|
||||
Dim sMsg As String = EgtMsg(8216) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
|
||||
MessageBox.Show(sMsg, EgtMsg(8214), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||
Else
|
||||
' Errore nella copia dei file ...
|
||||
Dim sMsg As String = EgtMsg(8255) & vbCrLf & sFilePath & vbCrLf & "->" & sDirDest
|
||||
MessageBox.Show(sMsg, EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "DrawOptionPanel Commands"
|
||||
@@ -919,12 +1025,12 @@ Public Class ProjectVM
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseDeselectedAll(ByVal sender As Object) Handles m_ProjectScene.OnMouseDeselectedAll
|
||||
' Se in modalità Draw seleziono tutto
|
||||
' Se in modalità Draw deseleziono tutto
|
||||
If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then
|
||||
m_Controller.MouseDeselectedAll()
|
||||
m_Controller.MouseDeselectedAll(True)
|
||||
Return
|
||||
End If
|
||||
' Sono in modalità Machining, se la modalità di selezione è NULL non seleziono nulla ed esco
|
||||
' Sono in modalità Machining, se la modalità di selezione è NULL non deseleziono nulla ed esco
|
||||
If m_SceneSelMode = SceneSelModeOpt.NULL Then Return
|
||||
' Se sono in lavorazione
|
||||
If IniFile.m_ProjectMode = ProjectModeOpt.MACHINING Then
|
||||
@@ -944,7 +1050,7 @@ Public Class ProjectVM
|
||||
Private m_nIdToSel As Integer = GDB_ID.NULL
|
||||
Private m_SelType As DispositionUtility.SelType = DispositionUtility.SelType.NULL
|
||||
Private m_nIdToDesel As Integer = GDB_ID.NULL
|
||||
'Private m_nFirstRawPartId As Integer = GDB_ID.NULL
|
||||
Private m_nSelOpeId As Integer = GDB_ID.NULL
|
||||
|
||||
' Dati per Drag
|
||||
Private m_nRestRadius As Integer = 3
|
||||
@@ -954,14 +1060,18 @@ Public Class ProjectVM
|
||||
Private m_locPrev As System.Drawing.Point
|
||||
Private m_ptPrev As Point3d
|
||||
|
||||
Private Sub OnMouseDown(ByVal sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_ProjectScene.OnMouseDownScene
|
||||
Private Sub OnStartingMouseDown(ByVal sender As Object, e As System.Windows.Forms.MouseEventArgs, ByRef bContinue As Boolean) Handles m_ProjectScene.OnStartingMouseDownScene
|
||||
' Se in modalità Draw accetto tutto
|
||||
If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then Return
|
||||
' Sono in modalità Machining
|
||||
' se non posso selezionare nulla o in lavorazione esco
|
||||
If m_SceneSelType = SceneSelTypeOpt.NULL OrElse m_SceneSelType = SceneSelTypeOpt.MACHINING Then Return
|
||||
If m_SceneSelType = SceneSelTypeOpt.NULL OrElse
|
||||
m_SceneSelType = SceneSelTypeOpt.MACHINING OrElse
|
||||
m_SceneSelType = SceneSelTypeOpt.MACHPATH Then Return
|
||||
' Si può selezionare solo con il tasto sinistro
|
||||
If e.Button <> Forms.MouseButtons.Left Then Return
|
||||
' Si Sostituisce completamente la gestione dell'evento chiamante
|
||||
bContinue = False
|
||||
' Dati per drag
|
||||
Dim TableRef As Point3d
|
||||
EgtGetTableRef(1, TableRef)
|
||||
@@ -1079,22 +1189,22 @@ Public Class ProjectVM
|
||||
' Se eseguito drag
|
||||
If Not m_bDragToStart Then
|
||||
' Basta reset alla fine
|
||||
' se sono in modalità movimento barre
|
||||
' se sono in modalità movimento barre
|
||||
ElseIf m_SelType = DispositionUtility.SelType.BARS Then
|
||||
' Basta reset alla fine
|
||||
' Se selezione da eseguire
|
||||
' Se selezione da eseguire
|
||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||
' se sono in modalità sottopezzi
|
||||
If m_SceneSelType = SceneSelTypeOpt.FIXTURE Then
|
||||
' se il sottopezzo da selezionare è un riferimento e ci sono altri oggetti selezionati resetto lo stato di selezione ed esco
|
||||
If DispositionUtility.FixtureType(m_nIdToSel) = DispositionUtility.FIX_TYPE.REFERENCE AndAlso
|
||||
If DispositionUtility.FixtureType(m_nIdToSel) = DispositionUtility.FIX_TYPE.REFERENCE AndAlso
|
||||
EgtGetSelectedObjCount() > 0 Then
|
||||
m_bDrag = False
|
||||
m_nIdToSel = GDB_ID.NULL
|
||||
m_nIdToDesel = GDB_ID.NULL
|
||||
EgtDraw()
|
||||
Return
|
||||
' altrimenti verifico il tipo del primo oggetto selezionato
|
||||
' altrimenti verifico il tipo del primo oggetto selezionato
|
||||
Else
|
||||
Dim nFirstSelId As Integer = EgtGetFirstSelectedObj()
|
||||
' se è un riferimento resetto lo stato di selezione ed esco
|
||||
@@ -1120,7 +1230,7 @@ Public Class ProjectVM
|
||||
End If
|
||||
' Eseguo la selezione
|
||||
EgtSelectObj(m_nIdToSel)
|
||||
' Se deselezione da eseguire
|
||||
' Se deselezione da eseguire
|
||||
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
||||
' se l'elemento da deselezionare è marcato
|
||||
Dim bMarked As Boolean = False
|
||||
@@ -1153,9 +1263,20 @@ Public Class ProjectVM
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub OnStartingMouseSelectingObj(ByVal sender As Object) Handles m_ProjectScene.OnStartingMouseSelectingObj
|
||||
m_nSelOpeId = GDB_ID.NULL
|
||||
End Sub
|
||||
|
||||
Private Sub OnMouseSelectingObj(ByVal sender As Object, ByVal nId As Integer, ByRef bOk As Boolean) Handles m_ProjectScene.OnMouseSelectingObj
|
||||
' Se oggetto già rifiutato non faccio le verifiche
|
||||
If Not bOk Then Return
|
||||
' Impedisco la selezione di oggetti in modo Locked o Hidden
|
||||
Dim nMode As Integer = GDB_MD.STD
|
||||
EgtGetCalcMode(nId, nMode)
|
||||
If nMode <> GDB_MD.STD Then
|
||||
bOk = False
|
||||
Return
|
||||
End If
|
||||
' Se in modalità Draw accetto tutto
|
||||
If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then Return
|
||||
' Sono in modalità Machining
|
||||
@@ -1168,7 +1289,9 @@ Public Class ProjectVM
|
||||
bOk = False
|
||||
End If
|
||||
Case SceneSelTypeOpt.MACHPATH
|
||||
bOk = Map.refOperationsListExpanderVM.IsInOperationList(nId)
|
||||
Dim nCurrOpeId As Integer = Map.refOperationsListExpanderVM.GetOperationId(nId)
|
||||
bOk = (nCurrOpeId <> GDB_ID.NULL AndAlso nCurrOpeId <> m_nSelOpeId)
|
||||
If m_nSelOpeId = GDB_ID.NULL Then m_nSelOpeId = nCurrOpeId
|
||||
Case Else
|
||||
bOk = False
|
||||
End Select
|
||||
@@ -1177,13 +1300,11 @@ Public Class ProjectVM
|
||||
Private Sub OnMouseSelectedObj(ByVal sender As Object, ByVal nId As Integer, ByVal bLast As Boolean) Handles m_ProjectScene.OnMouseSelectedObj
|
||||
If IniFile.m_ProjectMode = ProjectModeOpt.MACHINING And m_SceneSelType = SceneSelTypeOpt.MACHPATH Then
|
||||
Map.refOperationsListExpanderVM.SelOperationItemFromId(nId)
|
||||
Else
|
||||
If IniFile.m_ProjectMode = ProjectModeOpt.MACHINING And m_SceneSelType = SceneSelTypeOpt.MACHINING And
|
||||
ElseIf IniFile.m_ProjectMode = ProjectModeOpt.MACHINING And m_SceneSelType = SceneSelTypeOpt.MACHINING And
|
||||
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
|
||||
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
|
||||
Else
|
||||
m_Controller.MouseSelectedObj(nId, bLast)
|
||||
End If
|
||||
If Not EgtIsSelectedObj(nId) Then m_Controller.MouseSelectedObj(nId, bLast)
|
||||
Else
|
||||
m_Controller.MouseSelectedObj(nId, bLast)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1202,15 +1323,15 @@ Public Class ProjectVM
|
||||
Private Sub OnMousePointFromSelection(ByVal sender As Object, ByVal nId As Integer, ByVal PtP As Point3d, ByVal nAux As Integer) Handles m_ProjectScene.OnMousePointFromSelection
|
||||
m_Controller.SetPointFromSelection(nId, PtP, nAux)
|
||||
If IniFile.m_ProjectMode = ProjectModeOpt.MACHINING And m_SceneSelType = SceneSelTypeOpt.MACHINING And
|
||||
( EgtGetType( nId) = GDB_TY.SRF_MESH Or EgtGetType( nId) = GDB_TY.SRF_FRGN) Then
|
||||
If EgtIsSelectedObj( nId) Then
|
||||
Dim nFac As Integer = If( EgtGetType( nId) = GDB_TY.SRF_MESH, Math.Max( EgtSurfTmFacetFromTria( nId, nAux), 0), nAux)
|
||||
If Not SelData.FindIdSub( nId, nFac) Then
|
||||
(EgtGetType(nId) = GDB_TY.SRF_MESH Or EgtGetType(nId) = GDB_TY.SRF_FRGN) Then
|
||||
If EgtIsSelectedObj(nId) Then
|
||||
Dim nFac As Integer = If(EgtGetType(nId) = GDB_TY.SRF_MESH, Math.Max(EgtSurfTmFacetFromTria(nId, nAux), 0), nAux)
|
||||
If Not SelData.FindIdSub(nId, nFac) Then
|
||||
SelData.AddIdSub(nId, nFac)
|
||||
Else
|
||||
SelData.RemoveIdSub(nId, nFac)
|
||||
If Not SelData.FindId( nId) Then
|
||||
EgtDeselectObj( nId)
|
||||
If Not SelData.FindId(nId) Then
|
||||
EgtDeselectObj(nId)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
@@ -1244,29 +1365,29 @@ Public Class ProjectVM
|
||||
Analyze.ClearAnalyzeGroup()
|
||||
Map.refStatusBarVM.NotifyStatusOutput("")
|
||||
' Se curva composita, visualizzo numerazione curve semplici
|
||||
If EgtGetType( nId) = GDB_TY.CRV_COMPO Then
|
||||
If EgtGetType(nId) = GDB_TY.CRV_COMPO Then
|
||||
' Visualizzo numerazione
|
||||
Analyze.CreateAnalyzeGroup()
|
||||
Analyze.CreateCurveCompoPntNbrs( nId)
|
||||
' Se superficie trimesh, visualizzo dati faccetta toccata
|
||||
ElseIf EgtGetType( nId) = GDB_TY.SRF_MESH Then
|
||||
Dim nFac As Integer = EgtSurfTmFacetFromTria( nId, nSub)
|
||||
Analyze.CreateCurveCompoPntNbrs(nId)
|
||||
' Se superficie trimesh, visualizzo dati faccetta toccata
|
||||
ElseIf EgtGetType(nId) = GDB_TY.SRF_MESH Then
|
||||
Dim nFac As Integer = EgtSurfTmFacetFromTria(nId, nSub)
|
||||
If nFac <> -1 Then
|
||||
' Visualizzo la normale e il contorno della faccia
|
||||
Analyze.CreateAnalyzeGroup()
|
||||
Analyze.CreateNormal( nId, nFac)
|
||||
Analyze.CreateFacetLoops( nId, nFac)
|
||||
Analyze.CreateNormal(nId, nFac)
|
||||
Analyze.CreateFacetLoops(nId, nFac)
|
||||
' Recupero i dati (in globale o griglia a seconda della impostazione)
|
||||
Dim ptC As Point3d
|
||||
Dim vtN As Vector3d
|
||||
EgtSurfTmFacetCenter( nId, nFac, If( m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
|
||||
EgtSurfTmFacetCenter(nId, nFac, If(m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
|
||||
Dim dLen, dPhi, dTheta As Double
|
||||
vtN.ToSpherical( dLen, dTheta, dPhi)
|
||||
vtN.ToSpherical(dLen, dTheta, dPhi)
|
||||
' Emetto info sulla barra di stato
|
||||
Dim sOut As String = "Facet " + nFac.ToString() +
|
||||
" : C(" + LenToString( ptC.x, 3) + "," + LenToString( ptC.y, 3) + "," + LenToString( ptC.z, 3) + ")" +
|
||||
" N(" + DoubleToString( vtN.x, 4) + "," + DoubleToString( vtN.y, 4) + "," + DoubleToString( vtN.z, 4) + ")" +
|
||||
" / φ=" + DoubleToString( dPhi, 2) + " θ=" + DoubleToString( dTheta, 2)
|
||||
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
|
||||
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
|
||||
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
|
||||
Map.refStatusBarVM.NotifyStatusOutput(sOut)
|
||||
End If
|
||||
End If
|
||||
@@ -1283,16 +1404,19 @@ Public Class ProjectVM
|
||||
If e.KeyData = System.Windows.Forms.Keys.Delete AndAlso Map.refTopCommandBarVM.DrawIsChecked Then
|
||||
m_Controller.SetLastInteger(GDB_ID.SEL)
|
||||
m_Controller.ExecuteCommand(Controller.CMD.DELETE)
|
||||
' Con SPAZIO ripeto l'ultimo comando
|
||||
' Con END eseguo deselezione di tutto
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.End Then
|
||||
m_Controller.MouseDeselectedAll(True)
|
||||
' Con SPAZIO ripeto l'ultimo comando
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.Space Then
|
||||
m_Controller.RepeatLastCommand()
|
||||
' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.A And m_Controller.GetContinue() Then
|
||||
' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.A AndAlso m_Controller.GetContinue() Then
|
||||
m_Controller.ContinueArcPDP()
|
||||
' Con 'L' e in modalità continuazione, forzo il passaggio a retta
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.L And m_Controller.GetContinue() Then
|
||||
' Con 'L' e in modalità continuazione, forzo il passaggio a retta
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.L AndAlso m_Controller.GetContinue() Then
|
||||
m_Controller.ContinueLine2P()
|
||||
' Con 'V' cambio lo stato del check
|
||||
' Con 'V' cambio lo stato del check
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.V Then
|
||||
Map.refInputExpanderVM.ChangeInputBoxCheck()
|
||||
End If
|
||||
@@ -1318,7 +1442,7 @@ Public Class ProjectVM
|
||||
End Sub
|
||||
|
||||
Private Sub OnOpeningProject(ByVal sender As Object) Handles m_Controller.OnOpeningProject
|
||||
Map.refManageLayerExpanderVM.ClearObjTree()
|
||||
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.ClearObjTree()
|
||||
End Sub
|
||||
|
||||
Private Sub OnOpenProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnOpenProject
|
||||
@@ -1329,7 +1453,7 @@ Public Class ProjectVM
|
||||
Else
|
||||
IniFile.m_MruFiles.Remove(sFile)
|
||||
Dim sMsg As String
|
||||
If My.Computer.FileSystem.FileExists( sFile) Then
|
||||
If My.Computer.FileSystem.FileExists(sFile) Then
|
||||
sMsg = EgtMsg(10003) & " '" & sFile & "'" 'Error opening file
|
||||
Else
|
||||
sMsg = EgtMsg(10009) & " '" & sFile & "'" 'Missing file
|
||||
@@ -1340,6 +1464,7 @@ Public Class ProjectVM
|
||||
|
||||
Private Sub OnInsertedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean) Handles m_Controller.OnInsertedProject
|
||||
EgtZoom(ZM.ALL)
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTNGEINSDIR, Path.GetDirectoryName(sFile))
|
||||
End Sub
|
||||
|
||||
Private Sub OnSavingProject(ByVal sender As Object, ByVal sFile As String) Handles m_Controller.OnSavingProject
|
||||
@@ -1430,7 +1555,7 @@ Public Class ProjectVM
|
||||
End If
|
||||
Else
|
||||
If m_bScriptInMru Then
|
||||
If File.Exists( sFile) Then
|
||||
If File.Exists(sFile) Then
|
||||
IniFile.m_MruScripts.Add(sFile)
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTLUADIR, Path.GetDirectoryName(sFile))
|
||||
Else
|
||||
@@ -1465,7 +1590,7 @@ Public Class ProjectVM
|
||||
|
||||
Private Sub OnUpdateUI(ByVal sender As Object, ByVal bReloadUI As Boolean) Handles m_Controller.UpdateUI
|
||||
' pulisco input e relativi messaggi
|
||||
Map.refInputExpanderVM.ResetInputBox()
|
||||
If Not IsNothing(Map.refInputExpanderVM) Then Map.refInputExpanderVM.ResetInputBox()
|
||||
If m_Controller.GetContinue() Then
|
||||
Map.refStatusBarVM.NotifyStatusOutput((EgtMsg(399))) ' Continue : 'L' with line, 'A' with arc
|
||||
Else
|
||||
@@ -1475,9 +1600,9 @@ Public Class ProjectVM
|
||||
EmitTitle()
|
||||
EmitCurrPartLayer()
|
||||
If bReloadUI Then
|
||||
Map.refManageLayerExpanderVM.LoadObjTree()
|
||||
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.LoadObjTree()
|
||||
Else
|
||||
Map.refManageLayerExpanderVM.UpdateObjTree()
|
||||
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateObjTree()
|
||||
End If
|
||||
' aggiorno macchina corrente
|
||||
Map.refMachinePanelVM.UpdateCurrentMachine()
|
||||
@@ -1552,9 +1677,9 @@ Public Class ProjectVM
|
||||
EgtGetCalcColor(nCurrLayer, colObj)
|
||||
End If
|
||||
End If
|
||||
Map.refManageLayerExpanderVM.UpdateHeaderName(sText)
|
||||
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateHeaderName(sText)
|
||||
colObj.A = 100
|
||||
Map.refManageLayerExpanderVM.UpdateHeaderColor(colObj)
|
||||
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.UpdateHeaderColor(colObj)
|
||||
End Sub
|
||||
|
||||
#End Region 'DrawOptionPanel
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 736 B |
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 637 B |
@@ -0,0 +1,7 @@
|
||||
<Grid x:Class="RightTrayV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
DockPanel.Dock="Right">
|
||||
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class RightTrayV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,8 @@
|
||||
<Grid x:Class="SceneContentControlV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
||||
<ContentControl Content="{Binding ProjectSceneHost}"/>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class SceneContentControlV
|
||||
|
||||
End Class
|
||||
+4
-3
@@ -75,7 +75,7 @@
|
||||
<Image Source="{Binding SetUpImage}" MaxWidth="300"/>
|
||||
|
||||
<ItemsControl Grid.Column="1" ItemsSource="{Binding PositionGroupList}"
|
||||
Style="{StaticResource HorizontalScrollViewerItemsControlStyle}">
|
||||
Style="{StaticResource HorizontalScrollViewerItemsControlStyle}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
@@ -100,7 +100,8 @@
|
||||
|
||||
<TextBlock Text="{Binding TcPos}"/>
|
||||
<ItemsControl Grid.Column="1" ItemsSource="{Binding ExitToolAssociationList}"
|
||||
HorizontalAlignment="Left">
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource VerticalScrollViewerItemsControlStyle}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<!--<WrapPanel Orientation="Horizontal" MaxWidth="200"/>-->
|
||||
@@ -123,7 +124,7 @@
|
||||
Background="{Binding ExitBtnBackgroundCol}"
|
||||
Style="{StaticResource EgtCAM5_SetUpToggleButton}"/>
|
||||
<Border x:Name="ToolBorder" Grid.Column="1" BorderBrush="{StaticResource EgaltechBlue1}"
|
||||
BorderThickness="1" ToolTip="{Binding ToolTipMsg}">
|
||||
BorderThickness="1" ToolTip="{Binding ToolTipMsg}" Margin="0,0,5,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Setter Property="Visibility" Value="Hidden"/>
|
||||
|
||||
+3
-3
@@ -345,7 +345,7 @@ Public Class SetUpVM
|
||||
Dim sToolList As New List(Of String)
|
||||
Dim sToolNameList As New List(Of String)
|
||||
' la spezzo sui ;
|
||||
Dim sItems() As String = sPosition.Split(";".ToCharArray)
|
||||
Dim sItems() As String = sPosition.Split(";"c)
|
||||
' se c'è almeno un elemento sono sicuro che ci sia la T
|
||||
If sItems.Count() >= 1 Then
|
||||
Dim nGroup As Integer = 0
|
||||
@@ -365,13 +365,13 @@ Public Class SetUpVM
|
||||
' se ci sono almeno tre elementi sono sicuro che ci sia almeno un'uscita attrezzata
|
||||
If sItems.Count >= 3 Then
|
||||
' separo le uscite divise dalla ,
|
||||
Dim sExitToolAssList() As String = sItems(2).Split(",".ToCharArray)
|
||||
Dim sExitToolAssList() As String = sItems(2).Split(","c)
|
||||
sExitList.Clear()
|
||||
sToolList.Clear()
|
||||
sToolNameList.Clear()
|
||||
' creo le liste di uscite e utensili attrezzati ricavati
|
||||
For AssIndex = 0 To sExitToolAssList.Count() - 1
|
||||
Dim sExitToolAssItem() As String = sExitToolAssList(AssIndex).Split("/".ToCharArray)
|
||||
Dim sExitToolAssItem() As String = sExitToolAssList(AssIndex).Split("/"c)
|
||||
If sExitToolAssItem.Count > 1 Then
|
||||
sExitList.Add(sExitToolAssItem(0))
|
||||
sToolList.Add(sExitToolAssItem(1))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module Beam
|
||||
|
||||
@@ -20,10 +21,9 @@ Module Beam
|
||||
Friend Function ExecBeam(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean) As Boolean
|
||||
EgtOutLog("-- Start ExecBeam --")
|
||||
' Recupero lo script da eseguire
|
||||
Dim sExecPath As String = ""
|
||||
Dim sExecName As String = ""
|
||||
GetPrivateProfileString(S_BEAM, If( bBtl, K_BEAMBTLEXEC, K_BEAMBWEEXEC), "", sExecName)
|
||||
sExecPath = (IniFile.m_sBeamDirPath & "\" & sExecName).TrimEnd({"\"c})
|
||||
GetPrivateProfileString(S_BEAM, If(bBtl, K_BEAMBTLEXEC, K_BEAMBWEEXEC), "", sExecName)
|
||||
Dim sExecPath As String = (IniFile.m_sBeamDirPath & "\" & sExecName).TrimEnd({"\"c})
|
||||
If Not My.Computer.FileSystem.FileExists(sExecPath) Then
|
||||
EgtOutLog("Not found BeamExec script " & sExecPath)
|
||||
Return False
|
||||
@@ -32,9 +32,12 @@ Module Beam
|
||||
Map.refManageLayerExpanderVM.ClearObjTree()
|
||||
' Assegno i dati
|
||||
EgtLuaCreateGlobTable("BEAM")
|
||||
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamDirPath)
|
||||
EgtLuaSetGlobStringVar("BEAM.FILE", sFile)
|
||||
EgtLuaSetGlobStringVar("BEAM.MACHINE", sMachine)
|
||||
EgtLuaSetGlobIntVar("BEAM.FLAG", nFlag)
|
||||
' variabile che comunica al lua che e' stato avviato da interfaccia BEAMWALL (per gestione messaggi errore lua)
|
||||
If Not bBtl Then EgtLuaSetGlobBoolVar("BEAM.BW", True)
|
||||
' Eseguo lo script
|
||||
Dim bOk As Boolean = False
|
||||
If EgtLuaExecFile(sExecPath) Then
|
||||
@@ -67,15 +70,15 @@ Module Beam
|
||||
' verifico se ci sono i file ini
|
||||
Dim sMachTypePath As String = sBaseDir & "\MachiningTypes.ini"
|
||||
Dim sTabTemplPath As String = sBaseDir & "\BeamTableTemplate.ini"
|
||||
If File.Exists( sMachTypePath) AndAlso File.Exists( sTabTemplPath) Then
|
||||
If File.Exists(sMachTypePath) AndAlso File.Exists(sTabTemplPath) Then
|
||||
' apro finestra di gestione lavorazioni travi
|
||||
Dim sTitle = EgtMsg( 9000) 'Tabelle delle lavorazioni delle travi
|
||||
Dim BeamMchsWinVM As New BeamMachiningsWindowVM( sTitle, sBaseDir, sMachTypePath, sTabTemplPath)
|
||||
Dim BeamMchsWinV As New BeamMachiningsWindowV( Application.Current.MainWindow, BeamMchsWinVM)
|
||||
Dim sTitle = EgtMsg(9000) 'Tabelle delle lavorazioni delle travi
|
||||
Dim BeamMchsWinVM As New BeamMachiningsWindowVM(sTitle, sBaseDir, sMachTypePath, sTabTemplPath)
|
||||
Dim BeamMchsWinV As New BeamMachiningsWindowV(Application.Current.MainWindow, BeamMchsWinVM)
|
||||
BeamMchsWinV.ShowDialog()
|
||||
Else
|
||||
' Impossibile aprire l'Editor delle lavorazioni delle travi.<br/>Mancano i file di configurazione. - Errore
|
||||
MessageBox.Show( EgtMsg( 9009), EgtMsg( 9008), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
MessageBox.Show(EgtMsg(9009), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<UserControl x:Class="BeamPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="BeamPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding BeamPanel_Visibility}">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
@@ -17,4 +19,4 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class BeamPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Friend Const BEAM_PROCESS As String = "Beam\Process.lua"
|
||||
Friend Const BEAM_MACHININGS As String = "BeamMachinings"
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
@@ -12,7 +14,20 @@ Public Class BeamPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_BeamPanel_Visibility As Visibility
|
||||
Public ReadOnly Property BeamPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_BeamPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetBeamPanelVisibility(bValue As Boolean)
|
||||
m_BeamPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(BeamPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefBeamPanelVM(Me)
|
||||
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
||||
If IniFile.IsActiveBeam() Then
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<UserControl x:Class="BeamWallPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="BeamWallPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding BeamWallPanel_Visibility}">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
@@ -17,4 +19,4 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class BeamWallPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||
@@ -10,14 +11,27 @@ Public Class BeamWallPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_BeamWallPanel_Visibility As Visibility
|
||||
Public ReadOnly Property BeamWallPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_BeamWallPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetBeamWallPanelVisibility(bValue As Boolean)
|
||||
m_BeamWallPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(BeamWallPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefBeamWallPanelVM(Me)
|
||||
' Se attivo Beam o Wall, inizializzo i bottoni leggendoli da file ini
|
||||
If IniFile.IsActiveBeam() Or IniFile.IsActiveWall() Then
|
||||
GetPrivateProfileString( S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath)
|
||||
GetPrivateProfileString(S_BEAMWALL, K_BEAMWALLBASEDIR, "", m_sBeamWallDirPath)
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonItem = Nothing
|
||||
While GetPrivateProfileButton( S_BEAMWALL, K_BEAMWALLBUTTON & BtnIndex, IniFile.m_sBeamWallDirPath, CurrBtn)
|
||||
While GetPrivateProfileButton(S_BEAMWALL, K_BEAMWALLBUTTON & BtnIndex, IniFile.m_sBeamWallDirPath, CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
End While
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module Wall
|
||||
|
||||
@@ -22,7 +23,7 @@ Module Wall
|
||||
' Recupero lo script da eseguire
|
||||
Dim sExecPath As String = ""
|
||||
Dim sExecName As String = ""
|
||||
GetPrivateProfileString(S_WALL, If( bBtl, K_WALLBTLEXEC, K_WALLBWEEXEC), "", sExecName)
|
||||
GetPrivateProfileString(S_WALL, If(bBtl, K_WALLBTLEXEC, K_WALLBWEEXEC), "", sExecName)
|
||||
sExecPath = (IniFile.m_sWallDirPath & "\" & sExecName).TrimEnd({"\"c})
|
||||
If Not My.Computer.FileSystem.FileExists(sExecPath) Then
|
||||
EgtOutLog("Not found WallExec script " & sExecPath)
|
||||
@@ -32,9 +33,12 @@ Module Wall
|
||||
Map.refManageLayerExpanderVM.ClearObjTree()
|
||||
' Assegno i dati
|
||||
EgtLuaCreateGlobTable("WALL")
|
||||
EgtLuaSetGlobStringVar("WALL.BASEDIR", IniFile.m_sWallDirPath)
|
||||
EgtLuaSetGlobStringVar("WALL.FILE", sFile)
|
||||
EgtLuaSetGlobStringVar("WALL.MACHINE", sMachine)
|
||||
EgtLuaSetGlobIntVar("WALL.FLAG", nFlag)
|
||||
' variabile che comunica al lua che e' stato avviato da interfaccia BEAMWALL (per gestione messaggi errore lua)
|
||||
If Not bBtl Then EgtLuaSetGlobBoolVar("WALL.BW", True)
|
||||
' Eseguo lo script
|
||||
Dim bOk As Boolean = False
|
||||
If EgtLuaExecFile(sExecPath) Then
|
||||
@@ -67,15 +71,15 @@ Module Wall
|
||||
' verifico se ci sono i file ini
|
||||
Dim sMachTypePath As String = sBaseDir & "\MachiningTypes.ini"
|
||||
Dim sTabTemplPath As String = sBaseDir & "\WallTableTemplate.ini"
|
||||
If File.Exists( sMachTypePath) AndAlso File.Exists( sTabTemplPath) Then
|
||||
If File.Exists(sMachTypePath) AndAlso File.Exists(sTabTemplPath) Then
|
||||
' apro finestra di gestione lavorazioni pareti
|
||||
Dim sTitle = EgtMsg( 9010) 'Tabelle delle lavorazioni delle pareti
|
||||
Dim WallMchsWinVM As New BeamMachiningsWindowVM( sTitle, sBaseDir, sMachTypePath, sTabTemplPath, False)
|
||||
Dim WallMchsWinV As New BeamMachiningsWindowV( Application.Current.MainWindow, WallMchsWinVM)
|
||||
Dim sTitle = EgtMsg(9010) 'Tabelle delle lavorazioni delle pareti
|
||||
Dim WallMchsWinVM As New BeamMachiningsWindowVM(sTitle, sBaseDir, sMachTypePath, sTabTemplPath, False)
|
||||
Dim WallMchsWinV As New BeamMachiningsWindowV(Application.Current.MainWindow, WallMchsWinVM)
|
||||
WallMchsWinV.ShowDialog()
|
||||
Else
|
||||
' Impossibile aprire l'Editor delle lavorazioni delle pareti.<br/>Mancano i file di configurazione. - Errore
|
||||
MessageBox.Show( EgtMsg( 9011), EgtMsg( 9008), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
MessageBox.Show(EgtMsg(9011), EgtMsg(9008), MessageBoxButton.OK, MessageBoxImage.Stop)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<UserControl x:Class="WallPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="WallPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding WallPanel_Visibility}">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
@@ -17,4 +19,4 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class WallPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Friend Const WALL_MACHININGS As String = "WallMachinings"
|
||||
|
||||
@@ -12,7 +13,20 @@ Public Class WallPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_WallPanel_Visibility As Visibility
|
||||
Public ReadOnly Property WallPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_WallPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetWallPanelVisibility(bValue As Boolean)
|
||||
m_WallPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(WallPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefWallPanelVM(Me)
|
||||
' Se attivo, inizializzo i bottoni leggendoli da file ini
|
||||
If IniFile.IsActiveWall() Then
|
||||
' Inizializzo i bottoni leggendoli da file ini
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<UserControl x:Class="DoorPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="DoorPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding DoorPanel_Visibility}">
|
||||
|
||||
<!--Barra superiore dei comandi-->
|
||||
<StackPanel Background="Transparent" Orientation="Horizontal">
|
||||
@@ -18,4 +20,4 @@
|
||||
IsEnabled="{Binding MTableDb_IsEnabled}"/>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -31,6 +31,17 @@ Public Class DoorPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DoorPanel_Visibility As Visibility
|
||||
Public ReadOnly Property DoorPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_DoorPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetDoorPanelVisibility(bValue As Boolean)
|
||||
m_DoorPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
OnPropertyChanged(NameOf(DoorPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdDoors As ICommand
|
||||
Private m_cmdDMach As ICommand
|
||||
|
||||
+11
-2
@@ -17,7 +17,7 @@ Imports EgtUILib
|
||||
|
||||
Public Module Doors
|
||||
|
||||
Function ExecDoors(ByRef scene As Scene, sFilePath As String) As Integer
|
||||
Function ExecDoors(ByRef scene As Scene, sFilePath As String, Optional bNcGen As Boolean = False, Optional bBatch As Boolean = False, Optional nProbing As Integer = 0) As Integer
|
||||
' Scelta file DDF
|
||||
Dim sFile As String
|
||||
' Se sFilePath non vuoto apro questo file
|
||||
@@ -44,7 +44,7 @@ Public Module Doors
|
||||
' Cursore attesa
|
||||
scene.Cursor = System.Windows.Forms.Cursors.WaitCursor
|
||||
' Creazione porta
|
||||
Dim nErr As Integer = CreateDoors(sFile, False, False, 0)
|
||||
Dim nErr As Integer = CreateDoors(sFile, bNcGen, bBatch, nProbing)
|
||||
' Scrivo il nome del file aperto in una variabile globale per averlo in caso di errore
|
||||
IniFile.m_DDFFilePath = sFile
|
||||
EgtResetCurrPartLayer()
|
||||
@@ -63,6 +63,8 @@ Public Module Doors
|
||||
GetPrivateProfileString(S_DOORS, K_DDFEXEC, "", sExecName)
|
||||
sExecPath = IniFile.m_sDoorsDirPath & "\" & sExecName
|
||||
Dim nErr As Integer = 999
|
||||
EgtLuaCreateGlobTable("DGD")
|
||||
EgtLuaSetGlobStringVar("DGD.BASEDIR", IniFile.m_sDoorsDirPath & "\")
|
||||
If Not EgtLuaExecFile(sExecPath) Then Return nErr
|
||||
' Lancio la creazione
|
||||
EgtLuaSetGlobStringVar("DGD.FILE", sDdfFile)
|
||||
@@ -111,7 +113,14 @@ Public Module Doors
|
||||
Dim sExecName As String = String.Empty
|
||||
GetPrivateProfileString(S_DOORS, K_DDFMACHEXEC, "", sExecName)
|
||||
sExecPath = IniFile.m_sDoorsDirPath & "\" & sExecName
|
||||
Dim nErr As Integer = 999
|
||||
EgtLuaCreateGlobTable("DGD")
|
||||
EgtLuaSetGlobStringVar("DGD.BASEDIR", IniFile.m_sDoorsDirPath & "\")
|
||||
Dim bOk As Boolean = EgtLuaExecFile(sExecPath)
|
||||
If bOk Then EgtLuaGetGlobIntVar("DGD.ERR", nErr)
|
||||
EgtOutLog("Doors Err=" & nErr.ToString())
|
||||
' Cancello variabile globale
|
||||
EgtLuaResetGlobVar("DGD")
|
||||
' Cursore standard
|
||||
scene.Cursor = System.Windows.Forms.Cursors.Default
|
||||
Return bOk
|
||||
|
||||
@@ -193,20 +193,6 @@ Public Class MTableListBoxItem
|
||||
Return ReadDoorsTable(Me)
|
||||
End Function
|
||||
|
||||
Private Function SearchKey(sLine As String, sKey As String) As String
|
||||
Dim x = Regex.Match(sLine, "[,|{|\s]" & sKey & "\s*=\s*['|\""]?(.*?)\s*?[,|}|'|\""]").Groups(1).Value
|
||||
Return Regex.Match(sLine, "[,|{|\s]" & sKey & "\s*=\s*['|\""]?(.*?)\s*?[,|}|'|\""]").Groups(1).Value
|
||||
End Function
|
||||
|
||||
Public Function CountCharacter(ByVal sLine As String, ByVal cValue As Char) As Integer
|
||||
Dim nCount As Integer = 0
|
||||
Dim cArray() As Char = sLine.ToCharArray
|
||||
For Index As Integer = 0 To cArray.Count - 1
|
||||
If cArray(Index) = cValue Then nCount += 1
|
||||
Next
|
||||
Return nCount
|
||||
End Function
|
||||
|
||||
Public Function IsModified() As Boolean
|
||||
Dim CurrIsModified As Boolean = False
|
||||
' verifico se ci sono stati cambiamenti nell'ordine delle lavorazioni
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module TableUtility
|
||||
|
||||
@@ -278,19 +279,6 @@ Module TableUtility
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Function SearchKey(sLine As String, sKey As String) As String
|
||||
Return Regex.Match(sLine, "[,|{|\s]" & sKey & "\s*=\s*['|\""]?(.*?)\s*?[,|}|'|\""]").Groups(1).Value
|
||||
End Function
|
||||
|
||||
Public Function CountCharacter(ByVal sLine As String, ByVal cValue As Char) As Integer
|
||||
Dim nCount As Integer = 0
|
||||
Dim cArray() As Char = sLine.ToCharArray
|
||||
For Index As Integer = 0 To cArray.Count - 1
|
||||
If cArray(Index) = cValue Then nCount += 1
|
||||
Next
|
||||
Return nCount
|
||||
End Function
|
||||
|
||||
Friend Sub WriteDoorTable(SelectedTable As MTableListBoxItem, sTableNamePath As String)
|
||||
' controllo e correggo indici gruppi
|
||||
CheckGroupIndex(SelectedTable)
|
||||
|
||||
@@ -167,6 +167,32 @@ Module GunStock
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Function ExecGunStockCopy(ByRef scene As Scene, sFilePath As String, sDirDest As String) As Boolean
|
||||
|
||||
' Carico ambiente lua per Gunstock
|
||||
If Not LoadGunStock() Then
|
||||
MessageBox.Show(EgtMsg(8252), EgtMsg(8251), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtOutLog("Error in LoadGunStock")
|
||||
Return False
|
||||
End If
|
||||
|
||||
' Eseguo la copia
|
||||
scene.Cursor = System.Windows.Forms.Cursors.WaitCursor
|
||||
EgtLuaSetGlobStringVar("GGD.PEZFILE", sFilePath)
|
||||
EgtLuaSetGlobStringVar("GGD.COPYDIR", sDirDest)
|
||||
Dim sFunction As String = String.Empty
|
||||
GetPrivateProfileString(S_GUNSTOCK, K_COPYFUNCTION, "", sFunction)
|
||||
Dim bOk As Boolean = EgtLuaExecLine(sFunction)
|
||||
Dim nErr As Integer = 999
|
||||
If Not EgtLuaGetGlobIntVar("GGD.ERR", nErr) Or nErr <> 0 Then bOk = False
|
||||
EgtOutLog("Gunstock Err=" & nErr.ToString())
|
||||
' Cancello variabile globale
|
||||
EgtLuaResetGlobVar("GGD")
|
||||
scene.Cursor = System.Windows.Forms.Cursors.Default
|
||||
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function LoadGunStock() As Boolean
|
||||
' Cancello ambiente Gunstock globale
|
||||
EgtLuaResetGlobVar("GGD")
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
<UserControl x:Class="GunStockPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="GunStockPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding GunStockPanel_Visibility}">
|
||||
|
||||
<StackPanel Background="Transparent" Orientation="Horizontal">
|
||||
<!--<Button Command="{Binding GunStockCommand}" Style="{StaticResource GridViewPanelButton}"
|
||||
Width="70" Content="GUNSTOCK" ContextMenuService.Placement="Bottom">
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding MruGunStockNames}" ItemContainerStyle="{StaticResource MruGunStockItem}">
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
</Button>-->
|
||||
<Button Command="{Binding NewGunStockCommand}" Style="{StaticResource GridViewPanelButton}"
|
||||
Width="70" Content="{Binding NewGunStockMsg}" ContextMenuService.Placement="Bottom"
|
||||
ToolTip="{Binding NewGunStockToolTip}">
|
||||
@@ -28,6 +23,10 @@
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
</Button>
|
||||
<Button Command="{Binding CopyGunStockCommand}" Style="{StaticResource GridViewPanelButton}"
|
||||
Width="70" Content="{Binding CopyGunStockMsg}" ContextMenuService.Placement="Bottom"
|
||||
ToolTip="{Binding CopyGunStockToolTip}" Visibility="{Binding CopyGunStock_Visibility}">
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -16,16 +16,40 @@ Public Class GunStockPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CopyGunStock_Visibility As Visibility
|
||||
Get
|
||||
Dim sFunction As String = String.Empty
|
||||
GetPrivateProfileString(S_GUNSTOCK, K_COPYFUNCTION, "", sFunction)
|
||||
Return If(String.IsNullOrWhiteSpace(sFunction), Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_GunStockPanel_Visibility As Visibility
|
||||
Public ReadOnly Property GunStockPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_GunStockPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetGunStockPanelVisibility(bValue As Boolean)
|
||||
m_GunStockPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
OnPropertyChanged(NameOf(GunStockPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property NewGunStockMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_GUNSTOCK + 1)
|
||||
Return EgtMsg(8201)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ModifyGunStockMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_GUNSTOCK + 3)
|
||||
Return EgtMsg(8203)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CopyGunStockMsg As String
|
||||
Get
|
||||
Return EgtMsg(8214)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -35,23 +59,35 @@ Public Class GunStockPanelVM
|
||||
|
||||
Public ReadOnly Property NewGunStockToolTip As String
|
||||
Get
|
||||
Return EgtMsg(MSG_GUNSTOCK + 2)
|
||||
Return EgtMsg(8202)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ModifyGunStockToolTip As String
|
||||
Get
|
||||
Return EgtMsg(MSG_GUNSTOCK + 4)
|
||||
Return EgtMsg(8204)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CopyGunStockToolTip As String
|
||||
Get
|
||||
Return EgtMsg(8215)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNewGunStock As ICommand
|
||||
Private m_cmdModifyGunStock As ICommand
|
||||
Private m_cmdCopyGunStock As ICommand
|
||||
Private Shared m_cmdOpenMruNewGunStock As ICommand
|
||||
Private Shared m_cmdOpenMruModifyGunStock As ICommand
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefGunStockPanelVM(Me)
|
||||
End Sub
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "NewGunStockCommand"
|
||||
@@ -100,6 +136,33 @@ Public Class GunStockPanelVM
|
||||
|
||||
#End Region ' ModifyGunStockCommand
|
||||
|
||||
#Region "CopyGunStockCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that Copy Part Program files.
|
||||
''' </summary>
|
||||
Public ReadOnly Property CopyGunStockCommand As ICommand
|
||||
Get
|
||||
If m_cmdCopyGunStock Is Nothing Then
|
||||
m_cmdCopyGunStock = New RelayCommand(AddressOf CopyGunStock)
|
||||
End If
|
||||
Return m_cmdCopyGunStock
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Copy Part Program files. This method is invoked by the CopyGunStockCommand.
|
||||
''' </summary>
|
||||
Public Sub CopyGunStock(ByVal param As Object)
|
||||
Dim sFilePath As String = ""
|
||||
IniFile.m_MruModifyGunStock.GetFileName(0, sFilePath)
|
||||
Dim sDirDest As String = ""
|
||||
GetPrivateProfileString(S_GUNSTOCK, K_COPYDIR, "", sDirDest)
|
||||
Map.refProjectVM.GunStockCopy(sFilePath, sDirDest)
|
||||
End Sub
|
||||
|
||||
#End Region ' CopyGunStockCommand
|
||||
|
||||
#Region "OpenMruNewGunStockCommand"
|
||||
|
||||
''' <summary>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<UserControl x:Class="SpecialPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<EgtFloating:EgtFloatingPanel x:Class="SpecialPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
Visibility="{Binding SpecialPanel_Visibility}">
|
||||
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
@@ -18,4 +20,4 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</UserControl>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class SpecialPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||
@@ -10,6 +11,17 @@ Public Class SpecialPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_SpecialPanel_Visibility As Visibility
|
||||
Public ReadOnly Property SpecialPanel_Visibility As Visibility
|
||||
Get
|
||||
Return m_SpecialPanel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetSpecialPanelVisibility(bValue As Boolean)
|
||||
m_SpecialPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(SpecialPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefSpecialPanelVM(Me)
|
||||
@@ -31,12 +43,14 @@ Public Class SpecialPanelVM
|
||||
For Each BtnItem In m_ButtonList
|
||||
' verifico il valore di nDrawMachOrBoth del bottone e IsMachMode per rendere visibile o meno il bottone in ButtonList
|
||||
Select Case BtnItem.nDrawMachOrBoth
|
||||
Case 0 ' bottone visibile sia in Draw che in Machining
|
||||
BtnItem.m_Btn_Visibility = Visibility.Visible
|
||||
Case 0 ' bottone nascosto
|
||||
BtnItem.m_Btn_Visibility = Visibility.Collapsed
|
||||
Case 1 ' bottone visibile solo in Draw
|
||||
BtnItem.m_Btn_Visibility = If(Not IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
||||
Case 2 ' bottone visibile solo in Machining
|
||||
BtnItem.m_Btn_Visibility = If(IsMachMode, Visibility.Visible, Visibility.Collapsed)
|
||||
Case 3 ' bottone visibile sia in Draw che in Machining
|
||||
BtnItem.m_Btn_Visibility = Visibility.Visible
|
||||
End Select
|
||||
' se anche uno solo è visibile anche lo SpecialPanel dovrà esserlo
|
||||
If BtnItem.Btn_Visibility = Visibility.Visible Then bSpecialPanel_Visible = True
|
||||
@@ -59,6 +73,10 @@ End Class
|
||||
Public Class ButtonItem
|
||||
Inherits ViewModelBase
|
||||
|
||||
Friend Shared WithEvents m_ProjectVM As ProjectVM
|
||||
Private Shared m_sCurrBarName As String
|
||||
|
||||
Private m_sBarName As String
|
||||
Private m_sImagePath As String
|
||||
Public ReadOnly Property ImagePath As String
|
||||
Get
|
||||
@@ -95,9 +113,16 @@ Public Class ButtonItem
|
||||
' Definizione comandi
|
||||
Private m_cmdLuaExec As ICommand
|
||||
|
||||
Sub New(sLuaCmdPath As String, sImagePath As String, sToolTip As String, sDrawMachOrBoth As String)
|
||||
Sub New( sBarName As String, sLuaCmdPath As String, sImagePath As String, sToolTip As String, sDrawMachOrBoth As String)
|
||||
m_sBarName = sBarName
|
||||
If File.Exists(sImagePath) Then
|
||||
m_sImagePath = sImagePath
|
||||
' per lasciare libere le immagini le copio (potrebbe fallire perchè bloccate da altro eseguibile)
|
||||
Dim sNewPath As String = Path.Combine(IniFile.m_sResourcesRoot, sBarName & "_" & Path.GetFileName( sImagePath))
|
||||
Try
|
||||
File.Copy( sImagePath, sNewPath, True)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
m_sImagePath = sNewPath
|
||||
Else
|
||||
m_sImagePath = IniFile.m_sResourcesRoot & "\" & sImagePath
|
||||
End If
|
||||
@@ -131,16 +156,40 @@ Public Class ButtonItem
|
||||
If m_sLuaCmdPath = BeamPanelVM.BEAM_MACHININGS Then
|
||||
Beam.BeamMachDb()
|
||||
Return
|
||||
' se altrimenti per pareti
|
||||
' se altrimenti per pareti
|
||||
ElseIf m_sLuaCmdPath = WallPanelVM.WALL_MACHININGS Then
|
||||
Wall.WallMachDb()
|
||||
Return
|
||||
End If
|
||||
If Not File.Exists(m_sLuaCmdPath) Then Return
|
||||
If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then Return
|
||||
' Abilito eventi se comando lua termina con Beam\Process.lua
|
||||
m_sCurrBarName = m_sBarName
|
||||
Dim bRaiseEvent As Boolean = ( m_sBarName = "Beam" OrElse m_sBarName = "Wall")
|
||||
' eseguo file Lua
|
||||
Map.refProjectVM.PreExecScript(False)
|
||||
Map.refProjectVM.ExecScript(m_sLuaCmdPath)
|
||||
Map.refProjectVM.ExecScript(m_sLuaCmdPath, bRaiseEvent)
|
||||
m_sCurrBarName = Nothing
|
||||
End Sub
|
||||
|
||||
Private Shared Sub OnPreControllerExec(sFilePath As String) Handles m_ProjectVM.OnPreControllerExec
|
||||
If m_sCurrBarName = "Beam" Then
|
||||
EgtLuaCreateGlobTable("BEAM")
|
||||
EgtLuaSetGlobStringVar("BEAM.BASEDIR", IniFile.m_sBeamDirPath)
|
||||
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 then EgtLuaSetGlobBoolVar("BEAM.BW", true)
|
||||
ElseIf m_sCurrBarName = "Wall" Then
|
||||
EgtLuaCreateGlobTable("WALL")
|
||||
EgtLuaSetGlobStringVar("WALL.BASEDIR", IniFile.m_sWallDirPath)
|
||||
If EgtGetUserLevel() >= 9 AndAlso GetPrivateProfileInt(S_LUA, K_BWSIM, 0) = 1 then EgtLuaSetGlobBoolVar("WALL.BW", true)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Shared Sub OnPostControllerExec() Handles m_ProjectVM.OnPostControllerExec
|
||||
If m_sCurrBarName = "Beam" Then
|
||||
EgtLuaResetGlobVar("BEAM")
|
||||
ElseIf m_sCurrBarName = "Wall" Then
|
||||
EgtLuaResetGlobVar("WALL")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' LuaExecCommand
|
||||
|
||||
@@ -76,7 +76,7 @@ Module ToolsUpdate
|
||||
' Leggo la linea
|
||||
Dim sLine As String = sr.ReadLine()
|
||||
' La divido usando come separatore ';'
|
||||
Dim sItems() As String = sLine.Split(";".ToCharArray)
|
||||
Dim sItems() As String = sLine.Split(";"c)
|
||||
' Ci devono essere almeno tre parti
|
||||
If sItems.Count() < 3 Then Continue Do
|
||||
' Leggo i valori
|
||||
|
||||
@@ -2,15 +2,17 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Orientation="Horizontal">
|
||||
|
||||
|
||||
<!--Barra superiore dei comandi-->
|
||||
<UniformGrid Rows="1"
|
||||
Visibility="{Binding ProjectManager_Visibility}">
|
||||
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}"
|
||||
IsEnabled="{Binding DrawIsChecked}">
|
||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||
IsEnabled="{Binding DrawIsChecked}">
|
||||
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding OpenCommand}" ToolTip="{Binding OpenToolTip}"
|
||||
ContextMenuService.Placement="Bottom" IsEnabled="{Binding DrawIsChecked}"
|
||||
Tag="{Binding}">
|
||||
ContextMenuService.Placement="Bottom" IsEnabled="{Binding DrawIsChecked}"
|
||||
Tag="{Binding}">
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding MruFileNames}">
|
||||
<ContextMenu.Resources>
|
||||
@@ -33,31 +35,36 @@
|
||||
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding InsertCommand}" ToolTip="{Binding InsertToolTip}"
|
||||
IsEnabled="{Binding DrawIsChecked}">
|
||||
IsEnabled="{Binding DrawIsChecked}">
|
||||
<Image Source="/Resources/TopCommandBar/Insert.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding ImportCommand}" ToolTip="{Binding ImportToolTip}"
|
||||
IsEnabled="{Binding DrawIsChecked}">
|
||||
IsEnabled="{Binding DrawIsChecked}">
|
||||
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding ExportCommand}" ToolTip="{Binding ExportToolTip}"
|
||||
IsEnabled="{Binding DrawIsChecked}">
|
||||
IsEnabled="{Binding DrawIsChecked}">
|
||||
<Image Source="/Resources/TopCommandBar/Export.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}"
|
||||
IsEnabled="{Binding SaveIsEnabled}">
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||
<Button Command="{Binding PrintCommand}" ToolTip="{Binding PrintToolTip}"
|
||||
IsEnabled="True">
|
||||
<Image Source="/Resources/TopCommandBar/Print.png" Height="22" />
|
||||
</Button>
|
||||
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}"
|
||||
IsEnabled="{Binding SaveIsEnabled}">
|
||||
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
|
||||
</Button>
|
||||
<UniformGrid Rows="1">
|
||||
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding DrawMsg}"
|
||||
IsChecked="{Binding DrawIsChecked}" IsEnabled="{Binding DrawIsEnabled}"/>
|
||||
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding MachiningMsg}"
|
||||
IsChecked="{Binding MachiningIsChecked}" IsEnabled="{Binding MachiningIsEnabled}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}"
|
||||
IsEnabled="{Binding SaveIsEnabled}">
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||
</Button>
|
||||
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}"
|
||||
IsEnabled="{Binding SaveIsEnabled}">
|
||||
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
|
||||
</Button>
|
||||
<UniformGrid Rows="1">
|
||||
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding DrawMsg}"
|
||||
IsChecked="{Binding DrawIsChecked}" IsEnabled="{Binding DrawIsEnabled}"/>
|
||||
<RadioButton Style="{StaticResource ModeButton}" Content="{Binding MachiningMsg}"
|
||||
IsChecked="{Binding MachiningIsChecked}" IsEnabled="{Binding MachiningIsEnabled}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -15,6 +15,17 @@ Public Class TopCommandBarVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ProjectManager_Visibility As Visibility = Visibility.Visible
|
||||
Public ReadOnly Property ProjectManager_Visibility As Visibility
|
||||
Get
|
||||
Return m_ProjectManager_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetProjectManagerVisibility(bValue As Boolean)
|
||||
m_ProjectManager_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
OnPropertyChanged(NameOf(ProjectManager_Visibility))
|
||||
End Sub
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNew As ICommand
|
||||
Private m_cmdOpen As ICommand
|
||||
@@ -24,6 +35,7 @@ Public Class TopCommandBarVM
|
||||
Private m_cmdInsert As ICommand
|
||||
Private m_cmdImport As ICommand
|
||||
Private m_cmdExport As ICommand
|
||||
Private m_cmdPrint As ICommand
|
||||
Private m_cmdOptions As ICommand
|
||||
Private m_cmdSendFeedback As ICommand
|
||||
|
||||
@@ -80,6 +92,11 @@ Public Class TopCommandBarVM
|
||||
Return EgtMsg(MSG_TOPCOMMANDBAR + 7)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property PrintToolTip As String
|
||||
Get
|
||||
Return EgtMsg(MSG_TOPCOMMANDBAR + 15)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property OptionsToolTip As String
|
||||
Get
|
||||
Return EgtMsg(MSG_TOPCOMMANDBAR + 9)
|
||||
@@ -191,10 +208,18 @@ Public Class TopCommandBarVM
|
||||
|
||||
Private Sub SetMachiningMode(value As Boolean)
|
||||
If value Then
|
||||
' Flag creazione nuovo gruppo vuoto
|
||||
Dim bAllowEmpty As Boolean = (Keyboard.IsKeyDown(Key.LeftShift) OrElse Keyboard.IsKeyDown(Key.RightShift))
|
||||
' Cerco di preimpostare come corrente la macchina opportuna
|
||||
If Not bAllowEmpty AndAlso EgtGetSelectedObjCount() = 0 AndAlso EgtGetMachGroupCount() > 0 Then
|
||||
Dim sMachineName As String = ""
|
||||
if EgtGetMachGroupMachineName( EgtGetLastMachGroup(), sMachineName) Then
|
||||
Map.refMachinePanelVM.SelectedMachine = Map.refMachinePanelVM.MachinesList.FirstOrDefault(Function(x) x.Name = sMachineName)
|
||||
End If
|
||||
End If
|
||||
' Eventuale esecuzione script prima di inizio Mach
|
||||
ExecInitMachScript()
|
||||
' Inizializzazione gruppo/i di lavoro
|
||||
Dim bAllowEmpty As Boolean = (Keyboard.IsKeyDown(Key.LeftShift) OrElse Keyboard.IsKeyDown(Key.RightShift))
|
||||
Map.refMachGroupPanelVM.InitMachGroupList(bAllowEmpty)
|
||||
' Se non riuscito il passaggio al Machining, lancio lo script di uscita
|
||||
If EgtGetCurrMachGroup() = GDB_ID.NULL Then
|
||||
@@ -203,13 +228,13 @@ Public Class TopCommandBarVM
|
||||
' altrimenti, aggiusto...
|
||||
Else
|
||||
' se parametri di una lavorazione aperti, disattivo database utensili, lavorazioni e setup
|
||||
Dim bIsEnabled As Boolean = Not Map.refOperationParametersExpanderVM.ParametersIsExpanded
|
||||
Dim bIsEnabled As Boolean = Not IsNothing(Map.refOperationParametersExpanderVM) AndAlso Not Map.refOperationParametersExpanderVM.ParametersIsExpanded
|
||||
Map.refMachinePanelVM.ToolMachSetUpIsEnabled(bIsEnabled, bIsEnabled, bIsEnabled)
|
||||
' se parametri di una lavorazione aperti, disattivo MTable e SpecialPanel
|
||||
Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled)
|
||||
Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled)
|
||||
If Not IsNothing(Map.refDoorPanelVM) Then Map.refDoorPanelVM.MTableIsEnabled(bIsEnabled)
|
||||
If Not IsNothing(Map.refSpecialPanelVM) Then Map.refSpecialPanelVM.SpecialPanelIsEnabled(bIsEnabled)
|
||||
End If
|
||||
Else
|
||||
Else
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Pulisco lista e geometria faccette di superfici di lavorazione corrente
|
||||
@@ -293,7 +318,7 @@ Public Class TopCommandBarVM
|
||||
''' </summary>
|
||||
Friend Sub NewCmd()
|
||||
Map.refProjectVM.GetController.NewProject(True)
|
||||
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
||||
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
||||
OnPropertyChanged("MruFileNames")
|
||||
End Sub
|
||||
|
||||
@@ -328,7 +353,7 @@ Public Class TopCommandBarVM
|
||||
Else
|
||||
Map.refProjectVM.GetController.OpenProject(sFilePath, False)
|
||||
End If
|
||||
Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
||||
If Not IsNothing(Map.refManageLayerExpanderVM) Then Map.refManageLayerExpanderVM.SelectIdInObjTreeNoMark(EgtGetCurrLayer())
|
||||
End Sub
|
||||
|
||||
#End Region ' OpenCommand
|
||||
@@ -471,10 +496,81 @@ Public Class TopCommandBarVM
|
||||
|
||||
#End Region ' ExportCommand
|
||||
|
||||
#Region "PrintCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Print.
|
||||
''' </summary>
|
||||
Public ReadOnly Property PrintCommand As ICommand
|
||||
Get
|
||||
If m_cmdPrint Is Nothing Then
|
||||
m_cmdPrint = New RelayCommand(AddressOf Print)
|
||||
End If
|
||||
Return m_cmdPrint
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Print. This method is invoked by the PrintCommand.
|
||||
''' </summary>
|
||||
Public Sub Print(ByVal param As Object)
|
||||
Dim printDlg As New PrintDialog
|
||||
Dim sPath = IniFile.m_sTempDir & "\Image.png"
|
||||
If printDlg.ShowDialog() Then
|
||||
' Recupero le dimensioni dell'area di stampa
|
||||
Dim dW As Double = printDlg.PrintableAreaWidth
|
||||
Dim dH As Double = printDlg.PrintableAreaHeight
|
||||
Try
|
||||
'Prendo l'immagine per la stampa
|
||||
Dim colWhite As New Color3d(255, 255, 255)
|
||||
Dim nImgW As Integer = 3000
|
||||
Dim nImgH As Integer = 2000
|
||||
' recupero lo stile di visualizzazione
|
||||
Dim SM_Select As SM = CType(EgtGetShowMode(), SM)
|
||||
If SM_Select <> SM.SHADING Then EgtSetLineAttribs(3)
|
||||
' eseguo cattura immagine
|
||||
Dim bOk As Boolean = EgtGetImage(SM_Select, colWhite, colWhite, nImgW, nImgH, sPath)
|
||||
' ripristino spessore linee
|
||||
Dim nLineWidth As Integer = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1)
|
||||
EgtSetLineAttribs(nLineWidth)
|
||||
' in caso di errore
|
||||
If Not bOk Then
|
||||
' Error in creating the print image
|
||||
EgtOutLog(EgtMsg(50181))
|
||||
Return
|
||||
End If
|
||||
'Metodo complesso di stampa che permette di rilasciare il file :
|
||||
' carico la bitmap e la metto in uno stream in memoria
|
||||
Dim stream As System.IO.Stream = New System.IO.MemoryStream()
|
||||
Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(sPath)
|
||||
bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Png)
|
||||
bitmap.Dispose()
|
||||
' la sposto in una BitmapImage
|
||||
Dim bitImage As New System.Windows.Media.Imaging.BitmapImage()
|
||||
bitImage.BeginInit()
|
||||
bitImage.StreamSource = stream
|
||||
bitImage.EndInit()
|
||||
' la sposto in un Visual Control
|
||||
Dim tmpImg As New Image
|
||||
tmpImg.BeginInit()
|
||||
tmpImg.Source = bitImage
|
||||
tmpImg.Stretch = Stretch.Uniform
|
||||
tmpImg.EndInit()
|
||||
' eseguo la stampa
|
||||
printDlg.PrintVisual(tmpImg, "EgtCam5-Print")
|
||||
Catch
|
||||
' Error in executing print
|
||||
EgtOutLog(EgtMsg(50182))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' PrintCommand
|
||||
|
||||
#Region "OptionsCommand"
|
||||
|
||||
''' <summary>
|
||||
''' Returns a command that do Export.
|
||||
''' Returns a command that display Options.
|
||||
''' </summary>
|
||||
Public ReadOnly Property OptionsCommand As ICommand
|
||||
Get
|
||||
@@ -486,7 +582,7 @@ Public Class TopCommandBarVM
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Export. This method is invoked by the ExportCommand.
|
||||
''' Execute the display Options. This method is invoked by the OptionsCommand.
|
||||
''' </summary>
|
||||
Public Sub Options(ByVal param As Object)
|
||||
Dim OptionsWindow As New OptionWindowV
|
||||
@@ -567,9 +663,13 @@ Public Class TopCommandBarVM
|
||||
If Not String.IsNullOrWhiteSpace(sCurrProject) Then
|
||||
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
|
||||
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
|
||||
Dim sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper()
|
||||
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
|
||||
For FileIndex = 0 To TempFiles.Count - 1
|
||||
If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
|
||||
If TempFiles(FileIndex) = sCurrProject Then Continue For
|
||||
Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper()
|
||||
If ( String.Compare(sCurrFileName, sCurrProjName) = 0 OrElse
|
||||
sCurrFileName.Contains( sCurrProjName & "_")) Then
|
||||
OtherFiles.Add(TempFiles(FileIndex))
|
||||
End If
|
||||
Next
|
||||
@@ -581,12 +681,14 @@ Public Class TopCommandBarVM
|
||||
File.Delete(sZipToCreate)
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate)
|
||||
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
' aggiungo file macchine
|
||||
For Each sMachineName As String In Machines
|
||||
Dim sMachineDir As String = IniFile.m_sMachinesRoot & "\" & sMachineName
|
||||
If Directory.Exists(sMachineDir) Then
|
||||
zip.AddItem(sMachineDir, sMachineName)
|
||||
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sMachineName, True)
|
||||
End If
|
||||
Next
|
||||
' aggiungo progetto corrente
|
||||
@@ -615,7 +717,7 @@ Public Class TopCommandBarVM
|
||||
' preparo la mail per il supporto
|
||||
Dim bEx As Boolean = False
|
||||
Try
|
||||
Dim sAddressArray As String() = sSupportAddress.Split(CType(",", Char()))
|
||||
Dim sAddressArray As String() = sSupportAddress.Split(","c)
|
||||
Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("EgtCAM5 Feedback - " & sKey)
|
||||
SendFeedbackWindow.Recipients.Add(sAddressArray(0))
|
||||
For index As Integer = 1 To sAddressArray.Length() - 1
|
||||
@@ -646,7 +748,7 @@ Public Class TopCommandBarVM
|
||||
If nErr = 0 Then
|
||||
Map.refMachinePanelVM.UpdateCurrentMachine()
|
||||
MachiningMode_IsChecked()
|
||||
Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
|
||||
If Not IsNothing(Map.refMachiningTreeExpanderVM) Then Map.refMachiningTreeExpanderVM.UpdateOperationMachiningList()
|
||||
IniFile.m_ProjectMode = ProjectModeOpt.MACHINING
|
||||
Else
|
||||
m_MachiningIsChecked = False
|
||||
@@ -672,7 +774,29 @@ Public Class TopCommandBarVM
|
||||
End If
|
||||
' ProjectV
|
||||
If Not IsNothing(Map.refProjectV) Then
|
||||
If IniFile.IsActivePlugin() Then
|
||||
For Each Panel In Map.refProjectVM.PanelList
|
||||
If TypeOf Panel Is WinFormPluginControlV Then
|
||||
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
|
||||
If Not IsNothing(WinFormPanel) Then
|
||||
WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.DRAW)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Map.refProjectV.DrawMode_IsChecked()
|
||||
Map.refMachinePanelVM.SetMachinePanelVisibility(IniFile.m_ProjectMode <> ProjectModeOpt.ONLYDRAW)
|
||||
Map.refExecutePanelVM.SetExecutePanelVisibility(GetPrivateProfileInt(S_GENERAL, K_EXECUTE, 0) = 1)
|
||||
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(False))
|
||||
Map.refBeamPanelVM.SetBeamPanelVisibility(IniFile.IsActiveBeam())
|
||||
Map.refWallPanelVM.SetWallPanelVisibility(IniFile.IsActiveWall())
|
||||
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(IniFile.IsActiveBeam() Or IniFile.IsActiveWall())
|
||||
Map.refDoorPanelVM.SetDoorPanelVisibility(IniFile.IsActiveDoors())
|
||||
Map.refGunStockPanelVM.SetGunStockPanelVisibility(IniFile.IsActiveGunStock())
|
||||
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(True)
|
||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(False)
|
||||
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(True)
|
||||
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.DRAW)
|
||||
End If
|
||||
' ProjectVM
|
||||
If Not IsNothing(Map.refProjectVM) Then
|
||||
@@ -698,11 +822,35 @@ Public Class TopCommandBarVM
|
||||
|
||||
Friend Sub MachiningMode_IsChecked()
|
||||
' ProjectV
|
||||
If IniFile.IsActivePlugin() Then
|
||||
For Each Panel In Map.refProjectVM.PanelList
|
||||
If TypeOf Panel Is WinFormPluginControlV Then
|
||||
Dim WinFormPanel As WinFormPluginControlV = TryCast(Panel, WinFormPluginControlV)
|
||||
If Not IsNothing(WinFormPanel) Then
|
||||
WinFormPanel.WinFormPluginControlVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Map.refProjectV.MachiningMode_IsChecked()
|
||||
Map.refMachinePanelVM.SetMachinePanelVisibility(True)
|
||||
Map.refExecutePanelVM.SetExecutePanelVisibility(False)
|
||||
Map.refSpecialPanelVM.SetSpecialPanelVisibility(IniFile.IsActiveSpecialPanel() And Map.refSpecialPanelVM.SetSpecialPanelButtonsVisibility(True))
|
||||
Map.refBeamPanelVM.SetBeamPanelVisibility(False)
|
||||
Map.refWallPanelVM.SetWallPanelVisibility(False)
|
||||
Map.refBeamWallPanelVM.SetBeamWallPanelVisibility(False)
|
||||
Map.refDoorPanelVM.SetDoorPanelVisibility(False)
|
||||
Map.refGunStockPanelVM.SetGunStockPanelVisibility(False)
|
||||
If Not IsNothing(Map.refDrawPanelVM) Then Map.refDrawPanelVM.SetDrawPanelVisibility(False)
|
||||
Map.refMachGroupPanelVM.SetMachGroupPanelVisibility(IniFile.m_bMachiningGroup)
|
||||
If IniFile.IsActiveDoors() Then Map.refDoorPanelVM.SetDoorPanelButtonsVisibility(False)
|
||||
Map.refOptionPanelVM.SetPanelVisibility(ProjectModeOpt.MACHINING)
|
||||
|
||||
|
||||
' ProjectVM
|
||||
Map.refProjectVM.MachiningMode_IsChecked()
|
||||
' OptionPanelVM
|
||||
Map.refOptionPanelVM.MachiningMode_IsChecked()
|
||||
If Not IsNothing(Map.refOptionPanelVM) Then Map.refOptionPanelVM.MachiningMode_IsChecked()
|
||||
' MyMachinePanelVM
|
||||
Map.refMachinePanelVM.MachineListIsEnabled = False
|
||||
' InstrumentPanel
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<WrapPanel x:Class="TopTrayV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
DockPanel.Dock="Top"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<EgtFloating:EgtFloatingPanel Name="ShowPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:ShowPanelV DataContext="{StaticResource ShowPanelViewModel}"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<EgtFloating:EgtFloatingPanel Name="ViewPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:ViewPanelV DataContext="{StaticResource ViewPanelViewModel}"/>
|
||||
<local:PopUpViewPanelV DataContext="{StaticResource PopUpViewPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<!--<EgtFloating:EgtFloatingPanel Name="InstrumentPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">-->
|
||||
<local:InstrumentPanelV DataContext="{StaticResource InstrumentPanelViewModel}"/>
|
||||
<!--</EgtFloating:EgtFloatingPanel>-->
|
||||
<EgtFloating:EgtFloatingPanel Name="GridPanel"
|
||||
IsTopDockable="True" IsBottomDockable="True" IsLeftDockable="False" IsRightDockable="False">
|
||||
<local:GridPanelV DataContext="{StaticResource GridPanelViewModel}"/>
|
||||
<local:PopUpGridPanelV DataContext="{StaticResource PopUpGridPanelViewModel}" EgtFloating:EgtFloatingPanel.IsInPopUp="True"/>
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
<local:MachinePanelV DataContext="{StaticResource DbPanelViewModel}"/>
|
||||
<local:ExecutePanelV DataContext="{StaticResource ExecutePanelViewModel}"/>
|
||||
<local:SpecialPanelV DataContext="{StaticResource SpecialPanelViewModel}"/>
|
||||
<local:BeamPanelV DataContext="{StaticResource BeamPanelViewModel}"/>
|
||||
<local:WallPanelV DataContext="{StaticResource WallPanelViewModel}"/>
|
||||
<local:BeamWallPanelV DataContext="{StaticResource BeamWallPanelViewModel}"/>
|
||||
<local:DoorPanelV DataContext="{StaticResource DoorsPanelViewModel}"/>
|
||||
<local:GunStockPanelV DataContext="{StaticResource GunStockPanelViewModel}"/>
|
||||
|
||||
</WrapPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class TopTrayV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,28 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class BasePanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_PanelViewState As ViewPanelStates = ViewPanelStates.NEVER
|
||||
Friend Sub SetPanelViewState(value As ViewPanelStates)
|
||||
m_PanelViewState = value
|
||||
End Sub
|
||||
|
||||
Private m_Panel_Visibility As Visibility
|
||||
Public ReadOnly Property Panel_Visibility As Visibility
|
||||
Get
|
||||
Return m_Panel_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetPanelVisibility(ProjectMode As ProjectModeOpt)
|
||||
Dim bValue As Boolean = True
|
||||
Select Case ProjectMode
|
||||
Case ProjectModeOpt.DRAW, ProjectModeOpt.ONLYDRAW
|
||||
m_Panel_Visibility = If(m_PanelViewState = ViewPanelStates.ONLYDRAW Or m_PanelViewState = ViewPanelStates.ALWAYS, Visibility.Visible, Visibility.Collapsed)
|
||||
Case ProjectModeOpt.MACHINING
|
||||
m_Panel_Visibility = If(m_PanelViewState = ViewPanelStates.ONLYMACHINING Or m_PanelViewState = ViewPanelStates.ALWAYS, Visibility.Visible, Visibility.Collapsed)
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(Panel_Visibility))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1045,6 +1045,25 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="VerticalScrollViewerItemsControlStyle" TargetType="{x:Type ItemsControl}">
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ItemsControl}">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" >
|
||||
<ItemsPresenter/>
|
||||
</ScrollViewer>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- ToolTip that Hide itself if is empty (not working if the content is not a string, but a control; Ex: a TextBlock) -->
|
||||
|
||||
+77
-13
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Module IniFile
|
||||
@@ -31,7 +32,6 @@ Public Module IniFile
|
||||
RAWPART = 3
|
||||
RAWPARTWITHFIXTURE = 4
|
||||
MACHPATH = 5
|
||||
ALL = 99
|
||||
End Enum
|
||||
|
||||
' MainWindow Page
|
||||
@@ -50,6 +50,8 @@ Public Module IniFile
|
||||
CAD2D = 128
|
||||
STEELDORS = 256
|
||||
WALL = 512
|
||||
PLUGIN = 1024
|
||||
ADVMACHINING = 2048
|
||||
End Enum
|
||||
Friend m_sDataRoot As String
|
||||
Friend m_sConfigDir As String
|
||||
@@ -63,10 +65,14 @@ Public Module IniFile
|
||||
Friend m_sBeamDirPath As String
|
||||
' path della cartella WALL
|
||||
Friend m_sWallDirPath As String
|
||||
' path della cartella BEALWALL
|
||||
' path della cartella BEAMWALL
|
||||
Friend m_sBeamWallDirPath As String
|
||||
' path della cartella DOORS
|
||||
Friend m_sDoorsDirPath As String
|
||||
' path della cartella GUNSTOCK
|
||||
Friend m_sGunstockDirPath As String
|
||||
' path della cartella Printing3d
|
||||
Friend m_sPrinting3dDirPath As String
|
||||
|
||||
Friend m_ProjectMode As ProjectModeOpt
|
||||
Friend m_bMmUnits As Boolean
|
||||
@@ -148,7 +154,7 @@ Public Module IniFile
|
||||
Public Function GetPrivateProfileFloatingWinPos(lpAppName As String, lpKeyName As String, ByRef nState As String, ByRef nIndex As Integer, ByRef nLeft As Integer, ByRef nTop As Integer) As Boolean
|
||||
Dim sVal As String = String.Empty
|
||||
GetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||
Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||
Dim sItems() As String = sVal.Split(","c)
|
||||
If sItems.Count() >= 4 Then
|
||||
nState = sItems(0)
|
||||
nIndex = CInt(sItems(1))
|
||||
@@ -165,7 +171,7 @@ Public Module IniFile
|
||||
|
||||
Dim sVal As String = String.Empty
|
||||
GetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||
Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||
Dim sItems() As String = sVal.Split(","c)
|
||||
If sItems.Count() = 2 Then
|
||||
Return New Language(sItems(0), sItems(1))
|
||||
End If
|
||||
@@ -179,7 +185,7 @@ Public Module IniFile
|
||||
|
||||
Dim sVal As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(lpAppName, lpKeyName, "", sVal, m_sCurrMachIniFilePath)
|
||||
Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||
Dim sItems() As String = sVal.Split(","c)
|
||||
If sItems.Count() = 2 Then
|
||||
sName = sItems(0)
|
||||
nTot = CInt(sItems(1))
|
||||
@@ -193,7 +199,7 @@ Public Module IniFile
|
||||
ByVal lpKeyName As String, ByRef sTcPos As String, ByRef sHead As String, ByRef nGroup As Integer) As Boolean
|
||||
Dim sVal As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(lpAppName, lpKeyName, "", sVal, m_sCurrMachIniFilePath)
|
||||
Dim sItems() As String = sVal.Split(";".ToCharArray)
|
||||
Dim sItems() As String = sVal.Split(";"c)
|
||||
If sItems.Count() >= 2 Then
|
||||
sTcPos = sItems(0)
|
||||
sHead = sItems(1)
|
||||
@@ -207,12 +213,12 @@ Public Module IniFile
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileButton(sSection As String, sKey As String, sBaseDir As String, ByRef ReadedButtonItem As ButtonItem) As Boolean
|
||||
ReadedButtonItem = Nothing
|
||||
Public Function GetPrivateProfileButton(sSection As String, sKey As String, sBaseDir As String, ByRef ReadButtonItem As ButtonItem) As Boolean
|
||||
ReadButtonItem = Nothing
|
||||
Dim sVal As String = String.Empty
|
||||
GetPrivateProfileString(sSection, sKey, "", sVal)
|
||||
If String.IsNullOrWhiteSpace(sVal) Then Return False
|
||||
Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||
Dim sItems() As String = sVal.Split(","c)
|
||||
If sItems.Count() >= 1 Then
|
||||
Dim sLuaPath As String = sItems(0)
|
||||
Dim sImagePath As String = If(sItems.Count() >= 2, sItems(1), "")
|
||||
@@ -222,7 +228,7 @@ Public Module IniFile
|
||||
If sLuaPath.Contains(".lua") Then sLuaPath = sBaseDir & "\" & sLuaPath
|
||||
If Not String.IsNullOrWhiteSpace(sImagePath) Then sImagePath = sBaseDir & "\" & sImagePath
|
||||
End If
|
||||
ReadedButtonItem = New ButtonItem(sLuaPath, sImagePath, sToolTip, sDrawMachOrBoth)
|
||||
ReadButtonItem = New ButtonItem(sSection, sLuaPath, sImagePath, sToolTip, sDrawMachOrBoth)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
@@ -245,15 +251,36 @@ Public Module IniFile
|
||||
Return EgtUILib.WritePrivateProfileString(IpAppName, IpKeyName, sColor, m_sIniFile)
|
||||
End Function
|
||||
|
||||
Friend Function GetProgramVersion() As String
|
||||
Return My.Application.Info.Version.Major.ToString() &
|
||||
"." & My.Application.Info.Version.Minor.ToString() &
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveBeam() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 And (GetPrivateProfileInt(S_BEAM, K_BEAMENABLE, 0) <> 0)
|
||||
If bIsActive Then GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", m_sBeamDirPath)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", sTemp)
|
||||
#If PLATFORM = "x64" Then
|
||||
GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR64, sTemp, sTemp)
|
||||
#End If
|
||||
m_sBeamDirPath = sTemp.TrimEnd( "\"c)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveWall() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.WALL) <> 0 And (GetPrivateProfileInt(S_WALL, K_WALLENABLE, 0) <> 0)
|
||||
If bIsActive Then GetPrivateProfileString(S_WALL, K_WALLBASEDIR, "", m_sWallDirPath)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_WALL, K_WALLBASEDIR, "", sTemp)
|
||||
#If PLATFORM = "x64" Then
|
||||
GetPrivateProfileString(S_WALL, K_WALLBASEDIR64, sTemp, sTemp)
|
||||
#End If
|
||||
m_sWallDirPath = sTemp.TrimEnd( "\"c)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
@@ -264,16 +291,53 @@ Public Module IniFile
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveGunStock() As Boolean
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_GUNSTOCK, K_GUNSTOCKEXEC, "", sTemp)
|
||||
m_sGunstockDirPath = Path.GetDirectoryName( sTemp)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
Friend Function IsActivePlugin() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.PLUGIN) <> 0
|
||||
Dim nTemp As Integer = GetPrivateProfileInt(S_GENERAL, K_PLUGIN, 0)
|
||||
Return bIsActive And nTemp = 1
|
||||
End Function
|
||||
|
||||
Friend Function IsKeyEnabledVirtualMilling() As Boolean
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.VIRTUALMILLING) <> 0
|
||||
End Function
|
||||
|
||||
Friend Function IsKeyEnabledAdvancedMachining() As Boolean
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.ADVMACHINING) <> 0
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveSpecialPanel() As Boolean
|
||||
Dim btDummy As ButtonItem = Nothing
|
||||
Return GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0 AndAlso GetPrivateProfileButton(S_SPECIAL, K_BUTTON & "1", "", btDummy)
|
||||
End Function
|
||||
|
||||
Friend Function GetSpecialLuaVersion( sSpecialLuaDir As String, ByRef sVersion As String) As Boolean
|
||||
Dim sExecPath As String = (sSpecialLuaDir & "\Version.lua")
|
||||
If Not EgtLuaExecFile(sExecPath, False) Then Return False
|
||||
If Not EgtLuaGetGlobStringVar("VERSION", sVersion) Then Return False
|
||||
EgtLuaResetGlobVar("VERSION")
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function GetSpecialLuaData( sSpecialLuaDir As String,
|
||||
ByRef sName As String, ByRef sVersion As String, ByRef sMinExe As String) As Boolean
|
||||
Dim sExecPath As String = (sSpecialLuaDir & "\Version.lua")
|
||||
If Not EgtLuaExecFile(sExecPath, False) Then Return False
|
||||
If Not EgtLuaGetGlobStringVar("NAME", sName) Then Return False
|
||||
If Not EgtLuaGetGlobStringVar("VERSION", sVersion) Then Return False
|
||||
If Not EgtLuaGetGlobStringVar("MIN_EXE", sMinExe) Then Return False
|
||||
EgtLuaResetGlobVar("NAME")
|
||||
EgtLuaResetGlobVar("VERSION")
|
||||
EgtLuaResetGlobVar("MIN_EXE")
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
+19
-41
@@ -38,8 +38,14 @@ Public Module MachineModel
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.CHISELING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 9)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 11)})
|
||||
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFROUGHING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFROUGHING, .TypeName = EgtMsg(31212)})
|
||||
End If
|
||||
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(31211)})
|
||||
End If
|
||||
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_5AXMACHINING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY._5AXMACHINING, .TypeName = EgtMsg(31213)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, m_sCurrMachIniFilePath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.WATERJETTING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 12)})
|
||||
@@ -76,49 +82,21 @@ Public Module MachineModel
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, sMachineName) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.CHISELING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 9)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineName) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 11)})
|
||||
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFROUGHING, 0, sMachineName) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFROUGHING, .TypeName = EgtMsg(31212)})
|
||||
End If
|
||||
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineName) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.SURFFINISHING, .TypeName = EgtMsg(31211)})
|
||||
End If
|
||||
If IniFile.IsKeyEnabledAdvancedMachining() AndAlso EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_5AXMACHINING, 0, sMachineName) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY._5AXMACHINING, .TypeName = EgtMsg(31213)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, sMachineName) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.TypeId = MCH_MY.WATERJETTING, .TypeName = EgtMsg(MSG_MACHININGSDBPAGE + 12)})
|
||||
End If
|
||||
Return ActiveMachiningsFamiliesList.ToArray
|
||||
End Function
|
||||
|
||||
Friend Sub LoadMachiningListByType(MachiningList As List(Of String), nType As MCH_MY)
|
||||
MachiningList.Clear()
|
||||
Dim MachiningName As String = String.Empty
|
||||
EgtMdbGetFirstMachining(nType, MachiningName)
|
||||
While Not String.IsNullOrWhiteSpace(MachiningName)
|
||||
MachiningList.Add(MachiningName)
|
||||
EgtMdbGetNextMachining(nType, MachiningName)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Friend Sub LoadMachiningListByType(MachiningList As List(Of String), nMachiningType As MCH_MY, nToolType As MCH_TF, Optional bClearList As Boolean = True)
|
||||
If bClearList Then MachiningList.Clear()
|
||||
Dim MachiningName As String = String.Empty
|
||||
EgtMdbGetFirstMachining(nMachiningType, MachiningName)
|
||||
While Not String.IsNullOrWhiteSpace(MachiningName)
|
||||
' se il tipo di utensile è nullo, prendo tutte le lavorazioni
|
||||
If IsNothing(nToolType) OrElse nToolType = 0 Then
|
||||
MachiningList.Add(MachiningName)
|
||||
Else
|
||||
' recupero l'utensile utilizzato
|
||||
EgtMdbSetCurrMachining(MachiningName)
|
||||
Dim sCurrTool As String = String.Empty
|
||||
Dim sTUUID As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTUUID)
|
||||
EgtTdbGetToolFromUUID(sTUUID, sCurrTool)
|
||||
EgtTdbSetCurrTool(sCurrTool)
|
||||
Dim ToolType As Integer = MCH_TY.NONE
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, ToolType)
|
||||
' se il tipo di utensile coincide, aggiungo la lavorazione
|
||||
If (ToolType And nToolType) <> 0 Then
|
||||
MachiningList.Add(MachiningName)
|
||||
End If
|
||||
End If
|
||||
EgtMdbGetNextMachining(nMachiningType, MachiningName)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' Funzione che imposta la macchina corrente se la trova, altrimenti chiede se ricaricarla o annullare
|
||||
Friend Function EgtTrySettingCurrMachine(sMachineName As String) As Boolean
|
||||
If EgtSetCurrMachine(sMachineName) Then
|
||||
|
||||
+62
-2
@@ -9,6 +9,7 @@ Module Map
|
||||
Private m_refTopCommandBarVM As TopCommandBarVM
|
||||
Private m_refProjectVM As ProjectVM
|
||||
Private m_refFixtureParametersVM As FixtureParametersVM
|
||||
Private m_refRawPartOptionVM As RawPartOptionVM
|
||||
Private m_refSimulationExpanderVM As SimulationExpanderVM
|
||||
Private m_refMachinePanelVM As MyMachinePanelVM
|
||||
Private m_refOptionPanelVM As OptionPanelVM
|
||||
@@ -28,6 +29,11 @@ Module Map
|
||||
Private m_refProjectV As ProjectV
|
||||
Private m_refDoorPanelVM As DoorPanelVM
|
||||
Private m_refSpecialPanelVM As SpecialPanelVM
|
||||
Private m_refExecutePanelVM As ExecutePanelVM
|
||||
Private m_refBeamPanelVM As BeamPanelVM
|
||||
Private m_refWallPanelVM As WallPanelVM
|
||||
Private m_refBeamWallPanelVM As BeamWallPanelVM
|
||||
Private m_refGunStockPanelVM As GunStockPanelVM
|
||||
|
||||
#Region "Get"
|
||||
|
||||
@@ -46,7 +52,7 @@ Module Map
|
||||
Return m_refTopCommandBarVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refProjectVM As ProjectVM
|
||||
Public ReadOnly Property refProjectVM As ProjectVM
|
||||
Get
|
||||
Return m_refProjectVM
|
||||
End Get
|
||||
@@ -56,6 +62,11 @@ Module Map
|
||||
Return m_refFixtureParametersVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refRawPartOptionVM As RawPartOptionVM
|
||||
Get
|
||||
Return m_refRawPartOptionVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refSimulationExpanderVM As SimulationExpanderVM
|
||||
Get
|
||||
Return m_refSimulationExpanderVM
|
||||
@@ -146,12 +157,36 @@ Module Map
|
||||
Return m_refDoorPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refSpecialPanelVM As SpecialPanelVM
|
||||
Get
|
||||
Return m_refSpecialPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refExecutePanelVM As ExecutePanelVM
|
||||
Get
|
||||
Return m_refExecutePanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refBeamPanelVM As BeamPanelVM
|
||||
Get
|
||||
Return m_refBeamPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refWallPanelVM As WallPanelVM
|
||||
Get
|
||||
Return m_refWallPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refBeamWallPanelVM As BeamWallPanelVM
|
||||
Get
|
||||
Return m_refBeamWallPanelVM
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property refGunStockPanelVM As GunStockPanelVM
|
||||
Get
|
||||
Return m_refGunStockPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
@@ -173,6 +208,11 @@ Module Map
|
||||
m_refFixtureParametersVM = FixtureParametersVM
|
||||
Return Not IsNothing(m_refFixtureParametersVM)
|
||||
End Function
|
||||
Friend Function SetRefRawPartOptionVM(RawPartOptionVM As RawPartOptionVM) As Boolean
|
||||
m_refRawPartOptionVM = RawPartOptionVM
|
||||
Return Not IsNothing(m_refRawPartOptionVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefSimulationExpanderVM(SimulationExpanderVM As SimulationExpanderVM) As Boolean
|
||||
m_refSimulationExpanderVM = SimulationExpanderVM
|
||||
Return Not IsNothing(m_refSimulationExpanderVM)
|
||||
@@ -249,6 +289,26 @@ Module Map
|
||||
m_refSpecialPanelVM = SpecialPanelVM
|
||||
Return Not IsNothing(m_refSpecialPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefExecutePanelVM(ExecutePanelVM As ExecutePanelVM) As Boolean
|
||||
m_refExecutePanelVM = ExecutePanelVM
|
||||
Return Not IsNothing(m_refExecutePanelVM)
|
||||
End Function
|
||||
Friend Function SetRefBeamPanelVM(BeamPanelVM As BeamPanelVM) As Boolean
|
||||
m_refBeamPanelVM = BeamPanelVM
|
||||
Return Not IsNothing(m_refBeamPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefWallPanelVM(WallPanelVM As WallPanelVM) As Boolean
|
||||
m_refWallPanelVM = WallPanelVM
|
||||
Return Not IsNothing(m_refWallPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefBeamWallPanelVM(BeamWallPanelVM As BeamWallPanelVM) As Boolean
|
||||
m_refBeamWallPanelVM = BeamWallPanelVM
|
||||
Return Not IsNothing(m_refBeamWallPanelVM)
|
||||
End Function
|
||||
Friend Function SetRefGunStockPanelVM(GunStockPanelVM As GunStockPanelVM) As Boolean
|
||||
m_refGunStockPanelVM = GunStockPanelVM
|
||||
Return Not IsNothing(m_refGunStockPanelVM)
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<Grid x:Class="WinFormPluginControlV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
DockPanel.Dock="{Binding DockSide}"
|
||||
Height="{Binding Height}"
|
||||
Width="{Binding Width}"
|
||||
Visibility="{Binding Panel_Visibility}">
|
||||
|
||||
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
||||
<!--<ContentControl Content="{Binding WinFormUserControlHost}"/>-->
|
||||
<WindowsFormsHost Name="WinFormHost"/>
|
||||
|
||||
</Grid>
|
||||
@@ -0,0 +1,30 @@
|
||||
Imports System.Windows.Forms.Integration
|
||||
|
||||
Public Class WinFormPluginControlV
|
||||
|
||||
Private m_WinFormPluginControlVM As WinFormPluginControlVM
|
||||
Public ReadOnly Property WinFormPluginControlVM As WinFormPluginControlVM
|
||||
Get
|
||||
Return m_WinFormPluginControlVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_WinFormUserControlHost As WindowsFormsHost
|
||||
Public ReadOnly Property WinFormUserControlHost As WindowsFormsHost
|
||||
Get
|
||||
Return m_WinFormUserControlHost
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(WinFormPluginControlVM As WinFormPluginControlVM)
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
WinFormHost.Child = WinFormPluginControlVM.WinFormUserControl
|
||||
Me.DataContext = WinFormPluginControlVM
|
||||
m_WinFormPluginControlVM = WinFormPluginControlVM
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,50 @@
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class WinFormPluginControlVM
|
||||
Inherits BasePanelVM
|
||||
|
||||
Private m_WinFormUserControl As Forms.Control
|
||||
Public ReadOnly Property WinFormUserControl As Forms.Control
|
||||
Get
|
||||
Return m_WinFormUserControl
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DockSide As Dock
|
||||
Public ReadOnly Property DockSide As Dock
|
||||
Get
|
||||
Select Case TryCast(m_WinFormUserControl, IPluginControl).DockSide
|
||||
Case Forms.DockStyle.Top
|
||||
Return Dock.Top
|
||||
Case Forms.DockStyle.Bottom
|
||||
Return Dock.Bottom
|
||||
Case Forms.DockStyle.Left
|
||||
Return Dock.Left
|
||||
Case Forms.DockStyle.Right
|
||||
Return Dock.Right
|
||||
Case Else
|
||||
Return Nothing
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Height As Double
|
||||
Get
|
||||
Return If(TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Left Or TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Right, Double.NaN, m_WinFormUserControl.Height)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Width As Double
|
||||
Get
|
||||
Return If(TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Top Or TryCast(m_WinFormUserControl, IPluginControl).DockSide = Forms.DockStyle.Bottom, Double.NaN, m_WinFormUserControl.Width)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(WinFormControl As Forms.Control, ViewPanelState As ViewPanelStates)
|
||||
m_WinFormUserControl = WinFormControl
|
||||
' imposto visibilita' standard
|
||||
SetPanelViewState(ViewPanelState)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user