TestEIn 1.5l2 :

- gestione separazione dati da eseguibile/dll.
This commit is contained in:
Dario Sassi
2014-12-30 17:38:59 +00:00
parent e98cca7c98
commit 2f0429f03c
4 changed files with 29 additions and 10 deletions
+5 -3
View File
@@ -46,8 +46,10 @@ Partial Class AboutBox1
'
'OKButton
'
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(88, 180)
Me.OKButton.Location = New System.Drawing.Point(97, 203)
Me.OKButton.Name = "OKButton"
Me.OKButton.Size = New System.Drawing.Size(75, 19)
Me.OKButton.TabIndex = 0
@@ -108,7 +110,7 @@ Partial Class AboutBox1
Me.tbInfo.Multiline = True
Me.tbInfo.Name = "tbInfo"
Me.tbInfo.ReadOnly = True
Me.tbInfo.Size = New System.Drawing.Size(226, 63)
Me.tbInfo.Size = New System.Drawing.Size(248, 84)
Me.tbInfo.TabIndex = 1
Me.tbInfo.WordWrap = False
'
@@ -117,7 +119,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(250, 208)
Me.ClientSize = New System.Drawing.Size(276, 232)
Me.Controls.Add(Me.tbInfo)
Me.Controls.Add(Me.LogoPictureBox)
Me.Controls.Add(Me.OKButton)
+7 -3
View File
@@ -16,9 +16,13 @@ Public NotInheritable Class AboutBox1
Me.LabelVersion.Text = String.Format("Versione {0}", My.Application.Info.Version.ToString)
Me.LabelCopyright.Text = My.Application.Info.Copyright
Me.LabelCompanyName.Text = My.Application.Info.CompanyName
Dim sInfo As String = String.Empty
EgtGetSceneInfo(sInfo)
Me.tbInfo.Text = sInfo
Dim sbInfo As New System.Text.StringBuilder
sbInfo.Append("ExeRoot " & Form1.GetExeRoot() & vbCrLf)
sbInfo.Append("DataRoot " & Form1.GetDataRoot() & vbCrLf)
Dim sTemp As String = String.Empty
EgtGetSceneInfo(sTemp)
sbInfo.Append(sTemp)
Me.tbInfo.Text = sbInfo.ToString()
End Sub
Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKButton.Click
+15 -2
View File
@@ -10,22 +10,35 @@ Imports TestEIn.Controller
Public Class Form1
Private m_sDataRoot As String = String.Empty
Private m_sIniFile As String = String.Empty
Private WithEvents m_Controller As New Controller
Private m_bShowGrid As Boolean
Private m_bShowGridFrame As Boolean
Private m_bCPlaneTypePos As Boolean
Public Function GetExeRoot() As String
Return Application.StartupPath
End Function
Public Function GetDataRoot() As String
Return m_sDataRoot
End Function
'-------------------------------- Form ------------------------------------------------------------
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
' installo aggiornamento interfaccia
AddHandler System.Windows.Forms.Application.Idle, AddressOf Application_Idle
' Title
EmitTitle()
' Impostazione path radice per i dati
m_sDataRoot = Application.StartupPath
If GetPrivateProfileString("Data", "DataRoot", "", m_sDataRoot, m_sDataRoot & "\DataRoot.Ini") = 0 Then
m_sDataRoot = Application.StartupPath
End If
' Impostazione path Ini file
m_sIniFile = Application.StartupPath & "\TestEIn.ini"
m_sIniFile = m_sDataRoot & "\TestEIn.ini"
' Inizializzazione generale di EgtInterface
EgtInit(0, Application.StartupPath & "\TestEngine.log")
EgtInit(0, m_sDataRoot & "\TestEngine.log")
' imposto chiave di protezione
Dim sKey As String = String.Empty
GetPrivateProfileString("General", "Key", "", sKey, m_sIniFile)
+2 -2
View File
@@ -43,5 +43,5 @@ Imports System.Runtime.InteropServices
' utilizzando l'asterisco (*) come descritto di seguito:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.5.12.1")>
<Assembly: AssemblyFileVersion("1.5.12.1")>
<Assembly: AssemblyVersion("1.5.12.2")>
<Assembly: AssemblyFileVersion("1.5.12.2")>