Compare commits
96 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| d61104aaab | |||
| 31dcf81fc2 | |||
| b7ada79678 | |||
| a158df1115 | |||
| b0f7488fd6 | |||
| 8b871d0c15 | |||
| 01804c5d0d | |||
| 75c02a7625 | |||
| 2e2f2dd66d |
@@ -155,7 +155,7 @@ Public Module CalcIntegration
|
||||
Else
|
||||
vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """ " &
|
||||
"""" & vBar(nCurrBar).nProjType & """ " &
|
||||
"""" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType
|
||||
"""" & vBar(nCurrBar).nMachineName & """ " & vBar(nCurrBar).nCmdType & " " & vBar(nCurrBar).nBarState
|
||||
End If
|
||||
vProc(j).Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
@@ -475,7 +475,7 @@ Public Module CalcIntegration
|
||||
End Module
|
||||
|
||||
Public Class Bar
|
||||
Public nBarState As Integer
|
||||
Public nBarState As Integer = -1
|
||||
Public nBarId As Integer
|
||||
Public sBarPath As String
|
||||
Public bBarOk As Boolean
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows
|
||||
Imports System.Windows
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class EgtMessageBoxV
|
||||
|
||||
@@ -25,6 +26,18 @@ Public Class EgtMessageBoxV
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Protected Overrides Sub OnSourceInitialized(e As EventArgs)
|
||||
MyBase.OnSourceInitialized(e)
|
||||
Me.WindowStartupLocation = WindowStartupLocation.CenterScreen
|
||||
End Sub
|
||||
|
||||
Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Dispatcher.BeginInvoke(Sub()
|
||||
Me.Topmost = True
|
||||
Me.Activate()
|
||||
End Sub, DispatcherPriority.ContextIdle)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Apre una EgtMessageBox con un messaggio che ritorna un risultato
|
||||
''' </summary>
|
||||
|
||||
@@ -38,5 +38,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.1.5.2")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.2")>
|
||||
<Assembly: AssemblyVersion("3.1.7.1")>
|
||||
<Assembly: AssemblyFileVersion("3.1.7.1")>
|
||||
|
||||
@@ -1925,6 +1925,7 @@
|
||||
|
||||
<Style x:Key="EgtMessageBox_ItemsControl" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource {x:Type ItemsControl}}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="Margin" Value="0,0,0,10"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="UsersControl_ItemsControl" TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource {x:Type ItemsControl}}">
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.1.5.2")]
|
||||
[assembly: AssemblyFileVersion("3.1.5.2")]
|
||||
[assembly: AssemblyVersion("3.1.7.1")]
|
||||
[assembly: AssemblyFileVersion("3.1.7.1")]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class AboutBoxV
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Application x:Class="Application"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<StackPanel Style="{StaticResource MachinePanel_StackPanel}">
|
||||
<ComboBox ItemsSource="{Binding StrategySetupList}"
|
||||
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource BTLDataWnd_ComboBox}">
|
||||
@@ -68,116 +68,123 @@
|
||||
<TextBlock Text="{Binding PROJNUM_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sPROJNUM, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sPROJNUM, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding PROJNAME_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sPROJNAME, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sPROJNAME, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding PROJPART_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sPROJPART, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sPROJPART, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding PROJGUID_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sPROJGUID, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sPROJGUID, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding LISTNAME_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sLISTNAME, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sLISTNAME, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding CUSTOMER_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sCUSTOMER, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sCUSTOMER, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding ARCHITECT_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sARCHITECT, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sARCHITECT, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding EDITOR_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sEDITOR, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sEDITOR, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding DELIVDATE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<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}"/>
|
||||
<TextBlock Text="{Binding EXPDATE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sEXPDATE, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sEXPDATE, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding EXPTIME_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sEXPTIME, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sEXPTIME, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding EXPRELEASE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sEXPRELEASE, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sEXPRELEASE, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding LANGUAGE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sLANGUAGE, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sLANGUAGE, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding RANGE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding ocRANGE,
|
||||
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||
Path=Tag.ocRANGE,
|
||||
Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelRANGE,
|
||||
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||
Path=Tag.SelRANGE,
|
||||
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource PartParam_ComboBox}"/>
|
||||
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding ocPROCESSINGQUALITY,
|
||||
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||
Path=Tag.ocPROCESSINGQUALITY,
|
||||
Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelPROCESSINGQUALITY,
|
||||
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||
Path=Tag.SelPROCESSINGQUALITY,
|
||||
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource PartParam_ComboBox}"/>
|
||||
<TextBlock Text="{Binding COMPUTERNAME_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sCOMPUTERNAME, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sCOMPUTERNAME, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding USER_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sUSER, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sUSER, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding SRCFILE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sSRCFILE, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sSRCFILE, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding EXPFILE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sEXPFILE, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sEXPFILE, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding RECESS_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<ComboBox Grid.Column="1"
|
||||
ItemsSource="{Binding ocRECESS,
|
||||
ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||
Path=Tag.ocRECESS,
|
||||
Mode=OneWay}"
|
||||
SelectedIndex="{Binding SelRECESS,
|
||||
SelectedIndex="{Binding RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLDataWndV}},
|
||||
Path=Tag.SelRECESS,
|
||||
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource PartParam_ComboBox}"/>
|
||||
<TextBlock Text="{Binding USERATTRIBUTE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding sUSERATTRIBUTE, UpdateSourceTrigger=Explicit}"
|
||||
Text="{Binding CurrBTLStructure.sUSERATTRIBUTE, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = BTLDataWndVM
|
||||
Me.Tag = Map.refProjectVM.BTLStructureVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_BTLDataWndVM = BTLDataWndVM
|
||||
End Sub
|
||||
@@ -19,6 +20,7 @@
|
||||
If Not IsNothing(Map.refBTLDataWndVM.SelStrategySetup) AndAlso Map.refBTLDataWndVM.SelStrategySetup.Equals(SelStrategy.Content) Then
|
||||
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
|
||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||
Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content)
|
||||
Map.refBTLDataWndVM.SelStrategySetup = SelStrategy.Content
|
||||
End If
|
||||
|
||||
@@ -33,6 +33,7 @@ Public Class BTLDataWndVM
|
||||
If m_SelStrategySetup <> value Then
|
||||
Map.refStrategyManagerVM.SelStrategySetup.sName = value
|
||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||
ReadCustomGeneralParameters(value)
|
||||
End If
|
||||
m_SelStrategySetup = value
|
||||
@@ -80,6 +81,13 @@ Public Class BTLDataWndVM
|
||||
NotifyPropertyChanged(NameOf(ErrText))
|
||||
End Sub
|
||||
|
||||
Private m_CurrBTLStructure As BTLStructureVM
|
||||
Public ReadOnly Property CurrBTLStructure As BTLStructureVM
|
||||
Get
|
||||
Return m_CurrBTLStructure
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Parametri generici"
|
||||
|
||||
Public m_sPROJNUM As String
|
||||
@@ -565,8 +573,9 @@ Public Class BTLDataWndVM
|
||||
Map.refMainWindowVM.MainWindowM.GetDefaultConfigDirPath(nType, True)
|
||||
End Sub
|
||||
|
||||
Sub New()
|
||||
Sub New(BTLStructure As BTLStructureVM)
|
||||
Map.SetRefBTLDataWndVM(Me)
|
||||
m_CurrBTLStructure = BTLStructure
|
||||
SetIsBTLDataWnd(True)
|
||||
' leggo parametri Btl
|
||||
ReadBtlParams()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
CornerRadius="5"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
|
||||
|
||||
<dxb:BarItemMenuHeader ShowContentHeader="False"
|
||||
ItemsOrientation="Horizontal"
|
||||
Margin="0"
|
||||
@@ -21,87 +21,27 @@
|
||||
ToolTip="{Binding CopyPart_ToolTip}"
|
||||
IsEnabled="{Binding CopyPart_IsEnabled}"
|
||||
Glyph="{StaticResource CopyPart_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource CopyPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||
<dxb:BarButtonItem Command="{Binding RemovePart_Command}"
|
||||
ToolTip="{Binding RemovePart_ToolTip}"
|
||||
IsEnabled="{Binding RemovePart_IsEnabled}"
|
||||
Glyph="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||
<dxb:BarButtonItem ToolTip="{Binding Simulate_ToolTip}"
|
||||
Command="{Binding Simulate_Command}"
|
||||
IsEnabled="{Binding Simulate_IsEnabled}"
|
||||
Glyph="{StaticResource Simulate_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource Simulate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||
<dxb:BarButtonItem ToolTip="{Binding Edit_ToolTip}"
|
||||
Command="{Binding Edit_Command}"
|
||||
IsEnabled="{Binding Edit_IsEnabled}"
|
||||
Glyph="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||
<dxb:BarButtonItem Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||
Glyph="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}">
|
||||
<!--<Image Source="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>-->
|
||||
</dxb:BarButtonItem>
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||
</dxb:BarItemMenuHeader>
|
||||
|
||||
</dxb:PopupMenu>
|
||||
<!--<Border x:Class="BTLPartManagerV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
DataContext="{StaticResource BTLPartManagerVM}"
|
||||
Style="{StaticResource BTLPartManager_Border}">
|
||||
|
||||
<StackPanel Style="{StaticResource PartManager_StackPanel}">
|
||||
<Button Command="{Binding CopyPart_Command}"
|
||||
ToolTip="{Binding CopyPart_ToolTip}"
|
||||
IsEnabled="{Binding CopyPart_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource CopyPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Command="{Binding RemovePart_Command}"
|
||||
ToolTip="{Binding RemovePart_ToolTip}"
|
||||
IsEnabled="{Binding RemovePart_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding Simulate_ToolTip}"
|
||||
Command="{Binding Simulate_Command}"
|
||||
IsEnabled="{Binding Simulate_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource Simulate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding Edit_ToolTip}"
|
||||
Command="{Binding Edit_Command}"
|
||||
IsEnabled="{Binding Edit_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</Border>-->
|
||||
|
||||
@@ -8,6 +8,13 @@ Public Class BTLPartManagerVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
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
|
||||
Public ReadOnly Property BTLPartManager_IsEnabled As Boolean
|
||||
Get
|
||||
@@ -194,7 +201,7 @@ Public Class BTLPartManagerVM
|
||||
' creo copia
|
||||
Dim NewPart As BTLPartM = SelPart.Copy()
|
||||
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
|
||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1), False, True)
|
||||
End If
|
||||
@@ -242,7 +249,7 @@ Public Class BTLPartManagerVM
|
||||
End If
|
||||
' Eseguo cancellazione
|
||||
EgtBeamSetPart(BTLPartToDelete.nPartId)
|
||||
RemoveScenePart(BTLPartToDelete)
|
||||
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)
|
||||
@@ -272,14 +279,18 @@ Public Class BTLPartManagerVM
|
||||
|
||||
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM)
|
||||
' Rimuovo pezzo dalla scena
|
||||
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(BTLPartToDelete.nPROJ)
|
||||
If IdAsseBase < 0 Then Return
|
||||
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)
|
||||
Dim DeletePartId As Integer = Map.refSceneShowBuldingVM.MapInfo(BTLPartToDelete.nPartId)
|
||||
EgtErase(DeletePartId)
|
||||
Map.refSceneShowBuldingVM.MapInfo.Remove(BTLPartToDelete.nPartId)
|
||||
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
|
||||
@@ -347,6 +358,17 @@ Public Class BTLPartManagerVM
|
||||
End Property
|
||||
|
||||
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)
|
||||
Dim bValuePart As Boolean = False
|
||||
For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList
|
||||
|
||||
@@ -188,7 +188,9 @@ Public Class BTLPartVM
|
||||
Get
|
||||
Dim nOrigGroupId As Integer = nPartId
|
||||
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
|
||||
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||
@@ -249,7 +251,9 @@ Public Class BTLPartVM
|
||||
Get
|
||||
Dim nOrigGroupId As Integer = nPartId
|
||||
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
|
||||
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||
@@ -310,7 +314,9 @@ Public Class BTLPartVM
|
||||
Get
|
||||
Dim nOrigGroupId As Integer = nPartId
|
||||
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
|
||||
If EgtBeamGetBuildingIsOn() AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
nOrigGroupId = GetOrigFrameGroup(nPartId)
|
||||
|
||||
@@ -962,7 +962,6 @@ Public Class BTLStructureVM
|
||||
' tolgo pezzo selezionato
|
||||
SelBTLPart.SelBTLFeatureVM = Nothing
|
||||
End If
|
||||
' mostro tutti i pezzi
|
||||
' creo lista id presenti
|
||||
Dim BTLPartIdList As List(Of Integer) = (From Part In BTLPartVMList
|
||||
Select Part.nPartId).ToList()
|
||||
@@ -1239,13 +1238,76 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
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
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "DeletePart_Command"
|
||||
|
||||
Public ReadOnly Property DeletePart_Command As ICommand
|
||||
Public ReadOnly Property DeletePart_Command() As ICommand
|
||||
Get
|
||||
If m_cmdDeletePart Is Nothing Then
|
||||
m_cmdDeletePart = New Command(AddressOf DeletePart)
|
||||
@@ -1255,7 +1317,17 @@ Public Class BTLStructureVM
|
||||
End Property
|
||||
|
||||
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 Region ' DeletePart_Command
|
||||
@@ -1272,7 +1344,7 @@ Public Class BTLStructureVM
|
||||
End Property
|
||||
|
||||
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()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -70,6 +70,17 @@ Public Class CALCPanelVM
|
||||
NotifyPropertyChanged(NameOf(ChooseMachine_Visibility))
|
||||
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
|
||||
Private m_MachineList As New ObservableCollection(Of Machine)
|
||||
Public Property MachineList As ObservableCollection(Of Machine)
|
||||
@@ -133,6 +144,7 @@ Public Class CALCPanelVM
|
||||
Sub New()
|
||||
' imposto riferimento in Map
|
||||
Map.SetRefCALCPanelVM(Me)
|
||||
SetChooseMachine_IsEnabled(False)
|
||||
Core.CalcIntegration.SetMaxCamInstances(Map.refMainWindowVM.MainWindowM.GetMaxCamInstances())
|
||||
AddHandler Core.CalcIntegration.Calc_ProcessResult, AddressOf Calc_ProcessResult
|
||||
AddHandler Core.CalcIntegration.Calc_Ended, AddressOf Calc_Ended
|
||||
@@ -979,6 +991,7 @@ Public Class CALCPanelVM
|
||||
If Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count > 0 Then
|
||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.BTLPartVMList(0))
|
||||
End If
|
||||
Map.refProjectVM.BTLStructureVM.LoadFilters()
|
||||
Map.refMyStatusBarVM.RefreshMachName()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
<Button ToolTip="{Binding ChooseMachine_ToolTip}"
|
||||
Command="{Binding ChooseMachine_Command}"
|
||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||
IsEnabled="{Binding ChooseMachine_IsEnabled}"
|
||||
Visibility="{Binding ChooseMachineBtn_Visibility}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="{StaticResource ChooseMachine_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
|
||||
<Grid Visibility="{Binding ChooseMachine_Visibility}"
|
||||
<Grid Visibility="{Binding ChooseMachine_Visibility}"
|
||||
Style="{StaticResource CalcPanel_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.IO.Compression
|
||||
Imports System.Reflection
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
@@ -25,22 +24,9 @@ Public Class ConfigurationPageVM
|
||||
Set(value As Integer)
|
||||
m_SelConfigSubPage = value
|
||||
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)
|
||||
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)
|
||||
SetGeneral_Visibility(False)
|
||||
SetStrategyManager_Visibility(False)
|
||||
End If
|
||||
End Set
|
||||
@@ -82,6 +68,7 @@ Public Class ConfigurationPageVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public OrigSelectedLanguage As Language
|
||||
Private m_SelectedLanguage As Language
|
||||
Public Property SelectedLanguage As Language
|
||||
Get
|
||||
@@ -94,6 +81,7 @@ Public Class ConfigurationPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public nOrigSelMeasureUnit As Integer = If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
|
||||
Public Property SelMeasureUnit As Integer
|
||||
Get
|
||||
Return If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
|
||||
@@ -108,6 +96,7 @@ Public Class ConfigurationPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public sOrigSectionTime As String
|
||||
Private m_SectionTime As Double
|
||||
Public Property SectionTime As String
|
||||
Get
|
||||
@@ -121,6 +110,7 @@ Public Class ConfigurationPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public sOrigPartTime As String
|
||||
Private m_PartTime As Double
|
||||
Public Property PartTime As String
|
||||
Get
|
||||
@@ -134,6 +124,7 @@ Public Class ConfigurationPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public bOrigPrintLabel_IsChecked As Boolean
|
||||
Private m_bPrintLabel_IsChecked As Boolean
|
||||
Public Property bPrintLabel_IsChecked As String
|
||||
Get
|
||||
@@ -158,6 +149,7 @@ Public Class ConfigurationPageVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public bOrigExternalBackupActive As Boolean
|
||||
Private m_bExternalBackupActive As Boolean
|
||||
Public Property bExternalBackupActive As Boolean
|
||||
Get
|
||||
@@ -169,6 +161,7 @@ Public Class ConfigurationPageVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public sOrigExternalBackupFolderPath As String
|
||||
Private m_ExternalBackupFolderPath As String
|
||||
Public Property ExternalBackupFolderPath As String
|
||||
Get
|
||||
@@ -187,6 +180,7 @@ Public Class ConfigurationPageVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public OrigSelReminder As IdNameStruct
|
||||
Private m_SelReminder As IdNameStruct
|
||||
Public Property SelReminder As IdNameStruct
|
||||
Get
|
||||
@@ -198,17 +192,6 @@ Public Class ConfigurationPageVM
|
||||
End Set
|
||||
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
|
||||
Public ReadOnly Property StrategyManager_Visibility As Visibility
|
||||
Get
|
||||
@@ -604,16 +587,23 @@ Public Class ConfigurationPageVM
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
OrigSelectedLanguage = m_SelectedLanguage
|
||||
' leggo SectionTime e PartTime
|
||||
GetMainPrivateProfileString(S_NEST, K_SECTIONTIME, "", SectionTime)
|
||||
sOrigSectionTime = SectionTime
|
||||
GetMainPrivateProfileString(S_NEST, K_PARTTIME, "", PartTime)
|
||||
sOrigPartTime = PartTime
|
||||
m_bPrintLabel_IsChecked = (GetMainPrivateProfileInt(S_PRINTER, K_ENABLE, 0) <> 0)
|
||||
bOrigPrintLabel_IsChecked = m_bPrintLabel_IsChecked
|
||||
' leggo dati per backup
|
||||
GetMainPrivateProfileString(S_BACKUPANDRESTORE, K_EXTERNALFILEPATH, "", m_ExternalBackupFolderPath)
|
||||
sOrigExternalBackupFolderPath = m_ExternalBackupFolderPath
|
||||
Dim nDefaultReminderFrequency As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_REMINDERFREQUENCY, 1)
|
||||
SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency)
|
||||
OrigSelReminder = SelReminder
|
||||
Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0)
|
||||
m_bExternalBackupActive = nExternalBackupActive > 0
|
||||
bOrigExternalBackupActive = m_bExternalBackupActive
|
||||
SetMachineParameter_Visibility(False)
|
||||
SetMachine_Visibility(False)
|
||||
' 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_PARTTIME, DoubleToString(m_PartTime, 5))
|
||||
WriteMainPrivateProfileString(S_PRINTER, K_ENABLE, If(m_bPrintLabel_IsChecked, 1, 0))
|
||||
Map.refMyMachine.VerifyConfigPageModification()
|
||||
End Sub
|
||||
|
||||
' funzione che verifica l'inserimento della password quando si edita un parametro Macchina
|
||||
@@ -654,6 +643,26 @@ Public Class ConfigurationPageVM
|
||||
Return False
|
||||
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>
|
||||
'''' Seleziona il tema se presente
|
||||
'''' </summary>
|
||||
|
||||
@@ -19,20 +19,21 @@
|
||||
Style="{StaticResource Optimizer_TabControl}">
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<TextBlock Text="{Binding General_Msg}"
|
||||
Style="{StaticResource ConfigurationProgram_TextBlock}"/>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<StackPanel Style="{StaticResource ConfigurationProgram_StackPanel}">
|
||||
<TextBlock Text="{Binding General_Msg}"
|
||||
Style="{StaticResource ConfigurationProgram_TextBlock}"/>
|
||||
<EgtBEAMWALLCORE:General_ConfigurationPageV/>
|
||||
<Button Command="{Binding SaveCommand}"
|
||||
ToolTip="{Binding SaveToolTip}"
|
||||
Visibility="{Binding General_Visibility}"
|
||||
Style="{StaticResource SaveOptionPanel_Button}">
|
||||
Style="{StaticResource SaveConfig_Button}">
|
||||
<Image Source="{StaticResource Save_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabItem.Content>
|
||||
<EgtBEAMWALLCORE:General_ConfigurationPageV/>
|
||||
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
|
||||
@@ -66,6 +66,17 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\EgtBEAMWALL.ico</ApplicationIcon>
|
||||
</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>
|
||||
<Reference Include="EgtBEAMWALL.Core">
|
||||
<HintPath>..\EgtBEAMWALL.Core\bin\Debug\EgtBEAMWALL.Core.dll</HintPath>
|
||||
@@ -996,9 +1007,15 @@
|
||||
<PackageReference Include="BouncyCastle">
|
||||
<Version>1.8.5</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="DevExpress.Pdf.Core">
|
||||
<Version>25.2.5</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="DevExpress.Wpf">
|
||||
<Version>25.2.5</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="DevExpress.Wpf.Core">
|
||||
<Version>25.2.5</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="EgwMultiEngineManager.Core">
|
||||
<Version>3.1.1.2</Version>
|
||||
</PackageReference>
|
||||
@@ -1220,7 +1237,16 @@
|
||||
<Resource Include="Resources\EgtDialog\Tiles.png" />
|
||||
</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>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -44,6 +44,7 @@ Module MyExecProcessManager
|
||||
Dim sEnvironment As String = ""
|
||||
Dim sPipeLuaFile As String = ""
|
||||
Dim nMaxCamInstances As Integer = 0
|
||||
Dim bDebug As Boolean = False
|
||||
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_MAXCAMINSTANCES, "", nMaxCamInstances)
|
||||
@@ -64,7 +65,10 @@ Module MyExecProcessManager
|
||||
nGroupIndex += 1
|
||||
Continue While
|
||||
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
|
||||
NewExecProcessManager.StartExecutionThread()
|
||||
m_ExecProcessManagerList.Add(Environment, NewExecProcessManager)
|
||||
@@ -101,7 +105,9 @@ Module MyExecProcessManager
|
||||
End If
|
||||
If nPreRotate > 0 Then
|
||||
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
|
||||
|
||||
Dim prefix As String = "INFONGEPART_"
|
||||
|
||||
@@ -29,10 +29,22 @@ Public Class ForcedStrategyPanelVM
|
||||
End Get
|
||||
Set(value As Strategy)
|
||||
m_SelStrategy = value
|
||||
SetUpdate_Visibility(False)
|
||||
NotifyPropertyChanged(NameOf(SelStrategy))
|
||||
End Set
|
||||
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
|
||||
|
||||
' Definizione Comandi
|
||||
@@ -254,6 +266,7 @@ Public Class ForcedStrategyPanelVM
|
||||
End Function
|
||||
|
||||
Friend Sub ForcedStrategy()
|
||||
If IsNothing(m_CurrentFeature) Then Return
|
||||
' cancello precedenti valori
|
||||
Dim sPrecStrategyID As String = ""
|
||||
EgtGetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, sPrecStrategyID)
|
||||
|
||||
@@ -365,6 +365,28 @@ Public MustInherit Class ProjectParameters
|
||||
End Set
|
||||
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
|
||||
Public Property sValue As String
|
||||
Get
|
||||
@@ -421,6 +443,8 @@ Public MustInherit Class ProjectParameters
|
||||
If IsNothing(JsonProjectParameters) Then Return
|
||||
m_sName = JsonProjectParameters.sName
|
||||
m_sNameNge = JsonProjectParameters.sNameNge
|
||||
m_idDescriptionShortMsg = JsonProjectParameters.idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = JsonProjectParameters.idDescriptionLongMsg
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
@@ -486,6 +510,7 @@ Public Class BooleanGenericParameter
|
||||
SetbIsBooleanModify(True)
|
||||
End If
|
||||
m_bValue = value
|
||||
NotifyPropertyChanged(NameOf(bValue))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetValue(bValue As Boolean)
|
||||
@@ -566,6 +591,7 @@ Public Class DoubleGenericParameter
|
||||
If m_dValue <> dValue Then
|
||||
If Not Map.refBTLDataWndVM.IsBTLDataWnd Then Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
|
||||
SetbIsDoubleModify(True)
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
End If
|
||||
m_dValue = dValue
|
||||
Else
|
||||
@@ -658,6 +684,7 @@ Public Class StringGenericParameter
|
||||
SetbIsStringModify(True)
|
||||
End If
|
||||
m_sValue = value
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetValue(dValue As String)
|
||||
@@ -747,10 +774,12 @@ Public Class ComboGenericParameter
|
||||
End If
|
||||
End If
|
||||
m_SelValue = value
|
||||
NotifyPropertyChanged(NameOf(SelValue))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetSelValue(sValue As String)
|
||||
m_SelValue = m_ComboList.FirstOrDefault(Function(x) x.sValue = sValue)
|
||||
If IsNothing(m_SelValue) Then m_SelValue = m_ComboList(0)
|
||||
End Sub
|
||||
|
||||
Private m_bComboBoxVisibility As Visibility = Visibility.Collapsed
|
||||
|
||||
@@ -64,6 +64,28 @@ Public Class JsonGeneralParameters
|
||||
End Set
|
||||
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
|
||||
Public Property sValue As String
|
||||
Get
|
||||
@@ -113,13 +135,15 @@ Public Class JsonGeneralParameters
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
<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_sName = sName
|
||||
m_sNameNge = sNameNge
|
||||
m_sValue = sValue
|
||||
m_sDescriptionShort = sDescriptionShort
|
||||
m_sDescriptionLong = sDescriptionLong
|
||||
m_idDescriptionShortMsg = idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = idDescriptionLongMsg
|
||||
m_sType = sType
|
||||
m_sMinUserLevel = sMinUserLevel
|
||||
End Sub
|
||||
@@ -142,6 +166,8 @@ Public Class JsonGeneralParameters
|
||||
m_nGroup = ProjectParameters.nGroup
|
||||
m_sDescriptionShort = ProjectParameters.sDescriptionShort
|
||||
m_sDescriptionLong = ProjectParameters.sDescriptionLong
|
||||
m_idDescriptionShortMsg = ProjectParameters.idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = ProjectParameters.idDescriptionLongMsg
|
||||
m_sMinUserLevel = ProjectParameters.sMinUserLevel
|
||||
End Sub
|
||||
|
||||
@@ -192,8 +218,16 @@ Public Class JsonGeneralParameters
|
||||
ProjectParameters.nGroup = m_nGroup
|
||||
ProjectParameters.sName = m_sName
|
||||
ProjectParameters.sNameNge = m_sNameNge
|
||||
ProjectParameters.sDescriptionShort = m_sDescriptionShort
|
||||
ProjectParameters.sDescriptionLong = m_sDescriptionLong
|
||||
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.sMinUserLevel = m_sMinUserLevel
|
||||
Return ProjectParameters
|
||||
End Function
|
||||
|
||||
@@ -64,6 +64,28 @@ Public Class JsonProjectParameters
|
||||
End Set
|
||||
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
|
||||
Public Property sValue As String
|
||||
Get
|
||||
@@ -113,7 +135,7 @@ Public Class JsonProjectParameters
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
<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_sName = sName
|
||||
m_sNameNge = sNameNge
|
||||
@@ -121,6 +143,8 @@ Public Class JsonProjectParameters
|
||||
m_sType = sType
|
||||
m_sDescriptionShort = sDescriptionShort
|
||||
m_sDescriptionLong = sDescriptionLong
|
||||
m_idDescriptionShortMsg = idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = idDescriptionLongMsg
|
||||
m_sMinUserLevel = sMinUserLevel
|
||||
End Sub
|
||||
|
||||
@@ -141,6 +165,8 @@ Public Class JsonProjectParameters
|
||||
End Select
|
||||
m_sDescriptionShort = ProjectParameters.sDescriptionShort
|
||||
m_sDescriptionLong = ProjectParameters.sDescriptionLong
|
||||
m_idDescriptionShortMsg = ProjectParameters.idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = ProjectParameters.idDescriptionLongMsg
|
||||
m_sMinUserLevel = ProjectParameters.sMinUserLevel
|
||||
End Sub
|
||||
|
||||
@@ -191,6 +217,16 @@ Public Class JsonProjectParameters
|
||||
ProjectParameters.nGroup = nGroup
|
||||
ProjectParameters.sName = m_sName
|
||||
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.sDescriptionLong = m_sDescriptionLong
|
||||
ProjectParameters.sMinUserLevel = m_sMinUserLevel
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
Style="{StaticResource ProjectParameters_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ProjectParameters_TextBlock}"/>
|
||||
<TextBox Text="{Binding sValue}"
|
||||
<TextBox Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
@@ -89,7 +89,7 @@
|
||||
Style="{StaticResource ProjectParameters_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ProjectParameters_TextBlock}"/>
|
||||
<TextBox Text="{Binding sValue}"
|
||||
<TextBox Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
<UserControl x:Class="BTLPartListV"
|
||||
<UserControl x:Class="BTLPartListV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
<UserControl.Resources>
|
||||
<OPTIMIZER:DataGridCellBorderThicknessConverter x:Key="DataGridCellBorderThicknessConverter"/>
|
||||
<OPTIMIZER:ProjIdToBtlFileName x:Key="ProjIdToBtlFileName"/>
|
||||
@@ -18,88 +22,157 @@
|
||||
<OPTIMIZER:FractionHeightConverter x:Key="FractionHeightConverter"/>
|
||||
<OPTIMIZER:ExpanderWidthConverter x:Key="ExpanderWidthConverter"/>
|
||||
<sys:Double x:Key="FeatureWrapPanelHeight">0.6</sys:Double>
|
||||
<!--stile che modifica il popup del DropDownButton-->
|
||||
<!--<Style TargetType="dxb:PopupControlContainer">
|
||||
<Setter Property="Background" Value="{StaticResource Border.BTLPartManager.Background}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Border.BTLPartManager.Border}" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
<Setter Property="CornerRadius" Value="5" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
</Style>-->
|
||||
<DataTemplate x:Key="SectMat_Filter">
|
||||
<dxfui:CheckedListFilterElement Context="{Binding FilteringContext, ElementName=BTLPart_GridControl}"
|
||||
FieldName="Section.sSectionXMaterial"/>
|
||||
FieldName="Section.sSectionXMaterial" ShowCounts="True"/>
|
||||
</DataTemplate>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<dxg:GridControl x:Name="BTLPart_GridControl"
|
||||
Grid.Column="1"
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<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}"
|
||||
PreviewMouseDown="FilterAllBtn_PreviewMouseDown"
|
||||
Click="FilterAllBtn_Click"
|
||||
Style="{StaticResource Verify_Button}">
|
||||
<Image Source="{StaticResource AllFilter_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Popup x:Name="FilterSectxMat_Popup"
|
||||
PlacementTarget="{Binding ElementName=FilterAllBtn}"
|
||||
Style="{StaticResource FilterSect_PopUp}">
|
||||
<Border Style="{StaticResource Filtering_Border}">
|
||||
<dxfui:CheckedListFilterElement Context="{Binding FilteringContext, ElementName=BTLPart_GridControl}"
|
||||
FieldName="Section.sSectionXMaterial"
|
||||
ShowCounts="True"
|
||||
Style="{StaticResource CheckedListStyle}"/>
|
||||
</Border>
|
||||
</Popup>
|
||||
<dxe:SearchControl Grid.Column="5"
|
||||
x:Name="searchControl"
|
||||
ShowSearchPanelNavigationButtons="False"
|
||||
ShowResultInfo="False"
|
||||
Style="{StaticResource SearchControlStyle}"/>
|
||||
</Grid>
|
||||
<dxg:GridControl Grid.Row="1"
|
||||
x:Name="BTLPart_GridControl"
|
||||
ItemsSource="{Binding Tag.BTLPartVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
AutoExpandAllGroups="True"
|
||||
SelectionMode="Row"
|
||||
SelectedItems="{Binding Tag.SelBTLParts,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}">
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
MasterRowExpanding="GridControl_MasterRowExpanding"
|
||||
CurrentItemChanged="BTLPart_GridControl_CurrentItemChanged">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="BTLPart_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
PreviewMouseDown="BTLPart_TableView_PreviewMouseDown"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}">
|
||||
Style="{StaticResource TableViewStyle}"
|
||||
SearchControl="{Binding ElementName=searchControl}">
|
||||
<dxg:TableView.GroupRowTemplate>
|
||||
<DataTemplate>
|
||||
<Border Style="{StaticResource TableView_Border}">
|
||||
<Grid Style="{StaticResource TableView_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<dxg:GridGroupExpandButton IsChecked="{Binding IsRowExpanded}"
|
||||
Command="{Binding View.Commands.ChangeGroupExpanded}"
|
||||
CommandParameter="{Binding RowHandle.Value}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding GroupValue.Value, Converter={StaticResource ProjIdToBtlFileName}}"
|
||||
Style="{StaticResource BTLPartList_TextBlock}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Style="{StaticResource TableView_StackPanel}">
|
||||
<Button Command="{Binding Tag.Data_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
CommandParameter="{Binding Path=Name}"
|
||||
ToolTip="{Binding Tag.Data_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
Style="{StaticResource BTLPartList_Button}">
|
||||
<Image Source="{StaticResource Adjustment_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Command="{Binding Tag.AddPart_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
CommandParameter="{Binding Path=Name}"
|
||||
ToolTip="{Binding Tag.AddPart_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
Style="{StaticResource BTLPartList_Button}">
|
||||
<Image Source="{StaticResource AddPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Command="{Binding Tag.UpdateBTL_Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
CommandParameter="{Binding Path=Name}"
|
||||
ToolTip="{Binding Tag.UpdateBTL_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
Style="{StaticResource BTLPartList_Button}">
|
||||
<Image Source="{StaticResource UpdateBTL_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid Style="{StaticResource TableView_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<dxg:GridGroupExpandButton IsChecked="{Binding IsRowExpanded}"
|
||||
Command="{Binding View.Commands.ChangeGroupExpanded}"
|
||||
CommandParameter="{Binding RowHandle.Value}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding GroupValue.Value, Converter={StaticResource ProjIdToBtlFileName}}"
|
||||
Style="{StaticResource BTLPartList_TextBlock}"/>
|
||||
<StackPanel Grid.Column="2"
|
||||
Style="{StaticResource TableView_StackPanel}">
|
||||
<Button Command="{Binding Tag.Data_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
CommandParameter="{Binding GroupValue.Value}"
|
||||
ToolTip="{Binding Tag.Data_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
Style="{StaticResource BTLPartList_Button}">
|
||||
<Image Source="{StaticResource Adjustment_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Command="{Binding Tag.AddPart_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
CommandParameter="{Binding GroupValue.Value}"
|
||||
ToolTip="{Binding Tag.AddPart_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
Style="{StaticResource BTLPartList_Button}">
|
||||
<Image Source="{StaticResource AddPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Command="{Binding Tag.UpdateBTL_Command, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
CommandParameter="{Binding GroupValue.Value}"
|
||||
ToolTip="{Binding Tag.UpdateBTL_ToolTip, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:BTLPartListV}}}"
|
||||
Style="{StaticResource BTLPartList_Button}">
|
||||
<Image Source="{StaticResource UpdateBTL_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</dxg:TableView.GroupRowTemplate>
|
||||
</dxg:TableView>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count"
|
||||
FieldName="nPDN"
|
||||
DisplayFormat="{}{0}"/>
|
||||
<dxg:GridSummaryItem FieldName="nPDN"
|
||||
SummaryType="Count"
|
||||
DisplayFormat="{}{0}">
|
||||
<dxg:GridSummaryItem.FixedTotalSummaryElementStyle>
|
||||
<Style TargetType="Run">
|
||||
<Setter Property="Text" >
|
||||
<Setter.Value>
|
||||
<MultiBinding Mode="OneWay" StringFormat="Records = {0} of {1}">
|
||||
<Binding Path="Value" />
|
||||
<Binding ElementName="dxGrid" Path="ItemsSource.Count" />
|
||||
</MultiBinding>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</dxg:GridSummaryItem.FixedTotalSummaryElementStyle>
|
||||
</dxg:GridSummaryItem>
|
||||
<dxg:GridSummaryItem SummaryType="Sum"
|
||||
FieldName="sCNT"
|
||||
DisplayFormat="{}{0}"/>
|
||||
@@ -136,33 +209,6 @@
|
||||
ShowInGroupColumnFooter="nDONE"/>
|
||||
</dxg:GridControl.GroupSummary>
|
||||
<dxg:GridControl.DetailDescriptor>
|
||||
<!--<dxg:DataControlDetailDescriptor ItemsSourceBinding="{Binding BTLFeatureVMList}">
|
||||
<dxg:DataControlDetailDescriptor.DataControl>
|
||||
<dxg:GridControl>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView AutoWidth="False"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="nPRID" AllowSorting="False"/>
|
||||
<dxg:GridColumn FieldName="bDO" AllowSorting="False"/>
|
||||
<dxg:GridColumn FieldName="nSelGRP" AllowSorting="False"/>
|
||||
<dxg:GridColumn FieldName="nPRC" AllowSorting="False"/>
|
||||
<dxg:GridColumn FieldName="sName" AllowSorting="False"/>
|
||||
<dxg:GridColumn FieldName="sName" AllowSorting="False" Width="Auto">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dx:DropDownButton Content="⋮">
|
||||
<StackPanel>
|
||||
<Button Content="Modifica" />
|
||||
<Button Content="Elimina" />
|
||||
</StackPanel>
|
||||
</dx:DropDownButton>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl>
|
||||
</dxg:DataControlDetailDescriptor.DataControl>
|
||||
|
||||
</dxg:DataControlDetailDescriptor>-->
|
||||
<dxg:ContentDetailDescriptor>
|
||||
<dxg:ContentDetailDescriptor.ContentTemplate>
|
||||
<DataTemplate>
|
||||
@@ -179,14 +225,15 @@
|
||||
<ListBox Grid.Column="1"
|
||||
ItemsSource="{Binding BTLFeatureVMList}"
|
||||
SelectedItem="{Binding SelBTLFeatureVM, UpdateSourceTrigger=PropertyChanged}"
|
||||
PreviewMouseDown="ListBox_PreviewMouseDown"
|
||||
Style="{StaticResource BTLPartList_ListBox}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Vertical"
|
||||
MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type EgwWPFBaseLib:EgwDataGrid}},
|
||||
MaxHeight="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type dxg:GridControl}},
|
||||
Converter={StaticResource FractionHeightConverter},
|
||||
ConverterParameter={StaticResource FeatureWrapPanelHeight}}"
|
||||
MinHeight="{Binding Parent.Children[0].ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"/>
|
||||
MinHeight="{Binding Parent.Children[0].ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type dxg:GridControl}}}"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ContextMenu>
|
||||
@@ -224,7 +271,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding nPRID}"
|
||||
Style="{StaticResource Prod_TextBlock}"/>
|
||||
Style="{StaticResource Prod_TextBlock}"/>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -239,6 +286,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.ColumnSpan="2"
|
||||
Text="⭯"
|
||||
Visibility="{Binding CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROTFeature_TextBlock}"/>
|
||||
|
||||
@@ -291,8 +339,12 @@
|
||||
<dxg:GridColumn FieldName="Section.sSectionXMaterial"
|
||||
Visible="False"/>
|
||||
<dxg:GridColumn FieldName="nPDN"
|
||||
DefaultSortOrder="Ascending"
|
||||
Fixed="Left"
|
||||
FilterPopupMode="CheckedList"
|
||||
SortOrder="Ascending"
|
||||
Header="{Binding PDN_Msg}"
|
||||
Style="{StaticResource ColumnPDNStyle}"/>
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="GlobalState"
|
||||
Header=""
|
||||
SortFieldName="nGlobalState"
|
||||
@@ -352,26 +404,34 @@
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sW"
|
||||
SortFieldName="dW"
|
||||
Header="{Binding W_Msg}"
|
||||
SortFieldName="dW"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="Custom"
|
||||
CustomColumnFilterPopupTemplate="{StaticResource SectMat_Filter}"
|
||||
Style="{StaticResource ColumnInfoCustomStyle}"/>
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sH"
|
||||
SortFieldName="dH"
|
||||
Header="{Binding H_Msg}"
|
||||
SortFieldName="dH"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="Custom"
|
||||
CustomColumnFilterPopupTemplate="{StaticResource SectMat_Filter}"
|
||||
Style="{StaticResource ColumnInfoCustomStyle}"/>
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
SortFieldName="dL"
|
||||
Header="{Binding L_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sNAM"
|
||||
Header="{Binding NAM_Msg}"
|
||||
Style="{StaticResource ColumnInfoCheckedListStyle}"/>
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="CheckedList"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMATERIAL"
|
||||
Header="{Binding MAT_Msg}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="Custom"
|
||||
CustomColumnFilterPopupTemplate="{StaticResource SectMat_Filter}"
|
||||
Style="{StaticResource ColumnInfoCustomStyle}"/>
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sCNT"
|
||||
Header="{Binding CNT_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
@@ -386,11 +446,19 @@
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sGROUP"
|
||||
Header="{Binding GRP_Msg}"
|
||||
Style="{StaticResource ColumnInfoCheckedListStyle}"/>
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="CheckedList"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sSTOREY"
|
||||
Header="{Binding STOREY_Msg}"
|
||||
Style="{StaticResource ColumnInfoCheckedListStyle}"/>
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="CheckedList"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sROTATED"
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
Image="{StaticResource HeaderRotate_Image}"
|
||||
HeaderToolTip="{Binding ForwardRotation_ToolTip}"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
@@ -398,11 +466,15 @@
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding RowData.Row.sROTATED}"
|
||||
Style="{StaticResource Rotate_TextBlock}"/>
|
||||
<!--segnaposto per avere larghezza colonna-->
|
||||
<TextBlock Text="888°"
|
||||
Visibility="Hidden"
|
||||
Style="{StaticResource Rotate_TextBlock}"/>
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding RowData.Row.ForwardRotation_Command}"
|
||||
ToolTip="{Binding RowData.Row.ForwardRotation_ToolTip}"
|
||||
@@ -415,6 +487,10 @@
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="IsInverted"
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
Image="{StaticResource HeaderInversion_Image}"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
@@ -425,6 +501,10 @@
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Verify"
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
Image="{StaticResource HeaderVerify_Image}"
|
||||
HeaderToolTip="{Binding Verify_ToolTip}"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
@@ -440,6 +520,10 @@
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="AddToRaw"
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
Image="{StaticResource HeaderAddToRawPart_Image}"
|
||||
HeaderToolTip="{Binding AddToRawPart_ToolTip}"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
@@ -455,6 +539,10 @@
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Setting"
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
Image="{StaticResource HeaderSetting_Image}"
|
||||
HeaderToolTip="{Binding Settings_Command_ToolTip}"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
@@ -472,6 +560,6 @@
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -16,6 +16,10 @@ Public Class BTLPartListV
|
||||
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Private _lastExpanded As Integer = -1
|
||||
|
||||
Private bSelOnFeature As Boolean = False
|
||||
|
||||
Sub New()
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
@@ -24,21 +28,35 @@ Public Class BTLPartListV
|
||||
'm_isDraggingSelectionField = m_DataGridType.GetField("_isDraggingSelection", BindingFlags.Instance Or BindingFlags.NonPublic)
|
||||
'm_endDraggingMethod = m_DataGridType.GetMethod("EndDragging", BindingFlags.Instance Or BindingFlags.NonPublic)
|
||||
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\NewDataGridLayoutFile.json"
|
||||
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 aggiuntivi da scrivere in Json colonne tabella
|
||||
Private Sub OnAllowProperty(ByVal sender As Object, ByVal e As AllowPropertyEventArgs)
|
||||
' 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)
|
||||
@@ -48,14 +66,14 @@ Public Class BTLPartListV
|
||||
If bValue AndAlso BTLPart_GridControl.GroupSummary.Count = 0 Then
|
||||
BTLPart_GridControl.GroupSummary.Clear()
|
||||
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nPDN",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "nPDN"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "nPDN"}
|
||||
BTLPart_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
BTLPart_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
|
||||
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
|
||||
.DisplayFormat = "{0}",
|
||||
@@ -63,14 +81,14 @@ Public Class BTLPartListV
|
||||
.ShowInGroupColumnFooter = "sADDED"}
|
||||
BTLPart_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
|
||||
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nINPROD",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nINPROD"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nINPROD"}
|
||||
BTLPart_GridControl.GroupSummary.Add(INPRODGroupSummaryItem)
|
||||
Dim DONEGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nDONE",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nDONE"}
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nDONE"}
|
||||
BTLPart_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
|
||||
End If
|
||||
BTLPart_TableView.ShowGroupFooters = bValue
|
||||
@@ -144,25 +162,6 @@ Public Class BTLPartListV
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PartList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
If e.ChangedButton = MouseButton.Left Then
|
||||
If TypeOf sender Is DataGridRow Then
|
||||
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count <> 1 Then Return
|
||||
Dim Row As DataGridRow = DirectCast(sender, DataGridRow)
|
||||
If TypeOf Row.DataContext IsNot BTLPartVM Then Return
|
||||
Dim BTLPartVM As BTLPartVM = DirectCast(Row.DataContext, BTLPartVM)
|
||||
Dim DataGridDetailsPresenter As Object = TreeHelperManager.FindVisualParents(Of Button, CheckBox, Primitives.DataGridDetailsPresenter)(e.OriginalSource)
|
||||
If Not IsNothing(DataGridDetailsPresenter) Then Return
|
||||
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Contains(BTLPartVM) Then
|
||||
BTLPartVM.SetOpenFeatureList(Not BTLPartVM.bOpenFeatureList)
|
||||
End If
|
||||
If Not IsNothing(Row) AndAlso Row.IsSelected AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.BTLStructureVM.SelBTLPart.Equals(BTLPartVM) Then
|
||||
Map.refProjectVM.BTLStructureVM.SelectBTLPart(BTLPartVM, True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ListBox_PreviewMouseWheel(ByVal sender As Object, ByVal e As MouseWheelEventArgs)
|
||||
' gestione dello scroll, per permetterlo anche quando mouse su RowDetails
|
||||
e.Handled = True
|
||||
@@ -221,6 +220,64 @@ Public Class BTLPartListV
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Private Sub FilterAllBtn_PreviewMouseDown(sender As Object, e As RoutedEventArgs)
|
||||
If FilterSectxMat_Popup.IsOpen Then
|
||||
FilterSectxMat_Popup.IsOpen = False
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FilterAllBtn_Click(sender As Object, e As RoutedEventArgs)
|
||||
If Not FilterSectxMat_Popup.IsOpen Then
|
||||
FilterSectxMat_Popup.IsOpen = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GridControl_MasterRowExpanding(sender As Object, e As DevExpress.Xpf.Grid.RowAllowEventArgs)
|
||||
Dim grid = CType(sender, DevExpress.Xpf.Grid.GridControl)
|
||||
|
||||
' Chiudi solo il precedente
|
||||
If _lastExpanded <> -1 AndAlso _lastExpanded <> e.RowHandle Then
|
||||
grid.SetMasterRowExpanded(_lastExpanded, False)
|
||||
End If
|
||||
|
||||
_lastExpanded = e.RowHandle
|
||||
End Sub
|
||||
|
||||
Private Sub BTLPart_TableView_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
bSelOnFeature = False
|
||||
End Sub
|
||||
|
||||
Private Sub ListBox_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
bSelOnFeature = True
|
||||
End Sub
|
||||
|
||||
Public Sub HandleDelete(e As KeyEventArgs)
|
||||
Dim BTLStructureVM As BTLStructureVM = TryCast(Me.Tag, BTLStructureVM)
|
||||
If IsNothing(BTLStructureVM) Then Return
|
||||
|
||||
Dim SelBTLPart As BTLPartVM = BTLStructureVM.SelBTLPart
|
||||
Dim SelBTLFeatureVM As BTLFeatureVM = SelBTLPart?.SelBTLFeatureVM
|
||||
|
||||
If bSelOnFeature AndAlso Not IsNothing(SelBTLFeatureVM) Then
|
||||
If SelBTLFeatureVM.DeleteFeature_Command.CanExecute(Nothing) Then
|
||||
SelBTLFeatureVM.DeleteFeature_Command.Execute(Nothing)
|
||||
e.Handled = True
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
If BTLStructureVM.DeletePart_Command.CanExecute(Nothing) Then
|
||||
BTLStructureVM.DeletePart_Command.Execute(Nothing)
|
||||
e.Handled = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BTLPart_GridControl_CurrentItemChanged(sender As Object, e As CurrentItemChangedEventArgs)
|
||||
CType(e.Source, GridControl).View.FocusedRowHandle = -1
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class SettingsBtnVerticalOffsetMultiConverter
|
||||
@@ -234,5 +291,4 @@ Public Class SettingsBtnVerticalOffsetMultiConverter
|
||||
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As Globalization.CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -65,6 +65,17 @@ Public Class BTLPartListVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CALCPanel_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property CALCPanel_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_CALCPanel_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetCALCPanel_IsEnabled(value As Boolean)
|
||||
m_CALCPanel_IsEnabled = value
|
||||
NotifyPropertyChanged(NameOf(CALCPanel_IsEnabled))
|
||||
End Sub
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property PDN_Msg As String
|
||||
@@ -189,6 +200,16 @@ Public Class BTLPartListVM
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdVerifyAll As ICommand
|
||||
Private m_cmdVerifyFlipRotAll As ICommand
|
||||
Private m_cmdResetCalc As ICommand
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdVerifyAll As ICommand
|
||||
Private m_cmdVerifyFlipRotAll As ICommand
|
||||
Private m_cmdResetCalc As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -215,6 +236,84 @@ Public Class BTLPartListVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "VerifyAll"
|
||||
|
||||
Public ReadOnly Property VerifyAll_Command As ICommand
|
||||
Get
|
||||
If m_cmdVerifyAll Is Nothing Then
|
||||
m_cmdVerifyAll = New Command(AddressOf VerifyAll)
|
||||
End If
|
||||
Return m_cmdVerifyAll
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub VerifyAll()
|
||||
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
|
||||
' imposto flag per calcolo
|
||||
Map.refCALCPanelVM.SetCalculating(True)
|
||||
For Each BTLPartItem As BTLPartVM In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
BTLPartItem.SetIsRowEnabled(False)
|
||||
Next
|
||||
Map.refCALCPanelVM.VerifyAll(ProjectType.PROJ, CalcIntegration.CmdTypes.CHECKNOSIM)
|
||||
Return
|
||||
End Sub
|
||||
|
||||
#End Region ' VerifyAll
|
||||
|
||||
#Region "VerifyAllFlipRot"
|
||||
|
||||
Public ReadOnly Property VerifyAllFlipRot_Command As ICommand
|
||||
Get
|
||||
If m_cmdVerifyFlipRotAll Is Nothing Then
|
||||
m_cmdVerifyFlipRotAll = New Command(AddressOf VerifyAllFlipRot)
|
||||
End If
|
||||
Return m_cmdVerifyFlipRotAll
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub VerifyAllFlipRot()
|
||||
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
|
||||
' imposto flag per calcolo
|
||||
Map.refCALCPanelVM.SetCalculating(True)
|
||||
For Each BTLPartItem As BTLPartVM In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
BTLPartItem.SetIsRowEnabled(False)
|
||||
Next
|
||||
Map.refCALCPanelVM.VerifyAll(ProjectType.PROJ, CalcIntegration.CmdTypes.FLIP_ROT)
|
||||
Return
|
||||
End Sub
|
||||
|
||||
#End Region ' VerifyAllRotate
|
||||
|
||||
#Region "ResetCalc"
|
||||
|
||||
Public ReadOnly Property ResetCalc_Command As ICommand
|
||||
Get
|
||||
If m_cmdResetCalc Is Nothing Then
|
||||
m_cmdResetCalc = New Command(AddressOf ResetCalc)
|
||||
End If
|
||||
Return m_cmdResetCalc
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ResetCalc()
|
||||
If (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM)) Then Return
|
||||
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = True
|
||||
Map.refCALCPanelVM.SetCalculating(False)
|
||||
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
|
||||
If Part.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' resetto stato dei calcoli
|
||||
Part.ResetCalcTotalPart()
|
||||
End If
|
||||
If Not Part.IsRowEnabled Then Part.SetIsRowEnabled(True)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' ResetCalc
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
Class DataGridCellBorderThicknessConverter
|
||||
|
||||
@@ -2,110 +2,107 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||
|
||||
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.FeatureVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
SelectedItem="{Binding Tag.SelFeatureVM,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
SelectionMode="Single"
|
||||
Margin="0,0,0,5"
|
||||
ColumnLayouts="{Binding FeatureInPartInRawPartColumns}"
|
||||
BeginningEdit="FeatureInPartInRawPartList_BeginningEdit"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
<DataGrid.Resources>
|
||||
<DataGridTemplateColumn x:Key="colDO">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bDO, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--Validità feature-->
|
||||
<DataGridTemplateColumn x:Key="colCALC">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding Calc_Background}"/>
|
||||
<Grid Grid.Column="1"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Visibility="{Binding CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROT_TextBlock}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding CALC_ERR_Letter}"
|
||||
Foreground="{Binding CALC_ERR_Foreground}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
<dxg:GridControl x:Name="FeatureVMList_GridControl"
|
||||
ItemsSource="{Binding Tag.FeatureVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
SelectedItem="{Binding Tag.SelFeatureVM,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="FeatureVMList_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="bDO"
|
||||
SortFieldName="bDO"
|
||||
Header=""
|
||||
Fixed="Left"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
|
||||
IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.HeaderTemplate>
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bDO}"
|
||||
IsEnabled="{Binding RowData.Row.IsEnabled}"
|
||||
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="GlobalState"
|
||||
Header=""
|
||||
SortFieldName="nGlobalState"
|
||||
AllowColumnFiltering="False">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding RowData.Row.Calc_Background}"/>
|
||||
<Grid Grid.Column="1"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROT_TextBlock}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding RowData.Row.CALC_ERR_Letter}"
|
||||
Foreground="{Binding RowData.Row.CALC_ERR_Foreground}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn x:Key="colPRIORITY" Binding="{Binding sPriority}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Priority_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--STR - Strategia-->
|
||||
<DataGridTemplateColumn x:Key="colSTRATEGY">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Strategia"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button ToolTip="{Binding Strategy_ToolTip}"
|
||||
Command="{Binding Strategy_Command}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Button}">
|
||||
<Image Source="{StaticResource Verify_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Resources>
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sDesc"
|
||||
Header="{Binding Description_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sPriority"
|
||||
Header="{Binding Priority_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="Strategy"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderEdit_Image}"
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RowData.Row.Strategy_Command}"
|
||||
IsEnabled="{Binding RowData.Row.IsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.Strategy_ToolTip}">
|
||||
<Image Source="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,7 +1,118 @@
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class FeatureInPartInRawPartListV
|
||||
|
||||
Private m_FeatureInPartInRawPartListVM As FeatureInPartInRawPartListVM
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\FeatureInPartInRawPart.json"
|
||||
|
||||
For Each Column In FeatureVMList_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
|
||||
FeatureVMList_GridControl.Columns("sPriority").Visible = False
|
||||
|
||||
DXSerializer.AddAllowPropertyHandler(FeatureVMList_GridControl, AddressOf OnAddAllowProperty)
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
|
||||
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
|
||||
e.Allow = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.Property.Name = "FilterString" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilters" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilterList" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
|
||||
e.Allow = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' salvataggio del layout colonne
|
||||
Public Sub SaveStatisticGridControlLayout()
|
||||
FeatureVMList_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_FeatureInPartInRawPartListVM = Me.DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_FeatureInPartInRawPartListVM.refFeatureInPartInRawPartListGridControlLayout = AddressOf SaveStatisticGridControlLayout
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
FeatureVMList_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||
End If
|
||||
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
|
||||
FeatureVMList_TableView.ShowGroupFooters = False
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (FeatureVMList_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(FeatureVMList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(FeatureVMList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
FeatureVMList_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
' funzione che impedisce di editare le righe che sono gia' in produzione
|
||||
Private Sub FeatureInPartInRawPartList_BeginningEdit(sender As Object, e As DataGridBeginningEditEventArgs)
|
||||
If IsNothing(e.Row) Then Return
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class FeatureInPartInRawPartListVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public refFeatureInPartInRawPartListGridControlLayout As Action
|
||||
|
||||
Private m_colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||
Public ReadOnly Property colFeatureInPartInRawPart_Do As EgwWPFBaseLib.ColumnLayout
|
||||
Get
|
||||
|
||||
@@ -2,9 +2,22 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||
|
||||
<Grid Margin="5">
|
||||
<Grid Style="{StaticResource BlockedWnd_Grid}">
|
||||
<Grid.Resources>
|
||||
<OPTIMIZER:TrimmedTextBlockVisibilityConverter x:Key="TrimToVisConverter" />
|
||||
</Grid.Resources>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -13,118 +26,66 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgwWPFBaseLib:EgwDataGrid CanUserDeleteRows="False"
|
||||
SelectionMode="Single"
|
||||
Margin="0,0,0,5"
|
||||
ItemsSource="{Binding Tag.PBTLParamVMList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||
SelectedItem="{Binding Tag.SelPBTLParam, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||
IsEnabled="{Binding PParameterList_IsEnabled}"
|
||||
ColumnLayouts="{Binding PParameterListColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource PParam_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<EventSetter Event="PreviewMouseDown" Handler="PParameterList_PreviewMouseDown"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.Resources>
|
||||
<OPTIMIZER:TrimmedTextBlockVisibilityConverter x:Key="TrimToVisConverter" />
|
||||
<!--Custom-->
|
||||
<DataGridTemplateColumn x:Key="colCUSTOM">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DataContext.Custom_Msg, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bCustom, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
Style="{StaticResource PParameters_CheckBox}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--Nome-->
|
||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding sName}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Descrizione-->
|
||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sDescription}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Description_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"
|
||||
Style="{StaticResource Prod_TextBlock}">
|
||||
<TextBlock.ToolTip>
|
||||
<ToolTip Style="{StaticResource PParameters_ToolTip}">
|
||||
<ToolTip.Content>
|
||||
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content.Text}"
|
||||
Style="{StaticResource Prod_TextBlock}"/>
|
||||
</ToolTip.Content>
|
||||
</ToolTip>
|
||||
</TextBlock.ToolTip>
|
||||
</TextBlock>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}" />
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_FountainBlue}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Valore-->
|
||||
<DataGridTextColumn x:Key="colVALUE" Binding="{Binding sValue}" SortMemberPath="dValue">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Value_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="FontWeight" Value="Bold" />
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}" />
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_FountainBlue}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Minimo-->
|
||||
<DataGridTextColumn x:Key="colMIN" Binding="{Binding sMin, Mode=OneWay}" SortMemberPath="dMin">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Min_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--Massimo-->
|
||||
<DataGridTextColumn x:Key="colMAX" Binding="{Binding sMax, Mode=OneWay}" SortMemberPath="dMax">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Max_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Resources>
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
<dxg:GridControl x:Name="PParameterList_GridControl"
|
||||
ItemsSource="{Binding Tag.PBTLParamVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||
SelectedItem="{Binding Tag.SelPBTLParam,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PParameterListV}}}"
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="PParameterList_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource EditTableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="bCustom"
|
||||
Header="{Binding Custom_Msg}"
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bCustom}"
|
||||
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sName"
|
||||
Header="{Binding NAM_Msg}"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sDescription"
|
||||
Header="{Binding Description_Msg}"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sValue"
|
||||
SortFieldName="dValue"
|
||||
Header="{Binding Value_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sMin"
|
||||
SortFieldName="dMin"
|
||||
Header="{Binding Min_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMax"
|
||||
SortFieldName="dMaxn"
|
||||
Header="{Binding Max_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>
|
||||
|
||||
<Image Grid.Column="1"
|
||||
Source="{Binding sCurrDraw}"
|
||||
|
||||
@@ -1,4 +1,116 @@
|
||||
Public Class PParameterListV
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
|
||||
Public Class PParameterListV
|
||||
|
||||
Private m_PParameterListVM As PParameterListVM
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\PParameters.json"
|
||||
|
||||
For Each Column In PParameterList_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
|
||||
PParameterList_GridControl.Columns("bCustom").Visible = False
|
||||
|
||||
DXSerializer.AddAllowPropertyHandler(PParameterList_GridControl, AddressOf OnAddAllowProperty)
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
|
||||
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
|
||||
e.Allow = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.Property.Name = "FilterString" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilters" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilterList" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
|
||||
e.Allow = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' salvataggio del layout colonne
|
||||
Public Sub SaveStatisticGridControlLayout()
|
||||
PParameterList_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_PParameterListVM = Me.DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_PParameterListVM.refPParameterListGridControlLayout = AddressOf SaveStatisticGridControlLayout
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
PParameterList_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||
End If
|
||||
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (PParameterList_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(PParameterList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(PParameterList_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
PParameterList_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
Private Sub PParameterList_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
If TypeOf sender Is DataGridRow Then
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class PParameterListVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public refPParameterListGridControlLayout As Action
|
||||
|
||||
Private m_colPParam_Value As EgwWPFBaseLib.ColumnLayout
|
||||
Public ReadOnly Property colPParam_Value As EgwWPFBaseLib.ColumnLayout
|
||||
Get
|
||||
|
||||
@@ -1,62 +1,269 @@
|
||||
<UserControl x:Class="RawPartListV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
<Grid>
|
||||
<dxg:GridControl x:Name="RawPart_GridControl"
|
||||
ItemsSource="{Binding Tag.MachGroupVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
SelectionMode="Row"
|
||||
SelectedItem="{Binding Tag.SelectedMachGroup,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
|
||||
MasterRowExpanding="GridControl_MasterRowExpanding"
|
||||
MasterRowExpanded="RawPart_GridControl_MasterRowExpanded"
|
||||
CurrentItemChanged="RawPart_GridControl_CurrentItemChanged">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="RawPart_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.MachGroupVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
SelectedItem="{Binding Tag.SelectedMachGroup,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
CanUserDeleteRows="False"
|
||||
SelectionMode="Single"
|
||||
Margin="2.5,0,0,5"
|
||||
EnableRowVirtualization="True"
|
||||
EnableColumnVirtualization="True"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
|
||||
VirtualizingPanel.ScrollUnit="Pixel"
|
||||
RenderOptions.CachingHint="Cache"
|
||||
VirtualizingPanel.CacheLength="10"
|
||||
VirtualizingPanel.CacheLengthUnit="Pixel"
|
||||
ColumnLayouts="{Binding RawPartColumns}"
|
||||
BeginningEdit="RawPartList_BeginningEdit"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowBackground="{StaticResource BeamWall_BLackSqueeze}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
<EventSetter Event="PreviewMouseDown" Handler="RawPartRow_PreviewMouseDown"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsRowEnabled}" Value="False">
|
||||
<Setter Property="IsEnabled" Value="False"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource EditTableViewStyle}">
|
||||
</dxg:TableView>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count"
|
||||
FieldName="Name"
|
||||
DisplayFormat="{}{0}"/>
|
||||
</dxg:GridControl.TotalSummary>
|
||||
<dxg:GridControl.DetailDescriptor>
|
||||
<dxg:DataControlDetailDescriptor ItemsSourceBinding="{Binding PartVMList}"
|
||||
Margin="0,0,16,0">
|
||||
<dxg:GridControl x:Name="Part_GridControl" SelectionMode="Row"
|
||||
SelectedItem="{Binding Tag.SelectedMachGroup.SelPart,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="Part_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource RawPartHeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource EditTableViewStyle}">
|
||||
</dxg:TableView>
|
||||
|
||||
<DataGrid.Resources>
|
||||
<!--ID - Id gruppo-->
|
||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding Name}" SortMemberPath="nName">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.ID_Msg, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderBrush" Value="{Binding Search_Background}"/>
|
||||
<Setter Property="BorderThickness" Value="2,2,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Validità pezzo-->
|
||||
<DataGridTemplateColumn x:Key="colCALC">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="nPDN"
|
||||
Header="{Binding PDN_Msg}"
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="GlobalState"
|
||||
Header=""
|
||||
SortFieldName="nGlobalState"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="↓"
|
||||
Visibility="{Binding RowData.Row.CALC_FALL_Visibility}"
|
||||
Style="{StaticResource RawPartList_TextBlock}"/>
|
||||
<Border Grid.Column="1"
|
||||
Background="{Binding RowData.Row.Calc_Background}"
|
||||
Style="{StaticResource Calc_Border}"/>
|
||||
<Grid Grid.Column="2"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.ColumnSpan="2"
|
||||
Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROTFeatureRawPartList_TextBlock}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding RowData.Row.CALC_ERR_Letter}"
|
||||
Foreground="{Binding RowData.Row.CALC_ERR_Foreground}"
|
||||
Style="{StaticResource CALC_ERRRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sNAM"
|
||||
Header="{Binding NAM_Msg}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="CheckedList"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
SortFieldName="dL"
|
||||
Header="{Binding L_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sROTATED"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderRotateRawPart_Image}"
|
||||
HeaderToolTip="{Binding ForwardRotation_ToolTip}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding RowData.Row.sROT}"
|
||||
Style="{StaticResource Rotate_TextBlock}"/>
|
||||
<!--segnaposto per avere larghezza colonna-->
|
||||
<TextBlock Text="888°"
|
||||
Visibility="Hidden"
|
||||
Style="{StaticResource Rotate_TextBlock}"/>
|
||||
<Button Grid.Column="1"
|
||||
Command="{Binding RowData.Row.ForwardRotation_Command}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.ForwardRotation_ToolTip}">
|
||||
<Image Source="{StaticResource Rotate_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="IsInverted"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderInversionRawPart_Image}"
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bFLIP}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sPOSX"
|
||||
SortFieldName="dPOSX"
|
||||
Header="{Binding PosX_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sPOSY"
|
||||
SortFieldName="dPOSY"
|
||||
Header="{Binding PosY_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sOffset"
|
||||
SortFieldName="dOffset"
|
||||
Header="{Binding Offset_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sMATERIAL"
|
||||
Header="{Binding MAT_Msg}"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sGROUP"
|
||||
Header="{Binding GRP_Msg}"
|
||||
AllowSorting="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sSTOREY"
|
||||
Header="{Binding STOREY_Msg}"
|
||||
AllowSorting="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="MoveUp"
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RowData.Row.MoveUpPart_Command}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.MoveUpPart_ToolTip}">
|
||||
<Image Source="{StaticResource MoveUp_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="MoveDown"
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RowData.Row.MoveDownPart_Command}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.MoveDownPart_ToolTip}">
|
||||
<Image Source="{StaticResource MoveDown_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Remove"
|
||||
Header=""
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RowData.Row.RemovePart_Command}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.RemovePart_ToolTip}">
|
||||
<Image Source="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl>
|
||||
</dxg:DataControlDetailDescriptor>
|
||||
</dxg:GridControl.DetailDescriptor>
|
||||
|
||||
<dxg:GridColumn FieldName="Name"
|
||||
Header="{Binding ID_Msg}"
|
||||
SortFieldName="nName"
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="GlobalState"
|
||||
Header=""
|
||||
SortFieldName="nGlobalState"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Style="{StaticResource RawPartList_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -65,513 +272,176 @@
|
||||
<ColumnDefinition Width="15"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="↓"
|
||||
Visibility="{Binding CALC_FALL_Visibility}"
|
||||
Visibility="{Binding RowData.Row.CALC_FALL_Visibility}"
|
||||
Style="{StaticResource RawPartList_TextBlock}"/>
|
||||
<Border Grid.Column="1"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding Calc_Background}"/>
|
||||
Background="{Binding RowData.Row.Calc_Background}"
|
||||
Style="{StaticResource Calc_Border}"/>
|
||||
<Grid Grid.Column="2"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Visibility="{Binding CALC_ROT_Visibility}"
|
||||
<TextBlock Text="⭯"
|
||||
Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROTRawPartList_TextBlock}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding CALC_ERR_Letter}"
|
||||
Foreground="{Binding CALC_ERR_Foreground}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/>
|
||||
Text="{Binding RowData.Row.CALC_ERR_Letter}"
|
||||
Foreground="{Binding RowData.Row.CALC_ERR_Foreground}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--STARTCUT - Ritaglio iniziale-->
|
||||
<DataGridTextColumn x:Key="colSTARTCUT" Binding="{Binding sStartCut}" SortMemberPath="dStartCut">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sStartCut"
|
||||
Header="{Binding StartOffset_Msg}"
|
||||
Binding="{Binding sStartCut, Mode=TwoWay}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sW"
|
||||
Header="{Binding W_Msg}"
|
||||
Binding="{Binding sW}"
|
||||
SortFieldName="dW"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sH"
|
||||
Header="{Binding H_Msg}"
|
||||
Binding="{Binding sH}"
|
||||
SortFieldName="dH"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
Header="{Binding L_Msg}"
|
||||
Binding="{Binding sL, Mode=TwoWay}"
|
||||
SortFieldName="dL"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sPosZ"
|
||||
Header="{Binding PosZ_Msg}"
|
||||
Binding="{Binding sPosZ}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMATERIAL"
|
||||
Header="{Binding Material_Msg}"
|
||||
Binding="{Binding sMATERIAL}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUsage"
|
||||
Header="{Binding Used_Msg}"
|
||||
Binding="{Binding sUsage}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sWaste"
|
||||
Header="{Binding Waste_Msg}"
|
||||
Binding="{Binding sWaste}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="Verify"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderVerify_Image}"
|
||||
HeaderToolTip="{Binding Verify_ToolTip}"
|
||||
AllowSorting="False"
|
||||
Fixed="Right"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.StartOffset_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--W - Larghezza-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--H - Altezza-->
|
||||
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--L - Lunghezza-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--PosZ - Posizione in Z-->
|
||||
<DataGridTextColumn x:Key="colPOSZ" Binding="{Binding sPosZ}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosZ_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Material_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--% - % utilizzo-->
|
||||
<DataGridTextColumn x:Key="colUSAGE" Binding="{Binding sUsage}" SortMemberPath="dUsage">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Used_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--S - Scarti-->
|
||||
<DataGridTextColumn x:Key="colWASTE" Binding="{Binding sWaste}" SortMemberPath="dWaste">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Waste_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--VER - Verfica-->
|
||||
<DataGridTemplateColumn x:Key="colVERIFY">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{StaticResource HeaderVerify_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button ToolTip="{Binding Verify_ToolTip}"
|
||||
Command="{Binding Verify_Command}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource BTLPanel_Button}">
|
||||
<Button IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
Command="{Binding RowData.Row.Verify_Command}"
|
||||
ToolTip="{Binding RowData.Row.Verify_ToolTip}">
|
||||
<Image Source="{StaticResource Verify_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--SILMUL - Simula-->
|
||||
<DataGridTemplateColumn x:Key="colSIMUL">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Simulate"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderSimulate_Image}"
|
||||
HeaderToolTip="{Binding Verify_ToolTip}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="CAM"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button ToolTip="{Binding Simulate_ToolTip}"
|
||||
Command="{Binding Simulate_Command}"
|
||||
Style="{StaticResource BTLPanel_Button}">
|
||||
<Button IsEnabled="{Binding RowData.Row.Simulate_IsEnabled}"
|
||||
Command="{Binding RowData.Row.Simulate_Command}"
|
||||
ToolTip="{Binding RowData.Row.Simulate_ToolTip}">
|
||||
<Image Source="{StaticResource Simulate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--PROD - Produci-->
|
||||
<DataGridTemplateColumn x:Key="colPROD">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Prod"
|
||||
AllowSorting="False"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderProduceRawPart_Image}"
|
||||
HeaderToolTip="{Binding Verify_ToolTip}"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{StaticResource HeaderProduceRawPart_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding ProduceRawPart_Command}"
|
||||
ToolTip="{Binding ProduceRawPart_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource BTLPanel_Button}">
|
||||
<Button IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
Command="{Binding RowData.Row.ProduceRawPart_Command}"
|
||||
ToolTip="{Binding RowData.Row.ProduceRawPart_ToolTip}">
|
||||
<Image Source="{StaticResource ProduceRawPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
Style="{StaticResource PDF_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--OP - Setting-->
|
||||
<DataGridTemplateColumn x:Key="colSETTING">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Setting"
|
||||
Header=""
|
||||
Image="{StaticResource HeaderSetting_Image}"
|
||||
HeaderToolTip="{Binding Settings_Command_ToolTip}"
|
||||
AllowSorting="False"
|
||||
AllowColumnFiltering="False"
|
||||
Fixed="Right"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnButtonStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{StaticResource HeaderSetting_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
<dx:DropDownButton Glyph="{StaticResource Setting_Image}"
|
||||
IsEnabled="{Binding RowData.Row.ButtonIsEnabled}"
|
||||
ToolTip="{Binding RowData.Row.Settings_Command_ToolTip}"
|
||||
Style="{StaticResource DropDownButtonStyle}">
|
||||
<dx:DropDownButton.ArrowGlyph>
|
||||
<DrawingImage/>
|
||||
</dx:DropDownButton.ArrowGlyph>
|
||||
<OPTIMIZER:RawPartListPopUpV DataContext="{Binding Tag.SelectedMachGroup,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</dx:DropDownButton>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Click="Button_Click"
|
||||
ToolTip="{Binding Settings_Command_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource BTLPanel_Button}">
|
||||
<Image Source="{StaticResource Setting_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding Tag.SelectedMachGroup.DeleteMachGroup_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGrid.InputBindings>
|
||||
<DataGrid.RowDetailsTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<EgwWPFBaseLib:EgwDataGrid ItemsSource="{Binding Tag.SelectedMachGroup.PartVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
SelectedItem="{Binding Tag.SelectedMachGroup.SelPart,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
CanUserDeleteRows="False"
|
||||
CanUserSortColumns="False"
|
||||
SelectionMode="Single"
|
||||
Margin="15,0,0,5"
|
||||
BeginningEdit="PartInRawPartList_BeginningEdit"
|
||||
EnableRowVirtualization="True"
|
||||
EnableColumnVirtualization="True"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
|
||||
VirtualizingPanel.ScrollUnit="Pixel"
|
||||
RenderOptions.CachingHint="Cache"
|
||||
VirtualizingPanel.CacheLength="10"
|
||||
VirtualizingPanel.CacheLengthUnit="Pixel"
|
||||
ColumnLayouts="{Binding DataContext.PartInRawPartColumns, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"
|
||||
ColumnHeaderStyle="{StaticResource RawPart_DataGridColumnHeader}"
|
||||
GridLinesVisibility="None"
|
||||
BorderThickness="0"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
||||
Width="860"
|
||||
PreviewMouseWheel="EgwDataGrid_PreviewMouseWheel"
|
||||
HorizontalAlignment="Left"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
<EventSetter Event="PreviewMouseDown" Handler="PartInRawPartRow_PreviewMouseDown"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
<DataGrid.Resources>
|
||||
<!--PDN - Nome-->
|
||||
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderBrush" Value="{Binding Search_Background}"/>
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Validità pezzo-->
|
||||
<DataGridTemplateColumn x:Key="colCALC">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="↓"
|
||||
Visibility="{Binding CALC_FALL_Visibility}"
|
||||
Style="{StaticResource RawPartList_TextBlock}"/>
|
||||
<Border Grid.Column="1"
|
||||
Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
|
||||
Background="{Binding Calc_Background}"/>
|
||||
<Grid Grid.Column="2"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.ColumnSpan="2"
|
||||
Visibility="{Binding CALC_ROT_Visibility}"
|
||||
Style="{StaticResource CALC_ROTFeatureRawPartList_TextBlock}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding CALC_ERR_Letter}"
|
||||
Foreground="{Binding CALC_ERR_Foreground}"
|
||||
Style="{StaticResource CALC_ERRRawPartList_TextBlock}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--NAM - Descrizione-->
|
||||
<DataGridTextColumn x:Key="colNAM" Binding="{Binding sNAM}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--L - Lunghezza-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}" SortMemberPath="dL">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--ROT - Rotazione-->
|
||||
<DataGridTemplateColumn x:Key="colROT" SortMemberPath="dROT">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{StaticResource HeaderRotateRawPart_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sROT}"
|
||||
Style="{StaticResource ROT_TextBlock}"/>
|
||||
<Button Grid.Column="1"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Command="{Binding ForwardRotation_Command}"
|
||||
Style="{StaticResource Rotation_Button}">
|
||||
<Image Source="{StaticResource Rotate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--INV - Inversione-->
|
||||
<DataGridTemplateColumn x:Key="colFLIP">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<Image Source="{StaticResource HeaderInversionRawPart_Image}"
|
||||
Style="{StaticResource BTLPartList_Image}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsChecked="{Binding bFLIP, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--PosX - Posizione-->
|
||||
<DataGridTextColumn x:Key="colPOSX" Binding="{Binding sPOSX}" SortMemberPath="dPOSX">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosX_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="Blue" />
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--PosY - Posizione-->
|
||||
<DataGridTextColumn x:Key="colPOSY" Binding="{Binding sPOSY}" SortMemberPath="dPOSY">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.PosY_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--Off - Offset-->
|
||||
<DataGridTextColumn x:Key="colOFFSET" Binding="{Binding sOffset}" SortMemberPath="dOffset">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Offset_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
<DataGridTextColumn.EditingElementStyle>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_Blue}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.EditingElementStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--GRP - Gruppo-->
|
||||
<DataGridTextColumn x:Key="colGROUP" Binding="{Binding sGROUP}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.GRP_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--STOREY - Sottogruppo-->
|
||||
<DataGridTextColumn x:Key="colSTOREY" Binding="{Binding sSTOREY}">
|
||||
<DataGridTextColumn.Header>
|
||||
<TextBlock Text="{Binding Path=DataContext.STOREY_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}"/>
|
||||
</DataGridTextColumn.Header>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellDataGrid_CustomHighLight}">
|
||||
<Setter Property="BorderThickness" Value="2,4,0,2"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<!--MUP - MoveUp-->
|
||||
<DataGridTemplateColumn x:Key="colMOVEUP">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text=""/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding MoveUpPart_Command}"
|
||||
ToolTip="{Binding MoveUpPart_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource Move_Button}">
|
||||
<Image Source="{StaticResource MoveUp_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--MDW - MoveDown-->
|
||||
<DataGridTemplateColumn x:Key="colMOVEDOWN">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text=""/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding MoveDownPart_Command}"
|
||||
ToolTip="{Binding MoveDownPart_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource Move_Button}">
|
||||
<Image Source="{StaticResource MoveDown_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!--RM - Remove-->
|
||||
<DataGridTemplateColumn x:Key="colREMOVE">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text=""/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Command="{Binding RemovePart_Command}"
|
||||
ToolTip="{Binding RemovePart_ToolTip}"
|
||||
IsEnabled="{Binding ButtonIsEnabled}"
|
||||
Style="{StaticResource Move_Button}">
|
||||
<Image Source="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.InputBindings>
|
||||
<KeyBinding Key="Delete" Command="{Binding Tag.SelPart.DeletePart_Command,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RawPartListV}}}" />
|
||||
</DataGrid.InputBindings>
|
||||
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowDetailsTemplate>
|
||||
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,8 +1,113 @@
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.IO
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib.EgtInterface
|
||||
|
||||
Public Class RawPartListV
|
||||
|
||||
Private m_RawPartListVM As RawPartListVM
|
||||
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Private _lastExpanded As Integer = -1
|
||||
|
||||
Private bSelOnPart As Boolean = False
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\RawPart.json"
|
||||
|
||||
For Each Column In RawPart_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
For Each Column In Part_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
DXSerializer.AddAllowPropertyHandler(RawPart_GridControl, AddressOf OnAddAllowProperty)
|
||||
DXSerializer.AddAllowPropertyHandler(Part_GridControl, AddressOf OnAddAllowProperty)
|
||||
|
||||
RawPart_GridControl.Columns("sPosZ").Visible = False
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
|
||||
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
|
||||
e.Allow = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.Property.Name = "FilterString" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilters" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilterList" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
|
||||
e.Allow = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' salvataggio del layout colonne
|
||||
Public Sub SaveBTLPartGridControlLayout()
|
||||
RawPart_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_RawPartListVM = DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_RawPartListVM.refSaveBTLPartGridControlLayout = AddressOf SaveBTLPartGridControlLayout
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
RawPart_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||
End If
|
||||
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
|
||||
IsVisibleGroupSummary(False)
|
||||
End Sub
|
||||
|
||||
Public Sub IsVisibleGroupSummary(bValue As Boolean)
|
||||
If bValue AndAlso RawPart_GridControl.GroupSummary.Count = 0 Then
|
||||
RawPart_GridControl.GroupSummary.Clear()
|
||||
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nPDN",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "nPDN"}
|
||||
RawPart_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
RawPart_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
|
||||
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sADDED"}
|
||||
RawPart_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
|
||||
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nINPROD",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nINPROD"}
|
||||
RawPart_GridControl.GroupSummary.Add(INPRODGroupSummaryItem)
|
||||
Dim DONEGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nDONE",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nDONE"}
|
||||
RawPart_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
|
||||
End If
|
||||
RawPart_TableView.ShowGroupFooters = bValue
|
||||
End Sub
|
||||
|
||||
' funzione che permette di selezionare un RawPart anche quando gia' selezionato
|
||||
Private Sub RawPartRow_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Map.refProjectVM.BTLStructureVM.SelBTLPart.SetOpenFeatureList(False)
|
||||
@@ -38,13 +143,13 @@ Public Class RawPartListV
|
||||
parent = VisualTreeHelper.GetParent(parent)
|
||||
End While
|
||||
|
||||
If parent IsNot Nothing Then
|
||||
Dim popup As New RawPartListPopUpV()
|
||||
If Not IsNothing(popup) Then
|
||||
popup.PlacementTarget = btn ' Associa il popup al bottone
|
||||
popup.IsOpen = True ' Mostra il popup
|
||||
End If
|
||||
End If
|
||||
'If parent IsNot Nothing Then
|
||||
' Dim popup As New RawPartListPopUpV()
|
||||
' If Not IsNothing(popup) Then
|
||||
' popup.PlacementTarget = btn ' Associa il popup al bottone
|
||||
' popup.IsOpen = True ' Mostra il popup
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
' funzione che permette di selezionare un pezzo anche quando gia' selezionato
|
||||
@@ -81,4 +186,91 @@ Public Class RawPartListV
|
||||
.Source = sender})
|
||||
End Sub
|
||||
|
||||
' customizzazione ContextMenu del GridControl
|
||||
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (RawPart_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(e.Link.DataContext, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(e.Link.DataContext, GridColumnMenuInfo)
|
||||
If IsNothing(info) Then Return
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
RawPart_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
Private Sub GridControl_MasterRowExpanding(sender As Object, e As DevExpress.Xpf.Grid.RowAllowEventArgs)
|
||||
Dim grid = CType(sender, DevExpress.Xpf.Grid.GridControl)
|
||||
|
||||
' Chiudi solo il precedente
|
||||
If _lastExpanded <> -1 AndAlso _lastExpanded <> e.RowHandle Then
|
||||
grid.SetMasterRowExpanded(_lastExpanded, False)
|
||||
End If
|
||||
|
||||
_lastExpanded = e.RowHandle
|
||||
End Sub
|
||||
|
||||
Private Sub RawPart_GridControl_MasterRowExpanded(sender As Object, e As RowEventArgs)
|
||||
Dim masterGrid As GridControl = TryCast(sender, GridControl)
|
||||
|
||||
If masterGrid IsNot Nothing Then
|
||||
Dim detailGrid As GridControl = TryCast(masterGrid.GetDetail(e.RowHandle, masterGrid.DetailDescriptor), GridControl)
|
||||
|
||||
If Not IsNothing(detailGrid) Then
|
||||
If Not IsNothing(detailGrid) Then
|
||||
Dim colPosX As GridColumn = detailGrid.Columns("sPOSX")
|
||||
If Not IsNothing(colPosX) Then colPosX.Visible = False
|
||||
|
||||
Dim colPosY As GridColumn = detailGrid.Columns("sPOSY")
|
||||
If Not IsNothing(colPosY) Then colPosY.Visible = False
|
||||
|
||||
Dim colMat As GridColumn = detailGrid.Columns("sMATERIAL")
|
||||
If Not IsNothing(colMat) Then colMat.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RawPart_GridControl_CurrentItemChanged(sender As Object, e As CurrentItemChangedEventArgs)
|
||||
CType(e.Source, GridControl).View.FocusedRowHandle = -1
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class RawPartListVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Friend refSaveBTLPartGridControlLayout As Action
|
||||
|
||||
Private m_colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
||||
Public ReadOnly Property colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
||||
Get
|
||||
@@ -248,6 +250,12 @@ Public Class RawPartListVM
|
||||
m_colPartInRawPart_PosY = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSY)
|
||||
End Sub
|
||||
|
||||
Friend Sub Close()
|
||||
If Not IsNothing(refSaveBTLPartGridControlLayout) Then
|
||||
refSaveBTLPartGridControlLayout()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
Style="{StaticResource LeftPanel_Grid}">
|
||||
|
||||
@@ -17,132 +18,8 @@
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{StaticResource Optimizer_Border}"/>
|
||||
|
||||
<Grid Style="{StaticResource Verify_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button ToolTip="{Binding VerifyAll_ToolTip}"
|
||||
Command="{Binding VerifyAll_Command}"
|
||||
IsEnabled="{Binding VerifyAll_IsEnabled}"
|
||||
Style="{StaticResource Verify_Button}">
|
||||
<Image Source="{StaticResource VerifyAll_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="1"
|
||||
ToolTip="{Binding VerifyAll_ToolTip}"
|
||||
Command="{Binding VerifyAllFlipRot_Command}"
|
||||
IsEnabled="{Binding VerifyAll_IsEnabled}"
|
||||
Style="{StaticResource Verify_Button}">
|
||||
<Image Source="{StaticResource VerifyAllR_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="2"
|
||||
Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
IsEnabled="{Binding CALCPanel_IsEnabled}"
|
||||
Style="{StaticResource Verify_Button}">
|
||||
<Image Source="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="3"
|
||||
Name="FilterAllBtn"
|
||||
ToolTip="{Binding FilterAll_ToolTip}"
|
||||
Command="{Binding ShowPopUpFilterBtnCommand}"
|
||||
Style="{StaticResource Verify_Button}">
|
||||
<Image Source="{StaticResource AllFilter_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Popup IsOpen="{Binding IsFilterBtnOpen}"
|
||||
PlacementTarget="{Binding ElementName=FilterAllBtn}"
|
||||
Style="{StaticResource Filter_PopUp}">
|
||||
<UniformGrid Columns="5"
|
||||
Style="{StaticResource LeftPanel_UniformGrid}">
|
||||
<Expander Header="{Binding Section_Msg}">
|
||||
<ListBox ItemsSource="{Binding Tag.SectionList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelSection, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
DisplayMemberPath="sSectionXMaterial"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<Expander Grid.Column="1"
|
||||
Header="{Binding Group_Msg}"
|
||||
Style="{StaticResource LeftPanel_Expander}">
|
||||
<ListBox ItemsSource="{Binding Tag.GroupList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelGroup, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<Expander Grid.Column="2"
|
||||
Header="{Binding SubGroup_Msg}"
|
||||
Style="{StaticResource LeftPanel_Expander}">
|
||||
<ListBox ItemsSource="{Binding Tag.SubGroupList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelSubGroup, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<Expander Grid.Column="3"
|
||||
Header="{Binding ParType_Msg}"
|
||||
Style="{StaticResource LeftPanel_Expander}">
|
||||
<ListBox ItemsSource="{Binding Tag.SearchParamList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelSearchParam, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<Expander Grid.Column="4"
|
||||
Header="{Binding ParValue_Msg}"
|
||||
Style="{StaticResource LeftPanel_Expander}">
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Tag.SearchText, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource SearchText_TextBox}"/>
|
||||
</Expander>
|
||||
</UniformGrid>
|
||||
</Popup>
|
||||
<Expander Grid.Column="4"
|
||||
Header="{Binding Section_Msg}"
|
||||
Style="{StaticResource Section_Expander}">
|
||||
<ListBox ItemsSource="{Binding Tag.SectionList, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
SelectedItem="{Binding Tag.SelSection, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
DisplayMemberPath="sSectionXMaterial"
|
||||
Style="{StaticResource LeftPanel_ListBox}"
|
||||
ItemContainerStyle="{StaticResource AlternationIndex_ListBoxItem}"/>
|
||||
</Expander>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="5"
|
||||
Text="{Binding Tag.SearchText, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Style="{StaticResource LeftPanel_TextBox}"/>
|
||||
<Button Grid.Column="6" Visibility="Collapsed"
|
||||
Command="{Binding RotateAll_Command}"
|
||||
ToolTip="{Binding RotateAll_ToolTip}"
|
||||
IsEnabled="{Binding RotateAll_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource Rotate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="7" Visibility="Collapsed"
|
||||
Command="{Binding InvertAll_Command}"
|
||||
ToolTip="{Binding InvertAll_ToolTip}"
|
||||
IsEnabled="{Binding RotateAll_IsEnabled}"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource Inversion_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button Grid.Column="8" Visibility="Collapsed"
|
||||
Command="{Binding Edit_Command}"
|
||||
ToolTip="{Binding MultipleModify_ToolTip}"
|
||||
IsEnabled="{Binding RotateAll_IsEnabled}"
|
||||
Style="{StaticResource MacroFeaturen_Button}">
|
||||
<Image Source="{StaticResource Edit_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<OPTIMIZER:BTLPartListV Grid.Row="1"
|
||||
x:Name="PartList"
|
||||
DataContext="{StaticResource PartListVM}"
|
||||
Tag="{Binding Tag, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelV}}}"
|
||||
Margin="4,0,4,0"/>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Public Class LeftPanelV
|
||||
|
||||
Public Sub ForwardDelete(e As KeyEventArgs)
|
||||
PartList.HandleDelete(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -145,6 +145,12 @@ Public Class LeftPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property VerifyAllFlipRot_ToolTip As String
|
||||
Get
|
||||
Return EgtMsg(62000)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property FilterAll_ToolTip As String
|
||||
Get
|
||||
Return EgtMsg(62570)
|
||||
|
||||
@@ -7,6 +7,7 @@ Public Class MyMachGroupPanelVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public Property m_OldSelectedMachGroup As MyMachGroupVM
|
||||
Public Shadows Property SelectedMachGroup As MyMachGroupVM
|
||||
Get
|
||||
Return m_SelectedMachGroup
|
||||
@@ -29,7 +30,13 @@ Public Class MyMachGroupPanelVM
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not IsNothing(value) Then m_OldSelectedMachGroup = value
|
||||
|
||||
m_SelectedMachGroup = value
|
||||
|
||||
If IsNothing(m_SelectedMachGroup) Then m_SelectedMachGroup = m_OldSelectedMachGroup
|
||||
|
||||
If Not IsNothing(value) Then
|
||||
OnPreSetCurrMachGroup()
|
||||
EgtSetCurrMachGroup(value.Id)
|
||||
@@ -160,11 +167,11 @@ Public Class MyMachGroupPanelVM
|
||||
Dim Beam As PartVM = BeamMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nDuploId)
|
||||
EgtSetCurrMachGroup(BeamMachGroup.Id)
|
||||
Beam.DeletePart()
|
||||
' reset necessario per poter ottenere nMachGroupId corretto
|
||||
EgtResetCurrMachGroup()
|
||||
' aggiorno dati utilizzo barra
|
||||
BeamMachGroup.UpdateUsage()
|
||||
End If
|
||||
' reset necessario per poter ottenere nMachGroupId corretto
|
||||
EgtResetCurrMachGroup()
|
||||
' aggiorno dati utilizzo barra
|
||||
BeamMachGroup.UpdateUsage()
|
||||
Next
|
||||
' aggiorno quantita' in prod
|
||||
Dim BTLPart As BTLPartVM = CALCPanelVM.GetBTLPartVMFromBTLPartId(nPartId)
|
||||
@@ -197,7 +204,7 @@ Public Class MyMachGroupPanelVM
|
||||
End Function
|
||||
|
||||
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
|
||||
SelectedMachGroup = MachGroupVMList.FirstOrDefault(Function(x) x.MachGroupM Is MyMachGroupM)
|
||||
End Sub
|
||||
|
||||
@@ -803,6 +803,10 @@ Public Class MyMachGroupVM
|
||||
End If
|
||||
Part.nProduction_State = ItemState.ND
|
||||
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
|
||||
Dim Duplo As PartVM = CALCPanelVM.GetPartVMFromPartId(Part.nPartId)
|
||||
Duplo.ResetCalcTotalPart()
|
||||
@@ -818,6 +822,7 @@ Public Class MyMachGroupVM
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(IsReadOnly))
|
||||
NotifyPropertyChanged(NameOf(Background))
|
||||
NotifyPropertyChanged(NameOf(ButtonIsEnabled))
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshPartList_Tick()
|
||||
@@ -940,7 +945,7 @@ Public Class MyMachGroupVM
|
||||
|
||||
Friend Sub Verify()
|
||||
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)
|
||||
Return
|
||||
End Sub
|
||||
@@ -980,6 +985,7 @@ Public Class MyMachGroupVM
|
||||
.bBarOk = True,
|
||||
.nMachineName = MachineName,
|
||||
.nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
||||
.nBarState = SelMachGroup.nProduction_State,
|
||||
.nGlobState = SelMachGroup.nGlobalState}
|
||||
If SelMachGroup.nGlobalState = CalcStates.NOTCALCULATED Then
|
||||
Dim sMachGroupFilePath As String = ProjectManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe"
|
||||
|
||||
@@ -40,8 +40,12 @@ Public Class MainMenuVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value Then
|
||||
SelPage = Pages.OPTIMIZERPAGE
|
||||
SetConfigurationImagePath(CONFIGURATION_IMAGE)
|
||||
Dim bModify As Boolean = True
|
||||
If Map.refStrategyManagerVM.bIsModifyStrategy Then bModify = Map.refStrategyManagerVM.SaveCustomConfigJson()
|
||||
If bModify Then
|
||||
SelPage = Pages.OPTIMIZERPAGE
|
||||
SetConfigurationImagePath(CONFIGURATION_IMAGE)
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -269,8 +269,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId(sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2701, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2701, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 3106, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 3106, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
@@ -305,6 +305,37 @@ Public Class MainWindowM
|
||||
End While
|
||||
' Leggo file messaggi
|
||||
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
|
||||
EgtOutLog("Error in EgtLoadMessages")
|
||||
End If
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabItem>
|
||||
<OPTIMIZER:ProjectV DataContext="{StaticResource ProjectVM}"/>
|
||||
<OPTIMIZER:ProjectV x:Name="ProjectView" DataContext="{StaticResource ProjectVM}"/>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<OPTIMIZER:ConfigurationPageV DataContext="{DynamicResource ConfigurationPageVM}"/>
|
||||
|
||||
@@ -22,12 +22,20 @@ Public Class MainWindowV
|
||||
Me.SetPlacementAppName(S_GENERAL)
|
||||
Me.SetPlacementKeyName(K_WINPLACE)
|
||||
Me.SetPlacementFileName(IniFile.m_sIniFile)
|
||||
|
||||
Me.AddHandler(Keyboard.KeyDownEvent, New KeyEventHandler(AddressOf Global_KeyDown), True)
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub Global_KeyDown(sender As Object, e As KeyEventArgs)
|
||||
If e.Key = Key.Delete Then
|
||||
ProjectView.ForwardDelete(e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
' Carico e imposto posizione finestra
|
||||
WinPosFromIniToWindow(S_GENERAL, K_VIEWOPTIMWINPLACE, Me)
|
||||
@@ -43,6 +51,11 @@ Public Class MainWindowV
|
||||
e.Cancel = True
|
||||
Return
|
||||
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
|
||||
e.Cancel = True
|
||||
Return
|
||||
|
||||
@@ -269,7 +269,7 @@ Public Class MainWindowVM
|
||||
' recupero secondo parametro
|
||||
Dim sProdId As String = Environment.GetCommandLineArgs(2)
|
||||
If Not Integer.TryParse(sProdId, nProdId) OrElse nProdId <= 0 Then Return False
|
||||
nPage = Pages.MACHINING
|
||||
nPage = Pages.OPTIMIZERPAGE
|
||||
Return True
|
||||
Case 2 ' apri pagina specifica senza progetto specifico
|
||||
' recupero secondo parametro
|
||||
@@ -384,9 +384,12 @@ Public Class MainWindowVM
|
||||
' Gestisco eventuale file corrente modificato
|
||||
Dim bOk As Boolean = True
|
||||
Select Case Map.refMainMenuVM.SelPage
|
||||
Case Pages.CONFIGPROGRAM
|
||||
bOk = Map.refConfigurationPageVM.SaveConfigPage()
|
||||
Case Pages.CONFIG
|
||||
' Verifica modifica parametri Macchina e chiedo il salvataggio
|
||||
Map.refConfigurationPageVM.VerifyConfigPageModification()
|
||||
If Map.refStrategyManagerVM.bIsModifyStrategy Then
|
||||
bOk = Map.refStrategyManagerVM.SaveCustomConfigJson()
|
||||
End If
|
||||
Case Pages.OPTIMIZERPAGE
|
||||
bOk = ProdFileVM.VerifyProjectModification(ProjectManagerVM.CurrProd) <> MessageBoxResult.Cancel
|
||||
End Select
|
||||
@@ -428,6 +431,7 @@ Public Class MainWindowVM
|
||||
{S_PARAMETERLIST_P, Map.refPParameterListVM.PParameterListColumns}}
|
||||
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, DataGridColumnDictionary)
|
||||
Map.refPartListVM.Close()
|
||||
Map.refRawPartListVM.Close()
|
||||
|
||||
End If
|
||||
' Termino il Model
|
||||
|
||||
@@ -67,5 +67,5 @@ Imports System.Windows
|
||||
' Revision
|
||||
'
|
||||
|
||||
<Assembly: AssemblyVersion("3.1.5.2")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.2")>
|
||||
<Assembly: AssemblyVersion("3.1.7.1")>
|
||||
<Assembly: AssemblyFileVersion("3.1.7.1")>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<OPTIMIZER:LeftPanelV DataContext="{StaticResource LeftPanelVM}"
|
||||
<OPTIMIZER:LeftPanelV x:Name="LeftPanel" DataContext="{StaticResource LeftPanelVM}"
|
||||
Tag="{Binding DataContext.BTLStructureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"
|
||||
IsEnabled="{Binding DataContext.LeftPanel_IsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"
|
||||
Opacity="{Binding DataContext.LeftPanel_Opacity, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:LeftPanelTopV}}}"/>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Public Class LeftPanelTopV
|
||||
|
||||
Public Sub ForwardDelete(e As KeyEventArgs)
|
||||
LeftPanel.ForwardDelete(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
Style="{StaticResource Optimizer_Border}"
|
||||
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"/>
|
||||
<OPTIMIZER:FeatureInPartInRawPartListV DataContext="{StaticResource FeatureInPartInRawPartListVM}" Margin="5"
|
||||
Tag="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.SelPart, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"
|
||||
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"/>
|
||||
Tag="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.SelPart, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"
|
||||
Visibility="{Binding DataContext.FeatureList_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"/>
|
||||
<StackPanel Grid.Column="1"
|
||||
Style="{StaticResource Message_StackPanel}">
|
||||
<TextBlock Text="{Binding DataContext.MachGroupPanelVM.SelectedMachGroup.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelBottomV}}}"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
If Not IsNothing(Map.refProjectVM.SelStrategySetup) AndAlso Map.refProjectVM.SelStrategySetup.Equals(SelStrategy.Content) Then
|
||||
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
|
||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||
Map.refProjectVM.CustomGeneralParameters(SelStrategy.Content)
|
||||
Map.refProjectVM.SelStrategySetup = SelStrategy.Content
|
||||
End If
|
||||
|
||||
@@ -25,68 +25,57 @@
|
||||
<TextBlock Text="{Binding NAM_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sNAM, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sNAM, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding COUNT_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sCNT, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sCNT, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding ORDERNUM_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.nORDERNUM, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.nORDERNUM, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding PLANINGLEN_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.dPLANINGLEN, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.dPLANINGLEN, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding STARTOFFSET_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.dSTARTOFFSET, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.dSTARTOFFSET, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding ENDOFFSET_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.dENDOFFSET, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.dENDOFFSET, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding DESIGN_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sDESIGN, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sDESIGN, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding GROUP_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sGROUP, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sGROUP, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding STOREY_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sSTOREY, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sSTOREY, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding ANNOT_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sANNOT, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sANNOT, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding MATERIAL_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sMATERIAL, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sMATERIAL, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
</UniformGrid>
|
||||
|
||||
@@ -114,8 +103,7 @@
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding Tag.nCOLA, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.nCOLA, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@@ -126,38 +114,32 @@
|
||||
<TextBlock Text="{Binding TIMBERGRADE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sTIMBERGRADE, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sTIMBERGRADE, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding QUALITYGRADE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sQUALITYGRADE, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sQUALITYGRADE, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding PACKAGE_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sPACKAGE, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sPACKAGE, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding ASSEMBLYNUM_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sASSEMBLYNUM, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sASSEMBLYNUM, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding ELEMENTNUM_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sELEMENTNUM, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sELEMENTNUM, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding MODULENUM_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sMODULENUM, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sMODULENUM, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding PROCESSINGQUALITY_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
@@ -192,14 +174,12 @@
|
||||
<TextBlock Text="{Binding LAYER_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.nLAYER, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.nLAYER, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Text="{Binding COMMENT_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.sCOMMENT, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sCOMMENT, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
</UniformGrid>
|
||||
|
||||
@@ -275,8 +255,7 @@
|
||||
<TextBlock Text="{Binding GRAINDIRECTION_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Column="1"
|
||||
Text="{Binding Tag.GrainDirection, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.GrainDirection, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="{Binding GRAINDIRALIGN_MSG}"
|
||||
@@ -317,8 +296,7 @@
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding Tag.CamberParams, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.CamberParams, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@@ -350,8 +328,7 @@
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding Tag.PartOffsetParams, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.PartOffsetParams, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@@ -383,8 +360,7 @@
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding Tag.sMATERIALTYPESPEC, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.sMATERIALTYPESPEC, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@@ -455,24 +431,21 @@
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding Tag.TransfOrig, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.TransfOrig, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Grid.Row="2"
|
||||
Text="{Binding TRANSFVERSX_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Text="{Binding Tag.TransfVersX, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.TransfVersX, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
<TextBlock Grid.Row="3"
|
||||
Text="{Binding TRANSFVERSY_MSG}"
|
||||
Style="{StaticResource PartParam_TextBlock}"/>
|
||||
<EgtWPFLib5:EgtTextBox Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Text="{Binding Tag.TransfVersY, UpdateSourceTrigger=Explicit,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:PartParametersWndV}}}"
|
||||
Text="{Binding CurrPart.TransfVersY, UpdateSourceTrigger=LostFocus}"
|
||||
Style="{StaticResource PartParam_TextBox}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_PartParametersWndVM.m_CloseWindow
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -8,6 +8,13 @@ Public Class PartParametersWndVM
|
||||
|
||||
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
|
||||
Private m_cmdOk As ICommand
|
||||
|
||||
@@ -271,8 +278,8 @@ Public Class PartParametersWndVM
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
Sub New(CurrPart As BTLPartVM)
|
||||
m_CurrPart = CurrPart
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
@@ -1,49 +1,38 @@
|
||||
<Popup x:Class="RawPartListPopUpV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
Style="{StaticResource Filter_PopUp}">
|
||||
<Border Style="{StaticResource BTLPartManager_Border}">
|
||||
<StackPanel Style="{StaticResource BTLPartManager_StackPanel}">
|
||||
<!--COPY - Copia-->
|
||||
<Button Command="{Binding CopyRawPart_Command}"
|
||||
ToolTip="{Binding CopyRawPart_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource CopyRawPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<!--DELETE - Elimina-->
|
||||
<Button Command="{Binding RemoveRawPart_Command}"
|
||||
ToolTip="{Binding RemoveRawPart_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<!--CAM - CAM-->
|
||||
<Button ToolTip="{Binding Simulate_ToolTip}"
|
||||
Command="{Binding Simulate_Command}"
|
||||
Style="{StaticResource ToolBarViewPanel_Button}">
|
||||
<Image Source="{StaticResource Simulate_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<!--REORDER - Riordina-->
|
||||
<Button Command="{Binding ReOrderPart_Command}"
|
||||
ToolTip="{Binding ReOrderPart_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource ReOrderPart_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<!--RESET - Reset-->
|
||||
<Button Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
Click="ClosePopUp_Click"
|
||||
Style="{StaticResource LP_Button}">
|
||||
<Image Source="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Popup>
|
||||
<dxb:PopupMenu x:Class="RawPartListPopUpV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:dxt="http://schemas.devexpress.com/winfx/2008/xaml/core/themekeys"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
Background="{StaticResource Border.BTLPartManager.Background}"
|
||||
BorderBrush="{StaticResource Border.BTLPartManager.Border}"
|
||||
BorderThickness="2"
|
||||
CornerRadius="5"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
|
||||
<dxb:BarItemMenuHeader ShowContentHeader="False"
|
||||
ItemsOrientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<dxb:BarButtonItem Command="{Binding CopyRawPart_Command}"
|
||||
ToolTip="{Binding CopyRawPart_ToolTip}"
|
||||
Glyph="{StaticResource CopyRawPart_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||
<dxb:BarButtonItem Command="{Binding RemoveRawPart_Command}"
|
||||
ToolTip="{Binding RemoveRawPart_ToolTip}"
|
||||
Glyph="{StaticResource Remove_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||
<dxb:BarButtonItem Command="{Binding ReOrderPart_Command}"
|
||||
ToolTip="{Binding ReOrderPart_ToolTip}"
|
||||
Glyph="{StaticResource ReOrderPart_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||
<dxb:BarButtonItem Command="{Binding ResetCalc_Command}"
|
||||
ToolTip="{Binding ResetCalc_ToolTip}"
|
||||
Glyph="{StaticResource ResetCalc_Image}"
|
||||
Style="{StaticResource DropDownButton_BarButtonItem}"/>
|
||||
</dxb:BarItemMenuHeader>
|
||||
|
||||
</dxb:PopupMenu>
|
||||
|
||||
@@ -484,6 +484,8 @@ Public Class ProdManagerVM
|
||||
Map.refMyStatusBarVM.RefreshMachName()
|
||||
' Aggiorno titolo
|
||||
Map.refMainWindowVM.UpdateTitle()
|
||||
' Abilito scelta macchina
|
||||
Map.refCALCPanelVM.SetChooseMachine_IsEnabled(True)
|
||||
' Aggiungo a ButtonBuildingList i BTL
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Clear()
|
||||
If m_nListProjAsseBase.Count > 0 Then
|
||||
@@ -850,12 +852,13 @@ Public Class ProdManagerVM
|
||||
GeneralParametersWndVM.SetbSaveGeneralParameters(True)
|
||||
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.SaveInfoBTL(nType)
|
||||
|
||||
' leggo struttura BTL per liste
|
||||
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
|
||||
CopyBuilding()
|
||||
Dim sProjFileName As String = sProjDir & "\" & nProjId.ToString("0000") & ".nge"
|
||||
Dim bFirstPart As Boolean = EgtGetFirstPart() <> GDB_ID.NULL
|
||||
@@ -1120,7 +1123,7 @@ Public Class ProdManagerVM
|
||||
' imposto progetto corrente
|
||||
Dim OldProd As ProdFileVM = ProjectManagerVM.CurrProd
|
||||
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())
|
||||
' recupero indice di modifica progetto quando caricato
|
||||
Dim CommIndex As Integer = -1
|
||||
@@ -1199,6 +1202,8 @@ Public Class ProdManagerVM
|
||||
Map.refMyStatusBarVM.RefreshMachName()
|
||||
' Controllo se ci sono strategie modificate nei pezzi e mostro l'immagine della penna
|
||||
ModifyStrategyInfo(Map.refProjectVM.BTLStructureVM.BTLPartVMList)
|
||||
' Abilito scelta macchina
|
||||
Map.refCALCPanelVM.SetChooseMachine_IsEnabled(True)
|
||||
' Aggiungo a ButtonBuildingList i BTL
|
||||
Map.refSceneBuildingVM.ButtonBuildingList.Clear()
|
||||
If m_nListProjAsseBase.Count > 0 Then
|
||||
@@ -1327,7 +1332,7 @@ Public Class ProdManagerVM
|
||||
End Sub
|
||||
|
||||
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_bOpenProj = True
|
||||
End If
|
||||
@@ -1365,7 +1370,9 @@ Public Class ProdManagerVM
|
||||
While nPartLayerId <> GDB_ID.NULL
|
||||
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
|
||||
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)
|
||||
End While
|
||||
|
||||
@@ -1378,14 +1385,17 @@ Public Class ProdManagerVM
|
||||
While nIdF <> GDB_ID.NULL
|
||||
Dim Sou As Integer = 0
|
||||
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)
|
||||
End While
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(nListAsseBase(IdAsseBase), True)
|
||||
If IdAsseBase > 0 Then EgtSetStatus(nListAsseBase(IdAsseBase), GDB_ST.OFF)
|
||||
Dim nProj As Integer = 0
|
||||
EgtGetInfo(nListAsseBase(IdAsseBase), PROJ, nProj)
|
||||
m_nListProjAsseBase.Add(nProj, nListAsseBase(IdAsseBase))
|
||||
If EgtGetInfo(nListAsseBase(IdAsseBase), PROJ, nProj) AndAlso Not m_nListProjAsseBase.ContainsKey(nProj) Then
|
||||
m_nListProjAsseBase.Add(nProj, nListAsseBase(IdAsseBase))
|
||||
End If
|
||||
Next
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<OPTIMIZER:TopPanelV Grid.ColumnSpan="3"/>
|
||||
|
||||
<OPTIMIZER:LeftPanelTopV Grid.Row="1"/>
|
||||
<OPTIMIZER:LeftPanelTopV Grid.Row="1" x:Name="LeftPanelTop"/>
|
||||
|
||||
<GridSplitter Grid.Column="1"
|
||||
Grid.RowSpan="4"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Public Class ProjectV
|
||||
|
||||
Public Sub ForwardDelete(e As KeyEventArgs)
|
||||
LeftPanelTop.ForwardDelete(e)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -204,6 +204,7 @@ Public Class ProjectVM
|
||||
End Property
|
||||
Friend Sub SetFeatureListVisibility(bVisible As Boolean)
|
||||
m_FeatureList_Visibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
|
||||
If Not m_FeatureList_Visibility Then Map.refFeatureInPartInRawPartListVM.refFeatureInPartInRawPartListGridControlLayout()
|
||||
NotifyPropertyChanged(NameOf(FeatureList_Visibility))
|
||||
End Sub
|
||||
|
||||
@@ -319,6 +320,7 @@ Public Class ProjectVM
|
||||
If Not IsNothing(value) Then
|
||||
Map.refStrategyManagerVM.SelStrategySetup.sName = value
|
||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||
CustomGeneralParameters(value)
|
||||
End If
|
||||
m_SelStrategySetup = value
|
||||
@@ -328,6 +330,7 @@ Public Class ProjectVM
|
||||
Friend Sub SetSelStrategy(value As String)
|
||||
m_SelStrategySetup = value
|
||||
Map.refStrategyManagerVM.SelStrategySetup.Read()
|
||||
Map.refStrategyManagerVM.OrderStrategyList(Map.refStrategyManagerVM.SelStrategySetup.StrategyFeatureList)
|
||||
Map.refSceneHostVM.SaveProject()
|
||||
NotifyPropertyChanged(NameOf(SelStrategySetup))
|
||||
End Sub
|
||||
@@ -497,8 +500,8 @@ Public Class ProjectVM
|
||||
''' Funzione che permette di eliminare un pezzo modificato e reinserirlo nell'assemblato
|
||||
''' </summary>
|
||||
Friend Sub UpdatePart(nPartId As Integer)
|
||||
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPROJ)
|
||||
If IdAsseBase < 0 Then Return
|
||||
Dim IdAsseBase As Integer = 0
|
||||
If Not Map.refProdManagerVM.ListProjAsseBase.TryGetValue(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPROJ, IdAsseBase) Then Return
|
||||
Dim IdPart As Integer = 0
|
||||
Dim NewId As Integer = 0
|
||||
' Setto il nuovo contesto
|
||||
@@ -930,7 +933,7 @@ Public Class ProjectVM
|
||||
End Property
|
||||
|
||||
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()
|
||||
End Sub
|
||||
|
||||
@@ -950,6 +953,7 @@ Public Class ProjectVM
|
||||
Public Sub Back()
|
||||
SetRawPartManagerVisibility(True)
|
||||
If Not IsNothing(m_MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
|
||||
If Not IsNothing(Map.refPParameterListVM) Then Map.refPParameterListVM.refPParameterListGridControlLayout()
|
||||
SetStrategyManagerVisibility(False)
|
||||
SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
|
||||
SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 490 B |
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"
|
||||
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Core.EgtMessageBoxV.Show(Nothing, sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' Altrimenti manca la licenza
|
||||
Else
|
||||
EgtOutLog("Problems with Licence")
|
||||
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(10105) & vbCrLf & EgtMsg(10106)
|
||||
Dim sKeyInfo As String = "" : EgtGetKeyInfo(sKeyInfo)
|
||||
Dim sText As String = sKeyInfo & vbCrLf & EgtMsg(10105) & vbCrLf & EgtMsg(10106)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
If Core.EgtMessageBoxV.Show(Nothing, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
|
||||
' Apro dialogo per richiesta file licenza
|
||||
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.Title = EgtMsg(110026),
|
||||
|
||||
@@ -2,7 +2,17 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -17,163 +27,107 @@
|
||||
|
||||
<TabItem Header="OPTIMIZERSTATS">
|
||||
<TabItem.Content>
|
||||
<EgwWPFBaseLib:EgwDataGrid x:Name="dgOptimizerStatistics"
|
||||
ItemsSource="{Binding Tag.MachGroupPanelVM.MachGroupVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:OptimizerStatisticsV}}}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Extended"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="0,0,0,5"
|
||||
ColumnLayouts="{Binding OptimizerStatisticsColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.Resources>
|
||||
<!--Id - Nome-->
|
||||
<DataGridTextColumn x:Key="colNAME" Binding="{Binding Name}" SortMemberPath="nName">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.ID_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--W - Larghezza-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding dW}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--H - Altezza-->
|
||||
<DataGridTextColumn x:Key="colH" Binding="{Binding dH}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--L - Lunghezza-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding dL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--% - % utilizzo-->
|
||||
<DataGridTextColumn x:Key="colUSAGE" Binding="{Binding sUsage}" SortMemberPath="dUsage">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Used_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--S - Scarti-->
|
||||
<DataGridTextColumn x:Key="colWASTE" Binding="{Binding sWaste}" SortMemberPath="dWaste">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.Waste_Msg,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--CALCTIME - TEMPO UNITARIO STIMATO-->
|
||||
<DataGridTextColumn x:Key="colUNITTIME" Binding="{Binding sUnitTime}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.UNIT_TIME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
|
||||
</DataGrid.Resources>
|
||||
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
<dxg:GridControl x:Name="dgOptimizerStatistics_GridControl"
|
||||
ItemsSource="{Binding Tag.MachGroupPanelVM.MachGroupVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:OptimizerStatisticsV}}}"
|
||||
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="dgOptimizerStatistics_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="Name"
|
||||
SortFieldName="dName"
|
||||
Header="{Binding ID_Msg}"
|
||||
Fixed="Left"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="dW"
|
||||
Header="{Binding W_Msg}"
|
||||
Binding="{Binding dW}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="dH"
|
||||
Header="{Binding H_Msg}"
|
||||
Binding="{Binding dH}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="dL"
|
||||
Header="{Binding L_Msg}"
|
||||
Binding="{Binding dL}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMATERIAL"
|
||||
Header="{Binding MAT_Msg}"
|
||||
Binding="{Binding sMATERIAL}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="Custom"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUsage"
|
||||
SortFieldName="dUsage"
|
||||
Header="{Binding Used_Msg}"
|
||||
Binding="{Binding sUsage}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sWaste"
|
||||
SortFieldName="dWaste"
|
||||
Header="{Binding Waste_Msg}"
|
||||
Binding="{Binding sWaste}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUnitTime"
|
||||
Header="{Binding UNIT_TIME_Msg}"
|
||||
Binding="{Binding sUnitTime}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="RAWPARTSTAT">
|
||||
<TabItem.Content>
|
||||
<EgwWPFBaseLib:EgwDataGrid x:Name="dgRawPartStatistics"
|
||||
ItemsSource="{Binding RawPartList}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Extended"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="0,0,0,5"
|
||||
ColumnLayouts="{Binding RawPartStatisticsColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.Resources>
|
||||
<!--W - Larghezza-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--H - Altezza-->
|
||||
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--L - Lunghezza-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMaterial}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--QTY - Quantita'-->
|
||||
<DataGridTextColumn x:Key="colQTY" Binding="{Binding nQuantity, Mode=TwoWay}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.QTY_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Resources>
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
<dxg:GridControl x:Name="dgRawPartStatistics_GridControl"
|
||||
ItemsSource="{Binding RawPartList}"
|
||||
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="dgRawPartStatistics_TableView"
|
||||
ShowGridMenu="OnShowGridMenu2"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="sW"
|
||||
Header="{Binding W_Msg}"
|
||||
Binding="{Binding sW}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sH"
|
||||
Header="{Binding H_Msg}"
|
||||
Binding="{Binding sH}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
Header="{Binding L_Msg}"
|
||||
Binding="{Binding sL}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMaterial"
|
||||
Header="{Binding MAT_Msg}"
|
||||
Binding="{Binding sMaterial}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="Custom"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="nQuantity"
|
||||
Header="{Binding QTY_Msg}"
|
||||
Binding="{Binding nQuantity}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>
|
||||
</TabItem.Content>
|
||||
</TabItem>
|
||||
|
||||
</TabControl>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
|
||||
@@ -1,10 +1,204 @@
|
||||
Public Class OptimizerStatisticsV
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.IO
|
||||
|
||||
Public Class OptimizerStatisticsV
|
||||
|
||||
Private m_StatisticsVM As StatisticsVM
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
Private m_sDataGridLayoutPath2 As String = ""
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\OptimizerStatistics.json"
|
||||
m_sDataGridLayoutPath2 = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\RawPartStatistics.json"
|
||||
|
||||
Map.refStatisticsVM.LoadRawPart()
|
||||
|
||||
For Each Column In dgOptimizerStatistics_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
DXSerializer.AddAllowPropertyHandler(dgOptimizerStatistics_GridControl, AddressOf OnAddAllowProperty)
|
||||
|
||||
For Each Column In dgRawPartStatistics_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
DXSerializer.AddAllowPropertyHandler(dgRawPartStatistics_GridControl, AddressOf OnAddAllowProperty)
|
||||
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
|
||||
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
|
||||
e.Allow = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.Property.Name = "FilterString" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilters" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilterList" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
|
||||
e.Allow = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' salvataggio del layout colonne
|
||||
Public Sub SaveStatisticGridControlLayout()
|
||||
dgOptimizerStatistics_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub SaveStatisticGridControlLayout2()
|
||||
dgRawPartStatistics_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath2)
|
||||
End Sub
|
||||
|
||||
Public Sub IsVisibleGroupSummary(bValue As Boolean)
|
||||
If bValue AndAlso dgOptimizerStatistics_GridControl.GroupSummary.Count = 0 Then
|
||||
dgOptimizerStatistics_GridControl.GroupSummary.Clear()
|
||||
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "Name",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "Name"}
|
||||
dgOptimizerStatistics_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
End If
|
||||
dgOptimizerStatistics_TableView.ShowGroupFooters = bValue
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_StatisticsVM = Me.DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_StatisticsVM.refSaveStatisticGridControlLayout = AddressOf SaveStatisticGridControlLayout
|
||||
m_StatisticsVM.refSaveStatisticGridControlLayout = AddressOf SaveStatisticGridControlLayout2
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
dgOptimizerStatistics_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||
End If
|
||||
If Not IsNothing(m_sDataGridLayoutPath2) AndAlso File.Exists(m_sDataGridLayoutPath2) Then
|
||||
dgRawPartStatistics_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath2)
|
||||
End If
|
||||
|
||||
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
|
||||
IsVisibleGroupSummary(False)
|
||||
End Sub
|
||||
|
||||
Private Sub PrintBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyToClipboardBtn.Click
|
||||
m_StatisticsVM = Me.DataContext()
|
||||
CopyToClipboard(dgOptimizerStatistics, dgRawPartStatistics, m_StatisticsVM)
|
||||
'CopyToClipboard(dgOptimizerStatistics, dgRawPartStatistics, m_StatisticsVM)
|
||||
If Map.refStatisticsVM.bRawPart_IsChecked Then
|
||||
dgRawPartStatistics_GridControl.CopyToClipboard()
|
||||
Else
|
||||
dgOptimizerStatistics_GridControl.CopyToClipboard()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (dgOptimizerStatistics_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgOptimizerStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgOptimizerStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
dgOptimizerStatistics_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu2(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (dgRawPartStatistics_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged2
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick2
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged2(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgRawPartStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick2(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgRawPartStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
dgRawPartStatistics_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<Grid x:Class="PDFEditorV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer">
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxpdf="http://schemas.devexpress.com/winfx/2008/xaml/pdf">
|
||||
|
||||
<Grid.Resources>
|
||||
<OPTIMIZER:ColumnNameConverter x:Key="ColumnNameConverter"/>
|
||||
@@ -145,8 +147,42 @@
|
||||
Style="{StaticResource PDF_TextBlock}"/>
|
||||
</StackPanel>
|
||||
</GroupBox.Header>
|
||||
<OPTIMIZER:PdfViewer PdfPath="{Binding WebAddress}"
|
||||
Visibility="{Binding PdfViewer_Visibility}"/>
|
||||
<AdornerDecorator>
|
||||
<dxpdf:PdfViewerControl x:Name="PDFViewer"
|
||||
CommandBarStyle="None"
|
||||
Visibility="{Binding PdfViewer_Visibility}">
|
||||
<dxpdf:PdfViewerControl.CommandProvider>
|
||||
<dxpdf:PdfCommandProvider>
|
||||
<dxpdf:PdfCommandProvider.RibbonActions>
|
||||
<dxb:RemoveAction ContainerName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.ContextMenu}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.HandTool}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.SelectAll}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.SelectTool}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.MarqueeZoom}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.ClockwiseRotate}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.FindContext}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.PrintContext}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.Properties}"/>
|
||||
<dxb:UpdateAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.Ribbon}"
|
||||
PropertyName="ShowApplicationButton"
|
||||
Value="False"/>
|
||||
</dxpdf:PdfCommandProvider.RibbonActions>
|
||||
</dxpdf:PdfCommandProvider>
|
||||
</dxpdf:PdfViewerControl.CommandProvider>
|
||||
<dxpdf:PdfViewerControl.ThumbnailsViewerSettings>
|
||||
<dxpdf:PdfThumbnailsViewerSettings HideThumbnailsViewer="True"/>
|
||||
</dxpdf:PdfViewerControl.ThumbnailsViewerSettings>
|
||||
<dxpdf:PdfViewerControl.AttachmentsViewerSettings>
|
||||
<dxpdf:PdfAttachmentsViewerSettings HideAttachmentsViewer="True"/>
|
||||
</dxpdf:PdfViewerControl.AttachmentsViewerSettings>
|
||||
<dxpdf:PdfViewerControl.CommentViewerSettings>
|
||||
<dxpdf:PdfCommentViewerSettings HideCommentViewer="True"/>
|
||||
</dxpdf:PdfViewerControl.CommentViewerSettings>
|
||||
<dxpdf:PdfViewerControl.OutlinesViewerSettings>
|
||||
<dxpdf:PdfOutlinesViewerSettings HideOutlinesViewer="True"/>
|
||||
</dxpdf:PdfViewerControl.OutlinesViewerSettings>
|
||||
</dxpdf:PdfViewerControl>
|
||||
</AdornerDecorator>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
DataContext = New PDFEditorVM()
|
||||
|
||||
MapV.SetRefPDFEditorV(Me)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -125,6 +125,7 @@ Public Class PDFEditorVM
|
||||
SetPdfViewer_Visibility(True)
|
||||
Configuration.CreatePrintPDF(PDFPage.VIEW, True)
|
||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
||||
MapV.refPDFEditorV.PDFViewer.OpenDocument(WebAddress)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -159,7 +160,8 @@ Public Class PDFEditorVM
|
||||
Case VIEW_BUTTON.PDF
|
||||
SetPdfViewer_Visibility(True)
|
||||
Configuration.CreatePrintPDF(PDFPage.MACHING, True)
|
||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
||||
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf")
|
||||
MapV.refPDFEditorV.PDFViewer.OpenDocument(WebAddress)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -182,6 +184,7 @@ Public Class PDFEditorVM
|
||||
Public Sub ClosePreview()
|
||||
Try
|
||||
File.Delete(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
|
||||
File.Delete(Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf")
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Errore! Cancellazione dei file pdf fallita")
|
||||
End Try
|
||||
@@ -196,7 +199,7 @@ Public Class PDFEditorVM
|
||||
SetWebAddress("")
|
||||
End Sub
|
||||
|
||||
#End Region ' CreatePreviewVis
|
||||
#End Region ' ClosePreview
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
|
||||
@@ -2,148 +2,100 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib">
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<EgwWPFBaseLib:EgwDataGrid x:Name="dgStatistics"
|
||||
ItemsSource="{Binding Tag.BTLPartVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:StatisticsV}}}"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Extended"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
Margin="0,0,0,5"
|
||||
ColumnLayouts="{Binding StatisticsColumns}"
|
||||
AlternatingRowBackground="{StaticResource BeamWall_LinkWater}"
|
||||
AlternationCount="2"
|
||||
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}"
|
||||
Style="{StaticResource Optimizer_DataGrid}">
|
||||
<DataGrid.Resources>
|
||||
<!--PDN - Nome-->
|
||||
<DataGridTextColumn x:Key="colPDN" Binding="{Binding nPDN}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.PDN_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--W - Larghezza-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding sW}" SortMemberPath="dW">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.W_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--H - Altezza-->
|
||||
<DataGridTextColumn x:Key="colH" Binding="{Binding sH}" SortMemberPath="dH">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.H_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--L - Lunghezza-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding sL}" SortMemberPath="dL">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.L_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--NAM - Descrizione-->
|
||||
<DataGridTextColumn x:Key="colDESC" Binding="{Binding sNAM}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.NAM_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--MAT - Materiale-->
|
||||
<DataGridTextColumn x:Key="colMATERIAL" Binding="{Binding sMATERIAL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.MAT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--CNT - Richiesti da BTL-->
|
||||
<DataGridTextColumn x:Key="colCNT" Binding="{Binding sCNT}" SortMemberPath="nCNT">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.CNT_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--ADDED - Aggiunti-->
|
||||
<DataGridTextColumn x:Key="colADDED" Binding="{Binding sADDED}" SortMemberPath="nADDED">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.ADDED_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--INPROD - IN OTTIMIZZAZIONE-->
|
||||
<DataGridTextColumn x:Key="colINPROD" Binding="{Binding nINPROD}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.INPROD_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--DONE - PRODOTTI-->
|
||||
<DataGridTextColumn x:Key="colDONE" Binding="{Binding nDONE}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.DONE_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--UNITVOLUME - VOLUME UNITARIO-->
|
||||
<DataGridTextColumn x:Key="colUNITVOLUME" Binding="{Binding sUnitVolume}" SortMemberPath="dUnitVolume">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.UNIT_VOLUME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--TOTVOLUME - VOLUME TOTALE-->
|
||||
<DataGridTextColumn x:Key="colTOTVOLUME" Binding="{Binding sTotVolume}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.TOT_VOLUME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--CALCTIME - TEMPO UNITARIO STIMATO-->
|
||||
<DataGridTextColumn x:Key="colUNITTIME" Binding="{Binding sUnitTime}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.UNIT_TIME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!--CALCTIME - TEMPO TOTALE STIMATO-->
|
||||
<DataGridTextColumn x:Key="colTOTTIME" Binding="{Binding sTotTime}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.TOT_TIME_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
|
||||
</DataGrid.Resources>
|
||||
|
||||
</EgwWPFBaseLib:EgwDataGrid>
|
||||
|
||||
<dxg:GridControl x:Name="dgStatistics_GridControl"
|
||||
ItemsSource="{Binding Tag.BTLPartVMList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:StatisticsV}}}"
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="dgStatistics_TableView"
|
||||
ShowGridMenu="OnShowGridMenu"
|
||||
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}"/>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="nPDN"
|
||||
Header="{Binding PDN_Msg}"
|
||||
Fixed="Left"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sW"
|
||||
SortFieldName="dW"
|
||||
Header="{Binding W_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sH"
|
||||
SortFieldName="dH"
|
||||
Header="{Binding H_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
SortFieldName="dL"
|
||||
Header="{Binding L_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sNAM"
|
||||
Header="{Binding NAM_Msg}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="CheckedList"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sMATERIAL"
|
||||
Header="{Binding MAT_Msg}"
|
||||
AllowSorting="False"
|
||||
FilterPopupMode="Custom"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sCNT"
|
||||
Header="{Binding CNT_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sADDED"
|
||||
Header="{Binding ADDED_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="nINPROD"
|
||||
Header="{Binding INPROD_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="nDONE"
|
||||
Header="{Binding DONE_Msg}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUnitVolume"
|
||||
SortFieldName="dUnitVolume"
|
||||
Header="{Binding UNIT_VOLUME_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sTotVolume"
|
||||
SortFieldName="dTotVolume"
|
||||
Header="{Binding TOT_VOLUME_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sUnitTime"
|
||||
SortFieldName="dUnitTime"
|
||||
Header="{Binding UNIT_TIME_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sTotTime"
|
||||
SortFieldName="dTotTime"
|
||||
Header="{Binding TOT_TIME_Msg}"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
Style="{StaticResource Statistics_Grid}">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -1,10 +1,153 @@
|
||||
Public Class StatisticsV
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Core.Serialization
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports System.IO
|
||||
|
||||
Public Class StatisticsV
|
||||
|
||||
Private m_StatisticsVM As StatisticsVM
|
||||
Private m_sDataGridLayoutPath As String = ""
|
||||
|
||||
Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
m_sDataGridLayoutPath = Path.GetDirectoryName(DataGridColumnsIniFile.m_sDataGridColumnsIniFile) & "\DataGridLayoutFile\Statistics.json"
|
||||
|
||||
For Each Column In dgStatistics_GridControl.Columns
|
||||
Column.[AddHandler](DXSerializer.AllowPropertyEvent,
|
||||
New AllowPropertyEventHandler(AddressOf OnAllowProperty))
|
||||
Next
|
||||
DXSerializer.AddAllowPropertyHandler(dgStatistics_GridControl, AddressOf OnAddAllowProperty)
|
||||
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri di colonna
|
||||
Private Sub OnAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.DependencyProperty Is GridColumn.AllowResizingProperty Then
|
||||
e.Allow = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposto parametri da aggiungere o togliere in Json tabella per i parametri generali
|
||||
Private Sub OnAddAllowProperty(sender As Object, e As AllowPropertyEventArgs)
|
||||
If e.Property.Name = "FilterString" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilters" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "MRUFilterList" Then
|
||||
e.Allow = False
|
||||
ElseIf e.Property.Name = "GroupSummarySortInfo" Then
|
||||
e.Allow = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' salvataggio del layout colonne
|
||||
Public Sub SaveStatisticGridControlLayout()
|
||||
dgStatistics_GridControl.SaveLayoutToJson(m_sDataGridLayoutPath)
|
||||
End Sub
|
||||
|
||||
Public Sub IsVisibleGroupSummary(bValue As Boolean)
|
||||
If bValue AndAlso dgStatistics_GridControl.GroupSummary.Count = 0 Then
|
||||
dgStatistics_GridControl.GroupSummary.Clear()
|
||||
Dim PDNGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nPDN",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Count,
|
||||
.ShowInGroupColumnFooter = "nPDN"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(PDNGroupSummaryItem)
|
||||
Dim CNTGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sCNT",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sCNT"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(CNTGroupSummaryItem)
|
||||
Dim ADDEDGroupSummaryItem As New GridSummaryItem() With {.FieldName = "sADDED",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "sADDED"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(ADDEDGroupSummaryItem)
|
||||
Dim INPRODGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nINPROD",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nINPROD"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(INPRODGroupSummaryItem)
|
||||
Dim DONEGroupSummaryItem As New GridSummaryItem() With {.FieldName = "nDONE",
|
||||
.DisplayFormat = "{0}",
|
||||
.SummaryType = SummaryItemType.Sum,
|
||||
.ShowInGroupColumnFooter = "nDONE"}
|
||||
dgStatistics_GridControl.GroupSummary.Add(DONEGroupSummaryItem)
|
||||
End If
|
||||
dgStatistics_TableView.ShowGroupFooters = bValue
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Loaded() Handles Me.Loaded
|
||||
' imposto DataContext
|
||||
m_StatisticsVM = Me.DataContext
|
||||
' imposto riferimento ad action per salvataggio layout tabella
|
||||
m_StatisticsVM.refSaveStatisticGridControlLayout = AddressOf SaveStatisticGridControlLayout
|
||||
' rispristino layout tabella
|
||||
If Not IsNothing(m_sDataGridLayoutPath) AndAlso File.Exists(m_sDataGridLayoutPath) Then
|
||||
dgStatistics_GridControl.RestoreLayoutFromJson(m_sDataGridLayoutPath)
|
||||
End If
|
||||
' da gestire chiamandolo quando viene aperto un progetto o aggiunto/rimosso un btl, per evitare che ci sia il GroupSummary se c'e' un solo gruppo
|
||||
IsVisibleGroupSummary(False)
|
||||
End Sub
|
||||
|
||||
Private Sub PrintBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyToClipboardBtn.Click
|
||||
m_StatisticsVM = Me.DataContext()
|
||||
ExportToExcelAndCsv(dgStatistics, m_StatisticsVM)
|
||||
'ExportToExcelAndCsv(dgStatistics, m_StatisticsVM)
|
||||
dgStatistics_GridControl.CopyToClipboard()
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowGridMenu(sender As Object, e As DevExpress.Xpf.Grid.GridMenuEventArgs)
|
||||
If e.MenuType = GridMenuType.Column Then
|
||||
' rimozione bottoni
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupBox})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.GroupColumn})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.ColumnChooser})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFit})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNames.BestFitColumns})
|
||||
e.Customizations.Add(New RemoveAction() With {.ElementName = DefaultColumnMenuItemNamesBase.FilterEditor})
|
||||
|
||||
Dim info As GridColumnMenuInfo = CType(e.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
' aggiunta separatore
|
||||
Dim separator As BarItemLinkSeparator = New BarItemLinkSeparator()
|
||||
e.Customizations.Add(separator)
|
||||
' aggiunta bottone AllowResize e Auto Fit
|
||||
Dim AllowResize As BarCheckItem = New BarCheckItem() With {.Content = "Allow Resize", .IsChecked = (dgStatistics_TableView.AllowResizing AndAlso (item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default))}
|
||||
AddHandler AllowResize.CheckedChanged, AddressOf AllowResize_CheckedChanged
|
||||
e.Customizations.Add(AllowResize)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.True OrElse item.AllowResizing = DevExpress.Utils.DefaultBoolean.Default Then
|
||||
Dim FixAuto As BarButtonItem = New BarCheckItem() With {.Content = "Auto Fit"}
|
||||
AddHandler FixAuto.ItemClick, AddressOf FixAuto_ItemClick
|
||||
e.Customizations.Add(FixAuto)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Allow Resize
|
||||
Private Sub AllowResize_CheckedChanged(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
If item.AllowResizing = DevExpress.Utils.DefaultBoolean.False Then
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.True
|
||||
Else
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' gestore evento Auto Fit
|
||||
Private Sub FixAuto_ItemClick(sender As Object, e As ItemClickEventArgs)
|
||||
Dim info As GridColumnMenuInfo = TryCast(dgStatistics_TableView.GridMenu.MenuInfo, GridColumnMenuInfo)
|
||||
Dim item As ColumnBase = CType(info.Column, ColumnBase)
|
||||
item.Width = New GridColumnWidth(1, GridColumnUnitType.Auto)
|
||||
dgStatistics_TableView.UpdateLayout()
|
||||
item.Width = item.ActualWidth
|
||||
item.AllowResizing = DevExpress.Utils.DefaultBoolean.False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class StatisticsVM
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
Public refSaveStatisticGridControlLayout As Action
|
||||
|
||||
' Evento per chiusura finestra
|
||||
Public Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
@@ -395,6 +397,11 @@ Public Class StatisticsVM
|
||||
{S_OPTIMIZERSTATISTICS, OptimizerStatisticsColumns},
|
||||
{S_RAWPARTSTATISTICS, RawPartStatisticsColumns}}
|
||||
EgwWPFBaseLib.EgwDataGrid.WriteColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, DataGridColumnDictionary)
|
||||
|
||||
If Not IsNothing(refSaveStatisticGridControlLayout) Then
|
||||
refSaveStatisticGridControlLayout()
|
||||
End If
|
||||
|
||||
' Chiudo finestra senza fare niente
|
||||
RaiseEvent m_CloseWindow(False)
|
||||
End Sub
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
Title="StatisticWnd"
|
||||
MaxHeight="600"
|
||||
Width="1300"
|
||||
Style="{StaticResource OptimizerWindow.Dialog}">
|
||||
Style="{StaticResource OptimizerWindow.Dialog}"
|
||||
Closed="OptimizerWindow_Closed">
|
||||
|
||||
<TabControl Name="Statistic_TabControl"
|
||||
SelectedIndex="0"
|
||||
|
||||
@@ -19,4 +19,10 @@
|
||||
Me.DialogResult = bDialogResult
|
||||
End Sub
|
||||
|
||||
Private Sub OptimizerWindow_Closed(sender As Object, e As EventArgs)
|
||||
If Not IsNothing(m_StatisticsVM.refSaveStatisticGridControlLayout) Then
|
||||
m_StatisticsVM.refSaveStatisticGridControlLayout()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports Newtonsoft.Json
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtBEAMWALL.Core.ConstBeam
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
'----------- Classe che fa riferimento alle Feature del file Json -----------
|
||||
Public Class JsonAvailableStrategyFeature
|
||||
@@ -339,6 +339,28 @@ Public Class JsonDefaultStrategyParameter
|
||||
End Set
|
||||
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
|
||||
Public Property sType As String
|
||||
Get
|
||||
@@ -410,12 +432,14 @@ Public Class JsonDefaultStrategyParameter
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
<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_sNameNge = sNameNge
|
||||
m_sValue = sValue
|
||||
m_sDescriptionShort = sDescriptionShort
|
||||
m_sDescriptionLong = sDescriptionLong
|
||||
m_idDescriptionShortMsg = idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = idDescriptionLongMsg
|
||||
m_sType = sType
|
||||
m_sSource = sSource
|
||||
m_sSubType = sSubType
|
||||
@@ -442,6 +466,8 @@ Public Class JsonDefaultStrategyParameter
|
||||
m_sSubType = StrategyParameter.sSubType
|
||||
m_sDescriptionShort = StrategyParameter.sDescriptionShort
|
||||
m_sDescriptionLong = StrategyParameter.sDescriptionLong
|
||||
m_idDescriptionShortMsg = StrategyParameter.idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = StrategyParameter.idDescriptionLongMsg
|
||||
m_sMessageId = StrategyParameter.sMessageId
|
||||
m_sMinUserLevel = StrategyParameter.sMinUserLevel
|
||||
End Sub
|
||||
@@ -491,8 +517,18 @@ Public Class JsonDefaultStrategyParameter
|
||||
StrategyParameter.sName = m_sName
|
||||
StrategyParameter.sNameNge = m_sNameNge
|
||||
StrategyParameter.sSubType = m_sSubType
|
||||
StrategyParameter.sDescriptionShort = m_sDescriptionShort
|
||||
StrategyParameter.sDescriptionLong = m_sDescriptionLong
|
||||
If m_idDescriptionShortMsg < 0 OrElse EgtMsg(m_idDescriptionShortMsg).StartsWith("Msg") Then
|
||||
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.sMinUserLevel = m_sMinUserLevel
|
||||
Return StrategyParameter
|
||||
@@ -537,6 +573,28 @@ Public Class JsonDefaultComboParameter
|
||||
End Set
|
||||
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
|
||||
Public Property sMessageId As String
|
||||
Get
|
||||
@@ -551,10 +609,12 @@ Public Class JsonDefaultComboParameter
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
<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_sDescriptionShort = sDescriptionShort
|
||||
m_sDescriptionLong = sDescriptionLong
|
||||
m_idDescriptionShortMsg = idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = idDescriptionLongMsg
|
||||
m_sMessageId = sMessageId
|
||||
End Sub
|
||||
|
||||
@@ -562,6 +622,8 @@ Public Class JsonDefaultComboParameter
|
||||
m_sValue = ComboParameter.sValue
|
||||
m_sDescriptionShort = ComboParameter.sDescriptionShort
|
||||
m_sDescriptionLong = ComboParameter.sDescriptionLong
|
||||
m_idDescriptionShortMsg = ComboParameter.idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = ComboParameter.idDescriptionLongMsg
|
||||
m_sMessageId = ComboParameter.sMessageId
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -4,137 +4,151 @@
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
VerticalAlignment="Top"
|
||||
Margin="5,10,0,0">
|
||||
<ItemsControl ItemsSource="{Binding Tag.ParameterList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
Style="{StaticResource ParameterStrategy_ItemsControl}">
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:BooleanStrategyParameter}">
|
||||
<UniformGrid Columns="2"
|
||||
Visibility="{Binding bBooleanVisibility}"
|
||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||
<CheckBox IsChecked="{Binding bValue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:DoubleStrategyParameter}">
|
||||
<UniformGrid Columns="2"
|
||||
Visibility="{Binding bDoubleVisibility}"
|
||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||
<TextBox Text="{Binding sValue}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:ComboStrategyParameter}">
|
||||
<UniformGrid Columns="2"
|
||||
Visibility="{Binding bComboBoxVisibility}"
|
||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding ComboList}"
|
||||
SelectedItem="{Binding SelValue}"
|
||||
DisplayMemberPath="sValue"
|
||||
Style="{StaticResource ProjectParameters_ComboBox}">
|
||||
</ComboBox>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:StringStrategyParameter}">
|
||||
<UniformGrid Columns="2"
|
||||
Visibility="{Binding bStringVisibility}"
|
||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||
<TextBox Text="{Binding sValue}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:ListStrategyParameter}">
|
||||
<Grid Visibility="{Binding bListBoxVisibility}"
|
||||
Style="{StaticResource AddRawPartWnd_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategyDescription_TextBlock}"/>
|
||||
<StackPanel Grid.Column="1"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}">
|
||||
<Button ToolTip="{Binding OpenToolListToolTip}"
|
||||
IsEnabled="{Binding OpenToolListIsEnable}"
|
||||
Command="{Binding OpenToolListCommand}"
|
||||
Style="{StaticResource ProjectParameters_Button}">
|
||||
<Image Source="{StaticResource Plus_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</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>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ItemsControl ItemsSource="{Binding Tag.ParameterList,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
Style="{StaticResource ParameterStrategy_ItemsControl}">
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:BooleanStrategyParameter}">
|
||||
<UniformGrid Columns="2"
|
||||
Visibility="{Binding bBooleanVisibility}"
|
||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||
<CheckBox IsChecked="{Binding bValue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:DoubleStrategyParameter}">
|
||||
<UniformGrid Columns="2"
|
||||
Visibility="{Binding bDoubleVisibility}"
|
||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||
<TextBox Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:ComboStrategyParameter}">
|
||||
<UniformGrid Columns="2"
|
||||
Visibility="{Binding bComboBoxVisibility}"
|
||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||
<ComboBox ItemsSource="{Binding ComboList}"
|
||||
SelectedItem="{Binding SelValue}"
|
||||
DisplayMemberPath="sValue"
|
||||
Style="{StaticResource ProjectParameters_ComboBox}">
|
||||
</ComboBox>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:StringStrategyParameter}">
|
||||
<UniformGrid Columns="2"
|
||||
Visibility="{Binding bStringVisibility}"
|
||||
Style="{StaticResource ParamStrategy_UniformGrid}">
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategy_TextBlock}"/>
|
||||
<TextBox Text="{Binding sValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource ColorPicker_TextBox}"/>
|
||||
</UniformGrid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:ListStrategyParameter}">
|
||||
<Grid Visibility="{Binding bListBoxVisibility}"
|
||||
Style="{StaticResource AddRawPartWnd_Grid}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding sDescriptionShort}"
|
||||
Style="{StaticResource ParamStrategyDescription_TextBlock}"/>
|
||||
<StackPanel Grid.Column="1"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}">
|
||||
<Button ToolTip="{Binding OpenToolListToolTip}"
|
||||
IsEnabled="{Binding OpenToolListIsEnable}"
|
||||
Command="{Binding OpenToolListCommand}"
|
||||
Style="{StaticResource ProjectParameters_Button}">
|
||||
<Image Source="{StaticResource Plus_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</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>
|
||||
<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 Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Visibility="{Binding AvailableToolListVisibility}"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}">
|
||||
<Button ToolTip="{Binding CloseToolListToolTip}"
|
||||
Command="{Binding CloseToolListCommand}"
|
||||
Style="{StaticResource ProjectParameters_Button}">
|
||||
<Image Source="{StaticResource Delete_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding SelectAllToolTip}"
|
||||
IsEnabled="{Binding AvailableToolListIsEnable}"
|
||||
Command="{Binding SelectAllCommand}"
|
||||
Style="{StaticResource ProjectParameters_Button}">
|
||||
<Image Source="{StaticResource SelectAll_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<StackPanel Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Visibility="{Binding AvailableToolListVisibility}"
|
||||
Style="{StaticResource PartManager_StackPanel}">
|
||||
<StackPanel Style="{StaticResource ProjectParameters_StackPanel}">
|
||||
<Button ToolTip="{Binding CloseToolListToolTip}"
|
||||
Command="{Binding CloseToolListCommand}"
|
||||
Style="{StaticResource ProjectParameters_Button}">
|
||||
<Image Source="{StaticResource Delete_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="{Binding SelectAllToolTip}"
|
||||
IsEnabled="{Binding AvailableToolListIsEnable}"
|
||||
Command="{Binding SelectAllCommand}"
|
||||
Style="{StaticResource ProjectParameters_Button}">
|
||||
<Image Source="{StaticResource SelectAll_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<Border Style="{StaticResource ProjectParamters_Border}">
|
||||
<ItemsControl ItemsSource="{Binding AvailableToolList_View}"
|
||||
Style="{StaticResource AvailableToolList_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>
|
||||
<Border Style="{StaticResource ProjectParamters_Border}">
|
||||
<ItemsControl ItemsSource="{Binding AvailableToolList_View}"
|
||||
Style="{StaticResource AvailableToolList_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>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
<Button Grid.Row="1" VerticalAlignment="Bottom"
|
||||
Command="{Binding UpdateFeatureCommand}"
|
||||
Visibility="{Binding Update_Visibility}"
|
||||
Style="{StaticResource Update_Button}">
|
||||
<Image Source="{StaticResource Update_Image}"
|
||||
Style="{StaticResource BTLDataWnd_Image}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -97,8 +97,8 @@
|
||||
</CheckBox>
|
||||
</HierarchicalDataTemplate>
|
||||
<DataTemplate DataType="{x:Type OPTIMIZER:Topology}">
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource DialogWindow_TextBlock}"/>
|
||||
<TextBlock Text="{Binding sName}"
|
||||
Style="{StaticResource TreeView_TextBlock}"/>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
<TreeView.ItemContainerStyle>
|
||||
@@ -122,7 +122,7 @@
|
||||
<RowDefinition Height="0.93*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<GroupBox x:Name="GR"
|
||||
Style="{StaticResource ProjectParameters_GroupBox}">
|
||||
<GroupBox.Header>
|
||||
@@ -142,7 +142,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<!--<ColumnDefinition Width="1*"/>-->
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding SelTreeItem.sName}"
|
||||
Style="{StaticResource TreeItemName_TextBlock}"/>
|
||||
|
||||
@@ -66,8 +66,9 @@ Public Class StrategyManagerVM
|
||||
End If
|
||||
End If
|
||||
m_SelStrategySetup.Read()
|
||||
End If
|
||||
SetSaveImage(MODIFY_IMAGE)
|
||||
OrderStrategyList(m_SelStrategySetup.StrategyFeatureList)
|
||||
End If
|
||||
SetSaveImage(MODIFY_IMAGE)
|
||||
NotifyPropertyChanged(NameOf(SelStrategySetup))
|
||||
End Set
|
||||
End Property
|
||||
@@ -77,6 +78,7 @@ Public Class StrategyManagerVM
|
||||
' Scrivo file defaultconfig nell'ini
|
||||
EgtUILib.WritePrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, m_SelStrategySetup.sName, Map.refMainWindowVM.MainWindowM.sDefaultConfig)
|
||||
m_SelStrategySetup.Read()
|
||||
OrderStrategyList(m_SelStrategySetup.StrategyFeatureList)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelStrategySetup))
|
||||
End Sub
|
||||
@@ -105,6 +107,7 @@ Public Class StrategyManagerVM
|
||||
Item.sImage = TmpImage
|
||||
End If
|
||||
m_SelTreeItem = Item
|
||||
SetUpdate_Visibility(False)
|
||||
NotifyPropertyChanged(NameOf(SelTreeItem))
|
||||
End Sub
|
||||
|
||||
@@ -207,6 +210,17 @@ Public Class StrategyManagerVM
|
||||
NotifyPropertyChanged(NameOf(DefaultConfig_IsChecked))
|
||||
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"
|
||||
|
||||
Public ReadOnly Property SaveToolTip As String
|
||||
@@ -252,6 +266,7 @@ Public Class StrategyManagerVM
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdCancel As ICommand
|
||||
Private m_cmdConfigurationParametersCommand As ICommand
|
||||
Private m_cmdUpdateFeatureCommand As ICommand
|
||||
|
||||
#End Region ' Field & Properties
|
||||
|
||||
@@ -270,15 +285,29 @@ Public Class StrategyManagerVM
|
||||
|
||||
''' <summary>
|
||||
''' Funzione che salva il file customconfig se sono presenti modifiche
|
||||
''' </summary>
|
||||
Friend Sub SaveCustomConfigJson()
|
||||
''' </summary>
|
||||
Friend Function SaveCustomConfigJson() As Boolean
|
||||
' Controlla se il file JSON è stato modificato
|
||||
If Not m_bIsModifyStrategy Then Return
|
||||
' Chiede conferma per il salvataggio
|
||||
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62580), EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then
|
||||
m_SelStrategySetup.Write(Map.refGeneralParametersStrategyVM.GeneralParametersList, False)
|
||||
End If
|
||||
End Sub
|
||||
If Not m_bIsModifyStrategy Then Return False
|
||||
Map.refMyMachine.VerifyConfigPageModification()
|
||||
' Chiedo conferma per il salvataggio
|
||||
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62580), EgtMsg(15003), MessageBoxButton.YesNoCancel, MessageBoxImage.Information)
|
||||
Case MessageBoxResult.Yes
|
||||
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()
|
||||
m_StrategySetupList.Clear()
|
||||
@@ -328,9 +357,23 @@ Public Class StrategyManagerVM
|
||||
SetSelStrategySetup(DefaultConfigFile)
|
||||
End If
|
||||
SetDefaultConfig_IsChecked(True)
|
||||
SetUpdate_Visibility(False)
|
||||
SetbIsModifyStrategy(False)
|
||||
End If
|
||||
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
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -356,6 +399,11 @@ Public Class StrategyManagerVM
|
||||
SetbIsModifyStrategy(True)
|
||||
' Setto indice per capire che la strategia è stata spostata in ActiveStrategyList
|
||||
m_SelTreeItem.SelAvailableStrategy.nIndexInList = 0
|
||||
' Riallinea tutti gli indici
|
||||
For Index As Integer = 0 To m_SelTreeItem.StrategyList.Count - 1
|
||||
m_SelTreeItem.StrategyList(Index).nIndexInList = Index
|
||||
Next
|
||||
SetUpdate_Visibility(False)
|
||||
' Aggiorno le liste
|
||||
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||
@@ -384,6 +432,20 @@ Public Class StrategyManagerVM
|
||||
SetbIsModifyStrategy(True)
|
||||
' Setto indice per capire che la strategia è stata spostata in StrategyList
|
||||
m_SelTreeItem.SelActiveStrategy.nIndexInList = -1
|
||||
' Trova l’elemento con indice -1
|
||||
Dim mRemovedItemStrategyList As List(Of Strategy) = m_SelTreeItem.StrategyList.Where(Function(s) s.nIndexInList = -1).ToList()
|
||||
For Each RemovedItemStrategy In mRemovedItemStrategyList
|
||||
m_SelTreeItem.StrategyList.Remove(RemovedItemStrategy)
|
||||
Next
|
||||
' Riallinea tutti gli indici
|
||||
For Index As Integer = 0 To m_SelTreeItem.StrategyList.Count - 1
|
||||
m_SelTreeItem.StrategyList(Index).nIndexInList = Index
|
||||
Next
|
||||
' Reinserisco elementi rimossi
|
||||
For Each RemovedItemStrategy In mRemovedItemStrategyList
|
||||
m_SelTreeItem.StrategyList.Add(RemovedItemStrategy)
|
||||
Next
|
||||
SetUpdate_Visibility(False)
|
||||
' Aggiorno le liste
|
||||
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||
@@ -489,18 +551,34 @@ Public Class StrategyManagerVM
|
||||
Public Sub MoveUpSelectedStrategy()
|
||||
' Controllo se SelectedActiveStrategy se è nullo esco
|
||||
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
|
||||
Dim IndexActiveStrategy As Integer = m_SelTreeItem.StrategyList.IndexOf(m_SelTreeItem.SelActiveStrategy)
|
||||
' Recupero indice elemento selezionato in lista
|
||||
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
|
||||
If IndexActiveStrategy > 0 Then
|
||||
' Muovo l'elemento selezionato sopra di 1
|
||||
m_SelTreeItem.StrategyList.Move(IndexActiveStrategy, NewIndexActiveStrategy)
|
||||
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
|
||||
SetbIsModifyStrategy(True)
|
||||
' Aggiorno la lista
|
||||
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||
End Sub
|
||||
|
||||
@@ -522,18 +600,34 @@ Public Class StrategyManagerVM
|
||||
''' </summary>
|
||||
Public Sub MoveDownSelectedStrategy()
|
||||
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
|
||||
Dim IndexActiveStrategy As Integer = m_SelTreeItem.StrategyList.IndexOf(m_SelTreeItem.SelActiveStrategy)
|
||||
' Recupero indice elemento selezionato in lista
|
||||
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
|
||||
If IndexActiveStrategy >= 0 Then
|
||||
' Muovo l'elemento selezionato sopra di 1
|
||||
m_SelTreeItem.StrategyList.Move(IndexActiveStrategy, NewIndexActiveStrategy)
|
||||
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
|
||||
SetbIsModifyStrategy(True)
|
||||
' Aggiorno la lista
|
||||
m_SelTreeItem.AvailableStrategyList_View.Refresh()
|
||||
m_SelTreeItem.ActiveStrategyList_View.Refresh()
|
||||
End Sub
|
||||
|
||||
@@ -599,6 +693,68 @@ Public Class StrategyManagerVM
|
||||
|
||||
#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 Class
|
||||
@@ -973,6 +1129,8 @@ Public Class Topology
|
||||
End Get
|
||||
Set(value As Strategy)
|
||||
m_SelParamStrategy = value
|
||||
' Gestisco visibilita' pulsante Update Feature
|
||||
Map.refStrategyManagerVM.SetUpdate_Visibility(If(Map.refStrategyManagerVM.SelTreeItem.sName <> "Feature", True, False))
|
||||
NotifyPropertyChanged(NameOf(SelParamStrategy))
|
||||
End Set
|
||||
End Property
|
||||
@@ -990,10 +1148,7 @@ Public Class Topology
|
||||
m_sName = JsonTopology.sName
|
||||
m_sImage = JsonTopology.sImage
|
||||
m_StrategyList = New ObservableCollection(Of Strategy)(JsonTopology.StrategyList.Select(Function(jsonStrategy) New Strategy(jsonStrategy)))
|
||||
m_AvailableStrategyList_View = New ListCollectionView(StrategyList)
|
||||
m_AvailableStrategyList_View.Filter = AddressOf AvailableStrategyFilter
|
||||
m_ActiveStrategyList_View = New ListCollectionView(StrategyList)
|
||||
m_ActiveStrategyList_View.Filter = AddressOf ActiveStrategyFilter
|
||||
CreateStrategyViews()
|
||||
NotifyPropertyChanged(NameOf(StrategyList))
|
||||
End Sub
|
||||
|
||||
@@ -1012,13 +1167,16 @@ Public Class Topology
|
||||
Friend Sub CreateStrategyViews()
|
||||
m_AvailableStrategyList_View = New ListCollectionView(StrategyList)
|
||||
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.Filter = AddressOf ActiveStrategyFilter
|
||||
m_ActiveStrategyList_View.SortDescriptions.Add(New SortDescription("nIndexInList", ListSortDirection.Ascending))
|
||||
End Sub
|
||||
|
||||
Friend Function Serialize() As JsonTopology
|
||||
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())
|
||||
Next
|
||||
Return JsonTopology
|
||||
@@ -1262,6 +1420,28 @@ Public MustInherit Class StrategyParameter
|
||||
End Set
|
||||
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
|
||||
Public Property sMessageId As String
|
||||
Get
|
||||
@@ -1300,6 +1480,8 @@ Public MustInherit Class StrategyParameter
|
||||
m_sSubType = JsonGenericParameter.sSubType
|
||||
m_sDescriptionShort = JsonGenericParameter.sDescriptionShort
|
||||
m_sDescriptionLong = JsonGenericParameter.sDescriptionLong
|
||||
m_idDescriptionShortMsg = JsonGenericParameter.idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = JsonGenericParameter.idDescriptionLongMsg
|
||||
m_sMessageId = JsonGenericParameter.sMessageId
|
||||
m_sMinUserLevel = JsonGenericParameter.sMinUserLevel
|
||||
End Sub
|
||||
@@ -1330,6 +1512,7 @@ Public Class BooleanStrategyParameter
|
||||
SetbIsBooleanModify(True)
|
||||
End If
|
||||
m_bValue = value
|
||||
NotifyPropertyChanged(NameOf(bValue))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetValue(bValue As Boolean)
|
||||
@@ -1414,6 +1597,7 @@ Public Class DoubleStrategyParameter
|
||||
If m_dValue <> dValue Then
|
||||
Map.refStrategyManagerVM.SetbIsModifyStrategy(True)
|
||||
SetbIsDoubleModify(True)
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
End If
|
||||
m_dValue = dValue
|
||||
Else
|
||||
@@ -1510,6 +1694,7 @@ Public Class StringStrategyParameter
|
||||
SetbIsStringModify(True)
|
||||
End If
|
||||
m_sValue = value
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetValue(dValue As String)
|
||||
@@ -1603,6 +1788,7 @@ Public Class ComboStrategyParameter
|
||||
End If
|
||||
End If
|
||||
m_SelValue = value
|
||||
NotifyPropertyChanged(NameOf(SelValue))
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetSelValue(sValue As String)
|
||||
@@ -2022,6 +2208,28 @@ Public Class ComboParameter
|
||||
End Set
|
||||
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
|
||||
Public Property sMessageId As String
|
||||
Get
|
||||
@@ -2046,6 +2254,8 @@ Public Class ComboParameter
|
||||
m_sValue = JsonChoiceParameter.sValue
|
||||
m_sDescriptionShort = JsonChoiceParameter.sDescriptionShort
|
||||
m_sDescriptionLong = JsonChoiceParameter.sDescriptionLong
|
||||
m_idDescriptionShortMsg = JsonChoiceParameter.idDescriptionShortMsg
|
||||
m_idDescriptionLongMsg = JsonChoiceParameter.idDescriptionLongMsg
|
||||
m_sMessageId = JsonChoiceParameter.sMessageId
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
Height="{Binding ActualHeight, ElementName=StrategyFeature_TreeView}"
|
||||
Style="{StaticResource Strategy_Grid}">
|
||||
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -70,7 +70,7 @@
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Border>
|
||||
|
||||
|
||||
<StackPanel Grid.Column="3"
|
||||
Style="{StaticResource Strategy_StackPanel}">
|
||||
<Button Command="{Binding MoveUpSelectedStrategyCommand}"
|
||||
|
||||
@@ -33,10 +33,10 @@ Public Class SupervisorComm
|
||||
Select Case Message.ItemType
|
||||
Case StatusMapItemType.Comm
|
||||
Select Case Message.Operation
|
||||
Case StatusMapOpType.OpenPageInViewOptimRequest
|
||||
Map.refMainMenuVM.OpenPageFromSupervisor(Math.Abs(Message.ItemId))
|
||||
Case StatusMapOpType.ChangeProdInOptimizerRequest
|
||||
Map.refProdManagerVM.OpenProjectFromSupervisor(Message.ItemId)
|
||||
Case StatusMapOpType.OpenPageInViewOptimRequest
|
||||
Map.refMainMenuVM.OpenPageFromSupervisor(Math.Abs(Message.ItemId))
|
||||
End Select
|
||||
End Select
|
||||
Next
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports System.Net.Mail
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.CompilerServices
|
||||
Imports System.Text
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
@@ -42,12 +40,15 @@ Module Configuration
|
||||
ElseIf ActivePage = Pages.MACHINING AndAlso Not bPreview Then
|
||||
sFileName = ProjectManagerVM.CurrProd.sProdDirPath & "\" & ProjectManagerVM.CurrProd.sProdId & " - " & "Statistics.pdf"
|
||||
ElseIf ActivePage = Pages.MACHINING AndAlso bPreview Then ' Se la pagina e' 1 e' bPreview e' True creo PDF Optimizer
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf"
|
||||
sFileName = Map.refMainWindowVM.MainWindowM.sTempDir & "\OptStatistics.pdf"
|
||||
PrevSelect()
|
||||
End If
|
||||
Dim renderer As New PdfDocumentRenderer() With {
|
||||
Dim renderer As New PdfDocumentRenderer(True) With {
|
||||
.Document = document}
|
||||
renderer.RenderDocument()
|
||||
renderer.PdfDocument.Options.FlateEncodeMode = PdfSharp.Pdf.PdfFlateEncodeMode.BestCompression
|
||||
renderer.PdfDocument.Options.UseFlateDecoderForJpegImages = PdfSharp.Pdf.PdfUseFlateDecoderForJpegImages.Automatic
|
||||
renderer.PdfDocument.Options.CompressContentStreams = True
|
||||
renderer.PdfDocument.Save(sFileName)
|
||||
If Not bPreview Then Process.Start(sFileName)
|
||||
Catch ex As Exception
|
||||
@@ -67,51 +68,4 @@ Module Configuration
|
||||
EgtZoom(ZM.ALL, True)
|
||||
End Sub
|
||||
|
||||
Public Sub SaveEml(message As MailMessage, filename As String)
|
||||
Dim boundary As String = "====BOUNDARY_" & Guid.NewGuid().ToString() & "===="
|
||||
Dim sb As New StringBuilder()
|
||||
|
||||
' Intestazioni principali
|
||||
sb.AppendLine("To: " & String.Join(";", message.To.Select(Function(t) t.Address)))
|
||||
If message.CC.Count > 0 Then
|
||||
sb.AppendLine("Cc: " & String.Join(";", message.CC.Select(Function(t) t.Address)))
|
||||
End If
|
||||
sb.AppendLine("Subject: " & message.Subject)
|
||||
|
||||
sb.AppendLine("X-Unsent: 1")
|
||||
sb.AppendLine("MIME-Version: 1.0")
|
||||
sb.AppendLine("Content-Type: multipart/mixed; boundary=""" & boundary & """")
|
||||
sb.AppendLine()
|
||||
|
||||
' Corpo HTML
|
||||
sb.AppendLine("--" & boundary)
|
||||
sb.AppendLine("Content-Type: text/html; charset=utf-8")
|
||||
sb.AppendLine("Content-Transfer-Encoding: quoted-printable")
|
||||
sb.AppendLine()
|
||||
sb.AppendLine(message.Body)
|
||||
sb.AppendLine()
|
||||
|
||||
' Allegati
|
||||
For Each att As Attachment In message.Attachments
|
||||
Dim ms As New MemoryStream()
|
||||
att.ContentStream.Position = 0
|
||||
att.ContentStream.CopyTo(ms)
|
||||
Dim bytes = ms.ToArray()
|
||||
Dim base64 = Convert.ToBase64String(bytes, Base64FormattingOptions.InsertLineBreaks)
|
||||
|
||||
sb.AppendLine("--" & boundary)
|
||||
sb.AppendLine("Content-Type: " & att.ContentType.MediaType & "; name=""" & att.Name & """")
|
||||
sb.AppendLine("Content-Disposition: attachment; filename=""" & att.Name & """")
|
||||
sb.AppendLine("Content-Transfer-Encoding: base64")
|
||||
sb.AppendLine()
|
||||
sb.AppendLine(base64)
|
||||
sb.AppendLine()
|
||||
Next
|
||||
|
||||
' Fine MIME
|
||||
sb.AppendLine("--" & boundary & "--")
|
||||
' Salvataggio file
|
||||
File.WriteAllText(filename, sb.ToString(), Encoding.UTF8)
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
|
||||
|
||||
<!--#region Panel ViewModel-->
|
||||
@@ -69,12 +70,14 @@
|
||||
<BitmapImage x:Key="HeaderSetting_Image" UriSource="/Resources/NewPage/SettingIntestazione.png"/>
|
||||
<BitmapImage x:Key="Setting_Image" UriSource="/Resources/NewPage/Setting.png"/>
|
||||
<BitmapImage x:Key="Edit_Image" UriSource="/Resources/CALCPanel/Edit.png"/>
|
||||
<BitmapImage x:Key="HeaderEdit_Image" UriSource="/Resources/NewPage/EditIntestazione.png"/>
|
||||
<BitmapImage x:Key="Ok_Image" UriSource="/Resources/NewPage/Ok.png"/>
|
||||
<BitmapImage x:Key="Delete_Image" UriSource="/Resources/PDFEditor/Delete.png"/>
|
||||
<BitmapImage x:Key="CopyPart_Image" UriSource="/Resources/LeftPanel/CopyPart.png"/>
|
||||
<BitmapImage x:Key="Remove_Image" UriSource="/Resources/NewPage/Remove.png"/>
|
||||
<BitmapImage x:Key="HeaderSimulate_Image" UriSource="/Resources/NewPage/SimulateIntestazione.png"/>
|
||||
<BitmapImage x:Key="Simulate_Image" UriSource="/Resources/CALCPanel/Simulate.png"/>
|
||||
<BitmapImage x:Key="ResetCalc_Image" UriSource="/Resources/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="Save_Image" UriSource="/Resources/ProjectManager/Save.png"/>
|
||||
<BitmapImage x:Key="CopyFeature_Image" UriSource="/Resources/LeftPanel/CopyFeature.png"/>
|
||||
@@ -104,7 +107,7 @@
|
||||
<BitmapImage x:Key="MoveUp_Image" UriSource="/Resources/NewPage/MoveUp.png"/>
|
||||
<BitmapImage x:Key="MoveDown_Image" UriSource="/Resources/NewPage/MoveDown.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="Inversion_Image" UriSource="/Resources/NewPage/Inversion.png"/>
|
||||
<BitmapImage x:Key="Send_Image" UriSource="/Resources/MainMenu/Send.png"/>
|
||||
@@ -149,7 +152,8 @@
|
||||
<BitmapImage x:Key="Restore_Image" UriSource="/Resources/EgtDialog/Restore.png"/>
|
||||
<BitmapImage x:Key="AboutBox_Image" UriSource="/Resources/AboutBox/EgalwareLogo.png"/>
|
||||
<BitmapImage x:Key="Clock_Image" UriSource="/Resources/NewPage/clock.png"/>
|
||||
|
||||
<BitmapImage x:Key="Update_Image" UriSource="/Resources/NewPage/arrow.png"/>
|
||||
|
||||
<!--#endregion Image-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
@@ -398,6 +402,18 @@
|
||||
<Setter Property="Margin" Value="0,10,0,0"/>
|
||||
</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-->
|
||||
|
||||
<!--#region ProjectParameters-->
|
||||
@@ -520,7 +536,7 @@
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="25"/>
|
||||
<Setter Property="Margin" Value="2,0,2,0"/>
|
||||
<Setter Property="Margin" Value="5,0,5,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ROT_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
|
||||
@@ -745,6 +761,11 @@
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
</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}">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
@@ -807,7 +828,7 @@
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
<Setter Property="Margin" Value="2.5,2.5,2.5,2.5"/>
|
||||
<Setter Property="Margin" Value="2.5,3,2.5,3"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="NameBTL_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource Optimizer_Button}">
|
||||
@@ -815,6 +836,13 @@
|
||||
<Setter Property="Margin" Value="0,0,5,0"/>
|
||||
</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-->
|
||||
|
||||
<!--#region ProdManager-->
|
||||
@@ -2469,6 +2497,13 @@
|
||||
<Setter Property="StaysOpen" Value="False"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="FilterSect_PopUp" TargetType="{x:Type Popup}">
|
||||
<Setter Property="AllowsTransparency" Value="True"/>
|
||||
<Setter Property="PopupAnimation" Value="Fade"/>
|
||||
<Setter Property="Placement" Value="Bottom"/>
|
||||
<Setter Property="StaysOpen" Value="False"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion PopUp-->
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
@@ -2498,11 +2533,6 @@
|
||||
<Setter Property="Margin" Value="2,2,2,0"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Calc_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="Height" Value="20"/>
|
||||
<Setter Property="Width" Value="20"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion Optimizer-->
|
||||
|
||||
<!--#region TotalTime_Border-->
|
||||
@@ -2608,6 +2638,19 @@
|
||||
<Setter Property="Background" Value="{StaticResource Grid.Static.ExpanderDown.Background}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Calc_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="Height" Value="20"/>
|
||||
<Setter Property="Width" Value="20"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Filtering_Border" TargetType="{x:Type Border}">
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BeamWall_Silver}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
</Style>
|
||||
|
||||
<!--#region TopPanel_Border-->
|
||||
|
||||
<Style x:Key="TopPanel_Border" TargetType="{x:Type Border}">
|
||||
@@ -2691,7 +2734,7 @@
|
||||
|
||||
<Style x:Key="StrategyManager_Image" TargetType="{x:Type Image}">
|
||||
<Setter Property="Stretch" Value="Uniform"/>
|
||||
<Setter Property="Margin" Value="5,0,0,0"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="StrategyProduction_Image" TargetType="{x:Type Image}">
|
||||
@@ -2775,6 +2818,43 @@
|
||||
<Setter Property="ShowSearchPanelNavigationButtons" Value="True"/>
|
||||
<Setter Property="UseEvenRowBackground" Value="True"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="EditTableViewStyle" TargetType="{x:Type dxg:TableView}">
|
||||
<Setter Property="AllowPerPixelScrolling" Value="True"/>
|
||||
<Setter Property="AllowEditing" Value="True"/>
|
||||
<Setter Property="AllowSorting" Value="True"/>
|
||||
<Setter Property="AllowGrouping" Value="True"/>
|
||||
<Setter Property="AllowColumnFiltering" Value="True"/>
|
||||
<Setter Property="AllowFilterEditor" Value="False"/>
|
||||
<Setter Property="AllowFilterPanelNavigation" Value="False"/>
|
||||
<Setter Property="AlternationCount" Value="2"/>
|
||||
<Setter Property="AlternateRowBackground" Value="{StaticResource BeamWall_LinkWater}"/>
|
||||
<Setter Property="AutoWidth" Value="False"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="ExtendScrollBarToFixedColumns" Value="True"/>
|
||||
<Setter Property="EvenRowBackground" Value="{StaticResource BeamWall_BLackSqueeze}"/>
|
||||
<Setter Property="FixedLineWidth" Value="2"/>
|
||||
<Setter Property="Focusable" Value="True"/>
|
||||
<Setter Property="GroupSummaryDisplayMode" Value="AlignByColumns"/>
|
||||
<Setter Property="IsTotalSummaryMenuEnabled" Value="False"/>
|
||||
<Setter Property="IsGroupFooterMenuEnabled" Value="True"/>
|
||||
<Setter Property="LeftGroupAreaIndent" Value="0"/>
|
||||
<Setter Property="NavigationStyle" Value="Cell"/>
|
||||
<Setter Property="RowMinHeight" Value="28"/>
|
||||
<Setter Property="ShowGroupPanel" Value="False"/>
|
||||
<Setter Property="ShowTotalSummary" Value="True"/>
|
||||
<Setter Property="ShowSearchPanelMode" Value="Default"/>
|
||||
<Setter Property="ShowFilterPanelMode" Value="Never"/>
|
||||
<Setter Property="ShowIndicator" Value="False"/>
|
||||
<Setter Property="ShowColumnHeaders" Value="True"/>
|
||||
<Setter Property="ShowHorizontalLines" Value="True"/>
|
||||
<Setter Property="ShowVerticalLines" Value="False"/>
|
||||
<Setter Property="ShowFocusedRectangle" Value="True"/>
|
||||
<Setter Property="ShowGroupFooters" Value="True"/>
|
||||
<Setter Property="ShowSearchPanelResultInfo" Value="True"/>
|
||||
<Setter Property="ShowSearchPanelNavigationButtons" Value="True"/>
|
||||
<Setter Property="UseEvenRowBackground" Value="True"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HeaderStyle" TargetType="{x:Type dxg:BaseGridHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource DataGridColumnHeader.Static.Main.Background}"/>
|
||||
@@ -2786,6 +2866,16 @@
|
||||
<!--<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"/>
|
||||
@@ -2809,6 +2899,21 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CellStyle" TargetType="{x:Type dxg:LightweightCellEditor}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="SelectionState" Value="Selected">
|
||||
<Setter Property="Background" Value="{StaticResource RowDataGrid.Selected.Background}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource RowDataGrid.Selected.Foreground}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource RowDataGrid.Selected.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="dxg:GridViewBase.IsFocusedCell" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource RowDataGrid.Selected.Background}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource RowDataGrid.Selected.Foreground}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource RowDataGrid.Selected.Border}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DropDownButtonStyle" TargetType="{x:Type dx:DropDownButton}">
|
||||
<Setter Property="Background" Value="{StaticResource ButtonBasic.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ButtonBasic.Static.Border}"/>
|
||||
@@ -2819,52 +2924,12 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ColumnButtonStyle" TargetType="{x:Type dxg:GridColumn}">
|
||||
<Setter Property="Header" Value=""/>
|
||||
<Setter Property="AllowSorting" Value="False"/>
|
||||
<Setter Property="ImageAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalHeaderContentAlignment" Value="Center"/>
|
||||
<Setter Property="Fixed" Value="Right"/>
|
||||
<Setter Property="AllowColumnFiltering" Value="False"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ColumnPDNStyle" TargetType="{x:Type dxg:GridColumn}">
|
||||
<Setter Property="HorizontalHeaderContentAlignment" Value="Center"/>
|
||||
<Setter Property="Fixed" Value="Left"/>
|
||||
<Setter Property="DefaultSortOrder" Value="Ascending"/>
|
||||
<Setter Property="SortOrder" Value="Ascending"/>
|
||||
<Setter Property="FilterPopupMode" Value="CheckedList"/>
|
||||
<Setter Property="EditSettings">
|
||||
<Setter.Value>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ColumnInfoStyle" TargetType="{x:Type dxg:GridColumn}">
|
||||
<Setter Property="HorizontalHeaderContentAlignment" Value="Center"/>
|
||||
<Setter Property="AllowColumnFiltering" Value="False"/>
|
||||
<Setter Property="EditSettings">
|
||||
<Setter.Value>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ColumnInfoCustomStyle" TargetType="{x:Type dxg:GridColumn}">
|
||||
<Setter Property="AllowSorting" Value="False"/>
|
||||
<Setter Property="HorizontalHeaderContentAlignment" Value="Center"/>
|
||||
<Setter Property="FilterPopupMode" Value="Custom"/>
|
||||
<Setter Property="EditSettings">
|
||||
<Setter.Value>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ColumnInfoCheckedListStyle" TargetType="{x:Type dxg:GridColumn}">
|
||||
<Setter Property="AllowSorting" Value="False"/>
|
||||
<Setter Property="HorizontalHeaderContentAlignment" Value="Center"/>
|
||||
<Setter Property="FilterPopupMode" Value="CheckedList"/>
|
||||
<Setter Property="EditSettings">
|
||||
<Setter.Value>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Center"/>
|
||||
@@ -2876,6 +2941,35 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SearchControlStyle" TargetType="{x:Type dxe:SearchControl}">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Width" Value="300"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CheckedListStyle" TargetType="{x:Type dxfui:CheckedListFilterElement}">
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type dxe:TextEdit}">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}"/>
|
||||
<Setter Property="Background" Value="{StaticResource BeamWall_Kashmir}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ComboBoxEditStyle" TargetType="{x:Type dxe:ComboBoxEdit}">
|
||||
<Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource ComboBox.Static.Foreground}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="6,3,5,3"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="IsTextEditable" Value="False"/>
|
||||
<Setter Property="AllowDefaultButton" Value="True"/>
|
||||
</Style>
|
||||
|
||||
<!--#endregion DevExpress-->
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
Module MapV
|
||||
|
||||
Private m_refSplashScreenV As SplashScreenV
|
||||
Private m_refPDFEditorV As PDFEditorV
|
||||
|
||||
#Region "Get"
|
||||
|
||||
|
||||
Public ReadOnly Property refSplashScreenV As SplashScreenV
|
||||
Get
|
||||
Return m_refSplashScreenV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refPDFEditorV As PDFEditorV
|
||||
Get
|
||||
Return m_refPDFEditorV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Get
|
||||
|
||||
#Region "Set"
|
||||
@@ -20,6 +26,11 @@
|
||||
Return Not IsNothing(m_refSplashScreenV)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefPDFEditorV(PDFEditorV As PDFEditorV) As Boolean
|
||||
m_refPDFEditorV = PDFEditorV
|
||||
Return Not IsNothing(m_refPDFEditorV)
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
End Module
|
||||
|
||||
@@ -6,6 +6,16 @@
|
||||
xmlns:OPTIMIZER="clr-namespace:EgtBEAMWALL.Optimizer"
|
||||
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
|
||||
xmlns:EgwWPFBaseLib="clr-namespace:EgwWPFBaseLib;assembly=EgwWPFBaseLib"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxeh="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
|
||||
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxfui="http://schemas.devexpress.com/winfx/2008/xaml/core/filteringui"
|
||||
xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
|
||||
xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
|
||||
SizeToContent="Height"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ShowInTaskbar="False"
|
||||
@@ -210,6 +220,70 @@
|
||||
Style="{StaticResource WAutoWnd_Button}"/>
|
||||
|
||||
</Grid>
|
||||
<!--<dxg:GridControl Grid.Row="1"
|
||||
x:Name="Warehouse_GridControl"
|
||||
ItemsSource="{Binding SParamList}"
|
||||
SelectedItem="{Binding SelSParam}"
|
||||
SelectionMode="Row">
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="Warehouse_TableView"
|
||||
ColumnHeaderStyle="{StaticResource HeaderStyle}"
|
||||
ColumnHeaderImageStyle="{StaticResource HeaderImageStyle}"
|
||||
|
||||
RowStyle="{StaticResource RowStyle}"
|
||||
CellStyle="{StaticResource CellStyle}"
|
||||
|
||||
Style="{StaticResource TableViewStyle}">
|
||||
</dxg:TableView>
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridColumn FieldName="bActive"
|
||||
Header=""
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:CheckEdit IsChecked="{Binding RowData.Row.bActive}"
|
||||
Style="{StaticResource bDoCheckEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="SectXMat"
|
||||
Header="{Binding SectionXMaterial_Msg}"
|
||||
Fixed="Left"
|
||||
AllowEditing="False"
|
||||
SortFieldName="SectionXMaterialDisplayOrder"
|
||||
Style="{StaticResource ColumnInfoStyle}">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<dxe:ComboBoxEdit ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type OPTIMIZER:WarehouseWndV}}, Path=DataContext.SectionXMaterialList}"
|
||||
EditValue="{Binding SectXMat, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type dxe:ComboBoxEdit}}}"
|
||||
Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type dxe:ComboBoxEdit}}}"
|
||||
DisplayMember="sSectionXMaterial"
|
||||
Style="{StaticResource ComboBoxEditStyle}"/>
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="sW"
|
||||
Header="{Binding W_Msg}"
|
||||
Binding="{Binding sW}"
|
||||
SortFieldName="dW"
|
||||
AllowColumnFiltering="False"
|
||||
AllowEditing="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="sL"
|
||||
Header="{Binding L_Msg}"
|
||||
Binding="{Binding sL}"
|
||||
SortFieldName="dL"
|
||||
AllowColumnFiltering="False"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
<dxg:GridColumn FieldName="nQuantity"
|
||||
Header="{Binding Quantity_Msg}"
|
||||
Binding="{Binding nQuantity}"
|
||||
Style="{StaticResource ColumnInfoStyle}"/>
|
||||
</dxg:GridControl>-->
|
||||
|
||||
<EgwWPFBaseLib:EgwDataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding SParamList}"
|
||||
SelectedItem="{Binding SelSParam}"
|
||||
@@ -222,7 +296,7 @@
|
||||
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
|
||||
RowStyle="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<DataGrid.Resources>
|
||||
<!-- Active -->
|
||||
<!--Active-->
|
||||
<DataGridTemplateColumn x:Key="colACTIVE">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
@@ -231,13 +305,13 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!-- SectionXMaterial -->
|
||||
<!--SectionXMaterial-->
|
||||
<DataGridTemplateColumn x:Key="colSECTXMAT"
|
||||
SortMemberPath="SectionXMaterialDisplayOrder">
|
||||
<DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=DataContext.SectionXMaterial_Msg,RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:WarehouseWndV}}}"/>
|
||||
</DataTemplate>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
@@ -250,7 +324,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<!-- W -->
|
||||
<!--W-->
|
||||
<DataGridTextColumn x:Key="colW" Binding="{Binding dW}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
@@ -258,7 +332,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!-- L -->
|
||||
<!--L-->
|
||||
<DataGridTextColumn x:Key="colL" Binding="{Binding dL}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
@@ -266,7 +340,7 @@
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
</DataGridTextColumn>
|
||||
<!-- Quantity -->
|
||||
<!--Quantity-->
|
||||
<DataGridTextColumn x:Key="colQTY" Binding="{Binding nQuantity}">
|
||||
<DataGridTextColumn.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
@@ -439,6 +439,13 @@ Public Class WarehouseWndVM
|
||||
' Creo riferimento a questa classe in Map
|
||||
Map.SetRefWarehouseWndVM(Me)
|
||||
|
||||
' Ricavo il tipo di Warehouse settato nell'INI
|
||||
Dim nDefault As Integer = 2
|
||||
If GetMainPrivateProfileInt(S_WAREHOUSE, EgtBEAMWALL.Core.ConstIni.K_TYPE, nDefault) = WarehouseType.MEDIUM Then
|
||||
' Se di tipo Medium confronto le Sezioni del BTL importato con quelle in Warehouse
|
||||
WarehouseWndVM.UpdateSectionXMaterial()
|
||||
End If
|
||||
|
||||
' setto il tipo in base alla macchina selezionata come macchina corrente
|
||||
Dim nMachType As MachineType = Map.refProjectVM.BTLStructureVM.nPROJTYPE
|
||||
SectionXMaterial.SetType(nMachType)
|
||||
|
||||
@@ -496,7 +496,8 @@ Public Class CALCPanelVM
|
||||
.nProjType = ProjType,
|
||||
.bBarOk = True,
|
||||
.nMachineName = MachineName,
|
||||
.nCmdType = CalcIntegration.CmdTypes.SIMULATE}
|
||||
.nCmdType = CalcIntegration.CmdTypes.SIMULATE,
|
||||
.nBarState = SelMachGroup.nProduction_State}
|
||||
If SelMachGroup.nGlobalState = CalcStates.NOTCALCULATED Then
|
||||
Dim sMachGroupFilePath As String = Map.refSupervisorManagerVM.CurrProd.sProdDirPath & "\" & SelMachGroup.Name.ToString() & ".ori.bwe"
|
||||
If File.Exists(sMachGroupFilePath) Then File.Delete(sMachGroupFilePath)
|
||||
|
||||
@@ -0,0 +1,522 @@
|
||||
Imports System.Buffers.Binary
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports Sharp7
|
||||
|
||||
Public Class SIEMENSSharp7Comm
|
||||
|
||||
Private m_DBVariableList As New List(Of DBBuffer) ' Buffer list
|
||||
|
||||
Private IntBuffer() As Byte = {0, 0}
|
||||
Private BoolBuffer() As Byte = {0}
|
||||
Private DIntBuffer() As Byte = {0, 0, 0, 0}
|
||||
Private RealBuffer() As Byte = {0, 0, 0, 0}
|
||||
Private StringBuffer(65536) As Byte ' Buffer
|
||||
Private Client As New S7Client ' Client Object
|
||||
|
||||
' lista variabili in lettura
|
||||
Private Shared m_ReadingVars(100) As CommVar
|
||||
|
||||
' lista dei messaggi di errore attivi
|
||||
Private m_ActiveMessages As New List(Of SiemensReadMessages)
|
||||
|
||||
Private m_MachManaging As MachManaging
|
||||
Friend ReadOnly Property MachManaging As MachManaging
|
||||
Get
|
||||
Return m_MachManaging
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_RefreshTime As Integer = 10
|
||||
Private m_WaitingRefreshTime As Integer = 20
|
||||
Private m_RefreshCounter As Integer = 0
|
||||
Private m_IsRefreshing As Boolean = False
|
||||
|
||||
Public Sub New(MachManaging As MachManaging)
|
||||
m_MachManaging = MachManaging
|
||||
End Sub
|
||||
|
||||
Public Shared Function InitVar(Variable As CommVar) As CommVar
|
||||
Dim Index As Integer = Array.IndexOf(m_ReadingVars, Nothing)
|
||||
m_ReadingVars(Index) = Variable
|
||||
Return m_ReadingVars(Index)
|
||||
End Function
|
||||
|
||||
' Avvio la connessione Hardware-Client
|
||||
Friend Function InitConnection() As Boolean
|
||||
' Ip del PLC
|
||||
Dim sIp As String = ""
|
||||
GetPrivateProfileString(S_GENERAL, K_IP, "", sIp, CurrentMachine.sMachIniFile)
|
||||
' unità usate dal PLC (Rack e Slot)
|
||||
Dim nRack As Integer = GetPrivateProfileInt(S_GENERAL, K_RACK, 0, CurrentMachine.sMachIniFile)
|
||||
Dim nSlot As Integer = GetPrivateProfileInt(S_GENERAL, K_SLOT, 0, CurrentMachine.sMachIniFile)
|
||||
Map.refMachManaging.DebugMessage(1, "Tentativo di connessione a CN Siemens con Sharp7")
|
||||
Map.refMachManaging.DebugMessage(1, "IP: " & sIp)
|
||||
Map.refMachManaging.DebugMessage(1, "Rack: " & nRack)
|
||||
Map.refMachManaging.DebugMessage(1, "Slot: " & nSlot)
|
||||
Dim nResult As Integer = Client.ConnectTo(sIp, nRack, nSlot)
|
||||
If nResult = 0 Then
|
||||
Map.refMachManaging.DebugMessage(1, "Connessione effettuata")
|
||||
Else
|
||||
Map.refMachManaging.DebugMessage(1, "Connessione fallita con codice di errore: " & nResult)
|
||||
End If
|
||||
' se la connessione è restituisce 0
|
||||
Return nResult = 0
|
||||
End Function
|
||||
|
||||
' chiudo la connessione
|
||||
Friend Sub CloseConnection()
|
||||
Dim nResult As Integer = Client.Disconnect()
|
||||
If Map.refMachManaging.Debug > 0 Then
|
||||
If nResult = 0 Then
|
||||
EgtOutLog("Disconnessione effettuata")
|
||||
Else
|
||||
EgtOutLog("Disconnessione fallita con codice di errore: " & nResult)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Friend Sub RefreshConnection()
|
||||
If m_RefreshCounter < m_RefreshTime Then
|
||||
m_RefreshCounter += 1
|
||||
Else
|
||||
' riavvio connessione
|
||||
m_IsRefreshing = True
|
||||
CloseConnection()
|
||||
InitConnection()
|
||||
m_IsRefreshing = False
|
||||
m_RefreshCounter = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function WaitingRefresh() As Boolean
|
||||
If Not m_IsRefreshing Then Return True
|
||||
Dim WaitingCounter As Integer = 0
|
||||
While m_IsRefreshing < m_WaitingRefreshTime
|
||||
If Not m_IsRefreshing Then Return True
|
||||
Threading.Thread.Sleep(100)
|
||||
End While
|
||||
EgtOutLog("Waiting reconnection timeout!")
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#Region "Read Variables"
|
||||
|
||||
Public Sub RefreshAllVars()
|
||||
WaitingRefresh()
|
||||
m_DBVariableList.Clear()
|
||||
For Each Var In m_ReadingVars
|
||||
' rileggo solo variabili continue
|
||||
If Not IsNothing(Var) AndAlso Var.nReadType = CommVar.ReadTypes.CONTINUOUS Then
|
||||
Dim CompleteAddressSplit() As String = Var.sAddress.Split(":"c)
|
||||
Dim nDBAddress As Integer = 0
|
||||
Integer.TryParse(CompleteAddressSplit(0), nDBAddress)
|
||||
If nDBAddress = 0 Then Return
|
||||
Dim DBBuffer As DBBuffer = m_DBVariableList.FirstOrDefault(Function(x) x.DBAddress = nDBAddress)
|
||||
If IsNothing(DBBuffer) Then
|
||||
Dim Buffer(65536) As Byte
|
||||
Dim nAddressByte As Integer = 0
|
||||
Select Case nDBAddress
|
||||
Case 301
|
||||
nAddressByte = 8
|
||||
Case 302
|
||||
nAddressByte = 46
|
||||
End Select
|
||||
Map.refMachManaging.DebugMessage(1, "Lettura di " & nAddressByte & " byte dalla variabile " & nDBAddress)
|
||||
Dim nResult As Integer = 1234567890
|
||||
Try
|
||||
nResult = Client.DBRead(nDBAddress, 0, nAddressByte, Buffer)
|
||||
Catch ex As Exception
|
||||
nResult = 1234567890
|
||||
Map.refMachManaging.DebugMessage(1, "Lettura di " & nDBAddress & " ha generato un'eccezione")
|
||||
Map.refMachManaging.DebugMessage(1, ex.ToString())
|
||||
End Try
|
||||
If nResult = 0 Then
|
||||
Map.refMachManaging.DebugMessage(1, "Lettura di " & nDBAddress & " effettuata")
|
||||
If Map.refMachManaging.Debug > 1 Then
|
||||
'For Index = 0 To Buffer.Count - 1
|
||||
' Map.refMachManaging.DebugMessage(2, Index & ": " & Buffer(Index))
|
||||
'Next
|
||||
End If
|
||||
Else
|
||||
Map.refMachManaging.DebugMessage(2, "Lettura fallita con codice di errore: " & nResult)
|
||||
End If
|
||||
If nResult = 0 Then
|
||||
DBBuffer = New DBBuffer(nDBAddress, Buffer)
|
||||
m_DBVariableList.Add(DBBuffer)
|
||||
End If
|
||||
End If
|
||||
If Not IsNothing(DBBuffer) Then
|
||||
Dim PositionAddressSplit() As String = CompleteAddressSplit(1).Split("."c)
|
||||
Dim nStartIndex As Integer = 0
|
||||
Integer.TryParse(PositionAddressSplit(0), nStartIndex)
|
||||
Select Case CompleteAddressSplit(2)
|
||||
Case 1
|
||||
Dim nBytePositionIndex As Integer = 0
|
||||
Integer.TryParse(PositionAddressSplit(1), nBytePositionIndex)
|
||||
Dim nPower As Integer = Math.Pow(2, nBytePositionIndex)
|
||||
' Dim bValue As Boolean = (TestBuffer(nStartIndex) And nPower) = nPower
|
||||
Map.refMachManaging.DebugMessage(2, "Lettura variabile " & nDBAddress & ":" & nStartIndex & "." & nBytePositionIndex)
|
||||
Var.SetValue(If((DBBuffer.DBValue(nStartIndex) And nPower) = nPower, 1, 0))
|
||||
Map.refMachManaging.DebugMessage(2, "Variabile " & nDBAddress & ":" & nStartIndex & "." & nBytePositionIndex & " (Tipo 1) = " & Var.sValue)
|
||||
Case 2
|
||||
'Dim x = BitConverter.ToInt16(TestBuffer, nStartIndex)
|
||||
Dim nValue As Int16 = BitConverter.ToInt16(DBBuffer.DBValue, nStartIndex)
|
||||
Map.refMachManaging.DebugMessage(2, "Lettura variabile " & nDBAddress & ":" & nStartIndex)
|
||||
Var.SetValue(BinaryPrimitives.ReverseEndianness(nValue))
|
||||
Map.refMachManaging.DebugMessage(2, "Variabile " & nDBAddress & ":" & nStartIndex & " (Tipo 2) = " & Var.sValue)
|
||||
Case 3
|
||||
' Dim x = BitConverter.ToInt32(TestBuffer, nStartIndex)
|
||||
Dim nValue As Integer = BitConverter.ToInt32(DBBuffer.DBValue, nStartIndex)
|
||||
Map.refMachManaging.DebugMessage(2, "Lettura variabile " & nDBAddress & ":" & nStartIndex)
|
||||
Var.SetValue(BinaryPrimitives.ReverseEndianness(nValue))
|
||||
Map.refMachManaging.DebugMessage(2, "Variabile " & nDBAddress & ":" & nStartIndex & " (Tipo 3) = " & Var.sValue)
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Friend Function WriteVariable(Address As String, Value As String) As Boolean
|
||||
WaitingRefresh()
|
||||
Dim CompleteAddressSplit() As String = Address.Split(":"c)
|
||||
Dim nDBAddress As Integer = 0
|
||||
Integer.TryParse(CompleteAddressSplit(0), nDBAddress)
|
||||
If nDBAddress = 0 Then Return False
|
||||
Dim PositionAddressSplit() As String = CompleteAddressSplit(1).Split("."c)
|
||||
Dim nStartIndex As Integer = 0
|
||||
Integer.TryParse(PositionAddressSplit(0), nStartIndex)
|
||||
Select Case CompleteAddressSplit(2)
|
||||
Case 1
|
||||
' rileggo int16
|
||||
Dim Buffer(1) As Byte
|
||||
Client.DBRead(nDBAddress, nStartIndex, 1, Buffer)
|
||||
Dim nBytePositionIndex As Integer = 0
|
||||
Integer.TryParse(PositionAddressSplit(1), nBytePositionIndex)
|
||||
Dim nPower As Integer = Math.Pow(2, nBytePositionIndex)
|
||||
Dim nNewValue As Integer = 0
|
||||
If Not Integer.TryParse(Value, nNewValue) Then Return False
|
||||
Dim nOldValue As Integer = If((Buffer(0) And nPower) = nPower, 1, 0)
|
||||
If nOldValue = nNewValue Then
|
||||
Return True
|
||||
ElseIf nOldValue = 0 Then
|
||||
Buffer(0) = Buffer(0) Or nPower
|
||||
ElseIf nOldValue = 1 Then
|
||||
Buffer(0) = Buffer(0) Xor nPower
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
' Buffer(0) = Buffer(0) And nPower
|
||||
If Map.refMachManaging.Debug > 1 Then
|
||||
EgtOutLog("Scrittura variabile " & Address & " (Tipo 1) con valore " & Value)
|
||||
'For Index = 0 To Buffer.Count - 1
|
||||
' EgtOutLog(Index & ": " & Buffer(Index))
|
||||
'Next
|
||||
End If
|
||||
Dim nResult As Integer = Client.DBWrite(nDBAddress, nStartIndex, 1, Buffer) ' DbNumber, Start, Amount, Buffer
|
||||
' Return WriteBool(nDBAddress, nStartIndex, bValue)
|
||||
If Map.refMachManaging.Debug > 1 Then
|
||||
If nResult <> 0 Then
|
||||
EgtOutLog("Scrittura variabile " & nDBAddress & ":" & nStartIndex & " con valore " & Value & " effettuata")
|
||||
Else
|
||||
EgtOutLog("Scrittura variabile " & nDBAddress & ":" & nStartIndex & " con valore " & Value & " fallita")
|
||||
End If
|
||||
End If
|
||||
Return nResult = 0
|
||||
Case 2
|
||||
Dim nValue As Int16 = 0
|
||||
If Not Int16.TryParse(Value, nValue) Then Return False
|
||||
If Map.refMachManaging.Debug > 1 Then
|
||||
EgtOutLog("Scrittura variabile " & Address & " (Tipo 2) con valore " & Value)
|
||||
End If
|
||||
Dim bResult As Boolean = WriteInt(nDBAddress, nStartIndex, nValue)
|
||||
If Map.refMachManaging.Debug > 1 Then
|
||||
If bResult Then
|
||||
EgtOutLog("Scrittura variabile " & nDBAddress & ":" & nStartIndex & " con valore " & Value & " effettuata")
|
||||
Else
|
||||
EgtOutLog("Scrittura variabile " & nDBAddress & ":" & nStartIndex & " con valore " & Value & " fallita")
|
||||
End If
|
||||
End If
|
||||
Return bResult
|
||||
Case 3
|
||||
Dim nValue As Integer = 0
|
||||
If Not Integer.TryParse(Value, nValue) Then Return False
|
||||
If Map.refMachManaging.Debug > 1 Then
|
||||
EgtOutLog("Scrittura variabile " & Address & " (Tipo 3) con valore " & Value)
|
||||
End If
|
||||
Dim bResult As Boolean = WriteDInt(nDBAddress, nStartIndex, nValue)
|
||||
If Map.refMachManaging.Debug > 1 Then
|
||||
If bResult Then
|
||||
EgtOutLog("Scrittura variabile " & nDBAddress & ":" & nStartIndex & " con valore " & Value & " effettuata")
|
||||
Else
|
||||
EgtOutLog("Scrittura variabile " & nDBAddress & ":" & nStartIndex & " con valore " & Value & " fallita")
|
||||
End If
|
||||
End If
|
||||
Return bResult
|
||||
Case 4
|
||||
Dim dValue As Single = 0
|
||||
If Not StringToDoubleAdv(Value, dValue) Then Return False
|
||||
If Map.refMachManaging.Debug > 1 Then
|
||||
EgtOutLog("Scrittura variabile " & Address & " (Tipo 4) con valore " & Value)
|
||||
End If
|
||||
Dim bResult As Boolean = WriteReal(nDBAddress, nStartIndex, dValue)
|
||||
If Map.refMachManaging.Debug > 1 Then
|
||||
If bResult Then
|
||||
EgtOutLog("Scrittura variabile " & nDBAddress & ":" & nStartIndex & " con valore " & Value & " effettuata")
|
||||
Else
|
||||
EgtOutLog("Scrittura variabile " & nDBAddress & ":" & nStartIndex & " con valore " & Value & " fallita")
|
||||
End If
|
||||
End If
|
||||
Return bResult
|
||||
End Select
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region ' Read Variables
|
||||
|
||||
Friend Function ReadInt(DBNumber As Integer, Start As Integer, ByRef Value As Integer) As Boolean
|
||||
WaitingRefresh()
|
||||
' Read 2 bytes from the DBNumber starting from Start and puts them into ReadBuffer.
|
||||
Dim Result As Integer = Client.DBRead(DBNumber, Start, 2, IntBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
If Result = 0 Then
|
||||
Value = S7.GetIntAt(IntBuffer, 0)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function WriteInt(DBNumber As Integer, Start As Integer, Value As Int16) As Boolean
|
||||
WaitingRefresh()
|
||||
S7.SetIntAt(IntBuffer, 0, Value)
|
||||
' Read "Size" bytes from the DB "DBNumber" starting from 0 and puts them into Buffer.
|
||||
Dim Result As Integer = Client.DBWrite(DBNumber, Start, 2, IntBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
Return Result = 0
|
||||
End Function
|
||||
|
||||
Friend Function ReadBool(DBNumber As Integer, Start As Integer, ByRef Value As Boolean) As Boolean
|
||||
WaitingRefresh()
|
||||
' Read 2 bytes from the DBNumber starting from Start and puts them into ReadBuffer.
|
||||
Dim Result As Integer = Client.DBRead(DBNumber, Start, 1, BoolBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
If Result = 0 Then
|
||||
Value = BitConverter.ToBoolean(BoolBuffer, 0)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function WriteBool(DBNumber As Integer, Start As Integer, Value As Boolean) As Boolean
|
||||
WaitingRefresh()
|
||||
|
||||
If Value Then
|
||||
BoolBuffer(0) = &H1
|
||||
Else
|
||||
BoolBuffer(0) = &H0
|
||||
End If
|
||||
' Read "Size" bytes from the DB "DBNumber" starting from 0 and puts them into Buffer.
|
||||
Dim Result As Integer = Client.DBWrite(DBNumber, Start, 1, BoolBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
Return Result = 0
|
||||
End Function
|
||||
|
||||
Friend Function ReadDInt(DBNumber As Integer, Start As Integer, ByRef Value As Integer) As Boolean
|
||||
WaitingRefresh()
|
||||
' Read 2 bytes from the DBNumber starting from Start and puts them into ReadBuffer.
|
||||
Dim Result As Integer = Client.DBRead(DBNumber, Start, 4, DIntBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
If Result = 0 Then
|
||||
Value = S7.GetDIntAt(DIntBuffer, 0)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function WriteDInt(DBNumber As Integer, Start As Integer, Value As Integer) As Boolean
|
||||
WaitingRefresh()
|
||||
S7.SetDIntAt(DIntBuffer, 0, Value)
|
||||
' Read "Size" bytes from the DB "DBNumber" starting from 0 and puts them into Buffer.
|
||||
Dim Result As Integer = Client.DBWrite(DBNumber, Start, 4, DIntBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
Return Result = 0
|
||||
End Function
|
||||
|
||||
Friend Function ReadReal(DBNumber As Integer, Start As Integer, ByRef Value As Double) As Boolean
|
||||
WaitingRefresh()
|
||||
' Read 4 bytes from the DBNumber starting from Start and puts them into ReadBuffer.
|
||||
Dim Result As Integer = Client.DBRead(DBNumber, Start, 4, RealBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
If Result = 0 Then
|
||||
Value = S7.GetRealAt(RealBuffer, 0)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function WriteReal(DBNumber As Integer, Start As Integer, Value As Single) As Boolean
|
||||
WaitingRefresh()
|
||||
S7.SetRealAt(RealBuffer, 0, Value)
|
||||
' Read "Size" bytes from the DB "DBNumber" starting from 0 and puts them into Buffer.
|
||||
Dim Result As Integer = Client.DBWrite(DBNumber, Start, 4, RealBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
Return Result = 0
|
||||
End Function
|
||||
|
||||
Friend Function ReadString(DBNumber As Integer, Start As Integer, Length As Integer, ByRef Value As String) As Boolean
|
||||
WaitingRefresh()
|
||||
' Read 2 bytes from the DBNumber starting from Start and puts them into ReadBuffer.
|
||||
Dim Result As Integer = Client.DBRead(DBNumber, Start, Length, StringBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
If Result = 0 Then
|
||||
Value = S7.GetStringAt(StringBuffer, 0)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function WriteString(DBNumber As Integer, Start As Integer, Value As String) As Boolean
|
||||
WaitingRefresh()
|
||||
|
||||
If Value.Length > 65535 Then
|
||||
Return False
|
||||
End If
|
||||
S7.SetStringAt(StringBuffer, 0, 65535, Value)
|
||||
' Read "Size" bytes from the DB "DBNumber" starting from 0 and puts them into Buffer.
|
||||
Dim Result As Integer = Client.DBWrite(DBNumber, Start, Value.Length + 2, StringBuffer) ' DbNumber, Start, Amount, Buffer
|
||||
Return Result = 0
|
||||
End Function
|
||||
|
||||
Friend Function ResetStep(bReset As Boolean) As Boolean
|
||||
WaitingRefresh()
|
||||
Dim varResetStep As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList(19) ' Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = RESET_STEP)
|
||||
If bReset Then
|
||||
Map.refMachManaging.DebugMessage(1, "Imposto variabile ResetStep a 1")
|
||||
varResetStep.sValue = 1
|
||||
Threading.Thread.Sleep(100)
|
||||
Dim nResetStepOk As Integer = 0
|
||||
Dim ResetStepOk As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = RESET_STEP_OK)
|
||||
Dim ResetMachine As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = RESET_STATE)
|
||||
While nResetStepOk <> 1
|
||||
If ResetMachine.sValue = "1" Then
|
||||
Return False
|
||||
End If
|
||||
Map.refMachManaging.DebugMessage(1, "Rileggo variabili")
|
||||
RefreshAllVars()
|
||||
Map.refMachManaging.DebugMessage(1, "Leggo valore ResetStepOk")
|
||||
Integer.TryParse(ResetStepOk.sValue, nResetStepOk)
|
||||
Threading.Thread.Sleep(1000)
|
||||
End While
|
||||
End If
|
||||
varResetStep.sValue = 0
|
||||
Map.refMachManaging.DebugMessage(1, "Imposto variabile ResetStep a 0")
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Sub ReadPLCMessages()
|
||||
WaitingRefresh()
|
||||
|
||||
Dim nPlc_Msg As New List(Of Byte)
|
||||
For Index As Integer = 1 To 6
|
||||
Dim nIndex As Integer = Index
|
||||
Dim PLCMessagesVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = PLC_MESSAGES & nIndex)
|
||||
If IsNothing(PLCMessagesVariable) OrElse IsNothing(PLCMessagesVariable.sValue) Then Return
|
||||
Dim nTemp As Int16 = 0
|
||||
Int16.TryParse(PLCMessagesVariable.sValue, nTemp)
|
||||
nTemp = BinaryPrimitives.ReverseEndianness(nTemp)
|
||||
Dim Bytes As Byte() = BitConverter.GetBytes(nTemp)
|
||||
nPlc_Msg.AddRange(Bytes)
|
||||
Next
|
||||
Dim BitArray As New BitArray(nPlc_Msg.ToArray())
|
||||
Dim ErrorList As New List(Of Integer)
|
||||
For BitIndex = 0 To BitArray.Count - 1
|
||||
If BitIndex <= 169 AndAlso BitArray(BitIndex) Then
|
||||
ErrorList.Add(BitIndex)
|
||||
End If
|
||||
Next
|
||||
ShowPLCError(ErrorList)
|
||||
End Sub
|
||||
|
||||
Friend Sub ShowPLCError(ErrorNumber As List(Of Integer))
|
||||
' resetto stati bFound
|
||||
For Each Message In m_ActiveMessages
|
||||
Message.bFound = False
|
||||
Next
|
||||
|
||||
For index As Integer = 0 To ErrorNumber.Count - 1
|
||||
Dim nIndex As Integer = index
|
||||
Dim NewMessageInList As SiemensReadMessages = m_ActiveMessages.FirstOrDefault(Function(x) x.nIndex = 0.ToString())
|
||||
' se il messaggio e' gia' in lista
|
||||
If Not IsNothing(NewMessageInList) Then
|
||||
' lo segno come trovato
|
||||
NewMessageInList.bFound = True
|
||||
Else
|
||||
' lo aggiungo
|
||||
Dim NewMessage As SiemensReadMessages = New SiemensReadMessages(0.ToString())
|
||||
NewMessage.bFound = True
|
||||
m_ActiveMessages.Add(NewMessage)
|
||||
m_SiemensAlarmCallbackDlg(0, 0)
|
||||
End If
|
||||
Next
|
||||
|
||||
' cancello messaggi non trovati
|
||||
For Index = m_ActiveMessages.Count - 1 To 0 Step -1
|
||||
Dim Message As SiemensReadMessages = m_ActiveMessages(Index)
|
||||
If Not Message.bFound Then
|
||||
m_SiemensAlarmCallbackDlg(Message.nIndex, 1)
|
||||
m_ActiveMessages.RemoveAt(Index)
|
||||
End If
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Friend Class DBBuffer
|
||||
|
||||
Private m_DBAddress As Integer
|
||||
Public ReadOnly Property DBAddress As Integer
|
||||
Get
|
||||
Return m_DBAddress
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DBValue(65536) As Byte
|
||||
Public ReadOnly Property DBValue As Byte()
|
||||
Get
|
||||
Return m_DBValue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(DBAddress As Integer, DBValue As Byte())
|
||||
m_DBAddress = DBAddress
|
||||
m_DBValue = DBValue
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class SiemensReadMessages
|
||||
|
||||
Private m_nIndex As Integer
|
||||
Public ReadOnly Property nIndex As Integer
|
||||
Get
|
||||
Return m_nIndex
|
||||
End Get
|
||||
End Property
|
||||
Private m_sMessage As String
|
||||
Public ReadOnly Property sMessage As String
|
||||
Get
|
||||
Return m_sMessage
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetMessage(sValue As String)
|
||||
m_sMessage = sValue
|
||||
End Sub
|
||||
|
||||
Private m_bFound As Boolean = False
|
||||
Friend Property bFound As Boolean
|
||||
Get
|
||||
Return m_bFound
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bFound = value
|
||||
End Set
|
||||
End Property
|
||||
Public Sub New(nIndex As Integer)
|
||||
m_nIndex = nIndex
|
||||
m_sMessage = sMessage
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -19,6 +19,7 @@ Module ConstCommVar
|
||||
NUM_FLEXIUM = 2
|
||||
NUM_AXIUM_APSERVER = 3
|
||||
NUM_AXIUM_PCTOOLKIT = 4
|
||||
SIEMENS_SHARP7 = 5
|
||||
End Enum
|
||||
|
||||
' Assi
|
||||
@@ -54,6 +55,42 @@ Module ConstCommVar
|
||||
Public Const PLC_MESSAGES As String = "PLC_Messages"
|
||||
' variabile per leggere e scrivere permesso invio cn a macchina
|
||||
Public Const SENDPERMISSION As String = "SendPermission"
|
||||
' variabile per confermare lettura dati di stato pezzo
|
||||
Public Const DATAREADED As String = "Data_Readed"
|
||||
' variabile per confermare lettura stato reset
|
||||
Public Const RESETREADED As String = "Reset_Readed"
|
||||
' variabile per confermare lettura stato reset
|
||||
Public Const DATATOREAD As String = "Data_ToRead"
|
||||
' variabile per confermare lettura stato reset
|
||||
Public Const RESET_STEP As String = "Reset_Step"
|
||||
' variabile per confermare lettura stato reset
|
||||
Public Const RESET_STEP_OK As String = "Reset_Step_Ok"
|
||||
' variabile per stato CN
|
||||
Public Const NC_STATUS As String = "NC_Status"
|
||||
' variabile per modo CN
|
||||
Public Const NC_MODE As String = "NC_Mode"
|
||||
' variabile per apertura pinze manuale
|
||||
Public Const OPEN_CLAMP As String = "Open_Clamp"
|
||||
' variabile per larghezza barra al carico
|
||||
Public Const W_CARICO As String = "W_Carico"
|
||||
' variabile per lunghezza prossima barra
|
||||
Public Const NEXTPART_L As String = "NextPartL"
|
||||
' variabile per larghezza prossima barra
|
||||
Public Const NEXTPART_W As String = "NextPartW"
|
||||
' variabile per altezza prossima barra
|
||||
Public Const NEXTPART_H As String = "NextPartH"
|
||||
' variabile per PressX1 prossima barra
|
||||
Public Const NEXTPART_PRESSX1 As String = "NextPartPressX1"
|
||||
' variabile per Feed prossima barra
|
||||
Public Const NEXTPART_FEED As String = "NextPartFeed"
|
||||
' variabile per Accelerazione prossima barra
|
||||
Public Const NEXTPART_ACC As String = "NextPartAcc"
|
||||
' variabile per Ref1 prossima barra
|
||||
Public Const NEXTPART_REF1 As String = "NextPartRef1"
|
||||
' variabile per Ref2 prossima barra
|
||||
Public Const NEXTPART_REF2 As String = "NextPartRef2"
|
||||
' variabile per Ref2 prossima barra
|
||||
Public Const STOP_WORKING As String = "Stop_Working"
|
||||
|
||||
Public Enum OPStates
|
||||
Start = 1
|
||||
@@ -72,4 +109,11 @@ Module ConstCommVar
|
||||
Home = 8
|
||||
End Enum
|
||||
|
||||
' Variabili Siemens
|
||||
Public Const K_IP As String = "Ip"
|
||||
Public Const K_RACK As String = "Rack"
|
||||
Public Const K_SLOT As String = "Slot"
|
||||
Public Const K_TIMERINTERVAL As String = "TimerInterval"
|
||||
Public Const K_ISOFILEDIR As String = "IsoFileDir"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -117,7 +117,8 @@
|
||||
<HintPath>..\ExtLibs\Interop.FXServer.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="ISOCNC.Remoting">
|
||||
<Reference Include="ISOCNC.Remoting, Version=3.0.0.0, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\ExtLibs\ISOCNC.Remoting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Compression.LZ4, Version=1.3.5.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||
@@ -167,6 +168,9 @@
|
||||
<Reference Include="SdkApi.Desktop.Usb, Version=2.15.2634.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Zebra.Printer.SDK.2.15.2634\lib\net471\SdkApi.Desktop.Usb.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Sharp7.net">
|
||||
<HintPath>..\ExtLibs\Sharp7.net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpSnmpLib, Version=10.0.9.0, Culture=neutral, PublicKeyToken=4c00852d3788e005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Lextm.SharpSnmpLib.10.0.9\lib\net452\SharpSnmpLib.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -280,6 +284,7 @@
|
||||
<Compile Include="Comms\NUMAxiumComm.vb" />
|
||||
<Compile Include="Comms\NUMAxiumPcToolkitComm.vb" />
|
||||
<Compile Include="Comms\NUMFlexiumComm.vb" />
|
||||
<Compile Include="Comms\SIEMENSSharp7Comm.vb" />
|
||||
<Compile Include="Comms\TPAComm.vb" />
|
||||
<Compile Include="ConfigurationPage\ConfigurationPageV.xaml.vb">
|
||||
<DependentUpon>ConfigurationPageV.xaml</DependentUpon>
|
||||
|
||||
@@ -147,6 +147,17 @@ Public Class LeftPanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property m_Axis_Visibility As Visibility
|
||||
Public ReadOnly Property Axis_Visibility As Visibility
|
||||
Get
|
||||
Return m_Axis_Visibility
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetAxisVisibility()
|
||||
m_Axis_Visibility = If(CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7, Visibility.Collapsed, Visibility.Visible)
|
||||
NotifyPropertyChanged(NameOf(Axis_Visibility))
|
||||
End Sub
|
||||
|
||||
Private m_bRestart As Boolean = False
|
||||
Public Property bRestart As Boolean
|
||||
Get
|
||||
@@ -268,7 +279,7 @@ Public Class LeftPanelVM
|
||||
|
||||
Public ReadOnly Property OPMode_Visibility As Visibility
|
||||
Get
|
||||
Return If(CurrentMachine.NCType = NCTypes.NUM_FLEXIUM Or CurrentMachine.NCType = NCTypes.NUM_AXIUM_APSERVER Or CurrentMachine.NCType = NCTypes.NUM_AXIUM_PCTOOLKIT, Visibility.Visible, Visibility.Collapsed)
|
||||
Return If(CurrentMachine.NCType = NCTypes.NUM_FLEXIUM Or CurrentMachine.NCType = NCTypes.NUM_AXIUM_APSERVER Or CurrentMachine.NCType = NCTypes.NUM_AXIUM_PCTOOLKIT Or CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -428,7 +439,7 @@ Public Class LeftPanelVM
|
||||
New OPState("Pending", OPStates.Pending),
|
||||
New OPState("Unspecified", OPStates.Unspecified)
|
||||
}
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT, NCTypes.SIEMENS_SHARP7
|
||||
m_OPStateList = New List(Of OPState) From {New OPState("Start", OPStates.Start),
|
||||
New OPState("Stop", OPStates.Stop),
|
||||
New OPState("Reset", OPStates.End),
|
||||
@@ -454,6 +465,13 @@ Public Class LeftPanelVM
|
||||
New OPState("Manual", OPModes.Manual),
|
||||
New OPState("Home", OPModes.Home)
|
||||
}
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
m_OPModeList = New List(Of OPState) From {
|
||||
New OPState("Auto", OPModes.Auto),
|
||||
New OPState("Mdi", OPModes.Mdi),
|
||||
New OPState("Manual", OPModes.Manual),
|
||||
New OPState("Reference Point", OPModes.Home)
|
||||
}
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -20,10 +20,12 @@
|
||||
Style="{StaticResource MachCommandMessagePanel_Button}"/>
|
||||
<Button Content="START"
|
||||
Command="{Binding Start_Command}"
|
||||
Visibility="{Binding Start_Visibility}"
|
||||
IsEnabled="{Binding CommBtn_IsEnabled}"
|
||||
Style="{StaticResource MachCommandMessagePanel_Button}"/>
|
||||
<Button Content="STOP"
|
||||
Command="{Binding Stop_Command}"
|
||||
Visibility="{Binding Stop_Visibility}"
|
||||
IsEnabled="{Binding CommBtn_IsEnabled}"
|
||||
Style="{StaticResource MachCommandMessagePanel_Button}"/>
|
||||
<Button Content="RESET"
|
||||
@@ -32,6 +34,7 @@
|
||||
Style="{StaticResource MachCommandMessagePanel_Button}"/>
|
||||
<Button Content="SET POINT"
|
||||
Command="{Binding SetPoint_Command}"
|
||||
Visibility="{Binding SetPoint_Visibility}"
|
||||
IsEnabled="{Binding CommBtn_IsEnabled}"
|
||||
Style="{StaticResource MachCommandMessagePanel_Button}"/>
|
||||
<Button Content="DELETE ALARMS"
|
||||
|
||||
@@ -204,6 +204,24 @@ Public Class MachCommandMessagePanelVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Start_Visibility As Visibility
|
||||
Get
|
||||
Return If(CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7, Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Stop_Visibility As Visibility
|
||||
Get
|
||||
Return If(CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7, Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SetPoint_Visibility As Visibility
|
||||
Get
|
||||
Return If(CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7, Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DeleteAlarm_Visibility As Visibility
|
||||
Get
|
||||
Return If(CurrentMachine.NCType = NCTypes.TPA, Visibility.Visible, Visibility.Collapsed)
|
||||
@@ -296,7 +314,7 @@ Public Class MachCommandMessagePanelVM
|
||||
m_MachManagingThread = New Thread(Sub()
|
||||
MachineCommThread.MachManagingThreadFunction(AddressOf ResultCallbackDlg, AddressOf CloseCallbackDlg,
|
||||
AddressOf UpdateCallbackDlg, AddressOf TPAAlarmCallbackDlg, AddressOf NUMAlarmCallbackDlg,
|
||||
AddressOf AxisCoordinatesCallbackDlg, AddressOf OpStateCallbackDlg,
|
||||
AddressOf SiemensAlarmCallbackDlg, AddressOf AxisCoordinatesCallbackDlg, AddressOf OpStateCallbackDlg,
|
||||
AddressOf OpModeCallbackDlg, AddressOf ChannelCallbackDlg, AddressOf ReadVarCallbackDlg)
|
||||
End Sub)
|
||||
' avvio thread di gestione della macchina che avvia la connessione
|
||||
@@ -680,6 +698,42 @@ Public Class MachCommandMessagePanelVM
|
||||
DbControllers.m_LogMachineController.Create(LogEvent.CreateAlarmLog(DateTime.Now(), AlarmOperation & LogEvent.cSeparator & ErrorTyp & LogEvent.cSeparator & AlarmMessage & LogEvent.cSeparator & AlarmCode & LogEvent.cSeparator, DbControllers.m_SupervisorId))
|
||||
End Sub
|
||||
|
||||
Friend Sub SiemensAlarmCallbackDlg(nIndex As Integer, AlarmOperation As Integer)
|
||||
|
||||
' se aggiungo allarme e non ce ne erano
|
||||
If AlarmOperation = CInt(ISOCNC.Remoting.AlarmOperation.Addition) AndAlso m_ErrCycle.Count = 0 AndAlso m_Iso.Count = 0 AndAlso m_Message.Count = 0 AndAlso m_ErrSystem.Count = 0 Then
|
||||
' avvio il timer degli allarmi
|
||||
m_AlarmTimer.Start()
|
||||
End If
|
||||
Dim AlarmMessage As String = nIndex
|
||||
|
||||
' costruisco messaggio errore in base al tipo
|
||||
Dim sErrorMessage As String = AlarmMessage
|
||||
If bMsgTranslationActive Then
|
||||
Dim sTranslatedMsg = MachMsg(MsgParagraphs.PLC, nIndex)
|
||||
If Not String.IsNullOrWhiteSpace(sTranslatedMsg) Then
|
||||
sErrorMessage = sTranslatedMsg
|
||||
End If
|
||||
End If
|
||||
AlarmMessage = If(Not String.IsNullOrWhiteSpace(sErrorMessage), sErrorMessage, "")
|
||||
|
||||
If AlarmOperation = CInt(ISOCNC.Remoting.AlarmOperation.Addition) Then
|
||||
m_ErrCycle.Add(Alarm.CreateAlarm(nIndex, AlarmMessage))
|
||||
Else
|
||||
m_ErrCycle.RemoveAll(Function(x) x.sCode = nIndex)
|
||||
End If
|
||||
|
||||
' forzo aggiornamento allarmi
|
||||
AlarmTimer_Tick()
|
||||
' se non ci sono errori
|
||||
If m_ErrCycle.Count = 0 AndAlso m_Iso.Count = 0 AndAlso m_Message.Count = 0 AndAlso m_ErrSystem.Count = 0 Then
|
||||
' fermo timer degli allarmi
|
||||
m_AlarmTimer.Stop()
|
||||
End If
|
||||
'DbControllers.m_LogMachineController.Create(MachLog.CreateAlarmLog(AlarmOperation, ErrorTyp, AlarmMessage, AlarmCode, DateTime.Now))
|
||||
DbControllers.m_LogMachineController.Create(LogEvent.CreateAlarmLog(DateTime.Now(), AlarmOperation & LogEvent.cSeparator & nIndex & LogEvent.cSeparator & sErrorMessage, DbControllers.m_SupervisorId))
|
||||
End Sub
|
||||
|
||||
Friend Sub AxisCoordinatesCallbackDlg(AxisValue As Double, AxisIndex As Integer)
|
||||
Map.refAxesPanelVM.AxisCoordinatesCallbackDlg(AxisValue, AxisIndex)
|
||||
End Sub
|
||||
@@ -697,7 +751,7 @@ Public Class MachCommandMessagePanelVM
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT, NCTypes.SIEMENS_SHARP7
|
||||
Map.refLeftPanelVM.SetOPState(NewState)
|
||||
End Select
|
||||
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachineStateLog(newOpState, DbControllers.m_SupervisorId))
|
||||
@@ -710,7 +764,7 @@ Public Class MachCommandMessagePanelVM
|
||||
Return
|
||||
End If
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT, NCTypes.SIEMENS_SHARP7
|
||||
Map.refLeftPanelVM.SetOPMode(NewState)
|
||||
End Select
|
||||
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachineModeLog(newOpState, DbControllers.m_SupervisorId))
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports ISOCNC.Remoting
|
||||
|
||||
Public Class MachCommandPanelVM
|
||||
|
||||
Private m_AxisList As ObservableCollection(Of Axis)
|
||||
|
||||
Public ReadOnly Property AxisList As ObservableCollection(Of Axis)
|
||||
Get
|
||||
Return m_AxisList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_OPState As MachineOperatingState
|
||||
|
||||
'Public ReadOnly Property OPState As MachineOperatingState
|
||||
' Get
|
||||
' Return m_OPState
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Public ReadOnly Property sOPState As String
|
||||
' Get
|
||||
' Select Case m_OPState
|
||||
' Case MachineOperatingState.Start
|
||||
' Return "START"
|
||||
' Case MachineOperatingState.Stop
|
||||
' Return "STOP"
|
||||
' Case MachineOperatingState.End
|
||||
' Return "RESET"
|
||||
' Case MachineOperatingState.SetPoint
|
||||
' Return "SETPOINT"
|
||||
' Case MachineOperatingState.Pending
|
||||
' Return "PENDING"
|
||||
' Case Else
|
||||
' Return "UNSPECIFIED"
|
||||
' End Select
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public Sub New()
|
||||
Map.SetRefMachCommandMessagePanelVM(Me)
|
||||
'' impostazioni timer degli allarmi
|
||||
'm_AlarmTimer.Interval = TimeSpan.FromMilliseconds(1500)
|
||||
'AddHandler m_AlarmTimer.Tick, AddressOf AlarmTimer_Tick
|
||||
'' impostazione assi (leggerli da conf macchina)
|
||||
'm_AxisList = New ObservableCollection(Of Axis)({New Axis(ASSE_X),
|
||||
' New Axis(ASSE_Y),
|
||||
' New Axis(ASSE_Z),
|
||||
' New Axis(ASSE_C),
|
||||
' New Axis(ASSE_B)})
|
||||
'' connetto stampante etichette
|
||||
'LabelPrinter.ConnectPrinter()
|
||||
|
||||
'NotifyPropertyChanged(NameOf(Connect_Background))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,55 @@
|
||||
Public Class Axis
|
||||
Inherits VMBase
|
||||
|
||||
Private m_Name As String
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Value As Double
|
||||
Public ReadOnly Property sValue As Double
|
||||
Get
|
||||
Return m_Value
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub SetValue(value As Double)
|
||||
m_Value = value
|
||||
NotifyPropertyChanged(NameOf(sValue))
|
||||
End Sub
|
||||
|
||||
Public Sub New(Name As String)
|
||||
m_Name = Name
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Class Alarm
|
||||
|
||||
Private m_sCode As String
|
||||
Public ReadOnly Property sCode As String
|
||||
Get
|
||||
Return m_sCode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sMessage As String
|
||||
Public ReadOnly Property sMessage As String
|
||||
Get
|
||||
Return m_sMessage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected Sub New()
|
||||
End Sub
|
||||
|
||||
Public Shared Function CreateAlarm(Code As String, Message As String) As Alarm
|
||||
Dim NewAlarm As New Alarm
|
||||
NewAlarm.m_sCode = Code
|
||||
NewAlarm.m_sMessage = Message
|
||||
Return NewAlarm
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -20,13 +20,14 @@ Public Class MyMachGroupVM
|
||||
ElseIf m_bToBeProduced OrElse m_bSentToMachine Then
|
||||
Return False
|
||||
' se la macchina e' ferma
|
||||
ElseIf IsNothing(Map.refLeftPanelVM.SelOPState) OrElse
|
||||
(Map.refLeftPanelVM.SelOPState.Id = 0 OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.End OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.Stop OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.Unspecified) Then
|
||||
ElseIf CurrentMachine.NCType <> NCTypes.SIEMENS_SHARP7 AndAlso
|
||||
(IsNothing(Map.refLeftPanelVM.SelOPState) OrElse
|
||||
(Map.refLeftPanelVM.SelOPState.Id = 0 OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.End OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.Stop OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.Unspecified)) Then
|
||||
' verifico se c'e' un pezzo non finito
|
||||
Dim ToBeRestartedPart As MyMachGroupVM = Map.refSupervisorMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x As MyMachGroupVM) x.nProduction_State = Global.EgtBEAMWALL.Core.ItemState.WIP And Not m_bToBeProduced)
|
||||
Dim ToBeRestartedPart As MyMachGroupVM = Map.refSupervisorMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x As MyMachGroupVM) x.nProduction_State = Global.EgtBEAMWALL.Core.ItemState.WIP And Not x.m_bToBeProduced)
|
||||
' se c'e', attivo solo il pezzo non finito
|
||||
Return Not (Not IsNothing(ToBeRestartedPart) AndAlso Not ToBeRestartedPart Is Me)
|
||||
Else
|
||||
@@ -46,11 +47,12 @@ Public Class MyMachGroupVM
|
||||
Case ItemState.WIP
|
||||
If Not m_bToBeProduced AndAlso Not m_bSentToMachine Then
|
||||
Return True
|
||||
ElseIf IsNothing(Map.refLeftPanelVM.SelOPState) OrElse
|
||||
(Map.refLeftPanelVM.SelOPState.Id = 0 OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.End OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.Stop OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.Unspecified) Then
|
||||
ElseIf CurrentMachine.NCType <> NCTypes.SIEMENS_SHARP7 AndAlso
|
||||
(IsNothing(Map.refLeftPanelVM.SelOPState) OrElse
|
||||
(Map.refLeftPanelVM.SelOPState.Id = 0 OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.End OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.Stop OrElse
|
||||
Map.refLeftPanelVM.SelOPState.Id = OPStates.Unspecified)) Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
@@ -221,24 +223,43 @@ Public Class MyMachGroupVM
|
||||
End If
|
||||
' se progetto travi e lavorazione interrotta da reset
|
||||
If Map.refSupervisorManagerVM.CurrProd.nType = BWType.BEAM AndAlso (bResetWhileCutting OrElse dtStartTime <> DateTime.MinValue) And Not Map.refLeftPanelVM.bRestart Then
|
||||
' chiedo se riprendere o rifare la barra da zero
|
||||
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62509), "", MessageBoxButton.YesNo, MessageBoxImage.Information)
|
||||
Dim bRedo As MessageBoxResult = MessageBoxResult.No
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 AndAlso Not IsNothing(Map.refMachManaging) Then
|
||||
' leggo pinze aperte
|
||||
Dim Open_ClampVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = OPEN_CLAMP)
|
||||
Map.refMachManaging.Siemens_Sharp7.RefreshAllVars()
|
||||
Map.refMachManaging.DebugMessage(1, "Leggo variabile pinze aperte " & Open_ClampVariable.sValue)
|
||||
If Open_ClampVariable.sValue = 1 Then
|
||||
Map.refMachManaging.DebugMessage(1, "Pinze aperte, ripartenza impossibile")
|
||||
bRedo = MessageBoxResult.No
|
||||
MessageBox.Show("Pinze aperte, ripartenza impossibile!!", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning)
|
||||
Else
|
||||
' chiedo se riprendere o rifare la barra da zero
|
||||
bRedo = EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62509), "", MessageBoxButton.YesNo, MessageBoxImage.Information)
|
||||
End If
|
||||
Else
|
||||
' chiedo se riprendere o rifare la barra da zero
|
||||
bRedo = EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62509), "", MessageBoxButton.YesNo, MessageBoxImage.Information)
|
||||
End If
|
||||
Select Case bRedo
|
||||
Case MessageBoxResult.Yes
|
||||
' segno da rifare pezzi non completamente lavorati
|
||||
For Each Part As PartVM In PartVMList
|
||||
If Part.dtEndTime <> DateTime.MinValue Then
|
||||
Part.bDO = False
|
||||
Else
|
||||
Part.SetDo(True)
|
||||
End If
|
||||
Next
|
||||
' se ripresa, mostro lista feature e colonne Redo
|
||||
Map.refLeftPanelVM.bRestart = True
|
||||
' blocco produzione di tutti gli altri
|
||||
MyMachGroupVM.UpdateProduceIsEnabledForAll()
|
||||
' riabilito bottoni di comunicazione a fine invio programma
|
||||
Map.refMachCommandMessagePanelVM.SetCommBtnIsEnabled(True)
|
||||
Return
|
||||
If CurrentMachine.NCType <> NCTypes.SIEMENS_SHARP7 Then
|
||||
' segno da rifare pezzi non completamente lavorati
|
||||
For Each Part As PartVM In PartVMList
|
||||
If Part.dtEndTime <> DateTime.MinValue Then
|
||||
Part.bDO = False
|
||||
Else
|
||||
Part.SetDo(True)
|
||||
End If
|
||||
Next
|
||||
' se ripresa, mostro lista feature e colonne Redo
|
||||
Map.refLeftPanelVM.bRestart = True
|
||||
' blocco produzione di tutti gli altri
|
||||
MyMachGroupVM.UpdateProduceIsEnabledForAll()
|
||||
' riabilito bottoni di comunicazione a fine invio programma
|
||||
Map.refMachCommandMessagePanelVM.SetCommBtnIsEnabled(True)
|
||||
Return
|
||||
End If
|
||||
Case MessageBoxResult.No
|
||||
' annullo stati dei pezzi gia' fatti
|
||||
For Each Part In PartVMList
|
||||
@@ -273,8 +294,9 @@ Public Class MyMachGroupVM
|
||||
ElseIf Map.refSupervisorManagerVM.CurrProd.nType = BWType.WALL AndAlso (bResetWhileCutting OrElse dtStartTime <> DateTime.MinValue) Then
|
||||
If False Then
|
||||
' chiedo se riprendere o rifare il pannello da zero
|
||||
Dim bRedo As MessageBoxResult = EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62547), "", MessageBoxButton.YesNo, MessageBoxImage.Information)
|
||||
Dim MachIndexVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = MACHINDEX)
|
||||
Select Case EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62547), "", MessageBoxButton.YesNo, MessageBoxImage.Information)
|
||||
Select Case bRedo
|
||||
' se ripresa
|
||||
Case MessageBoxResult.Yes
|
||||
' ripristino indice di lavorazione precedente a reset
|
||||
|
||||
@@ -21,6 +21,7 @@ Module MachCommConst
|
||||
Public Delegate Sub UpdateCallbackDlg(Param As String, Params As String)
|
||||
Public Delegate Sub TPAAlarmCallbackDlg(ByVal AlarmOperation As Integer, ByVal AlarmType As Integer, ByVal AlarmMessage As String, ByVal AlarmCode As String, ByVal AlarmDateTime As String)
|
||||
Public Delegate Sub NUMAlarmCallbackDlg(ByVal CncNumber As Integer, ByVal numberOfError As Integer, ByVal ErrorTyp As String, ByVal ErrorIndex As String, ByVal ErrorNumber As String, ByVal ErrorLine As String, ByVal ErrorMessage As String, ByVal ErrorAdditional As String)
|
||||
Public Delegate Sub SiemensAlarmCallbackDlg(nIndex As Integer, AlarmOperation As Integer)
|
||||
Public Delegate Sub AxisCoordinatesCallbackDlg(ByVal AxisValue As Double, ByVal AxisIndex As Integer)
|
||||
Public Delegate Sub OpStateCallbackDlg(ByVal newOpState As Integer)
|
||||
Public Delegate Sub OpModeCallbackDlg(ByVal newOpState As Integer)
|
||||
@@ -32,6 +33,7 @@ Module MachCommConst
|
||||
Friend m_UpdateCallbackDlg As UpdateCallbackDlg
|
||||
Friend m_TPAAlarmCallbackDlg As TPAAlarmCallbackDlg
|
||||
Friend m_NUMAlarmCallbackDlg As NUMAlarmCallbackDlg
|
||||
Friend m_SiemensAlarmCallbackDlg As SiemensAlarmCallbackDlg
|
||||
Friend m_AxisCoordinatesCallbackDlg As AxisCoordinatesCallbackDlg
|
||||
Friend m_OpStateCallbackDlg As OpStateCallbackDlg
|
||||
Friend m_OpModeCallbackDlg As OpModeCallbackDlg
|
||||
|
||||
@@ -49,6 +49,11 @@ Public Class MachManaging
|
||||
Return m_CN
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Siemens_Sharp7 As SIEMENSSharp7Comm
|
||||
Get
|
||||
Return m_CN
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared WithEvents m_CommandList As New ObservableCollection(Of ThreadCommand)
|
||||
Public Shared ReadOnly Property CommandList As ObservableCollection(Of ThreadCommand)
|
||||
@@ -92,7 +97,20 @@ Public Class MachManaging
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' variabile che indica prima barra dopo start (Siemens)
|
||||
Private m_bFirstRaw As Boolean = True
|
||||
|
||||
' variabile che indica se emettere ii messaggi di debug
|
||||
Private m_Debug As Integer = 0
|
||||
Public ReadOnly Property Debug As Integer
|
||||
Get
|
||||
Return m_Debug
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
' leggo variabile debug da ini
|
||||
m_Debug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, CurrentMachine.sMachIniFile)
|
||||
' imposto in Map
|
||||
Map.SetRefMachManaging(Me)
|
||||
AddHandler m_CommandList.CollectionChanged, AddressOf CommandList_CollectionChanged
|
||||
@@ -106,7 +124,7 @@ Public Class MachManaging
|
||||
|
||||
Friend Sub Timer_Tick()
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.TPA, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.TPA, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT, NCTypes.SIEMENS_SHARP7
|
||||
' eseguo ciclo principale
|
||||
Dim nReset_State As Integer
|
||||
Dim nStart_State As Boolean
|
||||
@@ -119,6 +137,9 @@ Public Class MachManaging
|
||||
Dim nISO_Sent As Integer
|
||||
Dim nRunning As Integer
|
||||
Dim nCurrMachIndex As Integer
|
||||
Dim nDataWrite As Integer
|
||||
Dim nNCStatus As Integer
|
||||
Dim nNCMode As Integer
|
||||
Dim ResetVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = RESET_STATE)
|
||||
Dim StartVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = START_STATE)
|
||||
Dim StopVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = STOP_STATE)
|
||||
@@ -130,6 +151,11 @@ Public Class MachManaging
|
||||
Dim ISOSentVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = ISO_SENT)
|
||||
Dim RunningVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = RUNNING)
|
||||
Dim MachIndexVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = MACHINDEX)
|
||||
Dim DataReadedVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = DATAREADED)
|
||||
Dim ResetReadedVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = RESETREADED)
|
||||
Dim DataToReadVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = DATATOREAD)
|
||||
Dim NCStatusVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NC_STATUS)
|
||||
Dim NCModeVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NC_MODE)
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.TPA
|
||||
' leggo tutte le variabili
|
||||
@@ -302,7 +328,74 @@ Public Class MachManaging
|
||||
ReadPLCMessages()
|
||||
Num_Axium_PCToolkit.ReadCncMode()
|
||||
Num_Axium_PCToolkit.ReadPosition()
|
||||
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
' leggo tutte le variabili
|
||||
Map.refMachManaging.DebugMessage(1, "Leggo tutte le variabili")
|
||||
Siemens_Sharp7.RefreshAllVars()
|
||||
If Not IsNothing(ResetVariable.sValue) Then
|
||||
Integer.TryParse(ResetVariable.sValue, nReset_State)
|
||||
Else
|
||||
nReset_State = 1
|
||||
End If
|
||||
If Not IsNothing(ProdVariable.sValue) Then
|
||||
Integer.TryParse(ProdVariable.sValue, nP_Prod)
|
||||
Else
|
||||
nP_Prod = -1
|
||||
End If
|
||||
If Not IsNothing(MachGroupVariable.sValue) Then
|
||||
Integer.TryParse(MachGroupVariable.sValue, nP_Machgroup)
|
||||
Else
|
||||
nP_Machgroup = -1
|
||||
End If
|
||||
If Not IsNothing(PartVariable.sValue) Then
|
||||
Integer.TryParse(PartVariable.sValue, nP_Part)
|
||||
Else
|
||||
nP_Part = -1
|
||||
End If
|
||||
If Not IsNothing(StateVariable.sValue) Then
|
||||
Integer.TryParse(StateVariable.sValue, nP_State)
|
||||
Else
|
||||
nP_State = -1
|
||||
End If
|
||||
If Not IsNothing(ISONumVariable.sValue) Then
|
||||
Integer.TryParse(ISONumVariable.sValue, nISO_Num)
|
||||
Else
|
||||
nISO_Num = -1
|
||||
End If
|
||||
If Not IsNothing(RunningVariable.sValue) Then
|
||||
Integer.TryParse(RunningVariable.sValue, nRunning)
|
||||
Else
|
||||
nRunning = -1
|
||||
End If
|
||||
If Not IsNothing(DataReadedVariable.sValue) Then
|
||||
Integer.TryParse(DataReadedVariable.sValue, nDataWrite)
|
||||
Else
|
||||
nDataWrite = -1
|
||||
End If
|
||||
If Not IsNothing(NCStatusVariable.sValue) Then
|
||||
Integer.TryParse(NCStatusVariable.sValue, nNCStatus)
|
||||
Else
|
||||
nNCStatus = -1
|
||||
End If
|
||||
If Not IsNothing(NCModeVariable.sValue) Then
|
||||
Integer.TryParse(NCModeVariable.sValue, nNCMode)
|
||||
Else
|
||||
nNCMode = -1
|
||||
End If
|
||||
' leggo messaggi plc
|
||||
Siemens_Sharp7.ReadPLCMessages()
|
||||
End Select
|
||||
' se SiemensSharp7 e reset a 0, verifico che conferma lettura reset sia a zero
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 And ResetReadedVariable.sValue = "1" And ResetVariable.sValue = "0" Then
|
||||
Map.refMachManaging.DebugMessage(1, "Azzero lettura reset")
|
||||
ResetReadedVariable.sValue = "0"
|
||||
End If
|
||||
' se SiemensSharp7 e dati letti a 1 e dati scritti a 0, verifico che dati letti sia a zero
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 And DataReadedVariable.sValue = "1" And DataToReadVariable.sValue = "0" Then
|
||||
Map.refMachManaging.DebugMessage(1, "Azzero lettura dati")
|
||||
DataReadedVariable.sValue = "0"
|
||||
End If
|
||||
' se NUM aggiorno stato della macchina
|
||||
If CurrentMachine.NCType = NCTypes.NUM_FLEXIUM Then
|
||||
Dim OpState As OPStates
|
||||
@@ -330,10 +423,45 @@ Public Class MachManaging
|
||||
If IsNothing(Map.refLeftPanelVM.SelOPState) OrElse OpState <> Map.refLeftPanelVM.SelOPState.Id Then
|
||||
m_OpStateCallbackDlg(OpState)
|
||||
End If
|
||||
ElseIf CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then
|
||||
Dim OpState As OPStates
|
||||
If nNCStatus > 0 Then
|
||||
Select Case nNCStatus
|
||||
Case 1
|
||||
OpState = OPStates.End
|
||||
Case 2
|
||||
OpState = OPStates.Stop
|
||||
Case 3
|
||||
OpState = OPStates.Start
|
||||
Case Else
|
||||
OpState = OPStates.Unspecified
|
||||
End Select
|
||||
End If
|
||||
If IsNothing(Map.refLeftPanelVM.SelOPState) OrElse OpState <> Map.refLeftPanelVM.SelOPState.Id Then
|
||||
Map.refMachManaging.DebugMessage(1, "Imposto stato CN: " & OpState)
|
||||
m_OpStateCallbackDlg(OpState)
|
||||
End If
|
||||
Dim OpMode As OPModes
|
||||
If nNCMode > 0 Then
|
||||
Select Case nNCMode
|
||||
Case 1
|
||||
OpMode = OPModes.Manual
|
||||
Case 2
|
||||
OpMode = OPModes.Auto
|
||||
Case 3
|
||||
OpMode = OPModes.Mdi
|
||||
Case 4 ' Reference Point
|
||||
OpMode = OPModes.Home
|
||||
End Select
|
||||
End If
|
||||
If IsNothing(Map.refLeftPanelVM.SelOPMode) OrElse OpMode <> Map.refLeftPanelVM.SelOPMode.Id Then
|
||||
Map.refMachManaging.DebugMessage(1, "Imposto modo CN: " & OpMode)
|
||||
m_OpModeCallbackDlg(OpMode)
|
||||
End If
|
||||
End If
|
||||
' se TPA e non ancora fatto, preparo variabili barra successiva
|
||||
If CurrentMachine.NCType = NCTypes.TPA AndAlso CurrentMachine.Flow = FlowTypes.CONTINUOUS AndAlso m_NextBarId = 0 Then
|
||||
SetNextBarVars()
|
||||
SetNextBarVars(nRunning)
|
||||
' se macchina NUM, non sto gia' spedendo e variabile spedizione me lo permette
|
||||
ElseIf (CurrentMachine.NCType = NCTypes.NUM_FLEXIUM AndAlso
|
||||
Not Num_Flexium.bIsTransferActive AndAlso
|
||||
@@ -343,30 +471,54 @@ Public Class MachManaging
|
||||
nISO_Sent = 1) OrElse
|
||||
(CurrentMachine.NCType = NCTypes.NUM_AXIUM_PCTOOLKIT AndAlso
|
||||
Not Num_Axium_PCToolkit.bIsTransferActive AndAlso
|
||||
nISO_Sent = 1) Then
|
||||
nISO_Sent = 1) OrElse
|
||||
(CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 AndAlso
|
||||
(nISO_Num = 0 OrElse
|
||||
nISO_Num = nRunning)) Then
|
||||
' verifico se c'e' un programma da lanciare
|
||||
Map.refMachManaging.DebugMessage(1, "Entro in SendNextProgram")
|
||||
SendNextProgram()
|
||||
ElseIf CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 AndAlso m_NextBarId = 0 Then
|
||||
SetNextBarVars(nRunning)
|
||||
End If
|
||||
' verifico se scattato stato reset
|
||||
If nReset_State <> 0 Then
|
||||
Map.refMachManaging.DebugMessage(1, "Scattato Reset")
|
||||
' resetto tutti i programmi
|
||||
If Not IsNothing(Map.refProjectVM.SupervisorMachGroupPanelVM) Then Map.refProjectVM.SupervisorMachGroupPanelVM.ResetAllMachGroups()
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then
|
||||
'resetto programma corrente
|
||||
Map.refMachManaging.DebugMessage(1, "Resetto programma corrente")
|
||||
ISONumVariable.sValue = "0"
|
||||
m_bFirstRaw = True
|
||||
Else
|
||||
' resetto variabili P
|
||||
ProdVariable.sValue = "0"
|
||||
MachGroupVariable.sValue = "0"
|
||||
PartVariable.sValue = "0"
|
||||
StateVariable.sValue = "0"
|
||||
If CurrentMachine.NCType = NCTypes.TPA Then
|
||||
RemoveAllProgram() ' rimuovo programma default per pending
|
||||
End If
|
||||
End If
|
||||
' cancello tutti i programmi da memoria CN
|
||||
If CurrentMachine.NCType = NCTypes.TPA Then
|
||||
RemoveAllProgram() ' rimuovo programma default per pending
|
||||
End If
|
||||
' azzero variabile reset
|
||||
ResetVariable.sValue = "0"
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then
|
||||
Map.refMachManaging.DebugMessage(1, "Confermo lettura reset")
|
||||
ResetReadedVariable.sValue = "1"
|
||||
Else
|
||||
ResetVariable.sValue = "0"
|
||||
End If
|
||||
' resetto prossima barra e variabili V
|
||||
If CurrentMachine.NCType = NCTypes.TPA AndAlso CurrentMachine.Flow = FlowTypes.CONTINUOUS Then
|
||||
m_NextBarId = 0
|
||||
For Index As Integer = 1 To 6
|
||||
Tpa.RWVariableManager.WriteVarByName(VPAR & Index.ToString(), 0)
|
||||
Next
|
||||
'For Index As Integer = 1 To 6
|
||||
' Tpa.RWVariableManager.WriteVarByName(VPAR & Index.ToString(), 0)
|
||||
'Next
|
||||
ResetNextBarVars()
|
||||
End If
|
||||
Return
|
||||
' se macchina TPA, e' in pending e non sta tagliando alcun pezzo
|
||||
@@ -382,10 +534,17 @@ Public Class MachManaging
|
||||
' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||
Threading.Thread.Sleep(300)
|
||||
' verifico stati inizio e fine pezzi
|
||||
ElseIf nP_Prod <> 0 AndAlso
|
||||
nP_Machgroup <> 0 AndAlso
|
||||
nP_Part <> 0 Then
|
||||
ElseIf (CurrentMachine.NCType <> NCTypes.SIEMENS_SHARP7 AndAlso
|
||||
nP_Prod <> 0 AndAlso
|
||||
nP_Machgroup <> 0 AndAlso
|
||||
nP_Part <> 0) OrElse
|
||||
(CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 AndAlso
|
||||
DataToReadVariable.sValue = "1" AndAlso
|
||||
nP_Prod <> 0 AndAlso
|
||||
nP_Machgroup <> 0 AndAlso
|
||||
nP_Part <> 0) Then
|
||||
If nP_State = PartState.START Then
|
||||
Map.refMachManaging.DebugMessage(1, "Leggo dati start")
|
||||
Dim dtStart As DateTime = DateTime.Now()
|
||||
' recupero gruppo di lavorazione del pezzo
|
||||
Dim MachGroup As MyMachGroupVM = Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = nP_Machgroup)
|
||||
@@ -427,6 +586,9 @@ Public Class MachManaging
|
||||
Tpa.RWVariableManager.WriteVarByName(P_STATE, 0)
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT
|
||||
StateVariable.sValue = "0"
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
Map.refMachManaging.DebugMessage(1, "Confermo lettura dati start")
|
||||
DataReadedVariable.sValue = "1"
|
||||
End Select
|
||||
' se nessun pezzo della barra diverso da quello corrente e' in start
|
||||
If Not MachGroup.PartVMList.Any(Function(x) x.nPartId <> nP_Part AndAlso x.nProduction_State = 1) Then
|
||||
@@ -444,9 +606,11 @@ Public Class MachManaging
|
||||
End If
|
||||
' flag di aggiornamento log macchina
|
||||
Map.refMachineLogPageVM.UpdateMachineLogList(False)
|
||||
DebugMessage(1, "Fine lettura dati start")
|
||||
' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||
Threading.Thread.Sleep(300)
|
||||
ElseIf nP_State = PartState.END_ Then
|
||||
DebugMessage(1, "Leggo dati end")
|
||||
Dim dtEnd As DateTime = DateTime.Now()
|
||||
' recupero gruppo di lavorazione del pezzo
|
||||
Dim MachGroup As MyMachGroupVM = Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.FirstOrDefault(Function(x) x.Id = nP_Machgroup)
|
||||
@@ -506,10 +670,16 @@ Public Class MachManaging
|
||||
' scrivo evento fine MachGroup su DB
|
||||
DbControllers.m_LogMachineController.Create(LogEvent.CreateMachGroupStateLog(dtEnd, nP_Prod, nP_Machgroup, nP_State, DbControllers.SupervisorId))
|
||||
' azzero tutte le variabilli per iniziare barra successiva
|
||||
ProdVariable.sValue = "0"
|
||||
MachGroupVariable.sValue = "0"
|
||||
PartVariable.sValue = "0"
|
||||
StateVariable.sValue = "0"
|
||||
' azzero variabile per far ripartire macchina
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then
|
||||
DebugMessage(1, "Confermo lettura dati end")
|
||||
DataReadedVariable.sValue = "1"
|
||||
Else
|
||||
ProdVariable.sValue = "0"
|
||||
MachGroupVariable.sValue = "0"
|
||||
PartVariable.sValue = "0"
|
||||
StateVariable.sValue = "0"
|
||||
End If
|
||||
|
||||
' se non impostata data start
|
||||
If MachGroup.dtStartTime = DateTime.MinValue Then
|
||||
@@ -536,7 +706,11 @@ Public Class MachManaging
|
||||
End If
|
||||
Else
|
||||
' azzero variabile per far ripartire macchina
|
||||
StateVariable.sValue = "0"
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then
|
||||
DataReadedVariable.sValue = "1"
|
||||
Else
|
||||
StateVariable.sValue = "0"
|
||||
End If
|
||||
End If
|
||||
' se pezzo = -1 stampo etichette di tutti i pezzi del MachGroup
|
||||
If nP_Part = -1 Then
|
||||
@@ -554,22 +728,26 @@ Public Class MachManaging
|
||||
End If
|
||||
' flag di aggiornamento log macchina
|
||||
Map.refMachineLogPageVM.UpdateMachineLogList(False)
|
||||
DebugMessage(1, "Fine lettura dati end")
|
||||
' attesa per essere sicuro che abbia scritto e riletto variabili
|
||||
Threading.Thread.Sleep(300)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
' funzione che riavvia comunicazione Siemens se necessario
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then
|
||||
Siemens_Sharp7.RefreshConnection()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private m_Lock_SendProgram As New Object
|
||||
|
||||
Private Function SetNextBarVars() As Boolean
|
||||
Private Function SetNextBarVars(nRunning As Integer) As Boolean
|
||||
' verifico se c'e' un programma da lanciare
|
||||
If Not IsNothing(Map.refProjectVM.SupervisorMachGroupPanelVM) Then
|
||||
For Each MyMachGroup As MyMachGroupVM In Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList
|
||||
If Not MyMachGroup.bSentToMachine AndAlso MyMachGroup.dtStartTime = DateTime.MinValue Then
|
||||
If If(CurrentMachine.NCType = NCTypes.TPA, Not MyMachGroup.bSentToMachine, MyMachGroup.bSentToMachine AndAlso nRunning <> 0 AndAlso MyMachGroup.nName <> nRunning) AndAlso MyMachGroup.dtStartTime = DateTime.MinValue Then
|
||||
If MyMachGroup.bReadyForMachining Then
|
||||
' leggo valori parametri V da file
|
||||
Dim dVPars(10) As Double
|
||||
@@ -581,41 +759,109 @@ Public Class MachManaging
|
||||
StringToDoubleAdv(VPar(1), dVPars(VParIndex - 1))
|
||||
Next
|
||||
' li scrivo nel CN
|
||||
For Index As Integer = 1 To 10
|
||||
Dim sValue As String = ""
|
||||
sValue = DoubleToString(dVPars(Index - 1), 2)
|
||||
Tpa.RWVariableManager.WriteVarByName(VPAR & Index.ToString(), sValue)
|
||||
Next
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.TPA
|
||||
For Index As Integer = 1 To 10
|
||||
Dim sValue As String = ""
|
||||
sValue = DoubleToString(dVPars(Index - 1), 2)
|
||||
Tpa.RWVariableManager.WriteVarByName(VPAR & Index.ToString(), sValue)
|
||||
Next
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
' imposto larghezza barra
|
||||
Dim NextPartL As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_L)
|
||||
NextPartL.sValue = DoubleToString(Math.Ceiling(dVPars(0)), 2)
|
||||
Dim NextPartW As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_W)
|
||||
NextPartW.sValue = DoubleToString(dVPars(1), 2)
|
||||
Dim NextPartH As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_H)
|
||||
NextPartH.sValue = DoubleToString(dVPars(2), 2)
|
||||
Dim NextPartPressX1 As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_PRESSX1)
|
||||
NextPartPressX1.sValue = DoubleToString(dVPars(3), 2)
|
||||
Dim NextPartFeed As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_FEED)
|
||||
NextPartFeed.sValue = DoubleToString(dVPars(4), 2)
|
||||
Dim NextPartAcc As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_ACC)
|
||||
NextPartAcc.sValue = DoubleToString(dVPars(5), 2)
|
||||
Dim NextPartRef1 As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_REF1)
|
||||
NextPartRef1.sValue = DoubleToString(dVPars(6), 2)
|
||||
Dim NextPartRef2 As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_REF2)
|
||||
NextPartRef2.sValue = DoubleToString(dVPars(7), 2)
|
||||
'DebugMessage(1, "Imposto larghezza: " & MyMachGroup.dW)
|
||||
End Select
|
||||
m_NextBarId = MyMachGroup.Id
|
||||
Return True
|
||||
Else
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then
|
||||
' metto tutti i valori a 0
|
||||
ResetNextBarVars()
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' se ho passato tutte le barre della lista, resetto valori carico barra successiva
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then
|
||||
' metto tutti i valori a 0
|
||||
ResetNextBarVars()
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function ResetNextBarVars() As Boolean
|
||||
' li scrivo nel CN
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.TPA
|
||||
For Index As Integer = 1 To 10
|
||||
Dim sValue As String = ""
|
||||
sValue = DoubleToString(0, 2)
|
||||
Tpa.RWVariableManager.WriteVarByName(VPAR & Index.ToString(), sValue)
|
||||
Next
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
' imposto larghezza barra
|
||||
Dim NextPartL As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_L)
|
||||
NextPartL.sValue = DoubleToString(0, 2)
|
||||
Dim NextPartW As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_W)
|
||||
NextPartW.sValue = DoubleToString(0, 2)
|
||||
Dim NextPartH As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_H)
|
||||
NextPartH.sValue = DoubleToString(0, 2)
|
||||
Dim NextPartPressX1 As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_PRESSX1)
|
||||
NextPartPressX1.sValue = DoubleToString(0, 2)
|
||||
Dim NextPartFeed As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_FEED)
|
||||
NextPartFeed.sValue = DoubleToString(0, 2)
|
||||
Dim NextPartAcc As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_ACC)
|
||||
NextPartAcc.sValue = DoubleToString(0, 2)
|
||||
Dim NextPartRef1 As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_REF1)
|
||||
NextPartRef1.sValue = DoubleToString(0, 2)
|
||||
Dim NextPartRef2 As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = NEXTPART_REF2)
|
||||
NextPartRef2.sValue = DoubleToString(0, 2)
|
||||
'DebugMessage(1, "Imposto larghezza: " & MyMachGroup.dW)
|
||||
End Select
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function SendNextProgram() As Boolean
|
||||
Dim bSent As Boolean = False
|
||||
If (CurrentMachine.NCType = NCTypes.TPA AndAlso Not m_bStartPending AndAlso Tpa.opState = MachineOperatingState.Pending) OrElse
|
||||
(CurrentMachine.NCType = NCTypes.NUM_FLEXIUM AndAlso Not Num_Flexium.bIsTransferActive) OrElse
|
||||
(CurrentMachine.NCType = NCTypes.NUM_AXIUM_APSERVER AndAlso Not Num_Axium_APServer.bIsTransferActive) OrElse
|
||||
(CurrentMachine.NCType = NCTypes.NUM_AXIUM_PCTOOLKIT AndAlso Not Num_Axium_PCToolkit.bIsTransferActive) Then ' Or Tpa.opState = MachineOperatingState.Start) Then
|
||||
(CurrentMachine.NCType = NCTypes.NUM_AXIUM_PCTOOLKIT AndAlso Not Num_Axium_PCToolkit.bIsTransferActive) OrElse
|
||||
CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then ' Or Tpa.opState = MachineOperatingState.Start) Then
|
||||
' verifico se c'e' un programma da lanciare
|
||||
If Not IsNothing(Map.refProjectVM.SupervisorMachGroupPanelVM) Then
|
||||
Dim bMachGroupNotReady As Boolean = False
|
||||
SyncLock m_Lock_SendProgram
|
||||
For Each MyMachGroup As MyMachGroupVM In Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList
|
||||
If Not MyMachGroup.bSentToMachine AndAlso (MyMachGroup.dtStartTime = DateTime.MinValue OrElse
|
||||
DebugMessage(1, "Ciclo alla ricerca di un programma da mandare")
|
||||
' EgtOutLog("Ciclo su name: " & MyMachGroup.Name & " id: " & MyMachGroup.Id)
|
||||
If Not MyMachGroup.bSentToMachine AndAlso (If(CurrentMachine.NCType <> NCTypes.SIEMENS_SHARP7, MyMachGroup.dtStartTime = DateTime.MinValue, MyMachGroup.dtEndTime = DateTime.MinValue) OrElse
|
||||
(Map.refSupervisorManagerVM.CurrProd.nType = BWType.WALL AndAlso MyMachGroup.bResetWhileCutting)) Then
|
||||
' verifico se ricalcolo finito
|
||||
If MyMachGroup.bReadyForMachining AndAlso If(CurrentMachine.NCType = NCTypes.NUM_FLEXIUM Or CurrentMachine.NCType = NCTypes.NUM_AXIUM_APSERVER OrElse CurrentMachine.NCType = NCTypes.NUM_AXIUM_PCTOOLKIT, Not MyMachGroup.bSendingToMachine, True) Then
|
||||
' lo lancio
|
||||
bSent = SendProgram(MyMachGroup.CnFilePath(), MyMachGroup.Name)
|
||||
DebugMessage(1, "Eseguo SendProgram")
|
||||
bSent = SendProgram(MyMachGroup.CnFilePath(), MyMachGroup.Name, MyMachGroup)
|
||||
' EgtOutLog(MyMachGroup.Name & " id: " & MyMachGroup.Id & " mandato " & DateTime.Now() & " " & MyMachGroup.Name & " " & bSent.ToString())
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.TPA
|
||||
Case NCTypes.TPA, NCTypes.SIEMENS_SHARP7
|
||||
MyMachGroup.SetSentToMachine(bSent)
|
||||
Case NCTypes.NUM_FLEXIUM, NCTypes.NUM_AXIUM_APSERVER, NCTypes.NUM_AXIUM_PCTOOLKIT
|
||||
MyMachGroup.SetSendingToMachine(bSent)
|
||||
@@ -631,9 +877,25 @@ Public Class MachManaging
|
||||
End If
|
||||
Next
|
||||
End SyncLock
|
||||
If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 AndAlso Not Map.refProjectVM.SupervisorMachGroupPanelVM.MachGroupVMList.Any(Function(x As MyMachGroupVM) x.nProduction_State < ItemState.WIP And x.bReadyForMachining) Then
|
||||
Dim ISONumVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = ISO_NUM)
|
||||
Dim nISONum As Integer = 0
|
||||
If Not Integer.TryParse(ISONumVariable.sValue, nISONum) Or nISONum <> 0 Then
|
||||
DebugMessage(1, "Resetto programma da inviare")
|
||||
ISONumVariable.sValue = 0
|
||||
' resetto variabili per prossima barra
|
||||
ResetNextBarVars()
|
||||
' do stop working
|
||||
Dim StopWorking As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = STOP_WORKING)
|
||||
StopWorking.sValue = "1"
|
||||
End If
|
||||
End If
|
||||
'If CurrentMachine.NCType = NCTypes.SIEMENS_SHARP7 Then
|
||||
' SetNextBarVars()
|
||||
'End If
|
||||
If bMachGroupNotReady Then Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return bSent
|
||||
End Function
|
||||
|
||||
@@ -744,6 +1006,24 @@ Public Class MachManaging
|
||||
m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.ERROR_, ResultTypes.EXECUTED, "Errore: impossibile connettersi!")
|
||||
Return
|
||||
End Try
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
Try
|
||||
m_CN = New SIEMENSSharp7Comm(Me)
|
||||
If Siemens_Sharp7.InitConnection() Then
|
||||
m_bConnected = True
|
||||
' imposto stato manuale
|
||||
Dim ManualMode As OPState = Map.refLeftPanelVM.OPModeList.FirstOrDefault(Function(x) x.Id = OPModes.Manual)
|
||||
Map.refLeftPanelVM.SetOPMode(ManualMode)
|
||||
m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.OK, ResultTypes.EXECUTED, "")
|
||||
Else
|
||||
m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.ERROR_, ResultTypes.EXECUTED, "Errore: impossibile connettersi!")
|
||||
Return
|
||||
End If
|
||||
' creo classe di gestione variabili
|
||||
Catch ex As Exception
|
||||
m_ResultCallbackDlg(CommandTypes.CONNECT, CommandStates.ERROR_, ResultTypes.EXECUTED, "Errore: impossibile connettersi!")
|
||||
Return
|
||||
End Try
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -773,6 +1053,14 @@ Public Class MachManaging
|
||||
m_ResultCallbackDlg(CommandTypes.DISCONNECT, CommandStates.OK, ResultTypes.EXECUTED, "")
|
||||
' chiudo classe Num_Flexium
|
||||
Me.OnDispose()
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
m_bConnected = False
|
||||
If Not IsNothing(Siemens_Sharp7) Then
|
||||
Siemens_Sharp7.CloseConnection()
|
||||
End If
|
||||
m_ResultCallbackDlg(CommandTypes.DISCONNECT, CommandStates.OK, ResultTypes.EXECUTED, "")
|
||||
' chiudo classe Num_Flexium
|
||||
Me.OnDispose()
|
||||
End Select
|
||||
' termino thread di comunicazione
|
||||
MachineCommThread.StopThread()
|
||||
@@ -858,6 +1146,9 @@ Public Class MachManaging
|
||||
Num_Axium_APServer.Reset()
|
||||
Case NCTypes.NUM_AXIUM_PCTOOLKIT
|
||||
Num_Axium_PCToolkit.Reset()
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
' annullo solamente step di avanzamento
|
||||
Siemens_Sharp7.ResetStep(True)
|
||||
End Select
|
||||
' aggiorno stato bottoni in LeftPanel
|
||||
Map.refLeftPanelVM.UpdateButtonIsEnabledState()
|
||||
@@ -887,7 +1178,7 @@ Public Class MachManaging
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Public Function SendProgram(ProgramPath As String, ProgramId As String) As Boolean
|
||||
Public Function SendProgram(ProgramPath As String, ProgramId As String, Optional MyMachGroup As MyMachGroupVM = Nothing) As Boolean
|
||||
Select Case CurrentMachine.NCType
|
||||
Case NCTypes.TPA
|
||||
If Tpa.opState = MachineOperatingState.Pending Then
|
||||
@@ -917,6 +1208,39 @@ Public Class MachManaging
|
||||
Num_Axium_PCToolkit.FileDownload(nFileType * 10, ProgramPath)
|
||||
End If
|
||||
Return True
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
' EgtOutLog("Pre Download")
|
||||
Dim nFileType As Integer = 0
|
||||
If Integer.TryParse(ProgramId, nFileType) AndAlso nFileType > 0 Then
|
||||
Dim sDestDir As String = ""
|
||||
GetPrivateProfileString(S_GENERAL, K_ISOFILEDIR, "c:/Saomad/ISO", sDestDir, CurrentMachine.sMachIniFile)
|
||||
DebugMessage(1, "Copio programma")
|
||||
File.Copy(ProgramPath, sDestDir & "\" & nFileType & ".mpf", True)
|
||||
' copio POSIZ file
|
||||
Dim sPosizPath As String = Path.GetDirectoryName(ProgramPath) & "\" & Path.GetFileNameWithoutExtension(ProgramPath) & "_POSIZ.mpf"
|
||||
File.Copy(sPosizPath, sDestDir & "\" & nFileType & "_POSIZ.mpf", True)
|
||||
' se primo dopo start
|
||||
If m_bFirstRaw Then
|
||||
m_bFirstRaw = False
|
||||
DebugMessage(1, "Primo grezzo")
|
||||
' annullo step di ripartenza
|
||||
If Not Map.refMachManaging.Siemens_Sharp7.ResetStep(Not (MyMachGroup.dtStartTime <> DateTime.MinValue OrElse MyMachGroup.nProduction_State = ItemState.WIP)) Then Return False
|
||||
End If
|
||||
' imposto larghezza barra
|
||||
Dim WCarico As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = W_CARICO)
|
||||
WCarico.sValue = DoubleToString(MyMachGroup.dW, 1)
|
||||
DebugMessage(1, "Imposto larghezza: " & MyMachGroup.dW)
|
||||
' resetto eventuale stop working
|
||||
Dim StopWorking As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = STOP_WORKING)
|
||||
If StopWorking.sValue = "1" Then
|
||||
StopWorking.sValue = "0"
|
||||
End If
|
||||
' imposto numero programma scritto
|
||||
Dim ISONumVariable As Variable = Map.refMachCommandMessagePanelVM.MainVariablesList.FirstOrDefault(Function(x) x.sName = ISO_NUM)
|
||||
DebugMessage(1, "Imposto programma inviato: " & nFileType)
|
||||
ISONumVariable.sValue = nFileType
|
||||
End If
|
||||
Return True
|
||||
End Select
|
||||
Return False
|
||||
End Function
|
||||
@@ -1009,6 +1333,13 @@ Public Class MachManaging
|
||||
Case CommVar.Types.CN
|
||||
Num_Axium_PCToolkit.WriteNCVariables(Address, Value)
|
||||
End Select
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
Select Case Type
|
||||
Case CommVar.Types.PLC
|
||||
Siemens_Sharp7.WriteVariable(Address, Value)
|
||||
'Case CommVar.Types.CN
|
||||
' Num_Axium_PCToolkit.WriteNCVariables(Address, Value)
|
||||
End Select
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -1024,6 +1355,8 @@ Public Class MachManaging
|
||||
Return NUMAxiumComm.InitVar(NewVar)
|
||||
Case NCTypes.NUM_AXIUM_PCTOOLKIT
|
||||
Return NUMAxiumPcToolkitComm.InitVar(NewVar)
|
||||
Case NCTypes.SIEMENS_SHARP7
|
||||
Return SIEMENSSharp7Comm.InitVar(NewVar)
|
||||
End Select
|
||||
Return Nothing
|
||||
End Function
|
||||
@@ -1116,4 +1449,14 @@ Public Class MachManaging
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
#Region "Debug"
|
||||
|
||||
Friend Sub DebugMessage(nLevel As Integer, sMessage As String)
|
||||
If m_Debug >= nLevel Then
|
||||
EgtOutLog(sMessage)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Debug
|
||||
|
||||
End Class
|
||||
|
||||
@@ -21,7 +21,7 @@ Class MachineCommThread
|
||||
Private Shared sResetVarName As String = "0.FUNM.E80048"
|
||||
|
||||
Public Shared Sub MachManagingThreadFunction(ResultCallbackDlg As ResultCallbackDlg, CloseCallbackDlg As CloseCallbackDlg, UpdateCallbackDlg As UpdateCallbackDlg,
|
||||
TPAAlarmCallbackDlg As TPAAlarmCallbackDlg, NUMAlarmCallbackDlg As NUMAlarmCallbackDlg, AxisCoordinatesCallbackDlg As AxisCoordinatesCallbackDlg,
|
||||
TPAAlarmCallbackDlg As TPAAlarmCallbackDlg, NUMAlarmCallbackDlg As NUMAlarmCallbackDlg, SiemensAlarmCallbackDlg As SiemensAlarmCallbackDlg, AxisCoordinatesCallbackDlg As AxisCoordinatesCallbackDlg,
|
||||
OpStateCallbackDlg As OpStateCallbackDlg, OpModeCallbackDlg As OpModeCallbackDlg, ChannelCallbackDlg As ChannelCallbackDlg,
|
||||
ReadVarCallbackDlg As ReadVarCallbackDlg)
|
||||
' inizializzo callback
|
||||
@@ -30,6 +30,7 @@ Class MachineCommThread
|
||||
m_UpdateCallbackDlg = UpdateCallbackDlg
|
||||
m_TPAAlarmCallbackDlg = TPAAlarmCallbackDlg
|
||||
m_NUMAlarmCallbackDlg = NUMAlarmCallbackDlg
|
||||
m_SiemensAlarmCallbackDlg = SiemensAlarmCallbackDlg
|
||||
m_AxisCoordinatesCallbackDlg = AxisCoordinatesCallbackDlg
|
||||
m_OpStateCallbackDlg = OpStateCallbackDlg
|
||||
m_OpModeCallbackDlg = OpModeCallbackDlg
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user