Merge branch 'feature/DevExpress-RawPartList' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall into feature/DevExpress-RawPartList
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtMessageBoxV
|
||||
|
||||
@@ -25,6 +26,18 @@ Public Class EgtMessageBoxV
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overrides Sub OnSourceInitialized(e As EventArgs)
|
||||
MyBase.OnSourceInitialized(e)
|
||||
Me.WindowStartupLocation = WindowStartupLocation.CenterScreen
|
||||
End Sub
|
||||
|
||||
Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Dispatcher.BeginInvoke(Sub()
|
||||
Me.Topmost = True
|
||||
Me.Activate()
|
||||
End Sub, DispatcherPriority.ContextIdle)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
|
||||
@@ -17,7 +17,7 @@ Imports System.Windows
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("Aedifica.Core")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2026 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
@@ -38,5 +38,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.1.5.3")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.3")>
|
||||
<Assembly: AssemblyVersion("3.1.6.2")>
|
||||
<Assembly: AssemblyFileVersion("3.1.6.2")>
|
||||
|
||||
@@ -1925,6 +1925,7 @@
|
||||
|
||||
<Style x:Key="EgtMessageBox_ItemsControl" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource {x:Type ItemsControl}}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="0,0,0,10"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="UsersControl_ItemsControl" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource {x:Type ItemsControl}}">
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.1.5.3")]
|
||||
[assembly: AssemblyFileVersion("3.1.5.3")]
|
||||
[assembly: AssemblyVersion("3.1.6.2")]
|
||||
[assembly: AssemblyFileVersion("3.1.6.2")]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class AboutBoxV
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Application x:Class="Application"
|
||||
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.Core;assembly=EgtBEAMWALL.Core">
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
@@ -1007,9 +1007,15 @@
|
||||
<PackageReference Include="BouncyCastle">
|
||||
<Version>1.8.5</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="DevExpress.Pdf.Core">
|
||||
<Version>25.2.5</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="DevExpress.Wpf">
|
||||
<Version>25.2.5</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="DevExpress.Wpf.Core">
|
||||
<Version>25.2.5</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="EgwMultiEngineManager.Core">
|
||||
<Version>3.1.1.2</Version>
|
||||
</PackageReference>
|
||||
@@ -1233,6 +1239,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewPage\VerifyAllR.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewPage\EditIntestazione.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Aedifica\Aedifica.OptimizerR32.exe
|
||||
|
||||
@@ -751,6 +751,7 @@ Public Class ComboGenericParameter
|
||||
End Property
|
||||
Friend Sub SetSelValue(sValue As String)
|
||||
m_SelValue = m_ComboList.FirstOrDefault(Function(x) x.sValue = sValue)
|
||||
If IsNothing(m_SelValue) Then m_SelValue = m_ComboList(0)
|
||||
End Sub
|
||||
|
||||
Private m_bComboBoxVisibility As Visibility = Visibility.Collapsed
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<Grid x:Class="BTLPartListV"
|
||||
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:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
<Grid.Resources>
|
||||
<UserControl x:Class="BTLPartListV"
|
||||
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:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
<UserControl.Resources>
|
||||
<OPTIMIZER:DataGridCellBorderThicknessConverter x:Key="DataGridCellBorderThicknessConverter"/>
|
||||
<OPTIMIZER:ProjIdToBtlFileName x:Key="ProjIdToBtlFileName"/>
|
||||
<OPTIMIZER:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
@@ -26,7 +26,7 @@
|
||||
<dxfui:CheckedListFilterElement Context="{Binding FilteringContext, ElementName=BTLPart_GridControl}"
|
||||
FieldName="Section.sSectionXMaterial" ShowCounts="True"/>
|
||||
</DataTemplate>
|
||||
</Grid.Resources>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -97,10 +97,12 @@
|
||||
SelectionMode="Row"
|
||||
SelectedItems="{Binding Tag.SelBTLParts,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
MasterRowExpanding="GridControl_MasterRowExpanding">
|
||||
MasterRowExpanding="GridControl_MasterRowExpanding"
|
||||
CurrentItemChanged="BTLPart_GridControl_CurrentItemChanged">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="BTLPart_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
PreviewMouseDown="BTLPart_TableView_PreviewMouseDown"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
@@ -126,23 +128,23 @@
|
||||
Style="{StaticResource BTLPartList_TextBlock}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Style="{StaticResource TableView_StackPanel}">
|
||||
<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}}}"
|
||||
<Button Command="{Binding Tag.Data_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
CommandParameter="{Binding GroupValue.Value}"
|
||||
ToolTip="{Binding Tag.Data_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
Style="{StaticResource BTLPartList_Button}">
|
||||
<Image Source="{StaticResource Adjustment_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</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}}}"
|
||||
<Button Command="{Binding Tag.AddPart_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
CommandParameter="{Binding GroupValue.Value}"
|
||||
ToolTip="{Binding Tag.AddPart_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
Style="{StaticResource BTLPartList_Button}">
|
||||
<Image Source="{StaticResource AddPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</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}}}"
|
||||
<Button Command="{Binding Tag.UpdateBTL_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
CommandParameter="{Binding GroupValue.Value}"
|
||||
ToolTip="{Binding Tag.UpdateBTL_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
Style="{StaticResource BTLPartList_Button}">
|
||||
<Image Source="{StaticResource UpdateBTL_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
@@ -223,6 +225,7 @@
|
||||
<ListBox Grid.Column="1"
|
||||
ItemsSource="{Binding BTLFeatureVMList}"
|
||||
SelectedItem="{Binding SelBTLFeatureVM, UpdateSourceTrigger=PropertyChanged}"
|
||||
PreviewMouseDown="ListBox_PreviewMouseDown"
|
||||
Style="{StaticResource BTLPartList_ListBox}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
@@ -558,5 +561,4 @@
|
||||
</dxg:GridControl>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -18,6 +18,8 @@ Public Class BTLPartListV
|
||||
|
||||
Private _lastExpanded As Integer = -1
|
||||
|
||||
Private bSelOnFeature As Boolean = False
|
||||
|
||||
Sub New()
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
@@ -64,14 +66,14 @@ Public Class BTLPartListV
|
||||
If bValue AndAlso BTLPart_GridControl.GroupSummary.Count = 0 Then
|
||||
BTLPart_GridControl.GroupSummary.Clear()
|
||||
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nPDN",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "nPDN"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "nPDN"}
|
||||
BTLPart_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
BTLPart_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
|
||||
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
|
||||
.DisplayFormat = "{0}",
|
||||
@@ -79,14 +81,14 @@ Public Class BTLPartListV
|
||||
.ShowInGroupColumnFooter = "sADDED"}
|
||||
BTLPart_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
|
||||
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nINPROD",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nINPROD"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nINPROD"}
|
||||
BTLPart_GridControl.GroupSummary.Add(INPRODGroupSummaryItem)
|
||||
Dim DONEGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nDONE",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nDONE"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nDONE"}
|
||||
BTLPart_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
|
||||
End If
|
||||
BTLPart_TableView.ShowGroupFooters = bValue
|
||||
@@ -160,25 +162,6 @@ Public Class BTLPartListV
|
||||
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
|
||||
@@ -261,6 +244,40 @@ Public Class BTLPartListV
|
||||
_lastExpanded = e.RowHandle
|
||||
End Sub
|
||||
|
||||
Private Sub BTLPart_TableView_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
bSelOnFeature = False
|
||||
End Sub
|
||||
|
||||
Private Sub ListBox_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
bSelOnFeature = True
|
||||
End Sub
|
||||
|
||||
Public Sub HandleDelete(e As KeyEventArgs)
|
||||
Dim BTLStructureVM As BTLStructureVM = TryCast(Me.Tag, BTLStructureVM)
|
||||
If IsNothing(BTLStructureVM) Then Return
|
||||
|
||||
Dim SelBTLPart As BTLPartVM = BTLStructureVM.SelBTLPart
|
||||
Dim SelBTLFeatureVM As BTLFeatureVM = SelBTLPart?.SelBTLFeatureVM
|
||||
|
||||
If bSelOnFeature AndAlso Not IsNothing(SelBTLFeatureVM) Then
|
||||
If SelBTLFeatureVM.DeleteFeature_Command.CanExecute(Nothing) Then
|
||||
SelBTLFeatureVM.DeleteFeature_Command.Execute(Nothing)
|
||||
e.Handled = True
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
If BTLStructureVM.DeletePart_Command.CanExecute(Nothing) Then
|
||||
BTLStructureVM.DeletePart_Command.Execute(Nothing)
|
||||
e.Handled = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BTLPart_GridControl_CurrentItemChanged(sender As Object, e As CurrentItemChangedEventArgs)
|
||||
CType(e.Source, GridControl).View.FocusedRowHandle = -1
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class SettingsBtnVerticalOffsetMultiConverter
|
||||
|
||||
@@ -2,110 +2,107 @@
|
||||
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:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||
|
||||
<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 Optimizer_DataGrid}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command,
|
||||
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 OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
||||
</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"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Visibility="{Binding CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROT_TextBlock}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding CALC_ERR_Letter}"
|
||||
Foreground="{Binding CALC_ERR_Foreground}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
<dxg:GridControl x:Name="FeatureVMList_GridControl"
|
||||
ItemsSource="{Binding Tag.FeatureVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
SelectedItem="{Binding Tag.SelFeatureVM,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="FeatureVMList_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="bDO"
|
||||
SortFieldName="bDO"
|
||||
Header=""
|
||||
Fixed="Left"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.HeaderTemplate>
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bDO}"
|
||||
IsEnabled="{Binding RowData.Row.IsEnabled}"
|
||||
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="GlobalState"
|
||||
Header=""
|
||||
SortFieldName="nGlobalState"
|
||||
AllowColumnFiltering="False">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding RowData.Row.Calc_Background}"/>
|
||||
<Grid Grid.Column="1"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROT_TextBlock}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding RowData.Row.CALC_ERR_Letter}"
|
||||
Foreground="{Binding RowData.Row.CALC_ERR_Foreground}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn x:Key="colPRIORITY" Binding="{Binding sPriority}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Priority_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</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}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Button}">
|
||||
<Image Source="{StaticResource Verify_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Resources>
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sDesc"
|
||||
Header="{Binding Description_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sPriority"
|
||||
Header="{Binding Priority_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="Strategy"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderEdit_Image}"
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RowData.Row.Strategy_Command}"
|
||||
IsEnabled="{Binding RowData.Row.IsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.Strategy_ToolTip}">
|
||||
<Image Source="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,7 +1,118 @@
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class FeatureInPartInRawPartListV
|
||||
|
||||
Private m_FeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\NewDataGridLayoutFile3.json"
|
||||
|
||||
For Each Column In FeatureVMList_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
|
||||
FeatureVMList_GridControl.Columns("sPriority").Visible = False
|
||||
|
||||
DXSerializer.AddAllowPropertyHandler(FeatureVMList_GridControl, AddressOf OnAddAllowProperty)
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
|
||||
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
|
||||
e.Allow = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.Property.Name = "FilterString" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilters" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilterList" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
|
||||
e.Allow = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' salvataggio del layout colonne
|
||||
Public Sub SaveStatisticGridControlLayout()
|
||||
FeatureVMList_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_FeatureInPartInRawPartListVM = Me.DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_FeatureInPartInRawPartListVM.refFeatureInPartInRawPartListGridControlLayout = AddressOf SaveStatisticGridControlLayout
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
FeatureVMList_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||
End If
|
||||
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
|
||||
FeatureVMList_TableView.ShowGroupFooters = False
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (FeatureVMList_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(FeatureVMList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(FeatureVMList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
FeatureVMList_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
' funzione che impedisce di editare le righe che sono gia' in produzione
|
||||
Private Sub FeatureInPartInRawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
|
||||
If IsNothing(e.Row) Then Return
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class FeatureInPartInRawPartListVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public refFeatureInPartInRawPartListGridControlLayout As Action
|
||||
|
||||
Private m_colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||
Public ReadOnly Property colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||
Get
|
||||
|
||||
@@ -2,9 +2,22 @@
|
||||
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:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||
|
||||
<Grid Margin="5">
|
||||
<Grid.Resources>
|
||||
<OPTIMIZER:TrimmedTextBlockVisibilityConverter x:Key="TrimToVisConverter" />
|
||||
</Grid.Resources>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -13,118 +26,66 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgwWPFBaseLib:EgwDataGrid CanUserDeleteRows="False"
|
||||
SelectionMode="Single"
|
||||
Margin="0,0,0,5"
|
||||
ItemsSource="{Binding Tag.PBTLParamVMList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||
SelectedItem="{Binding Tag.SelPBTLParam, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||
IsEnabled="{Binding PParameterList_IsEnabled}"
|
||||
ColumnLayouts="{Binding PParameterListColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource PParam_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<EventSetter Event="PreviewMouseDown" Handler="PParameterList_PreviewMouseDown"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.Resources>
|
||||
<OPTIMIZER:TrimmedTextBlockVisibilityConverter x:Key="TrimToVisConverter" />
|
||||
<!--Custom-->
|
||||
<DataGridTemplateColumn x:Key="colCUSTOM">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Custom_Msg, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bCustom, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
Style="{StaticResource PParameters_CheckBox}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--Nome-->
|
||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDescription}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"
|
||||
Style="{StaticResource Prod_TextBlock}">
|
||||
<TextBlock.ToolTip>
|
||||
<ToolTip Style="{StaticResource PParameters_ToolTip}">
|
||||
<ToolTip.Content>
|
||||
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"
|
||||
Style="{StaticResource Prod_TextBlock}"/>
|
||||
</ToolTip.Content>
|
||||
</ToolTip>
|
||||
</TextBlock.ToolTip>
|
||||
</TextBlock>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}" />
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_FountainBlue}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Valore-->
|
||||
<DataGridTextColumn x:Key="colVALUE" Binding="{Binding sValue}" SortMemberPath="dValue">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Value_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}" />
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_FountainBlue}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Minimo-->
|
||||
<DataGridTextColumn x:Key="colMIN" Binding="{Binding sMin, Mode=OneWay}" SortMemberPath="dMin">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Min_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Massimo-->
|
||||
<DataGridTextColumn x:Key="colMAX" Binding="{Binding sMax, Mode=OneWay}" SortMemberPath="dMax">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Max_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Resources>
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
<dxg:GridControl x:Name="PParameterList_GridControl"
|
||||
ItemsSource="{Binding Tag.PBTLParamVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||
SelectedItem="{Binding Tag.SelPBTLParam,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="PParameterList_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource EditTableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="bCustom"
|
||||
Header="{Binding Custom_Msg}"
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bCustom}"
|
||||
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sName"
|
||||
Header="{Binding NAM_Msg}"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sDescription"
|
||||
Header="{Binding Description_Msg}"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sValue"
|
||||
SortFieldName="dValue"
|
||||
Header="{Binding Value_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sMin"
|
||||
SortFieldName="dMin"
|
||||
Header="{Binding Min_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMax"
|
||||
SortFieldName="dMaxn"
|
||||
Header="{Binding Max_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>
|
||||
|
||||
<Image Grid.Column="1"
|
||||
Source="{Binding sCurrDraw}"
|
||||
|
||||
@@ -1,4 +1,116 @@
|
||||
Public Class PParameterListV
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class PParameterListV
|
||||
|
||||
Private m_PParameterListVM As PParameterListVM
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\NewDataGridLayoutFile5.json"
|
||||
|
||||
For Each Column In PParameterList_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
|
||||
PParameterList_GridControl.Columns("bCustom").Visible = False
|
||||
|
||||
DXSerializer.AddAllowPropertyHandler(PParameterList_GridControl, AddressOf OnAddAllowProperty)
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
|
||||
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
|
||||
e.Allow = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.Property.Name = "FilterString" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilters" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilterList" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
|
||||
e.Allow = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' salvataggio del layout colonne
|
||||
Public Sub SaveStatisticGridControlLayout()
|
||||
PParameterList_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_PParameterListVM = Me.DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_PParameterListVM.refPParameterListGridControlLayout = AddressOf SaveStatisticGridControlLayout
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
PParameterList_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||
End If
|
||||
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (PParameterList_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(PParameterList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(PParameterList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
PParameterList_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
Private Sub PParameterList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
If TypeOf sender Is DataGridRow Then
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class PParameterListVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public refPParameterListGridControlLayout As Action
|
||||
|
||||
Private m_colPParam_Value As EgwWPFBaseLib.ColumnLayout
|
||||
Public ReadOnly Property colPParam_Value As EgwWPFBaseLib.ColumnLayout
|
||||
Get
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}">
|
||||
Style="{StaticResource EditTableViewStyle}">
|
||||
</dxg:TableView>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.TotalSummary>
|
||||
@@ -40,7 +41,9 @@
|
||||
<dxg:GridControl.DetailDescriptor>
|
||||
<dxg:DataControlDetailDescriptor ItemsSourceBinding="{Binding PartVMList}"
|
||||
Margin="0,0,16,0">
|
||||
<dxg:GridControl x:Name="Part_GridControl" SelectionMode="Row">
|
||||
<dxg:GridControl x:Name="Part_GridControl" SelectionMode="Row"
|
||||
SelectedItem="{Binding Tag.SelectedMachGroup.SelPart,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="Part_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
@@ -49,19 +52,22 @@
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}">
|
||||
Style="{StaticResource EditTableViewStyle}">
|
||||
</dxg:TableView>
|
||||
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="nPDN"
|
||||
Header="{Binding PDN_Msg}"
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="GlobalState"
|
||||
Header=""
|
||||
SortFieldName="nGlobalState"
|
||||
AllowColumnFiltering="False">
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
@@ -98,11 +104,13 @@
|
||||
Header="{Binding NAM_Msg}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="CheckedList"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
SortFieldName="dL"
|
||||
Header="{Binding L_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sROTATED"
|
||||
Header=""
|
||||
@@ -111,6 +119,7 @@
|
||||
AllowColumnFiltering="False"
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
@@ -127,6 +136,7 @@
|
||||
Style="{StaticResource Rotate_TextBlock}"/>
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding RowData.Row.ForwardRotation_Command}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.ForwardRotation_ToolTip}">
|
||||
<Image Source="{StaticResource Rotate_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
@@ -141,10 +151,12 @@
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bFLIP}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
@@ -153,36 +165,47 @@
|
||||
SortFieldName="dPOSX"
|
||||
Header="{Binding PosX_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sPOSY"
|
||||
SortFieldName="dPOSY"
|
||||
Header="{Binding PosY_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sOffset"
|
||||
SortFieldName="dOffset"
|
||||
Header="{Binding Offset_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sMATERIAL"
|
||||
Header="{Binding MAT_Msg}"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sGROUP"
|
||||
Header="{Binding GRP_Msg}"
|
||||
AllowSorting="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sSTOREY"
|
||||
AllowSorting="False"
|
||||
Header="{Binding STOREY_Msg}"
|
||||
AllowSorting="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="MoveUp"
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RowData.Row.MoveUpPart_Command}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.MoveUpPart_ToolTip}">
|
||||
<Image Source="{StaticResource MoveUp_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
@@ -194,10 +217,12 @@
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RowData.Row.MoveDownPart_Command}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.MoveDownPart_ToolTip}">
|
||||
<Image Source="{StaticResource MoveDown_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
@@ -209,10 +234,12 @@
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RowData.Row.RemovePart_Command}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.RemovePart_ToolTip}">
|
||||
<Image Source="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
@@ -221,18 +248,20 @@
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl>
|
||||
|
||||
</dxg:DataControlDetailDescriptor>
|
||||
</dxg:GridControl.DetailDescriptor>
|
||||
|
||||
<dxg:GridColumn FieldName="Name"
|
||||
Header="{Binding ID_Msg}"
|
||||
SortFieldName="nName"
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="GlobalState"
|
||||
Header=""
|
||||
SortFieldName="nGlobalState"
|
||||
AllowColumnFiltering="False">
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Style="{StaticResource RawPartList_Grid}">
|
||||
@@ -266,51 +295,65 @@
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sStartCut"
|
||||
Header="{Binding StartOffset_Msg}"
|
||||
Binding="{Binding sStartCut}"
|
||||
Binding="{Binding sStartCut, Mode=TwoWay}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sW"
|
||||
Header="{Binding W_Msg}"
|
||||
Binding="{Binding sW}"
|
||||
SortFieldName="dW"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sH"
|
||||
Header="{Binding H_Msg}"
|
||||
Binding="{Binding sH}"
|
||||
SortFieldName="dH"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
Header="{Binding L_Msg}"
|
||||
Binding="{Binding sL}"
|
||||
Binding="{Binding sL, Mode=TwoWay}"
|
||||
SortFieldName="dL"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sPosZ"
|
||||
Header="{Binding PosZ_Msg}"
|
||||
Binding="{Binding sPosZ}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMATERIAL"
|
||||
Header="{Binding Material_Msg}"
|
||||
Binding="{Binding sMATERIAL}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUsage"
|
||||
Header="{Binding Used_Msg}"
|
||||
Binding="{Binding sUsage}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sWaste"
|
||||
Header="{Binding Waste_Msg}"
|
||||
Binding="{Binding sWaste}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="Verify"
|
||||
Header=""
|
||||
@@ -319,10 +362,11 @@
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsEnabled="{Binding RowData.Row.Verify_IsEnabled}"
|
||||
<Button IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
Command="{Binding RowData.Row.Verify_Command}"
|
||||
ToolTip="{Binding RowData.Row.Verify_ToolTip}">
|
||||
<Image Source="{StaticResource Verify_Image}"
|
||||
@@ -338,6 +382,7 @@
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
@@ -357,10 +402,11 @@
|
||||
HeaderToolTip="{Binding Verify_ToolTip}"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsEnabled="{Binding RowData.Row.RawPartManagerIsEnabled}"
|
||||
<Button IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
Command="{Binding RowData.Row.ProduceRawPart_Command}"
|
||||
ToolTip="{Binding RowData.Row.ProduceRawPart_ToolTip}">
|
||||
<Image Source="{StaticResource ProduceRawPart_Image}"
|
||||
@@ -376,10 +422,12 @@
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dx:DropDownButton Glyph="{StaticResource Setting_Image}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.Settings_Command_ToolTip}"
|
||||
Style="{StaticResource DropDownButtonStyle}">
|
||||
<dx:DropDownButton.ArrowGlyph>
|
||||
|
||||
@@ -78,14 +78,14 @@ Public Class RawPartListV
|
||||
If bValue AndAlso RawPart_GridControl.GroupSummary.Count = 0 Then
|
||||
RawPart_GridControl.GroupSummary.Clear()
|
||||
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nPDN",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "nPDN"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "nPDN"}
|
||||
RawPart_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
RawPart_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
|
||||
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
|
||||
.DisplayFormat = "{0}",
|
||||
@@ -93,14 +93,14 @@ Public Class RawPartListV
|
||||
.ShowInGroupColumnFooter = "sADDED"}
|
||||
RawPart_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
|
||||
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nINPROD",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nINPROD"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nINPROD"}
|
||||
RawPart_GridControl.GroupSummary.Add(INPRODGroupSummaryItem)
|
||||
Dim DONEGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nDONE",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nDONE"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nDONE"}
|
||||
RawPart_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
|
||||
End If
|
||||
RawPart_TableView.ShowGroupFooters = bValue
|
||||
@@ -222,6 +222,7 @@ Public Class RawPartListV
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(e.Link.DataContext, GridColumnMenuInfo)
|
||||
@@ -262,10 +263,6 @@ Public Class RawPartListV
|
||||
If Not IsNothing(colMat) Then colMat.Visible = False
|
||||
End If
|
||||
|
||||
detailGrid.SetBinding(GridControl.SelectedItemProperty, New Binding("SelPart") With {
|
||||
.Mode = BindingMode.TwoWay,
|
||||
.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged
|
||||
})
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -18,139 +18,8 @@
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource Optimizer_Border}"/>
|
||||
|
||||
<!--<Grid Style="{StaticResource Verify_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button ToolTip="{Binding VerifyAll_ToolTip}"
|
||||
Command="{Binding VerifyAll_Command}"
|
||||
IsEnabled="{Binding VerifyAll_IsEnabled}"
|
||||
Style="{StaticResource Verify_Button}">
|
||||
<Image Source="{StaticResource VerifyAll_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="1"
|
||||
ToolTip="{Binding VerifyAll_ToolTip}"
|
||||
Command="{Binding VerifyAllFlipRot_Command}"
|
||||
IsEnabled="{Binding VerifyAll_IsEnabled}"
|
||||
Style="{StaticResource Verify_Button}">
|
||||
<Image Source="{StaticResource VerifyAllR_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="2"
|
||||
Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||
Style="{StaticResource Verify_Button}">
|
||||
<Image Source="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="3"
|
||||
Name="FilterAllBtn"
|
||||
ToolTip="{Binding FilterAll_ToolTip}"
|
||||
Command="{Binding ShowPopUpFilterBtnCommand}"
|
||||
Style="{StaticResource Verify_Button}">
|
||||
<Image Source="{StaticResource AllFilter_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Popup IsOpen="{Binding IsFilterBtnOpen}"
|
||||
PlacementTarget="{Binding ElementName=FilterAllBtn}"
|
||||
Style="{StaticResource Filter_PopUp}">
|
||||
<UniformGrid Columns="5"
|
||||
Style="{StaticResource LeftPanel_UniformGrid}">
|
||||
<Expander Header="{Binding Section_Msg}">
|
||||
<ListBox ItemsSource="{Binding Tag.SectionList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelSection, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
DisplayMemberPath="sSectionXMaterial"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<Expander Grid.Column="1"
|
||||
Header="{Binding Group_Msg}"
|
||||
Style="{StaticResource LeftPanel_Expander}">
|
||||
<ListBox ItemsSource="{Binding Tag.GroupList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelGroup, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<Expander Grid.Column="2"
|
||||
Header="{Binding SubGroup_Msg}"
|
||||
Style="{StaticResource LeftPanel_Expander}">
|
||||
<ListBox ItemsSource="{Binding Tag.SubGroupList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelSubGroup, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<Expander Grid.Column="3"
|
||||
Header="{Binding ParType_Msg}"
|
||||
Style="{StaticResource LeftPanel_Expander}">
|
||||
<ListBox ItemsSource="{Binding Tag.SearchParamList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelSearchParam, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<Expander Grid.Column="4"
|
||||
Header="{Binding ParValue_Msg}"
|
||||
Style="{StaticResource LeftPanel_Expander}">
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.SearchText, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource SearchText_TextBox}"/>
|
||||
</Expander>
|
||||
</UniformGrid>
|
||||
</Popup>
|
||||
<Expander Grid.Column="4"
|
||||
Header="{Binding Section_Msg}"
|
||||
Style="{StaticResource Section_Expander}">
|
||||
<ListBox ItemsSource="{Binding Tag.SectionList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelSection, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
DisplayMemberPath="sSectionXMaterial"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="5"
|
||||
Text="{Binding SearchString, ElementName=BTLPart_TableView, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
||||
<dxe:SearchControl x:Name="searchControl"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ShowSearchPanelNavigationButtons="True"
|
||||
ShowResultInfo="True">
|
||||
</dxe:SearchControl>
|
||||
|
||||
<Button Grid.Column="6" Visibility="Collapsed"
|
||||
Command="{Binding RotateAll_Command}"
|
||||
ToolTip="{Binding RotateAll_ToolTip}"
|
||||
IsEnabled="{Binding RotateAll_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource Rotate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="7" Visibility="Collapsed"
|
||||
Command="{Binding InvertAll_Command}"
|
||||
ToolTip="{Binding InvertAll_ToolTip}"
|
||||
IsEnabled="{Binding RotateAll_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource Inversion_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="8" Visibility="Collapsed"
|
||||
Command="{Binding Edit_Command}"
|
||||
ToolTip="{Binding MultipleModify_ToolTip}"
|
||||
IsEnabled="{Binding RotateAll_IsEnabled}"
|
||||
Style="{StaticResource MacroFeaturen_Button}">
|
||||
<Image Source="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</Grid>-->
|
||||
|
||||
<OPTIMIZER:BTLPartListV Grid.Row="1"
|
||||
x:Name="PartList"
|
||||
DataContext="{StaticResource PartListVM}"
|
||||
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Margin="4,0,4,0"/>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Public Class LeftPanelV
|
||||
|
||||
Public Sub ForwardDelete(e As KeyEventArgs)
|
||||
PartList.HandleDelete(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -7,6 +7,7 @@ Public Class MyMachGroupPanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Property m_OldSelectedMachGroup As MyMachGroupVM
|
||||
Public Shadows Property SelectedMachGroup As MyMachGroupVM
|
||||
Get
|
||||
Return m_SelectedMachGroup
|
||||
@@ -29,7 +30,13 @@ Public Class MyMachGroupPanelVM
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not IsNothing(value) Then m_OldSelectedMachGroup = value
|
||||
|
||||
m_SelectedMachGroup = value
|
||||
|
||||
If IsNothing(m_SelectedMachGroup) Then m_SelectedMachGroup = m_OldSelectedMachGroup
|
||||
|
||||
If Not IsNothing(value) Then
|
||||
OnPreSetCurrMachGroup()
|
||||
EgtSetCurrMachGroup(value.Id)
|
||||
|
||||
@@ -269,8 +269,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId(sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2701, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 3106, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 3106, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem>
|
||||
<OPTIMIZER:ProjectV DataContext="{StaticResource ProjectVM}"/>
|
||||
<OPTIMIZER:ProjectV x:Name="ProjectView" DataContext="{StaticResource ProjectVM}"/>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<OPTIMIZER:ConfigurationPageV DataContext="{DynamicResource ConfigurationPageVM}"/>
|
||||
|
||||
@@ -22,12 +22,20 @@ Public Class MainWindowV
|
||||
Me.SetPlacementAppName(S_GENERAL)
|
||||
Me.SetPlacementKeyName(K_WINPLACE)
|
||||
Me.SetPlacementFileName(IniFile.m_sIniFile)
|
||||
|
||||
Me.AddHandler(Keyboard.KeyDownEvent, New KeyEventHandler(AddressOf Global_KeyDown), True)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub Global_KeyDown(sender As Object, e As KeyEventArgs)
|
||||
If e.Key = Key.Delete Then
|
||||
ProjectView.ForwardDelete(e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
' Carico e imposto posizione finestra
|
||||
WinPosFromIniToWindow(S_GENERAL, K_VIEWOPTIMWINPLACE, Me)
|
||||
|
||||
@@ -67,5 +67,5 @@ Imports System.Windows
|
||||
' Revision
|
||||
'
|
||||
|
||||
<Assembly: AssemblyVersion("3.1.5.3")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.3")>
|
||||
<Assembly: AssemblyVersion("3.1.6.2")>
|
||||
<Assembly: AssemblyFileVersion("3.1.6.2")>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<OPTIMIZER:LeftPanelV DataContext="{StaticResource LeftPanelVM}"
|
||||
<OPTIMIZER:LeftPanelV x:Name="LeftPanel" DataContext="{StaticResource LeftPanelVM}"
|
||||
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"
|
||||
IsEnabled="{Binding DataContext.LeftPanel_IsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"
|
||||
Opacity="{Binding DataContext.LeftPanel_Opacity, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"/>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Public Class LeftPanelTopV
|
||||
|
||||
Public Sub ForwardDelete(e As KeyEventArgs)
|
||||
LeftPanel.ForwardDelete(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<OPTIMIZER:TopPanelV Grid.ColumnSpan="3"/>
|
||||
|
||||
<OPTIMIZER:LeftPanelTopV Grid.Row="1"/>
|
||||
<OPTIMIZER:LeftPanelTopV Grid.Row="1" x:Name="LeftPanelTop"/>
|
||||
|
||||
<GridSplitter Grid.Column="1"
|
||||
Grid.RowSpan="4"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Public Class ProjectV
|
||||
|
||||
Public Sub ForwardDelete(e As KeyEventArgs)
|
||||
LeftPanelTop.ForwardDelete(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -204,6 +204,7 @@ Public Class ProjectVM
|
||||
End Property
|
||||
Friend Sub SetFeatureListVisibility(bVisible As Boolean)
|
||||
m_FeatureList_Visibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||
If Not m_FeatureList_Visibility Then Map.refFeatureInPartInRawPartListVM.refFeatureInPartInRawPartListGridControlLayout()
|
||||
NotifyPropertyChanged(NameOf(FeatureList_Visibility))
|
||||
End Sub
|
||||
|
||||
@@ -950,6 +951,7 @@ Public Class ProjectVM
|
||||
Public Sub Back()
|
||||
SetRawPartManagerVisibility(True)
|
||||
If Not IsNothing(m_MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
|
||||
If Not IsNothing(Map.refPParameterListVM) Then Map.refPParameterListVM.refPParameterListGridControlLayout()
|
||||
SetStrategyManagerVisibility(False)
|
||||
SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
|
||||
SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 490 B |
@@ -78,14 +78,15 @@ Public Class MySceneHostVM
|
||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Core.EgtMessageBoxV.Show(Nothing, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Altrimenti manca la licenza
|
||||
Else
|
||||
EgtOutLog("Problems with Licence")
|
||||
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(10105) & vbCrLf & EgtMsg(10106)
|
||||
Dim sKeyInfo As String = "" : EgtGetKeyInfo(sKeyInfo)
|
||||
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(10105) & vbCrLf & EgtMsg(10106)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
If Core.EgtMessageBoxV.Show(Nothing, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
' Apro dialogo per richiesta file licenza
|
||||
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.Title = EgtMsg(110026),
|
||||
|
||||
@@ -2,7 +2,17 @@
|
||||
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:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -17,163 +27,107 @@
|
||||
|
||||
<TabItem Header="OPTIMIZERSTATS">
|
||||
<TabItem.Content>
|
||||
<EgwWPFBaseLib:EgwDataGrid x:Name="dgOptimizerStatistics"
|
||||
ItemsSource="{Binding Tag.MachGroupPanelVM.MachGroupVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:OptimizerStatisticsV}}}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Extended"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="0,0,0,5"
|
||||
ColumnLayouts="{Binding OptimizerStatisticsColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.Resources>
|
||||
<!--Id - Nome-->
|
||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding Name}" SortMemberPath="nName">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.ID_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--W - Larghezza-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding dW}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--H - Altezza-->
|
||||
<DataGridTextColumn x:Key="colH" Binding="{Binding dH}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--L - Lunghezza-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding dL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.L_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 Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--% - % utilizzo-->
|
||||
<DataGridTextColumn x:Key="colUSAGE" Binding="{Binding sUsage}" SortMemberPath="dUsage">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Used_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--S - Scarti-->
|
||||
<DataGridTextColumn x:Key="colWASTE" Binding="{Binding sWaste}" SortMemberPath="dWaste">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Waste_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--CALCTIME - TEMPO UNITARIO STIMATO-->
|
||||
<DataGridTextColumn x:Key="colUNITTIME" Binding="{Binding sUnitTime}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.UNIT_TIME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
|
||||
</DataGrid.Resources>
|
||||
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
<dxg:GridControl x:Name="dgOptimizerStatistics_GridControl"
|
||||
ItemsSource="{Binding Tag.MachGroupPanelVM.MachGroupVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:OptimizerStatisticsV}}}"
|
||||
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="dgOptimizerStatistics_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="Name"
|
||||
SortFieldName="dName"
|
||||
Header="{Binding ID_Msg}"
|
||||
Fixed="Left"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="dW"
|
||||
Header="{Binding W_Msg}"
|
||||
Binding="{Binding dW}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="dH"
|
||||
Header="{Binding H_Msg}"
|
||||
Binding="{Binding dH}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="dL"
|
||||
Header="{Binding L_Msg}"
|
||||
Binding="{Binding dL}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMATERIAL"
|
||||
Header="{Binding MAT_Msg}"
|
||||
Binding="{Binding sMATERIAL}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="Custom"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUsage"
|
||||
SortFieldName="dUsage"
|
||||
Header="{Binding Used_Msg}"
|
||||
Binding="{Binding sUsage}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sWaste"
|
||||
SortFieldName="dWaste"
|
||||
Header="{Binding Waste_Msg}"
|
||||
Binding="{Binding sWaste}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUnitTime"
|
||||
Header="{Binding UNIT_TIME_Msg}"
|
||||
Binding="{Binding sUnitTime}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="RAWPARTSTAT">
|
||||
<TabItem.Content>
|
||||
<EgwWPFBaseLib:EgwDataGrid x:Name="dgRawPartStatistics"
|
||||
ItemsSource="{Binding RawPartList}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Extended"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="0,0,0,5"
|
||||
ColumnLayouts="{Binding RawPartStatisticsColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.Resources>
|
||||
<!--W - Larghezza-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--H - Altezza-->
|
||||
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--L - Lunghezza-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.L_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 Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--QTY - Quantita'-->
|
||||
<DataGridTextColumn x:Key="colQTY" Binding="{Binding nQuantity, Mode=TwoWay}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.QTY_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Resources>
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
<dxg:GridControl x:Name="dgRawPartStatistics_GridControl"
|
||||
ItemsSource="{Binding RawPartList}"
|
||||
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="dgRawPartStatistics_TableView"
|
||||
ShowGridMenu="OnShowGridMenu2"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="sW"
|
||||
Header="{Binding W_Msg}"
|
||||
Binding="{Binding sW}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sH"
|
||||
Header="{Binding H_Msg}"
|
||||
Binding="{Binding sH}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
Header="{Binding L_Msg}"
|
||||
Binding="{Binding sL}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMaterial"
|
||||
Header="{Binding MAT_Msg}"
|
||||
Binding="{Binding sMaterial}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="Custom"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="nQuantity"
|
||||
Header="{Binding QTY_Msg}"
|
||||
Binding="{Binding nQuantity}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
|
||||
</TabControl>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
|
||||
@@ -1,10 +1,204 @@
|
||||
Public Class OptimizerStatisticsV
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.IO
|
||||
|
||||
Public Class OptimizerStatisticsV
|
||||
|
||||
Private m_StatisticsVM As StatisticsVM
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
Private m_sDataGridLayoutPath2 As String = ""
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\NewDataGridLayoutFile6.json"
|
||||
m_sDataGridLayoutPath2 = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\NewDataGridLayoutFile7.json"
|
||||
|
||||
Map.refStatisticsVM.LoadRawPart()
|
||||
|
||||
For Each Column In dgOptimizerStatistics_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
DXSerializer.AddAllowPropertyHandler(dgOptimizerStatistics_GridControl, AddressOf OnAddAllowProperty)
|
||||
|
||||
For Each Column In dgRawPartStatistics_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
DXSerializer.AddAllowPropertyHandler(dgRawPartStatistics_GridControl, AddressOf OnAddAllowProperty)
|
||||
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
|
||||
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
|
||||
e.Allow = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.Property.Name = "FilterString" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilters" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilterList" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
|
||||
e.Allow = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' salvataggio del layout colonne
|
||||
Public Sub SaveStatisticGridControlLayout()
|
||||
dgOptimizerStatistics_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub SaveStatisticGridControlLayout2()
|
||||
dgRawPartStatistics_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath2)
|
||||
End Sub
|
||||
|
||||
Public Sub IsVisibleGroupSummary(bValue As Boolean)
|
||||
If bValue AndAlso dgOptimizerStatistics_GridControl.GroupSummary.Count = 0 Then
|
||||
dgOptimizerStatistics_GridControl.GroupSummary.Clear()
|
||||
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "Name",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "Name"}
|
||||
dgOptimizerStatistics_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
End If
|
||||
dgOptimizerStatistics_TableView.ShowGroupFooters = bValue
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_StatisticsVM = Me.DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_StatisticsVM.refSaveStatisticGridControlLayout = AddressOf SaveStatisticGridControlLayout
|
||||
m_StatisticsVM.refSaveStatisticGridControlLayout = AddressOf SaveStatisticGridControlLayout2
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
dgOptimizerStatistics_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||
End If
|
||||
If Not IsNothing(m_sDataGridLayoutPath2) AndAlso File.Exists(m_sDataGridLayoutPath2) Then
|
||||
dgRawPartStatistics_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath2)
|
||||
End If
|
||||
|
||||
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
|
||||
IsVisibleGroupSummary(False)
|
||||
End Sub
|
||||
|
||||
Private Sub PrintBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyToClipboardBtn.Click
|
||||
m_StatisticsVM = Me.DataContext()
|
||||
CopyToClipboard(dgOptimizerStatistics, dgRawPartStatistics, m_StatisticsVM)
|
||||
'CopyToClipboard(dgOptimizerStatistics, dgRawPartStatistics, m_StatisticsVM)
|
||||
If Map.refStatisticsVM.bRawPart_IsChecked Then
|
||||
dgRawPartStatistics_GridControl.CopyToClipboard()
|
||||
Else
|
||||
dgOptimizerStatistics_GridControl.CopyToClipboard()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (dgOptimizerStatistics_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgOptimizerStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgOptimizerStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
dgOptimizerStatistics_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu2(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (dgRawPartStatistics_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged2
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick2
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged2(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgRawPartStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick2(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgRawPartStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
dgRawPartStatistics_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<Grid x:Class="PDFEditorV"
|
||||
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"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxpdf="http://schemas.devexpress.com/winfx/2008/xaml/pdf">
|
||||
|
||||
<Grid.Resources>
|
||||
<OPTIMIZER:ColumnNameConverter x:Key="ColumnNameConverter"/>
|
||||
@@ -145,8 +147,42 @@
|
||||
Style="{StaticResource PDF_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<OPTIMIZER:PdfViewer PdfPath="{Binding WebAddress}"
|
||||
Visibility="{Binding PdfViewer_Visibility}"/>
|
||||
<AdornerDecorator>
|
||||
<dxpdf:PdfViewerControl x:Name="PDFViewer"
|
||||
CommandBarStyle="None"
|
||||
Visibility="{Binding PdfViewer_Visibility}">
|
||||
<dxpdf:PdfViewerControl.CommandProvider>
|
||||
<dxpdf:PdfCommandProvider>
|
||||
<dxpdf:PdfCommandProvider.RibbonActions>
|
||||
<dxb:RemoveAction ContainerName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.ContextMenu}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.HandTool}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.SelectAll}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.SelectTool}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.MarqueeZoom}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.ClockwiseRotate}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.FindContext}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.PrintContext}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.Properties}"/>
|
||||
<dxb:UpdateAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.Ribbon}"
|
||||
PropertyName="ShowApplicationButton"
|
||||
Value="False"/>
|
||||
</dxpdf:PdfCommandProvider.RibbonActions>
|
||||
</dxpdf:PdfCommandProvider>
|
||||
</dxpdf:PdfViewerControl.CommandProvider>
|
||||
<dxpdf:PdfViewerControl.ThumbnailsViewerSettings>
|
||||
<dxpdf:PdfThumbnailsViewerSettings HideThumbnailsViewer="True"/>
|
||||
</dxpdf:PdfViewerControl.ThumbnailsViewerSettings>
|
||||
<dxpdf:PdfViewerControl.AttachmentsViewerSettings>
|
||||
<dxpdf:PdfAttachmentsViewerSettings HideAttachmentsViewer="True"/>
|
||||
</dxpdf:PdfViewerControl.AttachmentsViewerSettings>
|
||||
<dxpdf:PdfViewerControl.CommentViewerSettings>
|
||||
<dxpdf:PdfCommentViewerSettings HideCommentViewer="True"/>
|
||||
</dxpdf:PdfViewerControl.CommentViewerSettings>
|
||||
<dxpdf:PdfViewerControl.OutlinesViewerSettings>
|
||||
<dxpdf:PdfOutlinesViewerSettings HideOutlinesViewer="True"/>
|
||||
</dxpdf:PdfViewerControl.OutlinesViewerSettings>
|
||||
</dxpdf:PdfViewerControl>
|
||||
</AdornerDecorator>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
DataContext = New PDFEditorVM()
|
||||
|
||||
MapV.SetRefPDFEditorV(Me)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -125,6 +125,7 @@ Public Class PDFEditorVM
|
||||
SetPdfViewer_Visibility(True)
|
||||
Configuration.CreatePrintPDF(PDFPage.VIEW, True)
|
||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
||||
MapV.refPDFEditorV.PDFViewer.OpenDocument(WebAddress)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -159,7 +160,8 @@ Public Class PDFEditorVM
|
||||
Case VIEW_BUTTON.PDF
|
||||
SetPdfViewer_Visibility(True)
|
||||
Configuration.CreatePrintPDF(PDFPage.MACHING, True)
|
||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf")
|
||||
MapV.refPDFEditorV.PDFViewer.OpenDocument(WebAddress)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -182,6 +184,7 @@ Public Class PDFEditorVM
|
||||
Public Sub ClosePreview()
|
||||
Try
|
||||
File.Delete(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
||||
File.Delete(Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf")
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Errore! Cancellazione dei file pdf fallita")
|
||||
End Try
|
||||
|
||||
@@ -2,148 +2,100 @@
|
||||
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:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<EgwWPFBaseLib:EgwDataGrid x:Name="dgStatistics"
|
||||
ItemsSource="{Binding Tag.BTLPartVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:StatisticsV}}}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Extended"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="0,0,0,5"
|
||||
ColumnLayouts="{Binding StatisticsColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.Resources>
|
||||
<!--PDN - Nome-->
|
||||
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--W - Larghezza-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}" SortMemberPath="dW">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=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 Path=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 Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--NAM - Descrizione-->
|
||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sNAM}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=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 Path=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="{Binding Path=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 Path=DataContext.ADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--INPROD - IN OTTIMIZZAZIONE-->
|
||||
<DataGridTextColumn x:Key="colINPROD" Binding="{Binding nINPROD}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=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 Path=DataContext.DONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--UNITVOLUME - VOLUME UNITARIO-->
|
||||
<DataGridTextColumn x:Key="colUNITVOLUME" Binding="{Binding sUnitVolume}" SortMemberPath="dUnitVolume">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.UNIT_VOLUME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--TOTVOLUME - VOLUME TOTALE-->
|
||||
<DataGridTextColumn x:Key="colTOTVOLUME" Binding="{Binding sTotVolume}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.TOT_VOLUME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--CALCTIME - TEMPO UNITARIO STIMATO-->
|
||||
<DataGridTextColumn x:Key="colUNITTIME" Binding="{Binding sUnitTime}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.UNIT_TIME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--CALCTIME - TEMPO TOTALE STIMATO-->
|
||||
<DataGridTextColumn x:Key="colTOTTIME" Binding="{Binding sTotTime}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.TOT_TIME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
|
||||
</DataGrid.Resources>
|
||||
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
|
||||
<dxg:GridControl x:Name="dgStatistics_GridControl"
|
||||
ItemsSource="{Binding Tag.BTLPartVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:StatisticsV}}}"
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="dgStatistics_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="nPDN"
|
||||
Header="{Binding PDN_Msg}"
|
||||
Fixed="Left"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sW"
|
||||
SortFieldName="dW"
|
||||
Header="{Binding W_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sH"
|
||||
SortFieldName="dH"
|
||||
Header="{Binding H_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
SortFieldName="dL"
|
||||
Header="{Binding L_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sNAM"
|
||||
Header="{Binding NAM_Msg}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="CheckedList"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMATERIAL"
|
||||
Header="{Binding MAT_Msg}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="Custom"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sCNT"
|
||||
Header="{Binding CNT_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sADDED"
|
||||
Header="{Binding ADDED_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="nINPROD"
|
||||
Header="{Binding INPROD_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="nDONE"
|
||||
Header="{Binding DONE_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUnitVolume"
|
||||
SortFieldName="dUnitVolume"
|
||||
Header="{Binding UNIT_VOLUME_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sTotVolume"
|
||||
SortFieldName="dTotVolume"
|
||||
Header="{Binding TOT_VOLUME_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUnitTime"
|
||||
SortFieldName="dUnitTime"
|
||||
Header="{Binding UNIT_TIME_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sTotTime"
|
||||
SortFieldName="dTotTime"
|
||||
Header="{Binding TOT_TIME_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
Style="{StaticResource Statistics_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -1,10 +1,153 @@
|
||||
Public Class StatisticsV
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.IO
|
||||
|
||||
Public Class StatisticsV
|
||||
|
||||
Private m_StatisticsVM As StatisticsVM
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\NewDataGridLayoutFile4.json"
|
||||
|
||||
For Each Column In dgStatistics_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
DXSerializer.AddAllowPropertyHandler(dgStatistics_GridControl, AddressOf OnAddAllowProperty)
|
||||
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
|
||||
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
|
||||
e.Allow = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.Property.Name = "FilterString" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilters" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilterList" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
|
||||
e.Allow = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' salvataggio del layout colonne
|
||||
Public Sub SaveStatisticGridControlLayout()
|
||||
dgStatistics_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub IsVisibleGroupSummary(bValue As Boolean)
|
||||
If bValue AndAlso dgStatistics_GridControl.GroupSummary.Count = 0 Then
|
||||
dgStatistics_GridControl.GroupSummary.Clear()
|
||||
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nPDN",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "nPDN"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
|
||||
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sADDED"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
|
||||
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nINPROD",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nINPROD"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(INPRODGroupSummaryItem)
|
||||
Dim DONEGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nDONE",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nDONE"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
|
||||
End If
|
||||
dgStatistics_TableView.ShowGroupFooters = bValue
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_StatisticsVM = Me.DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_StatisticsVM.refSaveStatisticGridControlLayout = AddressOf SaveStatisticGridControlLayout
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
dgStatistics_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||
End If
|
||||
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
|
||||
IsVisibleGroupSummary(False)
|
||||
End Sub
|
||||
|
||||
Private Sub PrintBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyToClipboardBtn.Click
|
||||
m_StatisticsVM = Me.DataContext()
|
||||
ExportToExcelAndCsv(dgStatistics, m_StatisticsVM)
|
||||
'ExportToExcelAndCsv(dgStatistics, m_StatisticsVM)
|
||||
dgStatistics_GridControl.CopyToClipboard()
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (dgStatistics_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
dgStatistics_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class StatisticsVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public refSaveStatisticGridControlLayout As Action
|
||||
|
||||
' Evento per chiusura finestra
|
||||
Public Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
@@ -395,6 +397,11 @@ Public Class StatisticsVM
|
||||
{S_OPTIMIZERSTATISTICS, OptimizerStatisticsColumns},
|
||||
{S_RAWPARTSTATISTICS, RawPartStatisticsColumns}}
|
||||
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, DataGridColumnDictionary)
|
||||
|
||||
If Not IsNothing(refSaveStatisticGridControlLayout) Then
|
||||
refSaveStatisticGridControlLayout()
|
||||
End If
|
||||
|
||||
' Chiudo finestra senza fare niente
|
||||
RaiseEvent m_CloseWindow(False)
|
||||
End Sub
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
Title="StatisticWnd"
|
||||
MaxHeight="600"
|
||||
Width="1300"
|
||||
Style="{StaticResource OptimizerWindow.Dialog}">
|
||||
Style="{StaticResource OptimizerWindow.Dialog}"
|
||||
Closed="OptimizerWindow_Closed">
|
||||
|
||||
<TabControl Name="Statistic_TabControl"
|
||||
SelectedIndex="0"
|
||||
|
||||
@@ -19,4 +19,9 @@
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
Private Sub OptimizerWindow_Closed(sender As Object, e As EventArgs)
|
||||
If Not IsNothing(m_StatisticsVM.refSaveStatisticGridControlLayout) Then
|
||||
m_StatisticsVM.refSaveStatisticGridControlLayout()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -42,12 +42,15 @@ Module Configuration
|
||||
ElseIf ActivePage = Pages.MACHINING AndAlso Not bPreview Then
|
||||
sFileName = ProjectManagerVM.CurrProd.sProdDirPath & "\" & ProjectManagerVM.CurrProd.sProdId & " - " & "Statistics.pdf"
|
||||
ElseIf ActivePage = Pages.MACHINING AndAlso bPreview Then ' Se la pagina e' 1 e' bPreview e' True creo PDF Optimizer
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf"
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf"
|
||||
PrevSelect()
|
||||
End If
|
||||
Dim renderer As New PdfDocumentRenderer() With {
|
||||
Dim renderer As New PdfDocumentRenderer(True) With {
|
||||
.Document = document}
|
||||
renderer.RenderDocument()
|
||||
renderer.PdfDocument.Options.FlateEncodeMode = PdfSharp.Pdf.PdfFlateEncodeMode.BestCompression
|
||||
renderer.PdfDocument.Options.UseFlateDecoderForJpegImages = PdfSharp.Pdf.PdfUseFlateDecoderForJpegImages.Automatic
|
||||
renderer.PdfDocument.Options.CompressContentStreams = True
|
||||
renderer.PdfDocument.Save(sFileName)
|
||||
If Not bPreview Then Process.Start(sFileName)
|
||||
Catch ex As Exception
|
||||
@@ -67,51 +70,4 @@ Module Configuration
|
||||
EgtZoom(ZM.ALL, True)
|
||||
End Sub
|
||||
|
||||
Public Sub SaveEml(message As MailMessage, filename As String)
|
||||
Dim boundary As String = "====BOUNDARY_" & Guid.NewGuid().ToString() & "===="
|
||||
Dim sb As New StringBuilder()
|
||||
|
||||
' Intestazioni principali
|
||||
sb.AppendLine("To: " & String.Join(";", message.To.Select(Function(t) t.Address)))
|
||||
If message.CC.Count > 0 Then
|
||||
sb.AppendLine("Cc: " & String.Join(";", message.CC.Select(Function(t) t.Address)))
|
||||
End If
|
||||
sb.AppendLine("Subject: " & message.Subject)
|
||||
|
||||
sb.AppendLine("X-Unsent: 1")
|
||||
sb.AppendLine("MIME-Version: 1.0")
|
||||
sb.AppendLine("Content-Type: multipart/mixed; boundary=""" & boundary & """")
|
||||
sb.AppendLine()
|
||||
|
||||
' Corpo HTML
|
||||
sb.AppendLine("--" & boundary)
|
||||
sb.AppendLine("Content-Type: text/html; charset=utf-8")
|
||||
sb.AppendLine("Content-Transfer-Encoding: quoted-printable")
|
||||
sb.AppendLine()
|
||||
sb.AppendLine(message.Body)
|
||||
sb.AppendLine()
|
||||
|
||||
' Allegati
|
||||
For Each att As Attachment In message.Attachments
|
||||
Dim ms As New MemoryStream()
|
||||
att.ContentStream.Position = 0
|
||||
att.ContentStream.CopyTo(ms)
|
||||
Dim bytes = ms.ToArray()
|
||||
Dim base64 = Convert.ToBase64String(bytes, Base64FormattingOptions.InsertLineBreaks)
|
||||
|
||||
sb.AppendLine("--" & boundary)
|
||||
sb.AppendLine("Content-Type: " & att.ContentType.MediaType & "; name=""" & att.Name & """")
|
||||
sb.AppendLine("Content-Disposition: attachment; filename=""" & att.Name & """")
|
||||
sb.AppendLine("Content-Transfer-Encoding: base64")
|
||||
sb.AppendLine()
|
||||
sb.AppendLine(base64)
|
||||
sb.AppendLine()
|
||||
Next
|
||||
|
||||
' Fine MIME
|
||||
sb.AppendLine("--" & boundary & "--")
|
||||
' Salvataggio file
|
||||
File.WriteAllText(filename, sb.ToString(), Encoding.UTF8)
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
<BitmapImage x:Key="HeaderSetting_Image" UriSource="/Resources/NewPage/SettingIntestazione.png"/>
|
||||
<BitmapImage x:Key="Setting_Image" UriSource="/Resources/NewPage/Setting.png"/>
|
||||
<BitmapImage x:Key="Edit_Image" UriSource="/Resources/CALCPanel/Edit.png"/>
|
||||
<BitmapImage x:Key="HeaderEdit_Image" UriSource="/Resources/NewPage/EditIntestazione.png"/>
|
||||
<BitmapImage x:Key="Ok_Image" UriSource="/Resources/NewPage/Ok.png"/>
|
||||
<BitmapImage x:Key="Delete_Image" UriSource="/Resources/PDFEditor/Delete.png"/>
|
||||
<BitmapImage x:Key="CopyPart_Image" UriSource="/Resources/LeftPanel/CopyPart.png"/>
|
||||
@@ -809,7 +810,7 @@
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
<Setter Property="Margin" Value="2.5,2.5,2.5,2.5"/>
|
||||
<Setter Property="Margin" Value="2.5,3,2.5,3"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="NameBTL_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
|
||||
@@ -2792,6 +2793,43 @@
|
||||
<Setter Property="ShowSearchPanelNavigationButtons" Value="True"/>
|
||||
<Setter Property="UseEvenRowBackground" Value="True"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="EditTableViewStyle" TargetType="{x:Type dxg:TableView}">
|
||||
<Setter Property="AllowPerPixelScrolling" Value="True"/>
|
||||
<Setter Property="AllowEditing" Value="True"/>
|
||||
<Setter Property="AllowSorting" Value="True"/>
|
||||
<Setter Property="AllowGrouping" Value="True"/>
|
||||
<Setter Property="AllowColumnFiltering" Value="True"/>
|
||||
<Setter Property="AllowFilterEditor" Value="False"/>
|
||||
<Setter Property="AllowFilterPanelNavigation" Value="False"/>
|
||||
<Setter Property="AlternationCount" Value="2"/>
|
||||
<Setter Property="AlternateRowBackground" Value="{StaticResource BeamWall_LinkWater}"/>
|
||||
<Setter Property="AutoWidth" Value="False"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="ExtendScrollBarToFixedColumns" Value="True"/>
|
||||
<Setter Property="EvenRowBackground" Value="{StaticResource BeamWall_BLackSqueeze}"/>
|
||||
<Setter Property="FixedLineWidth" Value="2"/>
|
||||
<Setter Property="Focusable" Value="True"/>
|
||||
<Setter Property="GroupSummaryDisplayMode" Value="AlignByColumns"/>
|
||||
<Setter Property="IsTotalSummaryMenuEnabled" Value="False"/>
|
||||
<Setter Property="IsGroupFooterMenuEnabled" Value="True"/>
|
||||
<Setter Property="LeftGroupAreaIndent" Value="0"/>
|
||||
<Setter Property="NavigationStyle" Value="Cell"/>
|
||||
<Setter Property="RowMinHeight" Value="28"/>
|
||||
<Setter Property="ShowGroupPanel" Value="False"/>
|
||||
<Setter Property="ShowTotalSummary" Value="True"/>
|
||||
<Setter Property="ShowSearchPanelMode" Value="Default"/>
|
||||
<Setter Property="ShowFilterPanelMode" Value="Never"/>
|
||||
<Setter Property="ShowIndicator" Value="False"/>
|
||||
<Setter Property="ShowColumnHeaders" Value="True"/>
|
||||
<Setter Property="ShowHorizontalLines" Value="True"/>
|
||||
<Setter Property="ShowVerticalLines" Value="False"/>
|
||||
<Setter Property="ShowFocusedRectangle" Value="True"/>
|
||||
<Setter Property="ShowGroupFooters" Value="True"/>
|
||||
<Setter Property="ShowSearchPanelResultInfo" Value="True"/>
|
||||
<Setter Property="ShowSearchPanelNavigationButtons" Value="True"/>
|
||||
<Setter Property="UseEvenRowBackground" Value="True"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HeaderStyle" TargetType="{x:Type dxg:BaseGridHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource DataGridColumnHeader.Static.Main.Background}"/>
|
||||
@@ -2836,6 +2874,21 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CellStyle" TargetType="{x:Type dxg:LightweightCellEditor}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="SelectionState" Value="Selected">
|
||||
<Setter Property="Background" Value="{StaticResource RowDataGrid.Selected.Background}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource RowDataGrid.Selected.Foreground}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource RowDataGrid.Selected.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="dxg:GridViewBase.IsFocusedCell" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource RowDataGrid.Selected.Background}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource RowDataGrid.Selected.Foreground}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource RowDataGrid.Selected.Border}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DropDownButtonStyle" TargetType="{x:Type dx:DropDownButton}">
|
||||
<Setter Property="Background" Value="{StaticResource ButtonBasic.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ButtonBasic.Static.Border}"/>
|
||||
@@ -2874,6 +2927,13 @@
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type dxe:TextEdit}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_Kashmir}"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion DevExpress-->
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
Module MapV
|
||||
|
||||
Private m_refSplashScreenV As SplashScreenV
|
||||
Private m_refPDFEditorV As PDFEditorV
|
||||
|
||||
#Region "Get"
|
||||
|
||||
|
||||
Public ReadOnly Property refSplashScreenV As SplashScreenV
|
||||
Get
|
||||
Return m_refSplashScreenV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refPDFEditorV As PDFEditorV
|
||||
Get
|
||||
Return m_refPDFEditorV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
#Region "Set"
|
||||
@@ -20,6 +26,11 @@
|
||||
Return Not IsNothing(m_refSplashScreenV)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefPDFEditorV(PDFEditorV As PDFEditorV) As Boolean
|
||||
m_refPDFEditorV = PDFEditorV
|
||||
Return Not IsNothing(m_refPDFEditorV)
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
End Module
|
||||
|
||||
@@ -270,6 +270,7 @@ Public Class SIEMENSSharp7Comm
|
||||
End If
|
||||
Return bResult
|
||||
End Select
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region ' Read Variables
|
||||
|
||||
@@ -252,8 +252,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2701, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 3106, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 3106, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.1.5.3")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.3")>
|
||||
<Assembly: AssemblyVersion("3.1.6.2")>
|
||||
<Assembly: AssemblyFileVersion("3.1.6.2")>
|
||||
|
||||
Reference in New Issue
Block a user