Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c7068ddac5 | |||
| 07cabcf3d4 | |||
| dd9cf064b2 | |||
| 27fb494f66 | |||
| 32cff06df5 | |||
| 8fe9728eb5 | |||
| 336f8b73e8 | |||
| b2d793b61b | |||
| 98c29fc84a | |||
| cb66dfb636 | |||
| 27ce1ae461 | |||
| 2c95ccefea | |||
| 30a5b5ed49 | |||
| 467874aa93 |
@@ -22,23 +22,25 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListBox ItemsSource="{Binding CurrProject.AssemblyList}"
|
||||
SelectedItem="{Binding CurrProject.SelAssemblyName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource DoorListBox}" Name="AssemblyList" Grid.ColumnSpan="2" Margin="0,0,28,0.4" Grid.RowSpan="2">
|
||||
|
||||
<ListBox PreviewMouseWheel="ListBox_PreviewMouseWheel"
|
||||
ItemsSource="{Binding CurrProject.AssemblyList}"
|
||||
SelectedItem="{Binding CurrProject.SelAssemblyName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource DoorListBox}" Name="AssemblyList" Grid.ColumnSpan="2" Margin="0,0,28,0.4" Grid.RowSpan="2">
|
||||
<!--SelectionChanged="AssemblyList_SelectedItem"-->
|
||||
<Interactivity:Interaction.Behaviors>
|
||||
<EgtDOORCreator:ScrollIntoViewForListBox/>
|
||||
</Interactivity:Interaction.Behaviors>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel IsItemsHost="True" Orientation="Horizontal"/>
|
||||
<VirtualizingStackPanel Name="MyVirtual" IsItemsHost="True" Orientation="Horizontal" VirtualizationMode="Recycling"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ContentPresenter/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
@@ -53,7 +55,7 @@
|
||||
Style="{StaticResource {x:Type ToggleButton}}"
|
||||
IsChecked="{Binding Path=IsSelected, RelativeSource={
|
||||
RelativeSource AncestorType={x:Type ListBoxItem}}}">
|
||||
<RadioButton.Content>
|
||||
<RadioButton.Content>
|
||||
<TextBlock Text="{Binding GraphicName}"/>
|
||||
</RadioButton.Content>
|
||||
</RadioButton>
|
||||
@@ -68,7 +70,7 @@
|
||||
Focusable="False" Grid.RowSpan="2">
|
||||
<Image Source="/Resources/TopCommandBar/Add.png" Stretch="Uniform"/>
|
||||
<!--<Image Source="/Resources/TopCommandBar/NewFile.png" Stretch="Uniform"/>-->
|
||||
</Button>
|
||||
</Button>
|
||||
<Button Grid.Column="2"
|
||||
Height="20" Width="20" VerticalAlignment="Center"
|
||||
Margin="0,5,4.8,5.4" Command="{Binding RemoveAssembly_Command}"
|
||||
@@ -76,7 +78,7 @@
|
||||
Focusable="False" Grid.RowSpan="2">
|
||||
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
||||
<!--<Image Source="/Resources/TopCommandBar/Delete.png" Stretch="Uniform"/>-->
|
||||
</Button>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -2,26 +2,46 @@
|
||||
|
||||
Private Sub Door_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs)
|
||||
Dim Item As ListBoxItem = DirectCast(sender, ListBoxItem)
|
||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) then
|
||||
e.Handled=True
|
||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||
e.Handled = True
|
||||
Return
|
||||
End If
|
||||
' Gestisco porta corrente modificata
|
||||
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified then
|
||||
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified Then
|
||||
If Not Map.refAssemblyManagerVM.ManageModified() Then
|
||||
Return
|
||||
End If
|
||||
Item.IsSelected=Not Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||
Item.IsSelected = Not Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||
Return
|
||||
End If
|
||||
' verifico se il progetto cliccato è quello già selezionato
|
||||
'If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName Is DirectCast(Item.DataContext, AssemblyName) Then
|
||||
' ricarico la porta
|
||||
e.Handled= Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||
e.Handled = Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
||||
'End If
|
||||
'If IsModified Then
|
||||
' Map.refAssemblyManagerVM.CurrProject.SelAssemblyName = DirectCast(Item.DataContext, AssemblyName)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub ListBox_PreviewMouseWheel(sender As Object, e As MouseWheelEventArgs)
|
||||
Dim MyList As ListBox = DirectCast(sender, ListBox)
|
||||
Dim Index As Integer = 0
|
||||
Dim nCountChildren As Integer = VisualTreeHelper.GetChildrenCount(MyList) - 1
|
||||
Dim MyScroll As ScrollViewer
|
||||
For Index = 0 To nCountChildren
|
||||
If TypeOf VisualTreeHelper.GetChild(MyList, Index) Is ScrollViewer Then
|
||||
MyScroll = DirectCast(VisualTreeHelper.GetChild(MyList, Index), ScrollViewer)
|
||||
If e.Delta > 0 Then
|
||||
MyScroll.LineLeft()
|
||||
Else
|
||||
MyScroll.LineRight()
|
||||
End If
|
||||
e.Handled = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -33,7 +33,16 @@
|
||||
Command="{Binding DataContext.CompoBtnCommand,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
CommandParameter="{Binding}"
|
||||
Focusable="False"/>
|
||||
Focusable="False">
|
||||
|
||||
<Button.ToolTip>
|
||||
<Image Source="{Binding ImageDoorHardware}"
|
||||
MaxHeight="100"
|
||||
MaxWidth="100"
|
||||
Stretch="Uniform"/>
|
||||
</Button.ToolTip>
|
||||
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
@@ -73,6 +73,7 @@ Public Class CompoPanelVM
|
||||
Dim Index As Integer = 1
|
||||
Dim CompoName As String = String.Empty
|
||||
Dim CompoNameDDF As String = String.Empty
|
||||
Dim Image As String = String.Empty
|
||||
Dim Side As String = String.Empty
|
||||
Dim FolderName As String = String.Empty
|
||||
' Carico un vettore con il nome delle Path delle componenti
|
||||
@@ -119,11 +120,19 @@ Public Class CompoPanelVM
|
||||
' apro ogni directory e cerco un file di testo di nome Config.ini
|
||||
Dim CurrCompoPath As String = CompoArray(Index) & "\" & ConstCompo.CONFIGINI_FILE_NAME
|
||||
If File.Exists(CurrCompoPath) Then
|
||||
Image = String.Empty
|
||||
GetPrivateProfileCompoName(ConstCompo.S_COMPO, ConstCompo.K_NAME, CompoNameDDF, CompoName, CurrCompoPath)
|
||||
GetPrivateProfileCompoImage(ConstCompo.S_COMPO, ConstCompo.K_IMAGE, Image, CurrCompoPath)
|
||||
GetPrivateProfileJambSide(S_POSITIONSIDE, K_SIDE, Side, CurrCompoPath)
|
||||
GetPrivateProfileFolderName(S_TEMPLATE, K_FOLDER_NAME, FolderName, CurrCompoPath)
|
||||
If CompoPanelList(IndexCompoOrder) = CompoNameDDF Then
|
||||
m_CompoTypeList.Add(New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Side, FolderName))
|
||||
Dim Local_NewCompoType As CompoType
|
||||
If Not String.IsNullOrEmpty(Image) Then
|
||||
Local_NewCompoType = New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Image, Side, FolderName)
|
||||
Else
|
||||
Local_NewCompoType = New CompoType(CompoName, CompoNameDDF, CompoArray(Index), Side, FolderName)
|
||||
End If
|
||||
m_CompoTypeList.Add(Local_NewCompoType)
|
||||
ListCompoToInsert.Find(Function(x) x.sName = CompoNameDDF).SetExists(True)
|
||||
' aggiungere il caricamento delle liste
|
||||
Exit For
|
||||
|
||||
+34
-1
@@ -79,6 +79,28 @@ Public Class CompoType
|
||||
m_Path = Path
|
||||
End Sub
|
||||
|
||||
Private m_ImageDoorHardware As String
|
||||
Public ReadOnly Property ImageDoorHardware As String
|
||||
Get
|
||||
Return m_ImageDoorHardware
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetImageDoorHarware(Image As String)
|
||||
m_ImageDoorHardware = Image
|
||||
End Sub
|
||||
|
||||
Private m_ShowToolTipImag As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property ShowToolTipImg As Visibility
|
||||
Get
|
||||
If Not String.IsNullOrEmpty(m_ImageDoorHardware) Then
|
||||
m_ShowToolTipImag = Visibility.Visible
|
||||
Else
|
||||
m_ShowToolTipImag = Visibility.Collapsed
|
||||
End If
|
||||
Return m_ShowToolTipImag
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_JambSide As String
|
||||
Public ReadOnly Property JambSide As String
|
||||
Get
|
||||
@@ -125,7 +147,7 @@ Public Class CompoType
|
||||
Return other
|
||||
End Function
|
||||
|
||||
Sub New(sName As String, sDDFName As String, sPath As String, sJambSide As String, sFolderName As String, Optional ByVal sDDFMaterial As String = "wood")
|
||||
Sub New(sName As String, sDDFName As String, sPath As String, sJambSide As String, sFolderName As String, Optional sDDFMaterial As String = "wood")
|
||||
m_Name = sName
|
||||
m_DDFName = sDDFName
|
||||
m_Path = sPath
|
||||
@@ -135,4 +157,15 @@ Public Class CompoType
|
||||
LoadListTemplate()
|
||||
End Sub
|
||||
|
||||
Sub New(sName As String, sDDFName As String, sPath As String, sImage As String, sJambSide As String, sFolderName As String, Optional sDDFMaterial As String = "wood")
|
||||
m_Name = sName
|
||||
m_DDFName = sDDFName
|
||||
m_Path = sPath
|
||||
m_ImageDoorHardware = sImage
|
||||
m_JambSide = sJambSide
|
||||
m_FolderName = sFolderName
|
||||
m_DDFMaterial = sDDFMaterial
|
||||
LoadListTemplate()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -64,6 +64,7 @@ Module ConstCompo
|
||||
Public Const CONFIGINI_FILE_NAME As String = "Config.ini"
|
||||
Public Const S_COMPO As String = "Compo"
|
||||
Public Const K_NAME As String = "Name"
|
||||
Public Const K_IMAGE As String = "Image"
|
||||
Public Const S_TEMPLATE As String = "Template"
|
||||
Public Const K_ISACTIVE As String = "IsActive"
|
||||
Public Const K_MATERIAL As String = "Material"
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
|
||||
<Grid IsEnabled="{Binding EnablePageDoor}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Margin="0,0,0,0.2" Grid.Column="1" IsEnabled="{Binding IsReadOnly}">
|
||||
<Grid Margin="0,0,0,0.2" Grid.Column="0" IsEnabled="{Binding IsReadOnly}">
|
||||
<Grid.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
@@ -893,7 +893,7 @@
|
||||
</ListBox>
|
||||
|
||||
</Grid>
|
||||
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||
<ContentControl Grid.Column="1" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||
<!--<EgtDOORCreator:CompoPanelV Grid.Column="0" DataContext="{Binding CompoPanelPartVM}"/>-->
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -619,8 +619,8 @@
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtDOORCreator\EgtDOORCreatorR32.exe
|
||||
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) c:\EgtProg\EgtDOORCreator\EgtDOORCreatorD32.exe
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) C:\EgtProg\EgtDOORCreator\EgtDOORCreatorR32.exe
|
||||
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Debug" copy $(TargetPath) C:\EgtProg\EgtDOORCreator\EgtDOORCreatorD32.exe
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -15,8 +15,8 @@
|
||||
<Grid IsEnabled="{Binding EnablePageHardware}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- Colonna dedicata alla lista dei bottoni -->
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
@@ -26,8 +26,9 @@
|
||||
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
||||
</Grid.InputBindings>
|
||||
|
||||
<!-- La griglia che gestirà i parametri hardaware -->
|
||||
<Grid Grid.Column="1">
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<!-- Deicata al general dell'hardware-->
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -858,9 +859,9 @@
|
||||
</Grid>
|
||||
|
||||
<!-- Elenco pulsanti Hardware -->
|
||||
<ContentControl Grid.Column="0" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||
<ContentControl Grid.Column="1" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
||||
|
||||
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="1" Grid.Row="1" Margin="0,0,2,0"/>
|
||||
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="0" Grid.Row="1" Margin="0,0,2,0" />
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+17
@@ -364,6 +364,23 @@ Friend Module IniFile
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileCompoImage(IpAppName As String, IpKeyName As String, ByRef Image As String, CompoIniPath As String) As Boolean
|
||||
Dim sVal As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, "", sVal, CompoIniPath)
|
||||
Dim CurrDir As String = Path.GetDirectoryName(CompoIniPath)
|
||||
sVal = sVal.Trim
|
||||
If Not String.IsNullOrEmpty(sVal) AndAlso Not String.IsNullOrEmpty(CurrDir) Then
|
||||
sVal = CurrDir.Trim & "\" & sVal
|
||||
If File.Exists(sVal) Then
|
||||
Image = sVal
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileFolderName(IpAppName As String, IpKeyName As String, ByRef Name As String, CompoIniPath As String) As Boolean
|
||||
Dim sVal As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, "", sVal, CompoIniPath)
|
||||
|
||||
@@ -57,8 +57,8 @@ Friend Class MainWindowModel
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2412, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2412, 1, IniFile.m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2531, 1, IniFile.m_nKeyLevel) And
|
||||
EgtGetKeyOptions(3279, 2531, 1, IniFile.m_nKeyOptions)
|
||||
'Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!--<ColumnDefinition Width="1*"/>-->
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -32,9 +32,9 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--<EgtDOORCreator:AssemblyManagerV Grid.Column="0" DataContext="{StaticResource AssemblyManagerVM}"/>-->
|
||||
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding AssemblyManagerControl}"/>
|
||||
<ContentControl Grid.Column="0" Grid.Row="1" Content="{Binding PageControl}"/>
|
||||
<EgtDOORCreator:SceneManagerV Grid.Column="1" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>
|
||||
<ContentControl Grid.Column="1" Grid.Row="0" Content="{Binding AssemblyManagerControl}"/>
|
||||
<ContentControl Grid.Column="1" Grid.Row="1" Content="{Binding PageControl}"/>
|
||||
<EgtDOORCreator:SceneManagerV Grid.Column="0" Grid.RowSpan="2" DataContext="{StaticResource SceneManagerVM}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -23,16 +23,16 @@ Imports System.Windows
|
||||
#Else
|
||||
#If DEBUG Then
|
||||
<Assembly: AssemblyTitle("EgtDOORCreator Debug 32 bit")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreatorD32.exe")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreatorD32.exe")>
|
||||
#Else
|
||||
<Assembly: AssemblyTitle("EgtDOORCreator Release 32 bit")>
|
||||
<Assembly: AssemblyDescription("EgtDOORCreatorR32.exe")>
|
||||
#End If
|
||||
#End If
|
||||
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtDOORCreator")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2022 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -72,5 +72,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.12.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.12.1")>
|
||||
<Assembly: AssemblyVersion("2.5.3.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.3.1")>
|
||||
|
||||
@@ -1071,7 +1071,7 @@ Friend Module OptionModule
|
||||
|
||||
Public Sub GetCurrentMachineInMTable()
|
||||
' aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sLuaLibsDir & "\ChangeConfig.lua")
|
||||
EgtLuaExecFile(IniFile.m_sConfigDir & "\ChangeConfig.lua")
|
||||
' assegno variabili
|
||||
Dim sDir As String = IniFile.m_sDoorsDirPath.Replace("\", "/")
|
||||
EgtLuaSetGlobStringVar("CCD.NewBaseDir", sDir)
|
||||
|
||||
@@ -286,7 +286,7 @@
|
||||
<TextBlock Text="{Binding BaseDir}" Grid.Row="1" Grid.Column="2" Margin="2,10,5,5"
|
||||
Style="{StaticResource DoorParamsTxBl}"/>
|
||||
<Button Content="{Binding ChangeConfigMsg}" Grid.Row="1" Grid.Column="3"
|
||||
Command="{Binding BrowseCommand}" Margin="5"
|
||||
Command="{Binding BrowseCommand}" Margin="5" MaxHeight="28"
|
||||
CommandParameter="ConfigDir"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -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_sLuaLibsDir & "\ChangeConfig.lua") Then
|
||||
If GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0) > 4 And File.Exists(IniFile.m_sConfigDir & "\ChangeConfig.lua") Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
@@ -2066,9 +2066,9 @@ Public Class OptionsVM
|
||||
End If
|
||||
Next
|
||||
|
||||
If m_IsChangedConfig AndAlso EnableConfig AndAlso m_OrigBaseDir <> IniFile.m_sDoorsDirPath AndAlso m_OrigMTable <> OptionModule.m_SelectedMTable.Name Then
|
||||
' aggiorno il file Config.ini dell'EgtCAM5
|
||||
EgtLuaExecFile(IniFile.m_sLuaLibsDir & "\ChangeConfig.lua")
|
||||
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)
|
||||
@@ -2082,6 +2082,18 @@ Public Class OptionsVM
|
||||
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")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user