Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 42ba2f7015 | |||
| 2ed0c9e337 | |||
| 382719af6b | |||
| 25b205f21d | |||
| 47487bfe2f | |||
| 1a6a4ff228 | |||
| aeba705637 |
@@ -1,7 +1,7 @@
|
||||
<Window x:Class="AboutBoxV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="AboutBox" Height="320" Width="300" WindowStyle="None" ResizeMode="NoResize"
|
||||
Title="AboutBox" Height="400" Width="360" WindowStyle="None" ResizeMode="NoResize"
|
||||
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
|
||||
|
||||
<Border BorderThickness="2" BorderBrush="LightBlue">
|
||||
@@ -18,11 +18,10 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
<RowDefinition Height="0.35*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.35*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
@@ -39,13 +38,11 @@
|
||||
VerticalAlignment="Center" FontSize="18" />
|
||||
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="KeyLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
|
||||
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="12" />
|
||||
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Stretch"
|
||||
<TextBox Name="InfoLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" FontSize="12" IsReadOnly="true" TextWrapping="Wrap"/>
|
||||
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="9" IsCancel="True"
|
||||
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="8" IsCancel="True"
|
||||
Margin="1,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -9,17 +9,36 @@ Public Class AboutBoxV
|
||||
"." & My.Application.Info.Version.Minor.ToString() &
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||
Dim sInfo As String = String.Empty
|
||||
Dim sKey As String = String.Empty
|
||||
EgtGetKeyInfo(sKey)
|
||||
Dim sKlev As String = IniFile.m_nKeyLevel.ToString()
|
||||
Dim sOpts As String = IniFile.m_nKeyOptions.ToString()
|
||||
KeyLbl.Text = sKey & " - " & sKlev & " - " & sOpts
|
||||
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||
Dim sInfo As String = If( EgtIsDebug(), "*** Debug Libraries ***" & vbCrLf, "")
|
||||
Dim sLeftDays As String = ""
|
||||
Dim nLeftDays As Integer
|
||||
if EgtGetKeyLeftDays( nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays= " (" & nLeftDays.ToString() & ")"
|
||||
Dim sAssStatus As String = " discontinued"
|
||||
Dim nAssLeftDays As Integer
|
||||
If EgtGetKeyAssLeftDays( nAssLeftDays) And nAssLeftDays >= 0 Then
|
||||
If nAssLeftDays > 30 then
|
||||
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
|
||||
Else If nAssLeftDays > 0 then
|
||||
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
|
||||
Else
|
||||
sAssStatus = "to be renewed by today"
|
||||
End If
|
||||
End If
|
||||
sInfo = If( EgtIsDebug(), "*** Debug Libraries ***" & vbCrLf, "")
|
||||
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
|
||||
" Inst" & Map.refMainWindowVM.Instance().ToString() &
|
||||
" Ulv" & IniFile.m_nUserLevel.ToString() & " Dbg" & IniFile.m_nDebug.ToString() & vbCrLf
|
||||
sInfo &= sKey & " - " & sKlev & " - " & sOpts & vbCrLf
|
||||
sInfo &= "SupportPlane " & sAssStatus & vbCrLf
|
||||
sInfo &= "DataRoot " & IniFile.m_sDataRoot & vbCrLf
|
||||
sInfo &= "Doors " & IniFile.m_sDoorsDirPath & vbCrLf
|
||||
If OptionModule.m_MaterialList.Count = 1 Then
|
||||
sInfo &= "Material " & OptionModule.m_MaterialList(0).Name
|
||||
sInfo &= "Material " & OptionModule.m_MaterialList(0).Name & vbCrLf
|
||||
End If
|
||||
Dim sOpSys As String = String.Empty
|
||||
EgtGetOsInfo( sOpSys)
|
||||
|
||||
@@ -225,6 +225,8 @@ Public Class CompoPanelVM
|
||||
Map.refAssemblyPageVM.CurrAssembly.CreateCompoOnJamb(NewCompo, "")
|
||||
End If
|
||||
Map.refSceneManagerVM.RefreshBtn()
|
||||
' evidenzio componente
|
||||
Map.refPartPageVM.CurrPart.MarkCompoInScena()
|
||||
Else
|
||||
MessageBox.Show(EgtMsg(50108), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
End If
|
||||
|
||||
@@ -36,7 +36,9 @@ Module ConstGen
|
||||
Public Const CONF_DIR As String = "Config"
|
||||
' Sottodirettorio delle risorse
|
||||
Public Const RES_DIR As String = "Resources"
|
||||
' Sottodirettorio temporaneo
|
||||
' Sottodirettorio degli scripts lua
|
||||
Public Const SCRIPT_DIR As String = "Scripts"
|
||||
' Sottodirettorio temporaneo
|
||||
Public Const TEMP_DIR As String = "Temp"
|
||||
' Sottodirettorio di default per il salvataggio con nome
|
||||
Public Const SAVE_DFL_NAMEDIR As String = "MyProjects"
|
||||
|
||||
@@ -105,6 +105,9 @@ Module ConstIni
|
||||
Public Const K_LAUNCHER As String = "Launcher"
|
||||
Public Const K_LASTPROJECT As String = "LastProject"
|
||||
|
||||
Public Const S_SPECIAL As String = "Special"
|
||||
Public Const K_SPECIALENABLE As String = "SpecialEnable"
|
||||
|
||||
'-------------------------------------------------------------------------
|
||||
Public Const DEFAULT_INI_FILE_NAME As String = "Default.ini"
|
||||
|
||||
|
||||
@@ -121,9 +121,9 @@ Public Class Compo
|
||||
End Sub
|
||||
|
||||
Public Sub SetMark()
|
||||
m_BorderColor = Brushes.DeepPink
|
||||
m_BackGroundColor = Brushes.White
|
||||
m_Foreground = Brushes.Gold
|
||||
m_BorderColor = DirectCast(New BrushConverter().ConvertFrom("#FF4D84C4"), SolidColorBrush)
|
||||
m_BackGroundColor = DirectCast(New BrushConverter().ConvertFrom("#FFFFFFFF"), SolidColorBrush)
|
||||
m_Foreground = DirectCast(New BrushConverter().ConvertFrom("#FF4D84C4"), SolidColorBrush)
|
||||
m_BorderThickness = 2
|
||||
m_FontBold = FontWeights.Bold
|
||||
NotifyPropertyChanged("BorderColor")
|
||||
|
||||
@@ -1516,13 +1516,12 @@ Public Class Part
|
||||
EgtResetMark(nIdLay)
|
||||
nIdLay = EgtGetNextLayer(nIdLay)
|
||||
End While
|
||||
EgtDraw()
|
||||
For Each ItemCompo As Compo In CompoList
|
||||
ItemCompo.ResetMark()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub MarkCompoInScena()
|
||||
Public Sub MarkCompoInScena()
|
||||
If IsNothing(m_SelCompo) Then Return
|
||||
If GetMainPrivateProfileInt(S_GENERAL, "MarkCompo", 0) = 0 Then Return
|
||||
ResetAllMark()
|
||||
|
||||
@@ -227,6 +227,10 @@
|
||||
<DependentUpon>SelectPartV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectManager\SelectPartVM.vb" />
|
||||
<Compile Include="ProjectManager\SpecialPanelV.xaml.vb">
|
||||
<DependentUpon>SpecialPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectManager\SpecialPanelVM.vb" />
|
||||
<Compile Include="RegexFunction.vb" />
|
||||
<Compile Include="ReportInfo\ReportCompo.vb" />
|
||||
<Compile Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml.vb">
|
||||
@@ -371,6 +375,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ProjectManager\SpecialPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="SceneManager\DimensioningPanel\DimensioningPanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<EgtDOORCreator:AssemblyPageVM x:Key="AssemblyPageVM"/>
|
||||
<EgtDOORCreator:HardwarePageVM x:Key="HardwarePageVM"/>
|
||||
<EgtDOORCreator:DimensioningPanelVM x:Key="DimensioningPanelVM"/>
|
||||
<EgtDOORCreator:SpecialPanelVM x:Key="SpecialPanelVM"/>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF4D84C4" />
|
||||
@@ -162,7 +163,7 @@
|
||||
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FF90CFEE"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
|
||||
|
||||
+23
-1
@@ -13,6 +13,8 @@ Friend Module IniFile
|
||||
|
||||
' Livello dell'utilizzatore
|
||||
Friend m_nUserLevel As Integer = 1
|
||||
' Livello di debug
|
||||
Friend m_nDebug As Integer = 0
|
||||
' Livello della chiave inserita nel PC
|
||||
Friend m_nKeyLevel As Integer = 0
|
||||
' Opzioni attive sulla chiave
|
||||
@@ -58,9 +60,13 @@ Friend Module IniFile
|
||||
' Path del modello ListLabel
|
||||
Friend m_sListLabelCurrent As String = String.Empty
|
||||
' Path dell'eseguibile Cam5
|
||||
Friend m_sEgtCameEXEPath As String = String.Empty
|
||||
Friend m_sEgtCam5EXEPath As String = String.Empty
|
||||
' Path LuaLibs Dir
|
||||
Friend m_sLuaLibsDir As String = String.Empty
|
||||
' Path ResourcesRoot
|
||||
Friend m_sResourcesRoot As String = String.Empty
|
||||
' Path ScriptsRoot
|
||||
Friend m_sScriptsRoot As String = String.Empty
|
||||
|
||||
' EgtDoorCreator.ini
|
||||
Public Function GetPrivateProfileLanguage(ByVal lpAppName As String, ByVal lpKeyName As String) As Language
|
||||
@@ -485,4 +491,20 @@ Friend Module IniFile
|
||||
Return EgtUILib.WritePrivateProfileString(IpAppName, IpKeyName, IpString, m_sDoorsDirPath & "\MTables\GeometryNameList.ini")
|
||||
End Function
|
||||
|
||||
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
|
||||
GetMainPrivateProfileString(sSection, sKey, "", sVal)
|
||||
If String.IsNullOrWhiteSpace(sVal) Then Return False
|
||||
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), "")
|
||||
Dim sToolTip As String = If(sItems.Count() >= 3, sItems(2), "")
|
||||
ReadButtonItem = New ButtonItem(sLuaPath, sImagePath, sToolTip)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"
|
||||
/>
|
||||
@@ -31,7 +31,7 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"
|
||||
HorizontalAlignment="Left"/>
|
||||
@@ -44,7 +44,7 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Source="/Resources/TopCommandBar/Open.png" Stretch="Uniform"
|
||||
HorizontalAlignment="Left"/>
|
||||
|
||||
@@ -12,12 +12,9 @@ Friend Class MainWindowModel
|
||||
Private m_objMutex As New Mutex
|
||||
' Variabile che indica il numero di istanze aperte del programma
|
||||
Friend m_nInstance As Integer = 0
|
||||
|
||||
' Path cartella Data
|
||||
Friend m_sDataRoot As String = String.Empty
|
||||
|
||||
Private m_nDebug As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -33,10 +30,14 @@ Friend Class MainWindowModel
|
||||
IniFile.m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
|
||||
' Impostazione direttorio per file temporanei
|
||||
IniFile.m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
|
||||
' Impostazione direttorio per risorse programma
|
||||
IniFile.m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
||||
' Impostazione direttorio scripts lua
|
||||
IniFile.m_sScriptsRoot = m_sDataRoot & "\" & SCRIPT_DIR
|
||||
' Impostazione direttorio Ini file
|
||||
IniFile.m_sIniFile = IniFile.m_sConfigDir & "\" & INI_FILE_NAME
|
||||
' Impostazione path Ini file
|
||||
EgtWPFLib5.IniFile.m_sIniFile = m_sConfigDir & "\" & INI_FILE_NAME
|
||||
EgtWPFLib5.IniFile.m_sIniFile = IniFile.m_sIniFile
|
||||
' Impostazione direttorio della cartella Help
|
||||
IniFile.m_sHelpDir = m_sDataRoot & "\" & HELP_DIR
|
||||
' Impostazione direttorio della cartella Template
|
||||
@@ -56,13 +57,11 @@ Friend Class MainWindowModel
|
||||
Dim sKey As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey(sNestKey)
|
||||
Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
|
||||
EgtSetNetHwKey(bNetHwKey)
|
||||
|
||||
' Impostazioni per chiave di rete
|
||||
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
|
||||
EgtSetNetHwKey(bNetKey)
|
||||
@@ -71,15 +70,13 @@ Friend Class MainWindowModel
|
||||
If Not String.IsNullOrEmpty(sLockId) Then
|
||||
EgtSetLockId(sLockId)
|
||||
End If
|
||||
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2701, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2701, 1, IniFile.m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2703, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2703, 1, IniFile.m_nKeyOptions)
|
||||
' Leggo e imposto livello utilizzatore
|
||||
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetMainPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||
'Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
IniFile.m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
Dim sLogMsg As String = "User " & Environment.UserName & "\" & Environment.MachineName & " (" & m_nInstance.ToString() & ")" & vbLf &
|
||||
My.Application.Info.Description.ToString() & " ver. " &
|
||||
@@ -87,7 +84,7 @@ Friend Class MainWindowModel
|
||||
"." & My.Application.Info.Version.Minor.ToString() &
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
EgtInit(m_nDebug, sLogFile, sLogMsg)
|
||||
EgtInit(IniFile.m_nDebug, sLogFile, sLogMsg)
|
||||
' Carico i messaggi
|
||||
OptionModule.ReadMessages()
|
||||
' Carico direttorio doors
|
||||
|
||||
@@ -9,6 +9,12 @@ Public Class MainWindowVM
|
||||
' Modello del MainWindow (classe vera e propria)
|
||||
Private m_MainWindowModel As New MainWindowModel
|
||||
|
||||
Public ReadOnly Property Instance As Integer
|
||||
Get
|
||||
Return m_MainWindowModel.m_nInstance
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_VisibilityAssemblyManager As Visibility = Visibility.Visible
|
||||
Public Property VisibilityAssemblyManager As Visibility
|
||||
Get
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
Private m_refOptionsVM As OptionsVM
|
||||
|
||||
Private m_refSpecialPanelVM As SpecialPanelVM
|
||||
|
||||
#Region "Get"
|
||||
|
||||
Public ReadOnly Property refMainWindowVM As MainWindowVM
|
||||
@@ -148,6 +150,12 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refSpecialPanelVM As SpecialPanelVM
|
||||
Get
|
||||
Return m_refSpecialPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
#Region "Set"
|
||||
@@ -252,6 +260,11 @@
|
||||
Return Not IsNothing(m_refHardwareHelpSceneHostV)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefSpecialPanelVM(SpecialPanelVM As SpecialPanelVM) As Boolean
|
||||
m_refSpecialPanelVM = SpecialPanelVM
|
||||
Return Not IsNothing(m_refSpecialPanelVM)
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
#Region "Init"
|
||||
|
||||
@@ -22,11 +22,11 @@ Imports System.Windows
|
||||
#End if
|
||||
#Else
|
||||
#If DEBUG Then
|
||||
<Assembly: AssemblyTitle("EgtDOORCreator Debug 32 bit")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreatorD32.exe")>
|
||||
<Assembly: AssemblyTitle("EgtDOORCreatorD32.exe")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreator Debug 32 bit")>
|
||||
#Else
|
||||
<Assembly: AssemblyTitle("EgtDOORCreator Release 32 bit")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreatorR32.exe")>
|
||||
<Assembly: AssemblyTitle("EgtDOORCreatorR32.exe")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreator 32 bit")>
|
||||
#End If
|
||||
#End If
|
||||
|
||||
@@ -72,5 +72,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.7.1.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.1.1")>
|
||||
<Assembly: AssemblyVersion("2.7.3.4")>
|
||||
<Assembly: AssemblyFileVersion("2.7.3.4")>
|
||||
|
||||
@@ -7,6 +7,9 @@ Friend Module OptionModule
|
||||
' flag per modalità di visualizzazione file (solo lettura)
|
||||
Friend ReadOnlyDDF As Boolean = False
|
||||
|
||||
' gestione bottoni nella barra SpecialPanel
|
||||
Friend IsActiveSpecialPanel As Boolean = False
|
||||
|
||||
' flag per forzare l'aggiornamento delle dimensioni anta dei file DDT
|
||||
Friend AdjustDDT As Boolean = False
|
||||
Friend FileNameFromArgs As String = String.Empty
|
||||
@@ -333,7 +336,7 @@ Friend Module OptionModule
|
||||
Dim sEgtCam5EXE As String = String.Empty
|
||||
' AndAlso File.Exists(sListLabelFile)
|
||||
If GetMainPrivateProfileString(S_GENERAL, K_EGTCAMEXE, "", sEgtCam5EXE) > 0 Then
|
||||
IniFile.m_sEgtCameEXEPath = sEgtCam5EXE
|
||||
IniFile.m_sEgtCam5EXEPath = sEgtCam5EXE
|
||||
End If
|
||||
|
||||
Dim nHelpSelct As Integer = 0
|
||||
@@ -777,6 +780,9 @@ Friend Module OptionModule
|
||||
DefaultGetPrivateProfileString(S_OVERMATERIALASSEMBLY, K_BOTTOMOVERMATERIAL_INI, "0", BottomOverMaterialAss)
|
||||
Utility.ConvertCompoConfig(BottomOverMaterialAss, 100)
|
||||
m_BottomOverMaterialAssembly = BottomOverMaterialAss
|
||||
' Visualizzazione SpecialPanel
|
||||
Dim btDummy As ButtonItem = Nothing
|
||||
IsActiveSpecialPanel = GetMainPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0 AndAlso GetPrivateProfileButton(S_SPECIAL, K_BUTTON & "1", "", btDummy)
|
||||
|
||||
' Lista messaggi per launcher
|
||||
m_OptionLauncherList.Add(EgtMsg(50206)) 'Open Window
|
||||
@@ -1057,13 +1063,13 @@ Friend Module OptionModule
|
||||
Return False
|
||||
End If
|
||||
Dim Items As String() = Directory.GetFiles(sMTableDir)
|
||||
' recupero i file che hanno estemsione *.mtl
|
||||
' recupero i file che hanno estemsione *.mtl e non sono esclusi
|
||||
Dim ExcludeList As List(Of String) = GetExludeList()
|
||||
For Each MTableFile As String In Items
|
||||
If MTableFile.EndsWith(".mtl") Then
|
||||
Dim sName As String = Path.GetFileNameWithoutExtension(MTableFile).ToLower
|
||||
Dim sPath As String = MTableFile
|
||||
Dim bIsValid As Boolean = True
|
||||
Dim ExcludeList As List(Of String) = GetExludeList()
|
||||
For Each ExcludedItem As String In ExcludeList
|
||||
If sName.ToLower.Contains(ExcludedItem) Then
|
||||
bIsValid = False
|
||||
@@ -1083,17 +1089,17 @@ Friend Module OptionModule
|
||||
End If
|
||||
' leggo il nome della MTable attiva
|
||||
Dim sSelectedMTable As String = String.Empty
|
||||
Dim nbSelected As Boolean = False
|
||||
Dim bSelected As Boolean = False
|
||||
If GetMainPrivateProfileString(S_DOORS, K_MTABLE, "", sSelectedMTable) <> 0 Then
|
||||
For Each ItemFile As MTable In m_MTableList
|
||||
If ItemFile.FilePath.ToLower = sSelectedMTable.Trim.ToLower Then
|
||||
m_SelectedMTable = ItemFile
|
||||
nbSelected = True
|
||||
bSelected = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not nbSelected Then m_SelectedMTable = m_MTableList(0)
|
||||
If Not bSelected Then m_SelectedMTable = m_MTableList(0)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -1101,10 +1107,12 @@ Friend Module OptionModule
|
||||
Dim LocalList As New List(Of String)
|
||||
Dim sVal As String = String.Empty
|
||||
GetMainPrivateProfileString(S_DOORS, "Exclude", "", sVal)
|
||||
Dim sItems As String() = sVal.Split(","c)
|
||||
For Each Item As String In sItems
|
||||
LocalList.Add(Item.Trim)
|
||||
Next
|
||||
If Not String.IsNullOrWhiteSpace( sVal) Then
|
||||
Dim sItems As String() = sVal.Split(","c)
|
||||
For Each Item As String In sItems
|
||||
LocalList.Add(Item.Trim)
|
||||
Next
|
||||
End If
|
||||
Return LocalList
|
||||
End Function
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ Public Class OptionsVM
|
||||
|
||||
Public ReadOnly Property EnableConfig As Boolean
|
||||
Get
|
||||
If GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) > 4 And File.Exists(IniFile.m_sConfigDir & "\ChangeConfig.lua") Then
|
||||
If IniFile.m_nUserLevel > 4 AndAlso File.Exists(IniFile.m_sConfigDir & "\ChangeConfig.lua") Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
@@ -2065,35 +2065,38 @@ Public Class OptionsVM
|
||||
OptionsWindow.Close()
|
||||
End If
|
||||
Next
|
||||
|
||||
If EnableConfig AndAlso m_IsChangedConfig Then
|
||||
' Se modifico il direttorio Compo: aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", IniFile.m_sDoorsDirPath)
|
||||
EgtLuaSetGlobStringVar("CCD.NewMTable", OptionModule.m_SelectedMTable.Name)
|
||||
' eseguo la funzione che esegue la scrittura delle variabili
|
||||
EgtLuaCallFunction("CCD.ChangeConfigDirectory")
|
||||
Dim sVal As String = ""
|
||||
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||
OptionModule.m_CurrentMachine = sVal
|
||||
EgtLuaResetGlobVar("CCD")
|
||||
' chiudo il programma e lo riavvio
|
||||
Map.refMainWindowVM.CloseApplication()
|
||||
Process.Start(Application.ResourceAssembly.Location)
|
||||
'End If
|
||||
ElseIf EnableConfig AndAlso m_OrigMTable <> OptionModule.m_SelectedMTable.Name Then
|
||||
' aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", IniFile.m_sDoorsDirPath)
|
||||
EgtLuaSetGlobStringVar("CCD.NewMTable", OptionModule.m_SelectedMTable.Name)
|
||||
' eseguo la funzione che esegue la scrittura delle variabili
|
||||
EgtLuaCallFunction("CCD.ChangeConfigDirectory")
|
||||
Dim sVal As String = ""
|
||||
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||
OptionModule.m_CurrentMachine = sVal
|
||||
EgtLuaResetGlobVar("CCD")
|
||||
' Se abilitata modifica configurazione
|
||||
If EnableConfig Then
|
||||
' Se cambiato direttorio Doors
|
||||
If m_IsChangedConfig Then
|
||||
' Se modifico il direttorio Compo: aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", IniFile.m_sDoorsDirPath)
|
||||
EgtLuaSetGlobStringVar("CCD.NewMTable", OptionModule.m_SelectedMTable.Name)
|
||||
' eseguo la funzione che esegue la scrittura delle variabili
|
||||
EgtLuaCallFunction("CCD.ChangeConfigDirectory")
|
||||
Dim sVal As String = ""
|
||||
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||
OptionModule.m_CurrentMachine = sVal
|
||||
EgtLuaResetGlobVar("CCD")
|
||||
' chiudo il programma e lo riavvio
|
||||
Map.refMainWindowVM.CloseApplication()
|
||||
Process.Start(Application.ResourceAssembly.Location)
|
||||
' se altrimenti cambiata MTable
|
||||
ElseIf m_OrigMTable <> OptionModule.m_SelectedMTable.Name Then
|
||||
' aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", IniFile.m_sDoorsDirPath)
|
||||
EgtLuaSetGlobStringVar("CCD.NewMTable", OptionModule.m_SelectedMTable.Name)
|
||||
' eseguo la funzione che esegue la scrittura delle variabili
|
||||
EgtLuaCallFunction("CCD.ChangeConfigDirectory")
|
||||
Dim sVal As String = ""
|
||||
EgtLuaGetGlobStringVar("CCD.NewMachineName", sVal)
|
||||
OptionModule.m_CurrentMachine = sVal
|
||||
EgtLuaResetGlobVar("CCD")
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ Public Class OrderVM
|
||||
Private Function VerifyNotIsNothing() As Boolean
|
||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) OrElse
|
||||
IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly) OrElse
|
||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count > 0 Then
|
||||
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor.Count < 1 Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
|
||||
@@ -1,42 +1,43 @@
|
||||
<UserControl x:Class="ProjectManagerV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:DOORCreator="clr-namespace:EgtDOORCreator" >
|
||||
|
||||
<StackPanel Orientation="Horizontal" IsEnabled="{Binding EnableProjectManager}" Height="32">
|
||||
|
||||
<!--Barra superiore dei comandi-->
|
||||
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}" Focusable="False"
|
||||
<!--Barra superiore dei comandi-->
|
||||
<Button Command="{Binding NewCommand}" ToolTip="{Binding NewToolTip}" Focusable="False"
|
||||
IsEnabled="{Binding EnableModifyDDF}">
|
||||
<Image Source="{Binding NewProjectImg}" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<!--Visibility="{Binding VisibilityDeleteDDF}"-->
|
||||
</Button>
|
||||
<!--Visibility="{Binding VisibilityDeleteDDF}"-->
|
||||
<Button Command="{Binding DeleteCommand}" ToolTip="{Binding DeleteToolTip}" Focusable="False"
|
||||
IsEnabled="{Binding EnableModifyDDF}">
|
||||
<Image Source="{Binding DeleteProjectImg}" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding OpenCommand}" ToolTip="{Binding OpenToolTip}"
|
||||
</Button>
|
||||
<Button Command="{Binding OpenCommand}" ToolTip="{Binding OpenToolTip}"
|
||||
Focusable="False"
|
||||
ContextMenuService.Placement="Bottom"
|
||||
Tag="{Binding}">
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding MruFileNames}">
|
||||
<ContextMenu.Resources>
|
||||
<Style TargetType="{x:Type MenuItem}">
|
||||
<Setter Property="Command"
|
||||
<Button.ContextMenu>
|
||||
<ContextMenu ItemsSource="{Binding MruFileNames}">
|
||||
<ContextMenu.Resources>
|
||||
<Style TargetType="{x:Type MenuItem}">
|
||||
<Setter Property="Command"
|
||||
Value="{Binding PlacementTarget.Tag.OpenMruFileCommand,
|
||||
RelativeSource={RelativeSource Mode=FindAncestor,
|
||||
AncestorType=ContextMenu}}"/>
|
||||
<Setter Property="CommandParameter" Value="{Binding}" />
|
||||
</Style>
|
||||
</ContextMenu.Resources>
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
<Image Source="/Resources/TopCommandBar/Open.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding ReloadCommand}" ToolTip="{Binding ReloadToolTip}" Focusable="False"
|
||||
<Setter Property="CommandParameter" Value="{Binding}" />
|
||||
</Style>
|
||||
</ContextMenu.Resources>
|
||||
</ContextMenu>
|
||||
</Button.ContextMenu>
|
||||
<Image Source="/Resources/TopCommandBar/Open.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding ReloadCommand}" ToolTip="{Binding ReloadToolTip}" Focusable="False"
|
||||
IsEnabled="{Binding EnableModifyDDF}">
|
||||
<Image Source="/Resources/Refresh/RefreshDir.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Image Source="/Resources/Refresh/RefreshDir.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
<Button Command="{Binding SaveCommand}" ToolTip="{Binding SaveToolTip}" Focusable="False"
|
||||
IsEnabled="{Binding EnableModifyDDF}">
|
||||
<Image Source="/Resources/TopCommandBar/Save.png" Stretch="Uniform"/>
|
||||
@@ -44,74 +45,77 @@
|
||||
</Button>
|
||||
<Button Command="{Binding DuplicaCommand}" ToolTip="{Binding DuplicaToolTip}" Focusable="False"
|
||||
IsEnabled="{Binding EnableModifyDDF}">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<Button Command="{Binding CreateTemplateCommand}" ToolTip="{Binding TemplateDoorToolTip}" Focusable="False"
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<Button Command="{Binding CreateTemplateCommand}" ToolTip="{Binding TemplateDoorToolTip}" Focusable="False"
|
||||
Visibility="{Binding VisibilityTemplate}" IsEnabled="{Binding EnableModifyDDF}">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/SaveAsTemplate.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<Button Command="{Binding CopyCommand}" ToolTip="{Binding CopyToolTip}" Focusable="False"
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/SaveAsTemplate.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<Button Command="{Binding CopyCommand}" ToolTip="{Binding CopyToolTip}" Focusable="False"
|
||||
IsEnabled="{Binding EnableModifyDDF}">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/Export.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<Button Command="{Binding OpenCamCommand}" ToolTip="{Binding OpenCamToolTip}" Focusable="False"
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/Export.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<Button Command="{Binding OpenCamCommand}" ToolTip="{Binding OpenCamToolTip}" Focusable="False"
|
||||
Visibility="{Binding VisibilityEgtCAM}" IsEnabled="{Binding EnableModifyDDF}">
|
||||
<ContentControl>
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/EgtCAM5.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<Button Command="{Binding PrintCommand}" ToolTip="{Binding PrintToolTip}" Focusable="False">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/InstrumentPanel/Print.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<!--<Button Command="{Binding RefreshDirCommand}" ToolTip="{Binding RefreshDirToolTip}" Focusable="False">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/InstrumentPanel/Print.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<!--<Button Command="{Binding RefreshDirCommand}" ToolTip="{Binding RefreshDirToolTip}" Focusable="False">
|
||||
<Image Source="/Resources/Refresh/RefreshDir.png" Stretch="Uniform"/>
|
||||
</Button>-->
|
||||
<!--Hardware-->
|
||||
<!--<Button Command="{Binding HardwareCommand}" ToolTip="{Binding HardwareToolTip}" Focusable="False"
|
||||
<!--Hardware-->
|
||||
<!--<Button Command="{Binding HardwareCommand}" ToolTip="{Binding HardwareToolTip}" Focusable="False"
|
||||
Visibility="{Binding DisableHM}">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/InstrumentPanel/Hardware.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>-->
|
||||
<Button Command="{Binding CreateAssemblyCommand}" ToolTip="{Binding CreateAssemblyToolTip}" Focusable="False"
|
||||
<Button Command="{Binding CreateAssemblyCommand}" ToolTip="{Binding CreateAssemblyToolTip}" Focusable="False"
|
||||
Visibility="{Binding VisibilityCreateAssembly}" IsEnabled="{Binding EnableModifyDDF}">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/Create Assembly.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}" Focusable="False"
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/Create Assembly.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<Button Command="{Binding OptionsCommand}" ToolTip="{Binding OptionsToolTip}" Focusable="False"
|
||||
Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}" IsEnabled="{Binding EnableModifyDDF}">
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||
</Button>
|
||||
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}" Focusable="False"
|
||||
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
|
||||
</Button>
|
||||
|
||||
<DOORCreator:SpecialPanelV DataContext="{StaticResource SpecialPanelVM}"/>
|
||||
|
||||
<Button Command="{Binding SendFeedbackCommand}" ToolTip="{Binding SendFeedbackToolTip}" Focusable="False"
|
||||
IsEnabled="{Binding EnableModifyDDF}">
|
||||
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
|
||||
</Button>
|
||||
<Button Command="{Binding GuideCommand}" ToolTip="{Binding GuideToolTip}" Focusable="False">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/Help.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<!--Door-->
|
||||
<RadioButton Style="{StaticResource ModeButton}" Visibility="{Binding DisableHM}"
|
||||
<Image Source="/Resources/TopCommandBar/Send.png" Height="22" Margin="3,0,3,0" />
|
||||
</Button>
|
||||
<Button Command="{Binding GuideCommand}" ToolTip="{Binding GuideToolTip}" Focusable="False">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/Help.png" Stretch="Uniform" />
|
||||
</ContentControl>
|
||||
</Button>
|
||||
<!--Door-->
|
||||
<RadioButton Style="{StaticResource ModeButton}" Visibility="{Binding DisableHM}"
|
||||
ToolTip="{Binding DoorToolTip}"
|
||||
IsChecked="{Binding DoorIsChecked}"
|
||||
Content="{Binding DoorToolTip}"
|
||||
IsEnabled="{Binding EnableModifyDDF}">
|
||||
</RadioButton>
|
||||
<!--Hardware-->
|
||||
<RadioButton Style="{StaticResource ModeButton}" Visibility="{Binding DisableHM}"
|
||||
</RadioButton>
|
||||
<!--Hardware-->
|
||||
<RadioButton Style="{StaticResource ModeButton}" Visibility="{Binding DisableHM}"
|
||||
Command="{Binding HardwareCommand}" ToolTip="{Binding HardwareToolTip}"
|
||||
Content="{Binding HardwareToolTip}"
|
||||
IsEnabled="{Binding EnableModifyDDF}">
|
||||
</RadioButton>
|
||||
</StackPanel>
|
||||
</RadioButton>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -67,11 +67,11 @@ Public Class ProjectManagerVM
|
||||
|
||||
Public ReadOnly Property VisibilityEgtCAM As Visibility
|
||||
Get
|
||||
If String.IsNullOrEmpty(IniFile.m_sEgtCameEXEPath) Then
|
||||
If String.IsNullOrEmpty(IniFile.m_sEgtCam5EXEPath) Then
|
||||
Return Visibility.Collapsed
|
||||
ElseIf Not File.Exists(IniFile.m_sEgtCameEXEPath) Then
|
||||
ElseIf Not File.Exists(IniFile.m_sEgtCam5EXEPath) Then
|
||||
Return Visibility.Collapsed
|
||||
ElseIf File.Exists(IniFile.m_sEgtCameEXEPath) Then
|
||||
ElseIf File.Exists(IniFile.m_sEgtCam5EXEPath) Then
|
||||
Return Visibility.Visible
|
||||
Else
|
||||
Return Visibility.Collapsed
|
||||
@@ -1374,15 +1374,13 @@ Public Class ProjectManagerVM
|
||||
|
||||
Public Sub OpenCam()
|
||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject) OrElse
|
||||
IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||
IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||
' 50192 = Impossible to export to machine a door if there is not a door!
|
||||
MessageBox.Show(EgtMsg(50192), EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Return
|
||||
End If
|
||||
'Verifico che tutto sia salvato, altrimenti esco con messaggio
|
||||
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified Then
|
||||
'' Project must be saved before copying
|
||||
'MessageBox.Show(EgtMsg(50186), EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
' 50177=Do you want to save the current changes?
|
||||
Dim ResultMsg As MessageBoxResult = MessageBox.Show(EgtMsg(50177), EgtMsg(50144), MessageBoxButton.OKCancel, MessageBoxImage.Warning)
|
||||
If ResultMsg = MessageBoxResult.OK Then
|
||||
@@ -1393,22 +1391,14 @@ Public Class ProjectManagerVM
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
'' elimino eventuali file .txt associati a ddf corrente (per lettura dei messaggi di errore stampati nel dal log del CAM5)
|
||||
'Dim FileLog As String = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
|
||||
'FileLog = FileLog.Replace(DDF_EXTENSION, ".txt")
|
||||
'Try
|
||||
' File.Delete(FileLog)
|
||||
'Catch
|
||||
'End Try
|
||||
' Lancio esecuzione CAM5
|
||||
Dim Proc As New Process
|
||||
' Dim CurrFile As String = IniFile.m_sTempDir & "\CurrPart" & DDF_EXTENSION
|
||||
Dim CurrFile As String = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
|
||||
Dim sCurrFile As String = Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name
|
||||
' Flag : 0 = solo disegno, 1 = anche calcolo lavorazioni
|
||||
Dim nFlag As Integer = If((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift, 1, 0)
|
||||
Try
|
||||
Proc.StartInfo.FileName = IniFile.m_sEgtCameEXEPath
|
||||
' 0: creata una porta come descritta nel file riferito
|
||||
' 1 viene creata la porta e il suo programma di lavorazione sul centro di lavoro preconfigurato
|
||||
' Proc.StartInfo.Arguments = """" & CurrFile & """ " & If((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift, """1""", """0""")
|
||||
Proc.StartInfo.Arguments = """" & CurrFile & """ " & """0"""
|
||||
Proc.StartInfo.FileName = IniFile.m_sEgtCam5EXEPath
|
||||
Proc.StartInfo.Arguments = """" & sCurrFile & """ """ & nFlag & """"
|
||||
If Not Proc.Start() Then
|
||||
' Error in starting EgtCam5.exe
|
||||
MessageBox.Show(EgtMsg(50567), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
@@ -1417,22 +1407,6 @@ Public Class ProjectManagerVM
|
||||
' Error in starting EgtCam5.exe
|
||||
MessageBox.Show(EgtMsg(50567), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End Try
|
||||
'Dim sError As String = String.Empty
|
||||
'Dim nType As Integer = 0
|
||||
'Dim nCountCycle As Integer = 0
|
||||
'' al massimo attendo 5 secondi
|
||||
'While Not (Proc.HasExited Or File.Exists(FileLog)) And nCountCycle < 50
|
||||
' Threading.Thread.Sleep(100)
|
||||
' nCountCycle += 1
|
||||
'End While
|
||||
'ShowGraphicError(sError, nType)
|
||||
'If Not String.IsNullOrEmpty(sError) And nType > 0 Then
|
||||
' 'Proc.Kill()
|
||||
' MessageBox.Show(sError, EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
'ElseIf Not String.IsNullOrEmpty(sError) And nType < 0 Then
|
||||
' 'Proc.Kill()
|
||||
' MessageBox.Show(sError, EgtMsg(50144), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Copy
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<UserControl x:Class="SpecialPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:EgtDOORCreator"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
Visibility="{Binding SpecialPanelVisibility}">
|
||||
<StackPanel Orientation="Horizontal" Height="32">
|
||||
<ItemsControl ItemsSource="{Binding ButtonList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button ToolTip="{Binding ToolTip}" Command="{Binding LuaExecCommand}">
|
||||
<Image Source="{Binding ImagePath}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class SpecialPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,121 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class SpecialPanelVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_ButtonList As New List(Of ButtonItem)
|
||||
Public ReadOnly Property ButtonList As List(Of ButtonItem)
|
||||
Get
|
||||
Return m_ButtonList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_SpecialPanelVisibility As Visibility
|
||||
Public ReadOnly Property SpecialPanelVisibility As Visibility
|
||||
Get
|
||||
Return m_SpecialPanelVisibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetSpecialPanelVisibility(bValue As Boolean)
|
||||
m_SpecialPanelVisibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(SpecialPanelVisibility))
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefSpecialPanelVM(Me)
|
||||
' se attivo, inizializzo i bottoni leggendoli da file ini
|
||||
If OptionModule.IsActiveSpecialPanel Then
|
||||
Dim BtnIndex As Integer = 1
|
||||
Dim CurrBtn As ButtonItem = Nothing
|
||||
While GetPrivateProfileButton(S_SPECIAL, K_BUTTON & BtnIndex, "", CurrBtn)
|
||||
m_ButtonList.Add(CurrBtn)
|
||||
BtnIndex += 1
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ButtonItem
|
||||
Inherits VMBase
|
||||
|
||||
Private m_sImagePath As String
|
||||
Public ReadOnly Property ImagePath As String
|
||||
Get
|
||||
Return m_sImagePath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sLuaCmdPath As String
|
||||
|
||||
Private m_sToolTip As String
|
||||
Public ReadOnly Property ToolTip As String
|
||||
Get
|
||||
Return m_sToolTip
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend m_Btn_Visibility As Visibility
|
||||
Public ReadOnly Property Btn_Visibility As Visibility
|
||||
Get
|
||||
Return m_Btn_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend m_Btn_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property Btn_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_Btn_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdLuaExec As ICommand
|
||||
|
||||
Sub New(sLuaCmdPath As String, sImagePath As String, sToolTip As String)
|
||||
' creo il percorso del file
|
||||
m_sImagePath = IniFile.m_sResourcesRoot & "\" & sImagePath
|
||||
If Not File.Exists(m_sImagePath) Then
|
||||
EgtOutLog("File '" & m_sImagePath & "' does not exist.")
|
||||
End If
|
||||
m_sLuaCmdPath = IniFile.m_sScriptsRoot & "\" & sLuaCmdPath
|
||||
m_sToolTip = sToolTip
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "LuaExecCommand"
|
||||
|
||||
Public ReadOnly Property LuaExecCommand As ICommand
|
||||
Get
|
||||
If m_cmdLuaExec Is Nothing Then
|
||||
m_cmdLuaExec = New Command(AddressOf LuaExec)
|
||||
End If
|
||||
Return m_cmdLuaExec
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub LuaExec(ByVal param As Object)
|
||||
If Not File.Exists(m_sLuaCmdPath) Then
|
||||
EgtOutLog("File '" & m_sLuaCmdPath & "' does not exists.")
|
||||
Return
|
||||
End If
|
||||
If Not Path.GetExtension(m_sLuaCmdPath).ToLower = ".lua" Then
|
||||
EgtOutLog("File '" & m_sLuaCmdPath & "' has not '.lua' extension.")
|
||||
Return
|
||||
End If
|
||||
Dim bOk As Boolean = EgtLuaExecFile(m_sLuaCmdPath)
|
||||
If Not bOk Then
|
||||
EgtOutLog("File '" & m_sLuaCmdPath & "' has not been excute.")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' LuaExecCommand
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
@@ -1,35 +1,35 @@
|
||||
<UserControl x:Class="InstrumentPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtDOORCreator="clr-namespace:EgtDOORCreator">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtDOORCreator="clr-namespace:EgtDOORCreator">
|
||||
|
||||
<StackPanel Background="Transparent" Orientation="Horizontal" >
|
||||
<ToggleButton ToolTip="{Binding GetDistToolTip}" IsEnabled ="{Binding EnableCmdDist}"
|
||||
<StackPanel Background="Transparent" Orientation="Horizontal" >
|
||||
<ToggleButton ToolTip="{Binding GetDistToolTip}" IsEnabled ="{Binding EnableCmdDist}"
|
||||
Style="{StaticResource GridViewPanelToggleButton}" IsChecked="{Binding GetDistIsChecked}">
|
||||
<Image Source="/Resources/InstrumentPanel/GetDist.png" Stretch="Uniform" Width="25" />
|
||||
</ToggleButton>
|
||||
<Button ToolTip="{Binding LinearDimensionToolTip}"
|
||||
ToolTipService.ShowOnDisabled="True"
|
||||
Command="{Binding LinearDimensionCommand}" IsEnabled="{Binding EnableCmdDimension}"
|
||||
Visibility="{Binding DimensionVisibility}">
|
||||
<Image Source="/Resources/InstrumentPanel/LinearDimension.png" Stretch="Uniform" Width="25"/>
|
||||
ToolTipService.ShowOnDisabled="True"
|
||||
Command="{Binding LinearDimensionCommand}" IsEnabled="{Binding EnableCmdDimension}"
|
||||
Visibility="{Binding DimensionVisibility}">
|
||||
<Image Source="/Resources/InstrumentPanel/LinearDimension.png" Stretch="Uniform" Width="25"/>
|
||||
</Button>
|
||||
<TextBox Style="{StaticResource DimensioParameter}"
|
||||
Name ="TextBox1"
|
||||
Visibility="{Binding TextDimensionVisibility}" Margin="5"
|
||||
Width="100" Height="25"
|
||||
Text="{Binding TextDimension, UpdateSourceTrigger=PropertyChanged}">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding OkTextDimension}"/>
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
<TextBox Style="{StaticResource DimensioParameter}"
|
||||
Name ="TextBox1"
|
||||
Visibility="{Binding TextDimensionVisibility}" Margin="5"
|
||||
Width="100" Height="25"
|
||||
Text="{Binding TextDimension, UpdateSourceTrigger=PropertyChanged}">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding OkTextDimension}"/>
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
|
||||
<Button Command="{Binding PrintHardwareCommand}" ToolTip="{Binding PrintHardwareToolTip}" Focusable="False"
|
||||
<Button Command="{Binding PrintHardwareCommand}" ToolTip="{Binding PrintHardwareToolTip}" Focusable="False"
|
||||
IsEnabled ="{Binding EnableCmdSaveImg}" Visibility="{Binding SaveImgHardware}">
|
||||
<ContentControl>
|
||||
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform" Width="25"/>
|
||||
<Image Source="/Resources/TopCommandBar/SaveAs.png" Stretch="Uniform" Width="25"/>
|
||||
</ContentControl>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -29,7 +29,7 @@ Public Class InstrumentPanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Private m_GetDistIsChecked As Boolean = True
|
||||
Private m_GetDistIsChecked As Boolean = False
|
||||
Public Property GetDistIsChecked As Boolean
|
||||
Get
|
||||
GetDistance(m_GetDistIsChecked)
|
||||
@@ -44,6 +44,13 @@ Public Class InstrumentPanelVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Restituisce l'ultimo stato del comando
|
||||
Public ReadOnly Property ActualDistanceState As Boolean
|
||||
Get
|
||||
Return m_GetDistIsChecked
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' se il bottone è selezionato (true) allora misura, altrimenti no (false)
|
||||
Public Sub GetDistance(bGetDistanceIsChecked As Boolean)
|
||||
If bGetDistanceIsChecked Then
|
||||
|
||||
@@ -440,6 +440,8 @@ Public Class SceneManagerVM
|
||||
Private Sub MouseMoveOverScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_ProjectScene.OnMouseMoveScene
|
||||
' Se non abilitata l'evidenziazione dei compo allora esco
|
||||
If GetMainPrivateProfileInt(S_GENERAL, "MarkCompo", 0) = 0 Then Return
|
||||
' Se misurazione attiva
|
||||
If Map.refInstrumentPanelVM.ActualDistanceState Then Return
|
||||
' se non esiste una porta corrente allora esco
|
||||
If IsNothing(Map.refPartPageVM) OrElse IsNothing(Map.refPartPageVM.CurrPart) Then
|
||||
Return
|
||||
@@ -448,10 +450,14 @@ Public Class SceneManagerVM
|
||||
' Ripulisco la scena da i Mark
|
||||
Map.refPartPageVM.CurrPart.ResetAllMark()
|
||||
' Se la lista dei componenti è vuota allora esco
|
||||
If Map.refPartPageVM.CurrPart.CompoList.Count < 1 Then Return
|
||||
If Map.refPartPageVM.CurrPart.CompoList.Count < 1 Then
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
'If Not Map.refInstrumentPanelVM.ActualDistanceState Then
|
||||
' Verifico se selezionato curva
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSel As Integer
|
||||
@@ -472,6 +478,8 @@ Public Class SceneManagerVM
|
||||
' Passo al successivo
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
'End If
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Function MatchCompoFromScena(nIdLay As Integer, CurrCompo As Compo, CompoList As ObservableCollection(Of Compo)) As Boolean
|
||||
@@ -517,7 +525,6 @@ Public Class SceneManagerVM
|
||||
EgtSetMark(nIdLay)
|
||||
' evidenzio la compo corrente
|
||||
TempList(IndexInList).SetMark()
|
||||
EgtDraw()
|
||||
' ricerca terminata correttamente
|
||||
Return True
|
||||
Exit While
|
||||
|
||||
Reference in New Issue
Block a user