From e79b079c0eede17d0e7b4e3e5c75a130f909fe5f Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 21 Jun 2017 13:21:21 +0000 Subject: [PATCH] EgtDOORCreator 1.8f4 : - tante piccole sistemazioni. --- AboutBoxWindow/AboutBoxView.xaml | 2 +- AboutBoxWindow/AboutBoxView.xaml.vb | 12 +----------- AboutBoxWindow/AboutBoxViewModel.vb | 1 + CompoPanel/CompoPanelViewModel.vb | 7 ++++--- Constants/ConstIni.vb | 22 ---------------------- Doors.vb | 3 --- MainWindow/MainWindowModel.vb | 2 +- My Project/AssemblyInfo.vb | 4 ++-- OptionsWindow/OptionModule.vb | 9 --------- SceneManager/SceneManagerViewModel.vb | 1 - 10 files changed, 10 insertions(+), 53 deletions(-) diff --git a/AboutBoxWindow/AboutBoxView.xaml b/AboutBoxWindow/AboutBoxView.xaml index 595febb..1b63673 100644 --- a/AboutBoxWindow/AboutBoxView.xaml +++ b/AboutBoxWindow/AboutBoxView.xaml @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="AboutBox" Height="300" Width="300" WindowStyle="None" ResizeMode="NoResize" - ShowInTaskbar="False" Visibility="{Binding AboutBoxVisibility,Mode=OneWay}" WindowStartupLocation="Manual"> + ShowInTaskbar="False" Visibility="{Binding AboutBoxVisibility,Mode=OneWay}" WindowStartupLocation="CenterOwner"> diff --git a/AboutBoxWindow/AboutBoxView.xaml.vb b/AboutBoxWindow/AboutBoxView.xaml.vb index 2c27444..53f7877 100644 --- a/AboutBoxWindow/AboutBoxView.xaml.vb +++ b/AboutBoxWindow/AboutBoxView.xaml.vb @@ -10,24 +10,14 @@ Public Class AboutBoxView InitializeComponent() ' '' Add any initialization after the InitializeComponent() call. - ''Application.Msn.Register(Application.CLOSEAPPLICATION, Sub() - ''Me.Close() - '' End Sub) - End Sub - - Private Sub AboutBoxView_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded Me.Owner = Application.Current.MainWindow - Me.Owner = Owner - Me.Top = Owner.Top + (Owner.Height / 2 - Me.Height / 2) - Me.Left = Owner.Left + (Owner.Width / 2 - Me.Width / 2) End Sub Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click Me.Visibility = Windows.Visibility.Hidden End Sub - Private Sub AboutBoxWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized - Me.Owner = Application.Current.MainWindow + 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() & diff --git a/AboutBoxWindow/AboutBoxViewModel.vb b/AboutBoxWindow/AboutBoxViewModel.vb index 2d281ca..ac88907 100644 --- a/AboutBoxWindow/AboutBoxViewModel.vb +++ b/AboutBoxWindow/AboutBoxViewModel.vb @@ -1,4 +1,5 @@ Imports System.ComponentModel + Namespace EgtCAM5 Public Class AboutBoxViewModel diff --git a/CompoPanel/CompoPanelViewModel.vb b/CompoPanel/CompoPanelViewModel.vb index 51bbba6..71d6589 100644 --- a/CompoPanel/CompoPanelViewModel.vb +++ b/CompoPanel/CompoPanelViewModel.vb @@ -32,10 +32,11 @@ Public Class CompoPanelViewModel Dim CompoName As String = String.Empty Dim CompoNameDDF As String = String.Empty ' Carico un vettore con il nome delle Path delle componenti - 'Dim CompoDirectory As String = String.Empty - 'If GetPrivateProfileString(S_DOORS, K_COMPODIR, "", CompoDirectory) <> 0 Then IniFile.m_CompoDir = IniFile.m_sDoorsDirPath & "\Compo" - 'End If + If Not Directory.Exists(IniFile.m_CompoDir) Then + EgtOutLog("CompoDir not found : " & IniFile.m_CompoDir) + Return + End If Dim CompoArray() As String = Directory.GetDirectories(IniFile.m_CompoDir) ' carico i valori dei bottoni con un preciso ordine For IndexCompoOrder = 0 To DdfFile.CompoListOrder.Count - 1 diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb index 66d8532..83d8977 100644 --- a/Constants/ConstIni.vb +++ b/Constants/ConstIni.vb @@ -21,22 +21,10 @@ Module ConstIni Public Const K_USERLEVEL As String = "UserLevel" Public Const K_MAXINST As String = "MaxInstances" Public Const K_INSTANCES As String = "Instances" - Public Const K_COMMANDLOG As String = "CommandLog" Public Const K_MESSAGESDIR As String = "MessagesDir" Public Const K_MESSAGES As String = "Messages" Public Const K_WINPLACE As String = "WinPlace" - Public Const K_LASTNGEDIR As String = "LastNgeDir" - Public Const K_LASTNGEOBJDIR As String = "LastNgeObjDir" - Public Const K_LASTLUADIR As String = "LastLuaDir" - Public Const K_LASTIMPDIR As String = "LastImpDir" - Public Const K_LASTEXPDIR As String = "LastExpDir" - Public Const K_DRAW2D As String = "2DDraw" - Public Const K_DRAW3D As String = "3DDraw" - Public Const K_MODIFY As String = "Modify" - Public Const K_TRANSFORM As String = "Transform" - Public Const K_ONLYDRAW As String = "OnlyDraw" Public Const K_SUPPORT As String = "Support" - Public Const K_GUIDEBROWSER As String = "GuideBrowser" Public Const S_SIZE As String = "Size" Public Const K_WIDTH_INI As String = "Width" @@ -121,19 +109,9 @@ Module ConstIni Public Const S_DOORS As String = "Doors" Public Const K_BASEDIR As String = "BaseDir" - Public Const K_DDFENABLE As String = "DdfEnable" Public Const K_DDFEXEC As String = "DdfExec" Public Const K_DDFFUNCTION As String = "DdfFun" - Public Const K_DDFDIR As String = "DdfDir" - Public Const K_DDFMACHEXEC As String = "DdfMachExec" - Public Const K_TABLESDIR As String = "TablesDir" - Public Const K_COMPODIR As String = "CompoDirectory" Public Const K_MYPROJECTDIR As String = "ProjectDirectory" Public Const K_TEMPLATEDIR As String = "TemplateDirectory" - Public Const S_OPTIONS As String = "Options" - - Public Const S_MRUDOORS As String = "MruDoors" - Public Const K_FILE As String = "File" - End Module diff --git a/Doors.vb b/Doors.vb index a9afc9d..3baf751 100644 --- a/Doors.vb +++ b/Doors.vb @@ -20,9 +20,6 @@ Public Module Doors ' Scelta file DDF Dim sFile As String sFile = sFilePath - ' scrivo nel file di configurazione il nome della directory - WritePrivateProfileString(S_DOORS, K_DDFDIR, System.IO.Path.GetDirectoryName(sFile)) - ' Generazione porta ' Cursore attesa scene.Cursor = System.Windows.Forms.Cursors.WaitCursor diff --git a/MainWindow/MainWindowModel.vb b/MainWindow/MainWindowModel.vb index febf8cd..fdccb10 100644 --- a/MainWindow/MainWindowModel.vb +++ b/MainWindow/MainWindowModel.vb @@ -67,7 +67,7 @@ Friend Class MainWindowModel EgtInit(m_nDebug, sLogFile, sLogMsg) ' carico direttorio doors GetPrivateProfileString(S_DOORS, K_BASEDIR, "", IniFile.m_sDoorsDirPath) - ' L'inidirro del file di Default + ' L'indirizzo del file di Default IniFile.m_DefaultIniFile = IniFile.m_sDoorsDirPath & "\Compo\Default.ini" 'Inizializzo OptionModule OptionModule.InitOptionModule() diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index a37748f..17a95dd 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -72,5 +72,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/OptionsWindow/OptionModule.vb b/OptionsWindow/OptionModule.vb index 7ba6b84..6703e66 100644 --- a/OptionsWindow/OptionModule.vb +++ b/OptionsWindow/OptionModule.vb @@ -16,9 +16,6 @@ Friend Module OptionModule Friend m_SelectedMeasureUnit As String Friend m_bIsMmUnit As Boolean - ' Path Guide directory - Friend m_GuideDir As String = String.Empty - ' Paramaetri per la scelta del bevel Friend m_bBevelUp As Visibility Friend m_bBevelDown As Visibility @@ -96,12 +93,6 @@ Friend Module OptionModule nOptionLauncher = GetPrivateProfileInt(S_LAUNCHERWINDOW, K_LAUNCHER, 0) End If - ' leggo il direttorio della guida - Dim sGuideDir As String = String.Empty - If GetPrivateProfileString(S_GENERAL, K_GUIDEBROWSER, "", sGuideDir) <> 0 Then - m_GuideDir = sGuideDir - End If - ' leggo il direttorio di salvataggio dei progetti Dim sMyProjectDir As String = String.Empty If GetPrivateProfileString(S_DOORS, K_MYPROJECTDIR, "", sMyProjectDir) <> 0 Then diff --git a/SceneManager/SceneManagerViewModel.vb b/SceneManager/SceneManagerViewModel.vb index f5cea2a..615c4e1 100644 --- a/SceneManager/SceneManagerViewModel.vb +++ b/SceneManager/SceneManagerViewModel.vb @@ -166,7 +166,6 @@ Public Class SceneManagerViewModel Private Sub PostInitializeScene() ' Impostazioni Controller m_Controller.SetScene(m_ProjectScene) - Dim bLuaReg As Boolean = (GetPrivateProfileInt(S_GENERAL, K_COMMANDLOG, 0) <> 0) Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING) Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0) End Sub