Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| df47692e8e |
@@ -170,6 +170,14 @@ Module ConstIni
|
|||||||
Public Const K_CSVCURRDIR As String = "CurrDir"
|
Public Const K_CSVCURRDIR As String = "CurrDir"
|
||||||
Public Const K_CSVLASTFILE As String = "LastFile"
|
Public Const K_CSVLASTFILE As String = "LastFile"
|
||||||
|
|
||||||
|
Public Const S_TRF As String = "TRF"
|
||||||
|
Public Const K_ORDCODE As String = "OrdCode"
|
||||||
|
Public Const K_ORDDESC As String = "OrdDesc"
|
||||||
|
Public Const K_PARTCODE As String = "PartCode"
|
||||||
|
Public Const K_MATCODE As String = "MatCode"
|
||||||
|
Public Const K_SURFCODE As String = "SurfCode"
|
||||||
|
Public Const K_TRFTHICKNESS As String = "TrfThickness"
|
||||||
|
|
||||||
Public Const S_SLABDXF As String = "SlabDxf"
|
Public Const S_SLABDXF As String = "SlabDxf"
|
||||||
Public Const K_IMPORTSLABDXF As String = "ImportSlabDxf"
|
Public Const K_IMPORTSLABDXF As String = "ImportSlabDxf"
|
||||||
Public Const K_SLABLAYER As String = "SlabLayer"
|
Public Const K_SLABLAYER As String = "SlabLayer"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ Public Class CompoTrfData
|
|||||||
|
|
||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
DialogResult = True
|
DialogResult = True
|
||||||
|
SaveData()
|
||||||
Close()
|
Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -32,7 +33,30 @@ Public Class CompoTrfData
|
|||||||
Close()
|
Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SaveData()
|
||||||
|
WritePrivateProfileString(S_TRF, K_ORDCODE, OrdCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_TRF, K_ORDDESC, OrdDescTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_TRF, K_PARTCODE, PartCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_TRF, K_MATCODE, MatCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
WritePrivateProfileString(S_TRF, K_SURFCODE, SurfCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
|
' prima di salvare lo spessore converto in mm e poi di nuovo in stringa
|
||||||
|
Dim dVal As Double = 0
|
||||||
|
StringToLen(ThicknessTxBx.Text, dVal)
|
||||||
|
WritePrivateProfileString(S_TRF, K_TRFTHICKNESS, DoubleToString(dVal, 4), m_MainWindow.GetIniFile())
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
||||||
|
' se verifico che non sono stati iniziliazzti i campi allora provvedo a leggere il file ini del programma
|
||||||
|
If sOrdCode = "" And sOrdDesc = "" And sPartCode = "" And sMatCode = "" And sSurfCode = "" Then
|
||||||
|
GetPrivateProfileString(S_TRF, K_ORDCODE, sOrdCode, sOrdCode, m_MainWindow.GetIniFile())
|
||||||
|
GetPrivateProfileString(S_TRF, K_ORDDESC, sOrdDesc, sOrdDesc, m_MainWindow.GetIniFile())
|
||||||
|
GetPrivateProfileString(S_TRF, K_PARTCODE, sPartCode, sPartCode, m_MainWindow.GetIniFile())
|
||||||
|
GetPrivateProfileString(S_TRF, K_MATCODE, sMatCode, sMatCode, m_MainWindow.GetIniFile())
|
||||||
|
GetPrivateProfileString(S_TRF, K_SURFCODE, sSurfCode, sSurfCode, m_MainWindow.GetIniFile())
|
||||||
|
' recupero il dato dello spessore che deve essere in mm
|
||||||
|
dTh = GetPrivateProfileDouble(S_TRF, K_TRFTHICKNESS, dTh, m_MainWindow.GetIniFile())
|
||||||
|
End If
|
||||||
|
' inizializzo i campi della finestra
|
||||||
OrdCodeTxBx.Text = sOrdCode
|
OrdCodeTxBx.Text = sOrdCode
|
||||||
OrdDescTxBx.Text = sOrdDesc
|
OrdDescTxBx.Text = sOrdDesc
|
||||||
PartCodeTxBx.Text = sPartCode
|
PartCodeTxBx.Text = sPartCode
|
||||||
|
|||||||
@@ -1173,8 +1173,10 @@ Public Class DrawPageUC
|
|||||||
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
||||||
If m_bTrfData Then
|
If m_bTrfData Then
|
||||||
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
|
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
|
||||||
|
' carico i dati appena salvati nella pagina
|
||||||
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||||
If DlgTrfData.ShowDialog() Then
|
If DlgTrfData.ShowDialog() Then
|
||||||
|
' recupero i dati salvati nella pagina
|
||||||
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||||
End If
|
End If
|
||||||
ElseIf m_bCsvData Then
|
ElseIf m_bCsvData Then
|
||||||
|
|||||||
@@ -49,28 +49,15 @@
|
|||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="7.25*"/>
|
<RowDefinition Height="8*"/>
|
||||||
<RowDefinition Height="0.75*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||||
ItemsSource="{Binding ItemList}"/>
|
ItemsSource="{Binding ItemList}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="3" Margin="0,0,8,0">
|
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="4*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
|
||||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
|
||||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
|
||||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -297,36 +297,6 @@ Public Class ImportPageUC
|
|||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
|
|
||||||
' Elimino spazi iniziali e finali
|
|
||||||
FindTxBx.Text = FindTxBx.Text.Trim()
|
|
||||||
' ricarico la lista dei file
|
|
||||||
LoadCurrDir()
|
|
||||||
Dim UpdateListFile As New List(Of IconListBoxItem)
|
|
||||||
' Se esiste un nome
|
|
||||||
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
|
|
||||||
For Each Item As IconListBoxItem In FileListBox.ItemsSource
|
|
||||||
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
|
|
||||||
UpdateListFile.Add(Item)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
If UpdateListFile.Count > 0 Then
|
|
||||||
FileListBox.ItemsSource = UpdateListFile
|
|
||||||
Else
|
|
||||||
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
|
|
||||||
' svuoto la text
|
|
||||||
FindTxBx.Text = ""
|
|
||||||
' ricarico la lista dei file
|
|
||||||
LoadCurrDir()
|
|
||||||
' e aggiorno la lista dei file
|
|
||||||
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function ClearView() As Boolean
|
Private Function ClearView() As Boolean
|
||||||
' Pulisco il DB geometrico locale
|
' Pulisco il DB geometrico locale
|
||||||
EgtNewFile()
|
EgtNewFile()
|
||||||
|
|||||||
+9
-30
@@ -2,8 +2,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="OpenPage_Initialized" Loaded="OpenPage_Loaded" Unloaded="OpenPage_Unloaded">
|
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="OpenPage_Initialized" Loaded="OpenPage_Loaded" Unloaded="OpenPage_Unloaded">
|
||||||
|
|
||||||
@@ -18,42 +17,22 @@
|
|||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="8*"/>
|
<RowDefinition Height="8*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Definizione della Grid Superiore -->
|
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||||
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
|
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="5*"/>
|
<ColumnDefinition Width="5*"/>
|
||||||
<ColumnDefinition Width="7*"/>
|
<ColumnDefinition Width="7*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||||
<Grid Grid.Row="1" Grid.RowSpan="2">
|
ItemsSource="{Binding ItemList}"/>
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="6.5*"/>
|
|
||||||
<RowDefinition Height="0.65*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<ListBox Name="FileListBox" ItemTemplate="{DynamicResource DataTemplateItem}"
|
|
||||||
ItemsSource="{Binding ItemList}"/>
|
|
||||||
|
|
||||||
<Grid Grid.Row="1" Margin="0,0,8,0">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="4*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
|
||||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
|
||||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ Public Class OpenPageUC
|
|||||||
OpenSceneHost.SetValue(Grid.ColumnProperty, 1)
|
OpenSceneHost.SetValue(Grid.ColumnProperty, 1)
|
||||||
OpenSceneHost.SetValue(Grid.RowProperty, 2)
|
OpenSceneHost.SetValue(Grid.RowProperty, 2)
|
||||||
' OpenSceneHost.SetValue(Grid.RowSpanProperty, 1)
|
' OpenSceneHost.SetValue(Grid.RowSpanProperty, 1)
|
||||||
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
|
|
||||||
Me.OpenPageGrid.Children.Add(OpenSceneHost)
|
Me.OpenPageGrid.Children.Add(OpenSceneHost)
|
||||||
|
|
||||||
' Definizione del collegamento tra ItemList e ListBox1
|
' Definizione del collegamento tra ItemList e ListBox1
|
||||||
@@ -204,36 +203,6 @@ Public Class OpenPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
|
|
||||||
' Elimino spazi iniziali e finali
|
|
||||||
FindTxBx.Text = FindTxBx.Text.Trim()
|
|
||||||
' ricarico la lista dei file
|
|
||||||
LoadCurrDir()
|
|
||||||
Dim UpdateListFile As New List(Of IconListBoxItem)
|
|
||||||
' Se esiste un nome
|
|
||||||
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
|
|
||||||
For Each Item As IconListBoxItem In FileListBox.ItemsSource
|
|
||||||
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
|
|
||||||
UpdateListFile.Add(Item)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
If UpdateListFile.Count > 0 Then
|
|
||||||
FileListBox.ItemsSource = UpdateListFile
|
|
||||||
Else
|
|
||||||
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
|
|
||||||
' svuoto la text
|
|
||||||
FindTxBx.Text = ""
|
|
||||||
' ricarico la lista dei file
|
|
||||||
LoadCurrDir()
|
|
||||||
' e aggiorno la lista dei file
|
|
||||||
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function ClearView() As Boolean
|
Private Function ClearView() As Boolean
|
||||||
' Pulisco il DB geometrico locale
|
' Pulisco il DB geometrico locale
|
||||||
EgtNewFile()
|
EgtNewFile()
|
||||||
|
|||||||
Reference in New Issue
Block a user