Compare commits
126 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| efe117fbc8 | |||
| 8d36df10f5 | |||
| b89941a925 | |||
| 07ee1d5761 | |||
| 65cb7280c4 | |||
| 68a926e111 | |||
| f2ee4f346d | |||
| 42dca6acf9 | |||
| 9313401d5d | |||
| 7d29465398 | |||
| 97c4e66eba | |||
| 133769af3c | |||
| cdfb91a7ca | |||
| 5dc59ff31c | |||
| 2b9c50e281 | |||
| 193a4ded1c | |||
| 586795a26d | |||
| bdae2bb344 | |||
| b8d60e3cef | |||
| ffcc4ddd49 | |||
| 918f1c1932 | |||
| 78356e2bcd | |||
| 973d279d27 | |||
| 5a5be6e417 | |||
| d770de472f | |||
| fccd7886b7 | |||
| 56798ba30c | |||
| fec45afda0 | |||
| c9a1ccb11b | |||
| d7e240d21a | |||
| 38dfb38250 | |||
| 7c7cb786ba | |||
| a94fd12a7b | |||
| 385fd8fdae | |||
| 822ae92b0b | |||
| f4cbc64b5c | |||
| af604a996d | |||
| df06b205bd | |||
| 1ec65642c8 | |||
| 84d54b5a98 | |||
| 0e58787a85 | |||
| 57a53fa0e8 | |||
| ec454f8560 | |||
| 21c89d9061 | |||
| de6aac3b71 | |||
| 3451e8f443 | |||
| f313853774 | |||
| 9a3b835033 | |||
| c802fb31b7 | |||
| a509520945 | |||
| 034c9a6930 | |||
| 6f5360ca35 | |||
| bc42b200a1 | |||
| d6d1091a0c | |||
| d0e58adb94 | |||
| 79cbcd6a74 | |||
| d760af1770 | |||
| e56cc58aa4 | |||
| d46916bdfd | |||
| df825b9070 | |||
| 8162c09ec0 | |||
| d473c7ad88 | |||
| 365dc15127 | |||
| feb9f517e7 | |||
| 2eed87fbe8 | |||
| cdf740cba7 | |||
| b885b7d598 | |||
| 113cbe0710 | |||
| 1c0d81852b | |||
| 15c919b0c6 | |||
| fb7a7fcb2a | |||
| 8b69683620 | |||
| 75340d15cf | |||
| 10ed5c3fd9 | |||
| 4e42c09b82 | |||
| 096b9a5933 | |||
| 29d68b3d21 | |||
| 6d7b141042 | |||
| 5eefbdad0e | |||
| a1221862a4 | |||
| 9c907c96ce | |||
| e3c9fdfdf4 | |||
| 709ccc19dd | |||
| 0642982973 | |||
| 13549a1cf4 | |||
| 2fda49f4ef | |||
| 04a5b75a0e | |||
| 2631033c92 | |||
| ca6c2ac4a5 | |||
| 7e668565eb | |||
| 48359ed2bd | |||
| 983c7f35fd | |||
| 404dc17b24 | |||
| 86f3dab3ef | |||
| b367acd06a | |||
| 272c17c2cb | |||
| 2917207424 | |||
| 789e543e3a | |||
| 7e4b8678c4 | |||
| 428c14242a | |||
| c392165881 | |||
| d04dde4264 | |||
| e80b8252ef | |||
| 59644a3329 | |||
| 5d7a931f87 | |||
| 4b9ed93a7a | |||
| d61104aaab | |||
| 67944bfdcb | |||
| 31dcf81fc2 | |||
| b7ada79678 | |||
| a158df1115 | |||
| b0f7488fd6 | |||
| 8b871d0c15 | |||
| 01804c5d0d | |||
| 75c02a7625 | |||
| e446f21069 | |||
| 2e2f2dd66d | |||
| 31b379bb3d | |||
| f1a8c8912d | |||
| 36747a9faa | |||
| 2ae8427be4 | |||
| 420af319a1 | |||
| 69c58ddbd9 | |||
| 6bc913530a | |||
| 46548eeeb0 | |||
| f605ba5b84 |
@@ -163,7 +163,7 @@ Public Class BTLFeatureVM
|
|||||||
|
|
||||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
Return If(m_BTLFeatureM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
Return If(m_BTLFeatureM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ Public Module CalcIntegration
|
|||||||
Else
|
Else
|
||||||
vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """ " &
|
vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """ " &
|
||||||
"""" & vBar(nCurrBar).nProjType & """ " &
|
"""" & vBar(nCurrBar).nProjType & """ " &
|
||||||
"""" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType
|
"""" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType & " " & vBar(nCurrBar).nBarState
|
||||||
End If
|
End If
|
||||||
vProc(j).Proc.StartInfo.UseShellExecute = False
|
vProc(j).Proc.StartInfo.UseShellExecute = False
|
||||||
|
|
||||||
@@ -475,7 +475,7 @@ Public Module CalcIntegration
|
|||||||
End Module
|
End Module
|
||||||
|
|
||||||
Public Class Bar
|
Public Class Bar
|
||||||
Public nBarState As Integer
|
Public nBarState As Integer = -1
|
||||||
Public nBarId As Integer
|
Public nBarId As Integer
|
||||||
Public sBarPath As String
|
Public sBarPath As String
|
||||||
Public bBarOk As Boolean
|
Public bBarOk As Boolean
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ Public Module ConstIni
|
|||||||
Public Const K_ENABLE As String = "Enable"
|
Public Const K_ENABLE As String = "Enable"
|
||||||
Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities"
|
Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities"
|
||||||
Public Const K_TEMPLATE As String = "Template"
|
Public Const K_TEMPLATE As String = "Template"
|
||||||
|
Public Const K_PRINTERMODE As String = "Mode"
|
||||||
|
Public Const K_NETWORKADDRESS As String = "NetworkAddress"
|
||||||
|
|
||||||
Public Const S_BEAM_LIST As String = "Beam_List"
|
Public Const S_BEAM_LIST As String = "Beam_List"
|
||||||
Public Const S_WALL_LIST As String = "Wall_List"
|
Public Const S_WALL_LIST As String = "Wall_List"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports EgtWPFLib5
|
Imports System.Windows
|
||||||
Imports System.Windows
|
Imports System.Windows.Threading
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
Public Class EgtMessageBoxV
|
Public Class EgtMessageBoxV
|
||||||
|
|
||||||
@@ -25,6 +26,18 @@ Public Class EgtMessageBoxV
|
|||||||
|
|
||||||
#Region "METHODS"
|
#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>
|
''' <summary>
|
||||||
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
|
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
|||||||
@@ -267,13 +267,13 @@ Public MustInherit Class MyMachGroupVM
|
|||||||
|
|
||||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
Return If(MyMachGroupM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
Return If(MyMachGroupM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
Return If(MyMachGroupM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
Return If(MyMachGroupM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Hidden)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|||||||
@@ -319,13 +319,13 @@ Public MustInherit Class PartVM
|
|||||||
|
|
||||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
Return If(m_PartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
Return If(m_PartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
Return If(m_PartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
Return If(m_PartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Hidden)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Imports System.Windows
|
|||||||
<Assembly: AssemblyDescription("")>
|
<Assembly: AssemblyDescription("")>
|
||||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("Aedifica.Core")>
|
<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: AssemblyTrademark("")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
@@ -38,5 +38,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("3.1.5.2")>
|
<Assembly: AssemblyVersion("3.1.7.2")>
|
||||||
<Assembly: AssemblyFileVersion("3.1.5.2")>
|
<Assembly: AssemblyFileVersion("3.1.7.2")>
|
||||||
|
|||||||
@@ -302,7 +302,11 @@
|
|||||||
|
|
||||||
<!--#region Colori ComboBox-->
|
<!--#region Colori ComboBox-->
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ComboBox.Static.Background" Color="{StaticResource BeamWall_Glacier_Color}"/>
|
<!--<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.Border" 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.Glyph" Color="{StaticResource BeamWall_White_Color}"/>
|
||||||
<SolidColorBrush x:Key="ComboBox.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
<SolidColorBrush x:Key="ComboBox.Static.Foreground" Color="{StaticResource BeamWall_Corduroy_Color}"/>
|
||||||
@@ -1921,6 +1925,7 @@
|
|||||||
|
|
||||||
<Style x:Key="EgtMessageBox_ItemsControl" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource {x:Type ItemsControl}}">
|
<Style x:Key="EgtMessageBox_ItemsControl" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource {x:Type ItemsControl}}">
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Margin" Value="0,0,0,10"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="UsersControl_ItemsControl" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource {x:Type ItemsControl}}">
|
<Style x:Key="UsersControl_ItemsControl" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource {x:Type ItemsControl}}">
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("3.1.5.2")]
|
[assembly: AssemblyVersion("3.1.7.2")]
|
||||||
[assembly: AssemblyFileVersion("3.1.5.2")]
|
[assembly: AssemblyFileVersion("3.1.7.2")]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtBEAMWALL.Core
|
|
||||||
|
|
||||||
Public Class AboutBoxV
|
Public Class AboutBoxV
|
||||||
|
|
||||||
|
|||||||
@@ -106,11 +106,7 @@ Public Class AddFeatureWndVM
|
|||||||
GetMacroListDefault(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
GetMacroListDefault(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
||||||
' ricavo lista file Macro Custom
|
' ricavo lista file Macro Custom
|
||||||
GetMacroListCustom(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
GetMacroListCustom(nGRPFromFileName, nPRCFromFileName, sMacroNameFromFileName, nIdMacroName)
|
||||||
If MacroCustomList.Count > 0 Then
|
MacroList_IsEnabled = If(MacroCustomList.Count > 0, True, False)
|
||||||
MacroList_IsEnabled = True
|
|
||||||
Else
|
|
||||||
MacroList_IsEnabled = False
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(nSelPRC))
|
NotifyPropertyChanged(NameOf(nSelPRC))
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ Public Class AddPartWndVM
|
|||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "Ok"
|
#Region "Ok_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Ok_Command As ICommand
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -169,7 +169,7 @@ Public Class AddPartWndVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Ok
|
#End Region ' Ok_Command
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ Public Class AddRawPartWndVM
|
|||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "Ok"
|
#Region "Ok_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Ok_Command As ICommand
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -167,7 +167,7 @@ Public Class AddRawPartWndVM
|
|||||||
RaiseEvent m_CloseWindow(True)
|
RaiseEvent m_CloseWindow(True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Ok
|
#End Region ' Ok_Command
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
<Application x:Class="Application"
|
<Application x:Class="Application"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
|
||||||
|
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<!--<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DarkDictionary.xaml"/>
|
<!--<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DarkDictionary.xaml"/>
|
||||||
<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DefaultDictionary.xaml"/>-->
|
<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/DefaultDictionary.xaml"/>-->
|
||||||
|
<ResourceDictionary Source="/EgwRedmineAPI;component/Themes/Generic.xaml"/>
|
||||||
<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/Generic.xaml"/>
|
<ResourceDictionary Source="pack://application:,,,/EgtBEAMWALL.Core;component/Themes/Generic.xaml"/>
|
||||||
<ResourceDictionary Source="Utility/Dictionary.xaml"/>
|
<ResourceDictionary Source="Utility/Dictionary.xaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<StackPanel Style="{StaticResource MachinePanel_StackPanel}">
|
||||||
<ComboBox ItemsSource="{Binding StrategySetupList}"
|
<ComboBox ItemsSource="{Binding StrategySetupList}"
|
||||||
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
|
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Style="{StaticResource BTLDataWnd_ComboBox}">
|
Style="{StaticResource BTLDataWnd_ComboBox}">
|
||||||
@@ -68,116 +68,123 @@
|
|||||||
<TextBlock Text="{Binding PROJNUM_MSG}"
|
<TextBlock Text="{Binding PROJNUM_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sPROJNUM, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sPROJNUM, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding PROJNAME_MSG}"
|
<TextBlock Text="{Binding PROJNAME_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sPROJNAME, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sPROJNAME, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding PROJPART_MSG}"
|
<TextBlock Text="{Binding PROJPART_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sPROJPART, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sPROJPART, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding PROJGUID_MSG}"
|
<TextBlock Text="{Binding PROJGUID_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sPROJGUID, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sPROJGUID, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding LISTNAME_MSG}"
|
<TextBlock Text="{Binding LISTNAME_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sLISTNAME, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sLISTNAME, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding CUSTOMER_MSG}"
|
<TextBlock Text="{Binding CUSTOMER_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sCUSTOMER, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sCUSTOMER, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding ARCHITECT_MSG}"
|
<TextBlock Text="{Binding ARCHITECT_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sARCHITECT, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sARCHITECT, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding EDITOR_MSG}"
|
<TextBlock Text="{Binding EDITOR_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sEDITOR, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sEDITOR, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding DELIVDATE_MSG}"
|
<TextBlock Text="{Binding DELIVDATE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sDELIVDATE, UpdateSourceTrigger=Explicit}"
|
Text="{Binding sDELIVDATE, UpdateSourceTrigger=Explicit,
|
||||||
|
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}}}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding EXPDATE_MSG}"
|
<TextBlock Text="{Binding EXPDATE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sEXPDATE, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sEXPDATE, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding EXPTIME_MSG}"
|
<TextBlock Text="{Binding EXPTIME_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sEXPTIME, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sEXPTIME, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding EXPRELEASE_MSG}"
|
<TextBlock Text="{Binding EXPRELEASE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sEXPRELEASE, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sEXPRELEASE, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding LANGUAGE_MSG}"
|
<TextBlock Text="{Binding LANGUAGE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sLANGUAGE, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sLANGUAGE, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding RANGE_MSG}"
|
<TextBlock Text="{Binding RANGE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<ComboBox Grid.Column="1"
|
<ComboBox Grid.Column="1"
|
||||||
ItemsSource="{Binding ocRANGE,
|
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||||
|
Path=Tag.ocRANGE,
|
||||||
Mode=OneWay}"
|
Mode=OneWay}"
|
||||||
SelectedIndex="{Binding SelRANGE,
|
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||||
|
Path=Tag.SelRANGE,
|
||||||
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Style="{StaticResource PartParam_ComboBox}"/>
|
Style="{StaticResource PartParam_ComboBox}"/>
|
||||||
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
|
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<ComboBox Grid.Column="1"
|
<ComboBox Grid.Column="1"
|
||||||
ItemsSource="{Binding ocPROCESSINGQUALITY,
|
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||||
|
Path=Tag.ocPROCESSINGQUALITY,
|
||||||
Mode=OneWay}"
|
Mode=OneWay}"
|
||||||
SelectedIndex="{Binding SelPROCESSINGQUALITY,
|
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||||
|
Path=Tag.SelPROCESSINGQUALITY,
|
||||||
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Style="{StaticResource PartParam_ComboBox}"/>
|
Style="{StaticResource PartParam_ComboBox}"/>
|
||||||
<TextBlock Text="{Binding COMPUTERNAME_MSG}"
|
<TextBlock Text="{Binding COMPUTERNAME_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sCOMPUTERNAME, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sCOMPUTERNAME, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding USER_MSG}"
|
<TextBlock Text="{Binding USER_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sUSER, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sUSER, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding SRCFILE_MSG}"
|
<TextBlock Text="{Binding SRCFILE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sSRCFILE, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sSRCFILE, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding EXPFILE_MSG}"
|
<TextBlock Text="{Binding EXPFILE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sEXPFILE, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sEXPFILE, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding RECESS_MSG}"
|
<TextBlock Text="{Binding RECESS_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<ComboBox Grid.Column="1"
|
<ComboBox Grid.Column="1"
|
||||||
ItemsSource="{Binding ocRECESS,
|
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||||
|
Path=Tag.ocRECESS,
|
||||||
Mode=OneWay}"
|
Mode=OneWay}"
|
||||||
SelectedIndex="{Binding SelRECESS,
|
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||||
|
Path=Tag.SelRECESS,
|
||||||
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Style="{StaticResource PartParam_ComboBox}"/>
|
Style="{StaticResource PartParam_ComboBox}"/>
|
||||||
<TextBlock Text="{Binding USERATTRIBUTE_MSG}"
|
<TextBlock Text="{Binding USERATTRIBUTE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding sUSERATTRIBUTE, UpdateSourceTrigger=Explicit}"
|
Text="{Binding CurrBTLStructure.sUSERATTRIBUTE, UpdateSourceTrigger=LostFocus}"
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
' This call is required by the designer.
|
' This call is required by the designer.
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
Me.DataContext = BTLDataWndVM
|
Me.DataContext = BTLDataWndVM
|
||||||
|
Me.Tag = Map.refProjectVM.BTLStructureVM
|
||||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||||
m_BTLDataWndVM = BTLDataWndVM
|
m_BTLDataWndVM = BTLDataWndVM
|
||||||
End Sub
|
End Sub
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
If Not IsNothing(Map.refBTLDataWndVM.SelStrategySetup) AndAlso Map.refBTLDataWndVM.SelStrategySetup.Equals(SelStrategy.Content) Then
|
If Not IsNothing(Map.refBTLDataWndVM.SelStrategySetup) AndAlso Map.refBTLDataWndVM.SelStrategySetup.Equals(SelStrategy.Content) Then
|
||||||
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
|
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
|
||||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||||
|
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||||
Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content)
|
Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content)
|
||||||
Map.refBTLDataWndVM.SelStrategySetup = SelStrategy.Content
|
Map.refBTLDataWndVM.SelStrategySetup = SelStrategy.Content
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ Public Class BTLDataWndVM
|
|||||||
If m_SelStrategySetup <> value Then
|
If m_SelStrategySetup <> value Then
|
||||||
Map.refStrategyManagerVM.SelStrategySetup.sName = value
|
Map.refStrategyManagerVM.SelStrategySetup.sName = value
|
||||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||||
|
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||||
ReadCustomGeneralParameters(value)
|
ReadCustomGeneralParameters(value)
|
||||||
End If
|
End If
|
||||||
m_SelStrategySetup = value
|
m_SelStrategySetup = value
|
||||||
@@ -80,6 +81,13 @@ Public Class BTLDataWndVM
|
|||||||
NotifyPropertyChanged(NameOf(ErrText))
|
NotifyPropertyChanged(NameOf(ErrText))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private m_CurrBTLStructure As BTLStructureVM
|
||||||
|
Public ReadOnly Property CurrBTLStructure As BTLStructureVM
|
||||||
|
Get
|
||||||
|
Return m_CurrBTLStructure
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "Parametri generici"
|
#Region "Parametri generici"
|
||||||
|
|
||||||
Public m_sPROJNUM As String
|
Public m_sPROJNUM As String
|
||||||
@@ -565,8 +573,9 @@ Public Class BTLDataWndVM
|
|||||||
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True)
|
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New()
|
Sub New(BTLStructure As BTLStructureVM)
|
||||||
Map.SetRefBTLDataWndVM(Me)
|
Map.SetRefBTLDataWndVM(Me)
|
||||||
|
m_CurrBTLStructure = BTLStructure
|
||||||
SetIsBTLDataWnd(True)
|
SetIsBTLDataWnd(True)
|
||||||
' leggo parametri Btl
|
' leggo parametri Btl
|
||||||
ReadBtlParams()
|
ReadBtlParams()
|
||||||
@@ -829,7 +838,7 @@ Public Class BTLDataWndVM
|
|||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "Ok"
|
#Region "Ok_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Ok_Command As ICommand
|
Public ReadOnly Property Ok_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -851,14 +860,14 @@ Public Class BTLDataWndVM
|
|||||||
End If
|
End If
|
||||||
SetIsBTLDataWnd(True)
|
SetIsBTLDataWnd(True)
|
||||||
SaveInfo()
|
SaveInfo()
|
||||||
Map.refLeftPanelVM.ResetCalc()
|
Map.refPartListVM.ResetCalc()
|
||||||
Map.refSceneHostVM.SaveProject()
|
Map.refSceneHostVM.SaveProject()
|
||||||
RaiseEvent m_CloseWindow(True)
|
RaiseEvent m_CloseWindow(True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Ok
|
#End Region ' Ok_Command
|
||||||
|
|
||||||
#Region "Cancel"
|
#Region "Cancel_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Cancel_Command As ICommand
|
Public ReadOnly Property Cancel_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -873,7 +882,7 @@ Public Class BTLDataWndVM
|
|||||||
RaiseEvent m_CloseWindow(False)
|
RaiseEvent m_CloseWindow(False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Cancel
|
#End Region ' Cancel_Command
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|||||||
@@ -1,50 +1,47 @@
|
|||||||
<Border x:Class="BTLPartManagerV"
|
<dxb:PopupMenu x:Class="BTLPartManagerV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
DataContext="{StaticResource BTLPartManagerVM}"
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||||
Style="{StaticResource BTLPartManager_Border}">
|
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">
|
||||||
|
|
||||||
<StackPanel Style="{StaticResource PartManager_StackPanel}">
|
<dxb:BarItemMenuHeader ShowContentHeader="False"
|
||||||
<Button Command="{Binding CopyPart_Command}"
|
ItemsOrientation="Horizontal"
|
||||||
Click="ClosePopUp_Click"
|
Margin="0"
|
||||||
ToolTip="{Binding CopyPart_ToolTip}"
|
Padding="0">
|
||||||
IsEnabled="{Binding CopyPart_IsEnabled}"
|
<dxb:BarButtonItem Command="{Binding CopyPart_Command}"
|
||||||
Style="{StaticResource LP_Button}">
|
ToolTip="{Binding CopyPart_ToolTip}"
|
||||||
<Image Source="{StaticResource CopyPart_Image}"
|
IsEnabled="{Binding CopyPart_IsEnabled}"
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
Glyph="{StaticResource CopyPart_Image}"
|
||||||
</Button>
|
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||||
<Button Command="{Binding RemovePart_Command}"
|
<dxb:BarButtonItem Command="{Binding RemovePart_Command}"
|
||||||
Click="ClosePopUp_Click"
|
ToolTip="{Binding RemovePart_ToolTip}"
|
||||||
ToolTip="{Binding RemovePart_ToolTip}"
|
IsEnabled="{Binding RemovePart_IsEnabled}"
|
||||||
IsEnabled="{Binding RemovePart_IsEnabled}"
|
Glyph="{StaticResource Remove_Image}"
|
||||||
Style="{StaticResource LP_Button}">
|
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||||
<Image Source="{StaticResource Remove_Image}"
|
<dxb:BarButtonItem ToolTip="{Binding Simulate_ToolTip}"
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
Command="{Binding Simulate_Command}"
|
||||||
</Button>
|
IsEnabled="{Binding Simulate_IsEnabled}"
|
||||||
<Button ToolTip="{Binding Simulate_ToolTip}"
|
Glyph="{StaticResource Simulate_Image}"
|
||||||
Click="ClosePopUp_Click"
|
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||||
Command="{Binding Simulate_Command}"
|
<dxb:BarButtonItem ToolTip="{Binding Edit_ToolTip}"
|
||||||
IsEnabled="{Binding Simulate_IsEnabled}"
|
Command="{Binding Edit_Command}"
|
||||||
Style="{StaticResource LP_Button}">
|
IsEnabled="{Binding Edit_IsEnabled}"
|
||||||
<Image Source="{StaticResource Simulate_Image}"
|
Glyph="{StaticResource Edit_Image}"
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||||
</Button>
|
<dxb:BarButtonItem Command="{Binding ResetCalc_Command}"
|
||||||
<Button ToolTip="{Binding Edit_ToolTip}"
|
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||||
Click="ClosePopUp_Click"
|
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||||
Command="{Binding Edit_Command}"
|
Glyph="{StaticResource ResetCalc_Image}"
|
||||||
IsEnabled="{Binding Edit_IsEnabled}"
|
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||||
Style="{StaticResource LP_Button}">
|
</dxb:BarItemMenuHeader>
|
||||||
<Image Source="{StaticResource Edit_Image}"
|
|
||||||
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}">
|
|
||||||
<Image Source="{StaticResource ResetCalc_Image}"
|
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
</Border>
|
</dxb:PopupMenu>
|
||||||
|
|||||||
@@ -1,14 +1,3 @@
|
|||||||
Public Class BTLPartManagerV
|
Public Class BTLPartManagerV
|
||||||
|
|
||||||
Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs)
|
|
||||||
Dim Button As Button = DirectCast(sender, Button)
|
|
||||||
Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel)
|
|
||||||
Dim BTLPartManagerV As BTLPartManagerV = DirectCast(StackPanel.Parent, BTLPartManagerV)
|
|
||||||
Dim Popup As Primitives.Popup = DirectCast(BTLPartManagerV.Parent, Primitives.Popup)
|
|
||||||
|
|
||||||
If Not IsNothing(Popup) Then
|
|
||||||
Popup.IsOpen = False
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ Public Class BTLPartManagerVM
|
|||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
Private PADLOCK_IMAGE As String = "pack://application:,,,/Resources/NewPage/padlock.png"
|
Private m_BTLDataWndVM As BTLDataWndVM
|
||||||
|
Public ReadOnly Property BTLDataWndVM As BTLDataWndVM
|
||||||
|
Get
|
||||||
|
Return m_BTLDataWndVM
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_BTLPartManager_IsEnabled As Boolean = True
|
Private m_BTLPartManager_IsEnabled As Boolean = True
|
||||||
Public ReadOnly Property BTLPartManager_IsEnabled As Boolean
|
Public ReadOnly Property BTLPartManager_IsEnabled As Boolean
|
||||||
@@ -178,7 +183,7 @@ Public Class BTLPartManagerVM
|
|||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "CopyPart"
|
#Region "CopyPart_Command"
|
||||||
|
|
||||||
Public ReadOnly Property CopyPart_Command As ICommand
|
Public ReadOnly Property CopyPart_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -196,15 +201,15 @@ Public Class BTLPartManagerVM
|
|||||||
' creo copia
|
' creo copia
|
||||||
Dim NewPart As BTLPartM = SelPart.Copy()
|
Dim NewPart As BTLPartM = SelPart.Copy()
|
||||||
If Not IsNothing(NewPart) Then
|
If Not IsNothing(NewPart) Then
|
||||||
Map.refProjectVM.UpdatePart(NewPart.nPartId)
|
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then Map.refProjectVM.UpdatePart(NewPart.nPartId)
|
||||||
' selezione ultimo che e' quello appena creato
|
' selezione ultimo che e' quello appena creato
|
||||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1), False, True)
|
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1), False, True)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CopyPart
|
#End Region ' CopyPart_Command
|
||||||
|
|
||||||
#Region "RemovePart"
|
#Region "RemovePart_Command"
|
||||||
|
|
||||||
Public ReadOnly Property RemovePart_Command As ICommand
|
Public ReadOnly Property RemovePart_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -216,81 +221,12 @@ Public Class BTLPartManagerVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub RemovePartCmd()
|
Public Sub RemovePartCmd()
|
||||||
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
Map.refProjectVM.BTLStructureVM.DeletePart()
|
||||||
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62573), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
|
|
||||||
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then
|
|
||||||
Dim CurrSelBTLParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
|
|
||||||
For RemoveIndex = CurrSelBTLParts.Count - 1 To 0 Step -1
|
|
||||||
RemovePart(CurrSelBTLParts(RemoveIndex), RemoveIndex = 0)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub RemovePart(BTLPartToDelete As BTLPartVM, bSelPrevious As Boolean)
|
#End Region ' RemovePart_Command
|
||||||
' verifico se ci sono già copie in grezzi
|
|
||||||
Dim nDuploCount As Integer = 0
|
|
||||||
If EgtDuploCount(BTLPartToDelete.nPartId, nDuploCount) AndAlso nDuploCount > 0 Then
|
|
||||||
' avviso che il pezzo non è cancellabile perchè in produzione
|
|
||||||
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61929), nDuploCount), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Warning)
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
' verifico se rimuovere sezione dalla lista
|
|
||||||
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToDelete AndAlso x.Section = BTLPartToDelete.Section) Then
|
|
||||||
Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToDelete.Section)
|
|
||||||
Map.refProjectVM.BTLStructureVM.SelSection = SectionXMaterial.Empty
|
|
||||||
End If
|
|
||||||
' Eseguo cancellazione
|
|
||||||
EgtBeamSetPart(BTLPartToDelete.nPartId)
|
|
||||||
RemoveScenePart(BTLPartToDelete)
|
|
||||||
' seleziono elemento precedente
|
|
||||||
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToDelete)
|
|
||||||
Dim FilteredIndex As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.IndexOf(BTLPartToDelete)
|
|
||||||
Map.refProjectVM.BTLStructureVM.SelBTLParts.Remove(BTLPartToDelete)
|
|
||||||
If EgtBeamErasePart() Then
|
|
||||||
If bSelPrevious Then
|
|
||||||
If FilteredIndex = 0 Then
|
|
||||||
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
|
|
||||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(1))
|
|
||||||
Else
|
|
||||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
|
|
||||||
End If
|
|
||||||
ElseIf FilteredIndex = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 1 Then
|
|
||||||
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
|
|
||||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 2))
|
|
||||||
Else
|
|
||||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(FilteredIndex - 1))
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
' rimuovo dalla lista pezzi
|
|
||||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM)
|
#Region "Simulate_Command"
|
||||||
' Rimuovo pezzo dalla scena
|
|
||||||
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(BTLPartToDelete.nPROJ)
|
|
||||||
If IdAsseBase < 0 Then Return
|
|
||||||
' Setto il nuovo contesto
|
|
||||||
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
|
|
||||||
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
|
|
||||||
Dim DeletePartId As Integer = Map.refSceneShowBuldingVM.MapInfo(BTLPartToDelete.nPartId)
|
|
||||||
EgtErase(DeletePartId)
|
|
||||||
Map.refSceneShowBuldingVM.MapInfo.Remove(BTLPartToDelete.nPartId)
|
|
||||||
EgtBeamShowBuilding(IdAsseBase, True)
|
|
||||||
EgtZoom(ZM.ALL)
|
|
||||||
' Ritorno al contesto corrente
|
|
||||||
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' RemovePart
|
|
||||||
|
|
||||||
#Region "SimulateCommand"
|
|
||||||
|
|
||||||
Public ReadOnly Property Simulate_Command As ICommand
|
Public ReadOnly Property Simulate_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -316,7 +252,7 @@ Public Class BTLPartManagerVM
|
|||||||
Dim TempBarList(0) As EgtBEAMWALL.Core.Bar
|
Dim TempBarList(0) As EgtBEAMWALL.Core.Bar
|
||||||
Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId,
|
Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId,
|
||||||
.nProgramPage = ProjectType.PROJ,
|
.nProgramPage = ProjectType.PROJ,
|
||||||
.nProjType = ProjType,
|
.nProjType = ProjType + 10,
|
||||||
.bBarOk = True,
|
.bBarOk = True,
|
||||||
.nMachineName = ProjectManagerVM.CurrProd.sMachine,
|
.nMachineName = ProjectManagerVM.CurrProd.sMachine,
|
||||||
.nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
.nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
||||||
@@ -335,9 +271,9 @@ Public Class BTLPartManagerVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region ' SimulateCommand
|
#End Region ' Simulate_Command
|
||||||
|
|
||||||
#Region "Edit"
|
#Region "Edit_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Edit_Command As ICommand
|
Public ReadOnly Property Edit_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -349,6 +285,17 @@ Public Class BTLPartManagerVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Friend Sub Edit()
|
Friend Sub Edit()
|
||||||
|
If IsNothing(Map.refBTLDataWndVM) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM) Then Return
|
||||||
|
If Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId < -1 Then Return
|
||||||
|
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||||
|
|
||||||
|
If IsNothing(Map.refBTLDataWndVM) Then
|
||||||
|
m_BTLDataWndVM = New BTLDataWndVM(Map.refProjectVM.BTLStructureVM)
|
||||||
|
End If
|
||||||
Map.refBTLDataWndVM.SetIsBTLDataWnd(False)
|
Map.refBTLDataWndVM.SetIsBTLDataWnd(False)
|
||||||
Dim bValuePart As Boolean = False
|
Dim bValuePart As Boolean = False
|
||||||
For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList
|
For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList
|
||||||
@@ -371,9 +318,9 @@ Public Class BTLPartManagerVM
|
|||||||
Map.refProjectVM.SetLeftPanel_Opacity(0.2)
|
Map.refProjectVM.SetLeftPanel_Opacity(0.2)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Edit
|
#End Region ' Edit_Command
|
||||||
|
|
||||||
#Region "ResetCalc"
|
#Region "ResetCalc_Command"
|
||||||
|
|
||||||
Public ReadOnly Property ResetCalc_Command As ICommand
|
Public ReadOnly Property ResetCalc_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -402,7 +349,7 @@ Public Class BTLPartManagerVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' ResetCalc
|
#End Region ' ResetCalc_Command
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|||||||
@@ -293,6 +293,12 @@ Public Class BTLFeatureVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property sFeature_Name As String
|
||||||
|
Get
|
||||||
|
Return $"[{nSelGRP}-{nPRC:000}] {sName}"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property Edit_ToolTip As String
|
Public ReadOnly Property Edit_ToolTip As String
|
||||||
@@ -481,7 +487,7 @@ Public Class BTLFeatureVM
|
|||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "DeleteFeature"
|
#Region "DeleteFeature_Command"
|
||||||
|
|
||||||
Public ReadOnly Property DeleteFeature_Command As ICommand
|
Public ReadOnly Property DeleteFeature_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -496,9 +502,9 @@ Public Class BTLFeatureVM
|
|||||||
Map.refFeatureListManagerVM.RemoveFeature()
|
Map.refFeatureListManagerVM.RemoveFeature()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' DeleteFeature
|
#End Region ' DeleteFeature_Command
|
||||||
|
|
||||||
#Region "Edit"
|
#Region "Edit_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Edit_Command As ICommand
|
Public ReadOnly Property Edit_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -514,9 +520,9 @@ Public Class BTLFeatureVM
|
|||||||
Map.refFreeContourManagerVM.Open()
|
Map.refFreeContourManagerVM.Open()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Edit
|
#End Region ' Edit_Command
|
||||||
|
|
||||||
#Region "Save"
|
#Region "Save_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Save_Command As ICommand
|
Public ReadOnly Property Save_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -537,9 +543,9 @@ Public Class BTLFeatureVM
|
|||||||
Map.refFreeContourManagerVM.Close(True)
|
Map.refFreeContourManagerVM.Close(True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Save
|
#End Region ' Save_Command
|
||||||
|
|
||||||
#Region "Cancel"
|
#Region "Cancel_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Cancel_Command As ICommand
|
Public ReadOnly Property Cancel_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -555,9 +561,9 @@ Public Class BTLFeatureVM
|
|||||||
Map.refFreeContourManagerVM.Close(False)
|
Map.refFreeContourManagerVM.Close(False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Cancel
|
#End Region ' Cancel_Command
|
||||||
|
|
||||||
#Region "Strategy"
|
#Region "Strategy_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Strategy_Command As ICommand
|
Public ReadOnly Property Strategy_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -576,9 +582,9 @@ Public Class BTLFeatureVM
|
|||||||
Map.refForcedStrategyPanelVM.Init(BTLFeatureM)
|
Map.refForcedStrategyPanelVM.Init(BTLFeatureM)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Strategy
|
#End Region ' Strategy_Command
|
||||||
|
|
||||||
#Region "EditFeature"
|
#Region "EditFeature_Command"
|
||||||
|
|
||||||
Public ReadOnly Property EditFeature_Command As ICommand
|
Public ReadOnly Property EditFeature_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -607,7 +613,7 @@ Public Class BTLFeatureVM
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' EditFeature
|
#End Region ' EditFeature_Command
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ Public Class BTLPartVM
|
|||||||
Return m_BTLPartM
|
Return m_BTLPartM
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_BTLStructureM As BTLStructureM
|
Private m_BTLStructureM As BTLStructureM
|
||||||
|
|
||||||
Public ReadOnly Property nPartId As Integer
|
Public ReadOnly Property nPartId As Integer
|
||||||
@@ -187,7 +188,9 @@ Public Class BTLPartVM
|
|||||||
Get
|
Get
|
||||||
Dim nOrigGroupId As Integer = nPartId
|
Dim nOrigGroupId As Integer = nPartId
|
||||||
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
|
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
|
||||||
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId)
|
If Not Map.refSceneShowBuldingVM.MapInfo.TryGetValue(nPartId, nOrigGroupId) Then
|
||||||
|
EgtOutLog(nPartId & " non presente")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||||
@@ -248,7 +251,9 @@ Public Class BTLPartVM
|
|||||||
Get
|
Get
|
||||||
Dim nOrigGroupId As Integer = nPartId
|
Dim nOrigGroupId As Integer = nPartId
|
||||||
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
|
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
|
||||||
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId)
|
If Not Map.refSceneShowBuldingVM.MapInfo.TryGetValue(nPartId, nOrigGroupId) Then
|
||||||
|
EgtOutLog(nPartId & " non presente")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||||
@@ -309,7 +314,9 @@ Public Class BTLPartVM
|
|||||||
Get
|
Get
|
||||||
Dim nOrigGroupId As Integer = nPartId
|
Dim nOrigGroupId As Integer = nPartId
|
||||||
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
|
If EgtGetCurrentContext() = Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx() Then
|
||||||
nOrigGroupId = Map.refSceneShowBuldingVM.MapInfo(nPartId)
|
If Not Map.refSceneShowBuldingVM.MapInfo.TryGetValue(nPartId, nOrigGroupId) Then
|
||||||
|
EgtOutLog(nPartId & " non presente")
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||||
@@ -1369,13 +1376,13 @@ Public Class BTLPartVM
|
|||||||
|
|
||||||
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
Public ReadOnly Property CALC_ROT_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
Return If(m_BTLPartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed)
|
Return If(m_BTLPartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
Public ReadOnly Property CALC_FALL_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
Return If(m_BTLPartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed)
|
Return If(m_BTLPartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Hidden)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -2227,11 +2234,26 @@ Public Class BTLPartVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
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
|
#End Region ' METHODS
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "Invert"
|
#Region "Invert_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Invert_Command As ICommand
|
Public ReadOnly Property Invert_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -2253,41 +2275,9 @@ Public Class BTLPartVM
|
|||||||
NotifyPropertyChanged(NameOf(sINVERTED))
|
NotifyPropertyChanged(NameOf(sINVERTED))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Invert
|
#End Region ' Invert_Command
|
||||||
|
|
||||||
#Region "BackRotation"
|
#Region "ForwardRotation_Command"
|
||||||
|
|
||||||
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
|
Public ReadOnly Property ForwardRotation_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -2316,7 +2306,7 @@ Public Class BTLPartVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' ForwardRotation
|
#End Region ' ForwardRotation_Command
|
||||||
|
|
||||||
' Comando inutilizzato ma conservato per eventuale rotazione a causa di importazione con rotazione sbagliata
|
' Comando inutilizzato ma conservato per eventuale rotazione a causa di importazione con rotazione sbagliata
|
||||||
#Region "XRotation"
|
#Region "XRotation"
|
||||||
@@ -2359,7 +2349,7 @@ Public Class BTLPartVM
|
|||||||
|
|
||||||
#End Region ' XRotation
|
#End Region ' XRotation
|
||||||
|
|
||||||
#Region "PartColour"
|
#Region "PartColour_Command"
|
||||||
|
|
||||||
Public ReadOnly Property PartColour_Command As ICommand
|
Public ReadOnly Property PartColour_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -2391,9 +2381,9 @@ Public Class BTLPartVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region ' PartColour
|
#End Region ' PartColour_Command
|
||||||
|
|
||||||
#Region "Verify"
|
#Region "Verify_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Verify_Command As ICommand
|
Public ReadOnly Property Verify_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -2411,9 +2401,9 @@ Public Class BTLPartVM
|
|||||||
Return
|
Return
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Verify
|
#End Region ' Verify_Command
|
||||||
|
|
||||||
#Region "AddToRawPart"
|
#Region "AddToRawPart_Command"
|
||||||
|
|
||||||
Public ReadOnly Property AddToRawPart_Command As ICommand
|
Public ReadOnly Property AddToRawPart_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -2708,9 +2698,9 @@ Public Class BTLPartVM
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region ' AddToRawPart
|
#End Region ' AddToRawPart_Command
|
||||||
|
|
||||||
#Region "SelectAllFeature"
|
#Region "SelectAllFeature_Command"
|
||||||
|
|
||||||
Public ReadOnly Property SelectAllFeature_Command As ICommand
|
Public ReadOnly Property SelectAllFeature_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -2726,9 +2716,9 @@ Public Class BTLPartVM
|
|||||||
NotifyPropertyChanged(NameOf(bDOALL))
|
NotifyPropertyChanged(NameOf(bDOALL))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' SelectAllFeature
|
#End Region ' SelectAllFeature_Command
|
||||||
|
|
||||||
#Region "DeselectAllFeature"
|
#Region "DeselectAllFeature_Command"
|
||||||
|
|
||||||
Public ReadOnly Property DeselectAllFeature_Command As ICommand
|
Public ReadOnly Property DeselectAllFeature_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -2744,9 +2734,9 @@ Public Class BTLPartVM
|
|||||||
NotifyPropertyChanged(NameOf(bDOALL))
|
NotifyPropertyChanged(NameOf(bDOALL))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' DeselectAllFeature
|
#End Region ' DeselectAllFeature_Command
|
||||||
|
|
||||||
#Region "SelectItemFeature"
|
#Region "SelectItemFeature_Command"
|
||||||
|
|
||||||
Public ReadOnly Property SelectItemFeature_Command As ICommand
|
Public ReadOnly Property SelectItemFeature_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -2768,9 +2758,9 @@ Public Class BTLPartVM
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' SelectItemFeature
|
#End Region ' SelectItemFeature_Command
|
||||||
|
|
||||||
#Region "DeselectItemFeature"
|
#Region "DeselectItemFeature_Command"
|
||||||
|
|
||||||
Public ReadOnly Property DeselectItemFeature_Command As ICommand
|
Public ReadOnly Property DeselectItemFeature_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -2792,7 +2782,7 @@ Public Class BTLPartVM
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' DeselectItemFeature
|
#End Region ' DeselectItemFeature_Command
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|||||||
@@ -201,53 +201,6 @@ Public Class BTLStructureVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub SelectBTLPartScene(BtlPart As BTLPartVM, Optional bIsReselect As Boolean = False)
|
|
||||||
m_SelBTLPart = BtlPart
|
|
||||||
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
|
|
||||||
' resetto gruppo di lavorazione corrente
|
|
||||||
EgtResetCurrMachGroup()
|
|
||||||
End If
|
|
||||||
If Not IsNothing(BtlPart) Then
|
|
||||||
' gestisco selezione pezzo
|
|
||||||
EgtBeamShowFacesName(False)
|
|
||||||
EgtBeamShowLoadingSide(False, False)
|
|
||||||
Map.refProjectVM.MacroFeature_IsEnabled = True
|
|
||||||
SceneSelPartSelection()
|
|
||||||
' seleziono pezzo in Db geometrico
|
|
||||||
EgtBeamSetPart(BtlPart.nPartId)
|
|
||||||
EgtBeamShowFacesName(True)
|
|
||||||
Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM)
|
|
||||||
Dim bLeftToRight As Boolean = Not (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
|
|
||||||
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
|
|
||||||
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
|
|
||||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
|
||||||
Dim MachGroupList As New List(Of MyMachGroupVM)
|
|
||||||
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
|
||||||
Dim bFound As Boolean = False
|
|
||||||
For Each Part As PartVM In Machgroup.PartVMList
|
|
||||||
If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
|
||||||
Part.SetSearchFound()
|
|
||||||
bFound = True
|
|
||||||
Else
|
|
||||||
Part.ResetSearchFound()
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If bFound Then
|
|
||||||
Machgroup.SetSearchFound()
|
|
||||||
Else
|
|
||||||
Machgroup.ResetSearchFound()
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
' seleziono la prima feature
|
|
||||||
If Not IsNothing(BtlPart) AndAlso Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SetSelFeature(SelBTLPart.SelBTLFeatureVM)
|
|
||||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
|
||||||
EgtZoom(ZM.ALL)
|
|
||||||
NotifyPropertyChanged(NameOf(SelBTLPart))
|
|
||||||
If Not bIsReselect AndAlso m_SelBTLParts.Count = 1 Then BtlPart.SetOpenFeatureList(True)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private m_SelBTLPart As BTLPartVM = Nothing
|
Private m_SelBTLPart As BTLPartVM = Nothing
|
||||||
Public ReadOnly Property SelBTLPart As BTLPartVM
|
Public ReadOnly Property SelBTLPart As BTLPartVM
|
||||||
Get
|
Get
|
||||||
@@ -962,7 +915,6 @@ Public Class BTLStructureVM
|
|||||||
' tolgo pezzo selezionato
|
' tolgo pezzo selezionato
|
||||||
SelBTLPart.SelBTLFeatureVM = Nothing
|
SelBTLPart.SelBTLFeatureVM = Nothing
|
||||||
End If
|
End If
|
||||||
' mostro tutti i pezzi
|
|
||||||
' creo lista id presenti
|
' creo lista id presenti
|
||||||
Dim BTLPartIdList As List(Of Integer) = (From Part In BTLPartVMList
|
Dim BTLPartIdList As List(Of Integer) = (From Part In BTLPartVMList
|
||||||
Select Part.nPartId).ToList()
|
Select Part.nPartId).ToList()
|
||||||
@@ -1239,13 +1191,76 @@ Public Class BTLStructureVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub RemovePart(BTLPartToDelete As BTLPartVM, bSelPrevious As Boolean)
|
||||||
|
' verifico se ci sono già copie in grezzi
|
||||||
|
Dim nDuploCount As Integer = 0
|
||||||
|
If EgtDuploCount(BTLPartToDelete.nPartId, nDuploCount) AndAlso nDuploCount > 0 Then
|
||||||
|
' avviso che il pezzo non è cancellabile perchè in produzione
|
||||||
|
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(61929), nDuploCount), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' verifico se rimuovere sezione dalla lista
|
||||||
|
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToDelete AndAlso x.Section = BTLPartToDelete.Section) Then
|
||||||
|
Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToDelete.Section)
|
||||||
|
Map.refProjectVM.BTLStructureVM.SelSection = SectionXMaterial.Empty
|
||||||
|
End If
|
||||||
|
' Eseguo cancellazione
|
||||||
|
EgtBeamSetPart(BTLPartToDelete.nPartId)
|
||||||
|
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then RemoveScenePart(BTLPartToDelete)
|
||||||
|
' seleziono elemento precedente
|
||||||
|
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToDelete)
|
||||||
|
Dim FilteredIndex As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.IndexOf(BTLPartToDelete)
|
||||||
|
Map.refProjectVM.BTLStructureVM.SelBTLParts.Remove(BTLPartToDelete)
|
||||||
|
If EgtBeamErasePart() Then
|
||||||
|
If bSelPrevious Then
|
||||||
|
If FilteredIndex = 0 Then
|
||||||
|
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
|
||||||
|
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(1))
|
||||||
|
Else
|
||||||
|
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
|
||||||
|
End If
|
||||||
|
ElseIf FilteredIndex = Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 1 Then
|
||||||
|
If Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count > 1 Then
|
||||||
|
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View.Count - 2))
|
||||||
|
Else
|
||||||
|
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList_View(FilteredIndex + 1))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' rimuovo dalla lista pezzi
|
||||||
|
Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM)
|
||||||
|
' Rimuovo pezzo dalla scena
|
||||||
|
Dim IdAsseBase As Integer = 0
|
||||||
|
Dim DeletePartId As Integer = 0
|
||||||
|
If Not Map.refProdManagerVM.ListProjAsseBase.TryGetValue(BTLPartToDelete.nPROJ, IdAsseBase) Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Setto il nuovo contesto
|
||||||
|
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
|
||||||
|
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
|
||||||
|
If Map.refSceneShowBuldingVM.MapInfo.TryGetValue(BTLPartToDelete.nPartId, DeletePartId) Then
|
||||||
|
EgtErase(DeletePartId)
|
||||||
|
Map.refSceneShowBuldingVM.MapInfo.Remove(BTLPartToDelete.nPartId)
|
||||||
|
End If
|
||||||
|
EgtBeamShowBuilding(IdAsseBase, True)
|
||||||
|
EgtZoom(ZM.ALL)
|
||||||
|
' Ritorno al contesto corrente
|
||||||
|
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "DeletePart"
|
#Region "DeletePart_Command"
|
||||||
|
|
||||||
Public ReadOnly Property DeletePart_Command As ICommand
|
Public ReadOnly Property DeletePart_Command() As ICommand
|
||||||
Get
|
Get
|
||||||
If m_cmdDeletePart Is Nothing Then
|
If m_cmdDeletePart Is Nothing Then
|
||||||
m_cmdDeletePart = New Command(AddressOf DeletePart)
|
m_cmdDeletePart = New Command(AddressOf DeletePart)
|
||||||
@@ -1255,12 +1270,22 @@ Public Class BTLStructureVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub DeletePart()
|
Public Sub DeletePart()
|
||||||
Map.refBTLPartManagerVM.RemovePartCmd()
|
If IsNothing(ProjectManagerVM.CurrProd) Then Return
|
||||||
|
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62573), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
|
||||||
|
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then
|
||||||
|
Dim CurrSelBTLParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
|
||||||
|
For RemoveIndex = CurrSelBTLParts.Count - 1 To 0 Step -1
|
||||||
|
RemovePart(CurrSelBTLParts(RemoveIndex), RemoveIndex = 0)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Return
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' DeletePart
|
#End Region ' DeletePart_Command
|
||||||
|
|
||||||
#Region "Data"
|
#Region "Data_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Data_Command As ICommand
|
Public ReadOnly Property Data_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -1272,13 +1297,13 @@ Public Class BTLStructureVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Friend Sub Data(nProjId As Integer)
|
Friend Sub Data(nProjId As Integer)
|
||||||
Dim BTLDataWnd As New BTLDataWndV(Application.Current.MainWindow, New BTLDataWndVM())
|
Dim BTLDataWnd As New BTLDataWndV(Application.Current.MainWindow, New BTLDataWndVM(Map.refProjectVM.BTLStructureVM))
|
||||||
BTLDataWnd.ShowDialog()
|
BTLDataWnd.ShowDialog()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Data
|
#End Region ' Data_Command
|
||||||
|
|
||||||
#Region "AddPart"
|
#Region "AddPart_Command"
|
||||||
|
|
||||||
Public ReadOnly Property AddPart_Command As ICommand
|
Public ReadOnly Property AddPart_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -1330,9 +1355,9 @@ Public Class BTLStructureVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' AddPart
|
#End Region ' AddPart_Command
|
||||||
|
|
||||||
#Region "UpdateBTL"
|
#Region "UpdateBTL_Command"
|
||||||
|
|
||||||
Public ReadOnly Property UpdateBTL_Command As ICommand
|
Public ReadOnly Property UpdateBTL_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -1872,7 +1897,7 @@ Public Class BTLStructureVM
|
|||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' UpdateBTL
|
#End Region ' UpdateBTL_Command
|
||||||
|
|
||||||
#End Region ' Commands
|
#End Region ' Commands
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ Public Class BlockedWndVM
|
|||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|
||||||
#Region "Save"
|
#Region "Save_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Save_Command As ICommand
|
Public ReadOnly Property Save_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -130,9 +130,9 @@ Public Class BlockedWndVM
|
|||||||
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
|
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Save
|
#End Region ' Save_Command
|
||||||
|
|
||||||
#Region "DoNotSave"
|
#Region "DoNotSave_Command"
|
||||||
|
|
||||||
Public ReadOnly Property DoNotSave_Command As ICommand
|
Public ReadOnly Property DoNotSave_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -148,7 +148,7 @@ Public Class BlockedWndVM
|
|||||||
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
|
DbControllers.m_StatusMapController.UpdateAction("", ProjectManagerVM.CurrProd.nProdId, ProjectManagerVM.CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ViewOptimStoped, "")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' DoNotSave
|
#End Region ' DoNotSave_Command
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,17 @@ Public Class CALCPanelVM
|
|||||||
NotifyPropertyChanged(NameOf(ChooseMachine_Visibility))
|
NotifyPropertyChanged(NameOf(ChooseMachine_Visibility))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private m_ChooseMachine_IsEnabled As Boolean = False
|
||||||
|
Public ReadOnly Property ChooseMachine_IsEnabled As Boolean
|
||||||
|
Get
|
||||||
|
Return m_ChooseMachine_IsEnabled
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetChooseMachine_IsEnabled(IsEnabled As Boolean)
|
||||||
|
m_ChooseMachine_IsEnabled = IsEnabled
|
||||||
|
NotifyPropertyChanged(NameOf(ChooseMachine_IsEnabled))
|
||||||
|
End Sub
|
||||||
|
|
||||||
' Lista delle macchine disponibili per il tipo di progetto corrente
|
' Lista delle macchine disponibili per il tipo di progetto corrente
|
||||||
Private m_MachineList As New ObservableCollection(Of Machine)
|
Private m_MachineList As New ObservableCollection(Of Machine)
|
||||||
Public Property MachineList As ObservableCollection(Of Machine)
|
Public Property MachineList As ObservableCollection(Of Machine)
|
||||||
@@ -133,6 +144,7 @@ Public Class CALCPanelVM
|
|||||||
Sub New()
|
Sub New()
|
||||||
' imposto riferimento in Map
|
' imposto riferimento in Map
|
||||||
Map.SetRefCALCPanelVM(Me)
|
Map.SetRefCALCPanelVM(Me)
|
||||||
|
SetChooseMachine_IsEnabled(False)
|
||||||
Core.CalcIntegration.SetMaxCamInstances(Map.refMainWindowVM.MainWindowM.GetMaxCamInstances())
|
Core.CalcIntegration.SetMaxCamInstances(Map.refMainWindowVM.MainWindowM.GetMaxCamInstances())
|
||||||
AddHandler Core.CalcIntegration.Calc_ProcessResult, AddressOf Calc_ProcessResult
|
AddHandler Core.CalcIntegration.Calc_ProcessResult, AddressOf Calc_ProcessResult
|
||||||
AddHandler Core.CalcIntegration.Calc_Ended, AddressOf Calc_Ended
|
AddHandler Core.CalcIntegration.Calc_Ended, AddressOf Calc_Ended
|
||||||
@@ -979,6 +991,7 @@ Public Class CALCPanelVM
|
|||||||
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
|
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
|
||||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
|
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
|
||||||
End If
|
End If
|
||||||
|
Map.refProjectVM.BTLStructureVM.LoadFilters()
|
||||||
Map.refMyStatusBarVM.RefreshMachName()
|
Map.refMyStatusBarVM.RefreshMachName()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<Button ToolTip="{Binding ChooseMachine_ToolTip}"
|
<Button ToolTip="{Binding ChooseMachine_ToolTip}"
|
||||||
Command="{Binding ChooseMachine_Command}"
|
Command="{Binding ChooseMachine_Command}"
|
||||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
IsEnabled="{Binding ChooseMachine_IsEnabled}"
|
||||||
Visibility="{Binding ChooseMachineBtn_Visibility}"
|
Visibility="{Binding ChooseMachineBtn_Visibility}"
|
||||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||||
<Image Source="{StaticResource ChooseMachine_Image}"
|
<Image Source="{StaticResource ChooseMachine_Image}"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.IO.Compression
|
Imports System.IO.Compression
|
||||||
Imports System.Reflection
|
|
||||||
Imports EgtBEAMWALL.Core
|
Imports EgtBEAMWALL.Core
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
@@ -25,22 +24,9 @@ Public Class ConfigurationPageVM
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
m_SelConfigSubPage = value
|
m_SelConfigSubPage = value
|
||||||
If m_SelConfigSubPage = ConfigSubPages.GENERAL Then
|
If m_SelConfigSubPage = ConfigSubPages.GENERAL Then
|
||||||
' Controllo se il file CustomConfig Json è stato modificato
|
|
||||||
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
|
|
||||||
SetGeneral_Visibility(True)
|
|
||||||
SetStrategyManager_Visibility(False)
|
|
||||||
SetPDFEditor_Visibility(False)
|
|
||||||
ElseIf m_SelConfigSubPage = ConfigSubPages.MACHINE Then
|
|
||||||
' Controllo se il file CustomConfig Json è stato modificato
|
|
||||||
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
|
|
||||||
SetGeneral_Visibility(False)
|
|
||||||
SetStrategyManager_Visibility(False)
|
|
||||||
SetPDFEditor_Visibility(False)
|
SetPDFEditor_Visibility(False)
|
||||||
ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then
|
ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then
|
||||||
' Controllo se il file CustomConfig Json è stato modificato
|
|
||||||
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
|
|
||||||
SetPDFEditor_Visibility(True)
|
SetPDFEditor_Visibility(True)
|
||||||
SetGeneral_Visibility(False)
|
|
||||||
SetStrategyManager_Visibility(False)
|
SetStrategyManager_Visibility(False)
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
@@ -82,6 +68,7 @@ Public Class ConfigurationPageVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public OrigSelectedLanguage As Language
|
||||||
Private m_SelectedLanguage As Language
|
Private m_SelectedLanguage As Language
|
||||||
Public Property SelectedLanguage As Language
|
Public Property SelectedLanguage As Language
|
||||||
Get
|
Get
|
||||||
@@ -94,6 +81,7 @@ Public Class ConfigurationPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public nOrigSelMeasureUnit As Integer = If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
|
||||||
Public Property SelMeasureUnit As Integer
|
Public Property SelMeasureUnit As Integer
|
||||||
Get
|
Get
|
||||||
Return If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
|
Return If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
|
||||||
@@ -108,6 +96,7 @@ Public Class ConfigurationPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public sOrigSectionTime As String
|
||||||
Private m_SectionTime As Double
|
Private m_SectionTime As Double
|
||||||
Public Property SectionTime As String
|
Public Property SectionTime As String
|
||||||
Get
|
Get
|
||||||
@@ -121,6 +110,7 @@ Public Class ConfigurationPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public sOrigPartTime As String
|
||||||
Private m_PartTime As Double
|
Private m_PartTime As Double
|
||||||
Public Property PartTime As String
|
Public Property PartTime As String
|
||||||
Get
|
Get
|
||||||
@@ -134,6 +124,7 @@ Public Class ConfigurationPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public bOrigPrintLabel_IsChecked As Boolean
|
||||||
Private m_bPrintLabel_IsChecked As Boolean
|
Private m_bPrintLabel_IsChecked As Boolean
|
||||||
Public Property bPrintLabel_IsChecked As String
|
Public Property bPrintLabel_IsChecked As String
|
||||||
Get
|
Get
|
||||||
@@ -158,6 +149,7 @@ Public Class ConfigurationPageVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public bOrigExternalBackupActive As Boolean
|
||||||
Private m_bExternalBackupActive As Boolean
|
Private m_bExternalBackupActive As Boolean
|
||||||
Public Property bExternalBackupActive As Boolean
|
Public Property bExternalBackupActive As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -169,6 +161,7 @@ Public Class ConfigurationPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public sOrigExternalBackupFolderPath As String
|
||||||
Private m_ExternalBackupFolderPath As String
|
Private m_ExternalBackupFolderPath As String
|
||||||
Public Property ExternalBackupFolderPath As String
|
Public Property ExternalBackupFolderPath As String
|
||||||
Get
|
Get
|
||||||
@@ -187,6 +180,7 @@ Public Class ConfigurationPageVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public OrigSelReminder As IdNameStruct
|
||||||
Private m_SelReminder As IdNameStruct
|
Private m_SelReminder As IdNameStruct
|
||||||
Public Property SelReminder As IdNameStruct
|
Public Property SelReminder As IdNameStruct
|
||||||
Get
|
Get
|
||||||
@@ -198,17 +192,6 @@ Public Class ConfigurationPageVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private m_bGeneral_Visibility As Visibility = Visibility.Collapsed
|
|
||||||
Public ReadOnly Property General_Visibility As Visibility
|
|
||||||
Get
|
|
||||||
Return m_bGeneral_Visibility
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Friend Sub SetGeneral_Visibility(value As Boolean)
|
|
||||||
m_bGeneral_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
|
|
||||||
NotifyPropertyChanged(NameOf(General_Visibility))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private m_bStrategyManager_Visibility As Visibility = Visibility.Visible
|
Private m_bStrategyManager_Visibility As Visibility = Visibility.Visible
|
||||||
Public ReadOnly Property StrategyManager_Visibility As Visibility
|
Public ReadOnly Property StrategyManager_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
@@ -604,16 +587,23 @@ Public Class ConfigurationPageVM
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
OrigSelectedLanguage = m_SelectedLanguage
|
||||||
' leggo SectionTime e PartTime
|
' leggo SectionTime e PartTime
|
||||||
GetMainPrivateProfileString(S_NEST, K_SECTIONTIME, "", SectionTime)
|
GetMainPrivateProfileString(S_NEST, K_SECTIONTIME, "", SectionTime)
|
||||||
|
sOrigSectionTime = SectionTime
|
||||||
GetMainPrivateProfileString(S_NEST, K_PARTTIME, "", PartTime)
|
GetMainPrivateProfileString(S_NEST, K_PARTTIME, "", PartTime)
|
||||||
|
sOrigPartTime = PartTime
|
||||||
m_bPrintLabel_IsChecked = (GetMainPrivateProfileInt(S_PRINTER, K_ENABLE, 0) <> 0)
|
m_bPrintLabel_IsChecked = (GetMainPrivateProfileInt(S_PRINTER, K_ENABLE, 0) <> 0)
|
||||||
|
bOrigPrintLabel_IsChecked = m_bPrintLabel_IsChecked
|
||||||
' leggo dati per backup
|
' leggo dati per backup
|
||||||
GetMainPrivateProfileString(S_BACKUPANDRESTORE, K_EXTERNALFILEPATH, "", m_ExternalBackupFolderPath)
|
GetMainPrivateProfileString(S_BACKUPANDRESTORE, K_EXTERNALFILEPATH, "", m_ExternalBackupFolderPath)
|
||||||
|
sOrigExternalBackupFolderPath = m_ExternalBackupFolderPath
|
||||||
Dim nDefaultReminderFrequency As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_REMINDERFREQUENCY, 1)
|
Dim nDefaultReminderFrequency As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_REMINDERFREQUENCY, 1)
|
||||||
SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency)
|
SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency)
|
||||||
|
OrigSelReminder = SelReminder
|
||||||
Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0)
|
Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0)
|
||||||
m_bExternalBackupActive = nExternalBackupActive > 0
|
m_bExternalBackupActive = nExternalBackupActive > 0
|
||||||
|
bOrigExternalBackupActive = m_bExternalBackupActive
|
||||||
SetMachineParameter_Visibility(False)
|
SetMachineParameter_Visibility(False)
|
||||||
SetMachine_Visibility(False)
|
SetMachine_Visibility(False)
|
||||||
' Recupero flag per verificare se fare solo l'importazione del btl o anche la verifica
|
' Recupero flag per verificare se fare solo l'importazione del btl o anche la verifica
|
||||||
@@ -636,7 +626,6 @@ Public Class ConfigurationPageVM
|
|||||||
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
|
WriteMainPrivateProfileString(S_NEST, K_SECTIONTIME, DoubleToString(m_SectionTime, 5))
|
||||||
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
|
WriteMainPrivateProfileString(S_NEST, K_PARTTIME, DoubleToString(m_PartTime, 5))
|
||||||
WriteMainPrivateProfileString(S_PRINTER, K_ENABLE, If(m_bPrintLabel_IsChecked, 1, 0))
|
WriteMainPrivateProfileString(S_PRINTER, K_ENABLE, If(m_bPrintLabel_IsChecked, 1, 0))
|
||||||
Map.refMyMachine.VerifyConfigPageModification()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' funzione che verifica l'inserimento della password quando si edita un parametro Macchina
|
' funzione che verifica l'inserimento della password quando si edita un parametro Macchina
|
||||||
@@ -654,6 +643,26 @@ Public Class ConfigurationPageVM
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function SaveConfigPage() As Boolean
|
||||||
|
If OrigSelectedLanguage.Name <> m_SelectedLanguage.Name OrElse
|
||||||
|
sOrigSectionTime <> SectionTime OrElse
|
||||||
|
sOrigPartTime <> PartTime OrElse
|
||||||
|
bOrigPrintLabel_IsChecked <> m_bPrintLabel_IsChecked OrElse
|
||||||
|
sOrigExternalBackupFolderPath <> m_ExternalBackupFolderPath OrElse
|
||||||
|
OrigSelReminder.Name <> SelReminder.Name OrElse
|
||||||
|
bOrigExternalBackupActive <> m_bExternalBackupActive OrElse
|
||||||
|
nOrigSelMeasureUnit <> SelMeasureUnit Then
|
||||||
|
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62593), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question)
|
||||||
|
Case MessageBoxResult.Yes
|
||||||
|
VerifyConfigPageModification()
|
||||||
|
Return True
|
||||||
|
Case MessageBoxResult.No
|
||||||
|
Return False
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
'''' <summary>
|
'''' <summary>
|
||||||
'''' Seleziona il tema se presente
|
'''' Seleziona il tema se presente
|
||||||
'''' </summary>
|
'''' </summary>
|
||||||
|
|||||||
@@ -19,20 +19,21 @@
|
|||||||
Style="{StaticResource Optimizer_TabControl}">
|
Style="{StaticResource Optimizer_TabControl}">
|
||||||
<TabItem>
|
<TabItem>
|
||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
|
<TextBlock Text="{Binding General_Msg}"
|
||||||
|
Style="{StaticResource ConfigurationProgram_TextBlock}"/>
|
||||||
|
</TabItem.Header>
|
||||||
|
<TabItem.Content>
|
||||||
<StackPanel Style="{StaticResource ConfigurationProgram_StackPanel}">
|
<StackPanel Style="{StaticResource ConfigurationProgram_StackPanel}">
|
||||||
<TextBlock Text="{Binding General_Msg}"
|
<EgtBEAMWALLCORE:General_ConfigurationPageV/>
|
||||||
Style="{StaticResource ConfigurationProgram_TextBlock}"/>
|
|
||||||
<Button Command="{Binding SaveCommand}"
|
<Button Command="{Binding SaveCommand}"
|
||||||
ToolTip="{Binding SaveToolTip}"
|
ToolTip="{Binding SaveToolTip}"
|
||||||
Visibility="{Binding General_Visibility}"
|
Style="{StaticResource SaveConfig_Button}">
|
||||||
Style="{StaticResource SaveOptionPanel_Button}">
|
|
||||||
<Image Source="{StaticResource Save_Image}"
|
<Image Source="{StaticResource Save_Image}"
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem.Header>
|
|
||||||
<TabItem.Content>
|
|
||||||
<EgtBEAMWALLCORE:General_ConfigurationPageV/>
|
|
||||||
</TabItem.Content>
|
</TabItem.Content>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem>
|
<TabItem>
|
||||||
|
|||||||
@@ -66,6 +66,17 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RemoteDebug|x86'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\x86\RemoteDebug\</OutputPath>
|
||||||
|
<DocumentationFile>EgtBEAMWALL.Optimizer.xml</DocumentationFile>
|
||||||
|
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="EgtBEAMWALL.Core">
|
<Reference Include="EgtBEAMWALL.Core">
|
||||||
<HintPath>..\EgtBEAMWALL.Core\bin\Debug\EgtBEAMWALL.Core.dll</HintPath>
|
<HintPath>..\EgtBEAMWALL.Core\bin\Debug\EgtBEAMWALL.Core.dll</HintPath>
|
||||||
@@ -996,14 +1007,26 @@
|
|||||||
<PackageReference Include="BouncyCastle">
|
<PackageReference Include="BouncyCastle">
|
||||||
<Version>1.8.5</Version>
|
<Version>1.8.5</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
<PackageReference Include="DevExpress.Wpf.Core">
|
||||||
|
<Version>25.2.6</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="DevExpress.Wpf.Grid">
|
||||||
|
<Version>25.2.6</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="DevExpress.Wpf.PdfViewer">
|
||||||
|
<Version>25.2.6</Version>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="EgwMultiEngineManager.Core">
|
<PackageReference Include="EgwMultiEngineManager.Core">
|
||||||
<Version>3.1.1.2</Version>
|
<Version>3.1.1.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="EgwMultiEngineManager.Data">
|
<PackageReference Include="EgwMultiEngineManager.Data">
|
||||||
<Version>3.1.1.2</Version>
|
<Version>3.1.1.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
<PackageReference Include="EgwRedmineAPI">
|
||||||
|
<Version>3.1.7.12</Version>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="EgwWPFBaseLib">
|
<PackageReference Include="EgwWPFBaseLib">
|
||||||
<Version>3.1.3-beta.6</Version>
|
<Version>3.1.7.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="EntityFramework">
|
<PackageReference Include="EntityFramework">
|
||||||
<Version>6.4.4</Version>
|
<Version>6.4.4</Version>
|
||||||
@@ -1217,7 +1240,16 @@
|
|||||||
<Resource Include="Resources\EgtDialog\Tiles.png" />
|
<Resource Include="Resources\EgtDialog\Tiles.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\NewPage\VerifyAllR.png" />
|
<Resource Include="Resources\NewPage\reset.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\NewPage\VerifyAllRotation.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\NewPage\arrow.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\NewPage\EditIntestazione.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ Module MyExecProcessManager
|
|||||||
Dim sEnvironment As String = ""
|
Dim sEnvironment As String = ""
|
||||||
Dim sPipeLuaFile As String = ""
|
Dim sPipeLuaFile As String = ""
|
||||||
Dim nMaxCamInstances As Integer = 0
|
Dim nMaxCamInstances As Integer = 0
|
||||||
|
Dim bDebug As Boolean = False
|
||||||
While GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_ENVIRONMENT, "", sEnvironment) > 0 AndAlso
|
While GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_ENVIRONMENT, "", sEnvironment) > 0 AndAlso
|
||||||
GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_PIPELUAFILE, "", sPipeLuaFile) AndAlso
|
GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_PIPELUAFILE, "", sPipeLuaFile) AndAlso
|
||||||
GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_MAXCAMINSTANCES, "", nMaxCamInstances)
|
GetMainPrivateProfileString(S_EXECGROUP & nGroupIndex.ToString(), K_MAXCAMINSTANCES, "", nMaxCamInstances)
|
||||||
@@ -64,7 +65,10 @@ Module MyExecProcessManager
|
|||||||
nGroupIndex += 1
|
nGroupIndex += 1
|
||||||
Continue While
|
Continue While
|
||||||
End If
|
End If
|
||||||
Dim NewExecProcessManager As New ExecProcessManager(nGroupIndex, Environment, sCamExePath, PipeLuaPath, nMaxCamInstances, ExecProcessManager.ReturnModes.EVENT_, False)
|
' leggo se modalita' debug
|
||||||
|
Dim nDebug As Integer = GetMainPrivateProfileInt(S_EXECGROUP & nGroupIndex.ToString(), K_DEBUG, 0)
|
||||||
|
bDebug = (nDebug = 1)
|
||||||
|
Dim NewExecProcessManager As New ExecProcessManager(nGroupIndex, Environment, sCamExePath, PipeLuaPath, nMaxCamInstances, ExecProcessManager.ReturnModes.EVENT_, bDebug)
|
||||||
AddHandler NewExecProcessManager.m_AnswerReceived, AddressOf ExecProcessManager_AnswerReceived
|
AddHandler NewExecProcessManager.m_AnswerReceived, AddressOf ExecProcessManager_AnswerReceived
|
||||||
NewExecProcessManager.StartExecutionThread()
|
NewExecProcessManager.StartExecutionThread()
|
||||||
m_ExecProcessManagerList.Add(Environment, NewExecProcessManager)
|
m_ExecProcessManagerList.Add(Environment, NewExecProcessManager)
|
||||||
@@ -101,7 +105,9 @@ Module MyExecProcessManager
|
|||||||
End If
|
End If
|
||||||
If nPreRotate > 0 Then
|
If nPreRotate > 0 Then
|
||||||
Dim dAng As Integer = nPreRotate * 90
|
Dim dAng As Integer = nPreRotate * 90
|
||||||
PartItem.ForwardRotation(True, True, dAng, False)
|
Application.Current.Dispatcher.BeginInvoke(Sub()
|
||||||
|
PartItem.ForwardRotation(True, True, dAng, False)
|
||||||
|
End Sub)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim prefix As String = "INFONGEPART_"
|
Dim prefix As String = "INFONGEPART_"
|
||||||
|
|||||||
@@ -29,10 +29,22 @@ Public Class ForcedStrategyPanelVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Strategy)
|
Set(value As Strategy)
|
||||||
m_SelStrategy = value
|
m_SelStrategy = value
|
||||||
|
SetUpdate_Visibility(False)
|
||||||
NotifyPropertyChanged(NameOf(SelStrategy))
|
NotifyPropertyChanged(NameOf(SelStrategy))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_bUpdate_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public ReadOnly Property Update_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_bUpdate_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetUpdate_Visibility(value As Boolean)
|
||||||
|
m_bUpdate_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(Update_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private m_CurrentFeature As BTLFeatureM
|
Private m_CurrentFeature As BTLFeatureM
|
||||||
|
|
||||||
' Definizione Comandi
|
' Definizione Comandi
|
||||||
@@ -145,21 +157,6 @@ Public Class ForcedStrategyPanelVM
|
|||||||
m_StrategyList = New ObservableCollection(Of Strategy)((From JsonAvailableStrategy In JsonAvailableTopology.StrategyList
|
m_StrategyList = New ObservableCollection(Of Strategy)((From JsonAvailableStrategy In JsonAvailableTopology.StrategyList
|
||||||
Select JsonAvailableStrategy.Deserialize(ProjectManagerVM.CurrProd.nType, -1)).ToList())
|
Select JsonAvailableStrategy.Deserialize(ProjectManagerVM.CurrProd.nType, -1)).ToList())
|
||||||
End If
|
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
|
' recupero custom
|
||||||
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nFeatureId))
|
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nFeatureId))
|
||||||
Dim nPartProjId As Integer = 0
|
Dim nPartProjId As Integer = 0
|
||||||
@@ -269,6 +266,16 @@ Public Class ForcedStrategyPanelVM
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Sub ForcedStrategy()
|
Friend Sub ForcedStrategy()
|
||||||
|
If IsNothing(m_CurrentFeature) Then Return
|
||||||
|
If m_CurrentFeature.nFeatureId < 0 Then Return
|
||||||
|
If IsNothing(m_SelStrategy) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then Return
|
||||||
|
If IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then Return
|
||||||
' cancello precedenti valori
|
' cancello precedenti valori
|
||||||
Dim sPrecStrategyID As String = ""
|
Dim sPrecStrategyID As String = ""
|
||||||
EgtGetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, sPrecStrategyID)
|
EgtGetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, sPrecStrategyID)
|
||||||
|
|||||||
@@ -365,6 +365,28 @@ Public MustInherit Class ProjectParameters
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionShortMsg As Integer
|
||||||
|
Public Property idDescriptionShortMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionShortMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionShortMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionLongMsg As Integer
|
||||||
|
Public Property idDescriptionLongMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionLongMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionLongMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_sValue As String
|
Private m_sValue As String
|
||||||
Public Property sValue As String
|
Public Property sValue As String
|
||||||
Get
|
Get
|
||||||
@@ -421,6 +443,8 @@ Public MustInherit Class ProjectParameters
|
|||||||
If IsNothing(JsonProjectParameters) Then Return
|
If IsNothing(JsonProjectParameters) Then Return
|
||||||
m_sName = JsonProjectParameters.sName
|
m_sName = JsonProjectParameters.sName
|
||||||
m_sNameNge = JsonProjectParameters.sNameNge
|
m_sNameNge = JsonProjectParameters.sNameNge
|
||||||
|
m_idDescriptionShortMsg = JsonProjectParameters.idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = JsonProjectParameters.idDescriptionLongMsg
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Constructor
|
#End Region ' Constructor
|
||||||
@@ -465,6 +489,7 @@ Public MustInherit Class ProjectParameters
|
|||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -485,6 +510,7 @@ Public Class BooleanGenericParameter
|
|||||||
SetbIsBooleanModify(True)
|
SetbIsBooleanModify(True)
|
||||||
End If
|
End If
|
||||||
m_bValue = value
|
m_bValue = value
|
||||||
|
NotifyPropertyChanged(NameOf(bValue))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetValue(bValue As Boolean)
|
Friend Sub SetValue(bValue As Boolean)
|
||||||
@@ -565,6 +591,7 @@ Public Class DoubleGenericParameter
|
|||||||
If m_dValue <> dValue Then
|
If m_dValue <> dValue Then
|
||||||
If Not Map.refBTLDataWndVM.IsBTLDataWnd Then Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
|
If Not Map.refBTLDataWndVM.IsBTLDataWnd Then Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
|
||||||
SetbIsDoubleModify(True)
|
SetbIsDoubleModify(True)
|
||||||
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
End If
|
End If
|
||||||
m_dValue = dValue
|
m_dValue = dValue
|
||||||
Else
|
Else
|
||||||
@@ -657,6 +684,7 @@ Public Class StringGenericParameter
|
|||||||
SetbIsStringModify(True)
|
SetbIsStringModify(True)
|
||||||
End If
|
End If
|
||||||
m_sValue = value
|
m_sValue = value
|
||||||
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetValue(dValue As String)
|
Friend Sub SetValue(dValue As String)
|
||||||
@@ -746,10 +774,12 @@ Public Class ComboGenericParameter
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
m_SelValue = value
|
m_SelValue = value
|
||||||
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetSelValue(sValue As String)
|
Friend Sub SetSelValue(sValue As String)
|
||||||
m_SelValue = m_ComboList.FirstOrDefault(Function(x) x.sValue = sValue)
|
m_SelValue = m_ComboList.FirstOrDefault(Function(x) x.sValue = sValue)
|
||||||
|
If IsNothing(m_SelValue) Then m_SelValue = m_ComboList(0)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private m_bComboBoxVisibility As Visibility = Visibility.Collapsed
|
Private m_bComboBoxVisibility As Visibility = Visibility.Collapsed
|
||||||
|
|||||||
@@ -64,6 +64,28 @@ Public Class JsonGeneralParameters
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionShortMsg As Integer
|
||||||
|
Public Property idDescriptionShortMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionShortMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionShortMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionLongMsg As Integer
|
||||||
|
Public Property idDescriptionLongMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionLongMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionLongMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_sValue As String
|
Private m_sValue As String
|
||||||
Public Property sValue As String
|
Public Property sValue As String
|
||||||
Get
|
Get
|
||||||
@@ -113,13 +135,15 @@ Public Class JsonGeneralParameters
|
|||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
<JsonConstructor>
|
<JsonConstructor>
|
||||||
Sub New(nGroup As String, sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, sType As String, sMinUserLevel As String)
|
Sub New(nGroup As String, sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionLongMsg As Integer, idDescriptionShortMsg As Integer, sType As String, sMinUserLevel As String)
|
||||||
m_nGroup = nGroup
|
m_nGroup = nGroup
|
||||||
m_sName = sName
|
m_sName = sName
|
||||||
m_sNameNge = sNameNge
|
m_sNameNge = sNameNge
|
||||||
m_sValue = sValue
|
m_sValue = sValue
|
||||||
m_sDescriptionShort = sDescriptionShort
|
m_sDescriptionShort = sDescriptionShort
|
||||||
m_sDescriptionLong = sDescriptionLong
|
m_sDescriptionLong = sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = idDescriptionLongMsg
|
||||||
m_sType = sType
|
m_sType = sType
|
||||||
m_sMinUserLevel = sMinUserLevel
|
m_sMinUserLevel = sMinUserLevel
|
||||||
End Sub
|
End Sub
|
||||||
@@ -142,6 +166,8 @@ Public Class JsonGeneralParameters
|
|||||||
m_nGroup = ProjectParameters.nGroup
|
m_nGroup = ProjectParameters.nGroup
|
||||||
m_sDescriptionShort = ProjectParameters.sDescriptionShort
|
m_sDescriptionShort = ProjectParameters.sDescriptionShort
|
||||||
m_sDescriptionLong = ProjectParameters.sDescriptionLong
|
m_sDescriptionLong = ProjectParameters.sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = ProjectParameters.idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = ProjectParameters.idDescriptionLongMsg
|
||||||
m_sMinUserLevel = ProjectParameters.sMinUserLevel
|
m_sMinUserLevel = ProjectParameters.sMinUserLevel
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -192,8 +218,16 @@ Public Class JsonGeneralParameters
|
|||||||
ProjectParameters.nGroup = m_nGroup
|
ProjectParameters.nGroup = m_nGroup
|
||||||
ProjectParameters.sName = m_sName
|
ProjectParameters.sName = m_sName
|
||||||
ProjectParameters.sNameNge = m_sNameNge
|
ProjectParameters.sNameNge = m_sNameNge
|
||||||
ProjectParameters.sDescriptionShort = m_sDescriptionShort
|
If m_idDescriptionShortMsg < 0 OrElse EgtMsg(m_idDescriptionShortMsg).StartsWith("Msg") Then
|
||||||
ProjectParameters.sDescriptionLong = m_sDescriptionLong
|
ProjectParameters.sDescriptionShort = m_sDescriptionShort
|
||||||
|
Else
|
||||||
|
ProjectParameters.sDescriptionShort = EgtMsg(m_idDescriptionShortMsg)
|
||||||
|
End If
|
||||||
|
If m_idDescriptionLongMsg < 0 OrElse EgtMsg(m_idDescriptionLongMsg).StartsWith("Msg") Then
|
||||||
|
ProjectParameters.sDescriptionLong = m_sDescriptionLong
|
||||||
|
Else
|
||||||
|
ProjectParameters.sDescriptionLong = EgtMsg(m_idDescriptionLongMsg)
|
||||||
|
End If
|
||||||
ProjectParameters.sMinUserLevel = m_sMinUserLevel
|
ProjectParameters.sMinUserLevel = m_sMinUserLevel
|
||||||
Return ProjectParameters
|
Return ProjectParameters
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -64,6 +64,28 @@ Public Class JsonProjectParameters
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionShortMsg As Integer
|
||||||
|
Public Property idDescriptionShortMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionShortMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionShortMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionLongMsg As Integer
|
||||||
|
Public Property idDescriptionLongMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionLongMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionLongMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_sValue As String
|
Private m_sValue As String
|
||||||
Public Property sValue As String
|
Public Property sValue As String
|
||||||
Get
|
Get
|
||||||
@@ -113,7 +135,7 @@ Public Class JsonProjectParameters
|
|||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
<JsonConstructor>
|
<JsonConstructor>
|
||||||
Sub New(mGroup As String, sName As String, sNameNge As String, sValue As String, sType As String, sDescriptionShort As String, sDescriptionLong As String, sMinUserLevel As String)
|
Sub New(mGroup As String, sName As String, sNameNge As String, sValue As String, sType As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionShortMsg As Integer, idDescriptionLongMsg As Integer, sMinUserLevel As String)
|
||||||
m_nGroup = nGroup
|
m_nGroup = nGroup
|
||||||
m_sName = sName
|
m_sName = sName
|
||||||
m_sNameNge = sNameNge
|
m_sNameNge = sNameNge
|
||||||
@@ -121,6 +143,8 @@ Public Class JsonProjectParameters
|
|||||||
m_sType = sType
|
m_sType = sType
|
||||||
m_sDescriptionShort = sDescriptionShort
|
m_sDescriptionShort = sDescriptionShort
|
||||||
m_sDescriptionLong = sDescriptionLong
|
m_sDescriptionLong = sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = idDescriptionLongMsg
|
||||||
m_sMinUserLevel = sMinUserLevel
|
m_sMinUserLevel = sMinUserLevel
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -141,6 +165,8 @@ Public Class JsonProjectParameters
|
|||||||
End Select
|
End Select
|
||||||
m_sDescriptionShort = ProjectParameters.sDescriptionShort
|
m_sDescriptionShort = ProjectParameters.sDescriptionShort
|
||||||
m_sDescriptionLong = ProjectParameters.sDescriptionLong
|
m_sDescriptionLong = ProjectParameters.sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = ProjectParameters.idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = ProjectParameters.idDescriptionLongMsg
|
||||||
m_sMinUserLevel = ProjectParameters.sMinUserLevel
|
m_sMinUserLevel = ProjectParameters.sMinUserLevel
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -191,6 +217,16 @@ Public Class JsonProjectParameters
|
|||||||
ProjectParameters.nGroup = nGroup
|
ProjectParameters.nGroup = nGroup
|
||||||
ProjectParameters.sName = m_sName
|
ProjectParameters.sName = m_sName
|
||||||
ProjectParameters.sNameNge = m_sNameNge
|
ProjectParameters.sNameNge = m_sNameNge
|
||||||
|
If m_idDescriptionShortMsg < 0 OrElse EgtMsg(m_idDescriptionShortMsg).StartsWith("Msg") Then
|
||||||
|
ProjectParameters.sDescriptionShort = m_sDescriptionShort
|
||||||
|
Else
|
||||||
|
ProjectParameters.sDescriptionShort = EgtMsg(m_idDescriptionShortMsg)
|
||||||
|
End If
|
||||||
|
If m_idDescriptionLongMsg < 0 OrElse EgtMsg(m_idDescriptionLongMsg).StartsWith("Msg") Then
|
||||||
|
ProjectParameters.sDescriptionLong = m_sDescriptionLong
|
||||||
|
Else
|
||||||
|
ProjectParameters.sDescriptionLong = EgtMsg(m_idDescriptionLongMsg)
|
||||||
|
End If
|
||||||
ProjectParameters.sDescriptionShort = m_sDescriptionShort
|
ProjectParameters.sDescriptionShort = m_sDescriptionShort
|
||||||
ProjectParameters.sDescriptionLong = m_sDescriptionLong
|
ProjectParameters.sDescriptionLong = m_sDescriptionLong
|
||||||
ProjectParameters.sMinUserLevel = m_sMinUserLevel
|
ProjectParameters.sMinUserLevel = m_sMinUserLevel
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
Style="{StaticResource ProjectParameters_UniformGrid}">
|
Style="{StaticResource ProjectParameters_UniformGrid}">
|
||||||
<TextBlock Text="{Binding sDescriptionShort}"
|
<TextBlock Text="{Binding sDescriptionShort}"
|
||||||
Style="{StaticResource ProjectParameters_TextBlock}"/>
|
Style="{StaticResource ProjectParameters_TextBlock}"/>
|
||||||
<TextBox Text="{Binding sValue}"
|
<TextBox Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
Style="{StaticResource ProjectParameters_UniformGrid}">
|
Style="{StaticResource ProjectParameters_UniformGrid}">
|
||||||
<TextBlock Text="{Binding sDescriptionShort}"
|
<TextBlock Text="{Binding sDescriptionShort}"
|
||||||
Style="{StaticResource ProjectParameters_TextBlock}"/>
|
Style="{StaticResource ProjectParameters_TextBlock}"/>
|
||||||
<TextBox Text="{Binding sValue}"
|
<TextBox Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,10 @@
|
|||||||
Imports System.Reflection
|
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
|
||||||
|
|
||||||
Public Class BTLPartListV
|
Public Class BTLPartListV
|
||||||
|
|
||||||
@@ -8,99 +14,195 @@ Public Class BTLPartListV
|
|||||||
Private m_isDraggingSelectionField As FieldInfo
|
Private m_isDraggingSelectionField As FieldInfo
|
||||||
Private m_endDraggingMethod As MethodInfo
|
Private m_endDraggingMethod As MethodInfo
|
||||||
|
|
||||||
|
Private m_sDataGridLayoutPath As String = ""
|
||||||
|
|
||||||
|
Private _lastExpanded As Integer = -1
|
||||||
|
|
||||||
|
Private bSelOnFeature As Boolean = False
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
' This call is required by the designer.
|
' This call is required by the designer.
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
' Add any initialization after the InitializeComponent() call.
|
' Add any initialization after the InitializeComponent() call.
|
||||||
|
|
||||||
|
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
|
m_BTLPartListVM = DataContext
|
||||||
' Evita il drag sulla selezione multipla
|
' imposto riferimento ad action per salvataggio layout tabella
|
||||||
m_isDraggingSelectionField = m_DataGridType.GetField("_isDraggingSelection", BindingFlags.Instance Or BindingFlags.NonPublic)
|
m_BTLPartListVM.refSaveBTLPartGridControlLayout = AddressOf SaveBTLPartGridControlLayout
|
||||||
m_endDraggingMethod = m_DataGridType.GetMethod("EndDragging", BindingFlags.Instance Or BindingFlags.NonPublic)
|
' rispristino layout tabella
|
||||||
End Sub
|
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||||
|
BTLPart_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||||
Public Sub DataGrid_PreviewMouseMove(sender As Object, e As MouseEventArgs)
|
|
||||||
' Evita il drag sulla selezione multipla
|
|
||||||
If e.LeftButton = MouseButtonState.Pressed Then
|
|
||||||
If CBool(If(m_isDraggingSelectionField?.GetValue(sender), False)) Then m_endDraggingMethod.Invoke(sender, New Object(-1) {})
|
|
||||||
End If
|
End 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
|
End Sub
|
||||||
|
|
||||||
Private Sub PartList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
' customizzazione ContextMenu del GridControl
|
||||||
If e.ChangedButton = MouseButton.Left Then
|
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||||
If TypeOf sender Is DataGridRow Then
|
If e.MenuType = GridMenuType.Column Then
|
||||||
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count <> 1 Then Return
|
' rimozione bottoni
|
||||||
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||||
If TypeOf Row.DataContext IsNot BTLPartVM Then Return
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||||
Dim BTLPartVM As BTLPartVM = DirectCast(Row.DataContext, BTLPartVM)
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||||
Dim DataGridDetailsPresenter As Object = TreeHelperManager.FindVisualParents(Of Button, CheckBox, Primitives.DataGridDetailsPresenter)(e.OriginalSource)
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||||
If Not IsNothing(DataGridDetailsPresenter) Then Return
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||||
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Contains(BTLPartVM) Then
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||||
BTLPartVM.SetOpenFeatureList(Not BTLPartVM.bOpenFeatureList)
|
|
||||||
End If
|
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||||
If Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.BTLStructureVM.SelBTLPart.Equals(BTLPartVM) Then
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
Map.refProjectVM.BTLStructureVM.SelectBTLPart(BTLPartVM, True)
|
' aggiunta separatore
|
||||||
End If
|
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 If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ListBox_PreviewMouseWheel(ByVal sender As Object, ByVal e As MouseWheelEventArgs)
|
' gestore evento Allow Resize
|
||||||
' gestione dello scroll, per permetterlo anche quando mouse su RowDetails
|
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||||
e.Handled = True
|
Dim info As GridColumnMenuInfo = TryCast(BTLPart_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||||
Dim DependencyParent As DependencyObject = sender
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
While TypeOf DependencyParent IsNot ListBox
|
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||||
DependencyParent = VisualTreeHelper.GetParent(DependencyParent)
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||||
End While
|
Else
|
||||||
If IsNothing(DependencyParent) Then
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||||
Return
|
|
||||||
End If
|
|
||||||
Dim parent As ListBox = TryCast(DependencyParent, ListBox)
|
|
||||||
If IsNothing(parent) Then
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
parent?.[RaiseEvent](New MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta) With {
|
|
||||||
.RoutedEvent = MouseWheelEvent,
|
|
||||||
.Source = sender})
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub OpenPopUp_Click(sender As Object, e As RoutedEventArgs)
|
|
||||||
Dim btn As Button = DirectCast(sender, Button) ' Ottieni il bottone che ha generato l'evento
|
|
||||||
Dim parent As DependencyObject = btn
|
|
||||||
|
|
||||||
' Cerca il Popup nel Visual Tree
|
|
||||||
While Not IsNothing(parent) AndAlso TypeOf parent IsNot DataGridRow
|
|
||||||
parent = VisualTreeHelper.GetParent(parent)
|
|
||||||
End While
|
|
||||||
If Not IsNothing(parent) Then
|
|
||||||
Dim popup As New BTLPartListPopUpV()
|
|
||||||
If Not IsNothing(popup) Then
|
|
||||||
popup.PlacementTarget = btn ' Associa il popup al bottone
|
|
||||||
popup.IsOpen = True ' Mostra il popup
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SelectButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
|
' gestore evento Auto Fit
|
||||||
Dim button = TryCast(sender, Button)
|
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||||
Dim listBoxItem = FindAncestor(Of ListBoxItem)(button)
|
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
|
||||||
|
End Sub
|
||||||
|
|
||||||
If Not IsNothing(listBoxItem) Then
|
Private Sub FilterAllBtn_PreviewMouseDown(sender As Object, e As RoutedEventArgs)
|
||||||
listBoxItem.IsSelected = True
|
If FilterSectxMat_Popup.IsOpen Then
|
||||||
|
FilterSectxMat_Popup.IsOpen = False
|
||||||
|
e.Handled = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function FindAncestor(Of T As DependencyObject)(ByVal current As DependencyObject) As T
|
Private Sub FilterAllBtn_Click(sender As Object, e As RoutedEventArgs)
|
||||||
While Not IsNothing(current)
|
If Not FilterSectxMat_Popup.IsOpen Then
|
||||||
|
FilterSectxMat_Popup.IsOpen = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
If TypeOf current Is T Then
|
Private Sub GridControl_MasterRowExpanding(sender As Object, e As DevExpress.Xpf.Grid.RowAllowEventArgs)
|
||||||
Return CType(current, T)
|
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
|
||||||
|
|
||||||
|
Private Sub BTLPart_GridControl_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||||
|
If e.Key = Key.Delete Then
|
||||||
|
Dim BTLStructureVM As BTLStructureVM = TryCast(Me.Tag, BTLStructureVM)
|
||||||
|
If IsNothing(BTLStructureVM) Then Return
|
||||||
|
|
||||||
|
Dim SelBTLPart As BTLPartVM = BTLStructureVM.SelBTLPart
|
||||||
|
Dim SelBTLFeatureVM As BTLFeatureVM = SelBTLPart?.SelBTLFeatureVM
|
||||||
|
|
||||||
|
If bSelOnFeature AndAlso Not IsNothing(SelBTLFeatureVM) Then
|
||||||
|
SelBTLFeatureVM.DeleteFeature()
|
||||||
|
e.Handled = True
|
||||||
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
current = VisualTreeHelper.GetParent(current)
|
BTLStructureVM.DeletePart()
|
||||||
End While
|
e.Handled = True
|
||||||
|
End If
|
||||||
Return Nothing
|
End Sub
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ Public Class BTLPartListVM
|
|||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Friend refSaveBTLPartGridControlLayout As Action
|
||||||
|
|
||||||
Private m_colPart_Do As EgwWPFBaseLib.ColumnLayout
|
Private m_colPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||||
Public ReadOnly Property colPart_Do As EgwWPFBaseLib.ColumnLayout
|
Public ReadOnly Property colPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||||
Get
|
Get
|
||||||
@@ -63,6 +65,17 @@ Public Class BTLPartListVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
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"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property PDN_Msg As String
|
Public ReadOnly Property PDN_Msg As String
|
||||||
@@ -187,6 +200,11 @@ Public Class BTLPartListVM
|
|||||||
|
|
||||||
#End Region ' Messages
|
#End Region ' Messages
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdVerifyAll As ICommand
|
||||||
|
Private m_cmdVerifyFlipRotAll As ICommand
|
||||||
|
Private m_cmdResetCalc As ICommand
|
||||||
|
|
||||||
#End Region ' Fields & Properties
|
#End Region ' Fields & Properties
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
@@ -207,6 +225,94 @@ Public Class BTLPartListVM
|
|||||||
|
|
||||||
#End Region ' Constructor
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "METHODS"
|
||||||
|
|
||||||
|
Friend Sub Close()
|
||||||
|
If Not IsNothing(refSaveBTLPartGridControlLayout) Then
|
||||||
|
refSaveBTLPartGridControlLayout()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Methods
|
||||||
|
|
||||||
|
#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
|
End Class
|
||||||
|
|
||||||
Class DataGridCellBorderThicknessConverter
|
Class DataGridCellBorderThicknessConverter
|
||||||
@@ -240,8 +346,8 @@ Class ProjIdToBtlFileName
|
|||||||
Implements IValueConverter
|
Implements IValueConverter
|
||||||
|
|
||||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||||
If TypeOf value IsNot Integer Then Return ""
|
If TypeOf value IsNot String Then Return ""
|
||||||
Dim nProjId As Integer = CInt(value)
|
Dim nProjId As Integer = Integer.Parse(System.Text.RegularExpressions.Regex.Match(value, "\d+").Value)
|
||||||
Dim ProjModel As EgtBEAMWALL.DataLayer.DatabaseModels.ProjModel = DbControllers.m_ProjController.FindByProjId(nProjId)
|
Dim ProjModel As EgtBEAMWALL.DataLayer.DatabaseModels.ProjModel = DbControllers.m_ProjController.FindByProjId(nProjId)
|
||||||
If IsNothing(ProjModel) Then Return ""
|
If IsNothing(ProjModel) Then Return ""
|
||||||
Return ProjModel.BTLFileName
|
Return ProjModel.BTLFileName
|
||||||
|
|||||||
@@ -2,110 +2,135 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||||
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||||
|
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||||
|
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||||
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||||
|
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||||
|
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||||
|
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||||
|
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||||
|
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||||
|
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||||
|
|
||||||
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.FeatureVMList,
|
<dxg:GridControl x:Name="FeatureVMList_GridControl"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
ItemsSource="{Binding Tag.FeatureVMList,
|
||||||
SelectedItem="{Binding Tag.SelFeatureVM,
|
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
SelectedItem="{Binding Tag.SelFeatureVM,
|
||||||
SelectionMode="Single"
|
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||||
Margin="0,0,0,5"
|
SelectionMode="Row">
|
||||||
ColumnLayouts="{Binding FeatureInPartInRawPartColumns}"
|
<dxg:GridControl.View>
|
||||||
BeginningEdit="FeatureInPartInRawPartList_BeginningEdit"
|
<dxg:TableView x:Name="FeatureVMList_TableView"
|
||||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
AllowPerPixelScrolling="True"
|
||||||
AlternationCount="2"
|
AllowEditing="False"
|
||||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
AllowSorting="True"
|
||||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
AllowGrouping="True"
|
||||||
Style="{StaticResource Optimizer_DataGrid}">
|
AllowColumnFiltering="True"
|
||||||
<DataGrid.RowStyle>
|
AllowFilterEditor="False"
|
||||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
AllowFilterPanelNavigation="False"
|
||||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
|
ExtendScrollBarToFixedColumns="True"
|
||||||
</Style>
|
Focusable="False"
|
||||||
</DataGrid.RowStyle>
|
GroupSummaryDisplayMode="AlignByColumns"
|
||||||
|
IsTotalSummaryMenuEnabled="False"
|
||||||
|
IsGroupFooterMenuEnabled="True"
|
||||||
|
NavigationStyle="Row"
|
||||||
|
ShowGroupPanel="False"
|
||||||
|
ShowTotalSummary="False"
|
||||||
|
ShowSearchPanelMode="Default"
|
||||||
|
ShowFilterPanelMode="Never"
|
||||||
|
ShowIndicator="False"
|
||||||
|
ShowColumnHeaders="True"
|
||||||
|
ShowHorizontalLines="True"
|
||||||
|
ShowVerticalLines="False"
|
||||||
|
ShowFocusedRectangle="True"
|
||||||
|
ShowGridMenu="OnShowGridMenu"
|
||||||
|
ShowGroupFooters="True"
|
||||||
|
ShowSearchPanelResultInfo="True"
|
||||||
|
ShowSearchPanelNavigationButtons="True"
|
||||||
|
UseEvenRowBackground="True"
|
||||||
|
|
||||||
<DataGrid.InputBindings>
|
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||||
<KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command,
|
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"/>
|
|
||||||
</DataGrid.InputBindings>
|
RowStyle="{StaticResource RowStyle}"
|
||||||
<DataGrid.Resources>
|
|
||||||
<DataGridTemplateColumn x:Key="colDO">
|
Style="{StaticResource TableViewStyle}"/>
|
||||||
<DataGridTemplateColumn.HeaderTemplate>
|
</dxg:GridControl.View>
|
||||||
<DataTemplate>
|
<dxg:GridColumn FieldName="bDO"
|
||||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
AllowSorting="False"
|
||||||
IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
Header=""
|
||||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
Fixed="Left"
|
||||||
</DataTemplate>
|
Style="{StaticResource ColumnInfoStyle}">
|
||||||
</DataGridTemplateColumn.HeaderTemplate>
|
<dxg:GridColumn.HeaderTemplate>
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate>
|
||||||
<DataTemplate>
|
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||||
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"/>
|
||||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
</DataTemplate>
|
||||||
</DataTemplate>
|
</dxg:GridColumn.HeaderTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
<dxg:GridColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
<DataTemplate>
|
||||||
<!--Validità feature-->
|
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bDO}"
|
||||||
<DataGridTemplateColumn x:Key="colCALC">
|
IsEnabled="{Binding RowData.Row.IsEnabled}"
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||||
<DataTemplate>
|
</DataTemplate>
|
||||||
<Grid>
|
</dxg:GridColumn.CellTemplate>
|
||||||
<Grid.ColumnDefinitions>
|
</dxg:GridColumn>
|
||||||
<ColumnDefinition Width="1*"/>
|
<dxg:GridColumn FieldName="GlobalState"
|
||||||
<ColumnDefinition Width="10"/>
|
Header=""
|
||||||
</Grid.ColumnDefinitions>
|
SortFieldName="nGlobalState"
|
||||||
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
AllowColumnFiltering="False">
|
||||||
Background="{Binding Calc_Background}"/>
|
<dxg:GridColumn.CellTemplate>
|
||||||
<Grid Grid.Column="1"
|
<DataTemplate>
|
||||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
<Grid Margin="5,0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<ColumnDefinition Width="12"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Visibility="{Binding CALC_ROT_Visibility}"
|
<Border Background="{Binding RowData.Row.Calc_Background}"
|
||||||
Style="{StaticResource CALC_ROT_TextBlock}"/>
|
Style="{StaticResource Calc_Border}"/>
|
||||||
<TextBlock Grid.Row="1"
|
<Grid Grid.Column="1"
|
||||||
Text="{Binding CALC_ERR_Letter}"
|
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||||
Foreground="{Binding CALC_ERR_Foreground}"
|
<Grid.RowDefinitions>
|
||||||
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid>
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="⭯"
|
||||||
|
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 CALC_ERR_TextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</Grid>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataTemplate>
|
||||||
</DataGridTemplateColumn>
|
</dxg:GridColumn.CellTemplate>
|
||||||
<!--Descrizione-->
|
</dxg:GridColumn>
|
||||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}">
|
<dxg:GridColumn FieldName="sDesc"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
AllowSorting="False"
|
||||||
<DataTemplate>
|
Header="{Binding Description_Msg}"
|
||||||
<TextBlock Text="{Binding DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
</DataTemplate>
|
<dxg:GridColumn FieldName="sPriority"
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
Header="{Binding Priority_Msg}"
|
||||||
</DataGridTextColumn>
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
<!--Descrizione-->
|
<dxg:GridColumn FieldName="Strategy"
|
||||||
<DataGridTextColumn x:Key="colPRIORITY" Binding="{Binding sPriority}">
|
AllowSorting="False"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
Header=""
|
||||||
<DataTemplate>
|
Image="{StaticResource HeaderEdit_Image}"
|
||||||
<TextBlock Text="{Binding DataContext.Priority_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
Fixed="Right"
|
||||||
</DataTemplate>
|
Style="{StaticResource ColumnButtonStyle}">
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
<dxg:GridColumn.CellTemplate>
|
||||||
</DataGridTextColumn>
|
<DataTemplate>
|
||||||
<!--STR - Strategia-->
|
<Button Command="{Binding RowData.Row.Strategy_Command}"
|
||||||
<DataGridTemplateColumn x:Key="colSTRATEGY">
|
IsEnabled="{Binding RowData.Row.IsEnabled}"
|
||||||
<DataGridTemplateColumn.HeaderTemplate>
|
ToolTip="{Binding RowData.Row.Strategy_ToolTip}">
|
||||||
<DataTemplate>
|
<Image Source="{StaticResource Edit_Image}"
|
||||||
<TextBlock Text="Strategia"/>
|
Style="{StaticResource PDF_Image}"/>
|
||||||
</DataTemplate>
|
</Button>
|
||||||
</DataGridTemplateColumn.HeaderTemplate>
|
</DataTemplate>
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
</dxg:GridColumn.CellTemplate>
|
||||||
<DataTemplate>
|
</dxg:GridColumn>
|
||||||
<Button ToolTip="{Binding Strategy_ToolTip}"
|
</dxg:GridControl>
|
||||||
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>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,25 +1,116 @@
|
|||||||
Imports EgtBEAMWALL.Core
|
Imports System.IO
|
||||||
|
Imports DevExpress.Xpf.Bars
|
||||||
|
Imports DevExpress.Xpf.Core.Serialization
|
||||||
|
Imports DevExpress.Xpf.Grid
|
||||||
|
Imports EgtBEAMWALL.Core
|
||||||
|
|
||||||
Public Class FeatureInPartInRawPartListV
|
Public Class FeatureInPartInRawPartListV
|
||||||
|
|
||||||
' funzione che impedisce di editare le righe che sono gia' in produzione
|
Private m_FeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM
|
||||||
Private Sub FeatureInPartInRawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
|
Private m_sDataGridLayoutPath As String = ""
|
||||||
If IsNothing(e.Row) Then Return
|
|
||||||
Dim RowVM As BTLFeatureVM = DirectCast(e.Row.DataContext, BTLFeatureVM)
|
Sub New()
|
||||||
' se in produzione impedisco modifica dei parametri
|
|
||||||
If DirectCast(RowVM.BTLFeatureM.ParentPart, PartM).nProductionState > ItemState.ND Then
|
' This call is required by the designer.
|
||||||
'For Each cell In Row.Item
|
InitializeComponent()
|
||||||
e.Cancel = True
|
|
||||||
|
' 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 If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FeatureList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||||
If TypeOf sender Is DataGridRow Then
|
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||||
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
If e.Property.Name = "FilterString" Then
|
||||||
If Not IsNothing(Row) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then
|
e.Allow = False
|
||||||
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM
|
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 SaveFeatureInPartInRawPartGridControlLayout()
|
||||||
|
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.refSaveFeatureInPartInRawPartGridControlLayout = AddressOf SaveFeatureInPartInRawPartGridControlLayout
|
||||||
|
' 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 If
|
End If
|
||||||
End Sub
|
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
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ Public Class FeatureInPartInRawPartListVM
|
|||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Public refSaveFeatureInPartInRawPartGridControlLayout As Action
|
||||||
|
|
||||||
Private m_colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
|
Private m_colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||||
Public ReadOnly Property colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
|
Public ReadOnly Property colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||||
Get
|
Get
|
||||||
@@ -78,6 +80,12 @@ Public Class FeatureInPartInRawPartListVM
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub Close()
|
||||||
|
If Not IsNothing(refSaveFeatureInPartInRawPartGridControlLayout) Then
|
||||||
|
refSaveFeatureInPartInRawPartGridControlLayout()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2,9 +2,22 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||||
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||||
|
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||||
|
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||||
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||||
|
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||||
|
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||||
|
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||||
|
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||||
|
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||||
|
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||||
|
|
||||||
<Grid Margin="5">
|
<Grid Style="{StaticResource BlockedWnd_Grid}">
|
||||||
|
<Grid.Resources>
|
||||||
|
<OPTIMIZER:TrimmedTextBlockVisibilityConverter x:Key="TrimToVisConverter" />
|
||||||
|
</Grid.Resources>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
@@ -13,118 +26,93 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<EgwWPFBaseLib:EgwDataGrid CanUserDeleteRows="False"
|
<dxg:GridControl x:Name="PParameterList_GridControl"
|
||||||
SelectionMode="Single"
|
ItemsSource="{Binding Tag.PBTLParamVMList,
|
||||||
Margin="0,0,0,5"
|
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||||
ItemsSource="{Binding Tag.PBTLParamVMList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
SelectedItem="{Binding Tag.SelPBTLParam,
|
||||||
SelectedItem="{Binding Tag.SelPBTLParam, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||||
IsEnabled="{Binding PParameterList_IsEnabled}"
|
SelectionMode="Row">
|
||||||
ColumnLayouts="{Binding PParameterListColumns}"
|
<dxg:GridControl.View>
|
||||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
<dxg:TableView x:Name="PParameterList_TableView"
|
||||||
AlternationCount="2"
|
AllowPerPixelScrolling="True"
|
||||||
ColumnHeaderStyle="{StaticResource PParam_DataGridColumnHeader}"
|
AllowEditing="True"
|
||||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
AllowSorting="True"
|
||||||
Style="{StaticResource Optimizer_DataGrid}">
|
AllowGrouping="True"
|
||||||
<DataGrid.RowStyle>
|
AllowColumnFiltering="True"
|
||||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
AllowFilterEditor="False"
|
||||||
<EventSetter Event="PreviewMouseDown" Handler="PParameterList_PreviewMouseDown"/>
|
AllowFilterPanelNavigation="False"
|
||||||
</Style>
|
ExtendScrollBarToFixedColumns="True"
|
||||||
</DataGrid.RowStyle>
|
Focusable="True"
|
||||||
|
GroupSummaryDisplayMode="AlignByColumns"
|
||||||
|
IsTotalSummaryMenuEnabled="False"
|
||||||
|
IsGroupFooterMenuEnabled="True"
|
||||||
|
NavigationStyle="Cell"
|
||||||
|
ShowGroupPanel="False"
|
||||||
|
ShowTotalSummary="False"
|
||||||
|
ShowSearchPanelMode="Default"
|
||||||
|
ShowFilterPanelMode="Never"
|
||||||
|
ShowIndicator="False"
|
||||||
|
ShowColumnHeaders="True"
|
||||||
|
ShowHorizontalLines="True"
|
||||||
|
ShowVerticalLines="False"
|
||||||
|
ShowFocusedRectangle="True"
|
||||||
|
ShowGroupFooters="True"
|
||||||
|
ShowSearchPanelResultInfo="True"
|
||||||
|
ShowSearchPanelNavigationButtons="True"
|
||||||
|
UseEvenRowBackground="True"
|
||||||
|
|
||||||
<DataGrid.Resources>
|
ShowGridMenu="OnShowGridMenu"
|
||||||
<OPTIMIZER:TrimmedTextBlockVisibilityConverter x:Key="TrimToVisConverter" />
|
|
||||||
<!--Custom-->
|
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||||
<DataGridTemplateColumn x:Key="colCUSTOM">
|
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||||
<DataGridTemplateColumn.HeaderTemplate>
|
|
||||||
<DataTemplate>
|
RowStyle="{StaticResource RowStyle}"
|
||||||
<TextBlock Text="{Binding DataContext.Custom_Msg, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
CellStyle="{StaticResource CellStyle}"
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.HeaderTemplate>
|
Style="{StaticResource TableViewStyle}"/>
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
</dxg:GridControl.View>
|
||||||
<DataTemplate>
|
<dxg:GridColumn FieldName="bCustom"
|
||||||
<CheckBox IsChecked="{Binding bCustom, UpdateSourceTrigger=PropertyChanged}"
|
Header="{Binding Custom_Msg}"
|
||||||
Visibility="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
Fixed="Left"
|
||||||
Style="{StaticResource PParameters_CheckBox}"/>
|
AllowEditing="False"
|
||||||
</DataTemplate>
|
Style="{StaticResource ColumnInfoStyle}">
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
<dxg:GridColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn>
|
<DataTemplate>
|
||||||
<!--Nome-->
|
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bCustom}"
|
||||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate>
|
</dxg:GridColumn.CellTemplate>
|
||||||
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
</dxg:GridColumn>
|
||||||
</DataTemplate>
|
<dxg:GridColumn FieldName="sName"
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
Header="{Binding NAM_Msg}"
|
||||||
</DataGridTextColumn>
|
AllowEditing="False"
|
||||||
<!--Descrizione-->
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDescription}">
|
<dxg:GridColumn FieldName="sDescription"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
Header="{Binding Description_Msg}"
|
||||||
<DataTemplate>
|
AllowEditing="False"
|
||||||
<TextBlock Text="{Binding Path=DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
</DataTemplate>
|
<dxg:GridColumn FieldName="sValue"
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
SortFieldName="dValue"
|
||||||
<DataGridTextColumn.CellStyle>
|
Header="{Binding Value_Msg}"
|
||||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
AllowColumnFiltering="False"
|
||||||
<Setter Property="Template">
|
Style="{StaticResource ColumnInfoStyle}">
|
||||||
<Setter.Value>
|
<dxg:GridColumn.EditSettings>
|
||||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||||
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"
|
</dxg:GridColumn.EditSettings>
|
||||||
Style="{StaticResource Prod_TextBlock}">
|
</dxg:GridColumn>
|
||||||
<TextBlock.ToolTip>
|
<dxg:GridColumn FieldName="sMin"
|
||||||
<ToolTip Style="{StaticResource PParameters_ToolTip}">
|
SortFieldName="dMin"
|
||||||
<ToolTip.Content>
|
Header="{Binding Min_Msg}"
|
||||||
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"
|
AllowColumnFiltering="False"
|
||||||
Style="{StaticResource Prod_TextBlock}"/>
|
AllowEditing="False"
|
||||||
</ToolTip.Content>
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
</ToolTip>
|
<dxg:GridColumn FieldName="sMax"
|
||||||
</TextBlock.ToolTip>
|
SortFieldName="dMaxn"
|
||||||
</TextBlock>
|
Header="{Binding Max_Msg}"
|
||||||
</ControlTemplate>
|
AllowColumnFiltering="False"
|
||||||
</Setter.Value>
|
AllowEditing="False"
|
||||||
</Setter>
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
</Style>
|
</dxg:GridControl>
|
||||||
</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"
|
<Image Grid.Column="1"
|
||||||
Source="{Binding sCurrDraw}"
|
Source="{Binding sCurrDraw}"
|
||||||
|
|||||||
@@ -1,12 +1,115 @@
|
|||||||
Public Class PParameterListV
|
Imports System.IO
|
||||||
|
Imports DevExpress.Xpf.Bars
|
||||||
|
Imports DevExpress.Xpf.Core.Serialization
|
||||||
|
Imports DevExpress.Xpf.Grid
|
||||||
|
Imports EgtBEAMWALL.Core
|
||||||
|
|
||||||
Private Sub PParameterList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
Public Class PParameterListV
|
||||||
If TypeOf sender Is DataGridRow Then
|
|
||||||
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
Private m_PParameterListVM As PParameterListVM
|
||||||
If Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
|
Private m_sDataGridLayoutPath As String = ""
|
||||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam = Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SelPBTLParam
|
|
||||||
|
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 SavePParameterGridControlLayout()
|
||||||
|
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 SavePParameterGridControlLayout
|
||||||
|
' 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 If
|
End If
|
||||||
End Sub
|
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
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ Public Class PParameterListVM
|
|||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Public refPParameterListGridControlLayout As Action
|
||||||
|
|
||||||
Private m_colPParam_Value As EgwWPFBaseLib.ColumnLayout
|
Private m_colPParam_Value As EgwWPFBaseLib.ColumnLayout
|
||||||
Public ReadOnly Property colPParam_Value As EgwWPFBaseLib.ColumnLayout
|
Public ReadOnly Property colPParam_Value As EgwWPFBaseLib.ColumnLayout
|
||||||
Get
|
Get
|
||||||
@@ -125,6 +127,12 @@ Public Class PParameterListVM
|
|||||||
NotifyPropertyChanged(NameOf(PParameterList_IsEnabled))
|
NotifyPropertyChanged(NameOf(PParameterList_IsEnabled))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub Close()
|
||||||
|
If Not IsNothing(refPParameterListGridControlLayout) Then
|
||||||
|
refPParameterListGridControlLayout()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,84 +1,221 @@
|
|||||||
Imports EgtBEAMWALL.Core
|
Imports System.IO
|
||||||
|
Imports DevExpress.Data
|
||||||
|
Imports DevExpress.Xpf.Bars
|
||||||
|
Imports DevExpress.Xpf.Core.Native
|
||||||
|
Imports DevExpress.Xpf.Core.Serialization
|
||||||
|
Imports DevExpress.Xpf.Grid
|
||||||
|
Imports EgtBEAMWALL.Core
|
||||||
Imports EgtUILib.EgtInterface
|
Imports EgtUILib.EgtInterface
|
||||||
|
|
||||||
Public Class RawPartListV
|
Public Class RawPartListV
|
||||||
|
|
||||||
' funzione che permette di selezionare un RawPart anche quando gia' selezionato
|
Private m_RawPartListVM As RawPartListVM
|
||||||
Private Sub RawPartRow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
|
||||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Map.refProjectVM.BTLStructureVM.SelBTLPart.SetOpenFeatureList(False)
|
Private m_sDataGridLayoutPath As String = ""
|
||||||
If TypeOf sender Is DataGridRow Then
|
|
||||||
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
Private _lastExpanded As Integer = -1
|
||||||
Dim RowVM As MyMachGroupVM = DirectCast(Row.DataContext, MyMachGroupVM)
|
|
||||||
Dim DataGridDetailsPresenter As Object = TreeHelperManager.FindVisualParents(Of Button, CheckBox, Primitives.DataGridDetailsPresenter)(e.OriginalSource)
|
Sub New()
|
||||||
If Not IsNothing(DataGridDetailsPresenter) Then Return
|
|
||||||
' se gia' selezionato rifaccio selezione perche' potrebbe essere selezionato un BTLPart
|
' This call is required by the designer.
|
||||||
If Not IsNothing(Row) AndAlso Row.IsSelected Then
|
InitializeComponent()
|
||||||
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup
|
|
||||||
|
' 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
|
||||||
|
|
||||||
|
' 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 If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' funzione che impedisce di editare le righe che sono gia' in produzione
|
' gestore evento Allow Resize
|
||||||
Private Sub RawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
|
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||||
If IsNothing(e.Row) Then Return
|
Dim info As GridColumnMenuInfo = TryCast(e.Link.DataContext, GridColumnMenuInfo)
|
||||||
Dim RowVM As MyMachGroupVM = DirectCast(e.Row.DataContext, MyMachGroupVM)
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
' se in produzione impedisco modifica dei parametri
|
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||||
If RowVM.nProduction_State > ItemState.ND Then
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||||
'For Each cell In Row.Item
|
Else
|
||||||
e.Cancel = True
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
|
' gestore evento Auto Fit
|
||||||
Dim btn As Button = DirectCast(sender, Button) ' Ottieni il bottone che ha generato l'evento
|
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||||
Dim parent As DependencyObject = btn
|
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
|
||||||
|
|
||||||
' Cerca il Popup nel Visual Tree
|
Private Sub GridControl_MasterRowExpanding(sender As Object, e As DevExpress.Xpf.Grid.RowAllowEventArgs)
|
||||||
While Not IsNothing(parent) AndAlso TypeOf parent IsNot DataGridRow
|
Dim grid = CType(sender, DevExpress.Xpf.Grid.GridControl)
|
||||||
parent = VisualTreeHelper.GetParent(parent)
|
|
||||||
End While
|
|
||||||
|
|
||||||
If parent IsNot Nothing Then
|
' Chiudi solo il precedente
|
||||||
Dim popup As New RawPartListPopUpV()
|
If _lastExpanded <> -1 AndAlso _lastExpanded <> e.RowHandle Then
|
||||||
If Not IsNothing(popup) Then
|
grid.SetMasterRowExpanded(_lastExpanded, False)
|
||||||
popup.PlacementTarget = btn ' Associa il popup al bottone
|
End If
|
||||||
popup.IsOpen = True ' Mostra il popup
|
|
||||||
|
_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 If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' funzione che permette di selezionare un pezzo anche quando gia' selezionato
|
Private Sub RawPart_TableView_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||||
Private Sub PartInRawPartRow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
If e.Key = Key.Delete Then
|
||||||
If TypeOf sender Is DataGridRow Then
|
Dim MyMachGroupPanelVM As MyMachGroupPanelVM = TryCast(Me.Tag, MyMachGroupPanelVM)
|
||||||
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
If IsNothing(MyMachGroupPanelVM) Then Return
|
||||||
If Not IsNothing(Row) Then
|
|
||||||
Dim MyMachGroup As Core.MyMachGroupVM = Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup
|
Dim SelectedMachGroup As MyMachGroupVM = MyMachGroupPanelVM.SelectedMachGroup
|
||||||
If EgtGetCurrMachGroup() = GDB_ID.NULL Then Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup = MyMachGroup
|
Dim SelPart As PartVM = SelectedMachGroup?.SelPart
|
||||||
MyMachGroup.SelPart = MyMachGroup.SelPart
|
|
||||||
|
If MyMachGroupPanelVM.bSelOnPart AndAlso Not IsNothing(SelPart) Then
|
||||||
|
SelPart.RemovePart()
|
||||||
|
e.Handled = True
|
||||||
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
SelectedMachGroup.RemoveRawPartCmd()
|
||||||
|
e.Handled = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' funzione che impedisce di editare le righe che sono gia' in produzione
|
Private Sub RawPart_TableView_ShownEditor(sender As Object, e As EditorEventArgs)
|
||||||
Private Sub PartInRawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
|
e.Editor.SelectAll()
|
||||||
If IsNothing(e.Row) Then Return
|
e.Editor.EditValue = ""
|
||||||
Dim RowVM As PartVM = DirectCast(e.Row.DataContext, PartVM)
|
|
||||||
' se in produzione impedisco modifica dei parametri
|
|
||||||
If RowVM.nProduction_State > ItemState.ND Then
|
|
||||||
'For Each cell In Row.Item
|
|
||||||
e.Cancel = True
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub EgwDataGrid_PreviewMouseWheel(sender As Object, e As MouseWheelEventArgs)
|
Private Sub Part_TableView_ShownEditor(sender As Object, e As EditorEventArgs)
|
||||||
e.Handled = True
|
e.Editor.SelectAll()
|
||||||
Dim parent As EgwWPFBaseLib.EgwDataGrid = TryCast(sender, EgwWPFBaseLib.EgwDataGrid)
|
e.Editor.EditValue = ""
|
||||||
If IsNothing(parent) Then
|
|
||||||
Return
|
|
||||||
End If
|
|
||||||
parent?.[RaiseEvent](New MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta) With {
|
|
||||||
.RoutedEvent = MouseWheelEvent,
|
|
||||||
.Source = sender})
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ Public Class RawPartListVM
|
|||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Friend refSaveBTLPartGridControlLayout As Action
|
||||||
|
|
||||||
Private m_colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
Private m_colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
||||||
Public ReadOnly Property colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
Public ReadOnly Property colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
||||||
Get
|
Get
|
||||||
@@ -248,6 +250,12 @@ Public Class RawPartListVM
|
|||||||
m_colPartInRawPart_PosY = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSY)
|
m_colPartInRawPart_PosY = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSY)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub Close()
|
||||||
|
If Not IsNothing(refSaveBTLPartGridControlLayout) Then
|
||||||
|
refSaveBTLPartGridControlLayout()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
Style="{StaticResource LeftPanel_Grid}">
|
Style="{StaticResource LeftPanel_Grid}">
|
||||||
|
|
||||||
@@ -17,131 +18,6 @@
|
|||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Style="{StaticResource Optimizer_Border}"/>
|
Style="{StaticResource Optimizer_Border}"/>
|
||||||
|
|
||||||
<Grid Style="{StaticResource Verify_Grid}">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Button ToolTip="{Binding VerifyAll_ToolTip}"
|
|
||||||
Command="{Binding VerifyAll_Command}"
|
|
||||||
IsEnabled="{Binding VerifyAll_IsEnabled}"
|
|
||||||
Style="{StaticResource Verify_Button}">
|
|
||||||
<Image Source="{StaticResource VerifyAll_Image}"
|
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
|
||||||
</Button>
|
|
||||||
<Button Grid.Column="1"
|
|
||||||
ToolTip="{Binding VerifyAll_ToolTip}"
|
|
||||||
Command="{Binding VerifyAllFlipRot_Command}"
|
|
||||||
IsEnabled="{Binding VerifyAll_IsEnabled}"
|
|
||||||
Style="{StaticResource Verify_Button}">
|
|
||||||
<Image Source="{StaticResource VerifyAllR_Image}"
|
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
|
||||||
</Button>
|
|
||||||
<Button Grid.Column="2"
|
|
||||||
Command="{Binding ResetCalc_Command}"
|
|
||||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
|
||||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
|
||||||
Style="{StaticResource Verify_Button}">
|
|
||||||
<Image Source="{StaticResource ResetCalc_Image}"
|
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
|
||||||
</Button>
|
|
||||||
<Button Grid.Column="3"
|
|
||||||
Name="FilterAllBtn"
|
|
||||||
ToolTip="{Binding FilterAll_ToolTip}"
|
|
||||||
Command="{Binding ShowPopUpFilterBtnCommand}"
|
|
||||||
Style="{StaticResource Verify_Button}">
|
|
||||||
<Image Source="{StaticResource AllFilter_Image}"
|
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
|
||||||
</Button>
|
|
||||||
<Popup IsOpen="{Binding IsFilterBtnOpen}"
|
|
||||||
PlacementTarget="{Binding ElementName=FilterAllBtn}"
|
|
||||||
Style="{StaticResource Filter_PopUp}">
|
|
||||||
<UniformGrid Columns="5"
|
|
||||||
Style="{StaticResource LeftPanel_UniformGrid}">
|
|
||||||
<Expander Header="{Binding Section_Msg}">
|
|
||||||
<ListBox ItemsSource="{Binding Tag.SectionList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
SelectedItem="{Binding Tag.SelSection, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
DisplayMemberPath="sSectionXMaterial"
|
|
||||||
Style="{StaticResource LeftPanel_ListBox}"
|
|
||||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
|
||||||
</Expander>
|
|
||||||
<Expander Grid.Column="1"
|
|
||||||
Header="{Binding Group_Msg}"
|
|
||||||
Style="{StaticResource LeftPanel_Expander}">
|
|
||||||
<ListBox ItemsSource="{Binding Tag.GroupList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
SelectedItem="{Binding Tag.SelGroup, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
Style="{StaticResource LeftPanel_ListBox}"
|
|
||||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
|
||||||
</Expander>
|
|
||||||
<Expander Grid.Column="2"
|
|
||||||
Header="{Binding SubGroup_Msg}"
|
|
||||||
Style="{StaticResource LeftPanel_Expander}">
|
|
||||||
<ListBox ItemsSource="{Binding Tag.SubGroupList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
SelectedItem="{Binding Tag.SelSubGroup, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
Style="{StaticResource LeftPanel_ListBox}"
|
|
||||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
|
||||||
</Expander>
|
|
||||||
<Expander Grid.Column="3"
|
|
||||||
Header="{Binding ParType_Msg}"
|
|
||||||
Style="{StaticResource LeftPanel_Expander}">
|
|
||||||
<ListBox ItemsSource="{Binding Tag.SearchParamList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
SelectedItem="{Binding Tag.SelSearchParam, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
Style="{StaticResource LeftPanel_ListBox}"
|
|
||||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
|
||||||
</Expander>
|
|
||||||
<Expander Grid.Column="4"
|
|
||||||
Header="{Binding ParValue_Msg}"
|
|
||||||
Style="{StaticResource LeftPanel_Expander}">
|
|
||||||
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.SearchText, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
Style="{StaticResource SearchText_TextBox}"/>
|
|
||||||
</Expander>
|
|
||||||
</UniformGrid>
|
|
||||||
</Popup>
|
|
||||||
<Expander Grid.Column="4"
|
|
||||||
Header="{Binding Section_Msg}"
|
|
||||||
Style="{StaticResource Section_Expander}">
|
|
||||||
<ListBox ItemsSource="{Binding Tag.SectionList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
SelectedItem="{Binding Tag.SelSection, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
|
||||||
DisplayMemberPath="sSectionXMaterial"
|
|
||||||
Style="{StaticResource LeftPanel_ListBox}"
|
|
||||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
|
||||||
</Expander>
|
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="5"
|
|
||||||
Text="{Binding 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"
|
<OPTIMIZER:BTLPartListV Grid.Row="1"
|
||||||
DataContext="{StaticResource PartListVM}"
|
DataContext="{StaticResource PartListVM}"
|
||||||
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||||
|
|||||||
@@ -83,12 +83,9 @@ Public Class LeftPanelVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdVerifyAll As ICommand
|
|
||||||
Private m_cmdVerifyFlipRotAll As ICommand
|
|
||||||
Private m_cmdShowPopUpFilterBtnCmd As ICommand
|
Private m_cmdShowPopUpFilterBtnCmd As ICommand
|
||||||
Private m_cmdRotateAll As ICommand
|
Private m_cmdRotateAll As ICommand
|
||||||
Private m_cmdInvertAll As ICommand
|
Private m_cmdInvertAll As ICommand
|
||||||
Private m_cmdResetCalc As ICommand
|
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
@@ -145,6 +142,12 @@ Public Class LeftPanelVM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property VerifyAllFlipRot_ToolTip As String
|
||||||
|
Get
|
||||||
|
Return EgtMsg(62000)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property FilterAll_ToolTip As String
|
Public ReadOnly Property FilterAll_ToolTip As String
|
||||||
Get
|
Get
|
||||||
Return EgtMsg(62570)
|
Return EgtMsg(62570)
|
||||||
@@ -202,54 +205,6 @@ Public Class LeftPanelVM
|
|||||||
|
|
||||||
#Region "COMMANDS"
|
#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 "ShowPopUpFilterBtnCommand"
|
#Region "ShowPopUpFilterBtnCommand"
|
||||||
|
|
||||||
Public ReadOnly Property ShowPopUpFilterBtnCommand As ICommand
|
Public ReadOnly Property ShowPopUpFilterBtnCommand As ICommand
|
||||||
@@ -338,39 +293,6 @@ Public Class LeftPanelVM
|
|||||||
|
|
||||||
#End Region ' InvertAll
|
#End Region ' InvertAll
|
||||||
|
|
||||||
#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 info
|
|
||||||
If MyExecProcessManager.sInfoNgePartList.Count > 0 Then
|
|
||||||
For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList
|
|
||||||
Dim sInfoNgePart As String() = InfoNgePart.Split("="c)
|
|
||||||
EgtRemoveInfo(Part.nPartId, sInfoNgePart(0))
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
' 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 Region ' COMMANDS
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -7,6 +7,18 @@ Public Class MyMachGroupPanelVM
|
|||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Private m_bSelOnPart As Boolean = False
|
||||||
|
Public ReadOnly Property bSelOnPart As Boolean
|
||||||
|
Get
|
||||||
|
Return m_bSelOnPart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetbSelOnPart(value As Boolean)
|
||||||
|
m_bSelOnPart = value
|
||||||
|
NotifyPropertyChanged(NameOf(bSelOnPart))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Property m_OldSelectedMachGroup As MyMachGroupVM
|
||||||
Public Shadows Property SelectedMachGroup As MyMachGroupVM
|
Public Shadows Property SelectedMachGroup As MyMachGroupVM
|
||||||
Get
|
Get
|
||||||
Return m_SelectedMachGroup
|
Return m_SelectedMachGroup
|
||||||
@@ -29,7 +41,13 @@ Public Class MyMachGroupPanelVM
|
|||||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not IsNothing(value) Then m_OldSelectedMachGroup = value
|
||||||
|
|
||||||
m_SelectedMachGroup = value
|
m_SelectedMachGroup = value
|
||||||
|
|
||||||
|
If IsNothing(m_SelectedMachGroup) Then m_SelectedMachGroup = m_OldSelectedMachGroup
|
||||||
|
|
||||||
If Not IsNothing(value) Then
|
If Not IsNothing(value) Then
|
||||||
OnPreSetCurrMachGroup()
|
OnPreSetCurrMachGroup()
|
||||||
EgtSetCurrMachGroup(value.Id)
|
EgtSetCurrMachGroup(value.Id)
|
||||||
@@ -42,6 +60,7 @@ Public Class MyMachGroupPanelVM
|
|||||||
End If
|
End If
|
||||||
Map.refMyStatusBarVM.SetLoadingProgress(0)
|
Map.refMyStatusBarVM.SetLoadingProgress(0)
|
||||||
Map.refMyStatusBarVM.SetOutputMessage("")
|
Map.refMyStatusBarVM.SetOutputMessage("")
|
||||||
|
SetbSelOnPart(False)
|
||||||
NotifyPropertyChanged(NameOf(SelectedMachGroup))
|
NotifyPropertyChanged(NameOf(SelectedMachGroup))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -160,11 +179,11 @@ Public Class MyMachGroupPanelVM
|
|||||||
Dim Beam As PartVM = BeamMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nDuploId)
|
Dim Beam As PartVM = BeamMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nDuploId)
|
||||||
EgtSetCurrMachGroup(BeamMachGroup.Id)
|
EgtSetCurrMachGroup(BeamMachGroup.Id)
|
||||||
Beam.DeletePart()
|
Beam.DeletePart()
|
||||||
|
' reset necessario per poter ottenere nMachGroupId corretto
|
||||||
|
EgtResetCurrMachGroup()
|
||||||
|
' aggiorno dati utilizzo barra
|
||||||
|
BeamMachGroup.UpdateUsage()
|
||||||
End If
|
End If
|
||||||
' reset necessario per poter ottenere nMachGroupId corretto
|
|
||||||
EgtResetCurrMachGroup()
|
|
||||||
' aggiorno dati utilizzo barra
|
|
||||||
BeamMachGroup.UpdateUsage()
|
|
||||||
Next
|
Next
|
||||||
' aggiorno quantita' in prod
|
' aggiorno quantita' in prod
|
||||||
Dim BTLPart As BTLPartVM = CALCPanelVM.GetBTLPartVMFromBTLPartId(nPartId)
|
Dim BTLPart As BTLPartVM = CALCPanelVM.GetBTLPartVMFromBTLPartId(nPartId)
|
||||||
@@ -197,7 +216,7 @@ Public Class MyMachGroupPanelVM
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Overrides Sub AddMachGroup()
|
Public Overrides Sub AddMachGroup()
|
||||||
Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(CurrentMachine.sMachineName, Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
Dim MyMachGroupM As MyMachGroupM = m_MyMachGroupPanelM.NewMyMachGroup(Map.refMachinePanelVM.SelectedMachine.Name, Map.refProjectVM.BTLStructureVM.nPROJTYPE)
|
||||||
' e lo seleziono
|
' e lo seleziono
|
||||||
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -211,8 +230,6 @@ Public Class MyMachGroupPanelVM
|
|||||||
EgtResetCurrMachGroup()
|
EgtResetCurrMachGroup()
|
||||||
' nascondo tutti i pezzi
|
' nascondo tutti i pezzi
|
||||||
Map.refProjectVM.BTLStructureVM.HideAll()
|
Map.refProjectVM.BTLStructureVM.HideAll()
|
||||||
' mostro tutti i pezzi
|
|
||||||
Map.refShowBeamPanelVM.ShowAll(True)
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ Public Class MyMachGroupVM
|
|||||||
Map.refProjectVM.SetManagerTabVisibility(True)
|
Map.refProjectVM.SetManagerTabVisibility(True)
|
||||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
|
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
|
||||||
End If
|
End If
|
||||||
|
Map.refMachGroupPanelVM.SetbSelOnPart(True)
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetSelPart(value As Core.PartVM)
|
Friend Sub SetSelPart(value As Core.PartVM)
|
||||||
@@ -803,6 +804,10 @@ Public Class MyMachGroupVM
|
|||||||
End If
|
End If
|
||||||
Part.nProduction_State = ItemState.ND
|
Part.nProduction_State = ItemState.ND
|
||||||
Part.NotifyPropertyChanged(NameOf(Part.Background))
|
Part.NotifyPropertyChanged(NameOf(Part.Background))
|
||||||
|
Part.NotifyPropertyChanged(NameOf(Part.ButtonIsEnabled))
|
||||||
|
For Each Feature As BTLFeatureVM In Part.FeatureVMList
|
||||||
|
Feature.NotifyPropertyChanged(NameOf(Feature.IsEnabled))
|
||||||
|
Next
|
||||||
If bDuploToUpdate Then
|
If bDuploToUpdate Then
|
||||||
Dim Duplo As PartVM = CALCPanelVM.GetPartVMFromPartId(Part.nPartId)
|
Dim Duplo As PartVM = CALCPanelVM.GetPartVMFromPartId(Part.nPartId)
|
||||||
Duplo.ResetCalcTotalPart()
|
Duplo.ResetCalcTotalPart()
|
||||||
@@ -818,6 +823,7 @@ Public Class MyMachGroupVM
|
|||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(IsReadOnly))
|
NotifyPropertyChanged(NameOf(IsReadOnly))
|
||||||
NotifyPropertyChanged(NameOf(Background))
|
NotifyPropertyChanged(NameOf(Background))
|
||||||
|
NotifyPropertyChanged(NameOf(ButtonIsEnabled))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RefreshPartList_Tick()
|
Private Sub RefreshPartList_Tick()
|
||||||
@@ -906,19 +912,20 @@ Public Class MyMachGroupVM
|
|||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(1)
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(1)
|
||||||
Else
|
Else
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
||||||
EgtDraw()
|
'EgtDraw()
|
||||||
End If
|
End If
|
||||||
ElseIf Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 Then
|
ElseIf Index = Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 Then
|
||||||
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
|
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 2)
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 2)
|
||||||
Else
|
Else
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
||||||
EgtDraw()
|
'EgtDraw()
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1)
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index - 1)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
EgtDraw()
|
||||||
' rimuovo dalla lista grezzi
|
' rimuovo dalla lista grezzi
|
||||||
Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me)
|
Map.refMachGroupPanelVM.MachGroupVMList.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -940,7 +947,7 @@ Public Class MyMachGroupVM
|
|||||||
|
|
||||||
Friend Sub Verify()
|
Friend Sub Verify()
|
||||||
If ((IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
|
If ((IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
|
||||||
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetIsRowEnabled(False)
|
Map.refMachGroupPanelVM.SelectedMachGroup.SetIsRowEnabled(False)
|
||||||
Map.refCALCPanelVM.Verify(ProjectType.PROD, CalcIntegration.CmdTypes.CHECKGEN)
|
Map.refCALCPanelVM.Verify(ProjectType.PROD, CalcIntegration.CmdTypes.CHECKGEN)
|
||||||
Return
|
Return
|
||||||
End Sub
|
End Sub
|
||||||
@@ -976,10 +983,11 @@ Public Class MyMachGroupVM
|
|||||||
EgtGetMachGroupMachineName(SelMachGroup.Id, MachineName)
|
EgtGetMachGroupMachineName(SelMachGroup.Id, MachineName)
|
||||||
Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = SelMachGroup.Id,
|
Dim Bar As New EgtBEAMWALL.Core.Bar With {.nBarId = SelMachGroup.Id,
|
||||||
.nProgramPage = ProjectType.PROD,
|
.nProgramPage = ProjectType.PROD,
|
||||||
.nProjType = ProjType,
|
.nProjType = ProjType + 10,
|
||||||
.bBarOk = True,
|
.bBarOk = True,
|
||||||
.nMachineName = MachineName,
|
.nMachineName = MachineName,
|
||||||
.nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
.nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
||||||
|
.nBarState = SelMachGroup.nProduction_State,
|
||||||
.nGlobState = SelMachGroup.nGlobalState}
|
.nGlobState = SelMachGroup.nGlobalState}
|
||||||
If SelMachGroup.nGlobalState = CalcStates.NOTCALCULATED Then
|
If SelMachGroup.nGlobalState = CalcStates.NOTCALCULATED Then
|
||||||
Dim sMachGroupFilePath As String = ProjectManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe"
|
Dim sMachGroupFilePath As String = ProjectManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe"
|
||||||
@@ -1150,7 +1158,7 @@ Public Class MyMachGroupVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Sub RemoveRawPartCmd()
|
Public Sub RemoveRawPartCmd()
|
||||||
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62574) & Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.Name & " ?", EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
|
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62574) & " " & Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.Name & " ?", EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
|
||||||
RemoveRawPart()
|
RemoveRawPart()
|
||||||
Else
|
Else
|
||||||
Return
|
Return
|
||||||
@@ -1173,16 +1181,33 @@ Public Class MyMachGroupVM
|
|||||||
If IsNothing(SelMachGroup) Then Return
|
If IsNothing(SelMachGroup) Then Return
|
||||||
' se barra gia' assegnata a supervisore, esco
|
' se barra gia' assegnata a supervisore, esco
|
||||||
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
|
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
|
||||||
|
Dim Index As Integer = Map.refMachGroupPanelVM.MachGroupVMList.IndexOf(SelMachGroup)
|
||||||
SelMachGroup.DeleteMachGroup()
|
SelMachGroup.DeleteMachGroup()
|
||||||
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then
|
If Index = 0 Then
|
||||||
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
|
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
|
||||||
|
Else
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
||||||
|
' seleziono primo pezzo
|
||||||
|
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
|
||||||
|
Map.refProjectVM.BTLStructureVM.SelectBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ElseIf Index >= Map.refMachGroupPanelVM.MachGroupVMList.Count Then
|
||||||
|
If Map.refMachGroupPanelVM.MachGroupVMList.Count > 1 Then
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Map.refMachGroupPanelVM.MachGroupVMList.Count - 1)
|
||||||
|
Else
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
||||||
|
' seleziono primo pezzo
|
||||||
|
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
|
||||||
|
Map.refProjectVM.BTLStructureVM.SelectBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(Index)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
' se nessun grezzo, rimetto tutti i pezzi invisibili
|
|
||||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
|
||||||
Map.refProjectVM.BTLStructureVM.HideAll(True)
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' RemoveRawPart
|
#End Region ' RemoveRawPart
|
||||||
|
|||||||
@@ -88,9 +88,7 @@
|
|||||||
</TabControl.ItemContainerStyle>
|
</TabControl.ItemContainerStyle>
|
||||||
<TabItem Header="EMPTY"/>
|
<TabItem Header="EMPTY"/>
|
||||||
<TabItem Header="STRATEGIES">
|
<TabItem Header="STRATEGIES">
|
||||||
<StackPanel>
|
<OPTIMIZER:StrategyManagerV DataContext="{StaticResource StrategyManagerVM}" Margin="0,0,0,-25"/>
|
||||||
<OPTIMIZER:StrategyManagerV DataContext="{StaticResource StrategyManagerVM}"/>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="PARAMETERS">
|
<TabItem Header="PARAMETERS">
|
||||||
<StackPanel Style="{StaticResource PartManager_StackPanel}">
|
<StackPanel Style="{StaticResource PartManager_StackPanel}">
|
||||||
|
|||||||
@@ -36,8 +36,25 @@
|
|||||||
Command="{Binding SendFeedbackCommand}"
|
Command="{Binding SendFeedbackCommand}"
|
||||||
ToolTip="{Binding SendFeedbackToolTip}"
|
ToolTip="{Binding SendFeedbackToolTip}"
|
||||||
Style="{StaticResource SendFeedback_Button}">
|
Style="{StaticResource SendFeedback_Button}">
|
||||||
<Image Source="{StaticResource Send_Image}"
|
<Grid>
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
<Image Source="{StaticResource Send_Image}"
|
||||||
|
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||||
|
<Border Background="Red"
|
||||||
|
Height="10"
|
||||||
|
Width="10"
|
||||||
|
Margin="5,0,0,0"
|
||||||
|
CornerRadius="5"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Visibility="{Binding BadgeVisibility}">
|
||||||
|
<TextBlock Text="{Binding sBadgeText}"
|
||||||
|
FontSize="7"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Foreground="White"
|
||||||
|
Margin="0,0,0,1"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<RadioButton Grid.Column="4"
|
<RadioButton Grid.Column="4"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ Imports EgtBEAMWALL.Core
|
|||||||
Imports EgtBEAMWALL.Core.ConstBeam
|
Imports EgtBEAMWALL.Core.ConstBeam
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
|
Imports EgwRedmineAPI
|
||||||
|
|
||||||
Public Class MainMenuVM
|
Public Class MainMenuVM
|
||||||
Inherits VMBase
|
Inherits VMBase
|
||||||
@@ -40,8 +41,12 @@ Public Class MainMenuVM
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
If value Then
|
If value Then
|
||||||
SelPage = Pages.OPTIMIZERPAGE
|
Dim bModify As Boolean = True
|
||||||
SetConfigurationImagePath(CONFIGURATION_IMAGE)
|
If Map.refStrategyManagerVM.bIsModifyStrategy Then bModify = Map.refStrategyManagerVM.SaveCustomConfigJson()
|
||||||
|
If bModify Then
|
||||||
|
SelPage = Pages.OPTIMIZERPAGE
|
||||||
|
SetConfigurationImagePath(CONFIGURATION_IMAGE)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -236,6 +241,28 @@ Public Class MainMenuVM
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_sBadgeText As String = ""
|
||||||
|
Public ReadOnly Property sBadgeText As String
|
||||||
|
Get
|
||||||
|
Return m_sBadgeText
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetBadgeText(value As String)
|
||||||
|
m_sBadgeText = value
|
||||||
|
NotifyPropertyChanged(NameOf(sBadgeText))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private m_BadgeVisibility As Visibility = Visibility.Collapsed
|
||||||
|
Public ReadOnly Property BadgeVisibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_BadgeVisibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetBadgeVisibility(value As Boolean)
|
||||||
|
m_BadgeVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(BadgeVisibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property Configuration_Msg As String
|
Public ReadOnly Property Configuration_Msg As String
|
||||||
@@ -308,6 +335,10 @@ Public Class MainMenuVM
|
|||||||
m_OpenPage_Timer.Interval = TimeSpan.FromMilliseconds(500)
|
m_OpenPage_Timer.Interval = TimeSpan.FromMilliseconds(500)
|
||||||
AddHandler m_OpenPage_Timer.Tick, AddressOf OpenPage_Tick
|
AddHandler m_OpenPage_Timer.Tick, AddressOf OpenPage_Tick
|
||||||
m_OpenPage_Timer.Start()
|
m_OpenPage_Timer.Start()
|
||||||
|
' verifico se lanciare gestore notifiche
|
||||||
|
If Not IsNothing(Map.refMainWindowVM.MainWindowM.RedmineApi) AndAlso GetMainPrivateProfileInt("Redmine", "EnableNotification", 0) > 0 AndAlso Not IsNothing(Map.refMainWindowVM.MainWindowM.RedmineApi.NotificationManager) Then
|
||||||
|
AddHandler Map.refMainWindowVM.MainWindowM.RedmineApi.NotificationManager.OnNotification, AddressOf NotificationManager_OnNotification
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
@@ -580,7 +611,7 @@ Public Class MainMenuVM
|
|||||||
ProjFileMList = DbControllers.m_ProjController.GetByProdAsc(ProjectManagerVM.CurrProd.nProdId)
|
ProjFileMList = DbControllers.m_ProjController.GetByProdAsc(ProjectManagerVM.CurrProd.nProdId)
|
||||||
Map.refProdManagerVM.SetCurrProj(ProjFileMList(0).nProjId)
|
Map.refProdManagerVM.SetCurrProj(ProjFileMList(0).nProjId)
|
||||||
End If
|
End If
|
||||||
Dim sExportFileName = ProjectManagerVM.CurrProd.nProdId.ToString("0000") & " - " & ProjectManagerVM.CurrProj.sBTLFileName & " - ProjectExport"
|
Dim sExportFileName = ProjectManagerVM.CurrProd.nProdId.ToString("0000") & " - ProjectExport"
|
||||||
Dim sExpZipToCreate = Map.refProdManagerVM.ExportProject(sExportFileName)
|
Dim sExpZipToCreate = Map.refProdManagerVM.ExportProject(sExportFileName)
|
||||||
' Creo zip file da allegare
|
' Creo zip file da allegare
|
||||||
Dim sZipToCreate As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"
|
Dim sZipToCreate As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"
|
||||||
@@ -633,28 +664,30 @@ Public Class MainMenuVM
|
|||||||
Catch ex1 As Exception
|
Catch ex1 As Exception
|
||||||
EgtOutLog("Exception in zip: " & ex1.ToString())
|
EgtOutLog("Exception in zip: " & ex1.ToString())
|
||||||
End Try
|
End Try
|
||||||
' preparo la mail per il supporto
|
' creo ticket
|
||||||
Dim bEx As Boolean = False
|
Map.refMainWindowVM.MainWindowM.RedmineApi?.OpenNewTicket(New List(Of String)({Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"}))
|
||||||
Try
|
'' preparo la mail per il supporto
|
||||||
Dim sAddressArray As String() = sSupportAddress.Split(CType(",", Char()))
|
'Dim bEx As Boolean = False
|
||||||
Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("Aedifica Feedback - " & sKey)
|
'Try
|
||||||
SendFeedbackWindow.Recipients.Add(sAddressArray(0))
|
' Dim sAddressArray As String() = sSupportAddress.Split(CType(",", Char()))
|
||||||
For index As Integer = 1 To sAddressArray.Length() - 1
|
' Dim SendFeedbackWindow As New EgtWPFLib5.MapiMailMessage("AEdifica Feedback - " & sKey)
|
||||||
SendFeedbackWindow.Recipients.Add(sAddressArray(index), EgtWPFLib5.MapiMailMessage.RecipientType.CC)
|
' SendFeedbackWindow.Recipients.Add(sAddressArray(0))
|
||||||
Next
|
' For index As Integer = 1 To sAddressArray.Length() - 1
|
||||||
If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then
|
' SendFeedbackWindow.Recipients.Add(sAddressArray(index), EgtWPFLib5.MapiMailMessage.RecipientType.CC)
|
||||||
SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip")
|
' Next
|
||||||
End If
|
' If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then
|
||||||
SendFeedbackWindow.ShowDialog()
|
' SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip")
|
||||||
Catch ex As Exception
|
' End If
|
||||||
EgtOutLog("Feedback exception: " & ex.ToString)
|
' SendFeedbackWindow.ShowDialog()
|
||||||
bEx = True
|
'Catch ex As Exception
|
||||||
End Try
|
' EgtOutLog("Feedback exception: " & ex.ToString)
|
||||||
If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
|
' bEx = True
|
||||||
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(30512), sSupportAddress, sZipToCreate), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Information)
|
'End Try
|
||||||
Else
|
'If bEx OrElse EgtWPFLib5.MapiMailMessage.m_ErrorCode <> 0 Then
|
||||||
Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(30514))
|
' EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, String.Format(EgtMsg(30512), sSupportAddress, sZipToCreate), EgtMsg(15003), MessageBoxButton.OK, MessageBoxImage.Information)
|
||||||
End If
|
'Else
|
||||||
|
' Map.refMyStatusBarVM.SetOutputMessage(EgtMsg(30514))
|
||||||
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AddFileToZip(archive As ZipArchive, filePath As String, entryRoot As String)
|
Private Sub AddFileToZip(archive As ZipArchive, filePath As String, entryRoot As String)
|
||||||
@@ -688,4 +721,9 @@ Public Class MainMenuVM
|
|||||||
|
|
||||||
#End Region ' COMMANDS
|
#End Region ' COMMANDS
|
||||||
|
|
||||||
|
Private Sub NotificationManager_OnNotification(evt As NotificationEvent)
|
||||||
|
SetBadgeText(evt.Quantity)
|
||||||
|
SetBadgeVisibility(evt.Quantity > 0)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
Imports System.Threading
|
Imports System.IO
|
||||||
Imports System.Math
|
Imports System.Math
|
||||||
|
Imports System.Threading
|
||||||
|
Imports EgtBEAMWALL.Core
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports EgtBEAMWALL.Core
|
Imports EgwRedmineAPI
|
||||||
Imports System.IO
|
|
||||||
|
|
||||||
Public Class MainWindowM
|
Public Class MainWindowM
|
||||||
|
|
||||||
@@ -191,6 +192,29 @@ Public Class MainWindowM
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'Private REDMINE_URL As String = "https://redmine.egalware.com/"
|
||||||
|
'Private PROJECT_ID As String = "steamware-stockmat"
|
||||||
|
Private REDMINE_URL As String = "http://172.16.1.71/"
|
||||||
|
Private PROJECT_ID As String = "base-stong"
|
||||||
|
|
||||||
|
Private m_RedmineApi As EgwRedmineAPICore
|
||||||
|
Friend ReadOnly Property RedmineApi As EgwRedmineAPICore
|
||||||
|
Get
|
||||||
|
If IsNothing(m_RedmineApi) Then
|
||||||
|
m_RedmineApi = New EgwRedmineAPICore()
|
||||||
|
m_RedmineApi.SetGetPrivateProfileString(AddressOf EgwWPFBaseLib.GetMainPrivateProfileString)
|
||||||
|
m_RedmineApi.SetWritePrivateProfileString(AddressOf EgwWPFBaseLib.WriteMainPrivateProfileString)
|
||||||
|
m_RedmineApi.SetWinPosFromIniToWindow(AddressOf EgwWPFBaseLib.WinPosFromIniToWindow)
|
||||||
|
m_RedmineApi.SetWinPosFromWindowToIni(AddressOf EgwWPFBaseLib.WinPosFromWindowToIni)
|
||||||
|
If Not m_RedmineApi.Init(REDMINE_URL, PROJECT_ID) Then
|
||||||
|
m_RedmineApi = Nothing
|
||||||
|
MessageBox.Show("Ticketing system initialization failed!", "Error!", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return m_RedmineApi
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region ' FIELDS
|
#End Region ' FIELDS
|
||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
@@ -217,6 +241,7 @@ Public Class MainWindowM
|
|||||||
m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
|
m_sTempDir = m_sDataRoot & "\" & TEMP_DIR
|
||||||
' Impostazione path Ini file
|
' Impostazione path Ini file
|
||||||
IniFile.m_sIniFile = m_sConfigDir & "\" & Core.ConstIni.INI_FILE_NAME
|
IniFile.m_sIniFile = m_sConfigDir & "\" & Core.ConstIni.INI_FILE_NAME
|
||||||
|
EgwWPFBaseLib.SetIniFile(IniFile.m_sIniFile)
|
||||||
' Impostazione path BTL Ini File
|
' Impostazione path BTL Ini File
|
||||||
BTLIniFile.m_sBTLIniFile = m_sConfigDir & "\" & BTLFEATURES_FILE_NAME
|
BTLIniFile.m_sBTLIniFile = m_sConfigDir & "\" & BTLFEATURES_FILE_NAME
|
||||||
' Impostazione path Ini file DataGrid
|
' Impostazione path Ini file DataGrid
|
||||||
@@ -269,8 +294,8 @@ Public Class MainWindowM
|
|||||||
EgtSetLockId(sLockId)
|
EgtSetLockId(sLockId)
|
||||||
End If
|
End If
|
||||||
' Recupero livello e opzioni della chiave
|
' Recupero livello e opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(5327, 3106, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(5327, 2701, 1, m_nKeyOptions)
|
EgtGetKeyOptions(5327, 3106, 1, m_nKeyOptions)
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||||
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||||
@@ -305,6 +330,37 @@ Public Class MainWindowM
|
|||||||
End While
|
End While
|
||||||
' Leggo file messaggi
|
' Leggo file messaggi
|
||||||
Dim sMsgFilePath As String = sMsgDir & "\" & sMsgName
|
Dim sMsgFilePath As String = sMsgDir & "\" & sMsgName
|
||||||
|
' leggo messaggi automatismo
|
||||||
|
Dim sAutoMsgFilePath As String = ""
|
||||||
|
Dim sPluginName As String = ""
|
||||||
|
If GetMainPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", sAutoMsgFilePath) > 0 AndAlso Not String.IsNullOrWhiteSpace(sAutoMsgFilePath) Then
|
||||||
|
' recupero nome del file messaggi dell'automatismo
|
||||||
|
sAutoMsgFilePath &= "\Messages\" & sMsgName
|
||||||
|
If File.Exists(sAutoMsgFilePath) Then
|
||||||
|
Dim OrigMsgFile As List(Of String) = File.ReadAllLines(sMsgFilePath).ToList()
|
||||||
|
' elimino eventuali righe vuote o commento di fine
|
||||||
|
While String.IsNullOrWhiteSpace(OrigMsgFile.Last()) OrElse OrigMsgFile.Last().StartsWith("//")
|
||||||
|
OrigMsgFile.RemoveAt(OrigMsgFile.Count - 1)
|
||||||
|
End While
|
||||||
|
Dim AutoMsgFile As List(Of String) = File.ReadAllLines(sAutoMsgFilePath).ToList()
|
||||||
|
' elimino eventuale riga di inizio file
|
||||||
|
If AutoMsgFile.Count > 2 AndAlso AutoMsgFile(0).StartsWith("//") AndAlso AutoMsgFile(1).StartsWith("0") Then
|
||||||
|
AutoMsgFile.RemoveAt(0)
|
||||||
|
AutoMsgFile.RemoveAt(0)
|
||||||
|
End If
|
||||||
|
OrigMsgFile.AddRange(AutoMsgFile)
|
||||||
|
Dim sNewMsgFilePath As String = sMsgDir & "\Complete" & sMsgName
|
||||||
|
Dim bNewMsgFile As Boolean = False
|
||||||
|
Try
|
||||||
|
File.WriteAllLines(sNewMsgFilePath, OrigMsgFile)
|
||||||
|
bNewMsgFile = True
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
If bNewMsgFile Then
|
||||||
|
sMsgFilePath = sNewMsgFilePath
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
If Not EgtLoadMessages(sMsgFilePath) Then
|
If Not EgtLoadMessages(sMsgFilePath) Then
|
||||||
EgtOutLog("Error in EgtLoadMessages")
|
EgtOutLog("Error in EgtLoadMessages")
|
||||||
End If
|
End If
|
||||||
@@ -337,6 +393,18 @@ Public Class MainWindowM
|
|||||||
Core.Configuration.SetModifySetup(m_bMachConfig)
|
Core.Configuration.SetModifySetup(m_bMachConfig)
|
||||||
' Info su opzioni chiave
|
' Info su opzioni chiave
|
||||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
|
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
|
||||||
|
' inizializzo ambiente Redmine
|
||||||
|
m_RedmineApi = New EgwRedmineAPICore()
|
||||||
|
m_RedmineApi.SetGetPrivateProfileString(AddressOf EgwWPFBaseLib.GetMainPrivateProfileString)
|
||||||
|
m_RedmineApi.SetWritePrivateProfileString(AddressOf EgwWPFBaseLib.WriteMainPrivateProfileString)
|
||||||
|
m_RedmineApi.SetGetPrivateProfileInt(AddressOf EgwWPFBaseLib.GetMainPrivateProfileInt)
|
||||||
|
m_RedmineApi.SetWinPosFromIniToWindow(AddressOf EgwWPFBaseLib.WinPosFromIniToWindow)
|
||||||
|
m_RedmineApi.SetWinPosFromWindowToIni(AddressOf EgwWPFBaseLib.WinPosFromWindowToIni)
|
||||||
|
If Not m_RedmineApi.Init(REDMINE_URL, PROJECT_ID) Then
|
||||||
|
m_RedmineApi = Nothing
|
||||||
|
MessageBox.Show("Ticketing system initialization failed!", "Error!", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ManageInstance()
|
Private Sub ManageInstance()
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</TabControl.ItemContainerStyle>
|
</TabControl.ItemContainerStyle>
|
||||||
<TabItem>
|
<TabItem>
|
||||||
<OPTIMIZER:ProjectV DataContext="{StaticResource ProjectVM}"/>
|
<OPTIMIZER:ProjectV x:Name="ProjectView" DataContext="{StaticResource ProjectVM}"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem>
|
<TabItem>
|
||||||
<OPTIMIZER:ConfigurationPageV DataContext="{DynamicResource ConfigurationPageVM}"/>
|
<OPTIMIZER:ConfigurationPageV DataContext="{DynamicResource ConfigurationPageVM}"/>
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ Public Class MainWindowV
|
|||||||
e.Cancel = True
|
e.Cancel = True
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
If Map.refProjectVM.bCalcRunning Then
|
||||||
|
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(63047), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
|
e.Cancel = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
||||||
e.Cancel = True
|
e.Cancel = True
|
||||||
Return
|
Return
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ Public Class MainWindowVM
|
|||||||
' recupero secondo parametro
|
' recupero secondo parametro
|
||||||
Dim sProdId As String = Environment.GetCommandLineArgs(2)
|
Dim sProdId As String = Environment.GetCommandLineArgs(2)
|
||||||
If Not Integer.TryParse(sProdId, nProdId) OrElse nProdId <= 0 Then Return False
|
If Not Integer.TryParse(sProdId, nProdId) OrElse nProdId <= 0 Then Return False
|
||||||
nPage = Pages.MACHINING
|
nPage = Pages.OPTIMIZERPAGE
|
||||||
Return True
|
Return True
|
||||||
Case 2 ' apri pagina specifica senza progetto specifico
|
Case 2 ' apri pagina specifica senza progetto specifico
|
||||||
' recupero secondo parametro
|
' recupero secondo parametro
|
||||||
@@ -384,9 +384,12 @@ Public Class MainWindowVM
|
|||||||
' Gestisco eventuale file corrente modificato
|
' Gestisco eventuale file corrente modificato
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
Select Case Map.refMainMenuVM.SelPage
|
Select Case Map.refMainMenuVM.SelPage
|
||||||
|
Case Pages.CONFIGPROGRAM
|
||||||
|
bOk = Map.refConfigurationPageVM.SaveConfigPage()
|
||||||
Case Pages.CONFIG
|
Case Pages.CONFIG
|
||||||
' Verifica modifica parametri Macchina e chiedo il salvataggio
|
If Map.refStrategyManagerVM.bIsModifyStrategy Then
|
||||||
Map.refConfigurationPageVM.VerifyConfigPageModification()
|
bOk = Map.refStrategyManagerVM.SaveCustomConfigJson()
|
||||||
|
End If
|
||||||
Case Pages.OPTIMIZERPAGE
|
Case Pages.OPTIMIZERPAGE
|
||||||
bOk = ProdFileVM.VerifyProjectModification(ProjectManagerVM.CurrProd) <> MessageBoxResult.Cancel
|
bOk = ProdFileVM.VerifyProjectModification(ProjectManagerVM.CurrProd) <> MessageBoxResult.Cancel
|
||||||
End Select
|
End Select
|
||||||
@@ -427,6 +430,10 @@ Public Class MainWindowVM
|
|||||||
{S_FEATUREINPARTINRAWPARTLIST, Map.refFeatureInPartInRawPartListVM.FeatureInPartInRawPartColumns},
|
{S_FEATUREINPARTINRAWPARTLIST, Map.refFeatureInPartInRawPartListVM.FeatureInPartInRawPartColumns},
|
||||||
{S_PARAMETERLIST_P, Map.refPParameterListVM.PParameterListColumns}}
|
{S_PARAMETERLIST_P, Map.refPParameterListVM.PParameterListColumns}}
|
||||||
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, DataGridColumnDictionary)
|
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, DataGridColumnDictionary)
|
||||||
|
Map.refPartListVM.Close()
|
||||||
|
Map.refRawPartListVM.Close()
|
||||||
|
Map.refFeatureInPartInRawPartListVM.Close()
|
||||||
|
Map.refPParameterListVM.Close()
|
||||||
End If
|
End If
|
||||||
' Termino il Model
|
' Termino il Model
|
||||||
m_MainWindowM.Close()
|
m_MainWindowM.Close()
|
||||||
|
|||||||
@@ -67,5 +67,5 @@ Imports System.Windows
|
|||||||
' Revision
|
' Revision
|
||||||
'
|
'
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("3.1.5.2")>
|
<Assembly: AssemblyVersion("3.1.7.2")>
|
||||||
<Assembly: AssemblyFileVersion("3.1.5.2")>
|
<Assembly: AssemblyFileVersion("3.1.7.2")>
|
||||||
|
|||||||
@@ -16,8 +16,7 @@
|
|||||||
Style="{StaticResource Bottom_WrapPanel}">
|
Style="{StaticResource Bottom_WrapPanel}">
|
||||||
<OPTIMIZER:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
<OPTIMIZER:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||||
<OPTIMIZER:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
<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}"/>
|
<OPTIMIZER:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<OPTIMIZER:LeftPanelV DataContext="{StaticResource LeftPanelVM}"
|
<OPTIMIZER:LeftPanelV DataContext="{StaticResource LeftPanelVM}"
|
||||||
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"
|
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}}}"
|
IsEnabled="{Binding DataContext.LeftPanel_IsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"
|
||||||
Opacity="{Binding DataContext.LeftPanel_Opacity, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"/>
|
Opacity="{Binding DataContext.LeftPanel_Opacity, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"/>
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
Style="{StaticResource Optimizer_Border}"
|
Style="{StaticResource Optimizer_Border}"
|
||||||
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"/>
|
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"/>
|
||||||
<OPTIMIZER:FeatureInPartInRawPartListV DataContext="{StaticResource FeatureInPartInRawPartListVM}" Margin="5"
|
<OPTIMIZER:FeatureInPartInRawPartListV DataContext="{StaticResource FeatureInPartInRawPartListVM}" Margin="5"
|
||||||
Tag="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.SelPart, 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}}}"/>
|
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"/>
|
||||||
<StackPanel Grid.Column="1"
|
<StackPanel Grid.Column="1"
|
||||||
Style="{StaticResource Message_StackPanel}">
|
Style="{StaticResource Message_StackPanel}">
|
||||||
<TextBlock Text="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"
|
<TextBlock Text="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
If Not IsNothing(Map.refProjectVM.SelStrategySetup) AndAlso Map.refProjectVM.SelStrategySetup.Equals(SelStrategy.Content) Then
|
If Not IsNothing(Map.refProjectVM.SelStrategySetup) AndAlso Map.refProjectVM.SelStrategySetup.Equals(SelStrategy.Content) Then
|
||||||
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
|
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
|
||||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||||
|
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||||
Map.refProjectVM.CustomGeneralParameters(SelStrategy.Content)
|
Map.refProjectVM.CustomGeneralParameters(SelStrategy.Content)
|
||||||
Map.refProjectVM.SelStrategySetup = SelStrategy.Content
|
Map.refProjectVM.SelStrategySetup = SelStrategy.Content
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -11,8 +11,7 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border Style="{StaticResource TopPanel_Border}">
|
<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>
|
</Border>
|
||||||
|
|
||||||
<OPTIMIZER:CalcPanelV Grid.Column="1"
|
<OPTIMIZER:CalcPanelV Grid.Column="1"
|
||||||
|
|||||||
@@ -25,68 +25,57 @@
|
|||||||
<TextBlock Text="{Binding NAM_MSG}"
|
<TextBlock Text="{Binding NAM_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sNAM, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sNAM, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding COUNT_MSG}"
|
<TextBlock Text="{Binding COUNT_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sCNT, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sCNT, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding ORDERNUM_MSG}"
|
<TextBlock Text="{Binding ORDERNUM_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.nORDERNUM, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.nORDERNUM, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding PLANINGLEN_MSG}"
|
<TextBlock Text="{Binding PLANINGLEN_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.dPLANINGLEN, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.dPLANINGLEN, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding STARTOFFSET_MSG}"
|
<TextBlock Text="{Binding STARTOFFSET_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.dSTARTOFFSET, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.dSTARTOFFSET, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding ENDOFFSET_MSG}"
|
<TextBlock Text="{Binding ENDOFFSET_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.dENDOFFSET, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.dENDOFFSET, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding DESIGN_MSG}"
|
<TextBlock Text="{Binding DESIGN_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sDESIGN, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sDESIGN, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding GROUP_MSG}"
|
<TextBlock Text="{Binding GROUP_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sGROUP, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sGROUP, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding STOREY_MSG}"
|
<TextBlock Text="{Binding STOREY_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sSTOREY, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sSTOREY, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding ANNOT_MSG}"
|
<TextBlock Text="{Binding ANNOT_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sANNOT, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sANNOT, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding MATERIAL_MSG}"
|
<TextBlock Text="{Binding MATERIAL_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sMATERIAL, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sMATERIAL, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
@@ -114,8 +103,7 @@
|
|||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Text="{Binding Tag.nCOLA, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.nCOLA, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@@ -126,38 +114,32 @@
|
|||||||
<TextBlock Text="{Binding TIMBERGRADE_MSG}"
|
<TextBlock Text="{Binding TIMBERGRADE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sTIMBERGRADE, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sTIMBERGRADE, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding QUALITYGRADE_MSG}"
|
<TextBlock Text="{Binding QUALITYGRADE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sQUALITYGRADE, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sQUALITYGRADE, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding PACKAGE_MSG}"
|
<TextBlock Text="{Binding PACKAGE_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sPACKAGE, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sPACKAGE, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding ASSEMBLYNUM_MSG}"
|
<TextBlock Text="{Binding ASSEMBLYNUM_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sASSEMBLYNUM, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sASSEMBLYNUM, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding ELEMENTNUM_MSG}"
|
<TextBlock Text="{Binding ELEMENTNUM_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sELEMENTNUM, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sELEMENTNUM, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding MODULENUM_MSG}"
|
<TextBlock Text="{Binding MODULENUM_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sMODULENUM, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sMODULENUM, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
|
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
@@ -192,14 +174,12 @@
|
|||||||
<TextBlock Text="{Binding LAYER_MSG}"
|
<TextBlock Text="{Binding LAYER_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.nLAYER, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.nLAYER, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Text="{Binding COMMENT_MSG}"
|
<TextBlock Text="{Binding COMMENT_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.sCOMMENT, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sCOMMENT, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
@@ -275,8 +255,7 @@
|
|||||||
<TextBlock Text="{Binding GRAINDIRECTION_MSG}"
|
<TextBlock Text="{Binding GRAINDIRECTION_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||||
Text="{Binding Tag.GrainDirection, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.GrainDirection, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Grid.Row="1"
|
<TextBlock Grid.Row="1"
|
||||||
Text="{Binding GRAINDIRALIGN_MSG}"
|
Text="{Binding GRAINDIRALIGN_MSG}"
|
||||||
@@ -317,8 +296,7 @@
|
|||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Text="{Binding Tag.CamberParams, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.CamberParams, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@@ -350,8 +328,7 @@
|
|||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Text="{Binding Tag.PartOffsetParams, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.PartOffsetParams, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@@ -383,8 +360,7 @@
|
|||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Text="{Binding Tag.sMATERIALTYPESPEC, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.sMATERIALTYPESPEC, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@@ -455,24 +431,21 @@
|
|||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Text="{Binding Tag.TransfOrig, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.TransfOrig, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Grid.Row="2"
|
<TextBlock Grid.Row="2"
|
||||||
Text="{Binding TRANSFVERSX_MSG}"
|
Text="{Binding TRANSFVERSX_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Row="2"
|
<EgtWPFLib5:EgtTextBox Grid.Row="2"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Text="{Binding Tag.TransfVersX, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.TransfVersX, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
<TextBlock Grid.Row="3"
|
<TextBlock Grid.Row="3"
|
||||||
Text="{Binding TRANSFVERSY_MSG}"
|
Text="{Binding TRANSFVERSY_MSG}"
|
||||||
Style="{StaticResource PartParam_TextBlock}"/>
|
Style="{StaticResource PartParam_TextBlock}"/>
|
||||||
<EgtWPFLib5:EgtTextBox Grid.Row="3"
|
<EgtWPFLib5:EgtTextBox Grid.Row="3"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Text="{Binding Tag.TransfVersY, UpdateSourceTrigger=Explicit,
|
Text="{Binding CurrPart.TransfVersY, UpdateSourceTrigger=LostFocus}"
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
|
||||||
Style="{StaticResource PartParam_TextBox}"/>
|
Style="{StaticResource PartParam_TextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|||||||
@@ -14,4 +14,5 @@
|
|||||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_PartParametersWndVM.m_CloseWindow
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_PartParametersWndVM.m_CloseWindow
|
||||||
Me.DialogResult = bDialogResult
|
Me.DialogResult = bDialogResult
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -8,6 +8,13 @@ Public Class PartParametersWndVM
|
|||||||
|
|
||||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
|
Private m_CurrPart As BTLPartVM
|
||||||
|
Public ReadOnly Property CurrPart As BTLPartVM
|
||||||
|
Get
|
||||||
|
Return m_CurrPart
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdOk As ICommand
|
Private m_cmdOk As ICommand
|
||||||
|
|
||||||
@@ -271,8 +278,8 @@ Public Class PartParametersWndVM
|
|||||||
|
|
||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
Sub New()
|
Sub New(CurrPart As BTLPartVM)
|
||||||
|
m_CurrPart = CurrPart
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CONSTRUCTOR
|
#End Region ' CONSTRUCTOR
|
||||||
|
|||||||
@@ -1,49 +1,38 @@
|
|||||||
<Popup x:Class="RawPartListPopUpV"
|
<dxb:PopupMenu x:Class="RawPartListPopUpV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||||
Style="{StaticResource Filter_PopUp}">
|
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||||
<Border Style="{StaticResource BTLPartManager_Border}">
|
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||||
<StackPanel Style="{StaticResource BTLPartManager_StackPanel}">
|
xmlns:dxt="http://schemas.devexpress.com/winfx/2008/xaml/core/themekeys"
|
||||||
<!--COPY - Copia-->
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
<Button Command="{Binding CopyRawPart_Command}"
|
Background="{StaticResource Border.BTLPartManager.Background}"
|
||||||
ToolTip="{Binding CopyRawPart_ToolTip}"
|
BorderBrush="{StaticResource Border.BTLPartManager.Border}"
|
||||||
Click="ClosePopUp_Click"
|
BorderThickness="2"
|
||||||
Style="{StaticResource LP_Button}">
|
CornerRadius="5"
|
||||||
<Image Source="{StaticResource CopyRawPart_Image}"
|
Margin="0"
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
Padding="0">
|
||||||
</Button>
|
|
||||||
<!--DELETE - Elimina-->
|
<dxb:BarItemMenuHeader ShowContentHeader="False"
|
||||||
<Button Command="{Binding RemoveRawPart_Command}"
|
ItemsOrientation="Horizontal"
|
||||||
ToolTip="{Binding RemoveRawPart_ToolTip}"
|
Margin="0"
|
||||||
Click="ClosePopUp_Click"
|
Padding="0">
|
||||||
Style="{StaticResource LP_Button}">
|
<dxb:BarButtonItem Command="{Binding CopyRawPart_Command}"
|
||||||
<Image Source="{StaticResource Remove_Image}"
|
ToolTip="{Binding CopyRawPart_ToolTip}"
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
Glyph="{StaticResource CopyRawPart_Image}"
|
||||||
</Button>
|
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||||
<!--CAM - CAM-->
|
<dxb:BarButtonItem Command="{Binding RemoveRawPart_Command}"
|
||||||
<Button ToolTip="{Binding Simulate_ToolTip}"
|
ToolTip="{Binding RemoveRawPart_ToolTip}"
|
||||||
Command="{Binding Simulate_Command}"
|
Glyph="{StaticResource Remove_Image}"
|
||||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||||
<Image Source="{StaticResource Simulate_Image}"
|
<dxb:BarButtonItem Command="{Binding ReOrderPart_Command}"
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
ToolTip="{Binding ReOrderPart_ToolTip}"
|
||||||
</Button>
|
Glyph="{StaticResource ReOrderPart_Image}"
|
||||||
<!--REORDER - Riordina-->
|
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||||
<Button Command="{Binding ReOrderPart_Command}"
|
<dxb:BarButtonItem Command="{Binding ResetCalc_Command}"
|
||||||
ToolTip="{Binding ReOrderPart_ToolTip}"
|
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||||
Click="ClosePopUp_Click"
|
Glyph="{StaticResource ResetCalc_Image}"
|
||||||
Style="{StaticResource LP_Button}">
|
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||||
<Image Source="{StaticResource ReOrderPart_Image}"
|
</dxb:BarItemMenuHeader>
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
|
||||||
</Button>
|
</dxb:PopupMenu>
|
||||||
<!--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>
|
|
||||||
|
|||||||
@@ -1,14 +1,3 @@
|
|||||||
Public Class RawPartListPopUpV
|
Public Class RawPartListPopUpV
|
||||||
|
|
||||||
Private Sub ClosePopUp_Click(sender As Object, e As RoutedEventArgs)
|
|
||||||
Dim Button As Button = DirectCast(sender, Button)
|
|
||||||
Dim StackPanel As StackPanel = DirectCast(Button.Parent, StackPanel)
|
|
||||||
Dim Border As Border = DirectCast(StackPanel.Parent, Border)
|
|
||||||
Dim Popup As Primitives.Popup = DirectCast(Border.Parent, Primitives.Popup)
|
|
||||||
|
|
||||||
If Not IsNothing(Popup) Then
|
|
||||||
Popup.IsOpen = False
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ Imports System.IO.Compression
|
|||||||
Imports System.Windows.Threading
|
Imports System.Windows.Threading
|
||||||
Imports EgtBEAMWALL.Core
|
Imports EgtBEAMWALL.Core
|
||||||
Imports EgtBEAMWALL.DataLayer.DatabaseModels
|
Imports EgtBEAMWALL.DataLayer.DatabaseModels
|
||||||
Imports EgtBEAMWALL.Optimizer.MainMenuVM
|
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib5
|
Imports EgtWPFLib5
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
@@ -485,6 +484,8 @@ Public Class ProdManagerVM
|
|||||||
Map.refMyStatusBarVM.RefreshMachName()
|
Map.refMyStatusBarVM.RefreshMachName()
|
||||||
' Aggiorno titolo
|
' Aggiorno titolo
|
||||||
Map.refMainWindowVM.UpdateTitle()
|
Map.refMainWindowVM.UpdateTitle()
|
||||||
|
' Abilito scelta macchina
|
||||||
|
Map.refCALCPanelVM.SetChooseMachine_IsEnabled(True)
|
||||||
' Aggiungo a ButtonBuildingList i BTL
|
' Aggiungo a ButtonBuildingList i BTL
|
||||||
Map.refSceneBuildingVM.ButtonBuildingList.Clear()
|
Map.refSceneBuildingVM.ButtonBuildingList.Clear()
|
||||||
If m_nListProjAsseBase.Count > 0 Then
|
If m_nListProjAsseBase.Count > 0 Then
|
||||||
@@ -851,12 +852,13 @@ Public Class ProdManagerVM
|
|||||||
GeneralParametersWndVM.SetbSaveGeneralParameters(True)
|
GeneralParametersWndVM.SetbSaveGeneralParameters(True)
|
||||||
GeneralParametersWndVM.SaveProjectParameters()
|
GeneralParametersWndVM.SaveProjectParameters()
|
||||||
|
|
||||||
m_BTLDataWnd = New BTLDataWndVM()
|
' leggo struttura BTL per liste
|
||||||
|
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
|
||||||
|
|
||||||
|
m_BTLDataWnd = New BTLDataWndVM(Map.refProjectVM.BTLStructureVM)
|
||||||
m_BTLDataWnd.Read(nType)
|
m_BTLDataWnd.Read(nType)
|
||||||
m_BTLDataWnd.SaveInfoBTL(nType)
|
m_BTLDataWnd.SaveInfoBTL(nType)
|
||||||
|
|
||||||
' leggo struttura BTL per liste
|
|
||||||
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
|
|
||||||
CopyBuilding()
|
CopyBuilding()
|
||||||
Dim sProjFileName As String = sProjDir & "\" & nProjId.ToString("0000") & ".nge"
|
Dim sProjFileName As String = sProjDir & "\" & nProjId.ToString("0000") & ".nge"
|
||||||
Dim bFirstPart As Boolean = EgtGetFirstPart() <> GDB_ID.NULL
|
Dim bFirstPart As Boolean = EgtGetFirstPart() <> GDB_ID.NULL
|
||||||
@@ -890,8 +892,6 @@ Public Class ProdManagerVM
|
|||||||
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(nProjId)
|
Dim TempProj As ProjFileM = DbControllers.m_ProjController.FindByProjIdConv(nProjId)
|
||||||
Map.refSceneBuildingVM.ButtonBuildingList.Add(New ButtonBuildingItem(nProjId, m_nListProjAsseBase(nProjId), TempProj.sBTLFileName))
|
Map.refSceneBuildingVM.ButtonBuildingList.Add(New ButtonBuildingItem(nProjId, m_nListProjAsseBase(nProjId), TempProj.sBTLFileName))
|
||||||
'LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 3, EgtMsg(63006), 70, 100) ' Loading graphics
|
'LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 3, EgtMsg(63006), 70, 100) ' Loading graphics
|
||||||
' mostro tutti i pezzi
|
|
||||||
Map.refShowBeamPanelVM.ShowAll(True)
|
|
||||||
'LoadingWndHelper.CloseLoadingWnd(ActiveIds.IMPORTBTL)
|
'LoadingWndHelper.CloseLoadingWnd(ActiveIds.IMPORTBTL)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
@@ -993,6 +993,15 @@ Public Class ProdManagerVM
|
|||||||
|
|
||||||
' Apro finestra parametri generali
|
' Apro finestra parametri generali
|
||||||
Dim GeneralParametersWndVM As New GeneralParametersWndVM(nType)
|
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.SetbSaveGeneralParameters(True)
|
||||||
GeneralParametersWndVM.SaveProjectParameters()
|
GeneralParametersWndVM.SaveProjectParameters()
|
||||||
|
|
||||||
@@ -1112,7 +1121,7 @@ Public Class ProdManagerVM
|
|||||||
' imposto progetto corrente
|
' imposto progetto corrente
|
||||||
Dim OldProd As ProdFileVM = ProjectManagerVM.CurrProd
|
Dim OldProd As ProdFileVM = ProjectManagerVM.CurrProd
|
||||||
ProjectManagerVM.CurrProd = TempCurrProd
|
ProjectManagerVM.CurrProd = TempCurrProd
|
||||||
m_BTLDataWnd = New BTLDataWndVM()
|
m_BTLDataWnd = New BTLDataWndVM(Map.refProjectVM.BTLStructureVM)
|
||||||
DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
|
||||||
' recupero indice di modifica progetto quando caricato
|
' recupero indice di modifica progetto quando caricato
|
||||||
Dim CommIndex As Integer = -1
|
Dim CommIndex As Integer = -1
|
||||||
@@ -1191,6 +1200,8 @@ Public Class ProdManagerVM
|
|||||||
Map.refMyStatusBarVM.RefreshMachName()
|
Map.refMyStatusBarVM.RefreshMachName()
|
||||||
' Controllo se ci sono strategie modificate nei pezzi e mostro l'immagine della penna
|
' Controllo se ci sono strategie modificate nei pezzi e mostro l'immagine della penna
|
||||||
ModifyStrategyInfo(Map.refProjectVM.BTLStructureVM.BTLPartVMList)
|
ModifyStrategyInfo(Map.refProjectVM.BTLStructureVM.BTLPartVMList)
|
||||||
|
' Abilito scelta macchina
|
||||||
|
Map.refCALCPanelVM.SetChooseMachine_IsEnabled(True)
|
||||||
' Aggiungo a ButtonBuildingList i BTL
|
' Aggiungo a ButtonBuildingList i BTL
|
||||||
Map.refSceneBuildingVM.ButtonBuildingList.Clear()
|
Map.refSceneBuildingVM.ButtonBuildingList.Clear()
|
||||||
If m_nListProjAsseBase.Count > 0 Then
|
If m_nListProjAsseBase.Count > 0 Then
|
||||||
@@ -1319,7 +1330,7 @@ Public Class ProdManagerVM
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub OpenProjectFromSupervisor(ProjIdToOpen As Integer)
|
Public Sub OpenProjectFromSupervisor(ProjIdToOpen As Integer)
|
||||||
If Not IsNothing(ProjectManagerVM.CurrProd) Then
|
If (Not IsNothing(ProjectManagerVM.CurrProd) AndAlso ProjIdToOpen <> ProjectManagerVM.CurrProd.nProdId) OrElse Map.refMainMenuVM.SelPage <> Pages.OPTIMIZERPAGE Then
|
||||||
m_nProjIdToOpen = ProjIdToOpen
|
m_nProjIdToOpen = ProjIdToOpen
|
||||||
m_bOpenProj = True
|
m_bOpenProj = True
|
||||||
End If
|
End If
|
||||||
@@ -1357,7 +1368,9 @@ Public Class ProdManagerVM
|
|||||||
While nPartLayerId <> GDB_ID.NULL
|
While nPartLayerId <> GDB_ID.NULL
|
||||||
Dim nNewId As Integer = EgtCopyEx(Map.refSceneHostVM.MainScene.GetCtx(), nPartLayerId, Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx(), nRef)
|
Dim nNewId As Integer = EgtCopyEx(Map.refSceneHostVM.MainScene.GetCtx(), nPartLayerId, Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx(), nRef)
|
||||||
' Salvo le info dei pezzi per associarli in modo corretto
|
' Salvo le info dei pezzi per associarli in modo corretto
|
||||||
Map.refSceneShowBuldingVM.MapInfo.Add(nPartLayerId, nNewId)
|
If nNewId > 0 AndAlso Not Map.refSceneShowBuldingVM.MapInfo.ContainsKey(nPartLayerId) Then
|
||||||
|
Map.refSceneShowBuldingVM.MapInfo.Add(nPartLayerId, nNewId)
|
||||||
|
End If
|
||||||
nPartLayerId = EgtGetNextPart(nPartLayerId)
|
nPartLayerId = EgtGetNextPart(nPartLayerId)
|
||||||
End While
|
End While
|
||||||
|
|
||||||
@@ -1370,14 +1383,17 @@ Public Class ProdManagerVM
|
|||||||
While nIdF <> GDB_ID.NULL
|
While nIdF <> GDB_ID.NULL
|
||||||
Dim Sou As Integer = 0
|
Dim Sou As Integer = 0
|
||||||
EgtGetInfo(nIdF, "!SOU", Sou)
|
EgtGetInfo(nIdF, "!SOU", Sou)
|
||||||
EgtSetInfo(nIdF, "!SOU", Map.refSceneShowBuldingVM.MapInfo(Sou))
|
If EgtGetInfo(nIdF, "!SOU", Sou) AndAlso Map.refSceneShowBuldingVM.MapInfo.ContainsKey(Sou) Then
|
||||||
|
EgtSetInfo(nIdF, "!SOU", Map.refSceneShowBuldingVM.MapInfo(Sou))
|
||||||
|
End If
|
||||||
nIdF = EgtGetNext(nIdF)
|
nIdF = EgtGetNext(nIdF)
|
||||||
End While
|
End While
|
||||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(nListAsseBase(IdAsseBase), True)
|
Map.refProjectVM.BTLStructureVM.ShowBuilding(nListAsseBase(IdAsseBase), True)
|
||||||
If IdAsseBase > 0 Then EgtSetStatus(nListAsseBase(IdAsseBase), GDB_ST.OFF)
|
If IdAsseBase > 0 Then EgtSetStatus(nListAsseBase(IdAsseBase), GDB_ST.OFF)
|
||||||
Dim nProj As Integer = 0
|
Dim nProj As Integer = 0
|
||||||
EgtGetInfo(nListAsseBase(IdAsseBase), PROJ, nProj)
|
If EgtGetInfo(nListAsseBase(IdAsseBase), PROJ, nProj) AndAlso Not m_nListProjAsseBase.ContainsKey(nProj) Then
|
||||||
m_nListProjAsseBase.Add(nProj, nListAsseBase(IdAsseBase))
|
m_nListProjAsseBase.Add(nProj, nListAsseBase(IdAsseBase))
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
@@ -2061,8 +2077,6 @@ Public Class ProdManagerVM
|
|||||||
Next
|
Next
|
||||||
Map.refProjectVM.SetOptimizePanel_Visibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
Map.refProjectVM.SetOptimizePanel_Visibility(Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL AndAlso Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.NESTING_AUTO))
|
||||||
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 3, EgtMsg(63006), 70, 100) ' Loading graphics
|
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 3, EgtMsg(63006), 70, 100) ' Loading graphics
|
||||||
' mostro tutti i pezzi
|
|
||||||
Map.refShowBeamPanelVM.ShowAll(True)
|
|
||||||
Else
|
Else
|
||||||
' elimino da Db
|
' elimino da Db
|
||||||
' CheckMe impostata come cancellazione FISICA dal DB...
|
' CheckMe impostata come cancellazione FISICA dal DB...
|
||||||
|
|||||||
@@ -60,32 +60,6 @@ Public Class ProjectVM
|
|||||||
End Property
|
End Property
|
||||||
Private m_bLockUX As Boolean = False
|
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
|
Private m_FreeContourManager_Visibility As Boolean = False
|
||||||
Public Property FreeContourManager_Visibility As Visibility
|
Public Property FreeContourManager_Visibility As Visibility
|
||||||
Get
|
Get
|
||||||
@@ -100,32 +74,6 @@ Public Class ProjectVM
|
|||||||
NotifyPropertyChanged(NameOf(FreeContourManager_Visibility))
|
NotifyPropertyChanged(NameOf(FreeContourManager_Visibility))
|
||||||
End Sub
|
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
|
Private m_LeftPanel_IsEnabled As Boolean = True
|
||||||
Public Property LeftPanel_IsEnabled As Boolean
|
Public Property LeftPanel_IsEnabled As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -254,7 +202,7 @@ Public Class ProjectVM
|
|||||||
Return m_FeatureList_Visibility
|
Return m_FeatureList_Visibility
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Sub SetFeatureListVisibility(bVisible As Boolean)
|
Friend Sub SetFeatureListVisibility(bVisible As Boolean)
|
||||||
m_FeatureList_Visibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
m_FeatureList_Visibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||||
NotifyPropertyChanged(NameOf(FeatureList_Visibility))
|
NotifyPropertyChanged(NameOf(FeatureList_Visibility))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -265,7 +213,7 @@ Public Class ProjectVM
|
|||||||
Return m_RawPartManagerVisibility
|
Return m_RawPartManagerVisibility
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Sub SetRawPartManagerVisibility(bVisible As Boolean)
|
Friend Sub SetRawPartManagerVisibility(bVisible As Boolean)
|
||||||
m_RawPartManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
m_RawPartManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||||
NotifyPropertyChanged(NameOf(RawPartManagerVisibility))
|
NotifyPropertyChanged(NameOf(RawPartManagerVisibility))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -276,7 +224,7 @@ Public Class ProjectVM
|
|||||||
Return m_StrategyManagerVisibility
|
Return m_StrategyManagerVisibility
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Sub SetStrategyManagerVisibility(bVisible As Boolean)
|
Friend Sub SetStrategyManagerVisibility(bVisible As Boolean)
|
||||||
m_StrategyManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
m_StrategyManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||||
NotifyPropertyChanged(NameOf(StrategyManagerVisibility))
|
NotifyPropertyChanged(NameOf(StrategyManagerVisibility))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -287,7 +235,7 @@ Public Class ProjectVM
|
|||||||
Return m_SceneShowBuldingVisibility
|
Return m_SceneShowBuldingVisibility
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Sub SetSceneShowBuldingVisibility(bVisible As Boolean)
|
Friend Sub SetSceneShowBuldingVisibility(bVisible As Boolean)
|
||||||
m_SceneShowBuldingVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
m_SceneShowBuldingVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||||
NotifyPropertyChanged(NameOf(SceneShowBuldingVisibility))
|
NotifyPropertyChanged(NameOf(SceneShowBuldingVisibility))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -298,7 +246,7 @@ Public Class ProjectVM
|
|||||||
Return m_ManagerTabVisibility
|
Return m_ManagerTabVisibility
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Sub SetManagerTabVisibility(bVisible As Boolean)
|
Friend Sub SetManagerTabVisibility(bVisible As Boolean)
|
||||||
m_ManagerTabVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
m_ManagerTabVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||||
NotifyPropertyChanged(NameOf(ManagerTabVisibility))
|
NotifyPropertyChanged(NameOf(ManagerTabVisibility))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -371,6 +319,7 @@ Public Class ProjectVM
|
|||||||
If Not IsNothing(value) Then
|
If Not IsNothing(value) Then
|
||||||
Map.refStrategyManagerVM.SelStrategySetup.sName = value
|
Map.refStrategyManagerVM.SelStrategySetup.sName = value
|
||||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||||
|
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||||
CustomGeneralParameters(value)
|
CustomGeneralParameters(value)
|
||||||
End If
|
End If
|
||||||
m_SelStrategySetup = value
|
m_SelStrategySetup = value
|
||||||
@@ -380,6 +329,7 @@ Public Class ProjectVM
|
|||||||
Friend Sub SetSelStrategy(value As String)
|
Friend Sub SetSelStrategy(value As String)
|
||||||
m_SelStrategySetup = value
|
m_SelStrategySetup = value
|
||||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||||
|
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||||
Map.refSceneHostVM.SaveProject()
|
Map.refSceneHostVM.SaveProject()
|
||||||
NotifyPropertyChanged(NameOf(SelStrategySetup))
|
NotifyPropertyChanged(NameOf(SelStrategySetup))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -545,17 +495,12 @@ Public Class ProjectVM
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub NotifyAllPanelVisibility()
|
|
||||||
NotifyPropertyChanged(NameOf(FeatureManager_Visibility))
|
|
||||||
NotifyPropertyChanged(NameOf(ShowBeamPanel_Visibility))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Funzione che permette di eliminare un pezzo modificato e reinserirlo nell'assemblato
|
''' Funzione che permette di eliminare un pezzo modificato e reinserirlo nell'assemblato
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Friend Sub UpdatePart(nPartId As Integer)
|
Friend Sub UpdatePart(nPartId As Integer)
|
||||||
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPROJ)
|
Dim IdAsseBase As Integer = 0
|
||||||
If IdAsseBase < 0 Then Return
|
If Not Map.refProdManagerVM.ListProjAsseBase.TryGetValue(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPROJ, IdAsseBase) Then Return
|
||||||
Dim IdPart As Integer = 0
|
Dim IdPart As Integer = 0
|
||||||
Dim NewId As Integer = 0
|
Dim NewId As Integer = 0
|
||||||
' Setto il nuovo contesto
|
' Setto il nuovo contesto
|
||||||
@@ -597,31 +542,26 @@ Public Class ProjectVM
|
|||||||
For Each GeneralParameter In m_GeneralParametersList
|
For Each GeneralParameter In m_GeneralParametersList
|
||||||
Select Case GeneralParameter.GetType()
|
Select Case GeneralParameter.GetType()
|
||||||
Case GetType(BooleanGenericParameter)
|
Case GetType(BooleanGenericParameter)
|
||||||
SetbSaveGeneralParameters(False)
|
SetGeneralParameters(False)
|
||||||
SetGeneralParametersIsEnable(False)
|
|
||||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
||||||
Case GetType(DoubleGenericParameter)
|
Case GetType(DoubleGenericParameter)
|
||||||
SetbSaveGeneralParameters(False)
|
SetGeneralParameters(False)
|
||||||
SetGeneralParametersIsEnable(False)
|
|
||||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
||||||
Case GetType(ComboGenericParameter)
|
Case GetType(ComboGenericParameter)
|
||||||
SetbSaveGeneralParameters(False)
|
SetGeneralParameters(False)
|
||||||
SetGeneralParametersIsEnable(False)
|
|
||||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
||||||
Case GetType(StringGenericParameter)
|
Case GetType(StringGenericParameter)
|
||||||
SetbSaveGeneralParameters(False)
|
SetGeneralParameters(False)
|
||||||
SetGeneralParametersIsEnable(False)
|
|
||||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge & "_FORCED")
|
||||||
Case GetType(ListGenericParameter)
|
Case GetType(ListGenericParameter)
|
||||||
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
|
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
|
||||||
If Item.bIsActive Then
|
If Item.bIsActive Then
|
||||||
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
||||||
SetbSaveGeneralParameters(False)
|
SetGeneralParameters(False)
|
||||||
SetGeneralParametersIsEnable(False)
|
|
||||||
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
EgtRemoveInfo(PartItem.nPartId, GeneralParameter.sNameNge)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -957,11 +897,12 @@ Public Class ProjectVM
|
|||||||
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
|
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
#Region "COMMAND"
|
#Region "COMMAND"
|
||||||
|
|
||||||
#Region "Ottimization"
|
#Region "Optimizer_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Optimizer_Command As ICommand
|
Public ReadOnly Property Optimizer_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -977,9 +918,9 @@ Public Class ProjectVM
|
|||||||
StatisticWndV.ShowDialog()
|
StatisticWndV.ShowDialog()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Ottimization
|
#End Region ' Optimizer_Command
|
||||||
|
|
||||||
#Region "Parameter"
|
#Region "Parameter_Command"
|
||||||
|
|
||||||
Public ReadOnly Property Parameter_Command As ICommand
|
Public ReadOnly Property Parameter_Command As ICommand
|
||||||
Get
|
Get
|
||||||
@@ -991,11 +932,11 @@ Public Class ProjectVM
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Friend Sub Parameter()
|
Friend Sub Parameter()
|
||||||
Dim PartParametersWnd As New PartParametersWndV(Application.Current.MainWindow, New PartParametersWndVM())
|
Dim PartParametersWnd As New PartParametersWndV(Application.Current.MainWindow, New PartParametersWndVM(m_BTLStructureVM.SelBTLPart))
|
||||||
PartParametersWnd.ShowDialog()
|
PartParametersWnd.ShowDialog()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Parameter
|
#End Region ' Parameter_Command
|
||||||
|
|
||||||
#Region "Back_Command"
|
#Region "Back_Command"
|
||||||
|
|
||||||
@@ -1010,7 +951,11 @@ Public Class ProjectVM
|
|||||||
|
|
||||||
Public Sub Back()
|
Public Sub Back()
|
||||||
SetRawPartManagerVisibility(True)
|
SetRawPartManagerVisibility(True)
|
||||||
If Not IsNothing(m_MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
|
If Not IsNothing(m_MachGroupPanelVM) AndAlso Not IsNothing(m_MachGroupPanelVM.SelectedMachGroup) AndAlso Not IsNothing(m_MachGroupPanelVM.SelectedMachGroup.SelPart) Then
|
||||||
|
Map.refProjectVM.SetFeatureListVisibility(True)
|
||||||
|
Else
|
||||||
|
Map.refProjectVM.SetFeatureListVisibility(False)
|
||||||
|
End If
|
||||||
SetStrategyManagerVisibility(False)
|
SetStrategyManagerVisibility(False)
|
||||||
SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
|
SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
|
||||||
SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
|
SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ Public Class RawPartManagerVM
|
|||||||
Next
|
Next
|
||||||
' seleziono primo pezzo
|
' seleziono primo pezzo
|
||||||
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
|
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
|
||||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
|
Map.refProjectVM.BTLStructureVM.SelectBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
|
||||||
@@ -259,10 +259,6 @@ Public Class RawPartManagerVM
|
|||||||
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
|
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then Map.refMachGroupPanelVM.SelectedMachGroup = Map.refMachGroupPanelVM.MachGroupVMList(0)
|
||||||
End If
|
End If
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
' se nessun grezzo, rimetto tutti i pezzi invisibili
|
|
||||||
If Map.refProjectVM.MachGroupPanelVM.MachGroupVMList.Count = 0 Then
|
|
||||||
Map.refProjectVM.BTLStructureVM.HideAll(True)
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 490 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -78,14 +78,15 @@ Public Class MySceneHostVM
|
|||||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
' 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 sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
|
||||||
Dim sTitle As String = EgtMsg(10101)
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
Core.EgtMessageBoxV.Show(Nothing, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||||
' Altrimenti manca la licenza
|
' Altrimenti manca la licenza
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Problems with Licence")
|
EgtOutLog("Problems with Licence")
|
||||||
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||||
Dim sText As String = EgtMsg(10105) & vbCrLf & EgtMsg(10106)
|
Dim sKeyInfo As String = "" : EgtGetKeyInfo(sKeyInfo)
|
||||||
|
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(10105) & vbCrLf & EgtMsg(10106)
|
||||||
Dim sTitle As String = EgtMsg(10101)
|
Dim sTitle As String = EgtMsg(10101)
|
||||||
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
If Core.EgtMessageBoxV.Show(Nothing, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||||
' Apro dialogo per richiesta file licenza
|
' Apro dialogo per richiesta file licenza
|
||||||
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||||
.Title = EgtMsg(110026),
|
.Title = EgtMsg(110026),
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ Public Class SceneShowBuldingVM
|
|||||||
' Ritorno al contesto corrente
|
' Ritorno al contesto corrente
|
||||||
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(BTLPartVM, True)
|
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(BTLPartVM, True)
|
||||||
Map.refProjectVM.BTLStructureVM.SelectBTLPartScene(BTLPartVM, True)
|
|
||||||
' Setto il nuovo contesto
|
' Setto il nuovo contesto
|
||||||
EgtSetCurrentContext(SceneShowBulding.GetCtx())
|
EgtSetCurrentContext(SceneShowBulding.GetCtx())
|
||||||
EgtSetStatus(nOrigPartId, GDB_ST.SEL)
|
EgtSetStatus(nOrigPartId, GDB_ST.SEL)
|
||||||
|
|||||||
@@ -3,14 +3,6 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Style="{StaticResource BTLPartManager_StackPanel}">
|
Style="{StaticResource BTLPartManager_StackPanel}">
|
||||||
|
|
||||||
<Button Command="{Binding ShowAll_Command}"
|
|
||||||
IsEnabled="{Binding ShowAll_IsEnabled}"
|
|
||||||
ToolTip="{Binding ShowAll_ToolTip}"
|
|
||||||
Visibility="{Binding ShowAll_Visibility}"
|
|
||||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
|
||||||
<Image Source="{StaticResource ShowAll_Image}"
|
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
|
||||||
</Button>
|
|
||||||
<ToggleButton IsChecked="{Binding ShowSolid_IsChecked}"
|
<ToggleButton IsChecked="{Binding ShowSolid_IsChecked}"
|
||||||
IsEnabled="{Binding ShowSolid_IsEnabled}"
|
IsEnabled="{Binding ShowSolid_IsEnabled}"
|
||||||
ToolTip="{Binding ShowSolid_ToolTip}"
|
ToolTip="{Binding ShowSolid_ToolTip}"
|
||||||
|
|||||||
@@ -61,7 +61,11 @@ Public Class ShowBeamPanelVM
|
|||||||
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
|
||||||
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
|
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
|
||||||
Map.refProjectVM.SetManagerTabVisibility(True)
|
Map.refProjectVM.SetManagerTabVisibility(True)
|
||||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(False)
|
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup) AndAlso Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart) Then
|
||||||
|
Map.refProjectVM.SetFeatureListVisibility(True)
|
||||||
|
Else
|
||||||
|
Map.refProjectVM.SetFeatureListVisibility(False)
|
||||||
|
End If
|
||||||
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
|
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(ShowBuilding_IsChecked))
|
NotifyPropertyChanged(NameOf(ShowBuilding_IsChecked))
|
||||||
@@ -162,41 +166,4 @@ Public Class ShowBeamPanelVM
|
|||||||
|
|
||||||
#End Region ' METHODS
|
#End Region ' METHODS
|
||||||
|
|
||||||
#Region "COMMANDS"
|
|
||||||
|
|
||||||
#Region "ShowAll"
|
|
||||||
|
|
||||||
Public ReadOnly Property ShowAll_Command As ICommand
|
|
||||||
Get
|
|
||||||
If m_cmdShowAll Is Nothing Then
|
|
||||||
m_cmdShowAll = New Command(AddressOf ShowAllCmd)
|
|
||||||
End If
|
|
||||||
Return m_cmdShowAll
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Sub ShowAllCmd()
|
|
||||||
ShowAll(True)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub ShowAll(bDraw As Boolean)
|
|
||||||
If IsNothing(Map.refProjectVM.BTLStructureVM) Then Return
|
|
||||||
' se necessario tolgo solido dal precedentemente selezionato
|
|
||||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso m_bShowSolid Then
|
|
||||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
|
||||||
Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
|
||||||
End If
|
|
||||||
' mostro tutti i pezzi
|
|
||||||
Map.refProjectVM.BTLStructureVM.ShowAll(False)
|
|
||||||
' deseleziono tutto
|
|
||||||
Map.refProjectVM.BTLStructureVM.SelBTLParts.Clear()
|
|
||||||
' se attivata opzione, li assemblo
|
|
||||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(ShowBuilding_IsChecked, False)
|
|
||||||
If bDraw Then EgtDraw()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region ' ShowAll
|
|
||||||
|
|
||||||
#End Region ' COMMANDS
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -2,7 +2,17 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||||
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||||
|
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||||
|
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||||
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||||
|
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||||
|
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||||
|
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||||
|
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||||
|
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||||
|
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
@@ -17,163 +27,159 @@
|
|||||||
|
|
||||||
<TabItem Header="OPTIMIZERSTATS">
|
<TabItem Header="OPTIMIZERSTATS">
|
||||||
<TabItem.Content>
|
<TabItem.Content>
|
||||||
<EgwWPFBaseLib:EgwDataGrid x:Name="dgOptimizerStatistics"
|
<dxg:GridControl x:Name="dgOptimizerStatistics_GridControl"
|
||||||
ItemsSource="{Binding Tag.MachGroupPanelVM.MachGroupVMList,
|
ItemsSource="{Binding Tag.MachGroupPanelVM.MachGroupVMList,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:OptimizerStatisticsV}}}"
|
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>
|
SelectionMode="Row">
|
||||||
|
<dxg:GridControl.View>
|
||||||
|
<dxg:TableView x:Name="dgOptimizerStatistics_TableView"
|
||||||
|
AllowPerPixelScrolling="True"
|
||||||
|
AllowEditing="False"
|
||||||
|
AllowSorting="True"
|
||||||
|
AllowGrouping="True"
|
||||||
|
AllowColumnFiltering="True"
|
||||||
|
AllowFilterEditor="False"
|
||||||
|
AllowFilterPanelNavigation="False"
|
||||||
|
ExtendScrollBarToFixedColumns="True"
|
||||||
|
Focusable="False"
|
||||||
|
GroupSummaryDisplayMode="AlignByColumns"
|
||||||
|
IsTotalSummaryMenuEnabled="False"
|
||||||
|
IsGroupFooterMenuEnabled="True"
|
||||||
|
ShowGroupPanel="False"
|
||||||
|
ShowTotalSummary="False"
|
||||||
|
ShowSearchPanelMode="Default"
|
||||||
|
ShowFilterPanelMode="Never"
|
||||||
|
ShowIndicator="False"
|
||||||
|
ShowColumnHeaders="True"
|
||||||
|
ShowHorizontalLines="True"
|
||||||
|
ShowVerticalLines="False"
|
||||||
|
ShowFocusedRectangle="True"
|
||||||
|
ShowGroupFooters="True"
|
||||||
|
ShowSearchPanelResultInfo="True"
|
||||||
|
ShowSearchPanelNavigationButtons="True"
|
||||||
|
UseEvenRowBackground="True"
|
||||||
|
|
||||||
</EgwWPFBaseLib:EgwDataGrid>
|
ShowGridMenu="OnShowGridMenu"
|
||||||
|
|
||||||
|
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||||
|
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||||
|
|
||||||
|
RowStyle="{StaticResource RowStyle}"
|
||||||
|
|
||||||
|
Style="{StaticResource TableViewStyle}"/>
|
||||||
|
</dxg:GridControl.View>
|
||||||
|
<dxg:GridColumn FieldName="Name"
|
||||||
|
SortFieldName="dName"
|
||||||
|
Header="{Binding ID_Msg}"
|
||||||
|
Fixed="Left"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="dW"
|
||||||
|
Header="{Binding W_Msg}"
|
||||||
|
Binding="{Binding dW}"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="dH"
|
||||||
|
Header="{Binding H_Msg}"
|
||||||
|
Binding="{Binding dH}"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="dL"
|
||||||
|
Header="{Binding L_Msg}"
|
||||||
|
Binding="{Binding dL}"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sMATERIAL"
|
||||||
|
Header="{Binding MAT_Msg}"
|
||||||
|
Binding="{Binding sMATERIAL}"
|
||||||
|
AllowSorting="False"
|
||||||
|
FilterPopupMode="Custom"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sUsage"
|
||||||
|
SortFieldName="dUsage"
|
||||||
|
Header="{Binding Used_Msg}"
|
||||||
|
Binding="{Binding sUsage}"
|
||||||
|
AllowColumnFiltering="False"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sWaste"
|
||||||
|
SortFieldName="dWaste"
|
||||||
|
Header="{Binding Waste_Msg}"
|
||||||
|
Binding="{Binding sWaste}"
|
||||||
|
AllowColumnFiltering="False"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sUnitTime"
|
||||||
|
Header="{Binding UNIT_TIME_Msg}"
|
||||||
|
Binding="{Binding sUnitTime}"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
</dxg:GridControl>
|
||||||
</TabItem.Content>
|
</TabItem.Content>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Header="RAWPARTSTAT">
|
<TabItem Header="RAWPARTSTAT">
|
||||||
<TabItem.Content>
|
<TabItem.Content>
|
||||||
<EgwWPFBaseLib:EgwDataGrid x:Name="dgRawPartStatistics"
|
<dxg:GridControl x:Name="dgRawPartStatistics_GridControl"
|
||||||
ItemsSource="{Binding RawPartList}"
|
ItemsSource="{Binding RawPartList}"
|
||||||
CanUserAddRows="False"
|
|
||||||
AutoGenerateColumns="False"
|
SelectionMode="Row">
|
||||||
CanUserResizeRows="False"
|
<dxg:GridControl.View>
|
||||||
SelectionMode="Extended"
|
<dxg:TableView x:Name="dgRawPartStatistics_TableView"
|
||||||
ScrollViewer.CanContentScroll="True"
|
AllowPerPixelScrolling="True"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
AllowEditing="False"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
AllowSorting="True"
|
||||||
Margin="0,0,0,5"
|
AllowGrouping="True"
|
||||||
ColumnLayouts="{Binding RawPartStatisticsColumns}"
|
AllowColumnFiltering="True"
|
||||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
AllowFilterEditor="False"
|
||||||
AlternationCount="2"
|
AllowFilterPanelNavigation="False"
|
||||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
ExtendScrollBarToFixedColumns="True"
|
||||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
Focusable="False"
|
||||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
GroupSummaryDisplayMode="AlignByColumns"
|
||||||
Style="{StaticResource Optimizer_DataGrid}">
|
IsTotalSummaryMenuEnabled="False"
|
||||||
<DataGrid.Resources>
|
IsGroupFooterMenuEnabled="True"
|
||||||
<!--W - Larghezza-->
|
ShowGroupPanel="False"
|
||||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}">
|
ShowTotalSummary="False"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
ShowSearchPanelMode="Default"
|
||||||
<DataTemplate>
|
ShowFilterPanelMode="Never"
|
||||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
ShowIndicator="False"
|
||||||
</DataTemplate>
|
ShowColumnHeaders="True"
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
ShowHorizontalLines="True"
|
||||||
</DataGridTextColumn>
|
ShowVerticalLines="False"
|
||||||
<!--H - Altezza-->
|
ShowFocusedRectangle="True"
|
||||||
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}">
|
ShowGroupFooters="True"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
ShowSearchPanelResultInfo="True"
|
||||||
<DataTemplate>
|
ShowSearchPanelNavigationButtons="True"
|
||||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
UseEvenRowBackground="True"
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
ShowGridMenu="OnShowGridMenu2"
|
||||||
</DataGridTextColumn>
|
|
||||||
<!--L - Lunghezza-->
|
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||||
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}">
|
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
|
||||||
<DataTemplate>
|
RowStyle="{StaticResource RowStyle}"
|
||||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
|
||||||
</DataTemplate>
|
Style="{StaticResource TableViewStyle}"/>
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
</dxg:GridControl.View>
|
||||||
</DataGridTextColumn>
|
<dxg:GridColumn FieldName="sW"
|
||||||
<!--MAT - Materiale-->
|
Header="{Binding W_Msg}"
|
||||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMaterial}">
|
Binding="{Binding sW}"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
<DataTemplate>
|
<dxg:GridColumn FieldName="sH"
|
||||||
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
Header="{Binding H_Msg}"
|
||||||
</DataTemplate>
|
Binding="{Binding sH}"
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
</DataGridTextColumn>
|
<dxg:GridColumn FieldName="sL"
|
||||||
<!--QTY - Quantita'-->
|
Header="{Binding L_Msg}"
|
||||||
<DataGridTextColumn x:Key="colQTY" Binding="{Binding nQuantity, Mode=TwoWay}">
|
Binding="{Binding sL}"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
<DataTemplate>
|
<dxg:GridColumn FieldName="sMaterial"
|
||||||
<TextBlock Text="{Binding Path=DataContext.QTY_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
Header="{Binding MAT_Msg}"
|
||||||
</DataTemplate>
|
Binding="{Binding sMaterial}"
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
AllowSorting="False"
|
||||||
</DataGridTextColumn>
|
FilterPopupMode="Custom"
|
||||||
</DataGrid.Resources>
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
</EgwWPFBaseLib:EgwDataGrid>
|
<dxg:GridColumn FieldName="nQuantity"
|
||||||
|
Header="{Binding QTY_Msg}"
|
||||||
|
Binding="{Binding nQuantity}"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
</dxg:GridControl>
|
||||||
</TabItem.Content>
|
</TabItem.Content>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
<Grid Grid.Row="1"
|
<Grid Grid.Row="1"
|
||||||
|
|||||||
@@ -1,10 +1,204 @@
|
|||||||
Public Class OptimizerStatisticsV
|
Imports DevExpress.Data
|
||||||
|
Imports DevExpress.Xpf.Bars
|
||||||
|
Imports DevExpress.Xpf.Core.Serialization
|
||||||
|
Imports DevExpress.Xpf.Grid
|
||||||
|
Imports EgtBEAMWALL.Core
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Public Class OptimizerStatisticsV
|
||||||
|
|
||||||
Private m_StatisticsVM As StatisticsVM
|
Private m_StatisticsVM As StatisticsVM
|
||||||
|
Private m_sOptimizerDataGridLayoutPath As String = ""
|
||||||
|
Private m_sRawPartDataGridLayoutPath As String = ""
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
|
||||||
|
' This call is required by the designer.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Add any initialization after the InitializeComponent() call.
|
||||||
|
m_sOptimizerDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\OptimizerStatistics.json"
|
||||||
|
m_sRawPartDataGridLayoutPath = 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 SaveOptimizerStatisticGridControlLayout()
|
||||||
|
dgOptimizerStatistics_GridControl.SaveLayoutToJson(m_sOptimizerDataGridLayoutPath)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub SaveRawPartStatisticGridControlLayout()
|
||||||
|
dgRawPartStatistics_GridControl.SaveLayoutToJson(m_sRawPartDataGridLayoutPath)
|
||||||
|
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 SaveOptimizerStatisticGridControlLayout
|
||||||
|
m_StatisticsVM.refSaveStatisticGridControlLayout = AddressOf SaveRawPartStatisticGridControlLayout
|
||||||
|
' rispristino layout tabella
|
||||||
|
If Not IsNothing(m_sOptimizerDataGridLayoutPath) AndAlso File.Exists(m_sOptimizerDataGridLayoutPath) Then
|
||||||
|
dgOptimizerStatistics_GridControl.RestoreLayoutFromJson(m_sOptimizerDataGridLayoutPath)
|
||||||
|
End If
|
||||||
|
If Not IsNothing(m_sRawPartDataGridLayoutPath) AndAlso File.Exists(m_sRawPartDataGridLayoutPath) Then
|
||||||
|
dgRawPartStatistics_GridControl.RestoreLayoutFromJson(m_sRawPartDataGridLayoutPath)
|
||||||
|
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
|
Private Sub PrintBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyToClipboardBtn.Click
|
||||||
m_StatisticsVM = Me.DataContext()
|
m_StatisticsVM = Me.DataContext()
|
||||||
CopyToClipboard(dgOptimizerStatistics, dgRawPartStatistics, m_StatisticsVM)
|
'CopyToClipboard(dgOptimizerStatistics, dgRawPartStatistics, m_StatisticsVM)
|
||||||
|
If Map.refStatisticsVM.bRawPart_IsChecked Then
|
||||||
|
dgRawPartStatistics_GridControl.CopyToClipboard()
|
||||||
|
Else
|
||||||
|
dgOptimizerStatistics_GridControl.CopyToClipboard()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||||
|
If e.MenuType = GridMenuType.Column Then
|
||||||
|
' rimozione bottoni
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||||
|
|
||||||
|
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||||
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
|
' aggiunta separatore
|
||||||
|
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||||
|
e.Customizations.Add(separator)
|
||||||
|
' aggiunta bottone AllowResize e Auto Fit
|
||||||
|
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (dgOptimizerStatistics_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||||
|
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||||
|
e.Customizations.Add(AllowResize)
|
||||||
|
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||||
|
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||||
|
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||||
|
e.Customizations.Add(FixAuto)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' gestore evento Allow Resize
|
||||||
|
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||||
|
Dim info As GridColumnMenuInfo = TryCast(dgOptimizerStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||||
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
|
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||||
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||||
|
Else
|
||||||
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' gestore evento Auto Fit
|
||||||
|
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||||
|
Dim info As GridColumnMenuInfo = TryCast(dgOptimizerStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||||
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
|
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||||
|
dgOptimizerStatistics_TableView.UpdateLayout()
|
||||||
|
item.Width = item.ActualWidth
|
||||||
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnShowGridMenu2(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||||
|
If e.MenuType = GridMenuType.Column Then
|
||||||
|
' rimozione bottoni
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||||
|
|
||||||
|
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||||
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
|
' aggiunta separatore
|
||||||
|
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||||
|
e.Customizations.Add(separator)
|
||||||
|
' aggiunta bottone AllowResize e Auto Fit
|
||||||
|
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (dgRawPartStatistics_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||||
|
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged2
|
||||||
|
e.Customizations.Add(AllowResize)
|
||||||
|
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||||
|
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||||
|
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick2
|
||||||
|
e.Customizations.Add(FixAuto)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' gestore evento Allow Resize
|
||||||
|
Private Sub AllowResize_CheckedChanged2(sender As Object, e As ItemClickEventArgs)
|
||||||
|
Dim info As GridColumnMenuInfo = TryCast(dgRawPartStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||||
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
|
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||||
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||||
|
Else
|
||||||
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' gestore evento Auto Fit
|
||||||
|
Private Sub FixAuto_ItemClick2(sender As Object, e As ItemClickEventArgs)
|
||||||
|
Dim info As GridColumnMenuInfo = TryCast(dgRawPartStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||||
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
|
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||||
|
dgRawPartStatistics_TableView.UpdateLayout()
|
||||||
|
item.Width = item.ActualWidth
|
||||||
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<Grid x:Class="PDFEditorV"
|
<Grid x:Class="PDFEditorV"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
|
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||||
|
xmlns:dxpdf="http://schemas.devexpress.com/winfx/2008/xaml/pdf">
|
||||||
|
|
||||||
<Grid.Resources>
|
<Grid.Resources>
|
||||||
<OPTIMIZER:ColumnNameConverter x:Key="ColumnNameConverter"/>
|
<OPTIMIZER:ColumnNameConverter x:Key="ColumnNameConverter"/>
|
||||||
@@ -89,6 +91,8 @@
|
|||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Style="{StaticResource PDFEditor_StackPanel}">
|
<StackPanel Style="{StaticResource PDFEditor_StackPanel}">
|
||||||
<CheckBox IsChecked="{Binding IsVisible}"
|
<CheckBox IsChecked="{Binding IsVisible}"
|
||||||
|
Checked="CheckBox_Checked"
|
||||||
|
Unchecked="CheckBox_Checked"
|
||||||
Style="{StaticResource Option_CheckBox}"/>
|
Style="{StaticResource Option_CheckBox}"/>
|
||||||
<TextBlock Text="{Binding Key, Converter={StaticResource ColumnNameConverter}}"
|
<TextBlock Text="{Binding Key, Converter={StaticResource ColumnNameConverter}}"
|
||||||
Style="{StaticResource Option_TextBlock}"/>
|
Style="{StaticResource Option_TextBlock}"/>
|
||||||
@@ -147,6 +151,42 @@
|
|||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
<OPTIMIZER:PdfViewer PdfPath="{Binding WebAddress}"
|
<OPTIMIZER:PdfViewer PdfPath="{Binding WebAddress}"
|
||||||
Visibility="{Binding PdfViewer_Visibility}"/>
|
Visibility="{Binding PdfViewer_Visibility}"/>
|
||||||
|
<!--<AdornerDecorator>
|
||||||
|
<dxpdf:PdfViewerControl x:Name="PDFViewer"
|
||||||
|
CommandBarStyle="None"
|
||||||
|
Visibility="{Binding PdfViewer_Visibility}">
|
||||||
|
<dxpdf:PdfViewerControl.CommandProvider>
|
||||||
|
<dxpdf:PdfCommandProvider>
|
||||||
|
<dxpdf:PdfCommandProvider.RibbonActions>
|
||||||
|
<dxb:RemoveAction ContainerName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.ContextMenu}"/>
|
||||||
|
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.HandTool}"/>
|
||||||
|
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.SelectAll}"/>
|
||||||
|
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.SelectTool}"/>
|
||||||
|
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.MarqueeZoom}"/>
|
||||||
|
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.ClockwiseRotate}"/>
|
||||||
|
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.FindContext}"/>
|
||||||
|
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.PrintContext}"/>
|
||||||
|
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.Properties}"/>
|
||||||
|
<dxb:UpdateAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.Ribbon}"
|
||||||
|
PropertyName="ShowApplicationButton"
|
||||||
|
Value="False"/>
|
||||||
|
</dxpdf:PdfCommandProvider.RibbonActions>
|
||||||
|
</dxpdf:PdfCommandProvider>
|
||||||
|
</dxpdf:PdfViewerControl.CommandProvider>
|
||||||
|
<dxpdf:PdfViewerControl.ThumbnailsViewerSettings>
|
||||||
|
<dxpdf:PdfThumbnailsViewerSettings HideThumbnailsViewer="True"/>
|
||||||
|
</dxpdf:PdfViewerControl.ThumbnailsViewerSettings>
|
||||||
|
<dxpdf:PdfViewerControl.AttachmentsViewerSettings>
|
||||||
|
<dxpdf:PdfAttachmentsViewerSettings HideAttachmentsViewer="True"/>
|
||||||
|
</dxpdf:PdfViewerControl.AttachmentsViewerSettings>
|
||||||
|
<dxpdf:PdfViewerControl.CommentViewerSettings>
|
||||||
|
<dxpdf:PdfCommentViewerSettings HideCommentViewer="True"/>
|
||||||
|
</dxpdf:PdfViewerControl.CommentViewerSettings>
|
||||||
|
<dxpdf:PdfViewerControl.OutlinesViewerSettings>
|
||||||
|
<dxpdf:PdfOutlinesViewerSettings HideOutlinesViewer="True"/>
|
||||||
|
</dxpdf:PdfViewerControl.OutlinesViewerSettings>
|
||||||
|
</dxpdf:PdfViewerControl>
|
||||||
|
</AdornerDecorator>-->
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
Public Class PDFEditorV
|
Imports EgtWPFLib5
|
||||||
|
Imports EgtBEAMWALL.Core
|
||||||
|
|
||||||
|
Public Class PDFEditorV
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
|
|
||||||
@@ -9,4 +12,12 @@
|
|||||||
DataContext = New PDFEditorVM()
|
DataContext = New PDFEditorVM()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CheckBox_Checked(sender As Object, e As RoutedEventArgs)
|
||||||
|
Dim CheckBox As CheckBox = DirectCast(sender, CheckBox)
|
||||||
|
If IsNothing(CheckBox) Then Return
|
||||||
|
Dim ColumnLayout As EgwWPFBaseLib.ColumnLayout = DirectCast(CheckBox.DataContext, EgwWPFBaseLib.ColumnLayout)
|
||||||
|
If IsNothing(ColumnLayout) Then Return
|
||||||
|
WriteMainPrivateProfileString(S_PDFEDITOR, ColumnLayout.Key, If(ColumnLayout.IsVisible, 1, 0))
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ Public Class PDFEditorVM
|
|||||||
m_nViewButton = value
|
m_nViewButton = value
|
||||||
NotifyPropertyChanged(NameOf(nViewButton))
|
NotifyPropertyChanged(NameOf(nViewButton))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Definizione comandi
|
' Definizione comandi
|
||||||
Private m_cmdCreatePDFPreviewVis As ICommand
|
Private m_cmdCreatePDFPreviewVis As ICommand
|
||||||
Private m_cmdCreatePDFPreviewOtt As ICommand
|
Private m_cmdCreatePDFPreviewOtt As ICommand
|
||||||
@@ -124,6 +125,7 @@ Public Class PDFEditorVM
|
|||||||
SetPdfViewer_Visibility(True)
|
SetPdfViewer_Visibility(True)
|
||||||
Configuration.CreatePrintPDF(PDFPage.VIEW, True)
|
Configuration.CreatePrintPDF(PDFPage.VIEW, True)
|
||||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
||||||
|
'MapV.refPDFEditorV.PDFViewer.OpenDocument(WebAddress)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -158,7 +160,8 @@ Public Class PDFEditorVM
|
|||||||
Case VIEW_BUTTON.PDF
|
Case VIEW_BUTTON.PDF
|
||||||
SetPdfViewer_Visibility(True)
|
SetPdfViewer_Visibility(True)
|
||||||
Configuration.CreatePrintPDF(PDFPage.MACHING, True)
|
Configuration.CreatePrintPDF(PDFPage.MACHING, True)
|
||||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf")
|
||||||
|
'MapV.refPDFEditorV.PDFViewer.OpenDocument(WebAddress)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -181,6 +184,7 @@ Public Class PDFEditorVM
|
|||||||
Public Sub ClosePreview()
|
Public Sub ClosePreview()
|
||||||
Try
|
Try
|
||||||
File.Delete(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
File.Delete(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
||||||
|
File.Delete(Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf")
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
EgtOutLog("Errore! Cancellazione dei file pdf fallita")
|
EgtOutLog("Errore! Cancellazione dei file pdf fallita")
|
||||||
End Try
|
End Try
|
||||||
@@ -195,7 +199,7 @@ Public Class PDFEditorVM
|
|||||||
SetWebAddress("")
|
SetWebAddress("")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region ' CreatePreviewVis
|
#End Region ' ClosePreview
|
||||||
|
|
||||||
#End Region ' Commands
|
#End Region ' Commands
|
||||||
|
|
||||||
|
|||||||
@@ -384,7 +384,6 @@ Module PDFHelper
|
|||||||
Dim paragraph As Paragraph = section.AddParagraph(EgtMsg(62590), "Heading2")
|
Dim paragraph As Paragraph = section.AddParagraph(EgtMsg(62590), "Heading2")
|
||||||
paragraph.Format.SpaceAfter = Unit.FromMillimeter(3.0)
|
paragraph.Format.SpaceAfter = Unit.FromMillimeter(3.0)
|
||||||
|
|
||||||
' Controllo se bPreview è true mostra il PDF di preview se no il PDF completo
|
|
||||||
If bPreview Then
|
If bPreview Then
|
||||||
CreateRawPartPage(section, sMachGroupList, sPDN, sW, sH, sL, sDesc, sMaterial, Nothing, bPreview)
|
CreateRawPartPage(section, sMachGroupList, sPDN, sW, sH, sL, sDesc, sMaterial, Nothing, bPreview)
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -2,147 +2,125 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||||
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||||
|
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||||
|
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||||
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||||
|
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||||
|
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||||
|
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||||
|
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||||
|
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||||
|
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<EgwWPFBaseLib:EgwDataGrid x:Name="dgStatistics"
|
<dxg:GridControl x:Name="dgStatistics_GridControl"
|
||||||
ItemsSource="{Binding Tag.BTLPartVMList,
|
ItemsSource="{Binding Tag.BTLPartVMList,
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:StatisticsV}}}"
|
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:StatisticsV}}}"
|
||||||
CanUserAddRows="False"
|
SelectionMode="Row">
|
||||||
AutoGenerateColumns="False"
|
<dxg:GridControl.View>
|
||||||
CanUserResizeRows="False"
|
<dxg:TableView x:Name="dgStatistics_TableView"
|
||||||
SelectionMode="Extended"
|
AllowPerPixelScrolling="True"
|
||||||
ScrollViewer.CanContentScroll="True"
|
AllowEditing="False"
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
AllowSorting="True"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
AllowGrouping="True"
|
||||||
Margin="0,0,0,5"
|
AllowColumnFiltering="True"
|
||||||
ColumnLayouts="{Binding StatisticsColumns}"
|
AllowFilterEditor="False"
|
||||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
AllowFilterPanelNavigation="False"
|
||||||
AlternationCount="2"
|
ExtendScrollBarToFixedColumns="True"
|
||||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
Focusable="False"
|
||||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
GroupSummaryDisplayMode="AlignByColumns"
|
||||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
IsTotalSummaryMenuEnabled="False"
|
||||||
Style="{StaticResource Optimizer_DataGrid}">
|
IsGroupFooterMenuEnabled="True"
|
||||||
<DataGrid.Resources>
|
ShowGroupPanel="False"
|
||||||
<!--PDN - Nome-->
|
ShowTotalSummary="False"
|
||||||
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}">
|
ShowSearchPanelMode="Default"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
ShowFilterPanelMode="Never"
|
||||||
<DataTemplate>
|
ShowIndicator="False"
|
||||||
<TextBlock Text="{Binding Path=DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
ShowColumnHeaders="True"
|
||||||
</DataTemplate>
|
ShowHorizontalLines="True"
|
||||||
</DataGridTextColumn.HeaderTemplate>
|
ShowVerticalLines="False"
|
||||||
</DataGridTextColumn>
|
ShowFocusedRectangle="True"
|
||||||
<!--W - Larghezza-->
|
ShowGroupFooters="True"
|
||||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}" SortMemberPath="dW">
|
ShowSearchPanelResultInfo="True"
|
||||||
<DataGridTextColumn.HeaderTemplate>
|
ShowSearchPanelNavigationButtons="True"
|
||||||
<DataTemplate>
|
UseEvenRowBackground="True"
|
||||||
<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>
|
ShowGridMenu="OnShowGridMenu"
|
||||||
|
|
||||||
</EgwWPFBaseLib:EgwDataGrid>
|
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||||
|
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||||
|
|
||||||
|
RowStyle="{StaticResource RowStyle}"
|
||||||
|
|
||||||
|
Style="{StaticResource TableViewStyle}"/>
|
||||||
|
</dxg:GridControl.View>
|
||||||
|
<dxg:GridColumn FieldName="nPDN"
|
||||||
|
Header="{Binding PDN_Msg}"
|
||||||
|
Fixed="Left"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sW"
|
||||||
|
SortFieldName="dW"
|
||||||
|
Header="{Binding W_Msg}"
|
||||||
|
AllowColumnFiltering="False"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sH"
|
||||||
|
SortFieldName="dH"
|
||||||
|
Header="{Binding H_Msg}"
|
||||||
|
AllowColumnFiltering="False"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sL"
|
||||||
|
SortFieldName="dL"
|
||||||
|
Header="{Binding L_Msg}"
|
||||||
|
AllowColumnFiltering="False"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sNAM"
|
||||||
|
Header="{Binding NAM_Msg}"
|
||||||
|
AllowSorting="False"
|
||||||
|
FilterPopupMode="CheckedList"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sMATERIAL"
|
||||||
|
Header="{Binding MAT_Msg}"
|
||||||
|
AllowSorting="False"
|
||||||
|
FilterPopupMode="Custom"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sCNT"
|
||||||
|
Header="{Binding CNT_Msg}"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sADDED"
|
||||||
|
Header="{Binding ADDED_Msg}"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="nINPROD"
|
||||||
|
Header="{Binding INPROD_Msg}"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="nDONE"
|
||||||
|
Header="{Binding DONE_Msg}"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sUnitVolume"
|
||||||
|
SortFieldName="dUnitVolume"
|
||||||
|
Header="{Binding UNIT_VOLUME_Msg}"
|
||||||
|
AllowColumnFiltering="False"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sTotVolume"
|
||||||
|
SortFieldName="dTotVolume"
|
||||||
|
Header="{Binding TOT_VOLUME_Msg}"
|
||||||
|
AllowColumnFiltering="False"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sUnitTime"
|
||||||
|
SortFieldName="dUnitTime"
|
||||||
|
Header="{Binding UNIT_TIME_Msg}"
|
||||||
|
AllowColumnFiltering="False"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
<dxg:GridColumn FieldName="sTotTime"
|
||||||
|
SortFieldName="dTotTime"
|
||||||
|
Header="{Binding TOT_TIME_Msg}"
|
||||||
|
AllowColumnFiltering="False"
|
||||||
|
Style="{StaticResource ColumnInfoStyle}"/>
|
||||||
|
</dxg:GridControl>
|
||||||
|
|
||||||
<Grid Grid.Row="1"
|
<Grid Grid.Row="1"
|
||||||
Style="{StaticResource Statistics_Grid}">
|
Style="{StaticResource Statistics_Grid}">
|
||||||
|
|||||||
@@ -1,10 +1,153 @@
|
|||||||
Public Class StatisticsV
|
Imports DevExpress.Data
|
||||||
|
Imports DevExpress.Xpf.Bars
|
||||||
|
Imports DevExpress.Xpf.Core.Serialization
|
||||||
|
Imports DevExpress.Xpf.Grid
|
||||||
|
Imports EgtBEAMWALL.Core
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Public Class StatisticsV
|
||||||
|
|
||||||
Private m_StatisticsVM As StatisticsVM
|
Private m_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
|
Private Sub PrintBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyToClipboardBtn.Click
|
||||||
m_StatisticsVM = Me.DataContext()
|
m_StatisticsVM = Me.DataContext()
|
||||||
ExportToExcelAndCsv(dgStatistics, m_StatisticsVM)
|
'ExportToExcelAndCsv(dgStatistics, m_StatisticsVM)
|
||||||
|
dgStatistics_GridControl.CopyToClipboard()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||||
|
If e.MenuType = GridMenuType.Column Then
|
||||||
|
' rimozione bottoni
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||||
|
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||||
|
|
||||||
|
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||||
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
|
' aggiunta separatore
|
||||||
|
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||||
|
e.Customizations.Add(separator)
|
||||||
|
' aggiunta bottone AllowResize e Auto Fit
|
||||||
|
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (dgStatistics_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||||
|
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||||
|
e.Customizations.Add(AllowResize)
|
||||||
|
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||||
|
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||||
|
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||||
|
e.Customizations.Add(FixAuto)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' gestore evento Allow Resize
|
||||||
|
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||||
|
Dim info As GridColumnMenuInfo = TryCast(dgStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||||
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
|
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||||
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||||
|
Else
|
||||||
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' gestore evento Auto Fit
|
||||||
|
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||||
|
Dim info As GridColumnMenuInfo = TryCast(dgStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||||
|
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||||
|
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||||
|
dgStatistics_TableView.UpdateLayout()
|
||||||
|
item.Width = item.ActualWidth
|
||||||
|
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ Public Class StatisticsVM
|
|||||||
|
|
||||||
#Region "FIELDS & PROPERTIES"
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
Public refSaveStatisticGridControlLayout As Action
|
||||||
|
|
||||||
' Evento per chiusura finestra
|
' Evento per chiusura finestra
|
||||||
Public Event m_CloseWindow(bDialogResult As Boolean)
|
Public Event m_CloseWindow(bDialogResult As Boolean)
|
||||||
|
|
||||||
@@ -395,6 +397,11 @@ Public Class StatisticsVM
|
|||||||
{S_OPTIMIZERSTATISTICS, OptimizerStatisticsColumns},
|
{S_OPTIMIZERSTATISTICS, OptimizerStatisticsColumns},
|
||||||
{S_RAWPARTSTATISTICS, RawPartStatisticsColumns}}
|
{S_RAWPARTSTATISTICS, RawPartStatisticsColumns}}
|
||||||
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, DataGridColumnDictionary)
|
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, DataGridColumnDictionary)
|
||||||
|
|
||||||
|
If Not IsNothing(refSaveStatisticGridControlLayout) Then
|
||||||
|
refSaveStatisticGridControlLayout()
|
||||||
|
End If
|
||||||
|
|
||||||
' Chiudo finestra senza fare niente
|
' Chiudo finestra senza fare niente
|
||||||
RaiseEvent m_CloseWindow(False)
|
RaiseEvent m_CloseWindow(False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
Title="StatisticWnd"
|
Title="StatisticWnd"
|
||||||
MaxHeight="600"
|
MaxHeight="600"
|
||||||
Width="1300"
|
Width="1300"
|
||||||
Style="{StaticResource OptimizerWindow.Dialog}">
|
Style="{StaticResource OptimizerWindow.Dialog}"
|
||||||
|
Closed="OptimizerWindow_Closed">
|
||||||
|
|
||||||
<TabControl Name="Statistic_TabControl"
|
<TabControl Name="Statistic_TabControl"
|
||||||
SelectedIndex="0"
|
SelectedIndex="0"
|
||||||
|
|||||||
@@ -12,15 +12,17 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Statistic_TabControl_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
Private Sub Statistic_TabControl_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
||||||
If Statistic_TabControl.SelectedIndex = 0 Then
|
Me.Tag = If(Statistic_TabControl.SelectedIndex = 0, Map.refProjectVM.BTLStructureVM, Map.refProjectVM)
|
||||||
Me.Tag = Map.refProjectVM.BTLStructureVM
|
|
||||||
Else
|
|
||||||
Me.Tag = Map.refProjectVM
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_StatisticsVM.m_CloseWindow
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_StatisticsVM.m_CloseWindow
|
||||||
Me.DialogResult = bDialogResult
|
Me.DialogResult = bDialogResult
|
||||||
End Sub
|
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
|
End Class
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
Imports EgtWPFLib5
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
|
||||||
Imports Newtonsoft.Json
|
|
||||||
Imports System.Collections.ObjectModel
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EgtBEAMWALL.Core.ConstBeam
|
Imports EgtBEAMWALL.Core.ConstBeam
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
'----------- Classe che fa riferimento alle Feature del file Json -----------
|
'----------- Classe che fa riferimento alle Feature del file Json -----------
|
||||||
Public Class JsonAvailableStrategyFeature
|
Public Class JsonAvailableStrategyFeature
|
||||||
@@ -339,6 +339,28 @@ Public Class JsonDefaultStrategyParameter
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionShortMsg As Integer
|
||||||
|
Public Property idDescriptionShortMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionShortMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionShortMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionLongMsg As Integer
|
||||||
|
Public Property idDescriptionLongMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionLongMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionLongMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_sType As String
|
Private m_sType As String
|
||||||
Public Property sType As String
|
Public Property sType As String
|
||||||
Get
|
Get
|
||||||
@@ -410,12 +432,14 @@ Public Class JsonDefaultStrategyParameter
|
|||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
<JsonConstructor>
|
<JsonConstructor>
|
||||||
Sub New(sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, sType As String, sSource As String, sSubType As String, sMessageId As String, sMinUserLevel As Integer)
|
Sub New(sName As String, sNameNge As String, sValue As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionShortMsg As Integer, idDescriptionLongMsg As Integer, sType As String, sSource As String, sSubType As String, sMessageId As String, sMinUserLevel As Integer)
|
||||||
m_sName = sName
|
m_sName = sName
|
||||||
m_sNameNge = sNameNge
|
m_sNameNge = sNameNge
|
||||||
m_sValue = sValue
|
m_sValue = sValue
|
||||||
m_sDescriptionShort = sDescriptionShort
|
m_sDescriptionShort = sDescriptionShort
|
||||||
m_sDescriptionLong = sDescriptionLong
|
m_sDescriptionLong = sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = idDescriptionLongMsg
|
||||||
m_sType = sType
|
m_sType = sType
|
||||||
m_sSource = sSource
|
m_sSource = sSource
|
||||||
m_sSubType = sSubType
|
m_sSubType = sSubType
|
||||||
@@ -442,6 +466,8 @@ Public Class JsonDefaultStrategyParameter
|
|||||||
m_sSubType = StrategyParameter.sSubType
|
m_sSubType = StrategyParameter.sSubType
|
||||||
m_sDescriptionShort = StrategyParameter.sDescriptionShort
|
m_sDescriptionShort = StrategyParameter.sDescriptionShort
|
||||||
m_sDescriptionLong = StrategyParameter.sDescriptionLong
|
m_sDescriptionLong = StrategyParameter.sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = StrategyParameter.idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = StrategyParameter.idDescriptionLongMsg
|
||||||
m_sMessageId = StrategyParameter.sMessageId
|
m_sMessageId = StrategyParameter.sMessageId
|
||||||
m_sMinUserLevel = StrategyParameter.sMinUserLevel
|
m_sMinUserLevel = StrategyParameter.sMinUserLevel
|
||||||
End Sub
|
End Sub
|
||||||
@@ -491,8 +517,18 @@ Public Class JsonDefaultStrategyParameter
|
|||||||
StrategyParameter.sName = m_sName
|
StrategyParameter.sName = m_sName
|
||||||
StrategyParameter.sNameNge = m_sNameNge
|
StrategyParameter.sNameNge = m_sNameNge
|
||||||
StrategyParameter.sSubType = m_sSubType
|
StrategyParameter.sSubType = m_sSubType
|
||||||
StrategyParameter.sDescriptionShort = m_sDescriptionShort
|
If m_idDescriptionShortMsg < 0 OrElse EgtMsg(m_idDescriptionShortMsg).StartsWith("Msg") Then
|
||||||
StrategyParameter.sDescriptionLong = m_sDescriptionLong
|
StrategyParameter.sDescriptionShort = m_sDescriptionShort
|
||||||
|
Else
|
||||||
|
StrategyParameter.sDescriptionShort = EgtMsg(m_idDescriptionShortMsg)
|
||||||
|
End If
|
||||||
|
If m_idDescriptionLongMsg < 0 OrElse EgtMsg(m_idDescriptionLongMsg).StartsWith("Msg") Then
|
||||||
|
StrategyParameter.sDescriptionLong = m_sDescriptionLong
|
||||||
|
Else
|
||||||
|
StrategyParameter.sDescriptionLong = EgtMsg(m_idDescriptionLongMsg)
|
||||||
|
End If
|
||||||
|
StrategyParameter.idDescriptionShortMsg = m_idDescriptionShortMsg
|
||||||
|
StrategyParameter.idDescriptionLongMsg = m_idDescriptionLongMsg
|
||||||
StrategyParameter.sMessageId = m_sMessageId
|
StrategyParameter.sMessageId = m_sMessageId
|
||||||
StrategyParameter.sMinUserLevel = m_sMinUserLevel
|
StrategyParameter.sMinUserLevel = m_sMinUserLevel
|
||||||
Return StrategyParameter
|
Return StrategyParameter
|
||||||
@@ -537,6 +573,28 @@ Public Class JsonDefaultComboParameter
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionShortMsg As Integer
|
||||||
|
Public Property idDescriptionShortMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionShortMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionShortMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionLongMsg As Integer
|
||||||
|
Public Property idDescriptionLongMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionLongMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionLongMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_sMessageId As String
|
Private m_sMessageId As String
|
||||||
Public Property sMessageId As String
|
Public Property sMessageId As String
|
||||||
Get
|
Get
|
||||||
@@ -551,10 +609,12 @@ Public Class JsonDefaultComboParameter
|
|||||||
#Region "CONSTRUCTOR"
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
<JsonConstructor>
|
<JsonConstructor>
|
||||||
Sub New(sValue As String, sDescriptionShort As String, sDescriptionLong As String, sMessageId As String)
|
Sub New(sValue As String, sDescriptionShort As String, sDescriptionLong As String, idDescriptionShortMsg As Integer, idDescriptionLongMsg As Integer, sMessageId As String)
|
||||||
m_sValue = sValue
|
m_sValue = sValue
|
||||||
m_sDescriptionShort = sDescriptionShort
|
m_sDescriptionShort = sDescriptionShort
|
||||||
m_sDescriptionLong = sDescriptionLong
|
m_sDescriptionLong = sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = idDescriptionLongMsg
|
||||||
m_sMessageId = sMessageId
|
m_sMessageId = sMessageId
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -562,6 +622,8 @@ Public Class JsonDefaultComboParameter
|
|||||||
m_sValue = ComboParameter.sValue
|
m_sValue = ComboParameter.sValue
|
||||||
m_sDescriptionShort = ComboParameter.sDescriptionShort
|
m_sDescriptionShort = ComboParameter.sDescriptionShort
|
||||||
m_sDescriptionLong = ComboParameter.sDescriptionLong
|
m_sDescriptionLong = ComboParameter.sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = ComboParameter.idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = ComboParameter.idDescriptionLongMsg
|
||||||
m_sMessageId = ComboParameter.sMessageId
|
m_sMessageId = ComboParameter.sMessageId
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -2,139 +2,156 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Margin="5,10,0,0">
|
Margin="5,10,0,0">
|
||||||
<ItemsControl ItemsSource="{Binding Tag.ParameterList,
|
<Grid>
|
||||||
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
<Grid.RowDefinitions>
|
||||||
Style="{StaticResource ParameterStrategy_ItemsControl}">
|
<RowDefinition Height="1*"/>
|
||||||
<ItemsControl.Resources>
|
<RowDefinition Height="Auto"/>
|
||||||
<DataTemplate DataType="{x:Type OPTIMIZER:BooleanStrategyParameter}">
|
</Grid.RowDefinitions>
|
||||||
<UniformGrid Columns="2"
|
<ItemsControl ItemsSource="{Binding Tag.ParameterList,
|
||||||
Visibility="{Binding bBooleanVisibility}"
|
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
Style="{StaticResource ParameterStrategy_ItemsControl}">
|
||||||
<TextBlock Text="{Binding sDescriptionShort}"
|
<ItemsControl.Resources>
|
||||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
<DataTemplate DataType="{x:Type OPTIMIZER:BooleanStrategyParameter}">
|
||||||
<CheckBox IsChecked="{Binding bValue, UpdateSourceTrigger=PropertyChanged}"
|
<UniformGrid Columns="2"
|
||||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
Visibility="{Binding bBooleanVisibility}"
|
||||||
</UniformGrid>
|
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||||
</DataTemplate>
|
<TextBlock Text="{Binding sDescriptionShort}"
|
||||||
<DataTemplate DataType="{x:Type OPTIMIZER:DoubleStrategyParameter}">
|
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||||
<UniformGrid Columns="2"
|
<CheckBox IsChecked="{Binding bValue, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Visibility="{Binding bDoubleVisibility}"
|
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
||||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
</UniformGrid>
|
||||||
<TextBlock Text="{Binding sDescriptionShort}"
|
</DataTemplate>
|
||||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
<DataTemplate DataType="{x:Type OPTIMIZER:DoubleStrategyParameter}">
|
||||||
<TextBox Text="{Binding sValue}"
|
<UniformGrid Columns="2"
|
||||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
Visibility="{Binding bDoubleVisibility}"
|
||||||
</UniformGrid>
|
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||||
</DataTemplate>
|
<TextBlock Text="{Binding sDescriptionShort}"
|
||||||
<DataTemplate DataType="{x:Type OPTIMIZER:ComboStrategyParameter}">
|
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||||
<UniformGrid Columns="2"
|
<!--<TextBox Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Visibility="{Binding bComboBoxVisibility}"
|
Style="{StaticResource ColorPicker_TextBox}"/>-->
|
||||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
<EgtWPFLib5:EgtTextBox2 Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
|
||||||
<TextBlock Text="{Binding sDescriptionShort}"
|
Style="{StaticResource ParameterList_TextBox2}"/>
|
||||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
</UniformGrid>
|
||||||
<ComboBox ItemsSource="{Binding ComboList}"
|
</DataTemplate>
|
||||||
SelectedItem="{Binding SelValue}"
|
<DataTemplate DataType="{x:Type OPTIMIZER:ComboStrategyParameter}">
|
||||||
DisplayMemberPath="sValue"
|
<UniformGrid Columns="2"
|
||||||
Style="{StaticResource ProjectParameters_ComboBox}">
|
Visibility="{Binding bComboBoxVisibility}"
|
||||||
</ComboBox>
|
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||||
</UniformGrid>
|
<TextBlock Text="{Binding sDescriptionShort}"
|
||||||
</DataTemplate>
|
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||||
<DataTemplate DataType="{x:Type OPTIMIZER:StringStrategyParameter}">
|
<ComboBox ItemsSource="{Binding ComboList}"
|
||||||
<UniformGrid Columns="2"
|
SelectedItem="{Binding SelValue}"
|
||||||
Visibility="{Binding bStringVisibility}"
|
DisplayMemberPath="sValue"
|
||||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
Style="{StaticResource ProjectParameters_ComboBox}">
|
||||||
<TextBlock Text="{Binding sDescriptionShort}"
|
</ComboBox>
|
||||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
</UniformGrid>
|
||||||
<TextBox Text="{Binding sValue}"
|
</DataTemplate>
|
||||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
<DataTemplate DataType="{x:Type OPTIMIZER:StringStrategyParameter}">
|
||||||
</UniformGrid>
|
<UniformGrid Columns="2"
|
||||||
</DataTemplate>
|
Visibility="{Binding bStringVisibility}"
|
||||||
<DataTemplate DataType="{x:Type OPTIMIZER:ListStrategyParameter}">
|
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||||
<Grid Visibility="{Binding bListBoxVisibility}"
|
<TextBlock Text="{Binding sDescriptionShort}"
|
||||||
Style="{StaticResource AddRawPartWnd_Grid}">
|
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||||
<Grid.RowDefinitions>
|
<TextBox Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
<RowDefinition Height="Auto"/>
|
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||||
<RowDefinition Height="Auto"/>
|
</UniformGrid>
|
||||||
</Grid.RowDefinitions>
|
</DataTemplate>
|
||||||
<Grid.ColumnDefinitions>
|
<DataTemplate DataType="{x:Type OPTIMIZER:ListStrategyParameter}">
|
||||||
<ColumnDefinition Width="1.3*"/>
|
<Grid Visibility="{Binding bListBoxVisibility}"
|
||||||
<ColumnDefinition Width="1*"/>
|
Style="{StaticResource AddRawPartWnd_Grid}">
|
||||||
</Grid.ColumnDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<TextBlock Text="{Binding sDescriptionShort}"
|
<RowDefinition Height="Auto"/>
|
||||||
Style="{StaticResource ParamStrategyDescription_TextBlock}"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<StackPanel Grid.Column="1"
|
</Grid.RowDefinitions>
|
||||||
Style="{StaticResource PartManager_StackPanel}">
|
<Grid.ColumnDefinitions>
|
||||||
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}">
|
<ColumnDefinition Width="1.3*"/>
|
||||||
<Button ToolTip="{Binding OpenToolListToolTip}"
|
<ColumnDefinition Width="1*"/>
|
||||||
IsEnabled="{Binding OpenToolListIsEnable}"
|
</Grid.ColumnDefinitions>
|
||||||
Command="{Binding OpenToolListCommand}"
|
<TextBlock Text="{Binding sDescriptionShort}"
|
||||||
Style="{StaticResource ProjectParameters_Button}">
|
Style="{StaticResource ParamStrategyDescription_TextBlock}"/>
|
||||||
<Image Source="{StaticResource Plus_Image}"
|
<StackPanel Grid.Column="1"
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
Style="{StaticResource PartManager_StackPanel}">
|
||||||
</Button>
|
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}">
|
||||||
<Button ToolTip="{Binding DeselectAllToolTip}"
|
<Button ToolTip="{Binding OpenToolListToolTip}"
|
||||||
IsEnabled="{Binding ActiveToolListIsEnable}"
|
IsEnabled="{Binding OpenToolListIsEnable}"
|
||||||
Command="{Binding DeselectAllCommand}"
|
Command="{Binding OpenToolListCommand}"
|
||||||
Style="{StaticResource CloseProjectParameters_Button}">
|
Style="{StaticResource ProjectParameters_Button}">
|
||||||
<Image Source="{StaticResource DeselectAll_Image}"
|
<Image Source="{StaticResource Plus_Image}"
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button ToolTip="{Binding DeselectAllToolTip}"
|
||||||
|
IsEnabled="{Binding ActiveToolListIsEnable}"
|
||||||
|
Command="{Binding DeselectAllCommand}"
|
||||||
|
Style="{StaticResource CloseProjectParameters_Button}">
|
||||||
|
<Image Source="{StaticResource DeselectAll_Image}"
|
||||||
|
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<Border Style="{StaticResource ForcedStrategyBTL_Border}">
|
||||||
|
<ItemsControl ItemsSource="{Binding ActiveToolList_View}"
|
||||||
|
Style="{StaticResource ProjectParameters_ItemsControl}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<StackPanel Style="{StaticResource ExpanderElemen_StackPanel}">
|
||||||
|
<CheckBox IsChecked="{Binding bIsActive, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
Style="{StaticResource FreeContourInput_CheckBox}"/>
|
||||||
|
<TextBlock Text="{Binding sName}"
|
||||||
|
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Border Style="{StaticResource ForcedStrategyBTL_Border}">
|
<StackPanel Grid.Row="1"
|
||||||
<ItemsControl ItemsSource="{Binding ActiveToolList_View}"
|
Grid.Column="1"
|
||||||
Style="{StaticResource ProjectParameters_ItemsControl}">
|
Visibility="{Binding AvailableToolListVisibility}"
|
||||||
<ItemsControl.ItemTemplate>
|
Style="{StaticResource PartManager_StackPanel}">
|
||||||
<DataTemplate>
|
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}">
|
||||||
<StackPanel Style="{StaticResource ExpanderElemen_StackPanel}">
|
<Button ToolTip="{Binding CloseToolListToolTip}"
|
||||||
<CheckBox IsChecked="{Binding bIsActive, UpdateSourceTrigger=PropertyChanged}"
|
Command="{Binding CloseToolListCommand}"
|
||||||
Style="{StaticResource FreeContourInput_CheckBox}"/>
|
Style="{StaticResource ProjectParameters_Button}">
|
||||||
<TextBlock Text="{Binding sName}"
|
<Image Source="{StaticResource Delete_Image}"
|
||||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||||
</StackPanel>
|
</Button>
|
||||||
</DataTemplate>
|
<Button ToolTip="{Binding SelectAllToolTip}"
|
||||||
</ItemsControl.ItemTemplate>
|
IsEnabled="{Binding AvailableToolListIsEnable}"
|
||||||
</ItemsControl>
|
Command="{Binding SelectAllCommand}"
|
||||||
</Border>
|
Style="{StaticResource ProjectParameters_Button}">
|
||||||
</StackPanel>
|
<Image Source="{StaticResource SelectAll_Image}"
|
||||||
<StackPanel Grid.Row="1"
|
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||||
Grid.Column="1"
|
</Button>
|
||||||
Visibility="{Binding AvailableToolListVisibility}"
|
</StackPanel>
|
||||||
Style="{StaticResource PartManager_StackPanel}">
|
<Border Style="{StaticResource ProjectParamters_Border}">
|
||||||
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}">
|
<ItemsControl ItemsSource="{Binding AvailableToolList_View}"
|
||||||
<Button ToolTip="{Binding CloseToolListToolTip}"
|
Style="{StaticResource AvailableToolList_ItemsControl}">
|
||||||
Command="{Binding CloseToolListCommand}"
|
<ItemsControl.ItemTemplate>
|
||||||
Style="{StaticResource ProjectParameters_Button}">
|
<DataTemplate>
|
||||||
<Image Source="{StaticResource Delete_Image}"
|
<StackPanel Style="{StaticResource ExpanderElemen_StackPanel}">
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
<CheckBox IsChecked="{Binding bIsActive, UpdateSourceTrigger=PropertyChanged}"
|
||||||
</Button>
|
Style="{StaticResource FreeContourInput_CheckBox}"/>
|
||||||
<Button ToolTip="{Binding SelectAllToolTip}"
|
<TextBlock Text="{Binding sName}"
|
||||||
IsEnabled="{Binding AvailableToolListIsEnable}"
|
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||||
Command="{Binding SelectAllCommand}"
|
</StackPanel>
|
||||||
Style="{StaticResource ProjectParameters_Button}">
|
</DataTemplate>
|
||||||
<Image Source="{StaticResource SelectAll_Image}"
|
</ItemsControl.ItemTemplate>
|
||||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
</ItemsControl>
|
||||||
</Button>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Border Style="{StaticResource ProjectParamters_Border}">
|
</Grid>
|
||||||
<ItemsControl ItemsSource="{Binding AvailableToolList_View}"
|
</DataTemplate>
|
||||||
Style="{StaticResource AvailableToolList_ItemsControl}">
|
</ItemsControl.Resources>
|
||||||
<ItemsControl.ItemTemplate>
|
</ItemsControl>
|
||||||
<DataTemplate>
|
<Button Grid.Row="1" VerticalAlignment="Bottom"
|
||||||
<StackPanel Style="{StaticResource ExpanderElemen_StackPanel}">
|
Command="{Binding UpdateFeatureCommand}"
|
||||||
<CheckBox IsChecked="{Binding bIsActive, UpdateSourceTrigger=PropertyChanged}"
|
Visibility="{Binding Update_Visibility}"
|
||||||
Style="{StaticResource FreeContourInput_CheckBox}"/>
|
Style="{StaticResource Update_Button}">
|
||||||
<TextBlock Text="{Binding sName}"
|
<Image Source="{StaticResource Update_Image}"
|
||||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||||
</StackPanel>
|
</Button>
|
||||||
</DataTemplate>
|
</Grid>
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.Resources>
|
|
||||||
</ItemsControl>
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -2,9 +2,13 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
|
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||||
|
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||||
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||||
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}">
|
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type TabControl}}}">
|
||||||
<Grid.Resources>
|
<Grid.Resources>
|
||||||
<OPTIMIZER:StrategyTypeToFocusableConverter x:Key="StrategyTypeToFocusableConverter"/>
|
<OPTIMIZER:StrategyTypeToFocusableConverter x:Key="StrategyTypeToFocusableConverter"/>
|
||||||
|
<!--<HierarchicalDataTemplate DataType="{x:Type OPTIMIZER:StrategyFeature}" ItemsSource="{Binding Path=TopologyList}"/>-->
|
||||||
</Grid.Resources>
|
</Grid.Resources>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
@@ -66,6 +70,30 @@
|
|||||||
|
|
||||||
<Border Grid.RowSpan="2"
|
<Border Grid.RowSpan="2"
|
||||||
Style="{StaticResource StrategyManager_Border}">
|
Style="{StaticResource StrategyManager_Border}">
|
||||||
|
|
||||||
|
<!--<dxg:TreeViewControl Name="StrategyFeature_TreeView"
|
||||||
|
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Border}}}"
|
||||||
|
ItemsSource="{Binding SelStrategySetup.StrategyFeatureList}"
|
||||||
|
SelectedItem="{Binding SelStrategySetup.SelStrategyFeature, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
AllowEditing="False"
|
||||||
|
AllowDrop="False"
|
||||||
|
AllowInitiallyFocusedRow="False"
|
||||||
|
AutoExpandAllNodes="False"
|
||||||
|
SelectionMode="Row"
|
||||||
|
ShowSearchPanel="True"
|
||||||
|
ShowBorder="False"
|
||||||
|
ShowCheckboxes="False"
|
||||||
|
ShowDragDropHint="False"
|
||||||
|
ShowLoadingPanel="False"
|
||||||
|
ShowNodeImages="False"
|
||||||
|
SortOrder="None"
|
||||||
|
TreeViewFieldName="sName"
|
||||||
|
TreeDerivationMode="HierarchicalDataTemplate"
|
||||||
|
SelectedItemChanged="StrategyFeature_TreeView_SelectedItemChanged"
|
||||||
|
CustomNodeDisplayText="StrategyFeature_TreeView_CustomNodeDisplayText"
|
||||||
|
Style="{StaticResource TreeViewControlStyle}">
|
||||||
|
</dxg:TreeViewControl>-->
|
||||||
|
|
||||||
<TreeView Name="StrategyFeature_TreeView"
|
<TreeView Name="StrategyFeature_TreeView"
|
||||||
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Border}}}"
|
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Border}}}"
|
||||||
ItemsSource="{Binding SelStrategySetup.StrategyFeatureList}"
|
ItemsSource="{Binding SelStrategySetup.StrategyFeatureList}"
|
||||||
@@ -98,7 +126,7 @@
|
|||||||
</HierarchicalDataTemplate>
|
</HierarchicalDataTemplate>
|
||||||
<DataTemplate DataType="{x:Type OPTIMIZER:Topology}">
|
<DataTemplate DataType="{x:Type OPTIMIZER:Topology}">
|
||||||
<TextBlock Text="{Binding sName}"
|
<TextBlock Text="{Binding sName}"
|
||||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
Style="{StaticResource TreeView_TextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</TreeView.Resources>
|
</TreeView.Resources>
|
||||||
<TreeView.ItemContainerStyle>
|
<TreeView.ItemContainerStyle>
|
||||||
@@ -109,6 +137,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</TreeView.ItemContainerStyle>
|
</TreeView.ItemContainerStyle>
|
||||||
</TreeView>
|
</TreeView>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<OPTIMIZER:StrategyV Grid.Column="1"
|
<OPTIMIZER:StrategyV Grid.Column="1"
|
||||||
@@ -142,7 +171,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<!--<ColumnDefinition Width="1*"/>-->
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="{Binding SelTreeItem.sName}"
|
<TextBlock Text="{Binding SelTreeItem.sName}"
|
||||||
Style="{StaticResource TreeItemName_TextBlock}"/>
|
Style="{StaticResource TreeItemName_TextBlock}"/>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
Public Class StrategyManagerV
|
Imports DevExpress.Xpf.Grid
|
||||||
|
|
||||||
|
Public Class StrategyManagerV
|
||||||
|
|
||||||
Private Sub TreeViewItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
Private Sub TreeViewItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||||
If TypeOf sender IsNot TreeViewItem Then Return
|
If TypeOf sender IsNot TreeViewItem Then Return
|
||||||
@@ -19,4 +21,21 @@
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'Private Sub StrategyFeature_TreeView_SelectedItemChanged(sender As Object, e As DevExpress.Xpf.Grid.SelectedItemChangedEventArgs)
|
||||||
|
' If TypeOf e.OldItem Is StrategyFeature Then Return
|
||||||
|
' If TypeOf e.NewItem Is StrategyFeature Then Return
|
||||||
|
' Dim OldSelectedTopologyItem As Topology = DirectCast(e.OldItem, Topology)
|
||||||
|
' Dim SelectedTopologyItem As Topology = DirectCast(e.NewItem, Topology)
|
||||||
|
' If IsNothing(SelectedTopologyItem) Then Return
|
||||||
|
' If Not IsNothing(OldSelectedTopologyItem) Then OldSelectedTopologyItem.IsSelected = False
|
||||||
|
' SelectedTopologyItem.IsSelected = True
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
'Private Sub StrategyFeature_TreeView_CustomNodeDisplayText(sender As Object, e As TreeList.TreeViewCustomNodeDisplayTextEventArgs)
|
||||||
|
' If TypeOf e.Node.Content Is Topology Then Return
|
||||||
|
' Dim SelectedStrategyFeatureItem As StrategyFeature = DirectCast(e.Node.Content, StrategyFeature)
|
||||||
|
' If IsNothing(SelectedStrategyFeatureItem) Then Return
|
||||||
|
' e.DisplayText = $"[{SelectedStrategyFeatureItem.nGrp}-{SelectedStrategyFeatureItem.nPrcDesc}] {SelectedStrategyFeatureItem.sName}"
|
||||||
|
'End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ Public Class StrategyManagerVM
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
m_SelStrategySetup.Read()
|
m_SelStrategySetup.Read()
|
||||||
End If
|
OrderStrategyList(m_SelStrategySetup.StrategyFeatureList)
|
||||||
SetSaveImage(MODIFY_IMAGE)
|
End If
|
||||||
NotifyPropertyChanged(NameOf(SelStrategySetup))
|
NotifyPropertyChanged(NameOf(SelStrategySetup))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -77,6 +77,7 @@ Public Class StrategyManagerVM
|
|||||||
' Scrivo file defaultconfig nell'ini
|
' Scrivo file defaultconfig nell'ini
|
||||||
EgtUILib.WritePrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, m_SelStrategySetup.sName, Map.refMainWindowVM.MainWindowM.sDefaultConfig)
|
EgtUILib.WritePrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, m_SelStrategySetup.sName, Map.refMainWindowVM.MainWindowM.sDefaultConfig)
|
||||||
m_SelStrategySetup.Read()
|
m_SelStrategySetup.Read()
|
||||||
|
OrderStrategyList(m_SelStrategySetup.StrategyFeatureList)
|
||||||
End If
|
End If
|
||||||
NotifyPropertyChanged(NameOf(SelStrategySetup))
|
NotifyPropertyChanged(NameOf(SelStrategySetup))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -105,6 +106,7 @@ Public Class StrategyManagerVM
|
|||||||
Item.sImage = TmpImage
|
Item.sImage = TmpImage
|
||||||
End If
|
End If
|
||||||
m_SelTreeItem = Item
|
m_SelTreeItem = Item
|
||||||
|
SetUpdate_Visibility(False)
|
||||||
NotifyPropertyChanged(NameOf(SelTreeItem))
|
NotifyPropertyChanged(NameOf(SelTreeItem))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -207,6 +209,17 @@ Public Class StrategyManagerVM
|
|||||||
NotifyPropertyChanged(NameOf(DefaultConfig_IsChecked))
|
NotifyPropertyChanged(NameOf(DefaultConfig_IsChecked))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private m_bUpdate_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public ReadOnly Property Update_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_bUpdate_Visibility
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub SetUpdate_Visibility(value As Boolean)
|
||||||
|
m_bUpdate_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
|
||||||
|
NotifyPropertyChanged(NameOf(Update_Visibility))
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "Messages"
|
#Region "Messages"
|
||||||
|
|
||||||
Public ReadOnly Property SaveToolTip As String
|
Public ReadOnly Property SaveToolTip As String
|
||||||
@@ -252,6 +265,7 @@ Public Class StrategyManagerVM
|
|||||||
Private m_cmdOk As ICommand
|
Private m_cmdOk As ICommand
|
||||||
Private m_cmdCancel As ICommand
|
Private m_cmdCancel As ICommand
|
||||||
Private m_cmdConfigurationParametersCommand As ICommand
|
Private m_cmdConfigurationParametersCommand As ICommand
|
||||||
|
Private m_cmdUpdateFeatureCommand As ICommand
|
||||||
|
|
||||||
#End Region ' Field & Properties
|
#End Region ' Field & Properties
|
||||||
|
|
||||||
@@ -271,14 +285,28 @@ Public Class StrategyManagerVM
|
|||||||
''' <summary>
|
''' <summary>
|
||||||
''' Funzione che salva il file customconfig se sono presenti modifiche
|
''' Funzione che salva il file customconfig se sono presenti modifiche
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Friend Sub SaveCustomConfigJson()
|
Friend Function SaveCustomConfigJson() As Boolean
|
||||||
' Controlla se il file JSON è stato modificato
|
' Controlla se il file JSON è stato modificato
|
||||||
If Not m_bIsModifyStrategy Then Return
|
If Not m_bIsModifyStrategy Then Return False
|
||||||
' Chiede conferma per il salvataggio
|
Map.refMyMachine.VerifyConfigPageModification()
|
||||||
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62580), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then
|
' Chiedo conferma per il salvataggio
|
||||||
m_SelStrategySetup.Write(Map.refGeneralParametersStrategyVM.GeneralParametersList, False)
|
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62580), EgtMsg(15003), MessageBoxButton.YesNoCancel, MessageBoxImage.Information)
|
||||||
End If
|
Case MessageBoxResult.Yes
|
||||||
End Sub
|
If IsNothing(Map.refGeneralParametersStrategyVM) Then
|
||||||
|
Dim GeneralParametersVM As New GeneralParametersStrategyVM()
|
||||||
|
Map.refGeneralParametersStrategyVM.GeneralParametersList = GeneralParametersVM.GeneralParametersList
|
||||||
|
End If
|
||||||
|
m_SelStrategySetup.Write(Map.refGeneralParametersStrategyVM.GeneralParametersList, False)
|
||||||
|
SetbIsModifyStrategy(False)
|
||||||
|
Return True
|
||||||
|
Case MessageBoxResult.No
|
||||||
|
Update()
|
||||||
|
Return False
|
||||||
|
Case MessageBoxResult.Cancel
|
||||||
|
Return True
|
||||||
|
End Select
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Sub Update()
|
Friend Sub Update()
|
||||||
m_StrategySetupList.Clear()
|
m_StrategySetupList.Clear()
|
||||||
@@ -328,9 +356,23 @@ Public Class StrategyManagerVM
|
|||||||
SetSelStrategySetup(DefaultConfigFile)
|
SetSelStrategySetup(DefaultConfigFile)
|
||||||
End If
|
End If
|
||||||
SetDefaultConfig_IsChecked(True)
|
SetDefaultConfig_IsChecked(True)
|
||||||
|
SetUpdate_Visibility(False)
|
||||||
|
SetbIsModifyStrategy(False)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub OrderStrategyList(StrategyFeatureList As ObservableCollection(Of StrategyFeature))
|
||||||
|
For Each StrategySetupItem As StrategyFeature In StrategyFeatureList
|
||||||
|
For Each StrategyFeatureItem As Topology In StrategySetupItem.TopologyList
|
||||||
|
Dim OrderStrategyList As List(Of Strategy) = StrategyFeatureItem.StrategyList.OrderBy(Function(s) s.nIndexInList).ToList()
|
||||||
|
StrategyFeatureItem.StrategyList.Clear()
|
||||||
|
For Each OrderStrategyItem As Strategy In OrderStrategyList
|
||||||
|
StrategyFeatureItem.StrategyList.Add(OrderStrategyItem)
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region ' Methods
|
#End Region ' Methods
|
||||||
|
|
||||||
#Region "COMMANDS"
|
#Region "COMMANDS"
|
||||||
@@ -356,6 +398,11 @@ Public Class StrategyManagerVM
|
|||||||
SetbIsModifyStrategy(True)
|
SetbIsModifyStrategy(True)
|
||||||
' Setto indice per capire che la strategia è stata spostata in ActiveStrategyList
|
' Setto indice per capire che la strategia è stata spostata in ActiveStrategyList
|
||||||
m_SelTreeItem.SelAvailableStrategy.nIndexInList = 0
|
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
|
' Aggiorno le liste
|
||||||
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||||
@@ -384,6 +431,20 @@ Public Class StrategyManagerVM
|
|||||||
SetbIsModifyStrategy(True)
|
SetbIsModifyStrategy(True)
|
||||||
' Setto indice per capire che la strategia è stata spostata in StrategyList
|
' Setto indice per capire che la strategia è stata spostata in StrategyList
|
||||||
m_SelTreeItem.SelActiveStrategy.nIndexInList = -1
|
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
|
' Aggiorno le liste
|
||||||
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||||
@@ -489,18 +550,34 @@ Public Class StrategyManagerVM
|
|||||||
Public Sub MoveUpSelectedStrategy()
|
Public Sub MoveUpSelectedStrategy()
|
||||||
' Controllo se SelectedActiveStrategy se è nullo esco
|
' Controllo se SelectedActiveStrategy se è nullo esco
|
||||||
If IsNothing(m_SelTreeItem.SelActiveStrategy) Then Return
|
If IsNothing(m_SelTreeItem.SelActiveStrategy) Then Return
|
||||||
|
' 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
|
||||||
' Recupero indice elemento selezionato in lista
|
' Recupero indice elemento selezionato in lista
|
||||||
Dim IndexActiveStrategy As Integer = m_SelTreeItem.StrategyList.IndexOf(m_SelTreeItem.SelActiveStrategy)
|
Dim IndexActiveStrategy As Integer = m_SelTreeItem.StrategyList.IndexOf(m_SelTreeItem.SelActiveStrategy)
|
||||||
' Recupero indice elemento selezionato in lista
|
' Recupero indice elemento selezionato in lista
|
||||||
Dim NewIndexActiveStrategy As Integer = IndexActiveStrategy - 1
|
Dim NewIndexActiveStrategy As Integer = IndexActiveStrategy - 1
|
||||||
|
' Setto indice per capire che la strategia è stata spostata in StrategyList
|
||||||
|
m_SelTreeItem.SelActiveStrategy.nIndexInList = NewIndexActiveStrategy
|
||||||
' Se l'indice è maggiore di 0
|
' Se l'indice è maggiore di 0
|
||||||
If IndexActiveStrategy > 0 Then
|
If IndexActiveStrategy > 0 Then
|
||||||
' Muovo l'elemento selezionato sopra di 1
|
' Muovo l'elemento selezionato sopra di 1
|
||||||
m_SelTreeItem.StrategyList.Move(IndexActiveStrategy, NewIndexActiveStrategy)
|
m_SelTreeItem.StrategyList.Move(IndexActiveStrategy, NewIndexActiveStrategy)
|
||||||
End If
|
End If
|
||||||
|
' 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
|
||||||
' Setto a true booleano per modifica
|
' Setto a true booleano per modifica
|
||||||
SetbIsModifyStrategy(True)
|
SetbIsModifyStrategy(True)
|
||||||
' Aggiorno la lista
|
' Aggiorno la lista
|
||||||
|
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -522,18 +599,34 @@ Public Class StrategyManagerVM
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Public Sub MoveDownSelectedStrategy()
|
Public Sub MoveDownSelectedStrategy()
|
||||||
If IsNothing(m_SelTreeItem.SelActiveStrategy) Then Return
|
If IsNothing(m_SelTreeItem.SelActiveStrategy) Then Return
|
||||||
|
' 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
|
||||||
' Recupero indice elemento selezionato in lista
|
' Recupero indice elemento selezionato in lista
|
||||||
Dim IndexActiveStrategy As Integer = m_SelTreeItem.StrategyList.IndexOf(m_SelTreeItem.SelActiveStrategy)
|
Dim IndexActiveStrategy As Integer = m_SelTreeItem.StrategyList.IndexOf(m_SelTreeItem.SelActiveStrategy)
|
||||||
' Recupero indice elemento selezionato in lista
|
' Recupero indice elemento selezionato in lista
|
||||||
Dim NewIndexActiveStrategy As Integer = IndexActiveStrategy + 1
|
Dim NewIndexActiveStrategy As Integer = IndexActiveStrategy + 1
|
||||||
|
' Setto indice per capire che la strategia è stata spostata in StrategyList
|
||||||
|
m_SelTreeItem.SelActiveStrategy.nIndexInList = NewIndexActiveStrategy
|
||||||
' Se l'indice è maggiore di 0
|
' Se l'indice è maggiore di 0
|
||||||
If IndexActiveStrategy >= 0 Then
|
If IndexActiveStrategy >= 0 Then
|
||||||
' Muovo l'elemento selezionato sopra di 1
|
' Muovo l'elemento selezionato sopra di 1
|
||||||
m_SelTreeItem.StrategyList.Move(IndexActiveStrategy, NewIndexActiveStrategy)
|
m_SelTreeItem.StrategyList.Move(IndexActiveStrategy, NewIndexActiveStrategy)
|
||||||
End If
|
End If
|
||||||
|
' 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
|
||||||
' Setto a true booleano per modifica
|
' Setto a true booleano per modifica
|
||||||
SetbIsModifyStrategy(True)
|
SetbIsModifyStrategy(True)
|
||||||
' Aggiorno la lista
|
' Aggiorno la lista
|
||||||
|
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -599,6 +692,68 @@ Public Class StrategyManagerVM
|
|||||||
|
|
||||||
#End Region ' ConfigurationParametersCommand
|
#End Region ' ConfigurationParametersCommand
|
||||||
|
|
||||||
|
#Region "UpdateFeatureCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property UpdateFeatureCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdUpdateFeatureCommand Is Nothing Then
|
||||||
|
m_cmdUpdateFeatureCommand = New Command(AddressOf UpdateFeature)
|
||||||
|
End If
|
||||||
|
Return m_cmdUpdateFeatureCommand
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub UpdateFeature()
|
||||||
|
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62591) & " " & m_SelTreeItem.SelParamStrategy.sStrategyName & " " & EgtMsg(62592) & " " & m_SelTreeItem.sName & " ?", EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information)
|
||||||
|
Case MessageBoxResult.Yes
|
||||||
|
For Each StrategyFeatureItem As StrategyFeature In m_SelStrategySetup.StrategyFeatureList
|
||||||
|
For Each TopologyItem As Topology In StrategyFeatureItem.TopologyList
|
||||||
|
If TopologyItem.sName = m_SelTreeItem.sName Then
|
||||||
|
For Each StrategyItem As Strategy In TopologyItem.StrategyList
|
||||||
|
Dim Strategy As Strategy = m_SelTreeItem.StrategyList.FirstOrDefault(Function(s) s.sStrategyId = StrategyItem.sStrategyId AndAlso s.sStrategyName = StrategyItem.sStrategyName)
|
||||||
|
If IsNothing(Strategy) Then Continue For
|
||||||
|
For Each ParamItem As StrategyParameter In StrategyItem.ParameterList
|
||||||
|
Dim StrategyParam As StrategyParameter = Strategy.ParameterList.FirstOrDefault(Function(p) p.sName = ParamItem.sName)
|
||||||
|
If IsNothing(StrategyParam) Then Continue For
|
||||||
|
Select Case ParamItem.GetType()
|
||||||
|
Case GetType(BooleanStrategyParameter)
|
||||||
|
Dim bValue As Boolean = DirectCast(StrategyParam, BooleanStrategyParameter).bValue
|
||||||
|
DirectCast(ParamItem, BooleanStrategyParameter).SetValue(bValue)
|
||||||
|
Case GetType(DoubleStrategyParameter)
|
||||||
|
Dim sValue As String = DirectCast(StrategyParam, DoubleStrategyParameter).sValue
|
||||||
|
DirectCast(ParamItem, DoubleStrategyParameter).SetValue(sValue)
|
||||||
|
Case GetType(ComboStrategyParameter)
|
||||||
|
Dim selValue As ComboParameter = Nothing
|
||||||
|
If IsNothing(DirectCast(StrategyParam, ComboStrategyParameter).SelValue) Then
|
||||||
|
selValue = DirectCast(ParamItem, ComboStrategyParameter).SelValue
|
||||||
|
Else
|
||||||
|
selValue = DirectCast(StrategyParam, ComboStrategyParameter).SelValue
|
||||||
|
End If
|
||||||
|
DirectCast(ParamItem, ComboStrategyParameter).SetSelValue(selValue.sValue)
|
||||||
|
Case GetType(StringStrategyParameter)
|
||||||
|
Dim sValue As String = DirectCast(StrategyParam, StringStrategyParameter).sValue
|
||||||
|
DirectCast(ParamItem, StringStrategyParameter).SetValue(sValue)
|
||||||
|
Case GetType(ListStrategyParameter)
|
||||||
|
For Each ToolParamItem In DirectCast(StrategyParam, ListStrategyParameter).ListValue
|
||||||
|
Dim NewToolParamItem As ToolParameter = DirectCast(ParamItem, ListStrategyParameter).ListValue.FirstOrDefault(Function(x) x.sName = ToolParamItem.sName)
|
||||||
|
NewToolParamItem.bIsActive = ToolParamItem.bIsActive
|
||||||
|
Next
|
||||||
|
DirectCast(ParamItem, ListStrategyParameter).SelValue = DirectCast(ParamItem, ListStrategyParameter).ListValue.FirstOrDefault(Function(x) x.bIsActive)
|
||||||
|
DirectCast(ParamItem, ListStrategyParameter).ActiveToolList_View.Refresh()
|
||||||
|
DirectCast(ParamItem, ListStrategyParameter).AvailableToolList_View.Refresh()
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
Case MessageBoxResult.No
|
||||||
|
Return
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' UpdateFeatureCommand
|
||||||
|
|
||||||
#End Region ' Commands
|
#End Region ' Commands
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -973,6 +1128,8 @@ Public Class Topology
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Strategy)
|
Set(value As Strategy)
|
||||||
m_SelParamStrategy = value
|
m_SelParamStrategy = value
|
||||||
|
' Gestisco visibilita' pulsante Update Feature
|
||||||
|
Map.refStrategyManagerVM.SetUpdate_Visibility(If(Map.refStrategyManagerVM.SelTreeItem.sName <> "Feature", True, False))
|
||||||
NotifyPropertyChanged(NameOf(SelParamStrategy))
|
NotifyPropertyChanged(NameOf(SelParamStrategy))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -990,10 +1147,7 @@ Public Class Topology
|
|||||||
m_sName = JsonTopology.sName
|
m_sName = JsonTopology.sName
|
||||||
m_sImage = JsonTopology.sImage
|
m_sImage = JsonTopology.sImage
|
||||||
m_StrategyList = New ObservableCollection(Of Strategy)(JsonTopology.StrategyList.Select(Function(jsonStrategy) New Strategy(jsonStrategy)))
|
m_StrategyList = New ObservableCollection(Of Strategy)(JsonTopology.StrategyList.Select(Function(jsonStrategy) New Strategy(jsonStrategy)))
|
||||||
m_AvailableStrategyList_View = New ListCollectionView(StrategyList)
|
CreateStrategyViews()
|
||||||
m_AvailableStrategyList_View.Filter = AddressOf AvailableStrategyFilter
|
|
||||||
m_ActiveStrategyList_View = New ListCollectionView(StrategyList)
|
|
||||||
m_ActiveStrategyList_View.Filter = AddressOf ActiveStrategyFilter
|
|
||||||
NotifyPropertyChanged(NameOf(StrategyList))
|
NotifyPropertyChanged(NameOf(StrategyList))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1012,13 +1166,16 @@ Public Class Topology
|
|||||||
Friend Sub CreateStrategyViews()
|
Friend Sub CreateStrategyViews()
|
||||||
m_AvailableStrategyList_View = New ListCollectionView(StrategyList)
|
m_AvailableStrategyList_View = New ListCollectionView(StrategyList)
|
||||||
m_AvailableStrategyList_View.Filter = AddressOf AvailableStrategyFilter
|
m_AvailableStrategyList_View.Filter = AddressOf AvailableStrategyFilter
|
||||||
|
m_AvailableStrategyList_View.SortDescriptions.Add(New SortDescription("nIndexInList", ListSortDirection.Ascending))
|
||||||
m_ActiveStrategyList_View = New ListCollectionView(StrategyList)
|
m_ActiveStrategyList_View = New ListCollectionView(StrategyList)
|
||||||
m_ActiveStrategyList_View.Filter = AddressOf ActiveStrategyFilter
|
m_ActiveStrategyList_View.Filter = AddressOf ActiveStrategyFilter
|
||||||
|
m_ActiveStrategyList_View.SortDescriptions.Add(New SortDescription("nIndexInList", ListSortDirection.Ascending))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Function Serialize() As JsonTopology
|
Friend Function Serialize() As JsonTopology
|
||||||
Dim JsonTopology As New JsonTopology(m_sName)
|
Dim JsonTopology As New JsonTopology(m_sName)
|
||||||
For Each Strategy In m_StrategyList
|
Dim mOrderStrategyList As IOrderedEnumerable(Of Strategy) = m_StrategyList.OrderBy(Function(s) s.nIndexInList)
|
||||||
|
For Each Strategy As Strategy In mOrderStrategyList
|
||||||
JsonTopology.StrategyList.Add(Strategy.Serialize())
|
JsonTopology.StrategyList.Add(Strategy.Serialize())
|
||||||
Next
|
Next
|
||||||
Return JsonTopology
|
Return JsonTopology
|
||||||
@@ -1262,6 +1419,28 @@ Public MustInherit Class StrategyParameter
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionShortMsg As Integer
|
||||||
|
Public Property idDescriptionShortMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionShortMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionShortMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionLongMsg As Integer
|
||||||
|
Public Property idDescriptionLongMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionLongMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionLongMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_sMessageId As String
|
Private m_sMessageId As String
|
||||||
Public Property sMessageId As String
|
Public Property sMessageId As String
|
||||||
Get
|
Get
|
||||||
@@ -1300,6 +1479,8 @@ Public MustInherit Class StrategyParameter
|
|||||||
m_sSubType = JsonGenericParameter.sSubType
|
m_sSubType = JsonGenericParameter.sSubType
|
||||||
m_sDescriptionShort = JsonGenericParameter.sDescriptionShort
|
m_sDescriptionShort = JsonGenericParameter.sDescriptionShort
|
||||||
m_sDescriptionLong = JsonGenericParameter.sDescriptionLong
|
m_sDescriptionLong = JsonGenericParameter.sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = JsonGenericParameter.idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = JsonGenericParameter.idDescriptionLongMsg
|
||||||
m_sMessageId = JsonGenericParameter.sMessageId
|
m_sMessageId = JsonGenericParameter.sMessageId
|
||||||
m_sMinUserLevel = JsonGenericParameter.sMinUserLevel
|
m_sMinUserLevel = JsonGenericParameter.sMinUserLevel
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1330,6 +1511,7 @@ Public Class BooleanStrategyParameter
|
|||||||
SetbIsBooleanModify(True)
|
SetbIsBooleanModify(True)
|
||||||
End If
|
End If
|
||||||
m_bValue = value
|
m_bValue = value
|
||||||
|
NotifyPropertyChanged(NameOf(bValue))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetValue(bValue As Boolean)
|
Friend Sub SetValue(bValue As Boolean)
|
||||||
@@ -1414,6 +1596,7 @@ Public Class DoubleStrategyParameter
|
|||||||
If m_dValue <> dValue Then
|
If m_dValue <> dValue Then
|
||||||
Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
|
Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
|
||||||
SetbIsDoubleModify(True)
|
SetbIsDoubleModify(True)
|
||||||
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
End If
|
End If
|
||||||
m_dValue = dValue
|
m_dValue = dValue
|
||||||
Else
|
Else
|
||||||
@@ -1510,6 +1693,7 @@ Public Class StringStrategyParameter
|
|||||||
SetbIsStringModify(True)
|
SetbIsStringModify(True)
|
||||||
End If
|
End If
|
||||||
m_sValue = value
|
m_sValue = value
|
||||||
|
NotifyPropertyChanged(NameOf(sValue))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetValue(dValue As String)
|
Friend Sub SetValue(dValue As String)
|
||||||
@@ -1603,6 +1787,7 @@ Public Class ComboStrategyParameter
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
m_SelValue = value
|
m_SelValue = value
|
||||||
|
NotifyPropertyChanged(NameOf(SelValue))
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetSelValue(sValue As String)
|
Friend Sub SetSelValue(sValue As String)
|
||||||
@@ -1927,7 +2112,7 @@ Public Class ListStrategyParameter
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Friend Sub CloseToolList()
|
Friend Sub CloseToolList()
|
||||||
SetAvailableToolListVisibility(True)
|
SetAvailableToolListVisibility(False)
|
||||||
SetOpenToolListIsEnable(True)
|
SetOpenToolListIsEnable(True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2022,6 +2207,28 @@ Public Class ComboParameter
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionShortMsg As Integer
|
||||||
|
Public Property idDescriptionShortMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionShortMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionShortMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionShortMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_idDescriptionLongMsg As Integer
|
||||||
|
Public Property idDescriptionLongMsg As Integer
|
||||||
|
Get
|
||||||
|
Return m_idDescriptionLongMsg
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_idDescriptionLongMsg = value
|
||||||
|
NotifyPropertyChanged(NameOf(idDescriptionLongMsg))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private m_sMessageId As String
|
Private m_sMessageId As String
|
||||||
Public Property sMessageId As String
|
Public Property sMessageId As String
|
||||||
Get
|
Get
|
||||||
@@ -2046,6 +2253,8 @@ Public Class ComboParameter
|
|||||||
m_sValue = JsonChoiceParameter.sValue
|
m_sValue = JsonChoiceParameter.sValue
|
||||||
m_sDescriptionShort = JsonChoiceParameter.sDescriptionShort
|
m_sDescriptionShort = JsonChoiceParameter.sDescriptionShort
|
||||||
m_sDescriptionLong = JsonChoiceParameter.sDescriptionLong
|
m_sDescriptionLong = JsonChoiceParameter.sDescriptionLong
|
||||||
|
m_idDescriptionShortMsg = JsonChoiceParameter.idDescriptionShortMsg
|
||||||
|
m_idDescriptionLongMsg = JsonChoiceParameter.idDescriptionLongMsg
|
||||||
m_sMessageId = JsonChoiceParameter.sMessageId
|
m_sMessageId = JsonChoiceParameter.sMessageId
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ Public Class SupervisorComm
|
|||||||
Select Case Message.ItemType
|
Select Case Message.ItemType
|
||||||
Case StatusMapItemType.Comm
|
Case StatusMapItemType.Comm
|
||||||
Select Case Message.Operation
|
Select Case Message.Operation
|
||||||
Case StatusMapOpType.OpenPageInViewOptimRequest
|
|
||||||
Map.refMainMenuVM.OpenPageFromSupervisor(Math.Abs(Message.ItemId))
|
|
||||||
Case StatusMapOpType.ChangeProdInOptimizerRequest
|
Case StatusMapOpType.ChangeProdInOptimizerRequest
|
||||||
Map.refProdManagerVM.OpenProjectFromSupervisor(Message.ItemId)
|
Map.refProdManagerVM.OpenProjectFromSupervisor(Message.ItemId)
|
||||||
|
Case StatusMapOpType.OpenPageInViewOptimRequest
|
||||||
|
Map.refMainMenuVM.OpenPageFromSupervisor(Math.Abs(Message.ItemId))
|
||||||
End Select
|
End Select
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Net.Mail
|
Imports System.Net.Mail
|
||||||
Imports System.Reflection
|
|
||||||
Imports System.Runtime.CompilerServices
|
|
||||||
Imports System.Text
|
Imports System.Text
|
||||||
Imports EgtBEAMWALL.Core
|
Imports EgtBEAMWALL.Core
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
@@ -42,12 +40,15 @@ Module Configuration
|
|||||||
ElseIf ActivePage = Pages.MACHINING AndAlso Not bPreview Then
|
ElseIf ActivePage = Pages.MACHINING AndAlso Not bPreview Then
|
||||||
sFileName = ProjectManagerVM.CurrProd.sProdDirPath & "\" & ProjectManagerVM.CurrProd.sProdId & " - " & "Statistics.pdf"
|
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
|
ElseIf ActivePage = Pages.MACHINING AndAlso bPreview Then ' Se la pagina e' 1 e' bPreview e' True creo PDF Optimizer
|
||||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf"
|
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf"
|
||||||
PrevSelect()
|
PrevSelect()
|
||||||
End If
|
End If
|
||||||
Dim renderer As New PdfDocumentRenderer() With {
|
Dim renderer As New PdfDocumentRenderer(True) With {
|
||||||
.Document = document}
|
.Document = document}
|
||||||
renderer.RenderDocument()
|
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)
|
renderer.PdfDocument.Save(sFileName)
|
||||||
If Not bPreview Then Process.Start(sFileName)
|
If Not bPreview Then Process.Start(sFileName)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -67,51 +68,4 @@ Module Configuration
|
|||||||
EgtZoom(ZM.ALL, True)
|
EgtZoom(ZM.ALL, True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub SaveEml(message As MailMessage, filename As String)
|
|
||||||
Dim boundary As String = "====BOUNDARY_" & Guid.NewGuid().ToString() & "===="
|
|
||||||
Dim sb As New StringBuilder()
|
|
||||||
|
|
||||||
' Intestazioni principali
|
|
||||||
sb.AppendLine("To: " & String.Join(";", message.To.Select(Function(t) t.Address)))
|
|
||||||
If message.CC.Count > 0 Then
|
|
||||||
sb.AppendLine("Cc: " & String.Join(";", message.CC.Select(Function(t) t.Address)))
|
|
||||||
End If
|
|
||||||
sb.AppendLine("Subject: " & message.Subject)
|
|
||||||
|
|
||||||
sb.AppendLine("X-Unsent: 1")
|
|
||||||
sb.AppendLine("MIME-Version: 1.0")
|
|
||||||
sb.AppendLine("Content-Type: multipart/mixed; boundary=""" & boundary & """")
|
|
||||||
sb.AppendLine()
|
|
||||||
|
|
||||||
' Corpo HTML
|
|
||||||
sb.AppendLine("--" & boundary)
|
|
||||||
sb.AppendLine("Content-Type: text/html; charset=utf-8")
|
|
||||||
sb.AppendLine("Content-Transfer-Encoding: quoted-printable")
|
|
||||||
sb.AppendLine()
|
|
||||||
sb.AppendLine(message.Body)
|
|
||||||
sb.AppendLine()
|
|
||||||
|
|
||||||
' Allegati
|
|
||||||
For Each att As Attachment In message.Attachments
|
|
||||||
Dim ms As New MemoryStream()
|
|
||||||
att.ContentStream.Position = 0
|
|
||||||
att.ContentStream.CopyTo(ms)
|
|
||||||
Dim bytes = ms.ToArray()
|
|
||||||
Dim base64 = Convert.ToBase64String(bytes, Base64FormattingOptions.InsertLineBreaks)
|
|
||||||
|
|
||||||
sb.AppendLine("--" & boundary)
|
|
||||||
sb.AppendLine("Content-Type: " & att.ContentType.MediaType & "; name=""" & att.Name & """")
|
|
||||||
sb.AppendLine("Content-Disposition: attachment; filename=""" & att.Name & """")
|
|
||||||
sb.AppendLine("Content-Transfer-Encoding: base64")
|
|
||||||
sb.AppendLine()
|
|
||||||
sb.AppendLine(base64)
|
|
||||||
sb.AppendLine()
|
|
||||||
Next
|
|
||||||
|
|
||||||
' Fine MIME
|
|
||||||
sb.AppendLine("--" & boundary & "--")
|
|
||||||
' Salvataggio file
|
|
||||||
File.WriteAllText(filename, sb.ToString(), Encoding.UTF8)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||||
xmlns:EgtBEAMWALLCore="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
|
xmlns:EgtBEAMWALLCore="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
|
||||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
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">
|
xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
|
||||||
|
|
||||||
<!--#region Panel ViewModel-->
|
<!--#region Panel ViewModel-->
|
||||||
@@ -65,12 +70,14 @@
|
|||||||
<BitmapImage x:Key="HeaderSetting_Image" UriSource="/Resources/NewPage/SettingIntestazione.png"/>
|
<BitmapImage x:Key="HeaderSetting_Image" UriSource="/Resources/NewPage/SettingIntestazione.png"/>
|
||||||
<BitmapImage x:Key="Setting_Image" UriSource="/Resources/NewPage/Setting.png"/>
|
<BitmapImage x:Key="Setting_Image" UriSource="/Resources/NewPage/Setting.png"/>
|
||||||
<BitmapImage x:Key="Edit_Image" UriSource="/Resources/CALCPanel/Edit.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="Ok_Image" UriSource="/Resources/NewPage/Ok.png"/>
|
||||||
<BitmapImage x:Key="Delete_Image" UriSource="/Resources/PDFEditor/Delete.png"/>
|
<BitmapImage x:Key="Delete_Image" UriSource="/Resources/PDFEditor/Delete.png"/>
|
||||||
<BitmapImage x:Key="CopyPart_Image" UriSource="/Resources/LeftPanel/CopyPart.png"/>
|
<BitmapImage x:Key="CopyPart_Image" UriSource="/Resources/LeftPanel/CopyPart.png"/>
|
||||||
<BitmapImage x:Key="Remove_Image" UriSource="/Resources/NewPage/Remove.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="Simulate_Image" UriSource="/Resources/CALCPanel/Simulate.png"/>
|
||||||
<BitmapImage x:Key="ResetCalc_Image" UriSource="/Resources/CALCPanel/ResetCalc.png"/>
|
<BitmapImage x:Key="ResetCalc_Image" UriSource="/Resources/NewPage/reset.png"/>
|
||||||
<BitmapImage x:Key="ChooseMachine_Image" UriSource="/Resources/CALCPanel/ChooseMachine.png"/>
|
<BitmapImage x:Key="ChooseMachine_Image" UriSource="/Resources/CALCPanel/ChooseMachine.png"/>
|
||||||
<BitmapImage x:Key="Save_Image" UriSource="/Resources/ProjectManager/Save.png"/>
|
<BitmapImage x:Key="Save_Image" UriSource="/Resources/ProjectManager/Save.png"/>
|
||||||
<BitmapImage x:Key="CopyFeature_Image" UriSource="/Resources/LeftPanel/CopyFeature.png"/>
|
<BitmapImage x:Key="CopyFeature_Image" UriSource="/Resources/LeftPanel/CopyFeature.png"/>
|
||||||
@@ -100,7 +107,7 @@
|
|||||||
<BitmapImage x:Key="MoveUp_Image" UriSource="/Resources/NewPage/MoveUp.png"/>
|
<BitmapImage x:Key="MoveUp_Image" UriSource="/Resources/NewPage/MoveUp.png"/>
|
||||||
<BitmapImage x:Key="MoveDown_Image" UriSource="/Resources/NewPage/MoveDown.png"/>
|
<BitmapImage x:Key="MoveDown_Image" UriSource="/Resources/NewPage/MoveDown.png"/>
|
||||||
<BitmapImage x:Key="VerifyAll_Image" UriSource="/Resources/CALCPanel/VerifyAll.png"/>
|
<BitmapImage x:Key="VerifyAll_Image" UriSource="/Resources/CALCPanel/VerifyAll.png"/>
|
||||||
<BitmapImage x:Key="VerifyAllR_Image" UriSource="/Resources/NewPage/VerifyAllR.png"/>
|
<BitmapImage x:Key="VerifyAllR_Image" UriSource="/Resources/NewPage/VerifyAllRotation.png"/>
|
||||||
<BitmapImage x:Key="AllFilter_Image" UriSource="/Resources/LeftPanel/All_Filter.png"/>
|
<BitmapImage x:Key="AllFilter_Image" UriSource="/Resources/LeftPanel/All_Filter.png"/>
|
||||||
<BitmapImage x:Key="Inversion_Image" UriSource="/Resources/NewPage/Inversion.png"/>
|
<BitmapImage x:Key="Inversion_Image" UriSource="/Resources/NewPage/Inversion.png"/>
|
||||||
<BitmapImage x:Key="Send_Image" UriSource="/Resources/MainMenu/Send.png"/>
|
<BitmapImage x:Key="Send_Image" UriSource="/Resources/MainMenu/Send.png"/>
|
||||||
@@ -145,6 +152,7 @@
|
|||||||
<BitmapImage x:Key="Restore_Image" UriSource="/Resources/EgtDialog/Restore.png"/>
|
<BitmapImage x:Key="Restore_Image" UriSource="/Resources/EgtDialog/Restore.png"/>
|
||||||
<BitmapImage x:Key="AboutBox_Image" UriSource="/Resources/AboutBox/EgalwareLogo.png"/>
|
<BitmapImage x:Key="AboutBox_Image" UriSource="/Resources/AboutBox/EgalwareLogo.png"/>
|
||||||
<BitmapImage x:Key="Clock_Image" UriSource="/Resources/NewPage/clock.png"/>
|
<BitmapImage x:Key="Clock_Image" UriSource="/Resources/NewPage/clock.png"/>
|
||||||
|
<BitmapImage x:Key="Update_Image" UriSource="/Resources/NewPage/arrow.png"/>
|
||||||
|
|
||||||
<!--#endregion Image-->
|
<!--#endregion Image-->
|
||||||
|
|
||||||
@@ -257,13 +265,6 @@
|
|||||||
|
|
||||||
<!--#region FeatureInPartInRawPartList-->
|
<!--#region FeatureInPartInRawPartList-->
|
||||||
|
|
||||||
<Style x:Key="FeatureInPartInRawPartList_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource ForegroundCorduroy_TextBlock}">
|
|
||||||
<Setter Property="TextAlignment" Value="Center"/>
|
|
||||||
<Setter Property="FontWeight" Value="Bold"/>
|
|
||||||
<Setter Property="FontSize" Value="12"/>
|
|
||||||
<Setter Property="Margin" Value="-2,-6,0,-2"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="CALC_ERR_Letter_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource ForegroundCorduroy_TextBlock}">
|
<Style x:Key="CALC_ERR_Letter_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource ForegroundCorduroy_TextBlock}">
|
||||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||||
<Setter Property="Margin" Value="0,-4,0.5,0"/>
|
<Setter Property="Margin" Value="0,-4,0.5,0"/>
|
||||||
@@ -308,14 +309,6 @@
|
|||||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="CALC_ERRRawPartList_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource ForegroundCorduroy_TextBlock}">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
|
||||||
<Setter Property="TextAlignment" Value="Center"/>
|
|
||||||
<Setter Property="FontWeight" Value="Bold"/>
|
|
||||||
<Setter Property="FontSize" Value="12"/>
|
|
||||||
<Setter Property="Margin" Value="0,-6,0,-2"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="CurrentMachine_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource ForegroundCorduroy_TextBlock}">
|
<Style x:Key="CurrentMachine_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource ForegroundCorduroy_TextBlock}">
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
<Setter Property="FontSize" Value="20"/>
|
<Setter Property="FontSize" Value="20"/>
|
||||||
@@ -394,6 +387,18 @@
|
|||||||
<Setter Property="Margin" Value="0,10,0,0"/>
|
<Setter Property="Margin" Value="0,10,0,0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TreeView_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource DialogWindow_TextBlock}">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=TreeViewItem}}" Value="True">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
|
||||||
|
<Setter Property="Background" Value="{StaticResource BeamWall_FountainBlue}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType=TreeViewItem}}" Value="False">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource BeamWall_Corduroy}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!--#endregion DialogWindow-->
|
<!--#endregion DialogWindow-->
|
||||||
|
|
||||||
<!--#region ProjectParameters-->
|
<!--#region ProjectParameters-->
|
||||||
@@ -449,10 +454,6 @@
|
|||||||
<Setter Property="Margin" Value="1,-4,0,0"/>
|
<Setter Property="Margin" Value="1,-4,0,0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="CALC_ROTRawPartList_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource CALC_ROT_TextBlock}">
|
|
||||||
<Setter Property="Margin" Value="-6,-4,0,0"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<!--#region CALC_ROTFeature-->
|
<!--#region CALC_ROTFeature-->
|
||||||
|
|
||||||
<Style x:Key="CALC_ROTFeature_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource CALC_ROT_TextBlock}">
|
<Style x:Key="CALC_ROTFeature_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource CALC_ROT_TextBlock}">
|
||||||
@@ -469,7 +470,7 @@
|
|||||||
<!--#endregion CALC_ROT-->
|
<!--#endregion CALC_ROT-->
|
||||||
|
|
||||||
<Style x:Key="Prod_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
<Style x:Key="Prod_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||||
<Setter Property="TextAlignment" Value="Center"/>
|
<Setter Property="TextAlignment" Value="Justify"/>
|
||||||
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
|
<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGridCell}}, Path=IsSelected}" Value="True">
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGridCell}}, Path=IsSelected}" Value="True">
|
||||||
@@ -514,8 +515,9 @@
|
|||||||
|
|
||||||
<Style x:Key="Rotate_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
<Style x:Key="Rotate_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||||
<Setter Property="TextAlignment" Value="Center"/>
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
<Setter Property="Width" Value="25"/>
|
<Setter Property="Width" Value="25"/>
|
||||||
<Setter Property="Margin" Value="2,0,2,0"/>
|
<Setter Property="Margin" Value="5,0,5,0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="ROT_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
<Style x:Key="ROT_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||||
@@ -740,6 +742,11 @@
|
|||||||
<Setter Property="FontSize" Value="20"/>
|
<Setter Property="FontSize" Value="20"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Update_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Strategy_Button}">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="SaveStrategy_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
|
<Style x:Key="SaveStrategy_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
@@ -802,7 +809,7 @@
|
|||||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
<Setter Property="Height" Value="30"/>
|
<Setter Property="Height" Value="30"/>
|
||||||
<Setter Property="Width" Value="30"/>
|
<Setter Property="Width" Value="30"/>
|
||||||
<Setter Property="Margin" Value="2.5,2.5,2.5,2.5"/>
|
<Setter Property="Margin" Value="2.5,3,2.5,3"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="NameBTL_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
|
<Style x:Key="NameBTL_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
|
||||||
@@ -810,6 +817,13 @@
|
|||||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="SaveConfig_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
|
<Setter Property="Height" Value="40"/>
|
||||||
|
<Setter Property="Width" Value="40"/>
|
||||||
|
<Setter Property="Margin" Value="10,15,10,10"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!--#endregion Optimizer-->
|
<!--#endregion Optimizer-->
|
||||||
|
|
||||||
<!--#region ProdManager-->
|
<!--#region ProdManager-->
|
||||||
@@ -836,6 +850,14 @@
|
|||||||
<Setter Property="Margin" Value="2.5,2.5,2.5,2.5"/>
|
<Setter Property="Margin" Value="2.5,2.5,2.5,2.5"/>
|
||||||
</Style>
|
</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}">
|
<Style x:Key="MacroFeaturen_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource ProdManager_Button}">
|
||||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||||
<Setter Property="Margin" Value="2.5,2.5,10,2.5"/>
|
<Setter Property="Margin" Value="2.5,2.5,10,2.5"/>
|
||||||
@@ -1396,6 +1418,9 @@
|
|||||||
<Setter Property="Grid.IsSharedSizeScope" Value="True"/>
|
<Setter Property="Grid.IsSharedSizeScope" Value="True"/>
|
||||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" 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.Resources>
|
||||||
<Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource Optimizer_ScrollBar}"/>
|
<Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource Optimizer_ScrollBar}"/>
|
||||||
<Style TargetType="{x:Type ListBoxItem}">
|
<Style TargetType="{x:Type ListBoxItem}">
|
||||||
@@ -2047,6 +2072,10 @@
|
|||||||
<Setter Property="Margin" Value="5"/>
|
<Setter Property="Margin" Value="5"/>
|
||||||
</Style>
|
</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-->
|
<!--#endregion PartManager-->
|
||||||
|
|
||||||
<!--#region OptStatistics-->
|
<!--#region OptStatistics-->
|
||||||
@@ -2229,6 +2258,10 @@
|
|||||||
<Setter Property="Margin" Value="5,5,5,0"/>
|
<Setter Property="Margin" Value="5,5,5,0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TableView_Grid" TargetType="{x:Type Grid}">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!--#endregion Grid-->
|
<!--#endregion Grid-->
|
||||||
|
|
||||||
<!--#region GridSplitter-->
|
<!--#region GridSplitter-->
|
||||||
@@ -2238,6 +2271,7 @@
|
|||||||
<Setter Property="Width" Value="3"/>
|
<Setter Property="Width" Value="3"/>
|
||||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="dx:ThemeManager.ThemeName" Value="None"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="Height_GridSplitter" TargetType="{x:Type GridSplitter}">
|
<Style x:Key="Height_GridSplitter" TargetType="{x:Type GridSplitter}">
|
||||||
@@ -2245,10 +2279,12 @@
|
|||||||
<Setter Property="Height" Value="3"/>
|
<Setter Property="Height" Value="3"/>
|
||||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="dx:ThemeManager.ThemeName" Value="None"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="HeightBottom_GridSplitter" TargetType="{x:Type GridSplitter}" BasedOn="{StaticResource Height_GridSplitter}">
|
<Style x:Key="HeightBottom_GridSplitter" TargetType="{x:Type GridSplitter}" BasedOn="{StaticResource Height_GridSplitter}">
|
||||||
<Setter Property="Height" Value="10"/>
|
<Setter Property="Height" Value="10"/>
|
||||||
|
<Setter Property="dx:ThemeManager.ThemeName" Value="None"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!--#endregion GridSplitter-->
|
<!--#endregion GridSplitter-->
|
||||||
@@ -2413,6 +2449,7 @@
|
|||||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="dx:ThemeManager.ThemeName" Value="None"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!--#endregion TreeView-->
|
<!--#endregion TreeView-->
|
||||||
@@ -2445,6 +2482,13 @@
|
|||||||
<Setter Property="StaysOpen" Value="False"/>
|
<Setter Property="StaysOpen" Value="False"/>
|
||||||
</Style>
|
</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-->
|
<!--#endregion PopUp-->
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
@@ -2561,7 +2605,7 @@
|
|||||||
<Setter Property="Background" Value="{DynamicResource Border.BTLPartManager.Background}"/>
|
<Setter Property="Background" Value="{DynamicResource Border.BTLPartManager.Background}"/>
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource Border.BTLPartManager.Border}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource Border.BTLPartManager.Border}"/>
|
||||||
<Setter Property="CornerRadius" Value="5"/>
|
<Setter Property="CornerRadius" Value="5"/>
|
||||||
<Setter Property="BorderThickness" Value="2"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="SetUp_Border" TargetType="{x:Type Border}">
|
<Style x:Key="SetUp_Border" TargetType="{x:Type Border}">
|
||||||
@@ -2575,6 +2619,23 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</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-->
|
<!--#region TopPanel_Border-->
|
||||||
|
|
||||||
<Style x:Key="TopPanel_Border" TargetType="{x:Type Border}">
|
<Style x:Key="TopPanel_Border" TargetType="{x:Type Border}">
|
||||||
@@ -2658,7 +2719,7 @@
|
|||||||
|
|
||||||
<Style x:Key="StrategyManager_Image" TargetType="{x:Type Image}">
|
<Style x:Key="StrategyManager_Image" TargetType="{x:Type Image}">
|
||||||
<Setter Property="Stretch" Value="Uniform"/>
|
<Setter Property="Stretch" Value="Uniform"/>
|
||||||
<Setter Property="Margin" Value="5,0,0,0"/>
|
<Setter Property="Margin" Value="5"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="StrategyProduction_Image" TargetType="{x:Type Image}">
|
<Style x:Key="StrategyProduction_Image" TargetType="{x:Type Image}">
|
||||||
@@ -2704,4 +2765,156 @@
|
|||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
|
<!--#region DevExpress-->
|
||||||
|
|
||||||
|
<Style x:Key="TableViewStyle" TargetType="{x:Type dxg:TableView}">
|
||||||
|
<Setter Property="AlternationCount" Value="2"/>
|
||||||
|
<Setter Property="AlternateRowBackground" Value="{StaticResource BeamWall_LinkWater}"/>
|
||||||
|
<Setter Property="AutoWidth" Value="False"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="EvenRowBackground" Value="{StaticResource BeamWall_BLackSqueeze}"/>
|
||||||
|
<Setter Property="FixedLineWidth" Value="2"/>
|
||||||
|
<Setter Property="LeftGroupAreaIndent" Value="0"/>
|
||||||
|
<Setter Property="RowMinHeight" Value="28"/>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<Style x:Key="TreeViewControlStyle" TargetType="{x:Type dxg:TreeViewControl}">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource TextBlock.Static.Second.Foreground}"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
|
<Setter Property="FontSize" Value="13"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--#endregion DevExpress-->
|
||||||
|
|
||||||
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
|
<!--#region EgtTextBox2-->
|
||||||
|
|
||||||
|
<Style x:Key="ParameterList_TextBox2" TargetType="{x:Type EgtWPFLib5:EgtTextBox2}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox2}}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource BeamWall_White}"/>
|
||||||
|
<Setter Property="TextAlignment" Value="Center"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="ExplicitUpdateSource" Value="EnterKeyPressOrLostFocus"/>
|
||||||
|
<Setter Property="ResetValueOnLostFocus" Value="False"/>
|
||||||
|
<Setter Property="Width" Value="65"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!--#endregion EgtTextBox2-->
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user