diff --git a/AboutBox1.Designer.vb b/AboutBox1.Designer.vb index d16c3a4..eedc89c 100644 --- a/AboutBox1.Designer.vb +++ b/AboutBox1.Designer.vb @@ -38,7 +38,7 @@ Partial Class AboutBox1 'LogoPictureBox ' Me.LogoPictureBox.Image = CType(resources.GetObject("LogoPictureBox.Image"), System.Drawing.Image) - Me.LogoPictureBox.Location = New System.Drawing.Point(36, 24) + Me.LogoPictureBox.Location = New System.Drawing.Point(36, 21) Me.LogoPictureBox.Name = "LogoPictureBox" Me.LogoPictureBox.Size = New System.Drawing.Size(52, 52) Me.LogoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage @@ -50,15 +50,15 @@ Partial Class AboutBox1 Me.OKButton.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.OKButton.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.OKButton.Location = New System.Drawing.Point(97, 344) + Me.OKButton.Location = New System.Drawing.Point(97, 343) Me.OKButton.Name = "OKButton" - Me.OKButton.Size = New System.Drawing.Size(112, 19) + Me.OKButton.Size = New System.Drawing.Size(113, 19) Me.OKButton.TabIndex = 0 Me.OKButton.Text = "&OK" ' 'LabelCompanyName ' - Me.LabelCompanyName.Location = New System.Drawing.Point(136, 69) + Me.LabelCompanyName.Location = New System.Drawing.Point(136, 66) Me.LabelCompanyName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelCompanyName.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelCompanyName.MinimumSize = New System.Drawing.Size(152, 17) @@ -70,7 +70,7 @@ Partial Class AboutBox1 ' 'LabelCopyright ' - Me.LabelCopyright.Location = New System.Drawing.Point(136, 50) + Me.LabelCopyright.Location = New System.Drawing.Point(136, 47) Me.LabelCopyright.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelCopyright.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelCopyright.MinimumSize = New System.Drawing.Size(152, 17) @@ -82,7 +82,7 @@ Partial Class AboutBox1 ' 'LabelVersion ' - Me.LabelVersion.Location = New System.Drawing.Point(136, 31) + Me.LabelVersion.Location = New System.Drawing.Point(136, 28) Me.LabelVersion.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelVersion.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelVersion.MinimumSize = New System.Drawing.Size(152, 17) @@ -94,7 +94,7 @@ Partial Class AboutBox1 ' 'LabelProductName ' - Me.LabelProductName.Location = New System.Drawing.Point(136, 12) + Me.LabelProductName.Location = New System.Drawing.Point(136, 9) Me.LabelProductName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0) Me.LabelProductName.MaximumSize = New System.Drawing.Size(152, 17) Me.LabelProductName.MinimumSize = New System.Drawing.Size(152, 17) @@ -107,22 +107,22 @@ Partial Class AboutBox1 'tbInfoProg ' Me.tbInfoProg.AcceptsReturn = True - Me.tbInfoProg.Location = New System.Drawing.Point(12, 99) + Me.tbInfoProg.Location = New System.Drawing.Point(12, 88) Me.tbInfoProg.Multiline = True Me.tbInfoProg.Name = "tbInfoProg" Me.tbInfoProg.ReadOnly = True - Me.tbInfoProg.Size = New System.Drawing.Size(289, 138) + Me.tbInfoProg.Size = New System.Drawing.Size(290, 152) Me.tbInfoProg.TabIndex = 1 Me.tbInfoProg.WordWrap = False ' 'tbInfoSys ' Me.tbInfoSys.AcceptsReturn = True - Me.tbInfoSys.Location = New System.Drawing.Point(12, 243) + Me.tbInfoSys.Location = New System.Drawing.Point(12, 248) Me.tbInfoSys.Multiline = True Me.tbInfoSys.Name = "tbInfoSys" Me.tbInfoSys.ReadOnly = True - Me.tbInfoSys.Size = New System.Drawing.Size(289, 86) + Me.tbInfoSys.Size = New System.Drawing.Size(290, 86) Me.tbInfoSys.TabIndex = 2 Me.tbInfoSys.WordWrap = False ' @@ -131,7 +131,7 @@ Partial Class AboutBox1 Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.OKButton - Me.ClientSize = New System.Drawing.Size(313, 374) + Me.ClientSize = New System.Drawing.Size(314, 373) Me.Controls.Add(Me.tbInfoSys) Me.Controls.Add(Me.tbInfoProg) Me.Controls.Add(Me.LogoPictureBox) diff --git a/AboutBox1.vb b/AboutBox1.vb index fe0e577..b8a2b28 100644 --- a/AboutBox1.vb +++ b/AboutBox1.vb @@ -23,9 +23,10 @@ Public NotInheritable Class AboutBox1 sbInfoProg.Append(sTemp & vbCrLf) sbInfoProg.Append("ExeRoot " & Form1.GetExeRoot() & vbCrLf) sbInfoProg.Append("DataRoot " & Form1.GetDataRoot() & vbCrLf) + sbInfoProg.Append("MachinesRoot " & Form1.GetMachinesRoot() & vbCrLf) sbInfoProg.Append("User " & SystemInformation.UserName & "\" & SystemInformation.ComputerName & - " (" & Form1.GetInstance() & ")" & vbCrLf) + " (" & Form1.GetInstance() & ")") Me.tbInfoProg.Text = sbInfoProg.ToString() ' Informazioni sul sistema Dim sbInfoSys As New System.Text.StringBuilder diff --git a/ConstGen.vb b/ConstGen.vb index 6457a72..5a5b75e 100644 --- a/ConstGen.vb +++ b/ConstGen.vb @@ -35,4 +35,7 @@ Public Const CONF_DIR As String = "Config" ' Sottodirettorio temporaneo Public Const TEMP_DIR As String = "Temp" +' Sottodirettorio di default per le macchine +Public Const MACHINES_DFL_DIR As String = "Machines" + End Module diff --git a/ConstIni.vb b/ConstIni.vb index a6370ee..88ffe41 100644 --- a/ConstIni.vb +++ b/ConstIni.vb @@ -33,18 +33,18 @@ Public Const S_LUA As String = "Lua" Public Const K_LIBSDIR As String = "LibsDir" Public Const K_BASELIB As String = "BaseLib" -Public Const S_OPENGL As String = "OpenGL" -Public Const K_DOUBLEBUFFER As String = "DoubleBuffer" -Public Const K_COLORBITS As String = "ColorBits" -Public Const K_DEPTHBITS As String = "DepthBits" -Public Const K_DRIVER As String = "Driver" - Public Const S_GEOMDB As String = "GeomDB" Public Const K_DEFAULTFONT As String = "DefaultFont" Public Const K_NFEFONTDIR As String = "NfeFontDir" Public Const K_DEFAULTCOLOR As String = "DefaultColor" Public Const K_SAVETYPE As String = "SaveType" +Public Const S_OPENGL As String = "OpenGL" +Public Const K_DOUBLEBUFFER As String = "DoubleBuffer" +Public Const K_COLORBITS As String = "ColorBits" +Public Const K_DEPTHBITS As String = "DepthBits" +Public Const K_DRIVER As String = "Driver" + Public Const S_SCENE As String = "Scene" Public Const K_BACKTOP As String = "BackTop" Public Const K_BACKBOTTOM As String = "BackBottom" @@ -67,6 +67,9 @@ Public Const K_EXTSSTEP As String = "ExtSStep" Public Const K_MINLNCOLOR As String = "MinLnColor" Public Const K_MAJLNCOLOR As String = "MajLnColor" +Public Const S_MACH As String = "Mach" +Public Const K_MACHINESDIR As String = "MachinesDir" + Public Const S_MRUFILES As String = "MruFiles" Public Const S_MRUSCRIPTS As String = "MruScripts" Public Const K_FILE As String = "File" diff --git a/Controller.vb b/Controller.vb index 0685c75..82743e1 100644 --- a/Controller.vb +++ b/Controller.vb @@ -271,6 +271,9 @@ Public Class Controller m_Scene.Cursor = Cursors.WaitCursor EnableCommandLog() Dim bOk As Boolean = EgtInsertFile(sFile) + If GetCurrLayer() = GDB_ID.NULL Then + EgtResetCurrPartLayer() + End If DisableCommandLog() EgtZoom(ZM.ALL) m_Scene.Cursor = Cursors.Default diff --git a/EgtInterface.vb b/EgtInterface.vb index cb24923..4ead6f8 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -1855,7 +1855,7 @@ End Function '---------- Machinings --------------------------------------------------------- -Public Function EgtInitMachMgr() As Boolean +Public Function EgtInitMachMgr(ByVal sMachinesDir As String) As Boolean End Function '---------- Scene -------------------------------------------------------------- diff --git a/Form1.vb b/Form1.vb index 7d64ff0..ff1b314 100644 --- a/Form1.vb +++ b/Form1.vb @@ -29,6 +29,7 @@ Public Class Form1 Private m_sDataRoot As String = String.Empty Private m_sConfigDir As String = String.Empty Private m_sTempDir As String = String.Empty + Private m_sMachinesRoot As String = String.Empty Private m_sIniFile As String = String.Empty Private m_nDebug As Integer = 0 Private m_nUserLevel As Integer = 1 @@ -51,6 +52,10 @@ Public Class Form1 Return m_sDataRoot End Function + Public Function GetMachinesRoot() As String + Return m_sMachinesRoot + End Function + Public Function GetDebug() As Integer Return m_nDebug End Function @@ -77,6 +82,10 @@ Public Class Form1 m_sTempDir = m_sDataRoot & "\" & TEMP_DIR ' Impostazione path Ini file m_sIniFile = m_sConfigDir & "\" & INI_FILE_NAME + ' Impostazione direttorio per le macchine + If GetPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot, m_sIniFile) = 0 Then + m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR + End If ' Verifico indice di istanza ManageIstance() ' Inizializzazione generale di EgtInterface @@ -148,7 +157,7 @@ Public Class Form1 ' inizializzo scena (DB geometrico + visualizzazione) Scene1.Init() ' inizializzo gestore lavorazioni - EgtInitMachMgr() + EgtInitMachMgr(m_sMachinesRoot) ' imposto visualizzazione riferimento globale Dim bShowGlobFrame As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWGFRAME, 1, m_sIniFile) <> 0) EgtSetGlobFrameShow(bShowGlobFrame) diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 54af953..194851b 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices ' utilizzando l'asterisco (*) come descritto di seguito: ' - - + +