Merge commit 'bc42b200a1cfac69310501b4e3dc7691a360f440' into feature/DevExpress-RawPartList
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
|
||||
Public Class EgtMessageBoxV
|
||||
|
||||
@@ -26,18 +25,6 @@ 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)>
|
||||
|
||||
@@ -302,11 +302,7 @@
|
||||
|
||||
<!--#region Colori ComboBox-->
|
||||
|
||||
<!--<SolidColorBrush x:Key="ComboBox.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>-->
|
||||
<LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="{StaticResource BeamWall_Gallery_Color}" Offset="0.0"/>
|
||||
<GradientStop Color="{StaticResource BeamWall_Mercury_Color}" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Border" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||
<SolidColorBrush x:Key="ComboBox.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class AboutBoxV
|
||||
|
||||
|
||||
@@ -106,7 +106,11 @@ Public Class AddFeatureWndVM
|
||||
GetMacroListDefault(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
||||
' ricavo lista file Macro Custom
|
||||
GetMacroListCustom(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
||||
MacroList_IsEnabled = If(MacroCustomList.Count > 0, True, False)
|
||||
If MacroCustomList.Count > 0 Then
|
||||
MacroList_IsEnabled = True
|
||||
Else
|
||||
MacroList_IsEnabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(nSelPRC))
|
||||
|
||||
@@ -147,7 +147,7 @@ Public Class AddPartWndVM
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Ok_Command"
|
||||
#Region "Ok"
|
||||
|
||||
Public ReadOnly Property Ok_Command As ICommand
|
||||
Get
|
||||
@@ -169,7 +169,7 @@ Public Class AddPartWndVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Ok_Command
|
||||
#End Region ' Ok
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ Public Class AddRawPartWndVM
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Ok_Command"
|
||||
#Region "Ok"
|
||||
|
||||
Public ReadOnly Property Ok_Command As ICommand
|
||||
Get
|
||||
@@ -167,7 +167,7 @@ Public Class AddRawPartWndVM
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Ok_Command
|
||||
#End Region ' Ok
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
|
||||
@@ -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.Core;assembly=EgtBEAMWALL.Core">
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
@@ -838,7 +838,7 @@ Public Class BTLDataWndVM
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Ok_Command"
|
||||
#Region "Ok"
|
||||
|
||||
Public ReadOnly Property Ok_Command As ICommand
|
||||
Get
|
||||
@@ -865,9 +865,9 @@ Public Class BTLDataWndVM
|
||||
RaiseEvent m_CloseWindow(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Ok_Command
|
||||
#End Region ' Ok
|
||||
|
||||
#Region "Cancel_Command"
|
||||
#Region "Cancel"
|
||||
|
||||
Public ReadOnly Property Cancel_Command As ICommand
|
||||
Get
|
||||
@@ -882,7 +882,7 @@ Public Class BTLDataWndVM
|
||||
RaiseEvent m_CloseWindow(False)
|
||||
End Sub
|
||||
|
||||
#End Region ' Cancel_Command
|
||||
#End Region ' Cancel
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
|
||||
@@ -1,66 +1,4 @@
|
||||
<dxb:PopupMenu x:Class="BTLPartManagerV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:dxt="http://schemas.devexpress.com/winfx/2008/xaml/core/themekeys"
|
||||
DataContext="{StaticResource BTLPartManagerVM}"
|
||||
Background="{StaticResource Border.BTLPartManager.Background}"
|
||||
BorderBrush="{StaticResource Border.BTLPartManager.Border}"
|
||||
BorderThickness="2"
|
||||
CornerRadius="5"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
|
||||
<dxb:BarItemMenuHeader ShowContentHeader="False"
|
||||
ItemsOrientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<dxb:BarButtonItem Command="{Binding CopyPart_Command}"
|
||||
ToolTip="{Binding CopyPart_ToolTip}"
|
||||
IsEnabled="{Binding CopyPart_IsEnabled}"
|
||||
Glyph="{StaticResource CopyPart_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource CopyPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
<dxb:BarButtonItem Command="{Binding RemovePart_Command}"
|
||||
ToolTip="{Binding RemovePart_ToolTip}"
|
||||
IsEnabled="{Binding RemovePart_IsEnabled}"
|
||||
Glyph="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
<dxb:BarButtonItem ToolTip="{Binding Simulate_ToolTip}"
|
||||
Command="{Binding Simulate_Command}"
|
||||
IsEnabled="{Binding Simulate_IsEnabled}"
|
||||
Glyph="{StaticResource Simulate_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource Simulate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
<dxb:BarButtonItem ToolTip="{Binding Edit_ToolTip}"
|
||||
Command="{Binding Edit_Command}"
|
||||
IsEnabled="{Binding Edit_IsEnabled}"
|
||||
Glyph="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
<dxb:BarButtonItem Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||
Glyph="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
</dxb:BarItemMenuHeader>
|
||||
|
||||
</dxb:PopupMenu>
|
||||
<!--<Border x:Class="BTLPartManagerV"
|
||||
<Border x:Class="BTLPartManagerV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
DataContext="{StaticResource BTLPartManagerVM}"
|
||||
@@ -68,6 +6,7 @@
|
||||
|
||||
<StackPanel Style="{StaticResource PartManager_StackPanel}">
|
||||
<Button Command="{Binding CopyPart_Command}"
|
||||
Click="ClosePopUp_Click"
|
||||
ToolTip="{Binding CopyPart_ToolTip}"
|
||||
IsEnabled="{Binding CopyPart_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
@@ -75,6 +14,7 @@
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Command="{Binding RemovePart_Command}"
|
||||
Click="ClosePopUp_Click"
|
||||
ToolTip="{Binding RemovePart_ToolTip}"
|
||||
IsEnabled="{Binding RemovePart_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
@@ -82,6 +22,7 @@
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding Simulate_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Command="{Binding Simulate_Command}"
|
||||
IsEnabled="{Binding Simulate_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
@@ -89,6 +30,7 @@
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding Edit_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Command="{Binding Edit_Command}"
|
||||
IsEnabled="{Binding Edit_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
@@ -96,6 +38,7 @@
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Command="{Binding ResetCalc_Command}"
|
||||
Click="ClosePopUp_Click"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
@@ -104,4 +47,4 @@
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</Border>-->
|
||||
</Border>
|
||||
|
||||
@@ -183,7 +183,7 @@ Public Class BTLPartManagerVM
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "CopyPart_Command"
|
||||
#Region "CopyPart"
|
||||
|
||||
Public ReadOnly Property CopyPart_Command As ICommand
|
||||
Get
|
||||
@@ -207,9 +207,9 @@ Public Class BTLPartManagerVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' CopyPart_Command
|
||||
#End Region ' CopyPart
|
||||
|
||||
#Region "RemovePart_Command"
|
||||
#Region "RemovePart"
|
||||
|
||||
Public ReadOnly Property RemovePart_Command As ICommand
|
||||
Get
|
||||
@@ -297,9 +297,9 @@ Public Class BTLPartManagerVM
|
||||
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||
End Sub
|
||||
|
||||
#End Region ' RemovePart_Command
|
||||
#End Region ' RemovePart
|
||||
|
||||
#Region "Simulate_Command"
|
||||
#Region "SimulateCommand"
|
||||
|
||||
Public ReadOnly Property Simulate_Command As ICommand
|
||||
Get
|
||||
@@ -344,9 +344,9 @@ Public Class BTLPartManagerVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' Simulate_Command
|
||||
#End Region ' SimulateCommand
|
||||
|
||||
#Region "Edit_Command"
|
||||
#Region "Edit"
|
||||
|
||||
Public ReadOnly Property Edit_Command As ICommand
|
||||
Get
|
||||
@@ -391,9 +391,9 @@ Public Class BTLPartManagerVM
|
||||
Map.refProjectVM.SetLeftPanel_Opacity(0.2)
|
||||
End Sub
|
||||
|
||||
#End Region ' Edit_Command
|
||||
#End Region ' Edit
|
||||
|
||||
#Region "ResetCalc_Command"
|
||||
#Region "ResetCalc"
|
||||
|
||||
Public ReadOnly Property ResetCalc_Command As ICommand
|
||||
Get
|
||||
@@ -422,7 +422,7 @@ Public Class BTLPartManagerVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ResetCalc_Command
|
||||
#End Region ' ResetCalc
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
|
||||
@@ -293,12 +293,6 @@ Public Class BTLFeatureVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sFeature_Name As String
|
||||
Get
|
||||
Return $"[{nSelGRP}-{nPRC:000}] {sName}"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property Edit_ToolTip As String
|
||||
@@ -487,7 +481,7 @@ Public Class BTLFeatureVM
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "DeleteFeature_Command"
|
||||
#Region "DeleteFeature"
|
||||
|
||||
Public ReadOnly Property DeleteFeature_Command As ICommand
|
||||
Get
|
||||
@@ -502,9 +496,9 @@ Public Class BTLFeatureVM
|
||||
Map.refFeatureListManagerVM.RemoveFeature()
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteFeature_Command
|
||||
#End Region ' DeleteFeature
|
||||
|
||||
#Region "Edit_Command"
|
||||
#Region "Edit"
|
||||
|
||||
Public ReadOnly Property Edit_Command As ICommand
|
||||
Get
|
||||
@@ -520,9 +514,9 @@ Public Class BTLFeatureVM
|
||||
Map.refFreeContourManagerVM.Open()
|
||||
End Sub
|
||||
|
||||
#End Region ' Edit_Command
|
||||
#End Region ' Edit
|
||||
|
||||
#Region "Save_Command"
|
||||
#Region "Save"
|
||||
|
||||
Public ReadOnly Property Save_Command As ICommand
|
||||
Get
|
||||
@@ -543,9 +537,9 @@ Public Class BTLFeatureVM
|
||||
Map.refFreeContourManagerVM.Close(True)
|
||||
End Sub
|
||||
|
||||
#End Region ' Save_Command
|
||||
#End Region ' Save
|
||||
|
||||
#Region "Cancel_Command"
|
||||
#Region "Cancel"
|
||||
|
||||
Public ReadOnly Property Cancel_Command As ICommand
|
||||
Get
|
||||
@@ -561,9 +555,9 @@ Public Class BTLFeatureVM
|
||||
Map.refFreeContourManagerVM.Close(False)
|
||||
End Sub
|
||||
|
||||
#End Region ' Cancel_Command
|
||||
#End Region ' Cancel
|
||||
|
||||
#Region "Strategy_Command"
|
||||
#Region "Strategy"
|
||||
|
||||
Public ReadOnly Property Strategy_Command As ICommand
|
||||
Get
|
||||
@@ -582,9 +576,9 @@ Public Class BTLFeatureVM
|
||||
Map.refForcedStrategyPanelVM.Init(BTLFeatureM)
|
||||
End Sub
|
||||
|
||||
#End Region ' Strategy_Command
|
||||
#End Region ' Strategy
|
||||
|
||||
#Region "EditFeature_Command"
|
||||
#Region "EditFeature"
|
||||
|
||||
Public ReadOnly Property EditFeature_Command As ICommand
|
||||
Get
|
||||
@@ -613,7 +607,7 @@ Public Class BTLFeatureVM
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' EditFeature_Command
|
||||
#End Region ' EditFeature
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ Public Class BTLPartVM
|
||||
Return m_BTLPartM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_BTLStructureM As BTLStructureM
|
||||
|
||||
Public ReadOnly Property nPartId As Integer
|
||||
@@ -1376,13 +1375,13 @@ Public Class BTLPartVM
|
||||
|
||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_BTLPartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
|
||||
Return If(m_BTLPartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_BTLPartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Hidden)
|
||||
Return If(m_BTLPartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -2234,26 +2233,11 @@ Public Class BTLPartVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Sub BackRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True)
|
||||
' salvo sezione impostata
|
||||
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
|
||||
' ruoto
|
||||
Rotation(False, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw)
|
||||
' imposto lock
|
||||
bLockRotation = True
|
||||
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
|
||||
If bUpdateSection AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
|
||||
' se esiste, imposto sezione inversa
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
|
||||
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Invert_Command"
|
||||
#Region "Invert"
|
||||
|
||||
Public ReadOnly Property Invert_Command As ICommand
|
||||
Get
|
||||
@@ -2275,9 +2259,41 @@ Public Class BTLPartVM
|
||||
NotifyPropertyChanged(NameOf(sINVERTED))
|
||||
End Sub
|
||||
|
||||
#End Region ' Invert_Command
|
||||
#End Region ' Invert
|
||||
|
||||
#Region "ForwardRotation_Command"
|
||||
#Region "BackRotation"
|
||||
|
||||
Public ReadOnly Property BackRotation_Command As ICommand
|
||||
Get
|
||||
If m_cmdBackRotation Is Nothing Then
|
||||
m_cmdBackRotation = New Command(AddressOf BackRotationCmd)
|
||||
End If
|
||||
Return m_cmdBackRotation
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub BackRotationCmd()
|
||||
BackRotation(True)
|
||||
End Sub
|
||||
|
||||
Public Sub BackRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True)
|
||||
' salvo sezione impostata
|
||||
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
|
||||
' ruoto
|
||||
Rotation(False, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw)
|
||||
' imposto lock
|
||||
bLockRotation = True
|
||||
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
|
||||
If bUpdateSection AndAlso Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM AndAlso CurrSection <> SectionXMaterial.Empty Then
|
||||
' se esiste, imposto sezione inversa
|
||||
Dim InverseSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SectionList.FirstOrDefault(Function(x) x.dH = CurrSection.dW AndAlso x.dW = CurrSection.dH AndAlso x.sMaterial(0) = CurrSection.sMaterial(0))
|
||||
If Not IsNothing(InverseSection) Then Map.refProjectVM.BTLStructureVM.SetSelSection(InverseSection)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' BackRotation
|
||||
|
||||
#Region "ForwardRotation"
|
||||
|
||||
Public ReadOnly Property ForwardRotation_Command As ICommand
|
||||
Get
|
||||
@@ -2306,7 +2322,7 @@ Public Class BTLPartVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ForwardRotation_Command
|
||||
#End Region ' ForwardRotation
|
||||
|
||||
' Comando inutilizzato ma conservato per eventuale rotazione a causa di importazione con rotazione sbagliata
|
||||
#Region "XRotation"
|
||||
@@ -2349,7 +2365,7 @@ Public Class BTLPartVM
|
||||
|
||||
#End Region ' XRotation
|
||||
|
||||
#Region "PartColour_Command"
|
||||
#Region "PartColour"
|
||||
|
||||
Public ReadOnly Property PartColour_Command As ICommand
|
||||
Get
|
||||
@@ -2381,9 +2397,9 @@ Public Class BTLPartVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' PartColour_Command
|
||||
#End Region ' PartColour
|
||||
|
||||
#Region "Verify_Command"
|
||||
#Region "Verify"
|
||||
|
||||
Public ReadOnly Property Verify_Command As ICommand
|
||||
Get
|
||||
@@ -2401,9 +2417,9 @@ Public Class BTLPartVM
|
||||
Return
|
||||
End Sub
|
||||
|
||||
#End Region ' Verify_Command
|
||||
#End Region ' Verify
|
||||
|
||||
#Region "AddToRawPart_Command"
|
||||
#Region "AddToRawPart"
|
||||
|
||||
Public ReadOnly Property AddToRawPart_Command As ICommand
|
||||
Get
|
||||
@@ -2698,9 +2714,9 @@ Public Class BTLPartVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' AddToRawPart_Command
|
||||
#End Region ' AddToRawPart
|
||||
|
||||
#Region "SelectAllFeature_Command"
|
||||
#Region "SelectAllFeature"
|
||||
|
||||
Public ReadOnly Property SelectAllFeature_Command As ICommand
|
||||
Get
|
||||
@@ -2716,9 +2732,9 @@ Public Class BTLPartVM
|
||||
NotifyPropertyChanged(NameOf(bDOALL))
|
||||
End Sub
|
||||
|
||||
#End Region ' SelectAllFeature_Command
|
||||
#End Region ' SelectAllFeature
|
||||
|
||||
#Region "DeselectAllFeature_Command"
|
||||
#Region "DeselectAllFeature"
|
||||
|
||||
Public ReadOnly Property DeselectAllFeature_Command As ICommand
|
||||
Get
|
||||
@@ -2734,9 +2750,9 @@ Public Class BTLPartVM
|
||||
NotifyPropertyChanged(NameOf(bDOALL))
|
||||
End Sub
|
||||
|
||||
#End Region ' DeselectAllFeature_Command
|
||||
#End Region ' DeselectAllFeature
|
||||
|
||||
#Region "SelectItemFeature_Command"
|
||||
#Region "SelectItemFeature"
|
||||
|
||||
Public ReadOnly Property SelectItemFeature_Command As ICommand
|
||||
Get
|
||||
@@ -2758,9 +2774,9 @@ Public Class BTLPartVM
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' SelectItemFeature_Command
|
||||
#End Region ' SelectItemFeature
|
||||
|
||||
#Region "DeselectItemFeature_Command"
|
||||
#Region "DeselectItemFeature"
|
||||
|
||||
Public ReadOnly Property DeselectItemFeature_Command As ICommand
|
||||
Get
|
||||
@@ -2782,7 +2798,7 @@ Public Class BTLPartVM
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' DeselectItemFeature_Command
|
||||
#End Region ' DeselectItemFeature
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
|
||||
@@ -1305,7 +1305,7 @@ Public Class BTLStructureVM
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "DeletePart_Command"
|
||||
#Region "DeletePart"
|
||||
|
||||
Public ReadOnly Property DeletePart_Command() As ICommand
|
||||
Get
|
||||
@@ -1330,9 +1330,9 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' DeletePart_Command
|
||||
#End Region ' DeletePart
|
||||
|
||||
#Region "Data_Command"
|
||||
#Region "Data"
|
||||
|
||||
Public ReadOnly Property Data_Command As ICommand
|
||||
Get
|
||||
@@ -1348,9 +1348,9 @@ Public Class BTLStructureVM
|
||||
BTLDataWnd.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' Data_Command
|
||||
#End Region ' Data
|
||||
|
||||
#Region "AddPart_Command"
|
||||
#Region "AddPart"
|
||||
|
||||
Public ReadOnly Property AddPart_Command As ICommand
|
||||
Get
|
||||
@@ -1402,9 +1402,9 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' AddPart_Command
|
||||
#End Region ' AddPart
|
||||
|
||||
#Region "UpdateBTL_Command"
|
||||
#Region "UpdateBTL"
|
||||
|
||||
Public ReadOnly Property UpdateBTL_Command As ICommand
|
||||
Get
|
||||
@@ -1944,7 +1944,7 @@ Public Class BTLStructureVM
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
#End Region ' UpdateBTL_Command
|
||||
#End Region ' UpdateBTL
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ Public Class BlockedWndVM
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "Save_Command"
|
||||
#Region "Save"
|
||||
|
||||
Public ReadOnly Property Save_Command As ICommand
|
||||
Get
|
||||
@@ -130,9 +130,9 @@ Public Class BlockedWndVM
|
||||
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
|
||||
End Sub
|
||||
|
||||
#End Region ' Save_Command
|
||||
#End Region ' Save
|
||||
|
||||
#Region "DoNotSave_Command"
|
||||
#Region "DoNotSave"
|
||||
|
||||
Public ReadOnly Property DoNotSave_Command As ICommand
|
||||
Get
|
||||
@@ -148,7 +148,7 @@ Public Class BlockedWndVM
|
||||
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
|
||||
End Sub
|
||||
|
||||
#End Region ' DoNotSave_Command
|
||||
#End Region ' DoNotSave
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
|
||||
@@ -1007,15 +1007,6 @@
|
||||
<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>
|
||||
@@ -1245,9 +1236,6 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewPage\arrow.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
|
||||
|
||||
@@ -157,6 +157,21 @@ Public Class ForcedStrategyPanelVM
|
||||
m_StrategyList = New ObservableCollection(Of Strategy)((From JsonAvailableStrategy In JsonAvailableTopology.StrategyList
|
||||
Select JsonAvailableStrategy.Deserialize(ProjectManagerVM.CurrProd.nType, -1)).ToList())
|
||||
End If
|
||||
If File.Exists(sAvailableStrategiesFilePath) Then
|
||||
sReadedFile = File.ReadAllText(sAvailableStrategiesFilePath)
|
||||
Dim JsonStrategyFeatureList As List(Of JsonAvailableStrategyFeature) = JsonConvert.DeserializeObject(Of List(Of JsonAvailableStrategyFeature))(sReadedFile)
|
||||
Dim JsonAvailableStrategyFeature As JsonAvailableStrategyFeature = JsonStrategyFeatureList.FirstOrDefault(Function(x) x.nGrp = nGRP AndAlso x.nPrc = nPRC)
|
||||
If IsNothing(JsonAvailableStrategyFeature) Then Return False
|
||||
Dim JsonAvailableTopology As JsonAvailableTopology = JsonAvailableStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
|
||||
If IsNothing(JsonAvailableTopology) Then
|
||||
' ricavo topologia da feature
|
||||
FindTopologyFromFeature(nFeatureId, sTopologyName)
|
||||
JsonAvailableTopology = JsonAvailableStrategyFeature.TopologyList.FirstOrDefault(Function(x) x.sName = sTopologyName)
|
||||
End If
|
||||
If IsNothing(JsonAvailableTopology) Then Return False
|
||||
m_StrategyList = New ObservableCollection(Of Strategy)((From JsonAvailableStrategy In JsonAvailableTopology.StrategyList
|
||||
Select JsonAvailableStrategy.Deserialize(ProjectManagerVM.CurrProd.nType, -1)).ToList())
|
||||
End If
|
||||
' recupero custom
|
||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nFeatureId))
|
||||
Dim nPartProjId As Integer = 0
|
||||
@@ -266,7 +281,6 @@ Public Class ForcedStrategyPanelVM
|
||||
End Function
|
||||
|
||||
Friend Sub ForcedStrategy()
|
||||
If IsNothing(m_CurrentFeature) Then Return
|
||||
' cancello precedenti valori
|
||||
Dim sPrecStrategyID As String = ""
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, sPrecStrategyID)
|
||||
|
||||
@@ -489,7 +489,6 @@ Public MustInherit Class ProjectParameters
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class BTLPartListV
|
||||
|
||||
@@ -14,145 +8,16 @@ Public Class BTLPartListV
|
||||
Private m_isDraggingSelectionField As FieldInfo
|
||||
Private m_endDraggingMethod As MethodInfo
|
||||
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Private _lastExpanded As Integer = -1
|
||||
|
||||
Private bSelOnFeature As Boolean = False
|
||||
|
||||
Sub New()
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
' Evita il drag sulla selezione multipla
|
||||
'm_isDraggingSelectionField = m_DataGridType.GetField("_isDraggingSelection", BindingFlags.Instance Or BindingFlags.NonPublic)
|
||||
'm_endDraggingMethod = m_DataGridType.GetMethod("EndDragging", BindingFlags.Instance Or BindingFlags.NonPublic)
|
||||
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\BTLPart.json"
|
||||
|
||||
For Each Column In BTLPart_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
DXSerializer.AddAllowPropertyHandler(BTLPart_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 SaveBTLPartGridControlLayout()
|
||||
BTLPart_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub IsVisibleGroupSummary(bValue As Boolean)
|
||||
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"}
|
||||
BTLPart_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
BTLPart_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
|
||||
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sADDED"}
|
||||
BTLPart_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
|
||||
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "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"}
|
||||
BTLPart_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
|
||||
End If
|
||||
BTLPart_TableView.ShowGroupFooters = bValue
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_BTLPartListVM = DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_BTLPartListVM.refSaveBTLPartGridControlLayout = AddressOf SaveBTLPartGridControlLayout
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
BTLPart_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
|
||||
|
||||
' customizzazione ContextMenu del GridControl
|
||||
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 = (BTLPart_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(BTLPart_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(BTLPart_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
BTLPart_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
' Evita il drag sulla selezione multipla
|
||||
m_isDraggingSelectionField = m_DataGridType.GetField("_isDraggingSelection", BindingFlags.Instance Or BindingFlags.NonPublic)
|
||||
m_endDraggingMethod = m_DataGridType.GetMethod("EndDragging", BindingFlags.Instance Or BindingFlags.NonPublic)
|
||||
End Sub
|
||||
|
||||
Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs)
|
||||
@@ -162,6 +27,27 @@ 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
|
||||
' Metto la selezione della feature a false
|
||||
bSelOnFeature = False
|
||||
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
|
||||
@@ -220,62 +106,31 @@ Public Class BTLPartListV
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Private Sub FilterAllBtn_PreviewMouseDown(sender As Object, e As RoutedEventArgs)
|
||||
If FilterSectxMat_Popup.IsOpen Then
|
||||
FilterSectxMat_Popup.IsOpen = False
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Root_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||
If e.Key <> Key.Delete Then Return
|
||||
|
||||
Private Sub FilterAllBtn_Click(sender As Object, e As RoutedEventArgs)
|
||||
If Not FilterSectxMat_Popup.IsOpen Then
|
||||
FilterSectxMat_Popup.IsOpen = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GridControl_MasterRowExpanding(sender As Object, e As DevExpress.Xpf.Grid.RowAllowEventArgs)
|
||||
Dim grid = CType(sender, DevExpress.Xpf.Grid.GridControl)
|
||||
|
||||
' Chiudi solo il precedente
|
||||
If _lastExpanded <> -1 AndAlso _lastExpanded <> e.RowHandle Then
|
||||
grid.SetMasterRowExpanded(_lastExpanded, False)
|
||||
End If
|
||||
|
||||
_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
|
||||
Dim BTLPartVM As BTLPartVM = BTLStructureVM.SelBTLPart
|
||||
Dim BTLFeatureVM As BTLFeatureVM = BTLPartVM?.SelBTLFeatureVM
|
||||
|
||||
If bSelOnFeature AndAlso Not IsNothing(SelBTLFeatureVM) Then
|
||||
If SelBTLFeatureVM.DeleteFeature_Command.CanExecute(Nothing) Then
|
||||
SelBTLFeatureVM.DeleteFeature_Command.Execute(Nothing)
|
||||
If bSelOnFeature AndAlso Not IsNothing(BTLFeatureVM) Then
|
||||
If Not IsNothing(BTLFeatureVM.DeleteFeature_Command) AndAlso BTLFeatureVM.DeleteFeature_Command.CanExecute(Nothing) Then
|
||||
BTLFeatureVM.DeleteFeature_Command.Execute(Nothing)
|
||||
e.Handled = True
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
If BTLStructureVM.DeletePart_Command.CanExecute(Nothing) Then
|
||||
If Not IsNothing(BTLStructureVM.DeletePart_Command) AndAlso 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
|
||||
Private Sub ListBox_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
bSelOnFeature = True
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -9,8 +9,6 @@ Public Class BTLPartListVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend refSaveBTLPartGridControlLayout As Action
|
||||
|
||||
Private m_colPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||
Public ReadOnly Property colPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||
Get
|
||||
@@ -65,17 +63,6 @@ Public Class BTLPartListVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CALCPanel_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property CALCPanel_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_CALCPanel_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetCALCPanel_IsEnabled(value As Boolean)
|
||||
m_CALCPanel_IsEnabled = value
|
||||
NotifyPropertyChanged(NameOf(CALCPanel_IsEnabled))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property PDN_Msg As String
|
||||
@@ -200,11 +187,6 @@ Public Class BTLPartListVM
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdVerifyAll As ICommand
|
||||
Private m_cmdVerifyFlipRotAll As ICommand
|
||||
Private m_cmdResetCalc As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -225,90 +207,6 @@ Public Class BTLPartListVM
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
Friend Sub Close()
|
||||
If Not IsNothing(refSaveBTLPartGridControlLayout) Then
|
||||
refSaveBTLPartGridControlLayout()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "VerifyAll"
|
||||
|
||||
Public ReadOnly Property VerifyAll_Command As ICommand
|
||||
Get
|
||||
If m_cmdVerifyAll Is Nothing Then
|
||||
m_cmdVerifyAll = New Command(AddressOf VerifyAll)
|
||||
End If
|
||||
Return m_cmdVerifyAll
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub VerifyAll()
|
||||
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
|
||||
' imposto flag per calcolo
|
||||
Map.refCALCPanelVM.SetCalculating(True)
|
||||
For Each BTLPartItem As BTLPartVM In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
BTLPartItem.SetIsRowEnabled(False)
|
||||
Next
|
||||
Map.refCALCPanelVM.VerifyAll(ProjectType.PROJ, CalcIntegration.CmdTypes.CHECKNOSIM)
|
||||
Return
|
||||
End Sub
|
||||
|
||||
#End Region ' VerifyAll
|
||||
|
||||
#Region "VerifyAllFlipRot"
|
||||
|
||||
Public ReadOnly Property VerifyAllFlipRot_Command As ICommand
|
||||
Get
|
||||
If m_cmdVerifyFlipRotAll Is Nothing Then
|
||||
m_cmdVerifyFlipRotAll = New Command(AddressOf VerifyAllFlipRot)
|
||||
End If
|
||||
Return m_cmdVerifyFlipRotAll
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub VerifyAllFlipRot()
|
||||
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
|
||||
' imposto flag per calcolo
|
||||
Map.refCALCPanelVM.SetCalculating(True)
|
||||
For Each BTLPartItem As BTLPartVM In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
BTLPartItem.SetIsRowEnabled(False)
|
||||
Next
|
||||
Map.refCALCPanelVM.VerifyAll(ProjectType.PROJ, CalcIntegration.CmdTypes.FLIP_ROT)
|
||||
Return
|
||||
End Sub
|
||||
|
||||
#End Region ' VerifyAllRotate
|
||||
|
||||
#Region "ResetCalc"
|
||||
|
||||
Public ReadOnly Property ResetCalc_Command As ICommand
|
||||
Get
|
||||
If m_cmdResetCalc Is Nothing Then
|
||||
m_cmdResetCalc = New Command(AddressOf ResetCalc)
|
||||
End If
|
||||
Return m_cmdResetCalc
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ResetCalc()
|
||||
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
|
||||
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
|
||||
Map.refCALCPanelVM.SetCalculating(False)
|
||||
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
If Part.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' resetto stato dei calcoli
|
||||
Part.ResetCalcTotalPart()
|
||||
End If
|
||||
If Not Part.IsRowEnabled Then Part.SetIsRowEnabled(True)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' ResetCalc
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
Class DataGridCellBorderThicknessConverter
|
||||
@@ -342,7 +240,7 @@ Class ProjIdToBtlFileName
|
||||
Implements IValueConverter
|
||||
|
||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||
If TypeOf value IsNot String Then Return ""
|
||||
If TypeOf value IsNot Integer Then Return ""
|
||||
Dim nProjId As Integer = CInt(value)
|
||||
Dim ProjModel As EgtBEAMWALL.DataLayer.DatabaseModels.ProjModel = DbControllers.m_ProjController.FindByProjId(nProjId)
|
||||
If IsNothing(ProjModel) Then Return ""
|
||||
|
||||
@@ -2,107 +2,110 @@
|
||||
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: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:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
|
||||
<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}"/>
|
||||
<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>
|
||||
</Grid>
|
||||
</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>
|
||||
</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>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,118 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
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) & "\DataGridLayoutFile\FeatureInPartInRawPart.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,8 +8,6 @@ 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,22 +2,9 @@
|
||||
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: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:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
|
||||
<Grid Style="{StaticResource BlockedWnd_Grid}">
|
||||
<Grid.Resources>
|
||||
<OPTIMIZER:TrimmedTextBlockVisibilityConverter x:Key="TrimToVisConverter" />
|
||||
</Grid.Resources>
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -26,66 +13,118 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<Image Grid.Column="1"
|
||||
Source="{Binding sCurrDraw}"
|
||||
|
||||
@@ -1,116 +1,4 @@
|
||||
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) & "\DataGridLayoutFile\PParameters.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
|
||||
Public Class PParameterListV
|
||||
|
||||
Private Sub PParameterList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
If TypeOf sender Is DataGridRow Then
|
||||
|
||||
@@ -8,8 +8,6 @@ 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
|
||||
|
||||
@@ -1,268 +1,62 @@
|
||||
<UserControl x:Class="RawPartListV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
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:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
<Grid>
|
||||
<dxg:GridControl x:Name="RawPart_GridControl"
|
||||
ItemsSource="{Binding Tag.MachGroupVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
SelectionMode="Row"
|
||||
SelectedItem="{Binding Tag.SelectedMachGroup,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
|
||||
MasterRowExpanding="GridControl_MasterRowExpanding"
|
||||
MasterRowExpanded="RawPart_GridControl_MasterRowExpanded">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="RawPart_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource EditTableViewStyle}">
|
||||
</dxg:TableView>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count"
|
||||
FieldName="Name"
|
||||
DisplayFormat="{}{0}"/>
|
||||
</dxg:GridControl.TotalSummary>
|
||||
<dxg:GridControl.DetailDescriptor>
|
||||
<dxg:DataControlDetailDescriptor ItemsSourceBinding="{Binding PartVMList}"
|
||||
Margin="0,0,16,0">
|
||||
<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"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource RawPartHeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource EditTableViewStyle}">
|
||||
</dxg:TableView>
|
||||
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.MachGroupVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
SelectedItem="{Binding Tag.SelectedMachGroup,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
CanUserDeleteRows="False"
|
||||
SelectionMode="Single"
|
||||
Margin="2.5,0,0,5"
|
||||
EnableRowVirtualization="True"
|
||||
EnableColumnVirtualization="True"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
|
||||
VirtualizingPanel.ScrollUnit="Pixel"
|
||||
RenderOptions.CachingHint="Cache"
|
||||
VirtualizingPanel.CacheLength="10"
|
||||
VirtualizingPanel.CacheLengthUnit="Pixel"
|
||||
ColumnLayouts="{Binding RawPartColumns}"
|
||||
BeginningEdit="RawPartList_BeginningEdit"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowBackground="{StaticResource BeamWall_BLackSqueeze}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
<EventSetter Event="PreviewMouseDown" Handler="RawPartRow_PreviewMouseDown"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsRowEnabled}" Value="False">
|
||||
<Setter Property="IsEnabled" Value="False"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
</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"
|
||||
AllowEditing="False">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="↓"
|
||||
Visibility="{Binding RowData.Row.CALC_FALL_Visibility}"
|
||||
Style="{StaticResource RawPartList_TextBlock}"/>
|
||||
<Border Grid.Column="1"
|
||||
Background="{Binding RowData.Row.Calc_Background}"
|
||||
Style="{StaticResource Calc_Border}"/>
|
||||
<Grid Grid.Column="2"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.ColumnSpan="2"
|
||||
Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROTFeatureRawPartList_TextBlock}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding RowData.Row.CALC_ERR_Letter}"
|
||||
Foreground="{Binding RowData.Row.CALC_ERR_Foreground}"
|
||||
Style="{StaticResource CALC_ERRRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sNAM"
|
||||
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=""
|
||||
Image="{StaticResource HeaderRotateRawPart_Image}"
|
||||
HeaderToolTip="{Binding ForwardRotation_ToolTip}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding RowData.Row.sROT}"
|
||||
Style="{StaticResource Rotate_TextBlock}"/>
|
||||
<!--segnaposto per avere larghezza colonna-->
|
||||
<TextBlock Text="888°"
|
||||
Visibility="Hidden"
|
||||
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}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="IsInverted"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderInversionRawPart_Image}"
|
||||
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>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sPOSX"
|
||||
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}">
|
||||
<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"
|
||||
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}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="MoveDown"
|
||||
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}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Remove"
|
||||
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}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</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"
|
||||
AllowEditing="False">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataGrid.Resources>
|
||||
<!--ID - Id gruppo-->
|
||||
<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.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderBrush" Value="{Binding Search_Background}"/>
|
||||
<Setter Property="BorderThickness" Value="2,2,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Validità pezzo-->
|
||||
<DataGridTemplateColumn x:Key="colCALC">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Style="{StaticResource RawPartList_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -271,11 +65,11 @@
|
||||
<ColumnDefinition Width="15"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="↓"
|
||||
Visibility="{Binding RowData.Row.CALC_FALL_Visibility}"
|
||||
Visibility="{Binding CALC_FALL_Visibility}"
|
||||
Style="{StaticResource RawPartList_TextBlock}"/>
|
||||
<Border Grid.Column="1"
|
||||
Background="{Binding RowData.Row.Calc_Background}"
|
||||
Style="{StaticResource Calc_Border}"/>
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding Calc_Background}"/>
|
||||
<Grid Grid.Column="2"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -283,163 +77,503 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="⭯"
|
||||
Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
|
||||
Visibility="{Binding CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROTRawPartList_TextBlock}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding RowData.Row.CALC_ERR_Letter}"
|
||||
Foreground="{Binding RowData.Row.CALC_ERR_Foreground}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/>
|
||||
Text="{Binding CALC_ERR_Letter}"
|
||||
Foreground="{Binding CALC_ERR_Foreground}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sStartCut"
|
||||
Header="{Binding StartOffset_Msg}"
|
||||
Binding="{Binding sStartCut, Mode=TwoWay}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
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, Mode=TwoWay}"
|
||||
SortFieldName="dL"
|
||||
AllowColumnFiltering="False"
|
||||
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=""
|
||||
Image="{StaticResource HeaderVerify_Image}"
|
||||
HeaderToolTip="{Binding Verify_ToolTip}"
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--STARTCUT - Ritaglio iniziale-->
|
||||
<DataGridTextColumn x:Key="colSTARTCUT" Binding="{Binding sStartCut}" SortMemberPath="dStartCut">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
Command="{Binding RowData.Row.Verify_Command}"
|
||||
ToolTip="{Binding RowData.Row.Verify_ToolTip}">
|
||||
<TextBlock Text="{Binding Path=DataContext.StartOffset_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--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.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</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.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</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.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--PosZ - Posizione in Z-->
|
||||
<DataGridTextColumn x:Key="colPOSZ" Binding="{Binding sPosZ}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Material_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>
|
||||
<!--VER - Verfica-->
|
||||
<DataGridTemplateColumn x:Key="colVERIFY">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{StaticResource HeaderVerify_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button ToolTip="{Binding Verify_ToolTip}"
|
||||
Command="{Binding Verify_Command}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource BTLPanel_Button}">
|
||||
<Image Source="{StaticResource Verify_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Simulate"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderSimulate_Image}"
|
||||
HeaderToolTip="{Binding Verify_ToolTip}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--SILMUL - Simula-->
|
||||
<DataGridTemplateColumn x:Key="colSIMUL">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsEnabled="{Binding RowData.Row.Simulate_IsEnabled}"
|
||||
Command="{Binding RowData.Row.Simulate_Command}"
|
||||
ToolTip="{Binding RowData.Row.Simulate_ToolTip}">
|
||||
<TextBlock Text="CAM"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button ToolTip="{Binding Simulate_ToolTip}"
|
||||
Command="{Binding Simulate_Command}"
|
||||
Style="{StaticResource BTLPanel_Button}">
|
||||
<Image Source="{StaticResource Simulate_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Prod"
|
||||
AllowSorting="False"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderProduceRawPart_Image}"
|
||||
HeaderToolTip="{Binding Verify_ToolTip}"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--PROD - Produci-->
|
||||
<DataGridTemplateColumn x:Key="colPROD">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Button IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
Command="{Binding RowData.Row.ProduceRawPart_Command}"
|
||||
ToolTip="{Binding RowData.Row.ProduceRawPart_ToolTip}">
|
||||
<Image Source="{StaticResource HeaderProduceRawPart_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding ProduceRawPart_Command}"
|
||||
ToolTip="{Binding ProduceRawPart_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource BTLPanel_Button}">
|
||||
<Image Source="{StaticResource ProduceRawPart_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Setting"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderSetting_Image}"
|
||||
HeaderToolTip="{Binding Settings_Command_ToolTip}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--OP - Setting-->
|
||||
<DataGridTemplateColumn x:Key="colSETTING">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<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>
|
||||
<DrawingImage/>
|
||||
</dx:DropDownButton.ArrowGlyph>
|
||||
<OPTIMIZER:RawPartListPopUpV/>
|
||||
</dx:DropDownButton>
|
||||
<Image Source="{StaticResource HeaderSetting_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl>
|
||||
</Grid>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Click="Button_Click"
|
||||
ToolTip="{Binding Settings_Command_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource BTLPanel_Button}">
|
||||
<Image Source="{StaticResource Setting_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding Tag.SelectedMachGroup.DeleteMachGroup_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
<DataGrid.RowDetailsTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.SelectedMachGroup.PartVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
SelectedItem="{Binding Tag.SelectedMachGroup.SelPart,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
CanUserDeleteRows="False"
|
||||
CanUserSortColumns="False"
|
||||
SelectionMode="Single"
|
||||
Margin="15,0,0,5"
|
||||
BeginningEdit="PartInRawPartList_BeginningEdit"
|
||||
EnableRowVirtualization="True"
|
||||
EnableColumnVirtualization="True"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
|
||||
VirtualizingPanel.ScrollUnit="Pixel"
|
||||
RenderOptions.CachingHint="Cache"
|
||||
VirtualizingPanel.CacheLength="10"
|
||||
VirtualizingPanel.CacheLengthUnit="Pixel"
|
||||
ColumnLayouts="{Binding DataContext.PartInRawPartColumns, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
ColumnHeaderStyle="{StaticResource RawPart_DataGridColumnHeader}"
|
||||
GridLinesVisibility="None"
|
||||
BorderThickness="0"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||||
Width="860"
|
||||
PreviewMouseWheel="EgwDataGrid_PreviewMouseWheel"
|
||||
HorizontalAlignment="Left"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
<EventSetter Event="PreviewMouseDown" Handler="PartInRawPartRow_PreviewMouseDown"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.Resources>
|
||||
<!--PDN - Nome-->
|
||||
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderBrush" Value="{Binding Search_Background}"/>
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Validità pezzo-->
|
||||
<DataGridTemplateColumn x:Key="colCALC">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="↓"
|
||||
Visibility="{Binding CALC_FALL_Visibility}"
|
||||
Style="{StaticResource RawPartList_TextBlock}"/>
|
||||
<Border Grid.Column="1"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding Calc_Background}"/>
|
||||
<Grid Grid.Column="2"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.ColumnSpan="2"
|
||||
Text="⭯"
|
||||
Visibility="{Binding CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROTFeatureRawPartList_TextBlock}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding CALC_ERR_Letter}"
|
||||
Foreground="{Binding CALC_ERR_Foreground}"
|
||||
Style="{StaticResource CALC_ERRRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--NAM - Descrizione-->
|
||||
<DataGridTextColumn x:Key="colNAM" Binding="{Binding sNAM}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--L - Lunghezza-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}" SortMemberPath="dL">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--ROT - Rotazione-->
|
||||
<DataGridTemplateColumn x:Key="colROT" SortMemberPath="dROT">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{StaticResource HeaderRotateRawPart_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sROT}"
|
||||
Style="{StaticResource ROT_TextBlock}"/>
|
||||
<Button Grid.Column="1"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Command="{Binding ForwardRotation_Command}"
|
||||
Style="{StaticResource Rotation_Button}">
|
||||
<Image Source="{StaticResource Rotate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--INV - Inversione-->
|
||||
<DataGridTemplateColumn x:Key="colFLIP">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{StaticResource HeaderInversionRawPart_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bFLIP, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--PosX - Posizione-->
|
||||
<DataGridTextColumn x:Key="colPOSX" Binding="{Binding sPOSX}" SortMemberPath="dPOSX">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosX_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="Blue" />
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--PosY - Posizione-->
|
||||
<DataGridTextColumn x:Key="colPOSY" Binding="{Binding sPOSY}" SortMemberPath="dPOSY">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosY_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Off - Offset-->
|
||||
<DataGridTextColumn x:Key="colOFFSET" Binding="{Binding sOffset}" SortMemberPath="dOffset">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Offset_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--GRP - Gruppo-->
|
||||
<DataGridTextColumn x:Key="colGROUP" Binding="{Binding sGROUP}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.GRP_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--STOREY - Sottogruppo-->
|
||||
<DataGridTextColumn x:Key="colSTOREY" Binding="{Binding sSTOREY}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.STOREY_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--MUP - MoveUp-->
|
||||
<DataGridTemplateColumn x:Key="colMOVEUP">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text=""/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding MoveUpPart_Command}"
|
||||
ToolTip="{Binding MoveUpPart_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource Move_Button}">
|
||||
<Image Source="{StaticResource MoveUp_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--MDW - MoveDown-->
|
||||
<DataGridTemplateColumn x:Key="colMOVEDOWN">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text=""/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding MoveDownPart_Command}"
|
||||
ToolTip="{Binding MoveDownPart_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource Move_Button}">
|
||||
<Image Source="{StaticResource MoveDown_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--RM - Remove-->
|
||||
<DataGridTemplateColumn x:Key="colREMOVE">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text=""/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RemovePart_Command}"
|
||||
ToolTip="{Binding RemovePart_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource Move_Button}">
|
||||
<Image Source="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding Tag.SelPart.DeletePart_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}" />
|
||||
</DataGrid.InputBindings>
|
||||
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowDetailsTemplate>
|
||||
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,111 +1,8 @@
|
||||
Imports System.IO
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib.EgtInterface
|
||||
|
||||
Public Class RawPartListV
|
||||
|
||||
Private m_RawPartListVM As RawPartListVM
|
||||
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Private _lastExpanded As Integer = -1
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\RawPart.json"
|
||||
|
||||
For Each Column In RawPart_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
For Each Column In Part_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
DXSerializer.AddAllowPropertyHandler(RawPart_GridControl, AddressOf OnAddAllowProperty)
|
||||
DXSerializer.AddAllowPropertyHandler(Part_GridControl, AddressOf OnAddAllowProperty)
|
||||
|
||||
RawPart_GridControl.Columns("sPosZ").Visible = False
|
||||
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 SaveBTLPartGridControlLayout()
|
||||
RawPart_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_RawPartListVM = DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_RawPartListVM.refSaveBTLPartGridControlLayout = AddressOf SaveBTLPartGridControlLayout
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
RawPart_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
|
||||
|
||||
Public Sub IsVisibleGroupSummary(bValue As Boolean)
|
||||
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"}
|
||||
RawPart_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
RawPart_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
|
||||
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sADDED"}
|
||||
RawPart_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
|
||||
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "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"}
|
||||
RawPart_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
|
||||
End If
|
||||
RawPart_TableView.ShowGroupFooters = bValue
|
||||
End Sub
|
||||
|
||||
' funzione che permette di selezionare un RawPart anche quando gia' selezionato
|
||||
Private Sub RawPartRow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Map.refProjectVM.BTLStructureVM.SelBTLPart.SetOpenFeatureList(False)
|
||||
@@ -141,13 +38,13 @@ Public Class RawPartListV
|
||||
parent = VisualTreeHelper.GetParent(parent)
|
||||
End While
|
||||
|
||||
'If parent IsNot Nothing Then
|
||||
' Dim popup As New RawPartListPopUpV()
|
||||
' If Not IsNothing(popup) Then
|
||||
' popup.PlacementTarget = btn ' Associa il popup al bottone
|
||||
' popup.IsOpen = True ' Mostra il popup
|
||||
' End If
|
||||
'End If
|
||||
If parent IsNot Nothing Then
|
||||
Dim popup As New RawPartListPopUpV()
|
||||
If Not IsNothing(popup) Then
|
||||
popup.PlacementTarget = btn ' Associa il popup al bottone
|
||||
popup.IsOpen = True ' Mostra il popup
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' funzione che permette di selezionare un pezzo anche quando gia' selezionato
|
||||
@@ -184,87 +81,4 @@ Public Class RawPartListV
|
||||
.Source = sender})
|
||||
End Sub
|
||||
|
||||
' customizzazione ContextMenu del GridControl
|
||||
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 = (RawPart_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(e.Link.DataContext, 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(e.Link.DataContext, GridColumnMenuInfo)
|
||||
If IsNothing(info) Then Return
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
RawPart_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
Private Sub GridControl_MasterRowExpanding(sender As Object, e As DevExpress.Xpf.Grid.RowAllowEventArgs)
|
||||
Dim grid = CType(sender, DevExpress.Xpf.Grid.GridControl)
|
||||
|
||||
' Chiudi solo il precedente
|
||||
If _lastExpanded <> -1 AndAlso _lastExpanded <> e.RowHandle Then
|
||||
grid.SetMasterRowExpanded(_lastExpanded, False)
|
||||
End If
|
||||
|
||||
_lastExpanded = e.RowHandle
|
||||
End Sub
|
||||
|
||||
Private Sub RawPart_GridControl_MasterRowExpanded(sender As Object, e As RowEventArgs)
|
||||
Dim masterGrid As GridControl = TryCast(sender, GridControl)
|
||||
|
||||
If masterGrid IsNot Nothing Then
|
||||
Dim detailGrid As GridControl = TryCast(masterGrid.GetDetail(e.RowHandle, masterGrid.DetailDescriptor), GridControl)
|
||||
|
||||
If Not IsNothing(detailGrid) Then
|
||||
If Not IsNothing(detailGrid) Then
|
||||
Dim colPosX As GridColumn = detailGrid.Columns("sPOSX")
|
||||
If Not IsNothing(colPosX) Then colPosX.Visible = False
|
||||
|
||||
Dim colPosY As GridColumn = detailGrid.Columns("sPOSY")
|
||||
If Not IsNothing(colPosY) Then colPosY.Visible = False
|
||||
|
||||
Dim colMat As GridColumn = detailGrid.Columns("sMATERIAL")
|
||||
If Not IsNothing(colMat) Then colMat.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -8,8 +8,6 @@ Public Class RawPartListVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend refSaveBTLPartGridControlLayout As Action
|
||||
|
||||
Private m_colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
||||
Public ReadOnly Property colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
||||
Get
|
||||
@@ -250,12 +248,6 @@ Public Class RawPartListVM
|
||||
m_colPartInRawPart_PosY = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSY)
|
||||
End Sub
|
||||
|
||||
Friend Sub Close()
|
||||
If Not IsNothing(refSaveBTLPartGridControlLayout) Then
|
||||
refSaveBTLPartGridControlLayout()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
Style="{StaticResource LeftPanel_Grid}">
|
||||
|
||||
@@ -18,8 +17,132 @@
|
||||
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 VerifyAllFlipRot_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 Tag.SearchText, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
||||
<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,7 +1,3 @@
|
||||
Public Class LeftPanelV
|
||||
|
||||
Public Sub ForwardDelete(e As KeyEventArgs)
|
||||
PartList.HandleDelete(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -7,7 +7,6 @@ Public Class MyMachGroupPanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Property m_OldSelectedMachGroup As MyMachGroupVM
|
||||
Public Shadows Property SelectedMachGroup As MyMachGroupVM
|
||||
Get
|
||||
Return m_SelectedMachGroup
|
||||
@@ -30,13 +29,7 @@ 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)
|
||||
|
||||
@@ -240,7 +240,7 @@ Public Class PartVM
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
EgtSetCurrMachGroup(ParentMachGroupVM.Id)
|
||||
EgtSetCurrMachGroup(Map.refMachGroupPanelVM.SelectedMachGroup.Id)
|
||||
' lo riseleziono
|
||||
EgtSelectObj(nPartId)
|
||||
' resetto validazione del pezzo
|
||||
@@ -484,7 +484,7 @@ Public Class PartVM
|
||||
' reinserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||
End If
|
||||
EgtSetCurrMachGroup(ParentMachGroupVM.Id)
|
||||
EgtSetCurrMachGroup(Map.refMachGroupPanelVM.SelectedMachGroup.Id)
|
||||
' lo riseleziono
|
||||
EgtSelectObj(nPartId)
|
||||
' resetto validazione del pezzo
|
||||
@@ -738,7 +738,7 @@ Public Class PartVM
|
||||
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
' Recupero indice elemento selezionato in lista
|
||||
Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(ParentMachGroupVM.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
|
||||
Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(SelMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
' se barra gia' assegnata a supervisore, esco
|
||||
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
|
||||
@@ -769,16 +769,17 @@ Public Class PartVM
|
||||
Public Sub RemovePart()
|
||||
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62575), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
|
||||
If IsNothing(ParentMachGroupVM) Then Return
|
||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||
' Recupero indice elemento selezionato in lista
|
||||
Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(ParentMachGroupVM.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
|
||||
Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(SelMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
|
||||
If IsNothing(SelMachGroup) Then Return
|
||||
' se barra gia' assegnata a supervisore, esco
|
||||
If ParentMachGroupVM.nProduction_State >= ItemState.Assigned Then Return
|
||||
Dim SelPart As PartVM = ParentMachGroupVM.PartVMList(Index)
|
||||
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
|
||||
Dim SelPart As PartVM = SelMachGroup.PartVMList(Index)
|
||||
If IsNothing(SelPart) Then Return
|
||||
SelPart.DeletePart()
|
||||
ParentMachGroupVM.UpdateUsage()
|
||||
ParentMachGroupVM.ResetCalcMachGroup()
|
||||
SelMachGroup.UpdateUsage()
|
||||
SelMachGroup.ResetCalcMachGroup()
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -88,7 +88,9 @@
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem Header="EMPTY"/>
|
||||
<TabItem Header="STRATEGIES">
|
||||
<OPTIMIZER:StrategyManagerV DataContext="{StaticResource StrategyManagerVM}" Margin="0,0,0,-25"/>
|
||||
<StackPanel>
|
||||
<OPTIMIZER:StrategyManagerV DataContext="{StaticResource StrategyManagerVM}"/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="PARAMETERS">
|
||||
<StackPanel Style="{StaticResource PartManager_StackPanel}">
|
||||
|
||||
@@ -641,7 +641,7 @@ Public Class MainMenuVM
|
||||
Dim bEx As Boolean = False
|
||||
Try
|
||||
Dim sAddressArray As String() = sSupportAddress.Split(CType(",", Char()))
|
||||
Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("AEdifica Feedback - " & sKey)
|
||||
Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("Aedifica Feedback - " & sKey)
|
||||
SendFeedbackWindow.Recipients.Add(sAddressArray(0))
|
||||
For index As Integer = 1 To sAddressArray.Length() - 1
|
||||
SendFeedbackWindow.Recipients.Add(sAddressArray(index), EgtWPFLib5.MapiMailMessage.RecipientType.CC)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem>
|
||||
<OPTIMIZER:ProjectV x:Name="ProjectView" DataContext="{StaticResource ProjectVM}"/>
|
||||
<OPTIMIZER:ProjectV DataContext="{StaticResource ProjectVM}"/>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<OPTIMIZER:ConfigurationPageV DataContext="{DynamicResource ConfigurationPageVM}"/>
|
||||
|
||||
@@ -22,20 +22,12 @@ 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)
|
||||
|
||||
@@ -430,9 +430,6 @@ Public Class MainWindowVM
|
||||
{S_FEATUREINPARTINRAWPARTLIST, Map.refFeatureInPartInRawPartListVM.FeatureInPartInRawPartColumns},
|
||||
{S_PARAMETERLIST_P, Map.refPParameterListVM.PParameterListColumns}}
|
||||
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, DataGridColumnDictionary)
|
||||
Map.refPartListVM.Close()
|
||||
Map.refRawPartListVM.Close()
|
||||
|
||||
End If
|
||||
' Termino il Model
|
||||
m_MainWindowM.Close()
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
Style="{StaticResource Bottom_WrapPanel}">
|
||||
<OPTIMIZER:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||
<OPTIMIZER:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
||||
<OPTIMIZER:ShowBeamPanelV DataContext="{StaticResource ShowBeamPanelVM}"/>
|
||||
<OPTIMIZER:ShowBeamPanelV DataContext="{StaticResource ShowBeamPanelVM}"
|
||||
Visibility="{Binding DataContext.ShowBeamPanel_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelBottomV}}}"/>
|
||||
<OPTIMIZER:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||
</WrapPanel>
|
||||
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<OPTIMIZER:LeftPanelV x:Name="LeftPanel" DataContext="{StaticResource LeftPanelVM}"
|
||||
<OPTIMIZER:LeftPanelV DataContext="{StaticResource LeftPanelVM}"
|
||||
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"
|
||||
Visibility="{Binding DataContext.LeftPanel_Visibility, 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,7 +1,3 @@
|
||||
Public Class LeftPanelTopV
|
||||
|
||||
Public Sub ForwardDelete(e As KeyEventArgs)
|
||||
LeftPanel.ForwardDelete(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
Style="{StaticResource Optimizer_Border}"
|
||||
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"/>
|
||||
<OPTIMIZER:FeatureInPartInRawPartListV DataContext="{StaticResource FeatureInPartInRawPartListVM}" Margin="5"
|
||||
Tag="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.SelPart, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"
|
||||
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"/>
|
||||
Tag="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.SelPart, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"
|
||||
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"/>
|
||||
<StackPanel Grid.Column="1"
|
||||
Style="{StaticResource Message_StackPanel}">
|
||||
<TextBlock Text="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Style="{StaticResource TopPanel_Border}">
|
||||
<OPTIMIZER:ProdManagerV DataContext="{DynamicResource ProdManagerVM}"/>
|
||||
<OPTIMIZER:ProdManagerV DataContext="{DynamicResource ProdManagerVM}"
|
||||
Visibility="{Binding DataContext.ProdManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:TopPanelV}}}"/>
|
||||
</Border>
|
||||
|
||||
<OPTIMIZER:CalcPanelV Grid.Column="1"
|
||||
|
||||
@@ -1,47 +1,49 @@
|
||||
<dxb:PopupMenu x:Class="RawPartListPopUpV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:dxt="http://schemas.devexpress.com/winfx/2008/xaml/core/themekeys"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
Background="{StaticResource Border.BTLPartManager.Background}"
|
||||
BorderBrush="{StaticResource Border.BTLPartManager.Border}"
|
||||
BorderThickness="2"
|
||||
CornerRadius="5"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
|
||||
<dxb:BarItemMenuHeader ShowContentHeader="False"
|
||||
ItemsOrientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<dxb:BarButtonItem Command="{Binding CopyRawPart_Command}"
|
||||
ToolTip="{Binding CopyRawPart_ToolTip}"
|
||||
Glyph="/Resources/TopPanel/CopyRawPart.png"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
</dxb:BarButtonItem>
|
||||
<dxb:BarButtonItem Command="{Binding RemoveRawPart_Command}"
|
||||
ToolTip="{Binding RemoveRawPart_ToolTip}"
|
||||
Glyph="/Resources/NewPage/Remove.png"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
</dxb:BarButtonItem>
|
||||
<dxb:BarButtonItem Command="{Binding Simulate_Command}"
|
||||
ToolTip="{Binding Simulate_ToolTip}"
|
||||
Glyph="/Resources/CALCPanel/Simulate.png"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
</dxb:BarButtonItem>
|
||||
<dxb:BarButtonItem Command="{Binding ReOrderPart_Command}"
|
||||
ToolTip="{Binding ReOrderPart_ToolTip}"
|
||||
Glyph="/Resources/TopPanel/ReorderPart.png"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
</dxb:BarButtonItem>
|
||||
<dxb:BarButtonItem Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
Glyph="/Resources/CALCPanel/ResetCalc.png"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
</dxb:BarButtonItem>
|
||||
</dxb:BarItemMenuHeader>
|
||||
|
||||
</dxb:PopupMenu>
|
||||
<Popup x:Class="RawPartListPopUpV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
Style="{StaticResource Filter_PopUp}">
|
||||
<Border Style="{StaticResource BTLPartManager_Border}">
|
||||
<StackPanel Style="{StaticResource BTLPartManager_StackPanel}">
|
||||
<!--COPY - Copia-->
|
||||
<Button Command="{Binding CopyRawPart_Command}"
|
||||
ToolTip="{Binding CopyRawPart_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource CopyRawPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<!--DELETE - Elimina-->
|
||||
<Button Command="{Binding RemoveRawPart_Command}"
|
||||
ToolTip="{Binding RemoveRawPart_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<!--CAM - CAM-->
|
||||
<Button ToolTip="{Binding Simulate_ToolTip}"
|
||||
Command="{Binding Simulate_Command}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="{StaticResource Simulate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<!--REORDER - Riordina-->
|
||||
<Button Command="{Binding ReOrderPart_Command}"
|
||||
ToolTip="{Binding ReOrderPart_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource ReOrderPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<!--RESET - Reset-->
|
||||
<Button Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Popup>
|
||||
|
||||
@@ -4,6 +4,7 @@ Imports System.IO.Compression
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtBEAMWALL.DataLayer.DatabaseModels
|
||||
Imports EgtBEAMWALL.Optimizer.MainMenuVM
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports Newtonsoft.Json
|
||||
@@ -995,15 +996,6 @@ Public Class ProdManagerVM
|
||||
|
||||
' Apro finestra parametri generali
|
||||
Dim GeneralParametersWndVM As New GeneralParametersWndVM(nType)
|
||||
|
||||
' Controllo se la cartella AiSetUp è presente
|
||||
GetFirstAiSetUp(nType)
|
||||
|
||||
Dim sDefaultConfigFile As String = String.Empty
|
||||
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) = 0 Then
|
||||
SetFirstStrategy(GeneralParametersWndVM, sDefaultConfigFile)
|
||||
End If
|
||||
|
||||
GeneralParametersWndVM.SetbSaveGeneralParameters(True)
|
||||
GeneralParametersWndVM.SaveProjectParameters()
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<OPTIMIZER:TopPanelV Grid.ColumnSpan="3"/>
|
||||
|
||||
<OPTIMIZER:LeftPanelTopV Grid.Row="1" x:Name="LeftPanelTop"/>
|
||||
<OPTIMIZER:LeftPanelTopV Grid.Row="1"/>
|
||||
|
||||
<GridSplitter Grid.Column="1"
|
||||
Grid.RowSpan="4"
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
Public Class ProjectV
|
||||
|
||||
Public Sub ForwardDelete(e As KeyEventArgs)
|
||||
LeftPanelTop.ForwardDelete(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -60,6 +60,32 @@ Public Class ProjectVM
|
||||
End Property
|
||||
Private m_bLockUX As Boolean = False
|
||||
|
||||
Private m_FeatureManager_Visibility As Boolean = True
|
||||
Public Property FeatureManager_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_FeatureManager_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_FeatureManager_Visibility = (value = Visibility.Visible)
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFeatureManager_Visibility(IsVisible As Boolean)
|
||||
m_FeatureManager_Visibility = IsVisible
|
||||
End Sub
|
||||
|
||||
Private m_ShowBeamPanel_Visibility As Boolean = True
|
||||
Public Property ShowBeamPanel_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_ShowBeamPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_ShowBeamPanel_Visibility = (value = Visibility.Visible)
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetShowBeamPanel_Visibility(IsVisible As Boolean)
|
||||
m_ShowBeamPanel_Visibility = IsVisible
|
||||
End Sub
|
||||
|
||||
Private m_FreeContourManager_Visibility As Boolean = False
|
||||
Public Property FreeContourManager_Visibility As Visibility
|
||||
Get
|
||||
@@ -74,6 +100,32 @@ Public Class ProjectVM
|
||||
NotifyPropertyChanged(NameOf(FreeContourManager_Visibility))
|
||||
End Sub
|
||||
|
||||
Private m_ProdManager_Visibility As Boolean = True
|
||||
Public Property ProdManager_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_ProdManager_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_ProdManager_Visibility = (value = Visibility.Visible)
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetProdManager_Visibility(IsVisible As Boolean)
|
||||
m_ProdManager_Visibility = IsVisible
|
||||
End Sub
|
||||
|
||||
Private m_LeftPanel_Visibility As Boolean = True
|
||||
Public Property LeftPanel_Visibility As Visibility
|
||||
Get
|
||||
Return If(m_LeftPanel_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_LeftPanel_Visibility = (value = Visibility.Visible)
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetLeftPanel_Visibility(IsVisible As Boolean)
|
||||
m_LeftPanel_Visibility = IsVisible
|
||||
End Sub
|
||||
|
||||
Private m_LeftPanel_IsEnabled As Boolean = True
|
||||
Public Property LeftPanel_IsEnabled As Boolean
|
||||
Get
|
||||
@@ -202,9 +254,8 @@ Public Class ProjectVM
|
||||
Return m_FeatureList_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetFeatureListVisibility(bVisible As Boolean)
|
||||
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
|
||||
|
||||
@@ -214,7 +265,7 @@ Public Class ProjectVM
|
||||
Return m_RawPartManagerVisibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetRawPartManagerVisibility(bVisible As Boolean)
|
||||
Sub SetRawPartManagerVisibility(bVisible As Boolean)
|
||||
m_RawPartManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(RawPartManagerVisibility))
|
||||
End Sub
|
||||
@@ -225,7 +276,7 @@ Public Class ProjectVM
|
||||
Return m_StrategyManagerVisibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetStrategyManagerVisibility(bVisible As Boolean)
|
||||
Sub SetStrategyManagerVisibility(bVisible As Boolean)
|
||||
m_StrategyManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(StrategyManagerVisibility))
|
||||
End Sub
|
||||
@@ -236,7 +287,7 @@ Public Class ProjectVM
|
||||
Return m_SceneShowBuldingVisibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetSceneShowBuldingVisibility(bVisible As Boolean)
|
||||
Sub SetSceneShowBuldingVisibility(bVisible As Boolean)
|
||||
m_SceneShowBuldingVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(SceneShowBuldingVisibility))
|
||||
End Sub
|
||||
@@ -247,7 +298,7 @@ Public Class ProjectVM
|
||||
Return m_ManagerTabVisibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetManagerTabVisibility(bVisible As Boolean)
|
||||
Sub SetManagerTabVisibility(bVisible As Boolean)
|
||||
m_ManagerTabVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||
NotifyPropertyChanged(NameOf(ManagerTabVisibility))
|
||||
End Sub
|
||||
@@ -496,6 +547,11 @@ Public Class ProjectVM
|
||||
|
||||
End Sub
|
||||
|
||||
Friend Sub NotifyAllPanelVisibility()
|
||||
NotifyPropertyChanged(NameOf(FeatureManager_Visibility))
|
||||
NotifyPropertyChanged(NameOf(ShowBeamPanel_Visibility))
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Funzione che permette di eliminare un pezzo modificato e reinserirlo nell'assemblato
|
||||
''' </summary>
|
||||
@@ -543,26 +599,31 @@ Public Class ProjectVM
|
||||
For Each GeneralParameter In m_GeneralParametersList
|
||||
Select Case GeneralParameter.GetType()
|
||||
Case GetType(BooleanGenericParameter)
|
||||
SetGeneralParameters(False)
|
||||
SetbSaveGeneralParameters(False)
|
||||
SetGeneralParametersIsEnable(False)
|
||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
||||
Case GetType(DoubleGenericParameter)
|
||||
SetGeneralParameters(False)
|
||||
SetbSaveGeneralParameters(False)
|
||||
SetGeneralParametersIsEnable(False)
|
||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
||||
Case GetType(ComboGenericParameter)
|
||||
SetGeneralParameters(False)
|
||||
SetbSaveGeneralParameters(False)
|
||||
SetGeneralParametersIsEnable(False)
|
||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
||||
Case GetType(StringGenericParameter)
|
||||
SetGeneralParameters(False)
|
||||
SetbSaveGeneralParameters(False)
|
||||
SetGeneralParametersIsEnable(False)
|
||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
||||
Case GetType(ListGenericParameter)
|
||||
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
|
||||
If Item.bIsActive Then
|
||||
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
||||
SetGeneralParameters(False)
|
||||
SetbSaveGeneralParameters(False)
|
||||
SetGeneralParametersIsEnable(False)
|
||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||
End If
|
||||
Next
|
||||
@@ -898,12 +959,11 @@ Public Class ProjectVM
|
||||
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "COMMAND"
|
||||
|
||||
#Region "Optimizer_Command"
|
||||
#Region "Ottimization"
|
||||
|
||||
Public ReadOnly Property Optimizer_Command As ICommand
|
||||
Get
|
||||
@@ -919,9 +979,9 @@ Public Class ProjectVM
|
||||
StatisticWndV.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' Optimizer_Command
|
||||
#End Region ' Ottimization
|
||||
|
||||
#Region "Parameter_Command"
|
||||
#Region "Parameter"
|
||||
|
||||
Public ReadOnly Property Parameter_Command As ICommand
|
||||
Get
|
||||
@@ -937,7 +997,7 @@ Public Class ProjectVM
|
||||
PartParametersWnd.ShowDialog()
|
||||
End Sub
|
||||
|
||||
#End Region ' Parameter_Command
|
||||
#End Region ' Parameter
|
||||
|
||||
#Region "Back_Command"
|
||||
|
||||
@@ -953,7 +1013,6 @@ 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.
|
Before Width: | Height: | Size: 490 B |
@@ -78,7 +78,7 @@ 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)
|
||||
Core.EgtMessageBoxV.Show(Nothing, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Altrimenti manca la licenza
|
||||
Else
|
||||
EgtOutLog("Problems with Licence")
|
||||
@@ -86,7 +86,7 @@ Public Class MySceneHostVM
|
||||
Dim sKeyInfo As String = "" : EgtGetKeyInfo(sKeyInfo)
|
||||
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(10105) & vbCrLf & EgtMsg(10106)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
If Core.EgtMessageBoxV.Show(Nothing, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
If MessageBox.Show(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,17 +2,7 @@
|
||||
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: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:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -27,107 +17,163 @@
|
||||
|
||||
<TabItem Header="OPTIMIZERSTATS">
|
||||
<TabItem.Content>
|
||||
<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>
|
||||
<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>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="RAWPARTSTAT">
|
||||
<TabItem.Content>
|
||||
<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>
|
||||
<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>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
|
||||
</TabControl>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
|
||||
@@ -1,204 +1,10 @@
|
||||
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
|
||||
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) & "\DataGridLayoutFile\OptimizerStatistics.json"
|
||||
m_sDataGridLayoutPath2 = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\RawPartStatistics.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)
|
||||
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
|
||||
CopyToClipboard(dgOptimizerStatistics, dgRawPartStatistics, m_StatisticsVM)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<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:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxpdf="http://schemas.devexpress.com/winfx/2008/xaml/pdf">
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
|
||||
|
||||
<Grid.Resources>
|
||||
<OPTIMIZER:ColumnNameConverter x:Key="ColumnNameConverter"/>
|
||||
@@ -147,42 +145,8 @@
|
||||
Style="{StaticResource PDF_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<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>
|
||||
<OPTIMIZER:PdfViewer PdfPath="{Binding WebAddress}"
|
||||
Visibility="{Binding PdfViewer_Visibility}"/>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
DataContext = New PDFEditorVM()
|
||||
|
||||
MapV.SetRefPDFEditorV(Me)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -61,7 +61,6 @@ Public Class PDFEditorVM
|
||||
m_nViewButton = value
|
||||
NotifyPropertyChanged(NameOf(nViewButton))
|
||||
End Sub
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdCreatePDFPreviewVis As ICommand
|
||||
Private m_cmdCreatePDFPreviewOtt As ICommand
|
||||
@@ -125,7 +124,6 @@ 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
|
||||
|
||||
@@ -160,8 +158,7 @@ Public Class PDFEditorVM
|
||||
Case VIEW_BUTTON.PDF
|
||||
SetPdfViewer_Visibility(True)
|
||||
Configuration.CreatePrintPDF(PDFPage.MACHING, True)
|
||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf")
|
||||
MapV.refPDFEditorV.PDFViewer.OpenDocument(WebAddress)
|
||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -184,7 +181,6 @@ 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
|
||||
|
||||
@@ -384,6 +384,7 @@ Module PDFHelper
|
||||
Dim paragraph As Paragraph = section.AddParagraph(EgtMsg(62590), "Heading2")
|
||||
paragraph.Format.SpaceAfter = Unit.FromMillimeter(3.0)
|
||||
|
||||
' Controllo se bPreview è true mostra il PDF di preview se no il PDF completo
|
||||
If bPreview Then
|
||||
CreateRawPartPage(section, sMachGroupList, sPDN, sW, sH, sL, sDesc, sMaterial, Nothing, bPreview)
|
||||
Else
|
||||
|
||||
@@ -2,100 +2,148 @@
|
||||
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: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:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
Style="{StaticResource Statistics_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -1,153 +1,10 @@
|
||||
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
|
||||
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) & "\DataGridLayoutFile\Statistics.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)
|
||||
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
|
||||
ExportToExcelAndCsv(dgStatistics, m_StatisticsVM)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -8,8 +8,6 @@ Public Class StatisticsVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public refSaveStatisticGridControlLayout As Action
|
||||
|
||||
' Evento per chiusura finestra
|
||||
Public Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
@@ -397,11 +395,6 @@ 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,8 +9,7 @@
|
||||
Title="StatisticWnd"
|
||||
MaxHeight="600"
|
||||
Width="1300"
|
||||
Style="{StaticResource OptimizerWindow.Dialog}"
|
||||
Closed="OptimizerWindow_Closed">
|
||||
Style="{StaticResource OptimizerWindow.Dialog}">
|
||||
|
||||
<TabControl Name="Statistic_TabControl"
|
||||
SelectedIndex="0"
|
||||
|
||||
@@ -12,16 +12,15 @@
|
||||
End Sub
|
||||
|
||||
Private Sub Statistic_TabControl_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
||||
Me.Tag = If(Statistic_TabControl.SelectedIndex = 0, Map.refProjectVM.BTLStructureVM, Map.refProjectVM)
|
||||
If Statistic_TabControl.SelectedIndex = 0 Then
|
||||
Me.Tag = Map.refProjectVM.BTLStructureVM
|
||||
Else
|
||||
Me.Tag = Map.refProjectVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_StatisticsVM.m_CloseWindow
|
||||
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
|
||||
|
||||
@@ -399,6 +399,11 @@ Public Class StrategyManagerVM
|
||||
SetbIsModifyStrategy(True)
|
||||
' Setto indice per capire che la strategia è stata spostata in ActiveStrategyList
|
||||
m_SelTreeItem.SelAvailableStrategy.nIndexInList = 0
|
||||
' Riallinea tutti gli indici
|
||||
For Index As Integer = 0 To m_SelTreeItem.StrategyList.Count - 1
|
||||
m_SelTreeItem.StrategyList(Index).nIndexInList = Index
|
||||
Next
|
||||
SetUpdate_Visibility(False)
|
||||
' Aggiorno le liste
|
||||
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||
@@ -427,6 +432,20 @@ Public Class StrategyManagerVM
|
||||
SetbIsModifyStrategy(True)
|
||||
' Setto indice per capire che la strategia è stata spostata in StrategyList
|
||||
m_SelTreeItem.SelActiveStrategy.nIndexInList = -1
|
||||
' Trova l’elemento con indice -1
|
||||
Dim mRemovedItemStrategyList As List(Of Strategy) = m_SelTreeItem.StrategyList.Where(Function(s) s.nIndexInList = -1).ToList()
|
||||
For Each RemovedItemStrategy In mRemovedItemStrategyList
|
||||
m_SelTreeItem.StrategyList.Remove(RemovedItemStrategy)
|
||||
Next
|
||||
' Riallinea tutti gli indici
|
||||
For Index As Integer = 0 To m_SelTreeItem.StrategyList.Count - 1
|
||||
m_SelTreeItem.StrategyList(Index).nIndexInList = Index
|
||||
Next
|
||||
' Reinserisco elementi rimossi
|
||||
For Each RemovedItemStrategy In mRemovedItemStrategyList
|
||||
m_SelTreeItem.StrategyList.Add(RemovedItemStrategy)
|
||||
Next
|
||||
SetUpdate_Visibility(False)
|
||||
' Aggiorno le liste
|
||||
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||
|
||||
@@ -40,15 +40,12 @@ 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 & "\OptStatistics.pdf"
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf"
|
||||
PrevSelect()
|
||||
End If
|
||||
Dim renderer As New PdfDocumentRenderer(True) With {
|
||||
Dim renderer As New PdfDocumentRenderer() 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
|
||||
|
||||
@@ -3,11 +3,6 @@
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgtBEAMWALLCore="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
|
||||
|
||||
<!--#region Panel ViewModel-->
|
||||
@@ -70,12 +65,10 @@
|
||||
<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"/>
|
||||
<BitmapImage x:Key="Remove_Image" UriSource="/Resources/NewPage/Remove.png"/>
|
||||
<BitmapImage x:Key="HeaderSimulate_Image" UriSource="/Resources/NewPage/SimulateIntestazione.png"/>
|
||||
<BitmapImage x:Key="Simulate_Image" UriSource="/Resources/CALCPanel/Simulate.png"/>
|
||||
<BitmapImage x:Key="ResetCalc_Image" UriSource="/Resources/NewPage/reset.png"/>
|
||||
<BitmapImage x:Key="ChooseMachine_Image" UriSource="/Resources/CALCPanel/ChooseMachine.png"/>
|
||||
@@ -489,7 +482,7 @@
|
||||
<!--#endregion CALC_ROT-->
|
||||
|
||||
<Style x:Key="Prod_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="TextAlignment" Value="Justify"/>
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGridCell}}, Path=IsSelected}" Value="True">
|
||||
@@ -534,9 +527,8 @@
|
||||
|
||||
<Style x:Key="Rotate_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="25"/>
|
||||
<Setter Property="Margin" Value="5,0,5,0"/>
|
||||
<Setter Property="Margin" Value="2,0,2,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ROT_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
@@ -828,7 +820,7 @@
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
<Setter Property="Margin" Value="2.5,3,2.5,3"/>
|
||||
<Setter Property="Margin" Value="2.5,2.5,2.5,2.5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="NameBTL_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
|
||||
@@ -869,14 +861,6 @@
|
||||
<Setter Property="Margin" Value="2.5,2.5,2.5,2.5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DropDownButton_BarButtonItem" TargetType="{x:Type dxb:BarButtonItem}">
|
||||
<Setter Property="Background" Value="{StaticResource ButtonBasic.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ButtonBasic.Static.Border}"/>
|
||||
<Setter Property="BorderThickness" Value="0.5"/>
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
<Setter Property="GlyphSize" Value="Medium"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MacroFeaturen_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource ProdManager_Button}">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="2.5,2.5,10,2.5"/>
|
||||
@@ -1437,9 +1421,6 @@
|
||||
<Setter Property="Grid.IsSharedSizeScope" Value="True"/>
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
|
||||
<Setter Property="VirtualizingPanel.IsVirtualizing" Value="True"/>
|
||||
<Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling"/>
|
||||
<Style.Resources>
|
||||
<Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource Optimizer_ScrollBar}"/>
|
||||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
@@ -2091,10 +2072,6 @@
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TableView_StackPanel" TargetType="{x:Type StackPanel}" BasedOn="{StaticResource PartManager_StackPanel}">
|
||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion PartManager-->
|
||||
|
||||
<!--#region OptStatistics-->
|
||||
@@ -2277,10 +2254,6 @@
|
||||
<Setter Property="Margin" Value="5,5,5,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TableView_Grid" TargetType="{x:Type Grid}">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion Grid-->
|
||||
|
||||
<!--#region GridSplitter-->
|
||||
@@ -2497,13 +2470,6 @@
|
||||
<Setter Property="StaysOpen" Value="False"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="FilterSect_PopUp" TargetType="{x:Type Popup}">
|
||||
<Setter Property="AllowsTransparency" Value="True"/>
|
||||
<Setter Property="PopupAnimation" Value="Fade"/>
|
||||
<Setter Property="Placement" Value="Bottom"/>
|
||||
<Setter Property="StaysOpen" Value="False"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion PopUp-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
@@ -2620,7 +2586,7 @@
|
||||
<Setter Property="Background" Value="{DynamicResource Border.BTLPartManager.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource Border.BTLPartManager.Border}"/>
|
||||
<Setter Property="CornerRadius" Value="5"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SetUp_Border" TargetType="{x:Type Border}">
|
||||
@@ -2634,23 +2600,6 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TableView_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="{StaticResource Grid.Static.ExpanderDown.Background}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Calc_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="Height" Value="20"/>
|
||||
<Setter Property="Width" Value="20"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Filtering_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_Silver}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
</Style>
|
||||
|
||||
<!--#region TopPanel_Border-->
|
||||
|
||||
<Style x:Key="TopPanel_Border" TargetType="{x:Type Border}">
|
||||
@@ -2780,196 +2729,4 @@
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--#region DevExpress-->
|
||||
|
||||
<Style x:Key="TableViewStyle" TargetType="{x:Type dxg:TableView}">
|
||||
<Setter Property="AllowPerPixelScrolling" Value="True"/>
|
||||
<Setter Property="AllowEditing" Value="False"/>
|
||||
<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="False"/>
|
||||
<Setter Property="GroupSummaryDisplayMode" Value="AlignByColumns"/>
|
||||
<Setter Property="IsTotalSummaryMenuEnabled" Value="False"/>
|
||||
<Setter Property="IsGroupFooterMenuEnabled" Value="True"/>
|
||||
<Setter Property="LeftGroupAreaIndent" Value="0"/>
|
||||
<Setter Property="NavigationStyle" Value="Row"/>
|
||||
<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="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}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource DataGridColumnHeader.Static.Main.Foreground}"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<!--<Setter Property="dxg:BaseGridColumnHeader.ShowFilterButtonOnHover" Value="False"/>-->
|
||||
</Style>
|
||||
|
||||
<Style x:Key="RawPartHeaderStyle" TargetType="{x:Type dxg:BaseGridHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource DataGridColumnHeader.Static.RawPart.Background}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource DataGridColumnHeader.Static.RawPart.Foreground}"/>
|
||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
||||
<Setter Property="FontSize" Value="11"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<!--<Setter Property="dxg:BaseGridColumnHeader.ShowFilterButtonOnHover" Value="False"/>-->
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HeaderImageStyle" TargetType="{x:Type Image}">
|
||||
<Setter Property="Height" Value="20"/>
|
||||
<Setter Property="Stretch" Value="Uniform"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="RowStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="IsEnabled" Value="{Binding Row.IsRowEnabled}"/>
|
||||
<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}"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
</Trigger>
|
||||
<Trigger Property="dxg:GridViewBase.IsFocusedRow" 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}"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
</Trigger>
|
||||
</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}"/>
|
||||
<Setter Property="GlyphHeight" Value="20"/>
|
||||
<Setter Property="GlyphWidth" Value="20"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ColumnButtonStyle" TargetType="{x:Type dxg:GridColumn}">
|
||||
<Setter Property="ImageAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalHeaderContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ColumnInfoStyle" TargetType="{x:Type dxg:GridColumn}">
|
||||
<Setter Property="HorizontalHeaderContentAlignment" Value="Center"/>
|
||||
<Setter Property="EditSettings">
|
||||
<Setter.Value>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="bDoCheckEditStyle" TargetType="{x:Type dxe:CheckEdit}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SearchControlStyle" TargetType="{x:Type dxe:SearchControl}">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="300"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CheckedListStyle" TargetType="{x:Type dxfui:CheckedListFilterElement}">
|
||||
<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>
|
||||
|
||||
<Style x:Key="ComboBoxEditStyle" TargetType="{x:Type dxe:ComboBoxEdit}">
|
||||
<Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource ComboBox.Static.Foreground}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="6,3,5,3"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="IsTextEditable" Value="False"/>
|
||||
<Setter Property="AllowDefaultButton" Value="True"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion DevExpress-->
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
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"
|
||||
@@ -26,11 +20,6 @@
|
||||
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
|
||||
|
||||
@@ -6,16 +6,6 @@
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
|
||||
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"
|
||||
SizeToContent="Height"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ShowInTaskbar="False"
|
||||
@@ -220,70 +210,6 @@
|
||||
Style="{StaticResource WAutoWnd_Button}"/>
|
||||
|
||||
</Grid>
|
||||
<!--<dxg:GridControl Grid.Row="1"
|
||||
x:Name="Warehouse_GridControl"
|
||||
ItemsSource="{Binding SParamList}"
|
||||
SelectedItem="{Binding SelSParam}"
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="Warehouse_TableView"
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}">
|
||||
</dxg:TableView>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="bActive"
|
||||
Header=""
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bActive}"
|
||||
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="SectXMat"
|
||||
Header="{Binding SectionXMaterial_Msg}"
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
SortFieldName="SectionXMaterialDisplayOrder"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:ComboBoxEdit ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type OPTIMIZER:WarehouseWndV}}, Path=DataContext.SectionXMaterialList}"
|
||||
EditValue="{Binding SectXMat, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type dxe:ComboBoxEdit}}}"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type dxe:ComboBoxEdit}}}"
|
||||
DisplayMember="sSectionXMaterial"
|
||||
Style="{StaticResource ComboBoxEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</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="sL"
|
||||
Header="{Binding L_Msg}"
|
||||
Binding="{Binding sL}"
|
||||
SortFieldName="dL"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="nQuantity"
|
||||
Header="{Binding Quantity_Msg}"
|
||||
Binding="{Binding nQuantity}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>-->
|
||||
|
||||
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding SParamList}"
|
||||
SelectedItem="{Binding SelSParam}"
|
||||
@@ -296,7 +222,7 @@
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<DataGrid.Resources>
|
||||
<!--Active-->
|
||||
<!-- Active -->
|
||||
<DataGridTemplateColumn x:Key="colACTIVE">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
@@ -305,13 +231,13 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--SectionXMaterial-->
|
||||
<!-- SectionXMaterial -->
|
||||
<DataGridTemplateColumn x:Key="colSECTXMAT"
|
||||
SortMemberPath="SectionXMaterialDisplayOrder">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.SectionXMaterial_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:WarehouseWndV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
@@ -324,7 +250,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--W-->
|
||||
<!-- W -->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding dW}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
@@ -332,7 +258,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--L-->
|
||||
<!-- L -->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding dL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
@@ -340,7 +266,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Quantity-->
|
||||
<!-- Quantity -->
|
||||
<DataGridTextColumn x:Key="colQTY" Binding="{Binding nQuantity}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
Reference in New Issue
Block a user