Merge commit '51dcc4243bd14b7b9a563dae28dbadfb8a99e048' into feature/NewGraphicsProgram

This commit is contained in:
Demetrio Cassarino
2025-11-03 12:49:11 +01:00
289 changed files with 5539 additions and 18616 deletions
@@ -395,6 +395,9 @@ Public Module CalcIntegration
If EgtSaveMachGroupToFile(nMachGroupId, {EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO), EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)}, sMachGroupFilePath, NGE.CMPTEXT) Then
Return sMachGroupFilePath
End If
'If EgtSaveObjToFile(nMachGroupId, sMachGroupFilePath, NGE.CMPTEXT) Then
' Return sMachGroupFilePath
'End If
Return String.Empty
End Function
+1 -15
View File
@@ -60,7 +60,7 @@
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
@@ -137,12 +137,6 @@
<Compile Include="ConfigurationPage\Machine_ConfigurationPageV.xaml.vb">
<DependentUpon>Machine_ConfigurationPageV.xaml</DependentUpon>
</Compile>
<Compile Include="ConfigurationPage\OnlyProdQParameter_ConfigurationPageV.xaml.vb">
<DependentUpon>OnlyProdQParameter_ConfigurationPageV.xaml</DependentUpon>
</Compile>
<Compile Include="ConfigurationPage\QParameter_ConfigurationPageV.xaml.vb">
<DependentUpon>QParameter_ConfigurationPageV.xaml</DependentUpon>
</Compile>
<Compile Include="Constants\ConstColumns.vb" />
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
<Compile Include="Constants\ConstDims.vb" />
@@ -320,14 +314,6 @@
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="ConfigurationPage\OnlyProdQParameter_ConfigurationPageV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ConfigurationPage\QParameter_ConfigurationPageV.xaml">
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="EgtColorPicker\EgtColorPickerV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
+1 -1
View File
@@ -2,7 +2,7 @@
<packages>
<package id="EgwProxy.LiMan" version="1.0.2408.718" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net472" />
<package id="RestSharp" version="111.2.0" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
@@ -71,7 +71,7 @@
<HintPath>..\packages\MySql.Data.EntityFramework.8.0.21\lib\net452\MySql.Data.EntityFramework.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.0.1\lib\net46\NLog.dll</HintPath>
+1 -1
View File
@@ -9,7 +9,7 @@
<package id="K4os.Hash.xxHash" version="1.0.8" targetFramework="net472" />
<package id="MySql.Data" version="8.0.21" targetFramework="net472" />
<package id="MySql.Data.EntityFramework" version="8.0.21" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net472" />
<package id="NLog" version="5.0.1" targetFramework="net472" />
<package id="Portable.BouncyCastle" version="1.9.0" targetFramework="net472" />
<package id="SSH.NET" version="2016.1.0" targetFramework="net472" />
@@ -1,18 +0,0 @@
Public Class AddFeatureWndV
Private WithEvents m_AddFeatureWndVM As AddFeatureWndVM
Sub New(Owner As Window, AddFeatureWndVM As AddFeatureWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddFeatureWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_AddFeatureWndVM = AddFeatureWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddFeatureWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -2,89 +2,119 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddProcess">
<StackPanel Margin="5,5,5,0">
<TabControl SelectedIndex="{Binding SelGRPType}">
<TabItem Header="L"/>
<TabItem Header="T"/>
</TabControl>
<Border Grid.Row="1"
BorderThickness="1"
BorderBrush="DarkGray"
Background="White"
Margin="0,-6,0,5">
<Grid Margin="0,5,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Center"
Grid.Row="0"
Margin="0,0,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Process"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding PRCList}"
SelectedItem="{Binding nSelPRC}"
Grid.Column="1"
DisplayMemberPath="ghDesc"
Width="200"
HorizontalAlignment="Left"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Text="Macro"
Grid.Row="1"
Margin="0,5,0,0"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding MacroCustomList}"
SelectedIndex="{Binding nSelMacroCustom}"
Grid.Row="1"
Grid.Column="1"
DisplayMemberPath="Name"
IsEnabled="{Binding MacroList_IsEnabled}"
Width="200"
Margin="0,5,0,0"
Style="{StaticResource FeatureComboBox}"/>
</Grid>
<Image Source="{Binding sDrawPath}"
Grid.Row="1"
Height="300"
Width="300"
Margin="5,0,5,5"/>
<Grid Grid.Row="2" Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
Title="AddProcess"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" CornerRadius="4,0,0,4">
<TextBlock Text="{Binding Process_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
</StackPanel>
<Border Grid.Row="1"
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="4,0,0,4"
BorderThickness="2,2,0,2">
<ListBox Grid.Row="1"
ItemsSource="{Binding PRCListView}"
SelectedItem="{Binding nSelPRC}"
Style="{StaticResource NewAddFeature_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding ghDesc}"
ToolTip="{Binding ghDesc}"
TextAlignment="Justify"
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
Style="{StaticResource OptionTextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<Border Grid.Column="1" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2">
<TextBlock Grid.Column="1"
Text="{Binding Custom_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Grid.Column="1"
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0"
BorderThickness="0,2,0,2">
<ListBox ItemsSource="{Binding MacroCustomList}"
SelectedIndex="{Binding nSelMacroCustom}"
Style="{StaticResource MacroCustom_ListBox}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Style="{StaticResource MacroCustom_WrapPanel}"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding sMacroName}"
Style="{StaticResource Macro_TextBlock}"/>
<Image Grid.Row="1"
Source="{Binding sMacroDrawPath}"
Style="{StaticResource Macro_Image}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<Border Grid.Column="2" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" Padding="0,10,0,10" CornerRadius="0,4,4,0">
<TextBlock
Text="{Binding Default_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Grid.Column="2"
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0,4,4,0"
BorderThickness="0,2,2,2">
<ListBox ItemsSource="{Binding MacroDefaultList}"
SelectedIndex="{Binding nSelMacroDefault}"
Style="{StaticResource MacroDefault_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding sMacroName}"
TextAlignment="Justify"
Style="{StaticResource MacroDefault_TextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<UniformGrid Columns="2"
Grid.Row="2"
Grid.ColumnSpan="3"
Margin="5">
<Button Content="{Binding OK_Msg}"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
IsCancel="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,4 +1,4 @@
Public Class NewAddFeatureWndV
Public Class AddFeatureWndV
Private WithEvents m_AddFeatureWndVM As AddFeatureWndVM
@@ -374,30 +374,12 @@ Public Class PRC
End Get
End Property
' lista dei parametri Q della feature
Protected m_QBTLParamVMList As List(Of QBTLParamVM)
Public Property QBTLParamVMList As List(Of QBTLParamVM)
Get
Return m_QBTLParamVMList
End Get
Set(value As List(Of QBTLParamVM))
m_QBTLParamVMList = value
End Set
End Property
Sub New(GRP As Integer, PRC As Integer, Name As String)
m_nPRC = PRC
m_sName = Name
m_nGRP = GRP
End Sub
Sub New(GRP As Integer, PRC As Integer, Name As String, QBTLParamList As List(Of QBTLParamVM))
m_nPRC = PRC
m_sName = Name
m_nGRP = GRP
m_QBTLParamVMList = QBTLParamList
End Sub
End Class
Public Class NewMacro
@@ -1,120 +0,0 @@
<EgtWPFLib5:EgtCustomWindow x:Class="NewAddFeatureWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddProcess"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" CornerRadius="4,0,0,4">
<TextBlock Text="{Binding Process_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="4,0,0,4"
BorderThickness="2,2,0,2">
<ListBox Grid.Row="1"
ItemsSource="{Binding PRCListView}"
SelectedItem="{Binding nSelPRC}"
Style="{StaticResource NewAddFeature_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding ghDesc}"
ToolTip="{Binding ghDesc}"
TextAlignment="Justify"
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
Style="{StaticResource OptionTextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<Border Grid.Column="1" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2">
<TextBlock Grid.Column="1"
Text="{Binding Custom_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Grid.Column="1"
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0"
BorderThickness="0,2,0,2">
<ListBox ItemsSource="{Binding MacroCustomList}"
SelectedIndex="{Binding nSelMacroCustom}"
Style="{StaticResource MacroCustom_ListBox}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Style="{StaticResource MacroCustom_WrapPanel}"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding sMacroName}"
Style="{StaticResource Macro_TextBlock}"/>
<Image Grid.Row="1"
Source="{Binding sMacroDrawPath}"
Style="{StaticResource Macro_Image}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<Border Grid.Column="2" Background="{StaticResource BeamWall_Kashmir}" Margin="0,2,0,2" Padding="0,10,0,10" CornerRadius="0,4,4,0">
<TextBlock
Text="{Binding Default_Msg}"
Style="{StaticResource ListTextBlock}"/>
</Border>
<Border Grid.Row="1"
Grid.Column="2"
Style="{StaticResource OnlyProdPage_Border}"
CornerRadius="0,4,4,0"
BorderThickness="0,2,2,2">
<ListBox ItemsSource="{Binding MacroDefaultList}"
SelectedIndex="{Binding nSelMacroDefault}"
Style="{StaticResource MacroDefault_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding sMacroName}"
TextAlignment="Justify"
Style="{StaticResource MacroDefault_TextBlock}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Border>
<UniformGrid Columns="2"
Grid.Row="2"
Grid.ColumnSpan="3"
Margin="5">
<Button Content="{Binding OK_Msg}"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
IsCancel="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -2,15 +2,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddPartWndV">
Title="AddPartWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -19,17 +19,16 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid Style="{StaticResource OnlyProdAddPart_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Name"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sNAM}"
Grid.Column="1"
Width="200"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sNAM}"
Style="{StaticResource NAM_TextBox}"/>
</Grid>
<Grid Grid.Row="1"
Margin="0,0,0,5">
@@ -41,15 +40,15 @@
</Grid.ColumnDefinitions>
<TextBlock Text="Prod Number"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding nPDN}"
Grid.Column="1"
Width="45"/>
<TextBlock Text="Count"
Grid.Column="2"
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding nPDN}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2"
Text="Count"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sCNT}"
Grid.Column="3"
Width="45"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sCNT}"
Style="{StaticResource Dimension_TextBox}"/>
</Grid>
<Grid Grid.Row="2"
Margin="0,0,0,5">
@@ -63,41 +62,33 @@
</Grid.ColumnDefinitions>
<TextBlock Text="W"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sW}"
Grid.Column="1"
Width="45"/>
<TextBlock Text="H"
Grid.Column="2"
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sW}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2"
Text="H"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sH}"
Grid.Column="3"
Width="45"/>
<TextBlock Text="L"
Grid.Column="4"
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sH}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="4"
Text="L"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sL}"
Grid.Column="5"
Width="45"/>
<EgtWPFLib5:EgtTextBox Grid.Column="5"
Text="{Binding sL}"
Style="{StaticResource Dimension_TextBox}"/>
</Grid>
<Grid Grid.Row="3"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<UniformGrid Grid.Row="3"
Columns="2"
Margin="0,5,0,5">
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,94 +0,0 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdAddPartWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddPartWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Style="{StaticResource OnlyProdAddPart_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Name"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sNAM}"
Style="{StaticResource NAM_TextBox}"/>
</Grid>
<Grid Grid.Row="1"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Prod Number"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding nPDN}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2"
Text="Count"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sCNT}"
Style="{StaticResource Dimension_TextBox}"/>
</Grid>
<Grid Grid.Row="2"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="W"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sW}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="2"
Text="H"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding sH}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="4"
Text="L"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="5"
Text="{Binding sL}"
Style="{StaticResource Dimension_TextBox}"/>
</Grid>
<UniformGrid Grid.Row="3"
Columns="2"
Margin="0,5,0,5">
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,18 +0,0 @@
Public Class OnlyProdAddPartWndV
Private WithEvents m_AddPartWndVM As AddPartWndVM
Sub New(Owner As Window, AddPartWndVM As AddPartWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddPartWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_AddPartWndVM = AddPartWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddPartWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -2,15 +2,14 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddRawPartWnd">
Title="AddRawPartWnd"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -21,9 +20,10 @@
SelectedItem="{Binding SelDimension}"
DisplayMemberPath="sDimension"
Visibility="{Binding DimensionsList_Visibility}"
Margin="0,0,0,5"/>
<ItemsControl ItemsSource="{Binding VariableList}"
Grid.Row="1">
Margin="0,0,0,5"
Style="{StaticResource OnlyProd_ComboBox}"/>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding VariableList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,0,5">
@@ -34,31 +34,27 @@
<TextBlock Text="{Binding sMsg}"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sValue}"
Grid.Column="1"
Width="65"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue}"
Style="{StaticResource Value_TextBox}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid Grid.Row="2"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
<UniformGrid Grid.Row="2"
Columns="2"
Margin="0,0,0,5">
<Button Grid.Column="1"
Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"
Margin="0,0,5,0"/>
<Button Grid.Column="3"
Content="Cancel"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,60 +0,0 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdAddRawPartWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="AddRawPartWnd"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ComboBox ItemsSource="{Binding DimensionsList}"
SelectedItem="{Binding SelDimension}"
DisplayMemberPath="sDimension"
Visibility="{Binding DimensionsList_Visibility}"
Margin="0,0,0,5"
Style="{StaticResource OnlyProd_ComboBox}"/>
<ItemsControl Grid.Row="1"
ItemsSource="{Binding VariableList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sMsg}"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
Text="{Binding sValue}"
Style="{StaticResource Value_TextBox}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<UniformGrid Grid.Row="2"
Columns="2"
Margin="0,0,0,5">
<Button Grid.Column="1"
Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"
Margin="0,0,5,0"/>
<Button Grid.Column="3"
Content="Cancel"
IsCancel="True"
Style="{StaticResource OnlyProdEgtWPFLib5_InputButton}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,18 +0,0 @@
Public Class OnlyProdAddRawPartWndV
Private WithEvents m_AddRawPartWndVM As AddRawPartWndVM
Sub New(Owner As Window, AddRawPartWndVM As AddRawPartWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = AddRawPartWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_AddRawPartWndVM = AddRawPartWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_AddRawPartWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
@@ -31,14 +31,14 @@
<DataGridTextColumn x:Key="colSECTXMAT" Binding="{Binding sSectionXMaterial}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.SectionXMaterial_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
<TextBlock Text="{Binding Path=DataContext.SectionXMaterial_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:AddSectionXMaterialWndV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!-- Alias -->
<DataGridTemplateColumn x:Key="colALIAS">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Alias_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
<TextBlock Text="{Binding Path=DataContext.Alias_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:AddSectionXMaterialWndV}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
@@ -52,7 +52,7 @@
<DataGridTextColumn x:Key="colW" Binding="{Binding sNewW}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:AddSectionXMaterialWndV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
@@ -65,7 +65,7 @@
<DataGridTextColumn x:Key="colL" Binding="{Binding sNewL}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:AddSectionXMaterialWndV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
@@ -77,7 +77,7 @@
<!-- Material -->
<DataGridTemplateColumn x:Key="colMATERIAL">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Material_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
<TextBlock Text="{Binding Path=DataContext.Material_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:AddSectionXMaterialWndV}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
@@ -91,7 +91,7 @@
<DataGridTextColumn x:Key="colQTY" Binding="{Binding sQuantity}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.Quantity_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:AddSectionXMaterialWndV}}}"/>
<TextBlock Text="{Binding Path=DataContext.Quantity_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:AddSectionXMaterialWndV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.CellStyle>
+1 -1
View File
@@ -13,7 +13,7 @@
MapV.SetRefSplashScreenV(SplashScreen)
End If
' Creo la View principale
Me.MainWindow = New OnlyProdMainWindowV
Me.MainWindow = New MainWindowV
' Mostro la View principale
Me.MainWindow.Show()
End Sub
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
@@ -31,9 +31,9 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<EgtBEAMWALL:ProjectParametersV Grid.RowSpan="2" Margin="0,10,0,0"
Tag="{Binding GeneralParametersList}"
IsEnabled="{Binding GeneralParametersIsEnable}"/>
<OPTIMIZER:ProjectParametersV Grid.RowSpan="2" Margin="0,10,0,0"
Tag="{Binding GeneralParametersList}"
IsEnabled="{Binding GeneralParametersIsEnable}"/>
<UniformGrid Rows="2" Grid.Column="1" Margin="0,0,5,0">
<CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}"
Margin="10,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Center"
@@ -31,7 +31,7 @@ Public Class BTLDataWndVM
WriteMainPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, value & ".json")
Map.refStrategyManagerVM.SelStrategySetup.sName = value
Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refOnlyProdManagerVM.Save()
Map.refProdManagerVM.Save()
End If
m_SelStrategySetup = value
NotifyPropertyChanged(NameOf(SelStrategySetup))
@@ -158,7 +158,7 @@ Public Class BTLDataWndVM
Get
Select Case Map.refMainMenuVM.SelPage
Case Pages.ONLYPRODPAGE
Return Map.refOnlyProdManagerVM.nProdType
Return Map.refProdManagerVM.nProdType
Case Else
Return BWType.NULL
End Select
@@ -790,7 +790,7 @@ Public Class BTLDataWndVM
End Select
Next
End If
Map.refOnlyProdManagerVM.Save()
Map.refProdManagerVM.Save()
RaiseEvent m_CloseWindow(True)
End Sub
@@ -1,79 +1,49 @@
<StackPanel x:Class="BTLPartManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Orientation="Horizontal"
HorizontalAlignment="Right"
DataContext="{StaticResource BTLPartManagerVM}">
<Button Command="{Binding NewRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding NewRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding NewRawPartLast_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding NewRawPartLast_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/NewRawPartAuto.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddToRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding AddToRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddToRawPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding CopyPart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddPart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding AddPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePart_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/RemovePart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Invert_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding InvertSx_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/PartManager/LeftInvert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Invert_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding InvertDx_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/PartManager/RightInvert.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding BackRotation_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding BackRotation_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/PartManager/LeftRotate.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ForwardRotation_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding ForwardRotation_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/PartManager/RightRotate.png" Stretch="Uniform"/>
</Button>
<Border x:Class="BTLPartManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{StaticResource BTLPartManagerVM}"
CornerRadius="5"
BorderThickness="2"
BorderBrush="{StaticResource BeamWall_Teal}"
Background="{StaticResource BeamWall_FountainBlue}">
</StackPanel>
<StackPanel Orientation="Horizontal"
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
<Button Command="{Binding CopyPart_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePart_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/NewPage/Remove.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Simulate_ToolTip}"
Click="ClosePopUp_Click"
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/Simulate.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Edit_ToolTip}"
Click="ClosePopUp_Click"
Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ResetCalc_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</Border>
@@ -1,3 +1,14 @@
Public Class BTLPartManagerV
Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs)
Dim Button As Button = DirectCast(sender, Button)
Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel)
Dim OnlyProdBTLPartManagerV As BTLPartManagerV = DirectCast(StackPanel.Parent, BTLPartManagerV)
Dim Popup As Primitives.Popup = DirectCast(OnlyProdBTLPartManagerV.Parent, Primitives.Popup)
If Not IsNothing(Popup) Then
Popup.IsOpen = False
End If
End Sub
End Class
@@ -386,7 +386,7 @@ Public Class BTLPartManagerVM
If ((IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM)) AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
Dim ProjType As BWType
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
ProjType = Map.refOnlyProdManagerVM.CurrProd.nType
ProjType = Map.refProdManagerVM.CurrProd.nType
If Not CreateBarToSimulate(ProjType, BarList) Then Return
' lancio simulazione
EgtBEAMWALL.Core.CalcIntegration.Run(BarList, ProjectManagerVM.CurrProd.sProdDirPath & "\Projs\" & Map.refProjectVM.BTLStructureVM.SelBTLPart.nPROJ.ToString("0000"), AddressOf ManageCalc)
@@ -1,49 +0,0 @@
<Border x:Class="OnlyProdBTLPartManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{StaticResource BTLPartManagerVM}"
CornerRadius="5"
BorderThickness="2"
BorderBrush="{StaticResource BeamWall_Teal}"
Background="{StaticResource BeamWall_FountainBlue}">
<StackPanel Orientation="Horizontal"
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
<Button Command="{Binding CopyPart_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding CopyPart_ToolTip}"
IsEnabled="{Binding CopyPart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePart_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding RemovePart_ToolTip}"
IsEnabled="{Binding RemovePart_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/NewPage/Remove.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Simulate_ToolTip}"
Click="ClosePopUp_Click"
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/Simulate.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Edit_ToolTip}"
Click="ClosePopUp_Click"
Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ResetCalc_Command}"
Click="ClosePopUp_Click"
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</Border>
@@ -1,14 +0,0 @@
Public Class OnlyProdBTLPartManagerV
Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs)
Dim Button As Button = DirectCast(sender, Button)
Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel)
Dim OnlyProdBTLPartManagerV As OnlyProdBTLPartManagerV = DirectCast(StackPanel.Parent, OnlyProdBTLPartManagerV)
Dim Popup As Primitives.Popup = DirectCast(OnlyProdBTLPartManagerV.Parent, Primitives.Popup)
If Not IsNothing(Popup) Then
Popup.IsOpen = False
End If
End Sub
End Class
@@ -152,7 +152,6 @@ Public Class BTLFeatureVM
End If
NotifyPropertyChanged(NameOf(nSelVARIANT))
NotifyPropertyChanged(NameOf(PBTLParamVMList))
NotifyPropertyChanged(NameOf(QBTLParamVMList))
EgtDraw()
End If
End Set
@@ -163,7 +162,6 @@ Public Class BTLFeatureVM
m_BTLFeatureM.CreateFeatureParams(m_BTLFeatureM)
m_BTLFeatureM.SetDefaultValues()
CreatePBTLParamVMList()
CreateQBTLParamVMList()
' aggiorno la feature con nuovo valore
vPar = Nothing
sPar = Nothing
@@ -270,27 +268,6 @@ Public Class BTLFeatureVM
End Set
End Property
Private m_QBTLParamVMList As ObservableCollection(Of BTLParamVM)
Public Property QBTLParamVMList As ObservableCollection(Of BTLParamVM)
Get
Return m_QBTLParamVMList
End Get
Set(value As ObservableCollection(Of BTLParamVM))
m_QBTLParamVMList = value
End Set
End Property
Protected m_SelQParam As BTLParamVM
Public Property SelQBTLParam As BTLParamVM
Get
Return m_SelQParam
End Get
Set(value As BTLParamVM)
m_SelQParam = value
NotifyPropertyChanged(NameOf(SelQBTLParam))
End Set
End Property
Public ReadOnly Property Edit_Visibility As Visibility
Get
Return If(BTLFeatureM.IsFreeContour AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
@@ -341,10 +318,8 @@ Public Class BTLFeatureVM
Sub New(BTLFeatureM As BTLFeatureM, BTLPartM As BTLPartM)
m_BTLFeatureM = BTLFeatureM
AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded
m_BTLPartM = BTLPartM
CreatePBTLParamVMList()
CreateQBTLParamVMList()
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
@@ -354,10 +329,7 @@ Public Class BTLFeatureVM
Sub New(BTLFeatureM As BTLFeatureM)
m_BTLFeatureM = BTLFeatureM
AddHandler m_BTLFeatureM.QBTLParamAdded, AddressOf OnQBTLParamAdded
m_BTLPartM = Nothing
Dim Part As PartM = BTLFeatureM.ParentPart
If Part.nType = BWType.WALL Then CreateQBTLParamVMList()
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
@@ -381,18 +353,6 @@ Public Class BTLFeatureVM
End Sub
Private Sub CreateQBTLParamVMList()
Dim all As List(Of BTLParamVM) = (From BTLParamM In m_BTLFeatureM.GetQBTLParams()
Select New BTLParamVM(BTLParamM, m_BTLFeatureM)).ToList()
For Each BTLParamVM As BTLParamVM In all
AddHandler BTLParamVM.PropertyChanged, AddressOf OnQBTLParamVMPropertyChanged
Next
m_QBTLParamVMList = New ObservableCollection(Of BTLParamVM)(all)
AddHandler m_QBTLParamVMList.CollectionChanged, AddressOf OnQBTLParamVMListChanged
End Sub
' funzione che aggiorna lo stato, la rotazione e gli errori dopo calcolo
Friend Sub CalcFeatureUpdate(nProgramPage As Integer, ERR As Integer, ROT As Integer, MSG As String)
EgtSetInfo(nFeatureId, If(nProgramPage = ProjectType.PROJ, ITG_PROJ_ERR, ITG_PROD_ERR), ERR, True)
@@ -481,10 +441,6 @@ Public Class BTLFeatureVM
DestBTLPart.NewProcId(), m_BTLFeatureM.frFRAME, vPar, sPar, vParQ, nCrvId, nCrv2Id)
' se è stata creata
If nNewFeatureId <> GDB_ID.NULL Then
' Riporto eventuali indicazioni di parametri Q custom
For Each QPar In QBTLParamVMList
If QPar.bCustom Then EgtSetInfo(nNewFeatureId, QPar.sName & "A", 1)
Next
' Riporto priority
EgtSetInfo(nNewFeatureId, BTL_FTR_PRIORITY, m_BTLFeatureM.nPriority)
Dim NewFeat As BTLFeatureM = BTLFeatureM.CreateBTLFeature(m_BTLPartM, nNewFeatureId)
@@ -659,10 +615,6 @@ Public Class BTLFeatureVM
Dim BTLParamVM As New BTLParamVM(e.NewBTLParam, m_BTLFeatureM)
PBTLParamVMList.Add(BTLParamVM)
End Sub
Private Sub OnQBTLParamAdded(sender As Object, e As BTLParamAddedEventArgs) Handles m_BTLFeatureM.QBTLParamAdded
Dim BTLParamVM As New BTLParamVM(e.NewBTLParam, m_BTLFeatureM)
QBTLParamVMList.Add(BTLParamVM)
End Sub
Private Sub OnPBTLParamVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
@@ -676,18 +628,6 @@ Public Class BTLFeatureVM
Next
End If
End Sub
Private Sub OnQBTLParamVMListChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
If Not IsNothing(e.NewItems) AndAlso e.NewItems.Count > 0 Then
For Each BTLParamVM As BTLParamVM In e.NewItems
AddHandler BTLParamVM.PropertyChanged, AddressOf OnQBTLParamVMPropertyChanged
Next
End If
If Not IsNothing(e.OldItems) AndAlso e.OldItems.Count > 0 Then
For Each BTLParamVM As BTLParamVM In e.OldItems
RemoveHandler BTLParamVM.PropertyChanged, AddressOf OnQBTLParamVMPropertyChanged
Next
End If
End Sub
Private Sub OnPBTLParamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
Select Case e.PropertyName
@@ -698,15 +638,6 @@ Public Class BTLFeatureVM
ResetCalcFeature()
End Select
End Sub
Private Sub OnQBTLParamVMPropertyChanged(sender As Object, e As PropertyChangedEventArgs)
Select Case e.PropertyName
Case NameOf(sender.dValue), NameOf(sender.sValue)
' riseleziono questa feature
SelGeomFeature()
' rendo non calcolata questa feature
ResetCalcFeature()
End Select
End Sub
#End Region ' EVENTS
@@ -89,7 +89,7 @@ Public Class BTLPartVM
EgtOutLog("Trovato Duplo Ghost")
Else
Dim MachGroupModel = Nothing
If Not IsNothing(Map.refOnlyProdManagerVM) Then
If Not IsNothing(Map.refProdManagerVM) Then
MachGroupModel = DbControllers.m_MachGroupController.FindByMachGroupId(ProjectManagerVM.CurrProj.nProdId, nMachgroupId)
End If
If Not IsNothing(MachGroupModel) AndAlso MachGroupModel.State > ItemState.ND Then
@@ -1784,10 +1784,6 @@ Public Class BTLPartVM
AddHandler BTLParamVM.PropertyChanged, AddressOf OnBTLPParamVMPropertyChanged
Next
AddHandler BTLFeatureVM.PBTLParamVMList.CollectionChanged, AddressOf OnBTLPParamVMListChanged
For Each BTLParamVM As BTLParamVM In BTLFeatureVM.QBTLParamVMList
AddHandler BTLParamVM.PropertyChanged, AddressOf OnBTLQParamVMPropertyChanged
Next
AddHandler BTLFeatureVM.QBTLParamVMList.CollectionChanged, AddressOf OnBTLQParamVMListChanged
Next
m_BTLFeatureVMList = New ObservableCollection(Of BTLFeatureVM)(all)
@@ -1934,7 +1930,7 @@ Public Class BTLPartVM
Dim nNewPartId As Integer = EgtBeamCreatePart()
If nNewPartId = GDB_ID.NULL Then Return Nothing
' scrivo info proj
If Not IsNothing(Map.refOnlyProdManagerVM) Then
If Not IsNothing(Map.refProdManagerVM) Then
EgtSetInfo(nNewPartId, BTL_PRT_PROJ, ProjectManagerVM.CurrProd.nProjIdList(0))
End If
EgtBeamSetPartProdNbr(m_BTLStructureM.NewPDN())
@@ -1,3 +0,0 @@
Friend Class BTLRawPartVM
End Class
@@ -484,7 +484,7 @@ Public Class BTLStructureVM
Get
Select Case Map.refMainMenuVM.SelPage
Case Pages.ONLYPRODPAGE
Return Map.refOnlyProdManagerVM.nProdType
Return Map.refProdManagerVM.nProdType
Case Else
Return BWType.NULL
End Select
@@ -1230,9 +1230,6 @@ Public Class BTLStructureVM
#Region "Data"
''' <summary>
''' Returns a command that do Open.
''' </summary>
Public ReadOnly Property Data_Command As ICommand
Get
If m_cmdData Is Nothing Then
@@ -1242,9 +1239,6 @@ Public Class BTLStructureVM
End Get
End Property
''' <summary>
''' Execute the Open. This method is invoked by the OpenCommand.
''' </summary>
Friend Sub Data(nProjId As Integer)
Dim BTLDataWnd As New BTLDataWndV(Application.Current.MainWindow, New BTLDataWndVM(nProjId))
BTLDataWnd.ShowDialog()
@@ -1254,9 +1248,6 @@ Public Class BTLStructureVM
#Region "AddPart"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property AddPart_Command As ICommand
Get
If m_cmdAddPart Is Nothing Then
@@ -1266,13 +1257,10 @@ Public Class BTLStructureVM
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub AddPart(nProjId As Integer)
' apro finestra di definizione nuovo part
Dim AddPartWndVM As New AddPartWndVM()
Dim AddPartWnd As New OnlyProdAddPartWndV(Application.Current.MainWindow, AddPartWndVM)
Dim AddPartWnd As New AddPartWndV(Application.Current.MainWindow, AddPartWndVM)
If AddPartWnd.ShowDialog() Then
' creo nuovo part
Dim nNewPartId As Integer = EgtBeamCreatePart()
@@ -1314,9 +1302,6 @@ Public Class BTLStructureVM
#Region "UpdateBTL"
''' <summary>
''' Returns a command that do UpdateBTL.
''' </summary>
Public ReadOnly Property UpdateBTL_Command As ICommand
Get
If m_cmdUpdateBTL Is Nothing Then
@@ -1326,16 +1311,13 @@ Public Class BTLStructureVM
End Get
End Property
''' <summary>
''' Execute the UpdateBTL. This method is invoked by the UpdateBTLCommand.
''' </summary>
Public Sub UpdateBTL(nProjId As Integer, Optional sFile As String = "", Optional bWithDlg As Boolean = True)
If IsNothing(CurrProd) Then Return
' verifico se progetto modificato, e chiedo se salvare
If CurrProd.bIsNew Or EgtGetModified() OrElse Map.refCALCPanelVM.IsMachineModified() Then
Select Case MessageBox.Show(EgtMsg(61877), "", MessageBoxButton.YesNoCancel, MessageBoxImage.Question)
Case MessageBoxResult.Yes
Map.refOnlyProdManagerVM.Save()
Map.refProdManagerVM.Save()
Case MessageBoxResult.Cancel
Return
Case Else ' No
@@ -1398,7 +1380,7 @@ Public Class BTLStructureVM
' setto il flag per inizializzazione gestore travi e pareti per importare progetto
Dim nFlag As Integer
Dim sBTLFlag As String
If Map.refOnlyProdManagerVM.nProdType = BWType.BEAM Then
If Map.refProdManagerVM.nProdType = BWType.BEAM Then
sBTLFlag = K_BTLFLAG
Else
sBTLFlag = K_WALLBTLFLAG
@@ -1486,7 +1468,7 @@ Public Class BTLStructureVM
For Each BTLPart In Map.refProjectVM.BTLStructureVM.BTLStructureM.BTLPartMList
If PartToUpdate.nPDN = BTLPart.nPDN Then
Dim UpdateOrAppendWndVM As New UpdateOrAppendWndVM()
Dim UpdateOrAppendWnd As New OnlyProdUpdateOrAppendWndV(Application.Current.MainWindow, UpdateOrAppendWndVM)
Dim UpdateOrAppendWnd As New UpdateOrAppendWndV(Application.Current.MainWindow, UpdateOrAppendWndVM)
If Not UpdateOrAppendWnd.ShowDialog() Then
' torno sul contesto corrente
EgtSetCurrentContext(nCurrCtx)
@@ -1601,7 +1583,7 @@ Public Class BTLStructureVM
' altrimenti apro la finestra con l'elenco dei Part da checkare per l'inserimento nel progetto (unica strada se UserLevel <= 5),
' che prevederà la sovrascrittura di quelli già presenti e l'aggiunta di quelli nuovi
Dim UpdateBTLWndVM As New UpdateBTLWndVM(PartToUpdateList)
Dim UpdateBTLWnd As New OnlyProdUpdateBTLWndV(Application.Current.MainWindow, UpdateBTLWndVM)
Dim UpdateBTLWnd As New UpdateBTLWndV(Application.Current.MainWindow, UpdateBTLWndVM)
If Not UpdateBTLWnd.ShowDialog() Then
' torno sul contesto corrente
EgtSetCurrentContext(nCurrCtx)
@@ -1833,7 +1815,7 @@ Public Class BTLStructureVM
End If
End If
Map.refOnlyProdManagerVM.CopyBuilding()
Map.refProdManagerVM.CopyBuilding()
' copio il file originale scelto nel dialog per l'Update nella cartella Proj del progetto corrente
If File.Exists(sFile) Then
@@ -1,155 +0,0 @@
<EgtWPFLib5:EgtCustomWindow x:Class="BeamMachiningsWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
Title="{Binding Title}"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
Width="500" Height="450"
IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding Close_Command,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TabControl ItemsSource="{Binding MachiningList}"
SelectedItem="{Binding SelMachining}"
IsSynchronizedWithCurrentItem="True"
Margin="5,0,5,0"
Style="{StaticResource TabControl_OnlyHeaders}"/>
<EgtBEAMWALLCORE:EgtDataGrid Grid.Row="1"
ItemsSource="{Binding TableRowList}"
SelectedIndex="{Binding SelRowIndex}"
AutoGenerateColumns="False"
CanUserResizeRows="False"
SelectionMode="Single"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
Margin="0,0,0,5"
BindingColumns="{Binding BeamMachiningsColumns}">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Setter Property="Height" Value="25"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</DataGrid.RowStyle>
<DataGrid.Resources>
<Style x:Key="DataGridCheckBoxColumn_Style"
TargetType="{x:Type DataGridCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Colonna On-->
<DataGridCheckBoxColumn x:Key="colON" Binding="{Binding OnPar, UpdateSourceTrigger=PropertyChanged}"
CellStyle="{StaticResource DataGridCheckBoxColumn_Style}">
<DataGridCheckBoxColumn.Header>
<TextBlock Text="{Binding Path=DataContext.OnHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridCheckBoxColumn.Header>
</DataGridCheckBoxColumn>
<!--Colonna Name-->
<DataGridTemplateColumn x:Key="colNAME">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.NameHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=NamesList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center"
Margin="5,0,0,0"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Colonna Style-->
<DataGridTemplateColumn x:Key="colTYPE">
<DataGridTemplateColumn.Header>
<TextBlock Text="{Binding Path=DataContext.TypeHdr,RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<ComboBox IsEditable="False"
SelectedItem="{Binding Type,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
ItemsSource="{Binding Path=TypeList, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"/>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Type,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center"
Margin="5,0,0,0"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Resources>
</EgtBEAMWALLCORE:EgtDataGrid>
<Grid Grid.Row="2"
Margin="0,0,0,5"
HorizontalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Content="/\"
Command="{Binding MoveRowUp_Command}"
Grid.Column="0"
Margin="0,0,2.5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="\/"
Command="{Binding MoveRowDown_Command}"
Grid.Column="1"
Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding AddRowMsg}"
Command="{Binding AddRow_Command}"
Grid.Column="2"
Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding DeleteRowMsg}"
Command="{Binding DeleteRow_Command}"
Grid.Column="3"
Margin="2.5,0,2.5,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding SaveMsg}"
Command="{Binding Save_Command}"
Grid.Column="4"
Margin="2.5,0,0,0"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,20 +0,0 @@
Imports EgtBEAMWALL.Core
Public Class BeamMachiningsWindowV
Private WithEvents m_BeamMachiningsWindowVM As MyBeamMachiningsWindowVM
Sub New(Owner As Window, BeamMachiningsWindowVM As MyBeamMachiningsWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = BeamMachiningsWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_BeamMachiningsWindowVM = BeamMachiningsWindowVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_BeamMachiningsWindowVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -1,36 +0,0 @@
Imports System.Collections.ObjectModel
Imports EgtBEAMWALL.Core
Imports EgtWPFLib5
Public Class MyBeamMachiningsWindowVM
Inherits BeamMachiningsWindowVM
#Region "FIELDS & PROPERTIES"
Private m_BeamMachiningsColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property BeamMachiningsColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_BeamMachiningsColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_BeamMachiningsColumns = value
End Set
End Property
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New(sTitle As String, sBaseDir As String, sMachTypePath As String, sTabTemplPath As String, Optional bIsBeam As Boolean = True)
MyBase.New(sTitle, sBaseDir, sMachTypePath, sTabTemplPath, bIsBeam)
' carico le colonne della datagrid
GetPrivateProfileColumns(S_BEAMMACHININGS, BeamMachiningsColumns)
' aggiorno la visibilità delle colonne
For Each col In BeamMachiningsColumns
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
End Sub
#End Region ' CONSTRUCTOR
End Class
@@ -1,91 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgtBEAMWALL.EgtBEAMWALL.ViewerOptimizer.Behavior
{
public class DataGridColumnsBehavior
{
public static readonly DependencyProperty BindableColumnsProperty = DependencyProperty.RegisterAttached("BindableColumns", typeof(ObservableCollection<DataGridColumn>), typeof(DataGridColumnsBehavior), new UIPropertyMetadata(null, BindableColumnsPropertyChanged));
/// <summary>Collection to store collection change handlers - to be able to unsubscribe later.</summary>
private static readonly Dictionary<DataGrid, NotifyCollectionChangedEventHandler> _handlers;
static DataGridColumnsBehavior()
{
_handlers = new Dictionary<DataGrid, NotifyCollectionChangedEventHandler>();
}
private static void BindableColumnsPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
{
if (!(source is DataGrid dataGrid)) return;
if (e.OldValue is ObservableCollection<DataGridColumn> oldColumns)
{
// Remove all columns.
dataGrid.Columns.Clear();
// Unsubscribe from old collection.
if (_handlers.TryGetValue(dataGrid, out var h))
{
oldColumns.CollectionChanged -= h;
_handlers.Remove(dataGrid);
}
}
var newColumns = e.NewValue as ObservableCollection<DataGridColumn>;
dataGrid.Columns.Clear();
if (newColumns != null)
{
// Add columns from this source.
foreach (var column in newColumns)
if (column != null)
{
var dg = (DataGrid)column.GetType().GetProperty("DataGridOwner", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(column, null);
dg?.Columns.Clear();
dataGrid.Columns.Add(column);
}
// Subscribe to future changes.
NotifyCollectionChangedEventHandler h = (_, ne) => OnCollectionChanged(ne, dataGrid);
_handlers[dataGrid] = h;
newColumns.CollectionChanged += h;
}
}
private static void OnCollectionChanged(NotifyCollectionChangedEventArgs ne, DataGrid dataGrid)
{
switch (ne.Action)
{
case NotifyCollectionChangedAction.Reset:
dataGrid.Columns.Clear();
if (ne.NewItems != null && ne.NewItems.Count > 0)
foreach (DataGridColumn column in ne.NewItems)
dataGrid.Columns.Add(column);
break;
case NotifyCollectionChangedAction.Add:
foreach (DataGridColumn column in ne.NewItems)
dataGrid.Columns.Add(column);
break;
case NotifyCollectionChangedAction.Move:
dataGrid.Columns.Move(ne.OldStartingIndex, ne.NewStartingIndex);
break;
case NotifyCollectionChangedAction.Remove:
foreach (DataGridColumn column in ne.OldItems)
dataGrid.Columns.Remove(column);
break;
case NotifyCollectionChangedAction.Replace:
dataGrid.Columns[ne.NewStartingIndex] = ne.NewItems[0] as DataGridColumn;
break;
}
}
public static void SetBindableColumns(DependencyObject element, ObservableCollection<DataGridColumn> value)
{
element.SetValue(BindableColumnsProperty, value);
}
public static ObservableCollection<DataGridColumn> GetBindableColumns(DependencyObject element)
{
return (ObservableCollection<DataGridColumn>)element.GetValue(BindableColumnsProperty);
}
}
}
@@ -1,94 +0,0 @@
Imports System.Collections.ObjectModel
Imports System.Collections.Specialized
Imports System.Reflection
Public Class DataGridColumnsBehavior
Public Shared ReadOnly BindableColumnsProperty As DependencyProperty = DependencyProperty.RegisterAttached("BindableColumns", GetType(ObservableCollection(Of DataGridColumn)), GetType(DataGridColumnsBehavior), New UIPropertyMetadata(Nothing, AddressOf BindableColumnsPropertyChanged))
Private Shared ReadOnly _handlers As Dictionary(Of DataGrid, NotifyCollectionChangedEventHandler)
Shared Sub New()
_handlers = New Dictionary(Of DataGrid, NotifyCollectionChangedEventHandler)()
End Sub
Private Shared Sub BindableColumnsPropertyChanged(ByVal source As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
Dim dataGrid As DataGrid = Nothing
If Not (source Is dataGrid) Then Return
Dim h = Nothing, oldColumns As ObservableCollection(Of DataGridColumn) = Nothing
If e.OldValue Is oldColumns Then
dataGrid.Columns.Clear()
If _handlers.TryGetValue(dataGrid, h) Then
RemoveHandler oldColumns.CollectionChanged, h
_handlers.Remove(dataGrid)
End If
End If
Dim newColumns = TryCast(e.NewValue, ObservableCollection(Of DataGridColumn))
dataGrid.Columns.Clear()
If newColumns IsNot Nothing Then
For Each column In newColumns
If column IsNot Nothing Then
Dim dg = CType(column.[GetType]().GetProperty("DataGridOwner", BindingFlags.Instance Or BindingFlags.NonPublic)?.GetValue(column, Nothing), DataGrid)
dg?.Columns.Clear()
dataGrid.Columns.Add(column)
End If
Next
Dim h As NotifyCollectionChangedEventHandler = Function(__, ne) OnCollectionChanged(ne, dataGrid)
_handlers(dataGrid) = h
AddHandler newColumns.CollectionChanged, h
End If
End Sub
Private Shared Sub OnCollectionChanged(ByVal ne As NotifyCollectionChangedEventArgs, ByVal dataGrid As DataGrid)
Select Case ne.Action
Case NotifyCollectionChangedAction.Reset
dataGrid.Columns.Clear()
If ne.NewItems IsNot Nothing AndAlso ne.NewItems.Count > 0 Then
For Each column As DataGridColumn In ne.NewItems
dataGrid.Columns.Add(column)
Next
End If
Case NotifyCollectionChangedAction.Add
For Each column As DataGridColumn In ne.NewItems
dataGrid.Columns.Add(column)
Next
Case NotifyCollectionChangedAction.Move
dataGrid.Columns.Move(ne.OldStartingIndex, ne.NewStartingIndex)
Case NotifyCollectionChangedAction.Remove
For Each column As DataGridColumn In ne.OldItems
dataGrid.Columns.Remove(column)
Next
Case NotifyCollectionChangedAction.Replace
dataGrid.Columns(ne.NewStartingIndex) = TryCast(ne.NewItems(0), DataGridColumn)
End Select
End Sub
Public Shared Sub SetBindableColumns(ByVal element As DependencyObject, ByVal value As ObservableCollection(Of DataGridColumn))
element.SetValue(BindableColumnsProperty, value)
End Sub
Public Shared Function GetBindableColumns(ByVal element As DependencyObject) As ObservableCollection(Of DataGridColumn)
Return CType(element.GetValue(BindableColumnsProperty), ObservableCollection(Of DataGridColumn))
End Function
Private Class CSharpImpl
<Obsolete("Please refactor calling code to use normal Visual Basic assignment")>
Shared Function __Assign(Of T)(ByRef target As T, value As T) As T
target = value
Return value
End Function
End Class
End Class
@@ -132,7 +132,7 @@ Public Class BlockedWndVM
Public Sub Save()
' salvo progetto
'Map.refProdManagerVM.Save()
Map.refOnlyProdManagerVM.Save()
Map.refProdManagerVM.Save()
' mando messaggio di blocco avvenuto
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
End Sub
@@ -1,106 +0,0 @@
<Grid x:Class="BottomPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
Height="350"
Visibility="{Binding BottomPanel_Visibility}">
<TabControl SelectedIndex="{Binding SelPartFeatureTab}"
TabStripPlacement="Right"
Margin="5">
<TabControl.ItemContainerStyle>
<Style TargetType="{x:Type TabItem}">
<Setter Property="Visibility" Value="Collapsed"/>
</Style>
</TabControl.ItemContainerStyle>
<TabItem Header="STRUCTURE">
<TabItem.Content>
<EgtWPFLib5:EgtScrollViewer Focusable="False">
<EgtBEAMWALL:BTLDataV DataContext="{StaticResource BTLDataWndVM}"
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</EgtWPFLib5:EgtScrollViewer>
</TabItem.Content>
</TabItem>
<TabItem Header="PART">
<TabItem.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<EgtWPFLib5:EgtScrollViewer Focusable="False">
<EgtBEAMWALL:PartParametersV DataContext="{StaticResource PartParametersVM}"
Tag="{Binding Tag.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</EgtWPFLib5:EgtScrollViewer>
<TextBlock Grid.Row="1"
Text="{Binding Tag.SelBTLPart.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Foreground="{Binding Tag.SelBTLPart.CALC_ERR_Foreground, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5,0,5,0"
Visibility="{Binding Tag.SelBTLPart.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"/>
</Grid>
</TabItem.Content>
</TabItem>
<TabItem Header="FEATURE">
<TabItem.Content>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="TextBlock">
<Style.Triggers>
<Trigger Property="Text" Value="">
<Setter Property="Visibility" Value="Collapsed"/>
</Trigger>
</Style.Triggers>
</Style>
</Grid.Resources>
<EgtBEAMWALL:FeatureManagerV DataContext="{StaticResource FeatureManagerVM}"
Tag="{Binding Tag.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"/>
<TabControl Grid.Row="1"
TabStripPlacement="Left"
Margin="5,5,2.5,5">
<TabItem Header="P">
<TabItem.Content>
<EgtBEAMWALL:PParameterListV DataContext="{StaticResource PParameterListVM}"
Tag="{Binding Tag.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
<TabItem Header="Q">
<TabItem.Content>
<EgtBEAMWALL:QParameterListV DataContext="{StaticResource QParameterListVM}"
Tag="{Binding Tag.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
</TabControl>
<Image Grid.Column="1"
Grid.Row="1"
Source="{Binding sCurrDraw}"
Margin="5"/>
<TextBlock Grid.Row="2" Grid.ColumnSpan="2"
Text="{Binding Tag.SelBTLPart.SelBTLFeatureVM.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Foreground="{Binding Tag.SelBTLPart.SelBTLFeatureVM.Calc_Background, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5,0,5,0"/>
</Grid>
</TabItem.Content>
</TabItem>
<TabItem Header="STATISTICS">
<TabItem.Content>
<EgtBEAMWALL:StatisticsV DataContext="{StaticResource StatisticsVM}"
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BottomPanelV}}}"
Margin="5"/>
</TabItem.Content>
</TabItem>
</TabControl>
</Grid>
@@ -1,3 +0,0 @@
Public Class BottomPanelV
End Class
@@ -1,51 +0,0 @@
Imports EgtWPFLib5
Public Class BottomPanelVM
Inherits VMBase
Friend Enum PartFeatureTab As Integer
NULL = -1
STRUCTURE_ = 0
PART = 1
FEATURE = 2
STATISTICS = 3
End Enum
Private m_SelPartFeatureTab As PartFeatureTab
Public Property SelPartFeatureTab As Integer
Get
Return m_SelPartFeatureTab
End Get
Set(value As Integer)
m_SelPartFeatureTab = value
End Set
End Property
Friend Sub SetSelPartFeatureTab(SelPartFeatureTab As PartFeatureTab)
If m_SelPartFeatureTab = PartFeatureTab.STATISTICS Then
Map.refInstrumentPanelVM.SetStatisticsIsChecked(False)
End If
m_SelPartFeatureTab = SelPartFeatureTab
NotifyPropertyChanged(NameOf(SelPartFeatureTab))
End Sub
Private m_sCurrDraw As String
Public ReadOnly Property sCurrDraw As String
Get
Return m_sCurrDraw
End Get
End Property
Friend Sub SetCurrDraw(sCurrDraw As String)
m_sCurrDraw = sCurrDraw
NotifyPropertyChanged(NameOf(sCurrDraw))
End Sub
#Region "CONSTRUCTOR"
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefBottomPanelVM(Me)
End Sub
#End Region ' CONSTRUCTOR
End Class
@@ -158,7 +158,7 @@ Public Class CALCPanelVM
End If
' se verify o verifyall, salvo il progetto per conservarne gli stati calcolati
If e.CmdType = CmdTypes.CHECKGEN Then
Map.refOnlyProdManagerVM.Save()
Map.refProdManagerVM.Save()
End If
' se modalita' assemblato attiva
If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
@@ -491,10 +491,10 @@ Public Class CALCPanelVM
Dim nMachType As MachineType = DirectCast(Machine, MyMachine).nType
Dim nProjType As BWType
Dim sMachineName As String = ""
nProjType = Map.refOnlyProdManagerVM.nProdType
nProjType = Map.refProdManagerVM.nProdType
sMachineName = If(Not IsNothing(ProjectManagerVM.CurrProd), ProjectManagerVM.CurrProd.sMachine, "")
If nMachType = nProjType OrElse
(nMachType = 3 And Not IsNothing(Map.refOnlyProdManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProd)) Then
(nMachType = 3 And Not IsNothing(Map.refProdManagerVM) AndAlso Not IsNothing(ProjectManagerVM.CurrProd)) Then
MachineList.Add(Machine)
' Se il nome Macchina coincide setto la macchina selezionata con la macchina associata al progetto
If Machine.Name = sMachineName Then
+24 -61
View File
@@ -1,69 +1,32 @@
<EgtFloating:EgtFloatingPanel x:Class="CalcPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
<Button FontSize="20"
FontWeight="Light"
ToolTip="{Binding Verify_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Verify_Command}"
IsEnabled="{Binding Verify_IsEnabled}">
<Image Source="/Resources/CALCPanel/Verify.png" Stretch="Uniform"/>
</Button>
<Button FontSize="20"
FontWeight="Light"
ToolTip="{Binding VerifyAll_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding VerifyAll_Command}"
IsEnabled="{Binding VerifyAll_IsEnabled}">
<Image Source="/Resources/CALCPanel/VerifyAll.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ResetCalc_Command}"
ToolTip="{Binding ResetCalc_ToolTip}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/CALCPanel/ResetCalc.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Simulate_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Simulate_Command}"
IsEnabled="{Binding Simulate_IsEnabled}">
<Image Source="/Resources/CALCPanel/Simulate.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding Edit_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Edit_Command}"
IsEnabled="{Binding Edit_IsEnabled}"
Visibility="{Binding Edit_Visibility}">
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
</Button>
<StackPanel x:Class="CalcPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource OnlyProdPartManager_StackPanel}">
<Button ToolTip="{Binding ChooseMachine_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding ChooseMachine_Command}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Visibility="{Binding ChooseMachineBtn_Visibility}">
Visibility="{Binding ChooseMachineBtn_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/ChooseMachine.png" Stretch="Uniform"/>
</Button>
<Grid Margin="0,0,5,0" Visibility="{Binding ChooseMachine_Visibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--Combobox per selezionare la macchina corrente-->
<ComboBox ItemsSource="{Binding Path=MachineList}" DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}" SelectedValuePath="Name"
Height="22" Width="150"
Grid.Column="0"/>
<Button Content="OK"
FontSize="10"
FontWeight="Light"
Style="{StaticResource ToolBar_Button}"
Command="{Binding Ok_Command}"
Grid.Column="1"/>
</Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--Combobox per selezionare la macchina corrente-->
<ComboBox Grid.Column="0"
ItemsSource="{Binding Path=MachineList}"
DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}"
SelectedValuePath="Name"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<Button Grid.Column="1"
Content="OK"
Command="{Binding Ok_Command}"
Style="{StaticResource ToolBarOnlyProdCalcPanel_Button}"/>
</Grid>
</EgtFloating:EgtFloatingPanel>
</StackPanel>
@@ -1,33 +0,0 @@
<StackPanel x:Class="OnlyProdCalcPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Style="{StaticResource OnlyProdPartManager_StackPanel}">
<Button ToolTip="{Binding ChooseMachine_ToolTip}"
Command="{Binding ChooseMachine_Command}"
IsEnabled="{Binding CALCPanel_IsEnabled}"
Visibility="{Binding ChooseMachineBtn_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/ChooseMachine.png" Stretch="Uniform"/>
</Button>
<Grid Margin="0,0,5,0" Visibility="{Binding ChooseMachine_Visibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!--Combobox per selezionare la macchina corrente-->
<ComboBox Grid.Column="0"
ItemsSource="{Binding Path=MachineList}"
DisplayMemberPath="Name"
SelectedItem="{Binding Path=SelectedMachine}"
SelectedValuePath="Name"
Style="{StaticResource OnlyProdCalcPanel_ComboBox}"/>
<Button Grid.Column="1"
Content="OK"
Command="{Binding Ok_Command}"
Style="{StaticResource ToolBarOnlyProdCalcPanel_Button}"/>
</Grid>
</StackPanel>
@@ -1,3 +0,0 @@
Public Class OnlyProdCalcPanelV
End Class
@@ -2,7 +2,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
@@ -2,7 +2,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="Height"
@@ -1,83 +1,9 @@
<DockPanel x:Class="ConfigurationPageV"
<DockPanel x:Class="ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{StaticResource ConfigurationPageVM}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="6*"/>
</Grid.RowDefinitions>
<TabControl Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2"
SelectedIndex="{Binding SelConfigSubPage}">
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding General_Msg}"
Style="{StaticResource OptionTextBlock}"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding General_Visibility}"
Style="{StaticResource OptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALLCORE:General_ConfigurationPageV/>
</TabItem.Content>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding ParameterQ_Msg}"
Style="{StaticResource OptionTextBlock}"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding ParameterQ_Visibility}"
Style="{StaticResource OptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALLCORE:QParameter_ConfigurationPageV/>
</TabItem.Content>
</TabItem>
<TabItem>
<TabItem.Header>
<TextBlock Text="{Binding Machine_Msg}"
Style="{StaticResource Machine_TextBlock}"/>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALLCORE:Machine_ConfigurationPageV/>
</TabItem.Content>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding PDFEditor_Msg}"
Style="{StaticResource OptionTextBlock}"/>
<Button Command="{Binding SaveCommand}"
ToolTip="{Binding SaveToolTip}"
Visibility="{Binding PDFEditor_Visibility}"
Style="{StaticResource OptionPanel_Button}">
<Image Source="/Resources/ProjectManager/Save.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALL:PDFEditorV/>
</TabItem.Content>
</TabItem>
</TabControl>
</Grid>
<OPTIMIZER:MachinePanelV DataContext="{Binding MachinePanelVM}"/>
</DockPanel>
@@ -1,5 +1,2 @@
Public Class ConfigurationPageV
Private Sub ScrollViewer_Scroll(sender As Object, e As Primitives.ScrollEventArgs)
End Sub
End Class
@@ -65,38 +65,12 @@ Public Class ConfigurationPageVM
End Get
End Property
'Private m_ConfigMachTableList As New ObservableCollection(Of MachTable)
'Public Property ConfigMachTableList As ObservableCollection(Of MachTable)
' Get
' Return m_ConfigMachTableList
' End Get
' Set(value As ObservableCollection(Of MachTable))
' m_ConfigMachTableList = value
' End Set
'End Property
Public ReadOnly Property Custom_Visibility As Visibility
Get
If QBTLParamVMList(0).bIsP Then
Return Visibility.Collapsed
Else
Return Visibility.Visible
End If
Return Visibility.Visible
End Get
End Property
' lista dei parametri Q di un Process
Private m_QBTLParamVMList_View As CollectionView = Nothing
Protected m_QBTLParamVMList As New ObservableCollection(Of QBTLParamVM)
Public Property QBTLParamVMList As ObservableCollection(Of QBTLParamVM)
Get
Return m_QBTLParamVMList
End Get
Set(value As ObservableCollection(Of QBTLParamVM))
m_QBTLParamVMList = value
End Set
End Property
Private m_PRCList As New ObservableCollection(Of PRC)
Public ReadOnly Property PRCList As ObservableCollection(Of PRC)
Get
@@ -600,7 +574,7 @@ Public Class ConfigurationPageVM
Friend Function VerifyConfigPagePassword() As Boolean
' Display message, title, and default value.
Dim InputPwdWndVM As New InputPwdWndVM()
Dim InputPwdWnd As New OnlyProdInputPwdWndV(Application.Current.MainWindow, InputPwdWndVM)
Dim InputPwdWnd As New InputPwdWndV(Application.Current.MainWindow, InputPwdWndVM)
If InputPwdWnd.ShowDialog() Then
' Lettura PWD dall'INI e confronto
Dim sPwdIni As String = String.Empty
@@ -611,42 +585,6 @@ Public Class ConfigurationPageVM
Return False
End Function
' funzione che crea l'elenco dei parametri P o Q di un Process
Public Function CreateProcessParams(GRPType As Integer, PRC As Integer, IsP As Boolean)
Dim ParamIndex As Integer = 1
Dim TempList As New List(Of QBTLParamVM)
Dim NewBTLParam As BTLParamM = Nothing
' leggo tutti i parametri P o Q del Process
ParamIndex = 1
TempList = New List(Of QBTLParamVM)
If IsP Then
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, 0, IsP, ParamIndex, Nothing, NewBTLParam)
TempList.Add(New QBTLParamVM(NewBTLParam, GRPType, PRC))
ParamIndex += 1
End While
Else
If CurrentMachine.nType = MachineType.BOTH Then
' se macchina di tipo BOTH carico i Q di tipo BEAM e poi di tipo WALL
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, IsP, ParamIndex, Nothing, NewBTLParam, MachineType.BEAM)
TempList.Add(New QBTLParamVM(NewBTLParam, GRPType, PRC))
ParamIndex += 1
End While
ParamIndex = 1
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, IsP, ParamIndex, Nothing, NewBTLParam, MachineType.WALL)
TempList.Add(New QBTLParamVM(NewBTLParam, GRPType, PRC))
ParamIndex += 1
End While
Else
' altrimenti carico solo quelli corrispondenti al tipo della macchina selezionata
While BTLIniFile.GetBeamPrivateProfileParam(GRPType, PRC, IsP, ParamIndex, Nothing, NewBTLParam, CurrentMachine.nType)
TempList.Add(New QBTLParamVM(NewBTLParam, GRPType, PRC))
ParamIndex += 1
End While
End If
End If
Return TempList
End Function
#End Region ' Methods
#Region "COMMANDS"
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{StaticResource ConfigurationPageVM}">
<Grid>
<Grid.ColumnDefinitions>
@@ -47,7 +47,7 @@
</StackPanel>
</TabItem.Header>
<TabItem.Content>
<EgtBEAMWALL:OnlyProdPDFEditorV/>
<OPTIMIZER:PDFEditorV/>
</TabItem.Content>
</TabItem>
</TabControl>
@@ -1,118 +0,0 @@
<Grid x:Class="General_ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Margin="5,5,5,0">
<GroupBox Header="{Binding CurrentLanguage_Msg}"
Margin="0,0,0,5">
<UniformGrid Rows="2" Margin="3,3,3,3">
<ComboBox ItemsSource="{Binding LanguageList, Mode=OneWay}" Height="25"
DisplayMemberPath="Name" SelectedItem="{Binding SelectedLanguage}"
Margin="0,0,0,5"/>
<TextBlock Text="{Binding LanguageAdvert_Msg}" TextWrapping="Wrap"
TextAlignment="Center"/>
</UniformGrid>
</GroupBox>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding MMUnits_Msg}" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding UnitMeasureList, Mode=OneWay}"
SelectedIndex="{Binding SelMeasureUnit}" Height="25"
Margin="0,5,0,0"/>
</UniformGrid>
<GroupBox Header="{Binding Nesting_Msg}"
Margin="0,0,0,5">
<StackPanel>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding SectionTime_Msg}"
Grid.Row="0" Grid.Column="0"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SectionTime, UpdateSourceTrigger=Explicit}"
Grid.Row="0" Grid.Column="1"/>
</UniformGrid>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding PartTime_Msg}"
Grid.Row="1" Grid.Column="0"/>
<EgtWPFLib5:EgtTextBox Text="{Binding PartTime, UpdateSourceTrigger=Explicit}"
Grid.Row="1" Grid.Column="1"/>
</UniformGrid>
</StackPanel>
</GroupBox>
<UniformGrid Columns="2"
Margin="0,0,0,5">
<TextBlock Text="{Binding PrintLabel_Msg}" VerticalAlignment="Center"/>
<CheckBox IsChecked="{Binding bPrintLabel_IsChecked}"
Margin="0,5,0,0"/>
</UniformGrid>
<GroupBox Header="Backup And Restore">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0"
Margin="0,2,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox x:Name="ExternalBackup_CheckBox"
IsChecked="{Binding bExternalBackupActive}"
VerticalAlignment="Center"/>
<TextBlock Grid.Column="1"
Text="External file path:"
VerticalAlignment="Center"/>
</Grid>
<Grid Grid.Row="1"
Margin="0,2,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Text="{Binding ExternalBackupFolderPath}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Margin="0,0,2.5,0"/>
<Button Grid.Column="1"
Content="..."
Width="18"
Command="{Binding ChooseExternalBackupFolderPath_Command}"
IsEnabled="{Binding IsChecked, ElementName=ExternalBackup_CheckBox}"
Margin="2.5,0,0,0"/>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Reminder Frequency"/>
<ComboBox Grid.Column="1"
ItemsSource="{Binding ReminderList}"
SelectedItem="{Binding SelReminder}"/>
</Grid>
<StackPanel Grid.Row="3"
Orientation="Horizontal">
<Button Content="Backup"
Command="{Binding Backup_Command}"
Style="{StaticResource ToolBar_TextButton}"/>
<Button Content="Restore"
Command="{Binding Restore_Command}"
Style="{StaticResource ToolBar_TextButton}"/>
</StackPanel>
</Grid>
</GroupBox>
</StackPanel>
</Grid>
@@ -1,3 +0,0 @@
Public Class General_ConfigurationPageV
End Class
@@ -1,70 +0,0 @@
<Grid x:Class="Machine_ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
<GroupBox Style="{StaticResource GroupBoxStyle_NoHeader}" Padding="5,10,5,5">
<EgtBEAMWALL:MachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
</GroupBox>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal">
<ItemsControl ItemsSource="{Binding ConfigMachTableList}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel x:Name="GroupStackPanel" Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<GroupBox Header="{Binding sName}" Width="Auto" VerticalAlignment="Top" Height="Auto">
<ItemsControl Name="MachParamsItemsControl" ItemsSource="{Binding MachParamList}" Margin="0,5,0,0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
TextWrapping="WrapWithOverflow"
Width="100"
Style="{StaticResource MachParamTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Grid.Column="1"
Width="70"/>
<TextBlock Text="{Binding sDescription}"
TextWrapping="WrapWithOverflow"
Width="200"
Style="{StaticResource MachParamTextBlock}"
Grid.Column="2"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</GroupBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Grid>
@@ -1,3 +0,0 @@
Public Class Machine_ConfigurationPageV
End Class
@@ -1,10 +0,0 @@
<DockPanel x:Class="OnlyProdConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
DataContext="{StaticResource ConfigurationPageVM}">
<EgtBEAMWALL:OnlyProdMachinePanelV DataContext="{Binding MachinePanelVM}"/>
</DockPanel>
@@ -1,2 +0,0 @@
Public Class OnlyProdConfigurationPageV
End Class
@@ -1,23 +0,0 @@
<Grid x:Class="OnlyProdMachine_ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
xmlns:local="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<GroupBox Style="{StaticResource GroupBoxStyle_NoHeader}" Padding="5,10,5,5">
<local:OnlyProdMachinePanelV DataContext="{Binding MachinePanelVM}" VerticalAlignment="Center"/>
</GroupBox>
</StackPanel>
</Grid>
@@ -1,3 +0,0 @@
Public Class OnlyProdMachine_ConfigurationPageV
End Class
@@ -1,80 +0,0 @@
<Grid x:Class="QParameter_ConfigurationPageV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<EgtBEAMWALL:QParamListV DataContext="{Binding}"
ItemsSource="{Binding QBTLParamVMList}"
SelectedItem="{Binding SelQParam}"
Grid.Column="0"
Margin="5">
<DataGrid.GroupStyle>
<GroupStyle>
<GroupStyle.Panel>
<ItemsPanelTemplate>
<DataGridRowsPresenter/>
</ItemsPanelTemplate>
</GroupStyle.Panel>
<GroupStyle.HeaderTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Path=Name}"/>
</StackPanel>
</DataTemplate>
</GroupStyle.HeaderTemplate>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander IsExpanded="True">
<Expander.Background>
<SolidColorBrush Color="#FFBABABA"></SolidColorBrush>
</Expander.Background>
<Expander.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=Name}" />
</StackPanel>
</Expander.Header>
<ItemsPresenter />
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander IsExpanded="True">
<Expander.Background>
<SolidColorBrush Color="LightGray"></SolidColorBrush>
</Expander.Background>
<Expander.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=Name}" />
</StackPanel>
</Expander.Header>
<ItemsPresenter />
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</DataGrid.GroupStyle>
</EgtBEAMWALL:QParamListV>
</Grid>
@@ -1,3 +0,0 @@
Public Class QParameter_ConfigurationPageV
End Class
+130 -193
View File
@@ -118,16 +118,16 @@
<DependentUpon>AboutBoxV.xaml</DependentUpon>
</Compile>
<Compile Include="AddFeatureWnd\AddFeatureWndVM.vb" />
<Compile Include="AddFeatureWnd\NewAddFeatureWndV.xaml.vb">
<DependentUpon>NewAddFeatureWndV.xaml</DependentUpon>
<Compile Include="AddFeatureWnd\AddFeatureWndV.xaml.vb">
<DependentUpon>AddFeatureWndV.xaml</DependentUpon>
</Compile>
<Compile Include="AddPartWnd\AddPartWndVM.vb" />
<Compile Include="AddPartWnd\OnlyProdAddPartWndV.xaml.vb">
<DependentUpon>OnlyProdAddPartWndV.xaml</DependentUpon>
<Compile Include="AddPartWnd\AddPartWndV.xaml.vb">
<DependentUpon>AddPartWndV.xaml</DependentUpon>
</Compile>
<Compile Include="AddRawPartWnd\AddRawPartWndVM.vb" />
<Compile Include="AddRawPartWnd\OnlyProdAddRawPartWndV.xaml.vb">
<DependentUpon>OnlyProdAddRawPartWndV.xaml</DependentUpon>
<Compile Include="AddRawPartWnd\AddRawPartWndV.xaml.vb">
<DependentUpon>AddRawPartWndV.xaml</DependentUpon>
</Compile>
<Compile Include="AddSectionXMaterialWnd\AddSectionXMaterialWndV.xaml.vb">
<DependentUpon>AddSectionXMaterialWndV.xaml</DependentUpon>
@@ -140,9 +140,6 @@
<Compile Include="ConfigurationPage\ConfigurationProgramV.xaml.vb">
<DependentUpon>ConfigurationProgramV.xaml</DependentUpon>
</Compile>
<Compile Include="ConfigurationPage\OnlyProdMachine_ConfigurationPageV.xaml.vb">
<DependentUpon>OnlyProdMachine_ConfigurationPageV.xaml</DependentUpon>
</Compile>
<Compile Include="ExecProcessManager\MyExecProcessManager.vb" />
<Compile Include="ForcedStrategyBTL\ForcedStrategyBTLV.xaml.vb">
<DependentUpon>ForcedStrategyBTLV.xaml</DependentUpon>
@@ -166,26 +163,28 @@
<Compile Include="GeneralParametersStrategy\ProjectParametersV.xaml.vb">
<DependentUpon>ProjectParametersV.xaml</DependentUpon>
</Compile>
<Compile Include="MachinePanel\OnlyProdMachinePanelV.xaml.vb">
<DependentUpon>OnlyProdMachinePanelV.xaml</DependentUpon>
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
<DependentUpon>MachinePanelV.xaml</DependentUpon>
</Compile>
<Compile Include="NestingRunningWnd\NestingRunningWndVM.vb" />
<Compile Include="NestingRunningWnd\OnlyProdNestingRunningWndV.xaml.vb">
<DependentUpon>OnlyProdNestingRunningWndV.xaml</DependentUpon>
<Compile Include="NestingRunningWnd\NestingRunningWndV.xaml.vb">
<DependentUpon>NestingRunningWndV.xaml</DependentUpon>
</Compile>
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogVM.vb" />
<Compile Include="OnlyProdManager\OnlyProdManagerV.xaml.vb" />
<Compile Include="OnlyProdManager\OnlyProdManagerVM.vb" />
<Compile Include="Project\OnlyProdProjectV.xaml.vb">
<DependentUpon>OnlyProdProjectV.xaml</DependentUpon>
<Compile Include="ProdManager\ProdManagerV.xaml.vb">
<DependentUpon>ProdManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="ProdManager\ProdManagerVM.vb" />
<Compile Include="Project\ProjectV.xaml.vb">
<DependentUpon>ProjectV.xaml</DependentUpon>
</Compile>
<Compile Include="OpenProjectFileDialog\OpenProjectFileDialogVM.vb" />
<Compile Include="OptimizePanel\OnlyProdOptimizePanelV.xaml.vb">
<DependentUpon>OnlyProdOptimizePanelV.xaml</DependentUpon>
<Compile Include="OptimizePanel\OptimizePanelV.xaml.vb">
<DependentUpon>OptimizePanelV.xaml</DependentUpon>
</Compile>
<Compile Include="OptimizePanel\OptimizePanelVM.vb" />
<Compile Include="PartManager\OnlyProdPartManagerV.xaml.vb">
<DependentUpon>OnlyProdPartManagerV.xaml</DependentUpon>
<Compile Include="PartManager\PartManagerV.xaml.vb">
<DependentUpon>PartManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="PartManager\PartManagerVM.vb" />
<Compile Include="PartParametersWnd\PartParametersWndV.xaml.vb">
@@ -199,13 +198,13 @@
<Compile Include="ProjectFileVM\ProdFileVM.vb" />
<Compile Include="ProjectFileVM\ProjFileVM.vb" />
<Compile Include="ProjectManager\ProjectManagerVM.vb" />
<Compile Include="ProjectTypeWnd\OnlyProdProjectTypeWndV.xaml.vb">
<DependentUpon>OnlyProdProjectTypeWndV.xaml</DependentUpon>
<Compile Include="ProjectTypeWnd\ProjectTypeWndV.xaml.vb">
<DependentUpon>ProjectTypeWndV.xaml</DependentUpon>
</Compile>
<Compile Include="ProjectTypeWnd\ProjectTypeWndVM.vb" />
<Compile Include="Project\ProjectVM.vb" />
<Compile Include="RawPartManager\OnlyProdRawPartManagerV.xaml.vb">
<DependentUpon>OnlyProdRawPartManagerV.xaml</DependentUpon>
<Compile Include="RawPartManager\RawPartManagerV.xaml.vb">
<DependentUpon>RawPartManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="RawPartManager\RawPartManagerVM.vb" />
<Compile Include="RawPartManager\RawPartManagerWndV.xaml.vb">
@@ -233,22 +232,22 @@
<DependentUpon>SetUpV.xaml</DependentUpon>
</Compile>
<Compile Include="SetUp\SetUpVM.vb" />
<Compile Include="ShowBeamPanel\OnlyProdShowBeamPanelV.xaml.vb">
<DependentUpon>OnlyProdShowBeamPanelV.xaml</DependentUpon>
<Compile Include="ShowBeamPanel\ShowBeamPanelV.xaml.vb">
<DependentUpon>ShowBeamPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ShowBeamPanel\ShowBeamPanelVM.vb" />
<Compile Include="ShowPanel\OnlyProdShowPanelV.xaml.vb">
<DependentUpon>OnlyProdShowPanelV.xaml</DependentUpon>
<Compile Include="ShowPanel\ShowPanelV.xaml.vb">
<DependentUpon>ShowPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="SpecialPanel\OnlyProdSpecialPanelV.xaml.vb">
<DependentUpon>OnlyProdSpecialPanelV.xaml</DependentUpon>
<Compile Include="SpecialPanel\SpecialPanelV.xaml.vb">
<DependentUpon>SpecialPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="SpecialPanel\SpecialPanelVM.vb" />
<Compile Include="SplashScreen\SplashScreenV.xaml.vb">
<DependentUpon>SplashScreenV.xaml</DependentUpon>
</Compile>
<Compile Include="StatisticsTimePanel\OnlyProdStatisticsTimePanelV.xaml.vb">
<DependentUpon>OnlyProdStatisticsTimePanelV.xaml</DependentUpon>
<Compile Include="StatisticsTimePanel\StatisticsTimePanelV.xaml.vb">
<DependentUpon>StatisticsTimePanelV.xaml</DependentUpon>
</Compile>
<Compile Include="StatisticsTimePanel\StatisticsTimePanelVM.vb" />
<Compile Include="StatisticsWnd\OptimizerStatisticsWndV.xaml.vb">
@@ -257,17 +256,14 @@
<Compile Include="StatisticsWnd\StatisticsWndV.xaml.vb">
<DependentUpon>StatisticsWndV.xaml</DependentUpon>
</Compile>
<Compile Include="StatisticsWnd\StatisticWndV.xaml.vb">
<DependentUpon>StatisticWndV.xaml</DependentUpon>
<Compile Include="Statistics\OptimizerStatisticsV.xaml.vb">
<DependentUpon>OptimizerStatisticsV.xaml</DependentUpon>
</Compile>
<Compile Include="Statistics\OnlyProdOptimizerStatisticsV.xaml.vb">
<DependentUpon>OnlyProdOptimizerStatisticsV.xaml</DependentUpon>
<Compile Include="Statistics\PDFEditorV.xaml.vb">
<DependentUpon>PDFEditorV.xaml</DependentUpon>
</Compile>
<Compile Include="Statistics\OnlyProdPDFEditorV.xaml.vb">
<DependentUpon>OnlyProdPDFEditorV.xaml</DependentUpon>
</Compile>
<Compile Include="Statistics\OnlyProdStatisticsV.xaml.vb">
<DependentUpon>OnlyProdStatisticsV.xaml</DependentUpon>
<Compile Include="Statistics\StatisticsV.xaml.vb">
<DependentUpon>StatisticsV.xaml</DependentUpon>
</Compile>
<Compile Include="Statistics\PDFEditorVM.vb" />
<Compile Include="Statistics\PDFHelper.vb" />
@@ -299,19 +295,13 @@
<Compile Include="SupervisorCommThread\SupervisorCommThread.vb" />
<Compile Include="ToolsDbWindow\MyToolDbWindowVM.vb" />
<Compile Include="ToolsDbWindow\ToolsUpdate.vb" />
<Compile Include="UpdateBTLWnd\OnlyProdUpdateBTLWndV.xaml.vb">
<DependentUpon>OnlyProdUpdateBTLWndV.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateBTLWnd\OnlyProdUpdateOrAppendWndV.xaml.vb">
<DependentUpon>OnlyProdUpdateOrAppendWndV.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateBTLWnd\UpdateBTLWndV.xaml.vb">
<DependentUpon>UpdateBTLWndV.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateBTLWnd\UpdateBTLWndVM.vb" />
<Compile Include="UpdateBTLWnd\UpdateOrAppendWndV.xaml.vb">
<DependentUpon>UpdateOrAppendWndV.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateBTLWnd\UpdateBTLWndVM.vb" />
<Compile Include="UpdateBTLWnd\UpdateOrAppendWndVM.vb" />
<Compile Include="Utility\Configuration.vb" />
<Compile Include="Utility\CurrentMachine.vb" />
@@ -331,11 +321,11 @@
<Compile Include="Utility\TextBlockUtils.vb" />
<Compile Include="Utility\TreeHelperManager.vb" />
<Compile Include="Utility\TreeViewItemBase.vb" />
<Compile Include="ViewPanel\OnlyProdViewPanelV.xaml.vb">
<DependentUpon>OnlyProdViewPanelV.xaml</DependentUpon>
<Compile Include="ViewPanel\ViewPanelV.xaml.vb">
<DependentUpon>ViewPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="WarehouseWnd\OnlyProdWarehouseWndV.xaml.vb">
<DependentUpon>OnlyProdWarehouseWndV.xaml</DependentUpon>
<Compile Include="WarehouseWnd\WarehouseWndV.xaml.vb">
<DependentUpon>WarehouseWndV.xaml</DependentUpon>
</Compile>
<Compile Include="WarehouseWnd\WarehouseHelper.vb" />
<Compile Include="WarehouseWnd\WarehouseWndVM.vb" />
@@ -369,16 +359,16 @@
</Compile>
<Compile Include="BTLDataWnd\BTLDataWndVM.vb" />
<Compile Include="BTLPartManager\BTLPartManagerVM.vb" />
<Compile Include="BTLPartManager\OnlyProdBTLPartManagerV.xaml.vb">
<DependentUpon>OnlyProdBTLPartManagerV.xaml</DependentUpon>
<Compile Include="BTLPartManager\BTLPartManagerV.xaml.vb">
<DependentUpon>BTLPartManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="BTLViewModel\BTLFeatureVM.vb" />
<Compile Include="BTLViewModel\BTLParamVM.vb" />
<Compile Include="BTLViewModel\BTLPartVM.vb" />
<Compile Include="BTLViewModel\BTLStructureVM.vb" />
<Compile Include="CALCPanel\CALCPanelVM.vb" />
<Compile Include="CALCPanel\OnlyProdCalcPanelV.xaml.vb">
<DependentUpon>OnlyProdCalcPanelV.xaml</DependentUpon>
<Compile Include="CALCPanel\CalcPanelV.xaml.vb">
<DependentUpon>CalcPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ChangeMaterialWnd\ChangeMaterialWndV.xaml.vb">
<DependentUpon>ChangeMaterialWndV.xaml</DependentUpon>
@@ -389,104 +379,84 @@
</Compile>
<Compile Include="ChangeParameterWnd\ChangeParameterWndVM.vb" />
<Compile Include="ConfigurationPage\ConfigurationPageVM.vb" />
<Compile Include="ConfigurationPage\OnlyProdConfigurationPageV.xaml.vb">
<DependentUpon>OnlyProdConfigurationPageV.xaml</DependentUpon>
<Compile Include="ConfigurationPage\ConfigurationPageV.xaml.vb">
<DependentUpon>ConfigurationPageV.xaml</DependentUpon>
</Compile>
<Compile Include="Constants\ConstWarehouseIni.vb" />
<Compile Include="DataGridMultiselectManaging\IListItemConverter.vb" />
<Compile Include="DataGridMultiselectManaging\MultiSelectorBehaviours.vb" />
<Compile Include="DataGridMultiselectManaging\TwoListSynchronizer.vb" />
<Compile Include="FeatureListManager\FeatureListManagerVM.vb" />
<Compile Include="FeatureListManager\OnlyProdFeatureListManagerV.xaml.vb">
<DependentUpon>OnlyProdFeatureListManagerV.xaml</DependentUpon>
<Compile Include="FeatureListManager\FeatureListManagerV.xaml.vb">
<DependentUpon>FeatureListManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="FeatureManager\FeatureManagerVM.vb" />
<Compile Include="FeatureManager\OnlyProdFeatureManagerV.xaml.vb">
<DependentUpon>OnlyProdFeatureManagerV.xaml</DependentUpon>
<Compile Include="FeatureManager\FeatureManagerV.xaml.vb">
<DependentUpon>FeatureManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="FreeContourInput\FreeContourInputVM.vb" />
<Compile Include="FreeContourInput\OnlyProdFreeContourInputV.xaml.vb">
<DependentUpon>OnlyProdFreeContourInputV.xaml</DependentUpon>
<Compile Include="FreeContourInput\FreeContourInputV.xaml.vb">
<DependentUpon>FreeContourInputV.xaml</DependentUpon>
</Compile>
<Compile Include="FreeContourManager\FreeContourManagerVM.vb" />
<Compile Include="FreeContourManager\OnlyProdFreeContourManagerV.xaml.vb">
<DependentUpon>OnlyProdFreeContourManagerV.xaml</DependentUpon>
<Compile Include="FreeContourManager\FreeContourManagerV.xaml.vb">
<DependentUpon>FreeContourManagerV.xaml</DependentUpon>
</Compile>
<Compile Include="InputPwdWnd\InputPwdWndVM.vb" />
<Compile Include="InputPwdWnd\OnlyProdInputPwdWndV.xaml.vb">
<DependentUpon>OnlyProdInputPwdWndV.xaml</DependentUpon>
<Compile Include="InputPwdWnd\InputPwdWndV.xaml.vb">
<DependentUpon>InputPwdWndV.xaml</DependentUpon>
</Compile>
<Compile Include="InstrumentPanel\MyInstrumentPanelVM.vb" />
<Compile Include="InstrumentPanel\OnlyProdInstrumentPanelV.xaml.vb">
<DependentUpon>OnlyProdInstrumentPanelV.xaml</DependentUpon>
<Compile Include="InstrumentPanel\InstrumentPanelV.xaml.vb">
<DependentUpon>InstrumentPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\BTLDataV.xaml.vb">
<DependentUpon>BTLDataV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\BTLPartListVM.vb" />
<Compile Include="ItemParamList\DuploQParameterListVM.vb" />
<Compile Include="ItemParamList\FeatureInPartInRawPartListVM.vb" />
<Compile Include="ItemParamList\FeatureListVM.vb" />
<Compile Include="ItemParamList\OnlyProdBTLPartListV.xaml.vb">
<DependentUpon>OnlyProdBTLPartListV.xaml</DependentUpon>
<Compile Include="ItemParamList\BTLPartListV.xaml.vb">
<DependentUpon>BTLPartListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdFeatureInPartInRawPartListV.xaml.vb">
<DependentUpon>OnlyProdFeatureInPartInRawPartListV.xaml</DependentUpon>
<Compile Include="ItemParamList\FeatureInPartInRawPartListV.xaml.vb">
<DependentUpon>FeatureInPartInRawPartListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdFeatureListV.xaml.vb">
<DependentUpon>OnlyProdFeatureListV.xaml</DependentUpon>
<Compile Include="ItemParamList\PParameterListV.xaml.vb">
<DependentUpon>PParameterListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdPartInRawPartListV.xaml.vb">
<DependentUpon>OnlyProdPartInRawPartListV.xaml</DependentUpon>
<Compile Include="ItemParamList\RawPartListV.xaml.vb">
<DependentUpon>RawPartListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdPParameterListV.xaml.vb">
<DependentUpon>OnlyProdPParameterListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdQParameterListProdV.xaml.vb">
<DependentUpon>OnlyProdQParameterListProdV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdQParameterListV.xaml.vb">
<DependentUpon>OnlyProdQParameterListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\OnlyProdRawPartListV.xaml.vb">
<DependentUpon>OnlyProdRawPartListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\PartInRawPartListVM.vb" />
<Compile Include="ItemParamList\PartParametersV.xaml.vb">
<DependentUpon>PartParametersV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\PartParametersVM.vb" />
<Compile Include="ItemParamList\PParameterListVM.vb" />
<Compile Include="ItemParamList\QBTLParamVM.vb" />
<Compile Include="ItemParamList\QParameterListVM.vb" />
<Compile Include="ItemParamList\QParamListV.xaml.vb">
<DependentUpon>QParamListV.xaml</DependentUpon>
</Compile>
<Compile Include="ItemParamList\RawPartListVM.vb" />
<Compile Include="LeftPanel\LeftPanelVM.vb" />
<Compile Include="LeftPanel\OnlyProdLeftPanelV.xaml.vb">
<DependentUpon>OnlyProdLeftPanelV.xaml</DependentUpon>
<Compile Include="LeftPanel\LeftPanelV.xaml.vb">
<DependentUpon>LeftPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
<Compile Include="MachGroupPanel\MyMachGroupVM.vb" />
<Compile Include="MachGroupPanel\PartVM.vb" />
<Compile Include="MachinePanel\MachinePanelVM.vb" />
<Compile Include="MacroFeatureWnd\MacroFeatureWndVM.vb" />
<Compile Include="MacroFeatureWnd\NewMacroFeatureWnd.xaml.vb">
<DependentUpon>NewMacroFeatureWnd.xaml</DependentUpon>
<Compile Include="MacroFeatureWnd\MacroFeatureWnd.xaml.vb">
<DependentUpon>MacroFeatureWnd.xaml</DependentUpon>
</Compile>
<Compile Include="MainMenu\MainMenuVM.vb" />
<Compile Include="MainMenu\OnlyProdMainMenuV.xaml.vb">
<DependentUpon>OnlyProdMainMenuV.xaml</DependentUpon>
<Compile Include="MainMenu\MainMenuV.xaml.vb">
<DependentUpon>MainMenuV.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow\MainWindowM.vb" />
<Compile Include="MainWindow\MainWindowVM.vb" />
<Compile Include="MainWindow\OnlyProdMainWindowV.xaml.vb">
<DependentUpon>OnlyProdMainWindowV.xaml</DependentUpon>
<Compile Include="MainWindow\MainWindowV.xaml.vb">
<DependentUpon>MainWindowV.xaml</DependentUpon>
</Compile>
<Compile Include="MovePartInRawPartWnd\MovePartInRawPartWndVM.vb" />
<Compile Include="MovePartInRawPartWnd\OnlyProdMovePartInRawPartWndV.xaml.vb">
<DependentUpon>OnlyProdMovePartInRawPartWndV.xaml</DependentUpon>
<Compile Include="MovePartInRawPartWnd\MovePartInRawPartWndV.xaml.vb">
<DependentUpon>MovePartInRawPartWndV.xaml</DependentUpon>
</Compile>
<Compile Include="MultiCopyRawPartWnd\MultiCopyRawPartWndV.xaml.vb">
<DependentUpon>MultiCopyRawPartWndV.xaml</DependentUpon>
@@ -527,15 +497,15 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="AddFeatureWnd\NewAddFeatureWndV.xaml">
<Page Include="AddFeatureWnd\AddFeatureWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="AddPartWnd\OnlyProdAddPartWndV.xaml">
<Page Include="AddPartWnd\AddPartWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="AddRawPartWnd\OnlyProdAddRawPartWndV.xaml">
<Page Include="AddRawPartWnd\AddRawPartWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -551,11 +521,11 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="BTLPartManager\OnlyProdBTLPartManagerV.xaml">
<Page Include="BTLPartManager\BTLPartManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="CALCPanel\OnlyProdCalcPanelV.xaml">
<Page Include="CALCPanel\CalcPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -571,19 +541,15 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ConfigurationPage\OnlyProdConfigurationPageV.xaml">
<Page Include="ConfigurationPage\ConfigurationPageV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ConfigurationPage\OnlyProdMachine_ConfigurationPageV.xaml">
<Page Include="FeatureListManager\FeatureListManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="FeatureListManager\OnlyProdFeatureListManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="FeatureManager\OnlyProdFeatureManagerV.xaml">
<Page Include="FeatureManager\FeatureManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -595,11 +561,11 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="FreeContourInput\OnlyProdFreeContourInputV.xaml">
<Page Include="FreeContourInput\FreeContourInputV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="FreeContourManager\OnlyProdFreeContourManagerV.xaml">
<Page Include="FreeContourManager\FreeContourManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -615,11 +581,11 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="InputPwdWnd\OnlyProdInputPwdWndV.xaml">
<Page Include="InputPwdWnd\InputPwdWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="InstrumentPanel\OnlyProdInstrumentPanelV.xaml">
<Page Include="InstrumentPanel\InstrumentPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -627,35 +593,19 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdBTLPartListV.xaml">
<Page Include="ItemParamList\BTLPartListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdFeatureInPartInRawPartListV.xaml">
<Page Include="ItemParamList\FeatureInPartInRawPartListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdFeatureListV.xaml">
<Page Include="ItemParamList\PParameterListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdPartInRawPartListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdPParameterListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdQParameterListProdV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdQParameterListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\OnlyProdRawPartListV.xaml">
<Page Include="ItemParamList\RawPartListV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -663,31 +613,27 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ItemParamList\QParamListV.xaml">
<Page Include="LeftPanel\LeftPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="LeftPanel\OnlyProdLeftPanelV.xaml">
<Page Include="MachinePanel\MachinePanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MachinePanel\OnlyProdMachinePanelV.xaml">
<Page Include="MacroFeatureWnd\MacroFeatureWnd.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MacroFeatureWnd\NewMacroFeatureWnd.xaml">
<Page Include="MainMenu\MainMenuV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainMenu\OnlyProdMainMenuV.xaml">
<Page Include="MainWindow\MainWindowV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainWindow\OnlyProdMainWindowV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MovePartInRawPartWnd\OnlyProdMovePartInRawPartWndV.xaml">
<Page Include="MovePartInRawPartWnd\MovePartInRawPartWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -695,23 +641,23 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="NestingRunningWnd\OnlyProdNestingRunningWndV.xaml">
<Page Include="NestingRunningWnd\NestingRunningWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OnlyProdManager\OnlyProdManagerV.xaml">
<Page Include="ProdManager\ProdManagerV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Project\ProjectV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Project\OnlyProdProjectV.xaml">
<Page Include="OptimizePanel\OptimizePanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OptimizePanel\OnlyProdOptimizePanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="PartManager\OnlyProdPartManagerV.xaml">
<Page Include="PartManager\PartManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -723,11 +669,11 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ProjectTypeWnd\OnlyProdProjectTypeWndV.xaml">
<Page Include="ProjectTypeWnd\ProjectTypeWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="RawPartManager\OnlyProdRawPartManagerV.xaml">
<Page Include="RawPartManager\RawPartManagerV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -755,15 +701,15 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ShowBeamPanel\OnlyProdShowBeamPanelV.xaml">
<Page Include="ShowBeamPanel\ShowBeamPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ShowPanel\OnlyProdShowPanelV.xaml">
<Page Include="ShowPanel\ShowPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SpecialPanel\OnlyProdSpecialPanelV.xaml">
<Page Include="SpecialPanel\SpecialPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -771,7 +717,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="StatisticsTimePanel\OnlyProdStatisticsTimePanelV.xaml">
<Page Include="StatisticsTimePanel\StatisticsTimePanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -783,19 +729,15 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="StatisticsWnd\StatisticWndV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Statistics\OnlyProdOptimizerStatisticsV.xaml">
<Page Include="Statistics\OptimizerStatisticsV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Statistics\OnlyProdPDFEditorV.xaml">
<Page Include="Statistics\PDFEditorV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Statistics\OnlyProdStatisticsV.xaml">
<Page Include="Statistics\StatisticsV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -823,31 +765,23 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UpdateBTLWnd\OnlyProdUpdateBTLWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UpdateBTLWnd\OnlyProdUpdateOrAppendWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UpdateBTLWnd\UpdateBTLWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="UpdateBTLWnd\UpdateOrAppendWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="Utility\Dictionary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ViewPanel\OnlyProdViewPanelV.xaml">
<Page Include="ViewPanel\ViewPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="WarehouseWnd\OnlyProdWarehouseWndV.xaml">
<Page Include="WarehouseWnd\WarehouseWndV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -1018,9 +952,7 @@
<Resource Include="Resources\ViewPanel\ZoomIn.png" />
<Resource Include="Resources\ViewPanel\ZoomOut.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Behavior\" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<PackageReference Include="BouncyCastle">
<Version>1.8.5</Version>
@@ -1034,6 +966,9 @@
<PackageReference Include="EgwMultiEngineManager.Data">
<Version>2.7.10.1</Version>
</PackageReference>
<PackageReference Include="EgwWPFBaseLib">
<Version>2.7.10-beta.9</Version>
</PackageReference>
<PackageReference Include="EntityFramework">
<Version>6.4.4</Version>
</PackageReference>
@@ -1050,7 +985,7 @@
<Version>8.0.21</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
<Version>13.0.4</Version>
</PackageReference>
<PackageReference Include="NLog">
<Version>5.0.1</Version>
@@ -1197,7 +1132,9 @@ IF "$(PlatformName)"=="x64" IF "$(ConfigurationName)" == "Debug" copy $(TargetPa
IF "$(ConfigurationName)" == "Debug" copy c:\EgtDev\EgtBEAMWALL\EgtBEAMWALL.Optimizer\bin\x86\Debug\EgwMultiEngineManager.Data.dll c:\EgtProg\EgtBEAMWALL\EgwMultiEngineManager.Data.dll
IF "$(ConfigurationName)" == "Release" copy c:\EgtDev\EgtBEAMWALL\EgtBEAMWALL.Optimizer\bin\x86\Release\EgwMultiEngineManager.Data.dll c:\EgtProg\EgtBEAMWALL\EgwMultiEngineManager.Data.dll
IF "$(ConfigurationName)" == "Debug" copy c:\EgtDev\EgtBEAMWALL\EgtBEAMWALL.Optimizer\bin\x86\Debug\EgwMultiEngineManager.Core.dll c:\EgtProg\EgtBEAMWALL\EgwMultiEngineManager.Core.dll
IF "$(ConfigurationName)" == "Release" copy c:\EgtDev\EgtBEAMWALL\EgtBEAMWALL.Optimizer\bin\x86\Release\EgwMultiEngineManager.Core.dll c:\EgtProg\EgtBEAMWALL\EgwMultiEngineManager.Core.dll</PostBuildEvent>
IF "$(ConfigurationName)" == "Release" copy c:\EgtDev\EgtBEAMWALL\EgtBEAMWALL.Optimizer\bin\x86\Release\EgwMultiEngineManager.Core.dll c:\EgtProg\EgtBEAMWALL\EgwMultiEngineManager.Core.dll
IF "$(ConfigurationName)" == "Debug" copy c:\EgtDev\EgtBEAMWALL\EgtBEAMWALL.Optimizer\bin\x86\Debug\EgwWPFBaseLib.dll c:\EgtProg\EgtBEAMWALL\EgwWPFBaseLib.dll
IF "$(ConfigurationName)" == "Release" copy c:\EgtDev\EgtBEAMWALL\EgtBEAMWALL.Optimizer\bin\x86\Release\EgwWPFBaseLib.dll c:\EgtProg\EgtBEAMWALL\EgwWPFBaseLib.dll</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>
@@ -1,36 +1,26 @@
<StackPanel x:Class="FeatureListManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Orientation="Horizontal"
HorizontalAlignment="Right"
DataContext="{StaticResource FeatureListManagerVM}">
DataContext="{StaticResource FeatureListManagerVM}"
Style="{StaticResource OnlyProdFeatureListManager_StackPanel}">
<Button Command="{Binding CopyFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding CopyFeature_ToolTip}"
IsEnabled="{Binding CopyFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding MacroFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding MacroFeature_ToolTip}"
IsEnabled="{Binding MacroFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/MacroFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding AddFeature_ToolTip}"
IsEnabled="{Binding AddFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemoveFeature_Command}"
Visibility="{Binding ViewPage_Visibility}"
ToolTip="{Binding RemoveFeature_ToolTip}"
IsEnabled="{Binding RemoveFeature_IsEnabled}"
Style="{StaticResource LeftPanel_Button}">
<Image Source="/Resources/LeftPanel/RemoveFeature.png" Stretch="Uniform"/>
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/NewPage/Remove.png" Stretch="Uniform"/>
</Button>
</StackPanel>
@@ -230,7 +230,7 @@ Public Class FeatureListManagerVM
Dim NewFeat As BTLFeatureM = Nothing
Dim nNewFeatureId As Integer = 0
Dim bMacroFlag As Boolean = False
Dim AddNewFeatureWnd As New NewAddFeatureWndV(Application.Current.MainWindow, AddFeatureWndVM)
Dim AddNewFeatureWnd As New AddFeatureWndV(Application.Current.MainWindow, AddFeatureWndVM)
If AddNewFeatureWnd.ShowDialog() Then
' verifico se una Macro è selezionata
If AddFeatureWndVM.nSelMacroDefault >= 0 Then
@@ -1,26 +0,0 @@
<StackPanel x:Class="OnlyProdFeatureListManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="{StaticResource FeatureListManagerVM}"
Style="{StaticResource OnlyProdFeatureListManager_StackPanel}">
<Button Command="{Binding CopyFeature_Command}"
ToolTip="{Binding CopyFeature_ToolTip}"
IsEnabled="{Binding CopyFeature_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/CopyFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddFeature_Command}"
ToolTip="{Binding AddFeature_ToolTip}"
IsEnabled="{Binding AddFeature_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddFeature.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemoveFeature_Command}"
ToolTip="{Binding RemoveFeature_ToolTip}"
IsEnabled="{Binding RemoveFeature_IsEnabled}"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/NewPage/Remove.png" Stretch="Uniform"/>
</Button>
</StackPanel>
@@ -1,3 +0,0 @@
Public Class OnlyProdFeatureListManagerV
End Class
@@ -1,55 +1,85 @@
<StackPanel x:Class="FeatureManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
Orientation="Horizontal"
Height="32">
<Grid x:Class="FeatureManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
Margin="30,4,0,2">
<TextBlock Text="{Binding Face_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding Tag.SIDEList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelSIDE, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Expander Header="{Binding Face_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Text="{Binding Group_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding Tag.GRPList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Width="80">
<ListBox ItemsSource="{Binding Tag.SIDEList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelSIDE, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureManager_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<Expander Grid.Column="1"
Header="{Binding Group_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureComboBox}"/>
<TextBlock Text="{Binding Priority_Msg}"
Width="80">
<ListBox ItemsSource="{Binding Tag.GRPList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureManager_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<TextBlock Grid.Column="2"
Text="{Binding Priority_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sPriority,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}},
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding Tag.sPriority,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}},
UpdateSourceTrigger=Explicit}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}"
Width="45"/>
<TextBlock Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Style="{StaticResource OptionTextBlock}"/>
<ComboBox ItemsSource="{Binding Tag.VARIANTList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelVARIANT, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="4"
Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Style="{StaticResource OnlyProdFeatureManager_OnlyProd}"/>
<ComboBox Grid.Column="5"
ItemsSource="{Binding Tag.VARIANTList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelVARIANT, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Variant_Visibility}"
Style="{StaticResource FeatureComboBox}"/>
<Button Content="{Binding Edit_Msg}"
Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
<Button Grid.Column="6"
Content="{Binding Edit_Msg}"
Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding Save_Msg}"
Command="{Binding Tag.Save_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="{Binding Cancel_Msg}"
Command="{Binding Tag.Cancel_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureManagerV}}}"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</StackPanel>
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="7"
Content="{Binding Save_Msg}"
Command="{Binding Tag.Save_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="8"
Content="{Binding Cancel_Msg}"
Command="{Binding Tag.Cancel_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureManagerV}}}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="9" HorizontalAlignment="Right"
Command="{Binding MacroFeature_Command}"
ToolTip="{Binding MacroFeature_ToolTip}"
IsEnabled="{Binding MacroFeature_IsEnabled}"
Style="{StaticResource OnlyProdFeatureMan_Button}">
<Image Source="/Resources/LeftPanel/MacroFeature.png" Stretch="Uniform"/>
</Button>
</Grid>
@@ -124,9 +124,6 @@ Public Class FeatureManagerVM
#Region "MacroFeature"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property MacroFeature_Command As ICommand
Get
If m_cmdMacroFeature Is Nothing Then
@@ -136,16 +133,13 @@ Public Class FeatureManagerVM
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub MacroFeature()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
' apro finestra di creazione macro
Dim MacroFeatureWndVM As New MacroFeatureWndVM()
Dim NewMacroFeatureWnd As New NewMacroFeatureWnd(Application.Current.MainWindow, MacroFeatureWndVM)
If NewMacroFeatureWnd.ShowDialog() Then
Dim MacroFeatureWnd As New MacroFeatureWnd(Application.Current.MainWindow, MacroFeatureWndVM)
If MacroFeatureWnd.ShowDialog() Then
End If
End Sub
@@ -1,85 +0,0 @@
<Grid x:Class="OnlyProdFeatureManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
Margin="30,4,0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Expander Header="{Binding Face_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Width="80">
<ListBox ItemsSource="{Binding Tag.SIDEList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelSIDE, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureManager_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<Expander Grid.Column="1"
Header="{Binding Group_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Width="80">
<ListBox ItemsSource="{Binding Tag.GRPList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelGRP, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Style="{StaticResource FeatureManager_ListBox}"
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
</Expander>
<TextBlock Grid.Column="2"
Text="{Binding Priority_Msg}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}"
Style="{StaticResource OptionTextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="3"
Text="{Binding Tag.sPriority,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}},
UpdateSourceTrigger=Explicit}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Priority_Visibility}"
Style="{StaticResource Dimension_TextBox}"/>
<TextBlock Grid.Column="4"
Text="{Binding Tag.sName, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Style="{StaticResource OnlyProdFeatureManager_OnlyProd}"/>
<ComboBox Grid.Column="5"
ItemsSource="{Binding Tag.VARIANTList, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
SelectedItem="{Binding Tag.nSelVARIANT, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
IsEnabled="{Binding FeatureManager_IsEnabled}"
Visibility="{Binding Variant_Visibility}"
Style="{StaticResource FeatureComboBox}"/>
<Button Grid.Column="6"
Content="{Binding Edit_Msg}"
Command="{Binding Tag.Edit_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Visibility="{Binding Tag.Edit_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
IsEnabled="{Binding Edit_IsEnabled}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="7"
Content="{Binding Save_Msg}"
Command="{Binding Tag.Save_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="8"
Content="{Binding Cancel_Msg}"
Command="{Binding Tag.Cancel_Command, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Visibility="{Binding Tag.SaveCancel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdFeatureManagerV}}}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="9" HorizontalAlignment="Right"
Command="{Binding MacroFeature_Command}"
ToolTip="{Binding MacroFeature_ToolTip}"
IsEnabled="{Binding MacroFeature_IsEnabled}"
Style="{StaticResource OnlyProdFeatureMan_Button}">
<Image Source="/Resources/LeftPanel/MacroFeature.png" Stretch="Uniform"/>
</Button>
</Grid>
@@ -1,3 +0,0 @@
Public Class OnlyProdFeatureManagerV
End Class
@@ -1,314 +0,0 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Imports Newtonsoft.Json
Public Class ForcedStrategyBTLVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Public Const AUTOMATICSTRATEGYID As String = "AUTOMATIC"
Private m_StrategyList As New ObservableCollection(Of Strategy)
Public Property StrategyList As ObservableCollection(Of Strategy)
Get
Return m_StrategyList
End Get
Set(value As ObservableCollection(Of Strategy))
m_StrategyList = value
End Set
End Property
Private m_SelStrategy As Strategy
Public Property SelStrategy As Strategy
Get
Return m_SelStrategy
End Get
Set(value As Strategy)
m_SelStrategy = value
If Map.refStrategyManagerVM.bOK AndAlso Not IsNothing(m_SelStrategy) Then
For Each Param As StrategyParameter In m_SelStrategy.ParameterList
' Rendo visibili i parametri che hanno sMinUserLevel a 10
SetUserAdmin_IsChecked(True)
Map.refStrategyManagerVM.UserLevelVisibility(Param, Visibility.Visible)
Next
End If
If m_bUserAdmin_IsChecked AndAlso Not IsNothing(m_SelStrategy) Then
Map.refStrategyManagerVM.ShowParamStrategy(m_SelStrategy)
End If
NotifyPropertyChanged(NameOf(SelStrategy))
End Set
End Property
Private m_bUserAdmin_IsChecked As Boolean = False
Public Property UserAdmin_IsChecked As Boolean
Get
Return m_bUserAdmin_IsChecked
End Get
Set(value As Boolean)
m_bUserAdmin_IsChecked = value
Map.refStrategyManagerVM.ShowParamStrategy(m_SelStrategy)
NotifyPropertyChanged(NameOf(UserAdmin_IsChecked))
End Set
End Property
Friend Sub SetUserAdmin_IsChecked(value As Boolean)
m_bUserAdmin_IsChecked = value
NotifyPropertyChanged(NameOf(UserAdmin_IsChecked))
End Sub
Private m_UserFontWeight As FontWeight = FontWeights.Bold
Public ReadOnly Property UserFontWeight As FontWeight
Get
Return m_UserFontWeight
End Get
End Property
Friend Sub SetUserFontWeight(value As FontWeight)
m_UserFontWeight = value
NotifyPropertyChanged(NameOf(UserFontWeight))
End Sub
Private m_AdminFontWeight As FontWeight = FontWeights.Normal
Public ReadOnly Property AdminFontWeight As FontWeight
Get
Return m_AdminFontWeight
End Get
End Property
Friend Sub SetAdminFontWeight(value As FontWeight)
m_AdminFontWeight = value
NotifyPropertyChanged(NameOf(AdminFontWeight))
End Sub
Private m_UnloackImage As String = "pack://application:,,,/Resources/NewPage/padlock.png"
Public ReadOnly Property UnloackImage As String
Get
Return m_UnloackImage
End Get
End Property
Friend Sub SetUnloackImage(value As String)
m_UnloackImage = value
NotifyPropertyChanged(NameOf(UnloackImage))
End Sub
Private m_bUnlockAllIsChecked As Boolean = False
Public Property UnlockAllIsChecked As Boolean
Get
Return m_bUnlockAllIsChecked
End Get
Set(value As Boolean)
m_bUnlockAllIsChecked = value
If m_bUnlockAllIsChecked Then
Map.refStrategyManagerVM.UnlockAll(m_SelStrategy)
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock-unlock.png")
Else
Map.refStrategyManagerVM.LockAll(m_SelStrategy)
SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
NotifyPropertyChanged(NameOf(UnlockAllIsChecked))
End Set
End Property
Private m_CurrentFeature As BTLFeatureM
#Region "Messages"
Public ReadOnly Property UserMsg As String
Get
Return EgtMsg(61748)
End Get
End Property
Public ReadOnly Property AdvanceMsg As String
Get
Return EgtMsg(61749)
End Get
End Property
#End Region ' Messages
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
Map.SetRefForcedStrategyBTLVM(Me)
End Sub
#End Region ' Constructor
#Region "METHODS"
Friend Sub Init(Feature As BTLFeatureM)
m_CurrentFeature = Feature
LoadStrategyListFromTopology(Feature.nFeatureId, Feature.nPRC, Feature.nSelGRP)
' leggo eventuali parametri forzati
Dim sStrategyID As String = ""
EgtGetInfo(m_CurrentFeature.nFeatureId, "STRATEGY", sStrategyID)
If String.IsNullOrWhiteSpace(sStrategyID) Then Return
Dim ForcedStrategy As Strategy = m_StrategyList.FirstOrDefault(Function(x) x.sStrategyId = sStrategyID)
If IsNothing(ForcedStrategy) Then
Else
SelStrategy = ForcedStrategy
For Each Param In SelStrategy.ParameterList
Select Case Param.GetType()
Case GetType(BooleanStrategyParameter)
Dim bValue As Boolean = False
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, bValue)
DirectCast(Param, BooleanStrategyParameter).SetValue(bValue)
Case GetType(DoubleStrategyParameter)
Dim dValue As Double = 0
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, dValue)
DirectCast(Param, DoubleStrategyParameter).SetValue(dValue)
Case GetType(ComboStrategyParameter)
Dim sValue As String = String.Empty
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sValue)
Dim ComboStrategyParameter As ComboStrategyParameter = DirectCast(Param, ComboStrategyParameter)
Dim SelCombo = ComboStrategyParameter.ComboList.FirstOrDefault(Function(x) x.sValue = sValue)
ComboStrategyParameter.SelValue = SelCombo
Case GetType(StringStrategyParameter)
Dim sValue As String = String.Empty
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sValue)
DirectCast(Param, StringStrategyParameter).SetValue(sValue)
Case GetType(ListStrategyParameter)
Dim sValue As String = String.Empty
EgtGetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sValue)
Dim ListStrategyParameter As ListStrategyParameter = DirectCast(Param, ListStrategyParameter)
Dim SelValue As ToolParameter = Nothing
Dim sTrimValue As String = sValue.TrimEnd(";"c)
Dim sTmpValue As String() = sTrimValue.Split(";"c)
Dim sSplitValue As String() = Nothing
For Each ItemValue As String In sTmpValue
sSplitValue = ItemValue.Split(","c)
For Each ItemTool As ToolParameter In ListStrategyParameter.ListValue
If sSplitValue(0) = ItemTool.sUUID AndAlso sSplitValue(1) = ItemTool.sName Then
ItemTool.bIsActive = True
SelValue = ListStrategyParameter.ListValue.FirstOrDefault(Function(x) x.sName = ItemTool.sName AndAlso x.sUUID = ItemTool.sUUID)
End If
Next
Next
ListStrategyParameter.SelValue = SelValue
End Select
Next
End If
End Sub
Friend Function LoadStrategyListFromTopology(nFeatureId As Integer, nPRC As Integer, nGRP As Integer) As Boolean
m_StrategyList.Clear()
Dim sTopologyName As String = "Feature"
' carico default
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(ProjectManagerVM.CurrProd.nType)
Dim sAvailableStrategiesFilePath As String = sStrategiesDirPath & "\" & AVAILABLESTRATEGYLIST_FILE & ".json"
If File.Exists(sAvailableStrategiesFilePath) Then
Dim sReadedFile As String = File.ReadAllText(sAvailableStrategiesFilePath)
Dim JsonStrategyFeatureList As List(Of JsonAvailableStrategyFeature) = JsonConvert.DeserializeObject(Of List(Of JsonAvailableStrategyFeature))(sReadedFile)
nGRP = CalcBeamPrivateProfileGRP(nGRP)
Dim JsonAvailableStrategyFeature As JsonAvailableStrategyFeature = JsonStrategyFeatureList.FirstOrDefault(Function(x) x.nGrp = nGRP AndAlso x.nPrc = nPRC)
If IsNothing(JsonAvailableStrategyFeature) Then Return False
Dim JsonAvailableTopology As JsonAvailableTopology = JsonAvailableStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
If IsNothing(JsonAvailableTopology) Then
' ricavo topologia da feature
FindTopologyFromFeature(nFeatureId, sTopologyName)
JsonAvailableTopology = JsonAvailableStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
End If
If IsNothing(JsonAvailableTopology) Then Return False
m_StrategyList = New ObservableCollection(Of Strategy)((From JsonAvailableStrategy In JsonAvailableTopology.StrategyList
Select JsonAvailableStrategy.Deserialize(ProjectManagerVM.CurrProd.nType, -1)).ToList())
End If
' recupero custom
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nFeatureId))
Dim nPartProjId As Integer = 0
If Not EgtGetInfo(nPartId, PROJ, nPartProjId) OrElse nPartProjId <= 0 Then Return False
Dim nBTLInfoLayerId As Integer = GetCurrProjBtlInfoLayerId(nPartProjId)
Dim sStrategySetupName As String = ""
EgtGetInfo(nBTLInfoLayerId, "AISETUP", sStrategySetupName)
If Not String.IsNullOrWhiteSpace(sStrategySetupName) Then
' carico custom
Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(ProjectManagerVM.CurrProd.nType, True)
Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & sStrategySetupName & ".json"
If File.Exists(sStrategyConfigurationFilePath) Then
Dim sReadedFile As String = File.ReadAllText(sStrategyConfigurationFilePath)
Dim JsonStrategyFeatureList As List(Of JsonStrategyFeature) = JsonConvert.DeserializeObject(Of List(Of JsonStrategyFeature))(sReadedFile)
Dim JsonStrategyFeature As JsonStrategyFeature = JsonStrategyFeatureList.FirstOrDefault(Function(x) x.nGrp = nGRP AndAlso x.nPrc = nPRC)
If IsNothing(JsonStrategyFeature) Then Return False
Dim JsonTopology As JsonTopology = JsonStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
If IsNothing(JsonTopology) Then Return False
For Each Strategy In JsonTopology.StrategyList
Dim DefaultStrategy As Strategy = m_StrategyList.FirstOrDefault(Function(x) x.sStrategyId = Strategy.sStrategyId)
If IsNothing(DefaultStrategy) Then
' DefaultTopology.StrategyList.Add(New Strategy(DefaultTopology, Strategy))
' verifico indici!!
Else
DefaultStrategy.ReadConfiguration(Strategy)
End If
Next
End If
End If
' aggiungo strategia automatica
m_StrategyList.Insert(0, New Strategy() With {.sStrategyId = AUTOMATICSTRATEGYID, .sStrategyName = AUTOMATICSTRATEGYID})
NotifyPropertyChanged(NameOf(StrategyList))
Return True
End Function
Friend Function GetCurrProjBtlInfoLayerId(nProjId As Integer) As Integer
' cerco tra i layer BTLInfo
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
While nBTLInfoLayerId <> GDB_ID.NULL
' verifico se il layer appartiene al ProjId
Dim nBTLInfoLayerProjId As Integer
EgtGetInfo(nBTLInfoLayerId, BTL_PRT_PROJ, nBTLInfoLayerProjId)
If nBTLInfoLayerProjId = nProjId Then
Return nBTLInfoLayerId
End If
nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
End While
Return -1
End Function
Friend Sub ForcedStrategy()
' cancello precedenti valori
Dim sPrecStrategyID As String = ""
EgtGetInfo(m_CurrentFeature.nFeatureId, "STRATEGY", sPrecStrategyID)
If Not String.IsNullOrWhiteSpace(sPrecStrategyID) Then
Dim PrecInfo As String() = {}
EgtGetAllInfo(m_CurrentFeature.nFeatureId, PrecInfo)
Dim PrecStrategyInfo As String() = PrecInfo.Where(Function(x) x.StartsWith(sPrecStrategyID)).ToArray()
For Each Info In PrecStrategyInfo
EgtRemoveInfo(m_CurrentFeature.nFeatureId, Info.Split("="c)(0))
Next
End If
If Not IsNothing(m_SelStrategy) Then
If m_SelStrategy.sStrategyId = AUTOMATICSTRATEGYID Then
EgtRemoveInfo(m_CurrentFeature.nFeatureId, "STRATEGY")
Else
EgtSetInfo(m_CurrentFeature.nFeatureId, "STRATEGY", SelStrategy.sStrategyId)
Dim sInfo As String = String.Empty
For Each Param In SelStrategy.ParameterList
Select Case Param.GetType()
Case GetType(BooleanStrategyParameter)
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, BooleanStrategyParameter).bValue)
Case GetType(DoubleStrategyParameter)
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, DoubleStrategyParameter).sValue)
Case GetType(ComboStrategyParameter)
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, ComboStrategyParameter).SelValue.sValue)
Case GetType(StringStrategyParameter)
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, DirectCast(Param, StringStrategyParameter).sValue)
Case GetType(ListStrategyParameter)
For Each Item As ToolParameter In DirectCast(Param, ListStrategyParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(m_CurrentFeature.nFeatureId, m_SelStrategy.sStrategyId & "_" & Param.sNameNge, sInfo)
End If
Next
End Select
Next
End If
End If
End Sub
#End Region ' Methods
End Class
@@ -1,7 +1,7 @@
<UserControl x:Class="ForcedStrategyPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Optimizer="clr-namespace:EgtBEAMWALL.Optimizer">
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
@@ -20,7 +20,7 @@
IsSynchronizedWithCurrentItem="True"
Style="{StaticResource NewAddFeature_ListBox}">
<ListBox.Resources>
<DataTemplate DataType="{x:Type Optimizer:Strategy}">
<DataTemplate DataType="{x:Type OPTIMIZER:Strategy}">
<StackPanel Orientation="Horizontal">
<RadioButton IsChecked="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
GroupName="ForcedStrategy"/>
@@ -51,7 +51,7 @@
FontWeight="Bold"
Style="{StaticResource DialogWindow_TextBlock}"/>
</GroupBox.Header>
<Optimizer:ParameterStrategyV Tag="{Binding SelStrategy}"/>
<OPTIMIZER:ParameterStrategyV Tag="{Binding SelStrategy}"/>
</GroupBox>
<StackPanel Grid.Row="2"
@@ -1,12 +1,12 @@
<UserControl x:Class="FreeContourInputV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Height="32">
<StackPanel Orientation="Horizontal">
<StackPanel>
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Setter Property="Orientation" Value="Horizontal"/>
<Style.Triggers>
<DataTrigger Binding="{Binding FocusTextBox}" Value="True">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=PropertySearch}"/>
@@ -14,33 +14,40 @@
</Style.Triggers>
</Style>
</StackPanel.Style>
<TextBlock Text="{Binding Message}"
Visibility="{Binding Message_Visibility}"
Style="{StaticResource OptionTextBlock}"/>
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
Width="200"
Visibility="{Binding Text_Visibility}" Margin="5,0,5,0"
Visibility="{Binding Text_Visibility}"
Style="{StaticResource FreeContour_TextBox}">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/>
</TextBox.InputBindings>
</TextBox>
<CheckBox Content="{Binding CheckBoxText}" IsChecked="{Binding IsChecked}"
Visibility="{Binding Check_Visibility}" Margin="5,0,5,0"
VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding ComboItemsList}" SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding Combo_Visibility}" Margin="5,0,5,0" Style="{x:Null}"/>
<CheckBox Content="{Binding CheckBoxText}"
IsChecked="{Binding IsChecked}"
Visibility="{Binding Check_Visibility}"
Style="{StaticResource FreeContourInput_CheckBox}"/>
<ComboBox ItemsSource="{Binding ComboItemsList}"
SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding Combo_Visibility}"
Margin="5,0,5,0"/>
<Grid Margin="5,0,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding Show_Command}" Visibility="{Binding ShowBtn_Visibility}"
Content="{Binding ShowMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Command="{Binding Done_Command}" Visibility="{Binding DoneBtn_Visibility}"
Grid.Column="1"
Content="{Binding OkMsg}" Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Command="{Binding Show_Command}"
Visibility="{Binding ShowBtn_Visibility}"
Content="{Binding ShowMsg}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="1"
Command="{Binding Done_Command}"
Visibility="{Binding DoneBtn_Visibility}"
Content="{Binding OkMsg}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
</Grid>
</StackPanel>
</UserControl>
@@ -1,53 +0,0 @@
<UserControl x:Class="OnlyProdFreeContourInputV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="32">
<StackPanel>
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Setter Property="Orientation" Value="Horizontal"/>
<Style.Triggers>
<DataTrigger Binding="{Binding FocusTextBox}" Value="True">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=PropertySearch}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
<TextBlock Text="{Binding Message}"
Visibility="{Binding Message_Visibility}"
Style="{StaticResource OptionTextBlock}"/>
<TextBox Text="{Binding Text, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding Text_Visibility}"
Style="{StaticResource FreeContour_TextBox}">
<TextBox.InputBindings>
<KeyBinding Key="Enter" Command="{Binding Done_Command, UpdateSourceTrigger=PropertyChanged}"/>
<KeyBinding Key="S" Modifiers="Control" Command="{Binding Show_Command}"/>
</TextBox.InputBindings>
</TextBox>
<CheckBox Content="{Binding CheckBoxText}"
IsChecked="{Binding IsChecked}"
Visibility="{Binding Check_Visibility}"
Style="{StaticResource FreeContourInput_CheckBox}"/>
<ComboBox ItemsSource="{Binding ComboItemsList}"
SelectedIndex="{Binding ComboSelectedIndex}"
Visibility="{Binding Combo_Visibility}"
Margin="5,0,5,0"/>
<Grid Margin="5,0,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding Show_Command}"
Visibility="{Binding ShowBtn_Visibility}"
Content="{Binding ShowMsg}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="1"
Command="{Binding Done_Command}"
Visibility="{Binding DoneBtn_Visibility}"
Content="{Binding OkMsg}"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
</Grid>
</StackPanel>
</UserControl>
@@ -1,3 +0,0 @@
Public Class OnlyProdFreeContourInputV
End Class
@@ -1,70 +1,66 @@
<EgtFloating:EgtFloatingPanel x:Class="FreeContourManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
<StackPanel x:Class="FreeContourManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
<ComboBox ItemsSource="{Binding TypeList}"
SelectedIndex="{Binding SelType, Delay=1}"
Height="22" Width="160"
Margin="0,0,5,0"/>
Style="{StaticResource OnlyProdType_ComboBox}"/>
<ComboBox ItemsSource="{Binding PathList}"
SelectedIndex="{Binding SelPath}"
Height="22" Width="100"
Margin="0,0,5,0"
Visibility="{Binding PathList_Visibility}"/>
Visibility="{Binding PathList_Visibility}"
Style="{StaticResource OnlyProdPath_ComboBox}"/>
<Button Command="{Binding Line2P_Command}"
ToolTip="{Binding Line2P_ToolTip}"
IsEnabled="{Binding Line2P_IsEnabled}"
Style="{StaticResource ToolBar_Button}">
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Delete_Command}"
ToolTip="{Binding Delete_ToolTip}"
Style="{StaticResource ToolBar_Button}">
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ModifyCurve_Command}"
ToolTip="{Binding ModifyCurve_ToolTip}"
Style="{StaticResource ToolBar_Button}">
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddPointCurve_Command}"
ToolTip="{Binding AddPointCurve_ToolTip}"
Style="{StaticResource ToolBar_Button}">
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePointCurve_Command}"
ToolTip="{Binding RemovePointCurve_ToolTip}"
Style="{StaticResource ToolBar_Button}">
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ChangeStart_Command}"
ToolTip="{Binding ChangeStart_ToolTip}"
Style="{StaticResource ToolBar_Button}">
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding InvertCurve_Command}"
ToolTip="{Binding InvertCurve_ToolTip}"
Style="{StaticResource ToolBar_Button}">
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/InvertCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Move_Command}"
ToolTip="{Binding Move_ToolTip}"
Style="{StaticResource ToolBar_Button}">
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Move.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Rotate_Command}"
ToolTip="{Binding Rotate_ToolTip}"
Style="{StaticResource ToolBar_Button}">
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Rotate.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding TextAngle_Command}"
ToolTip="{Binding TextAngle_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Visibility="{Binding TextAngle_Visibility}">
Visibility="{Binding TextAngle_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
</Button>
</EgtFloating:EgtFloatingPanel>
</StackPanel>
@@ -300,9 +300,7 @@ Public Class FreeContourManagerVM
' blocco funzionalita' interfaccia
Map.refProjectVM.ManageIsEnabled(False)
Map.refPartListVM.SetBTLPartListIsEnabled(False)
Map.refFeatureListVM.SetBTLFeatureListIsEnabled(False)
Map.refPParameterListVM.SetPParameterListIsEnabled(False)
Map.refQParameterListVM.SetQParameterListIsEnabled(False)
Map.refShowBeamPanelVM.SetShowSolid_IsEnabled(False)
Map.refShowBeamPanelVM.SetShowAll_IsEnabled(False)
'resetto tutte le variabili
@@ -540,9 +538,7 @@ Public Class FreeContourManagerVM
' sblocco funzionalita' interfaccia
Map.refProjectVM.ManageIsEnabled(True)
Map.refPartListVM.SetBTLPartListIsEnabled(True)
Map.refFeatureListVM.SetBTLFeatureListIsEnabled(True)
Map.refPParameterListVM.SetPParameterListIsEnabled(True)
Map.refQParameterListVM.SetQParameterListIsEnabled(True)
Map.refShowBeamPanelVM.SetShowSolid_IsEnabled(True)
Map.refShowBeamPanelVM.SetShowAll_IsEnabled(True)
' reimposto vista normale per pezzo
@@ -1,67 +0,0 @@
<StackPanel x:Class="OnlyProdFreeContourManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
<ComboBox ItemsSource="{Binding TypeList}"
SelectedIndex="{Binding SelType, Delay=1}"
Style="{StaticResource OnlyProdType_ComboBox}"/>
<ComboBox ItemsSource="{Binding PathList}"
SelectedIndex="{Binding SelPath}"
Visibility="{Binding PathList_Visibility}"
Style="{StaticResource OnlyProdPath_ComboBox}"/>
<Button Command="{Binding Line2P_Command}"
ToolTip="{Binding Line2P_ToolTip}"
IsEnabled="{Binding Line2P_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Delete_Command}"
ToolTip="{Binding Delete_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ModifyCurve_Command}"
ToolTip="{Binding ModifyCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding AddPointCurve_Command}"
ToolTip="{Binding AddPointCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding RemovePointCurve_Command}"
ToolTip="{Binding RemovePointCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding ChangeStart_Command}"
ToolTip="{Binding ChangeStart_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/ChangeStart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding InvertCurve_Command}"
ToolTip="{Binding InvertCurve_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/InvertCurve.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Move_Command}"
ToolTip="{Binding Move_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Move.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Rotate_Command}"
ToolTip="{Binding Rotate_ToolTip}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Rotate.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding TextAngle_Command}"
ToolTip="{Binding TextAngle_ToolTip}"
Visibility="{Binding TextAngle_Visibility}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
</Button>
</StackPanel>
@@ -1,3 +0,0 @@
Public Class OnlyProdFreeContourManagerV
End Class
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:Optmizer="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
@@ -24,7 +24,7 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Optmizer:ProjectParametersV Margin="0,10,0,0"/>
<OPTIMIZER:ProjectParametersV Margin="0,10,0,0"/>
<StackPanel Grid.Row="1"
Orientation="Horizontal"
@@ -35,11 +35,6 @@
Style="{StaticResource SaveStrategy_Button}">
<Image Source="/Resources/NewPage/Ok.png" Stretch="Uniform"/>
</Button>
<!--<Button Command="{Binding CloseCommand}"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource SaveStrategy_Button}">
<Image Source="/Resources/PDFEditor/Delete.png" Stretch="Uniform"/>
</Button>-->
</StackPanel>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
@@ -26,7 +26,7 @@
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,10,0,10"
Style="{StaticResource Strategy_ComboBox}" />
<EgtBEAMWALL:ProjectParametersV Grid.Row="1" Grid.RowSpan="2" IsEnabled="{Binding GeneralParametersIsEnable}"/>
<OPTIMIZER:ProjectParametersV Grid.Row="1" Grid.RowSpan="2" IsEnabled="{Binding GeneralParametersIsEnable}"/>
<UniformGrid Rows="2" Grid.Row="1" Grid.Column="1" Margin="0,0,5,0">
<CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Top" HorizontalAlignment="Center" Margin="10,10,0,0"
@@ -1,9 +1,9 @@
<UserControl x:Class="ProjectParametersV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Optmizer="clr-namespace:EgtBEAMWALL.Optimizer">
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
<UserControl.Resources>
<Optmizer:GroupVisibilityConverter x:Key="GroupVisibilityConverter"/>
<OPTIMIZER:GroupVisibilityConverter x:Key="GroupVisibilityConverter"/>
<CollectionViewSource x:Key="GroupedParameters" Source="{Binding GeneralParametersList}">
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="nGroup"/>
@@ -60,7 +60,7 @@
</GroupStyle>
</ItemsControl.GroupStyle>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type Optmizer:BooleanGenericParameter}">
<DataTemplate DataType="{x:Type OPTIMIZER:BooleanGenericParameter}">
<UniformGrid Columns="2"
Margin="2,2,2,5"
Visibility="{Binding bBooleanVisibility}">
@@ -72,7 +72,7 @@
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
</UniformGrid>
</DataTemplate>
<DataTemplate DataType="{x:Type Optmizer:DoubleGenericParameter}">
<DataTemplate DataType="{x:Type OPTIMIZER:DoubleGenericParameter}">
<UniformGrid Columns="2"
Margin="2,2,2,5"
Visibility="{Binding bDoubleVisibility}">
@@ -84,7 +84,7 @@
Style="{StaticResource ColorPicker_TextBox}"/>
</UniformGrid>
</DataTemplate>
<DataTemplate DataType="{x:Type Optmizer:ComboGenericParameter}">
<DataTemplate DataType="{x:Type OPTIMIZER:ComboGenericParameter}">
<UniformGrid Columns="2"
Margin="2,2,2,5"
Visibility="{Binding bComboBoxVisibility}">
@@ -101,7 +101,7 @@
</ComboBox>
</UniformGrid>
</DataTemplate>
<DataTemplate DataType="{x:Type Optmizer:StringGenericParameter}">
<DataTemplate DataType="{x:Type OPTIMIZER:StringGenericParameter}">
<UniformGrid Columns="2"
Margin="5,2,5,0"
Visibility="{Binding bStringVisibility}">
@@ -113,7 +113,7 @@
Style="{StaticResource ColorPicker_TextBox}"/>
</UniformGrid>
</DataTemplate>
<DataTemplate DataType="{x:Type Optmizer:ListGenericParameter}">
<DataTemplate DataType="{x:Type OPTIMIZER:ListGenericParameter}">
<Grid Margin="5,5,5,0"
Visibility="{Binding bListBoxVisibility}">
<Grid.RowDefinitions>
@@ -2,15 +2,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="InputPwdWndV">
Title="InputPwdWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -18,14 +18,12 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding PasswordMsg}"
Style="{StaticResource OptionTextBlock}"
Grid.Row="0"
Margin="0,0,0,5"/>
<PasswordBox PasswordChanged="PasswordBox_PasswordChanged"
HorizontalContentAlignment="Right"
Grid.Row="1"
Margin="0,0,0,5"/>
<TextBlock Grid.Row="0"
Text="{Binding PasswordMsg}"
Style="{StaticResource PasswordMsg_TextBlock}"/>
<PasswordBox Grid.Row="1"
x:Name="PwdBox"
PasswordChanged="PasswordBox_PasswordChanged"/>
<Grid Grid.Row="2"
Margin="0,0,0,5">
@@ -36,15 +34,15 @@
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
<Button Grid.Column="1"
Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="3"
Content="Cancel"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -6,6 +6,7 @@
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
PwdBox.Focus()
Me.DataContext = InputPwdWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_InputPwdWndVM = InputPwdWndVM
@@ -1,48 +0,0 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdInputPwdWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="InputPwdWndV"
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Text="{Binding PasswordMsg}"
Style="{StaticResource PasswordMsg_TextBlock}"/>
<PasswordBox Grid.Row="1"
x:Name="PwdBox"
PasswordChanged="PasswordBox_PasswordChanged"/>
<Grid Grid.Row="2"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="1"
Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
<Button Grid.Column="3"
Content="Cancel"
IsCancel="True"
Style="{StaticResource GeneralConfigurationToolBar_TextButton}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,26 +0,0 @@
Public Class OnlyProdInputPwdWndV
Private WithEvents m_InputPwdWndVM As InputPwdWndVM
Sub New(Owner As Window, InputPwdWndVM As InputPwdWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
PwdBox.Focus()
Me.DataContext = InputPwdWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_InputPwdWndVM = InputPwdWndVM
End Sub
' Sub necessaria per ottenere la stringa immessa nella PasswordBox
Private Sub PasswordBox_PasswordChanged(sender As Object, e As RoutedEventArgs)
If Not IsNothing(Me.DataContext) Then
Me.DataContext.sPassword = DirectCast(sender, PasswordBox).Password
End If
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_InputPwdWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -1,38 +1,28 @@
<EgtFloating:EgtFloatingPanel x:Class="InstrumentPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
<StackPanel x:Class="InstrumentPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
<ToggleButton ToolTip="{Binding GetDistToolTip}"
Style="{StaticResource ToolBar_ToggleButton}"
IsChecked="{Binding GetDistIsChecked}">
IsChecked="{Binding GetDistIsChecked}"
Style="{StaticResource ToolBarOnlyProdPage_ToggleButton}">
<Image Source="/Resources/InstrumentPanel/GetDist.png" Stretch="Uniform"/>
</ToggleButton>
<Button ToolTip="{Binding ChangeParam_ToolTip}"
Style="{StaticResource ToolBar_Button}"
Command="{Binding ChangeParameter_Command}"
Visibility="{Binding ChangeParam_Visibility}"
IsEnabled="{Binding InstrumentPanel_IsEnabled}">
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/InstrumentPanel/ChangeParam.png" Stretch="Uniform"/>
</Button>
<Button ToolTip="{Binding ChangeMaterial_ToolTip}"
Style="{StaticResource ToolBar_Button}"
<Button Content="MAT"
ToolTip="{Binding ChangeMaterial_ToolTip}"
Command="{Binding ChangeMaterial_Command}"
Visibility="{Binding ChangeMaterial_Visibility}"
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
Content="MAT">
</Button>
FontSize="12"
Style="{StaticResource ToolBarViewPanel_Button}"/>
<ToggleButton ToolTip="{Binding Statistics_Msg}"
Style="{StaticResource ToolBar_ToggleButton}"
Visibility="{Binding Statistic_Visibility}"
IsChecked="{Binding Statistics_IsChecked}"
IsEnabled="{Binding Statistics_IsEnabled}">
<Image Source="/Resources/InstrumentPanel/Statistics.png" Stretch="Uniform"/>
</ToggleButton>
</EgtFloating:EgtFloatingPanel>
</StackPanel>
@@ -105,12 +105,7 @@ Public Class MyInstrumentPanelVM
If ChangeParameterWndVM.SelParam.BTLParamM.nType = BTLParamType.CHECKBOX AndAlso Feature.bDO = ChangeParameterWndVM.SelParam.bActualValue Then
Feature.bDO = ChangeParameterWndVM.SelParam.bNewValue
Else
Dim ParamList As ObservableCollection(Of BTLParamVM)
If ChangeParameterWndVM.SelParam.BTLParamM.bIsP Then
ParamList = Feature.PBTLParamVMList
Else
ParamList = Feature.QBTLParamVMList
End If
Dim ParamList As ObservableCollection(Of BTLParamVM) = Feature.PBTLParamVMList
For Each Param In ParamList.Where(Function(x) x.sName = ChangeParameterWndVM.SelParam.sName)
Select Case Param.nType
Case BTLParamType.DOUBLE_, BTLParamType.LENGTH
@@ -1,29 +0,0 @@
<StackPanel x:Class="OnlyProdInstrumentPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
Style="{StaticResource OnlyProdBTLPartManager_StackPanel}">
<ToggleButton ToolTip="{Binding GetDistToolTip}"
IsChecked="{Binding GetDistIsChecked}"
Style="{StaticResource ToolBarOnlyProdPage_ToggleButton}">
<Image Source="/Resources/InstrumentPanel/GetDist.png" Stretch="Uniform"/>
</ToggleButton>
<Button ToolTip="{Binding ChangeParam_ToolTip}"
Command="{Binding ChangeParameter_Command}"
Visibility="{Binding ChangeParam_Visibility}"
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/InstrumentPanel/ChangeParam.png" Stretch="Uniform"/>
</Button>
<Button Content="MAT"
ToolTip="{Binding ChangeMaterial_ToolTip}"
Command="{Binding ChangeMaterial_Command}"
Visibility="{Binding ChangeMaterial_Visibility}"
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
FontSize="12"
Style="{StaticResource ToolBarViewPanel_Button}"/>
</StackPanel>
@@ -1,3 +0,0 @@
Public Class OnlyProdInstrumentPanelV
End Class
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer">
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
<UniformGrid Margin="5"
Columns="6" Rows="7">
@@ -10,97 +10,97 @@
<TextBlock Text="{Binding PROJNUM_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sPROJNUM, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROJNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sPROJNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROJPART_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sPROJPART, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding PROJGUID_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sPROJGUID, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding LISTNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sLISTNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding CUSTOMER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sCUSTOMER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding ARCHITECT_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sARCHITECT, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EDITOR_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sEDITOR, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding DELIVDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sDELIVDATE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPDATE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sEXPDATE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPTIME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sEXPTIME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPRELEASE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sEXPRELEASE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding LANGUAGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sLANGUAGE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding RANGE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}},
<ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.ocRANGE,
Mode=OneWay}"
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}},
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.SelRANGE,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Grid.Column="1"
Style="{StaticResource PartParam_ComboBox}"/>
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}},
<ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.ocPROCESSINGQUALITY,
Mode=OneWay}"
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}},
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.SelPROCESSINGQUALITY,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Grid.Column="1"
@@ -108,33 +108,33 @@
<TextBlock Text="{Binding COMPUTERNAME_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sCOMPUTERNAME, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding USER_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sUSER, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding SRCFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sSRCFILE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding EXPFILE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sEXPFILE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
<TextBlock Text="{Binding RECESS_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}},
<ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.ocRECESS,
Mode=OneWay}"
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}},
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}},
Path=Tag.SelRECESS,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Grid.Column="1"
@@ -142,7 +142,7 @@
<TextBlock Text="{Binding USERATTRIBUTE_MSG}"
Style="{StaticResource PartParam_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.sUSERATTRIBUTE, UpdateSourceTrigger=Explicit,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLDataV}}}"
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataV}}}"
Grid.Column="1"
Style="{StaticResource PartParam_TextBox}"/>
@@ -1,44 +1,97 @@
<UserControl x:Class="BTLPartListV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
<UserControl.Resources>
<EgtBEAMWALL:DataGridCellBorderThicknessConverter x:Key="DataGridCellBorderThicknessConverter"/>
<OPTIMIZER:DataGridCellBorderThicknessConverter x:Key="DataGridCellBorderThicknessConverter"/>
<OPTIMIZER:ProjIdToBtlFileName x:Key="ProjIdToBtlFileName"/>
<OPTIMIZER:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<OPTIMIZER:FractionHeightConverter x:Key="FractionHeightConverter"/>
<OPTIMIZER:ExpanderWidthConverter x:Key="ExpanderWidthConverter"/>
<sys:Double x:Key="FeatureWrapPanelHeight">0.6</sys:Double>
</UserControl.Resources>
<EgtBEAMWALLCORE:EgtDataGrid x:Name="BTLPart_DataGrid"
ItemsSource="{Binding Tag.BTLPartVMList,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"
CanUserAddRows="False"
AutoGenerateColumns="False"
CanUserResizeRows="False"
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.BTLPartVMList,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
SelectionMode="Extended"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
PreviewMouseDown="DataGrid_PreviewMouseDown"
PreviewMouseUp="DataGrid_PreviewMouseUp"
PreviewMouseMove="DataGrid_PreviewMouseMove"
Margin="0,0,0,5"
ColumnHeaderBackground="{x:Null}"
EgtBEAMWALL:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding Tag.SelBTLParts,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"
BindingColumns="{Binding PartColumns}"
OPTIMIZER:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding Tag.SelBTLParts,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
ColumnLayouts="{Binding PartColumns}"
IsEnabled="{Binding PartList_IsEnabled}"
Style="{StaticResource DataGrid_CustomHighLight}">
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
AreRowDetailsFrozen="True"
EnableRowVirtualization="True"
EnableColumnVirtualization="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
VirtualizingPanel.ScrollUnit="Pixel"
RenderOptions.CachingHint="Cache"
VirtualizingPanel.CacheLength="10"
VirtualizingPanel.CacheLengthUnit="Pixel"
RowBackground="{StaticResource BeamWall_BLackSqueeze}"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource DataGrid_OnlyProd}">
<DataGrid.InputBindings>
<KeyBinding Key="Delete" Command="{Binding Tag.DeletePart_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}" />
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}" />
</DataGrid.InputBindings>
<DataGrid.GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Margin" Value="0,0,0,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander IsExpanded="True" HorizontalAlignment="Left"
Width="{Binding ActualWidth, Converter={StaticResource ExpanderWidthConverter}, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgwDataGrid}}}">
<Expander.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=Name}"
Margin="0,0,5,0" FontSize="14"/>
<TextBlock Text="{Binding Path=Name, Converter={StaticResource ProjIdToBtlFileName}}"
Margin="0,0,5,0" FontSize="14"/>
<Button Command="{Binding Tag.Data_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Path=Name}"
ToolTip="{Binding Tag.Data_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Height="20" Width="20" Margin="5,0,0,0"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/InstrumentPanel/Analyze.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Tag.AddPart_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Path=Name}"
ToolTip="{Binding Tag.AddPart_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Height="20" Width="20" Margin="5,0,0,0"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Tag.UpdateBTL_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Path=Name}"
ToolTip="{Binding Tag.UpdateBTL_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Height="20" Width="20" Margin="5,0,0,0"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/ProjectManager/UpdateBTL.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</Expander.Header>
<Expander.Content>
<ItemsPresenter />
</Expander.Content>
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</DataGrid.GroupStyle>
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="Black" />
</Style.Resources>
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
<Setter Property="BorderBrush" Value="{Binding Search_Background}"/>
<Setter Property="BorderThickness">
<Setter.Value>
@@ -48,60 +101,45 @@
</MultiBinding>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="BorderBrush" Value="Cyan" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="Blue" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="DetailsVisibility" Value="{Binding bOpenFeatureList, Converter={StaticResource BooleanToVisibilityConverter}}"/>
<EventSetter Event="PreviewMouseDown" Handler="PartList_PreviewMouseDown"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsRowEnabled}" Value="False">
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Resources>
<!--PDN - Nome-->
<DataGridTextColumn x:Key="colPDN"
Binding="{Binding nPDN}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--Validità pezzo-->
<DataGridTemplateColumn x:Key="colCALC" CanUserResize="False"
SortMemberPath="nGlobalState">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid Margin="2,0,0,0">
<Grid Style="{StaticResource GlobalState_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="25"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<TextBlock Text="↓"
Foreground="Blue"
TextAlignment="Center"
FontWeight="Bold"
FontSize="18"
Margin="-1,-6,1,-3"
Visibility="{Binding CALC_FALL_Visibility}"/>
Visibility="{Binding CALC_FALL_Visibility}"
Style="{StaticResource OnlyProdRawPartList_TextBlock}"/>
<Border Grid.Column="1"
BorderBrush="{Binding Calc_BorderBrush}"
BorderThickness="2"
Padding="1">
<ItemsControl ItemsSource="{Binding BTLFeatureVMList_View}"
Margin="0"
Padding="0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="6" Rows="5"
Margin="0"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Background="{Binding Calc_Background}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
Background="{Binding Calc_BorderBrush}">
</Border>
<Grid Grid.Column="2"
HorizontalAlignment="Center">
@@ -112,82 +150,90 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Ellipse Width="5"
Height="5"
Fill="Red"
Visibility="{Binding CALC_ROT_Visibility}"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Margin="2,1,-2,0"/>
<Ellipse Visibility="{Binding CALC_ROT_Visibility}"
Style="{StaticResource CALC_ROT_Ellipse}"/>
<TextBlock Grid.Row="1"
Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
TextAlignment="Center"
FontWeight="Bold"
FontSize="12"
Margin="2,-6,-2,-3"/>
Style="{StaticResource CALC_ERR_TextBlock}"/>
</Grid>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--DO - Abilitazione-->
<DataGridTemplateColumn x:Key="colDO">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"
HorizontalAlignment="Center"/>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
VerticalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center"
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--W - Larghezza-->
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}" SortMemberPath="dW">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--H - Altezza-->
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}" SortMemberPath="dH">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--L - Lunghezza-->
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}" SortMemberPath="dL">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--NAM - Descrizione-->
<DataGridTextColumn x:Key="colNAM" Binding="{Binding sNAM}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--MAT - Materiale-->
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--CNT - Richiesti da BTL-->
<DataGridTextColumn x:Key="colCNT" Binding="{Binding sCNT}" SortMemberPath="nCNT">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.ShortCNT_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"
ToolTip="{Binding Path=DataContext.CNT_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="QTY"
ToolTip="{Binding DataContext.CNT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--ADDED - Aggiunti-->
<DataGridTextColumn x:Key="colADDED" Binding="{Binding sADDED}" SortMemberPath="nADDED">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.ShortADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"
ToolTip="{Binding Path=DataContext.ADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.ShortADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
ToolTip="{Binding DataContext.ADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="Blue" />
@@ -196,40 +242,265 @@
</DataGridTextColumn>
<!--INPROD - IN OTTIMIZZAZIONE-->
<DataGridTextColumn x:Key="colINPROD" Binding="{Binding nINPROD}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.ShortINPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"
ToolTip="{Binding Path=DataContext.INPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.ShortINPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
ToolTip="{Binding DataContext.INPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--DONE - PRODOTTI-->
<DataGridTextColumn x:Key="colDONE" Binding="{Binding nDONE}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.ShortDONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"
ToolTip="{Binding Path=DataContext.DONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.ShortDONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
ToolTip="{Binding DataContext.DONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--GRP - Gruppo-->
<DataGridTextColumn x:Key="colGROUP" Binding="{Binding sGROUP}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.GRP_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.GRP_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--STOREY - Sottogruppo-->
<DataGridTextColumn x:Key="colSTOREY" Binding="{Binding sSTOREY}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.STOREY_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:BTLPartListV}}}"/>
</DataGridTextColumn.Header>
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.STOREY_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--ROT - Rotazione-->
<DataGridTemplateColumn x:Key="colROT" SortMemberPath="dROT">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/RotateIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sROTATED}"
TextAlignment="Center"
Margin="2,0,2,0"/>
<Button Grid.Column="1"
Command="{Binding ForwardRotation_Command}"
ToolTip="{Binding ForwardRotation_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/NewPage/Rotate.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--INV - Inversione-->
<DataGridTemplateColumn x:Key="colFLIP">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/InversionIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsInverted, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--VER - Verifica-->
<DataGridTemplateColumn x:Key="colVERIFY">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/VerifyIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button ToolTip="{Binding Verify_ToolTip}"
Command="{Binding Verify_Command}"
IsEnabled="{Binding Verify_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/CALCPanel/Verify.png" Stretch="Uniform"/>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--ADD - Aggiungi al grezzo-->
<DataGridTemplateColumn x:Key="colADD">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/AddToRawPartIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Command="{Binding AddToRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding AddToRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/LeftPanel/AddToRawPart.png" Stretch="Uniform"/>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--SET - Opzioni-->
<DataGridTemplateColumn x:Key="colSETTING">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/SettingIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<Button Command="{Binding ShowPopUpSettingBtnCommand}"
ToolTip="{Binding Settings_Command_ToolTip}"
Style="{StaticResource BTLPanel_Button}"
Click="OpenPopUp_Click">
<Image Source="/Resources/NewPage/Setting.png" Stretch="Uniform"/>
</Button>
<Popup AllowsTransparency="True"
PopupAnimation="None"
Placement="Right"
StaysOpen="False">
<Popup.VerticalOffset>
<MultiBinding Converter="{StaticResource DataGridCellBorderThicknessConverter}">
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}"/>
<Binding Path="ActualWidth" ElementName="SettingsBtn"/>
</MultiBinding>
</Popup.VerticalOffset>
<OPTIMIZER:BTLPartManagerV/>
</Popup>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Resources>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource StaticRowDataGrid_CustomHighLight}">
<Setter Property="Background" Value="{Binding Background}"/>
<Setter Property="Foreground" Value="{Binding Foreground}"/>
<Setter Property="FontWeight" Value="{Binding FontWeight}"/>
<EventSetter Event="PreviewMouseDown" Handler="PartList_PreviewMouseDown"/>
<EventSetter Event="PreviewMouseUp" Handler="PartList_PreviewMouseUp"/>
</Style>
</DataGrid.RowStyle>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<OPTIMIZER:FeatureListManagerV/>
<ListBox Grid.Column="1"
ItemsSource="{Binding BTLFeatureVMList}"
SelectedItem="{Binding SelBTLFeatureVM, UpdateSourceTrigger=PropertyChanged}"
PreviewMouseWheel="ListBox_PreviewMouseWheel"
Grid.IsSharedSizeScope="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Style="{StaticResource BTL_ListBox}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical"
MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgwDataGrid}},
Converter={StaticResource FractionHeightConverter},
ConverterParameter={StaticResource FeatureWrapPanelHeight}}"
MinHeight="{Binding Parent.Children[0].ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,50,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="Feature_Grp"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="Feature_Prc"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="Feature_Name"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding nPRID}"
Style="{StaticResource OnlyProd_TextBlock}"/>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
Background="{Binding Calc_Background}"/>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Ellipse Visibility="{Binding CALC_ROT_Visibility}"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_Ellipse}"/>
<TextBlock Grid.Row="1"
Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_TextBlock}"/>
</Grid>
</Grid>
<CheckBox Grid.Column="2"
IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="0,0,5,0"/>
<TextBlock Grid.Column="3"
Text="["
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="4"
Text="{Binding nSelGRP}"
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="5"
Text="-"
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="6"
Text="{Binding nPRC, StringFormat={}{0:000}}"
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="7"
Text="] "
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="8"
Text="{Binding sName}" FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource OnlyProd_TextBlock}"/>
<Button Grid.Column="9"
Command="{Binding EditFeature_Command}"
Click="SelectButton_Click"
Style="{StaticResource EditFeature_Button}">
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,2,0,0"
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}">
<TextBlock Text="STATUS:" Foreground="{StaticResource BeamWall_Corduroy}" HorizontalAlignment="Left" Margin="0,0,10,0"/>
<TextBlock Text="{Binding Tag.SelBTLPart.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
HorizontalAlignment="Left" Foreground="{StaticResource BeamWall_Corduroy}"
Visibility="{Binding Tag.SelBTLPart.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"/>
<TextBlock Text="{Binding Tag.SelBTLPart.SelBTLFeatureVM.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
HorizontalAlignment="Left" Foreground="{StaticResource BeamWall_Corduroy}" />
</StackPanel>
</Grid>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</EgwWPFBaseLib:EgwDataGrid>
</EgtBEAMWALLCORE:EgtDataGrid>
</UserControl>
@@ -1,202 +1,120 @@
Imports System.Reflection
Imports EgtBEAMWALL.Core.ConstGen
Imports System.Windows.Controls.Primitives
Public Class BTLPartListV
Private m_BTLPartListVM As BTLPartListVM
Private m_SelectBtn As MouseButton = MouseButton.Left
Private m_HighlightBtn As MouseButton = MouseButton.Right
Private m_NameDataGridType As Type
Private s_isDraggingSelectionField As FieldInfo
Private s_endDraggingMethod As MethodInfo
Private m_DataGridType As Type = GetType(DataGrid)
Private m_isDraggingSelectionField As FieldInfo
Private m_endDraggingMethod As MethodInfo
Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
m_BTLPartListVM = DataContext
m_NameDataGridType = BTLPart_DataGrid.GetType()
s_isDraggingSelectionField = m_NameDataGridType.GetField("_isDraggingSelection", BindingFlags.Instance Or BindingFlags.NonPublic)
s_endDraggingMethod = m_NameDataGridType.GetMethod("EndDragging", BindingFlags.Instance Or BindingFlags.NonPublic)
SetSelButton(MouseButton.Right)
' Evita il drag sulla selezione multipla
m_isDraggingSelectionField = m_DataGridType.GetField("_isDraggingSelection", BindingFlags.Instance Or BindingFlags.NonPublic)
m_endDraggingMethod = m_DataGridType.GetMethod("EndDragging", BindingFlags.Instance Or BindingFlags.NonPublic)
End Sub
Public Sub SetSelButton(SelButton As MouseButton)
Select Case SelButton
Case MouseButton.Right
m_SelectBtn = MouseButton.Right
m_HighlightBtn = MouseButton.Left
Case Else ' MouseButton.Left
m_SelectBtn = MouseButton.Left
m_HighlightBtn = MouseButton.Right
End Select
End Sub
Public Sub DataGrid_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If e.ChangedButton = MouseButton.Left Then
If e.ChangedButton = m_SelectBtn Then
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift OrElse (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
e.Handled = True
Else
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.SELECT_)
End If
ElseIf e.ChangedButton = m_HighlightBtn AndAlso (Map.refProjectVM.BTLStructureVM.SelectionType = BTLStructureVM.SelectionTypes.SELECT_ AndAlso
((Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift OrElse (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control)) Then
e.Handled = True
ElseIf e.ChangedButton = m_HighlightBtn Then
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.HIGHLIGHT)
'Map.refProjectVM.SelProdProj = ProdProj.NULL
'If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProdProjManagerVM.SelProdProj = ProdProj.NULL
End If
' imposto tipo di grid selezionata
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.PARTLIST)
End If
'If e.ChangedButton = Input.MouseButton.Left Then
' If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift OrElse (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
' e.Handled = True
' Else
' m_MainWindowVM.SetMouseButton("Left")
' End If
'ElseIf e.ChangedButton = Input.MouseButton.Right Then
' m_MainWindowVM.SetMouseButton("Right")
'End If
End Sub
Public Sub DataGrid_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs)
If e.ChangedButton = MouseButton.Right Then
If e.ChangedButton = m_SelectBtn Then
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift OrElse (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
e.Handled = True
Else
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.SELECT_)
End If
ElseIf e.ChangedButton = m_HighlightBtn Then
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.HIGHLIGHT)
End If
'Else
'If e.ChangedButton = m_HighlightBtn Then
' Dim cell As DataGridCell = sender
' If (Not IsNothing(cell) And Not cell.IsEditing) Then
' Dim row As DataGridRow = FindVisualParent(Of DataGridRow)(cell)
' If Not IsNothing(row) Then
' row.IsSelected = Not row.IsSelected
' e.Handled = True
' End If
' End If
' m_MainWindowVM.SetMouseButton("Highlight")
'End If
' imposto tipo di grid selezionata
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.PART)
End If
End Sub
Public Shared Function FindVisualParent(Of T As DependencyObject)(ByVal child As DependencyObject) As T
Dim parentObject As DependencyObject = VisualTreeHelper.GetParent(child)
If parentObject Is Nothing Then Return Nothing
Dim parent As T = TryCast(parentObject, T)
If parent IsNot Nothing Then
Return parent
Else
Return FindVisualParent(Of T)(parentObject)
End If
End Function
Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs)
If m_SelectBtn = MouseButton.Left AndAlso e.LeftButton = MouseButtonState.Pressed Then
If CBool(If(s_isDraggingSelectionField?.GetValue(BTLPart_DataGrid), False)) Then s_endDraggingMethod.Invoke(BTLPart_DataGrid, New Object(-1) {})
' Evita il drag sulla selezione multipla
If e.LeftButton = MouseButtonState.Pressed Then
If CBool(If(m_isDraggingSelectionField?.GetValue(sender), False)) Then m_endDraggingMethod.Invoke(sender, New Object(-1) {})
End If
End Sub
Private Sub PartList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
If Not Row.IsSelected Then Return
Select Case e.ChangedButton
Case MouseButton.Left
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift OrElse (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
Return
Else
BTLPart_DataGrid.SelectedItem = Nothing
BTLPart_DataGrid.SelectedItem = Row.DataContext
End If
Case MouseButton.Right
End Select
'If Keyboard.Modifiers = ModifierKeys.Control AndAlso Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Map.refProjectVM.BTLStructureVM.BTLPartVMList.LongCount(Function(x) x.IsSelected) = 1 Then
' e.Handled = True
' Return
'ElseIf Not Keyboard.Modifiers = ModifierKeys.Control AndAlso Not Keyboard.Modifiers = ModifierKeys.Shift AndAlso Not IsNothing(Row) Then
' For Each BTLPart In Map.refProjectVM.BTLStructureVM.BTLPartVMList
' If Not BTLPart Is Row.DataContext AndAlso BTLPart.IsSelected = True Then
' BTLPart.SetIsSelected(False)
' End If
' Next
'End If
'If Not Keyboard.Modifiers = ModifierKeys.Control AndAlso Not IsNothing(Row) AndAlso Row.IsSelected Then
' Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.SelBTLPart)
'End If
If e.ChangedButton = MouseButton.Left Then
If TypeOf sender Is DataGridRow Then
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count <> 1 Then Return
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
If TypeOf Row.DataContext IsNot BTLPartVM Then Return
Dim BTLPartVM As BTLPartVM = DirectCast(Row.DataContext, BTLPartVM)
Dim DataGridDetailsPresenter As Object = TreeHelperManager.FindVisualParents(Of Button, CheckBox, Primitives.DataGridDetailsPresenter)(e.OriginalSource)
If Not IsNothing(DataGridDetailsPresenter) Then Return
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Contains(BTLPartVM) Then
BTLPartVM.SetOpenFeatureList(Not BTLPartVM.bOpenFeatureList)
End If
If Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.BTLStructureVM.SelBTLPart.Equals(BTLPartVM) Then
Map.refProjectVM.BTLStructureVM.SelectBTLPart(BTLPartVM, True)
End If
End If
End If
'If TypeOf sender Is DataGridRow Then
' Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
' If Keyboard.Modifiers = ModifierKeys.Control AndAlso Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Map.refProjectVM.BTLStructureVM.BTLPartVMList.LongCount(Function(x) x.IsSelected) = 1 Then
' e.Handled = True
' Return
' ElseIf Not Keyboard.Modifiers = ModifierKeys.Control AndAlso Not Keyboard.Modifiers = ModifierKeys.Shift AndAlso Not IsNothing(Row) Then
' For Each BTLPart In Map.refProjectVM.BTLStructureVM.BTLPartVMList
' If Not BTLPart Is Row.DataContext AndAlso BTLPart.IsSelected = True Then
' BTLPart.SetIsSelected(False)
' End If
' Next
' End If
' If Not Keyboard.Modifiers = ModifierKeys.Control AndAlso Not IsNothing(Row) AndAlso Row.IsSelected Then
' Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.SelBTLPart)
' End If
'End If
End Sub
Private Sub PartList_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs)
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
If Not Row.IsSelected Then Return
Select Case e.ChangedButton
Case MouseButton.Right
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift OrElse (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
Row.IsSelected = Not Row.IsSelected
Else
BTLPart_DataGrid.SelectedItem = Nothing
BTLPart_DataGrid.SelectedItem = Row.DataContext
' metto focus su cella selezionata per evitare errori di focus del sistema normale
Dim dep As DependencyObject = CType(e.OriginalSource, DependencyObject)
While (dep IsNot Nothing) AndAlso Not (TypeOf dep Is DataGridCell)
dep = VisualTreeHelper.GetParent(dep)
End While
If dep Is Nothing Then Return
If TypeOf dep Is DataGridCell Then
Dim cell As DataGridCell = TryCast(dep, DataGridCell)
cell.Focus()
End If
End If
End Select
'If Keyboard.Modifiers = ModifierKeys.Control AndAlso Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Map.refProjectVM.BTLStructureVM.BTLPartVMList.LongCount(Function(x) x.IsSelected) = 1 Then
' e.Handled = True
' Return
'ElseIf Not Keyboard.Modifiers = ModifierKeys.Control AndAlso Not Keyboard.Modifiers = ModifierKeys.Shift AndAlso Not IsNothing(Row) Then
' For Each BTLPart In Map.refProjectVM.BTLStructureVM.BTLPartVMList
' If Not BTLPart Is Row.DataContext AndAlso BTLPart.IsSelected = True Then
' BTLPart.SetIsSelected(False)
' End If
' Next
'End If
'If Not Keyboard.Modifiers = ModifierKeys.Control AndAlso Not IsNothing(Row) AndAlso Row.IsSelected Then
' Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.SelBTLPart)
'End If
Private Sub ListBox_PreviewMouseWheel(ByVal sender As Object, ByVal e As MouseWheelEventArgs)
' gestione dello scroll, per permetterlo anche quando mouse su RowDetails
e.Handled = True
Dim DependencyParent As DependencyObject = sender
While TypeOf DependencyParent IsNot ListBox
DependencyParent = VisualTreeHelper.GetParent(DependencyParent)
End While
If IsNothing(DependencyParent) Then
Return
End If
Dim parent As ListBox = TryCast(DependencyParent, ListBox)
If IsNothing(parent) Then
Return
End If
parent?.[RaiseEvent](New MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta) With {
.RoutedEvent = MouseWheelEvent,
.Source = sender})
End Sub
Private Sub OpenPopUp_Click(sender As Object, e As RoutedEventArgs)
Dim btn As Button = DirectCast(sender, Button) ' Ottieni il bottone che ha generato l'evento
Dim parent As DependencyObject = btn
' Cerca il Popup nel Visual Tree
While Not IsNothing(parent) AndAlso TypeOf parent IsNot DataGridRow
parent = VisualTreeHelper.GetParent(parent)
End While
If Not IsNothing(parent) Then
Dim row As DataGridRow = DirectCast(parent, DataGridRow)
Dim popup As Popup = TryCast(TreeHelperManager.FindVisualChild(Of Popup)(row), Popup)
If Not IsNothing(popup) Then
popup.PlacementTarget = btn ' Associa il popup al bottone
popup.IsOpen = True ' Mostra il popup
End If
End If
End Sub
Private Sub SelectButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim button = TryCast(sender, Button)
Dim listBoxItem = FindAncestor(Of ListBoxItem)(button)
If Not IsNothing(listBoxItem) Then
listBoxItem.IsSelected = True
End If
End Sub
Private Function FindAncestor(Of T As DependencyObject)(ByVal current As DependencyObject) As T
While Not IsNothing(current)
If TypeOf current Is T Then
Return CType(current, T)
End If
current = VisualTreeHelper.GetParent(current)
End While
Return Nothing
End Function
End Class
Public Class SettingsBtnVerticalOffsetMultiConverter
Implements IMultiValueConverter
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IMultiValueConverter.Convert
Dim x = 3
Return 10
End Function
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As Globalization.CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
@@ -1,5 +1,6 @@
Imports System.Collections.ObjectModel
Imports System.Globalization
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
@@ -9,19 +10,19 @@ Public Class BTLPartListVM
#Region "FIELDS & PROPERTIES"
Private m_colPart_Do As EgtDataGridColumn
Public ReadOnly Property colPart_Do As EgtDataGridColumn
Private m_colPart_Do As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colPart_Do As EgwWPFBaseLib.ColumnLayout
Get
Return m_colPart_Do
End Get
End Property
Private m_PartColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property PartColumns As ObservableCollection(Of EgtDataGridColumn)
Private m_PartColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Public Property PartColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Get
Return m_PartColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout))
m_PartColumns = value
End Set
End Property
@@ -194,10 +195,33 @@ Public Class BTLPartListVM
Sub New()
' creo riferimento in Map
Map.SetRefPartListVM(Me)
'Dim NewColumnList As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)({New EgwWPFBaseLib.ColumnLayout("colPDN", DataGridLengthUnitType.Auto, 1, True, Nothing, False, False, True, True, False, False),
' New EgwWPFBaseLib.ColumnLayout("colCALC", DataGridLengthUnitType.Auto, 1, True, Nothing, False, False, True, True, False, False),
' New EgwWPFBaseLib.ColumnLayout("colDO", DataGridLengthUnitType.Auto, 1, True, Nothing, False, False, True, True, False, False),
' New EgwWPFBaseLib.ColumnLayout("colW", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, False, True),
' New EgwWPFBaseLib.ColumnLayout("colH", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, False, True),
' New EgwWPFBaseLib.ColumnLayout("colL", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, False, True),
' New EgwWPFBaseLib.ColumnLayout("colNAM", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colMATERIAL", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, False, True),
' New EgwWPFBaseLib.ColumnLayout("colCNT", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colADDED", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colINPROD", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colDONE", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colGROUP", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colSTOREY", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colROT", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colFLIP", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colVERIFY", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colADD", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colSETTING", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True)})
'EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_PARTLIST, NewColumnList)
' carico le colonne della datagrid
GetPrivateProfileColumns(S_PARTLIST, PartColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_PARTLIST, PartColumns)
' GetPrivateProfileColumns(S_PARTLIST, PartColumns)
' recupero riferimento a colonna Do
m_colPart_Do = PartColumns.FirstOrDefault(Function(x) x.Name = COL_DO)
m_colPart_Do = PartColumns.FirstOrDefault(Function(x) x.Key = COL_DO)
End Sub
Friend Sub SetBTLPartListIsEnabled(bIsEnabled As Boolean)
@@ -213,7 +237,7 @@ Class DataGridCellBorderThicknessConverter
Implements IMultiValueConverter
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
Dim ColumnList As ObservableCollection(Of EgtDataGridColumn) = Map.refPartListVM.PartColumns
Dim ColumnList As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout) = Map.refPartListVM.PartColumns
Dim ColumnIndex As Integer = CInt(values(0))
Dim bLeft As Boolean = False
Dim bRight As Boolean = False
@@ -285,7 +309,6 @@ Class FractionHeightConverter
End Class
Class ExpanderWidthConverter
Implements IValueConverter
@@ -1,85 +0,0 @@
Imports System.Collections.ObjectModel
Imports EgtBEAMWALL.Core
Imports EgtUILib
Public Class DuploQParameterListVM
#Region "FIELDS & PROPERTIES"
Private m_colQParam_Value As EgtDataGridColumn
Public ReadOnly Property colQParam_Value As EgtDataGridColumn
Get
Return m_colQParam_Value
End Get
End Property
Private m_colQParam_Custom As EgtDataGridColumn
Public ReadOnly Property colQParam_Custom As EgtDataGridColumn
Get
Return m_colQParam_Custom
End Get
End Property
Private m_QParameterListColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property QParameterListColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_QParameterListColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_QParameterListColumns = value
End Set
End Property
#Region "Messages"
Public ReadOnly Property Custom_Msg As String
Get
Return EgtMsg(61801)
End Get
End Property
Public ReadOnly Property NAM_Msg As String
Get
Return EgtMsg(61808)
End Get
End Property
Public ReadOnly Property Description_Msg As String
Get
Return EgtMsg(61603)
End Get
End Property
Public ReadOnly Property Value_Msg As String
Get
Return EgtMsg(61615)
End Get
End Property
Public ReadOnly Property Min_Msg As String
Get
Return EgtMsg(61616)
End Get
End Property
Public ReadOnly Property Max_Msg As String
Get
Return EgtMsg(61617)
End Get
End Property
#End Region ' Messages
#End Region ' FIELDS & PROPERTIES
#Region "CONSTRUCTOR"
Sub New()
' carico le colonne della datagrid
GetPrivateProfileColumns(S_DUPLOPARAMETERLIST_Q, QParameterListColumns)
' recupero riferimento a colonna Value e Custom
m_colQParam_Value = QParameterListColumns.FirstOrDefault(Function(x) x.Name = COL_VALUE)
End Sub
#End Region ' CONSTRUCTOR
End Class
@@ -1,41 +1,39 @@
<UserControl x:Class="FeatureInPartInRawPartListV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
<EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding Tag.FeatureVMList,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"
SelectedItem="{Binding Tag.SelFeatureVM,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"
CanUserAddRows="False"
AutoGenerateColumns="False"
CanUserResizeRows="False"
SelectionMode="Single"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
Margin="0,0,0,5"
ColumnHeaderBackground="{x:Null}"
BindingColumns="{Binding FeatureInPartInRawPartColumns}"
BeginningEdit="FeatureInPartInRawPartList_BeginningEdit"
Style="{StaticResource DataGrid_CustomHighLight}">
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.FeatureVMList,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
SelectedItem="{Binding Tag.SelFeatureVM,
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
SelectionMode="Single"
Margin="0,0,0,5"
ColumnLayouts="{Binding FeatureInPartInRawPartColumns}"
BeginningEdit="FeatureInPartInRawPartList_BeginningEdit"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
Style="{StaticResource DataGrid_OnlyProd}">
<DataGrid.InputBindings>
<KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"/>
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"/>
</DataGrid.InputBindings>
<DataGrid.Resources>
<DataGridTemplateColumn x:Key="colDO">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"
HorizontalAlignment="Center"/>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Center"/>
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@@ -56,18 +54,12 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Ellipse Width="5"
Height="5"
Fill="Red"
Visibility="{Binding CALC_ROT_Visibility}"
HorizontalAlignment="Center"/>
<Ellipse Visibility="{Binding CALC_ROT_Visibility}"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_Ellipse}"/>
<TextBlock Grid.Row="1"
Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
TextAlignment="Center"
FontWeight="Bold"
FontSize="12"
Margin="0,-6,0,-2"/>
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_TextBlock}"/>
</Grid>
</Grid>
</DataTemplate>
@@ -89,7 +81,26 @@
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--STR - Strategia-->
<DataGridTemplateColumn x:Key="colSTRATEGY">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="Strategia"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button ToolTip="{Binding Strategy_ToolTip}"
Command="{Binding Strategy_Command}"
Height="15" Width="15" Margin="0"
Style="{StaticResource ToolBarViewPanel_Button}">
<Image Source="/Resources/CALCPanel/Verify.png" Stretch="Uniform"/>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Resources>
</EgtBEAMWALLCORE:EgtDataGrid>
</EgwWPFBaseLib:EgwDataGrid>
</UserControl>
@@ -13,4 +13,13 @@ Public Class FeatureInPartInRawPartListV
End If
End Sub
Private Sub FeatureList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
If Not IsNothing(Row) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM
End If
End If
End Sub
End Class
@@ -2,32 +2,33 @@
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Imports System.IO
Public Class FeatureInPartInRawPartListVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private m_colFeatureInPartInRawPart_Do As EgtDataGridColumn
Public ReadOnly Property colFeatureInPartInRawPart_Do As EgtDataGridColumn
Private m_colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
Get
Return m_colFeatureInPartInRawPart_Do
End Get
End Property
Private m_colFeatureInPartInRawPart_Priority As EgtDataGridColumn
Public ReadOnly Property colFeatureInPartInRawPart_Priority As EgtDataGridColumn
Private m_colFeatureInPartInRawPart_Priority As EgwWPFBaseLib.ColumnLayout
Public ReadOnly Property colFeatureInPartInRawPart_Priority As EgwWPFBaseLib.ColumnLayout
Get
Return m_colFeatureInPartInRawPart_Priority
End Get
End Property
Private m_FeatureInPartInRawPartColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property FeatureInPartInRawPartColumns As ObservableCollection(Of EgtDataGridColumn)
Private m_FeatureInPartInRawPartColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Public Property FeatureInPartInRawPartColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
Get
Return m_FeatureInPartInRawPartColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout))
m_FeatureInPartInRawPartColumns = value
End Set
End Property
@@ -61,11 +62,22 @@ Public Class FeatureInPartInRawPartListVM
Sub New()
' creo riferimento in Map
Map.SetRefFeatureInPartInRawPartListVM(Me)
'Dim NewColumnList As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)({New EgwWPFBaseLib.ColumnLayout("colDO", DataGridLengthUnitType.Auto, 1, True, Nothing, False, False, True, True, False, False),
' New EgwWPFBaseLib.ColumnLayout("colCALC", DataGridLengthUnitType.Auto, 1, True, Nothing, False, False, True, True, False, False),
' New EgwWPFBaseLib.ColumnLayout("colPRIORITY", DataGridLengthUnitType.Auto, 1, True, Nothing, False, False, True, True, False, False),
' New EgwWPFBaseLib.ColumnLayout("colDESC", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True),
' New EgwWPFBaseLib.ColumnLayout("colSTRATEGY", DataGridLengthUnitType.Pixel, 30, True, Nothing, True, True, True, True, True, True)})
'EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_FEATUREINPARTINRAWPARTLIST, NewColumnList)
' carico le colonne della datagrid
GetPrivateProfileColumns(S_FEATUREINPARTINRAWPARTLIST, FeatureInPartInRawPartColumns)
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(Path.ChangeExtension(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, ".json"), S_FEATUREINPARTINRAWPARTLIST, FeatureInPartInRawPartColumns)
'' carico le colonne della datagrid
'GetPrivateProfileColumns(S_FEATUREINPARTINRAWPARTLIST, FeatureInPartInRawPartColumns)
' recupero riferimento a colonna Do
m_colFeatureInPartInRawPart_Do = FeatureInPartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_DO)
m_colFeatureInPartInRawPart_Priority = FeatureInPartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_PRIORITY)
m_colFeatureInPartInRawPart_Do = FeatureInPartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_DO)
m_colFeatureInPartInRawPart_Priority = FeatureInPartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_PRIORITY)
End Sub
#End Region ' Constructor
@@ -74,7 +86,7 @@ Public Class FeatureInPartInRawPartListVM
Friend Sub UpdateColumns(nProjectType As BWType)
If Not IsNothing(m_colFeatureInPartInRawPart_Priority) Then
m_colFeatureInPartInRawPart_Priority.Visible = (nProjectType = BWType.WALL AndAlso CurrentMachine.bIsEnabledPriority)
m_colFeatureInPartInRawPart_Priority.IsVisible = (nProjectType = BWType.WALL AndAlso CurrentMachine.bIsEnabledPriority)
End If
End Sub
@@ -1,102 +0,0 @@
<UserControl x:Class="FeatureListV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
<EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding Tag.BTLFeatureVMList,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"
SelectedItem="{Binding Tag.SelBTLFeatureVM,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"
CanUserAddRows="False"
AutoGenerateColumns="False"
CanUserResizeRows="False"
SelectionMode="Single"
ScrollViewer.CanContentScroll="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
Margin="0,0,0,5"
ColumnHeaderBackground="{x:Null}"
IsEnabled="{Binding FeatureList_IsEnabled}"
BindingColumns="{Binding FeatureColumns}"
Style="{StaticResource DataGrid_CustomHighLight}">
<DataGrid.Resources>
<DataGridTemplateColumn x:Key="colDO">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Validità feature-->
<DataGridTemplateColumn x:Key="colCALC">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
Background="{Binding Calc_Background}"/>
<Grid Grid.Column="1"
HorizontalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Ellipse Width="5"
Height="5"
Fill="Red"
Visibility="{Binding CALC_ROT_Visibility}"
HorizontalAlignment="Center"/>
<TextBlock Grid.Row="1"
Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
TextAlignment="Center"
FontWeight="Bold"
FontSize="12"
Margin="0,-6,0,-2"/>
</Grid>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--Descrizione-->
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}">
<DataGridTextColumn.Header>
<TextBlock Text="{Binding Path=DataContext.Description_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}"/>
</DataGridTextColumn.Header>
</DataGridTextColumn>
<!-- Menu' tasto destro -->
<ContextMenu x:Key="RowMenu" ItemsSource="{Binding MenuList}" >
<ContextMenu.ItemContainerStyle>
<Style TargetType="MenuItem">
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
<Setter Property="Header" Value="{Binding sMsg}"/>
</Style>
</ContextMenu.ItemContainerStyle>
</ContextMenu>
</DataGrid.Resources>
<DataGrid.InputBindings>
<KeyBinding Key="Delete" Command="{Binding Tag.SelBTLFeatureVM.DeleteFeature_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureListV}}}" />
</DataGrid.InputBindings>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource StaticRowDataGrid_CustomHighLight}">
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}" />
<EventSetter Event="PreviewMouseDown" Handler="FeatureList_PreviewMouseDown"/>
</Style>
</DataGrid.RowStyle>
</EgtBEAMWALLCORE:EgtDataGrid>
</UserControl>
@@ -1,12 +0,0 @@
Public Class FeatureListV
Private Sub FeatureList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If TypeOf sender Is DataGridRow Then
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
If Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM
End If
End If
End Sub
End Class
@@ -1,145 +0,0 @@
Imports System.Collections.ObjectModel
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Public Class FeatureListVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
Private m_colFeature_Do As EgtDataGridColumn
Public ReadOnly Property colFeature_Do As EgtDataGridColumn
Get
Return m_colFeature_Do
End Get
End Property
Private m_FeatureColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property FeatureColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_FeatureColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_FeatureColumns = value
End Set
End Property
Private m_FeatureList_IsEnabled As Boolean = True
Public Property FeatureList_IsEnabled As Boolean
Get
Return m_FeatureList_IsEnabled
End Get
Set(value As Boolean)
m_FeatureList_IsEnabled = value
End Set
End Property
Friend Sub SetBTLFeatureListIsEnabled(bIsEnabled As Boolean)
m_FeatureList_IsEnabled = bIsEnabled
NotifyPropertyChanged(NameOf(FeatureList_IsEnabled))
End Sub
#Region "Messages"
Public ReadOnly Property Description_Msg As String
Get
Return EgtMsg(61603)
End Get
End Property
Public ReadOnly Property DO_Msg As String
Get
Return EgtMsg(61610)
End Get
End Property
Public ReadOnly Property Ok_Msg As String
Get
Return EgtMsg(61761)
End Get
End Property
Public ReadOnly Property Cancel_Msg_Msg As String
Get
Return EgtMsg(61763)
End Get
End Property
#End Region ' Messages
' Definizione Comandi
Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
' creo riferimento in Map
Map.SetRefFeatureListVM(Me)
' carico le colonne della datagrid
GetPrivateProfileColumns(S_FEATURELIST, FeatureColumns)
' recupero riferimento a colonna Do
m_colFeature_Do = FeatureColumns.FirstOrDefault(Function(x) x.Name = COL_DO)
End Sub
#End Region ' Constructor
#Region "COMMANDS"
#Region "Ok_Command"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public Sub Ok()
'Map.refForcedStrategyBTLVM.ForcedStrategy()
Map.refForcedStrategyPanelVM.ForcedStrategy()
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature()
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel
Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(True)
Map.refProjectVM.SetOnlyProdLeftPanel_Opacity(1)
End Sub
#End Region ' Ok_Command
#Region "Cancel_Command"
Public ReadOnly Property Cancel_Command As ICommand
Get
If m_cmdCancel Is Nothing Then
m_cmdCancel = New Command(AddressOf Cancel)
End If
Return m_cmdCancel
End Get
End Property
Public Sub Cancel()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel
Map.refProjectVM.SetOnlyProdLeftPanel_IsEnabled(True)
Map.refProjectVM.SetOnlyProdLeftPanel_Opacity(1)
End Sub
#End Region ' Cancel_Command
#End Region ' Commands
End Class
@@ -1,507 +0,0 @@
<UserControl x:Class="OnlyProdBTLPartListV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.Optimizer"
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
<UserControl.Resources>
<EgtBEAMWALL:DataGridCellBorderThicknessConverter x:Key="DataGridCellBorderThicknessConverter"/>
<EgtBEAMWALL:ProjIdToBtlFileName x:Key="ProjIdToBtlFileName"/>
<EgtBEAMWALL:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<EgtBEAMWALL:FractionHeightConverter x:Key="FractionHeightConverter"/>
<EgtBEAMWALL:ExpanderWidthConverter x:Key="ExpanderWidthConverter"/>
<sys:Double x:Key="FeatureWrapPanelHeight">0.6</sys:Double>
</UserControl.Resources>
<EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding Tag.BTLPartVMList,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"
SelectionMode="Extended"
PreviewMouseMove="DataGrid_PreviewMouseMove"
Margin="0,0,0,5"
EgtBEAMWALL:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding Tag.SelBTLParts,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"
BindingColumns="{Binding PartColumns}"
IsEnabled="{Binding PartList_IsEnabled}"
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
AlternationCount="2"
AreRowDetailsFrozen="True"
EnableRowVirtualization="True"
EnableColumnVirtualization="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
VirtualizingPanel.ScrollUnit="Pixel"
RenderOptions.CachingHint="Cache"
VirtualizingPanel.CacheLength="10"
VirtualizingPanel.CacheLengthUnit="Pixel"
RowBackground="{StaticResource BeamWall_BLackSqueeze}"
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
Style="{StaticResource DataGrid_OnlyProd}">
<DataGrid.InputBindings>
<KeyBinding Key="Delete" Command="{Binding Tag.DeletePart_Command,
RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}" />
</DataGrid.InputBindings>
<DataGrid.GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Margin" Value="0,0,0,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander IsExpanded="True"
HorizontalAlignment="Left"
Width="{Binding ActualWidth, Converter={StaticResource ExpanderWidthConverter}, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:EgtDataGrid}}}">
<Expander.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=Name}"
Margin="0,0,5,0" FontSize="14"/>
<TextBlock Text="{Binding Path=Name, Converter={StaticResource ProjIdToBtlFileName}}"
Margin="0,0,5,0" FontSize="14"/>
<Button Command="{Binding Tag.Data_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Path=Name}"
ToolTip="{Binding Tag.Data_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Height="23.5" Width="25" Margin="5,0,0,0"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/NewPage/adjustment.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Tag.AddPart_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Path=Name}"
ToolTip="{Binding Tag.AddPart_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Height="23.5" Width="25" Margin="5,0,0,0"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/LeftPanel/AddPart.png" Stretch="Uniform"/>
</Button>
<Button Command="{Binding Tag.UpdateBTL_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding Path=Name}"
ToolTip="{Binding Tag.UpdateBTL_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
Height="23.5" Width="25" Margin="5,0,0,0"
Style="{StaticResource OnlyProdLeftPanel_Button}">
<Image Source="/Resources/ProjectManager/UpdateBTL.png" Stretch="Uniform"/>
</Button>
</StackPanel>
</Expander.Header>
<Expander.Content>
<ItemsPresenter />
</Expander.Content>
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</DataGrid.GroupStyle>
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
<Setter Property="BorderBrush" Value="{Binding Search_Background}"/>
<Setter Property="BorderThickness">
<Setter.Value>
<MultiBinding Converter="{StaticResource DataGridCellBorderThicknessConverter}"
ConverterParameter="3">
<Binding Path="Column.DisplayIndex" RelativeSource="{RelativeSource Self}"/>
</MultiBinding>
</Setter.Value>
</Setter>
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="DetailsVisibility" Value="{Binding bOpenFeatureList, Converter={StaticResource BooleanToVisibilityConverter}}"/>
<EventSetter Event="PreviewMouseDown" Handler="PartList_PreviewMouseDown"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsRowEnabled}" Value="False">
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Resources>
<!--PDN - Nome-->
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--Validità pezzo-->
<DataGridTemplateColumn x:Key="colCALC" CanUserResize="False"
SortMemberPath="nGlobalState">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid Style="{StaticResource GlobalState_Grid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<TextBlock Text="↓"
Visibility="{Binding CALC_FALL_Visibility}"
Style="{StaticResource OnlyProdRawPartList_TextBlock}"/>
<Border Grid.Column="1"
Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
Background="{Binding Calc_BorderBrush}">
</Border>
<Grid Grid.Column="2"
HorizontalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Ellipse Visibility="{Binding CALC_ROT_Visibility}"
Style="{StaticResource CALC_ROT_Ellipse}"/>
<TextBlock Grid.Row="1"
Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
Style="{StaticResource CALC_ERR_TextBlock}"/>
</Grid>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--DO - Abilitazione-->
<DataGridTemplateColumn x:Key="colDO">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"
VerticalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center"
HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--W - Larghezza-->
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}" SortMemberPath="dW">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--H - Altezza-->
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}" SortMemberPath="dH">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--L - Lunghezza-->
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}" SortMemberPath="dL">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--NAM - Descrizione-->
<DataGridTextColumn x:Key="colNAM" Binding="{Binding sNAM}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--MAT - Materiale-->
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--CNT - Richiesti da BTL-->
<DataGridTextColumn x:Key="colCNT" Binding="{Binding sCNT}" SortMemberPath="nCNT">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="QTY"
ToolTip="{Binding DataContext.CNT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--ADDED - Aggiunti-->
<DataGridTextColumn x:Key="colADDED" Binding="{Binding sADDED}" SortMemberPath="nADDED">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.ShortADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
ToolTip="{Binding DataContext.ADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="Blue" />
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
<!--INPROD - IN OTTIMIZZAZIONE-->
<DataGridTextColumn x:Key="colINPROD" Binding="{Binding nINPROD}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.ShortINPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
ToolTip="{Binding DataContext.INPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--DONE - PRODOTTI-->
<DataGridTextColumn x:Key="colDONE" Binding="{Binding nDONE}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.ShortDONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
ToolTip="{Binding DataContext.DONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--GRP - Gruppo-->
<DataGridTextColumn x:Key="colGROUP" Binding="{Binding sGROUP}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.GRP_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--STOREY - Sottogruppo-->
<DataGridTextColumn x:Key="colSTOREY" Binding="{Binding sSTOREY}">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.STOREY_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--ROT - Rotazione-->
<DataGridTemplateColumn x:Key="colROT" SortMemberPath="dROT">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/RotateIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sROTATED}"
TextAlignment="Center"
Margin="2,0,2,0"/>
<Button Grid.Column="1"
Command="{Binding ForwardRotation_Command}"
ToolTip="{Binding ForwardRotation_ToolTip}"
IsEnabled="{Binding RotatePart_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/NewPage/Rotate.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--INV - Inversione-->
<DataGridTemplateColumn x:Key="colFLIP">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/InversionIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsInverted, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--VER - Verifica-->
<DataGridTemplateColumn x:Key="colVERIFY">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/VerifyIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button ToolTip="{Binding Verify_ToolTip}"
Command="{Binding Verify_Command}"
IsEnabled="{Binding Verify_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/CALCPanel/Verify.png" Stretch="Uniform"/>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--ADD - Aggiungi al grezzo-->
<DataGridTemplateColumn x:Key="colADD">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/AddToRawPartIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Command="{Binding AddToRawPart_Command}"
Visibility="{Binding MachiningPage_Visibility}"
ToolTip="{Binding AddToRawPart_ToolTip}"
IsEnabled="{Binding BTLPartManager_IsEnabled}"
Style="{StaticResource BTLPanel_Button}">
<Image Source="/Resources/LeftPanel/AddToRawPart.png" Stretch="Uniform"/>
</Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--SET - Opzioni-->
<DataGridTemplateColumn x:Key="colSETTING">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Image Source="/Resources/NewPage/SettingIntestazione.png" Stretch="Uniform" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<Button Command="{Binding ShowPopUpSettingBtnCommand}"
ToolTip="{Binding Settings_Command_ToolTip}"
Style="{StaticResource BTLPanel_Button}"
Click="OpenPopUp_Click">
<Image Source="/Resources/NewPage/Setting.png" Stretch="Uniform"/>
</Button>
<Popup AllowsTransparency="True"
PopupAnimation="None"
Placement="Right"
StaysOpen="False">
<Popup.VerticalOffset>
<MultiBinding Converter="{StaticResource DataGridCellBorderThicknessConverter}">
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}"/>
<Binding Path="ActualWidth" ElementName="SettingsBtn"/>
</MultiBinding>
</Popup.VerticalOffset>
<EgtBEAMWALL:OnlyProdBTLPartManagerV/>
</Popup>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Resources>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<EgtBEAMWALL:OnlyProdFeatureListManagerV/>
<ListBox Grid.Column="1"
ItemsSource="{Binding BTLFeatureVMList}"
SelectedItem="{Binding SelBTLFeatureVM, UpdateSourceTrigger=PropertyChanged}"
PreviewMouseWheel="ListBox_PreviewMouseWheel"
Grid.IsSharedSizeScope="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
Style="{StaticResource BTL_ListBox}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical"
MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALLCORE:EgtDataGrid}},
Converter={StaticResource FractionHeightConverter},
ConverterParameter={StaticResource FeatureWrapPanelHeight}}"
MinHeight="{Binding Parent.Children[0].ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,50,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="Feature_Grp"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="Feature_Prc"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="Feature_Name"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding nPRID}"
Style="{StaticResource OnlyProd_TextBlock}"/>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
Background="{Binding Calc_Background}"/>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Ellipse Visibility="{Binding CALC_ROT_Visibility}"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_Ellipse}"/>
<TextBlock Grid.Row="1"
Text="{Binding CALC_ERR_Letter}"
Foreground="{Binding CALC_ERR_Foreground}"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_TextBlock}"/>
</Grid>
</Grid>
<CheckBox Grid.Column="2"
IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="0,0,5,0"/>
<TextBlock Grid.Column="3"
Text="["
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="4"
Text="{Binding nSelGRP}"
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="5"
Text="-"
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="6"
Text="{Binding nPRC, StringFormat={}{0:000}}"
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="7"
Text="] "
Style="{StaticResource OnlyProd_TextBlock}"/>
<TextBlock Grid.Column="8"
Text="{Binding sName}" FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource OnlyProd_TextBlock}"/>
<Button Grid.Column="9"
Command="{Binding EditFeature_Command}"
Click="SelectButton_Click"
Style="{StaticResource EditFeature_Button}">
<Image Source="/Resources/CALCPanel/Edit.png" Stretch="Uniform"/>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,2,0,0"
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}">
<TextBlock Text="STATUS:" Foreground="{StaticResource BeamWall_Corduroy}" HorizontalAlignment="Left" Margin="0,0,10,0"/>
<TextBlock Text="{Binding Tag.SelBTLPart.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"
HorizontalAlignment="Left" Foreground="{StaticResource BeamWall_Corduroy}"
Visibility="{Binding Tag.SelBTLPart.CALC_MSG_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"/>
<TextBlock Text="{Binding Tag.SelBTLPart.SelBTLFeatureVM.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdBTLPartListV}}}"
HorizontalAlignment="Left" Foreground="{StaticResource BeamWall_Corduroy}" />
</StackPanel>
</Grid>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</EgtBEAMWALLCORE:EgtDataGrid>
</UserControl>
@@ -1,120 +0,0 @@
Imports System.Reflection
Imports System.Windows.Controls.Primitives
Public Class OnlyProdBTLPartListV
Private m_BTLPartListVM As BTLPartListVM
Private m_DataGridType As Type = GetType(DataGrid)
Private m_isDraggingSelectionField As FieldInfo
Private m_endDraggingMethod As MethodInfo
Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
m_BTLPartListVM = DataContext
' Evita il drag sulla selezione multipla
m_isDraggingSelectionField = m_DataGridType.GetField("_isDraggingSelection", BindingFlags.Instance Or BindingFlags.NonPublic)
m_endDraggingMethod = m_DataGridType.GetMethod("EndDragging", BindingFlags.Instance Or BindingFlags.NonPublic)
End Sub
Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs)
' Evita il drag sulla selezione multipla
If e.LeftButton = MouseButtonState.Pressed Then
If CBool(If(m_isDraggingSelectionField?.GetValue(sender), False)) Then m_endDraggingMethod.Invoke(sender, New Object(-1) {})
End If
End Sub
Private Sub PartList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
If e.ChangedButton = MouseButton.Left Then
If TypeOf sender Is DataGridRow Then
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count <> 1 Then Return
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
If TypeOf Row.DataContext IsNot BTLPartVM Then Return
Dim BTLPartVM As BTLPartVM = DirectCast(Row.DataContext, BTLPartVM)
Dim DataGridDetailsPresenter As Object = TreeHelperManager.FindVisualParents(Of Button, CheckBox, Primitives.DataGridDetailsPresenter)(e.OriginalSource)
If Not IsNothing(DataGridDetailsPresenter) Then Return
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Contains(BTLPartVM) Then
BTLPartVM.SetOpenFeatureList(Not BTLPartVM.bOpenFeatureList)
End If
If Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.BTLStructureVM.SelBTLPart.Equals(BTLPartVM) Then
Map.refProjectVM.BTLStructureVM.SelectBTLPart(BTLPartVM, True)
End If
End If
End If
End Sub
Private Sub ListBox_PreviewMouseWheel(ByVal sender As Object, ByVal e As MouseWheelEventArgs)
' gestione dello scroll, per permetterlo anche quando mouse su RowDetails
e.Handled = True
Dim DependencyParent As DependencyObject = sender
While TypeOf DependencyParent IsNot ListBox
DependencyParent = VisualTreeHelper.GetParent(DependencyParent)
End While
If IsNothing(DependencyParent) Then
Return
End If
Dim parent As ListBox = TryCast(DependencyParent, ListBox)
If IsNothing(parent) Then
Return
End If
parent?.[RaiseEvent](New MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta) With {
.RoutedEvent = MouseWheelEvent,
.Source = sender})
End Sub
Private Sub OpenPopUp_Click(sender As Object, e As RoutedEventArgs)
Dim btn As Button = DirectCast(sender, Button) ' Ottieni il bottone che ha generato l'evento
Dim parent As DependencyObject = btn
' Cerca il Popup nel Visual Tree
While Not IsNothing(parent) AndAlso TypeOf parent IsNot DataGridRow
parent = VisualTreeHelper.GetParent(parent)
End While
If Not IsNothing(parent) Then
Dim row As DataGridRow = DirectCast(parent, DataGridRow)
Dim popup As Popup = TryCast(TreeHelperManager.FindVisualChild(Of Popup)(row), Popup)
If Not IsNothing(popup) Then
popup.PlacementTarget = btn ' Associa il popup al bottone
popup.IsOpen = True ' Mostra il popup
End If
End If
End Sub
Private Sub SelectButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim button = TryCast(sender, Button)
Dim listBoxItem = FindAncestor(Of ListBoxItem)(button)
If Not IsNothing(listBoxItem) Then
listBoxItem.IsSelected = True
End If
End Sub
Private Function FindAncestor(Of T As DependencyObject)(ByVal current As DependencyObject) As T
While Not IsNothing(current)
If TypeOf current Is T Then
Return CType(current, T)
End If
current = VisualTreeHelper.GetParent(current)
End While
Return Nothing
End Function
End Class
Public Class SettingsBtnVerticalOffsetMultiConverter
Implements IMultiValueConverter
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IMultiValueConverter.Convert
Dim x = 3
Return 10
End Function
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As Globalization.CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class

Some files were not shown because too many files have changed in this diff Show More