Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fc8db8efbe | |||
| 44815f86fa | |||
| 2079fe7707 | |||
| 3630a232d8 | |||
| 388fc51a37 | |||
| 8808ebdb2b | |||
| 717519bb2c | |||
| a69e9536b4 | |||
| bde93faa1a | |||
| e38104d02c | |||
| 1aa26ca644 | |||
| 6da345d8c5 |
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34309.116
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.Interface", "..\Ngp\Supervisor.Plugin.Interface\Supervisor.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.Interface", "..\Effector\Effector.Plugin.Interface\Effector.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.FiveLakes", "Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.FiveLakes", "Effector.Plugin.FiveLakes\Effector.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -3,11 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34309.116
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor", "..\Ngp\Supervisor\Supervisor.vbproj", "{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Main", "..\Effector.Main\Effector.Main\Effector.Main.vbproj", "{38BEE4BF-9238-459F-AF89-4DD94C4FD0DA}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.Interface", "..\Ngp\Supervisor.Plugin.Interface\Supervisor.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.Interface", "..\Effector.Main\Effector.Plugin.Interface\Effector.Plugin.Interface.vbproj", "{7D14D864-2BDC-4785-80F4-320164C2D5E4}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Supervisor.Plugin.FiveLakes", "Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.FiveLakes", "Effector.Plugin.FiveLakes\Effector.Plugin.FiveLakes.vbproj", "{7C77F537-8235-40AB-B24A-4E71CFB96D2C}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Effector.Plugin.Lib", "..\Effector.Plugin.Lib\Effector.Plugin.Lib\Effector.Plugin.Lib.vbproj", "{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -55,6 +57,18 @@ Global
|
||||
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7C77F537-8235-40AB-B24A-4E71CFB96D2C}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E5ECC5E1-EA7B-447D-9A07-F5EE25D27779}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -12,11 +12,17 @@
|
||||
'----------------------------------------------------------------------------
|
||||
Module ConstIni
|
||||
|
||||
Public Const INI_FILE_NAME As String = "Supervisor.Plugin.FiveLakes.ini"
|
||||
Public Const INI_FILE_NAME As String = "Effector.Plugin.FiveLakes.ini"
|
||||
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_CAMEXEPATH As String = "CAMExePath"
|
||||
Public Const K_DOORCREATOREXEPATH As String = "DoorCreatorExePath"
|
||||
Public Const K_BACKUPDIR As String = "BackupDir"
|
||||
Public Const K_RESOURCESDIR As String = "ResourcesDir"
|
||||
Public Const K_DDFDIR As String = "DDFDir"
|
||||
Public Const K_DDTDIR As String = "DDTDir"
|
||||
Public Const K_GENDDFDIR As String = "GenDDFDir"
|
||||
Public Const K_CSVOUTPUT As String = "CSVOutput"
|
||||
|
||||
Public Const S_CSV As String = "CSV"
|
||||
Public Const K_DDFNAME As String = "DDFName"
|
||||
@@ -24,12 +30,21 @@ Module ConstIni
|
||||
Public Const K_HEIGHT As String = "Height"
|
||||
Public Const K_WIDTH As String = "Width"
|
||||
Public Const K_THICKNESS As String = "Thickness"
|
||||
Public Const K_SWING As String = "Swing"
|
||||
Public Const K_STATE As String = "State"
|
||||
Public Const K_PROGRAMSENT As String = "ProgramSent"
|
||||
Public Const K_PROGRAMSTART As String = "ProgramStart"
|
||||
Public Const K_PROGRAMEND As String = "ProgramEnd"
|
||||
Public Const K_MANUALADDEDDOORNAME As String = "ManualAddedDoorName"
|
||||
Public Const K_DELIMITER As String = "Delimiter"
|
||||
|
||||
Public Const S_DEBUG As String = "Debug"
|
||||
Public Const K_VARIABLELIST As String = "VariableList"
|
||||
Public Const K_VARIABLEONDRAW As String = "VariableOnDraw"
|
||||
Public Const K_MACHINECOMMANDS As String = "MachineCommands"
|
||||
Public Const K_DOORCIRCLIST As String = "DoorCircList"
|
||||
Public Const K_DOORPRESENCE As String = "DoorPresence"
|
||||
Public Const K_DOORINDEX As String = "DoorIndex"
|
||||
|
||||
Public Const S_NC As String = "NC"
|
||||
Public Const K_NC_SIMULATE As String = "NcSimulate"
|
||||
@@ -0,0 +1,302 @@
|
||||
<Grid x:Class="DoorListPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes">
|
||||
<Grid.Resources>
|
||||
<local:StateToSelColorConverter x:Key="StateToSelColorConverter"/>
|
||||
<local:DDTListToBooleanConverter x:Key="DDTListToBooleanConverter"/>
|
||||
</Grid.Resources>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="3"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border BorderThickness="0"
|
||||
Padding="3"
|
||||
BorderBrush="Transparent"
|
||||
Background="{StaticResource Effector_DarkBlue}">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Background="{StaticResource Effector_DarkBlue}">
|
||||
<Button ToolTip="Open CSV file"
|
||||
Command="{Binding OpenCSV_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/OpenCsv.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Delete CSV file"
|
||||
Command="{Binding DeleteAll_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/DeleteCsv.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Send selected door to production"
|
||||
Command="{Binding Produce_Command}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/Produce.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Send all to production"
|
||||
Command="{Binding ProduceAll_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/ProduceAll.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Take all the door ready for production back to Verify state"
|
||||
Command="{Binding ResetProductionQueue_Command}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/ResetProduction.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Move Up"
|
||||
Command="{Binding MoveUp_Command}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/MoveUp.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Move Down"
|
||||
Command="{Binding MoveDown_Command}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/MoveDown.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<!--<Button ToolTip="Skip selected door, which will not be sent to production"
|
||||
Command="{Binding SkipDoor_Command}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/SkipDoor.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>-->
|
||||
<Button ToolTip="Mark the selected door as not to be produced"
|
||||
Command="{Binding NotProduceDoor_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/NotProduce.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Add a new door to the list"
|
||||
Command="{Binding AddDoor_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/Add.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Copy the selected door"
|
||||
Command="{Binding CopyDoor_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/Copy.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Multiple copy the selected door"
|
||||
Command="{Binding MultipleCopyDoor_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/MultipleCopy.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Delete door"
|
||||
Command="{Binding Delete_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/Delete.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<Button ToolTip="Verify all the doors that are in state Not Verified"
|
||||
Command="{Binding Verify_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"
|
||||
Style="{StaticResource DoorList_Button}">
|
||||
<Image Source="../Resources/DoorListPage/Verify.png"
|
||||
Style="{StaticResource Button_Image}"/>
|
||||
</Button>
|
||||
<TextBlock Text="{Binding sExecPercentage}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="10,0,5,0"
|
||||
Visibility="{Binding ExecPercentage_Visibility, Mode=OneWay}"/>
|
||||
<ProgressBar Minimum="0"
|
||||
Maximum="100"
|
||||
Value="{Binding dExecPercentage, Mode=OneWay}"
|
||||
Height="15"
|
||||
Width="100"
|
||||
Margin="5,0,0,0"
|
||||
Visibility="{Binding ExecPercentage_Visibility}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<FrameworkElement x:Name="dummyElement" Visibility="Collapsed"/>
|
||||
<DataGrid Grid.Row="2"
|
||||
ItemsSource="{Binding DoorList}"
|
||||
SelectedItem="{Binding SelDoor}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserDeleteRows="False"
|
||||
CanUserResizeRows="False"
|
||||
SelectionMode="Single"
|
||||
SelectionUnit="FullRow"
|
||||
CanUserSortColumns="False"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
HorizontalGridLinesBrush="Transparent"
|
||||
VerticalGridLinesBrush="Transparent"
|
||||
ColumnHeaderHeight="32"
|
||||
HeadersVisibility="Column"
|
||||
FontSize="12"
|
||||
FontFamily="/Resources/Fonts/#Roboto"
|
||||
FontWeight="Regular"
|
||||
RowHeight="32"
|
||||
BorderThickness="0">
|
||||
<DataGrid.Resources>
|
||||
<DataTemplate x:Key="DDTTemplate">
|
||||
<ComboBox IsEditable="True"
|
||||
Text="{Binding DataContext.sDDFName, RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}, UpdateSourceTrigger=LostFocus}"
|
||||
ItemsSource="{Binding DataContext.DDTList, RelativeSource={RelativeSource AncestorType={x:Type local:DoorListPageV}}}"
|
||||
Style="{StaticResource DataGridTemplateColumn_ComboBox}"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="NoDDTTemplate">
|
||||
<TextBox Text="{Binding DataContext.sDDFName, RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}}"
|
||||
Style="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
</DataTemplate>
|
||||
<Style x:Key="DDTContentControl" TargetType="{x:Type ContentControl}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.DDTList, Source={x:Reference dummyElement}, Converter={StaticResource DDTListToBooleanConverter}}"
|
||||
Value="True">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource NoDDTTemplate}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=DataContext.DDTList, Source={x:Reference dummyElement}, Converter={StaticResource DDTListToBooleanConverter}}"
|
||||
Value="False">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource DDTTemplate}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="Background" Value="{StaticResource Effector_DarkBlue}"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
<Setter Property="Padding" Value="10,0,10,0"/>
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="ID"
|
||||
Binding="{Binding nId}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<!--<DataGridTextColumn Header="DDF File Name"
|
||||
Binding="{Binding sDDFName}"
|
||||
Width="1*"
|
||||
MinWidth="100"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>-->
|
||||
<DataGridTemplateColumn Header="DDF/DDT File Name"
|
||||
Width="2*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sDDFName}"
|
||||
Style="{StaticResource DataGridTextColumn_TextBlock}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.CellEditingTemplate>
|
||||
<DataTemplate>
|
||||
<!--<TextBox Text="{Binding sDDFName}"
|
||||
Style="{StaticResource DataGridTextColumn_TextBlock}"/>-->
|
||||
<ContentControl Style="{StaticResource DDTContentControl}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellEditingTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="Width"
|
||||
Binding="{Binding dWidth}"
|
||||
Width="Auto"
|
||||
IsReadOnly="{Binding Path=DataContext.DDTList, Source={x:Reference dummyElement}, Converter={StaticResource DDTListToBooleanConverter}}"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="Height"
|
||||
Binding="{Binding dHeight}"
|
||||
Width="Auto"
|
||||
IsReadOnly="{Binding Path=DataContext.DDTList, Source={x:Reference dummyElement}, Converter={StaticResource DDTListToBooleanConverter}}"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="Thickness"
|
||||
Binding="{Binding dThickness}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="State"
|
||||
Binding="{Binding nState}"
|
||||
Width="Auto"
|
||||
IsReadOnly="{Binding Path=DataContext.DDTList, Source={x:Reference dummyElement}, Converter={StaticResource DDTListToBooleanConverter}}"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="CSV"
|
||||
Binding="{Binding sCSVName}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}">
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding sCSVName}"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Header="CSV Line"
|
||||
Binding="{Binding nCSVLine}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="Production State"
|
||||
Binding="{Binding nProdState}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="Load Time"
|
||||
Binding="{Binding sLoadTime}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="Machining 1 Start"
|
||||
Binding="{Binding sMachining1Start}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="Machining 1 End"
|
||||
Binding="{Binding sMachining1End}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="Machining 2 Start"
|
||||
Binding="{Binding sMachining2Start}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="Machining 2 End"
|
||||
Binding="{Binding sMachining2End}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
<DataGridTextColumn Header="Unload Time"
|
||||
Binding="{Binding sUnloadTime}"
|
||||
Width="Auto"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource DataGridTextColumn_TextBlock}"
|
||||
EditingElementStyle="{StaticResource DataGridTextColumn_TextBox}"/>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
|
||||
<Setter Property="Background" Value="{Binding Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{Binding nState, Converter={StaticResource StateToSelColorConverter}}" />
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
@@ -4,8 +4,8 @@
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||
<RootNamespace>Supervisor.Plugin.FiveLakes</RootNamespace>
|
||||
<AssemblyName>Supervisor.Plugin.FiveLakes</AssemblyName>
|
||||
<RootNamespace>Effector.Plugin.FiveLakes</RootNamespace>
|
||||
<AssemblyName>Effector.Plugin.FiveLakes</AssemblyName>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<MyType>Custom</MyType>
|
||||
@@ -21,7 +21,7 @@
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Supervisor.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<DocumentationFile>Effector.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
@@ -32,7 +32,7 @@
|
||||
<IncrementalBuild>false</IncrementalBuild>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>Supervisor.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<DocumentationFile>Effector.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
@@ -48,8 +48,23 @@
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtWPFLib48">
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib48.dll</HintPath>
|
||||
<Reference Include="Effector.Plugin.Interface">
|
||||
<HintPath>..\..\Effector.Main\Effector.Plugin.Interface\bin\Debug\Effector.Plugin.Interface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Apis, Version=1.68.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Apis.1.68.0\lib\net462\Google.Apis.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Apis.Auth, Version=1.68.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Apis.Auth.1.68.0\lib\net462\Google.Apis.Auth.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Apis.Core, Version=1.68.0.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Apis.Core.1.68.0\lib\net462\Google.Apis.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Apis.Sheets.v4, Version=1.68.0.3624, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Apis.Sheets.v4.1.68.0.3624\lib\net462\Google.Apis.Sheets.v4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Effector.Plugin.Lib">
|
||||
<HintPath>..\..\Effector.Plugin.Lib\Effector.Plugin.Lib\bin\Debug\Effector.Plugin.Lib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="KeraLua, Version=1.4.1.0, Culture=neutral, PublicKeyToken=6a194c04b9c89217, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\KeraLua.1.4.1\lib\net46\KeraLua.dll</HintPath>
|
||||
@@ -57,11 +72,12 @@
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Supervisor.Plugin.Interface">
|
||||
<HintPath>..\..\Ngp\Supervisor.Plugin.Interface\bin\Debug\Supervisor.Plugin.Interface.dll</HintPath>
|
||||
<Reference Include="System.CodeDom, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.CodeDom.7.0.0\lib\net462\System.CodeDom.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System" />
|
||||
@@ -101,9 +117,6 @@
|
||||
<DependentUpon>DoorListPageV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DoorListPage\DoorListPageVM.vb" />
|
||||
<Compile Include="ProcessManager\ProcessManagerV.xaml.vb">
|
||||
<DependentUpon>ProcessManagerV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FiveLakesUI.xaml.vb">
|
||||
<DependentUpon>FiveLakesUI.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -119,7 +132,6 @@
|
||||
<DependentUpon>MainMenuV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainMenu\MainMenuVM.vb" />
|
||||
<Compile Include="ProcessManager\ProcessManagerVM.vb" />
|
||||
<Compile Include="RestartWnd\RestartWndV.xaml.vb">
|
||||
<DependentUpon>RestartWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -145,7 +157,6 @@
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Command.vb" />
|
||||
<Compile Include="Utility\ExecProcessManager.vb" />
|
||||
<Compile Include="Utility\GenInterface.vb" />
|
||||
<Compile Include="Utility\IdNameStruct.vb" />
|
||||
<Compile Include="Utility\IniFile.vb" />
|
||||
@@ -163,16 +174,14 @@
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<Resource Include="Resources\Fonts\Roboto-Light.ttf" />
|
||||
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="DoorListPage\DoorListPageV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="ProcessManager\ProcessManagerV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="FiveLakesUI.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -198,12 +207,33 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DoorListPage\Add.png" />
|
||||
<Resource Include="Resources\DoorListPage\Copy.png" />
|
||||
<Resource Include="Resources\DoorListPage\MultipleCopy.png" />
|
||||
<Resource Include="Resources\DoorListPage\OpenCsv.png" />
|
||||
<Resource Include="Resources\DoorListPage\Produce.png" />
|
||||
<Resource Include="Resources\DoorListPage\ProduceAll.png" />
|
||||
<Resource Include="Resources\DoorListPage\ResetProduction.png" />
|
||||
<Resource Include="Resources\DoorListPage\SaveCsv.png" />
|
||||
<Resource Include="Resources\DoorListPage\SkipDoor.png" />
|
||||
<Resource Include="Resources\DoorListPage\Verify.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DoorListPage\Delete.png" />
|
||||
<Resource Include="Resources\DoorListPage\DeleteCsv.png" />
|
||||
<Resource Include="Resources\DoorListPage\MoveDown.png" />
|
||||
<Resource Include="Resources\DoorListPage\MoveUp.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\DoorListPage\NotProduce.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\pre-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy $(TargetPath) c:\EgtData\Supervisor\Plugin\Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.dll
|
||||
<PostBuildEvent>copy $(TargetPath) c:\EgtData\Effector\Plugin\Effector.Plugin.FiveLakes\Effector.Plugin.FiveLakes.dll
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets" Condition="Exists('..\packages\KeraLua.1.4.1\build\net46\KeraLua.targets')" />
|
||||
@@ -1,14 +1,10 @@
|
||||
<Grid x:Class="FiveLakesUI"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
DataContext="{StaticResource FiveLakesUIVM}">
|
||||
<TabControl SelectedIndex="{Binding SelPage}">
|
||||
<TabControl.ItemContainerStyle>
|
||||
<Style TargetType="TabItem">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</Style>
|
||||
</TabControl.ItemContainerStyle>
|
||||
<TabControl SelectedIndex="{Binding SelPage}"
|
||||
Style="{StaticResource NoHeader_TabControl}">
|
||||
<TabItem Name="DoorList"
|
||||
Header="DoorList">
|
||||
<local:DoorListPageV DataContext="{StaticResource DoorListVM}"/>
|
||||
@@ -22,11 +18,4 @@
|
||||
<local:StatisticsPageV DataContext="{StaticResource StatisticsPageVM}"/>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
<!--<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding TextTest}" Background="Green"/>
|
||||
<Button Grid.Column="1"
|
||||
x:Name="Button1"/>-->
|
||||
</Grid>
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
<Export(GetType(IPluginControl))>
|
||||
<ExportMetadata("Name", "Project")>
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
Public Class FiveLakesUIVM
|
||||
Inherits VMBase
|
||||
@@ -48,11 +48,12 @@ Public Class FiveLakesUIVM
|
||||
If GetPrivateProfileString(S_DATA, K_DATAROOT, "", m_sDataRoot, m_sDataRoot & "\" & DAT_FILE_NAME) = 0 Then
|
||||
m_sDataRoot = System.AppDomain.CurrentDomain.BaseDirectory
|
||||
End If
|
||||
m_sDataRoot &= "\" & "Plugin\Supervisor.Plugin.FiveLakes"
|
||||
m_sDataRoot &= "\" & "Plugin\Effector.Plugin.FiveLakes"
|
||||
' Impostazione direttorio di configurazione
|
||||
m_sConfigDir = m_sDataRoot & "\" & CONF_DIR
|
||||
' Impostazione path Ini file
|
||||
IniFile.SetIniFile(m_sConfigDir & "\" & INI_FILE_NAME)
|
||||
Effector.Plugin.Lib.PluginIniFile.SetIniFile(m_sConfigDir & "\" & INI_FILE_NAME)
|
||||
' Impostazione path resources dir
|
||||
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
||||
End Sub
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
Imports KeraLua
|
||||
|
||||
<Export(GetType(IPluginLuaManager))>
|
||||
@@ -10,6 +10,7 @@ Public Module Lua_General
|
||||
Friend func_PlgCheckExecProcessAsync As LuaFunction = AddressOf Lua_PlgCheckExecProcessAsync
|
||||
Friend func_PlgGetNextDoor As LuaFunction = AddressOf Lua_PlgGetNextDoor
|
||||
Friend func_PlgOpenRestartWnd As LuaFunction = AddressOf Lua_PlgOpenRestartWnd
|
||||
Friend func_PlgMachineReset As LuaFunction = AddressOf Lua_PlgMachineReset
|
||||
|
||||
Private Function Lua_PlgGetNumberFromIni(ByVal p As IntPtr) As Integer
|
||||
Dim state = Lua.FromIntPtr(p)
|
||||
@@ -107,7 +108,8 @@ Public Module Lua_General
|
||||
If Not IsNothing(NextDoor) Then
|
||||
' restituisco il risultato
|
||||
LuaSetParam(state, NextDoor.nId)
|
||||
LuaSetParam(state, NextDoor.sDDFName)
|
||||
' Dim sGenDDFName As String = Path.GetFileNameWithoutExtension(NextDoor.sDDFName) & "_" & NextDoor.nId & ".ddf"
|
||||
LuaSetParam(state, NextDoor.sDDFName & "_" & NextDoor.nId)
|
||||
Return 2
|
||||
End If
|
||||
Return 0
|
||||
@@ -115,9 +117,25 @@ Public Module Lua_General
|
||||
|
||||
Private Function Lua_PlgOpenRestartWnd(ByVal p As IntPtr) As Integer
|
||||
Dim state = Lua.FromIntPtr(p)
|
||||
Dim nMachineIndex As Integer = 1
|
||||
LuaGetParam(state, 1, nMachineIndex)
|
||||
LuaClearStack(state)
|
||||
Dim RestartWnd As New RestartWndV(Application.Current.MainWindow, New RestartWndVM())
|
||||
RestartWnd.ShowDialog()
|
||||
Dim RestartWnd As New RestartWndV(Application.Current.MainWindow, New RestartWndVM(nMachineIndex))
|
||||
Dim bRes As Boolean = RestartWnd.ShowDialog()
|
||||
If Not IsNothing(bRes) Then
|
||||
' restituisco il risultato
|
||||
LuaSetParam(state, bRes)
|
||||
Return 1
|
||||
End If
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
Private Function Lua_PlgMachineReset(ByVal p As IntPtr) As Integer
|
||||
Dim state = Lua.FromIntPtr(p)
|
||||
Dim nMachineIndex As Integer = 1
|
||||
LuaGetParam(state, 1, nMachineIndex)
|
||||
LuaClearStack(state)
|
||||
Map.refDoorListPageVM.ResetProductionQueue()
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
@@ -131,6 +149,7 @@ Public Module Lua_General
|
||||
state.Register("PlgCheckExecProcessAsync", func_PlgCheckExecProcessAsync)
|
||||
state.Register("PlgGetNextDoor", func_PlgGetNextDoor)
|
||||
state.Register("PlgOpenRestartWnd", func_PlgOpenRestartWnd)
|
||||
state.Register("PlgMachineReset", func_PlgMachineReset)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Grid x:Class="MachinePageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
@@ -10,10 +10,12 @@
|
||||
<local:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>
|
||||
<local:StringToMachineStateConverter x:Key="StringToMachineStateConverter"/>
|
||||
<local:StringToDDFCalcStateConverter x:Key="StringToDDFCalcStateConverter"/>
|
||||
<local:DDFCalcStateToVisibilityConverter x:Key="DDFCalcStateToVisibilityConverter"/>
|
||||
<local:StringToNewDoorStateConverter x:Key="StringToNewDoorStateConverter"/>
|
||||
<local:StringToBooleanConverter x:Key="StringToBooleanConverter"/>
|
||||
<local:StringToBackgroundConverter x:Key="StringToBackgroundConverter"/>
|
||||
<local:DoorToVisibilityConverter x:Key="DoorToVisibilityConverter"/>
|
||||
<local:StringToStyleConverter x:Key="StringToStyleConverter"/>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -42,7 +44,8 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Grid Grid.Column="1"
|
||||
VerticalAlignment="Center">
|
||||
VerticalAlignment="Center"
|
||||
Visibility="{Binding MachineCommands_Visibility}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -87,7 +90,8 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Bottoni di debug-->
|
||||
<Grid Grid.Column="1">
|
||||
<Grid Grid.Column="1"
|
||||
Visibility="{Binding MachineCommands_Visibility}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3.8*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -767,42 +771,53 @@
|
||||
<Border Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[0].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[0].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[0].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ProgressBar Grid.Row="1"
|
||||
Value="{Binding dDdfCalcValue, Mode=OneWay}"
|
||||
Height="20"
|
||||
Maximum="100"
|
||||
Visibility="{Binding nDDfCalcState, Converter={StaticResource DDFCalcStateToVisibilityConverter}}"/>
|
||||
</Grid>
|
||||
<Border Grid.Column="3"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[1].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[1].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[1].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="5"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[2].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[2].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[2].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="7"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[3].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[3].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[3].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="9"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[4].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Visibility="{Binding VariableList[24].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{Binding VariableList[24].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[4].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="11"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[25].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[25].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[5].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
|
||||
@@ -810,25 +825,90 @@
|
||||
<Border Grid.Column="13"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[26].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[26].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[6].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="15"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[27].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[27].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[7].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="17"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[28].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Style="{StaticResource Door}">
|
||||
Style="{Binding VariableList[28].sValue, Converter={StaticResource StringToStyleConverter}}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[8].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<!--Intestazione descrizione porte-->
|
||||
<Grid Grid.Row="4">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Text="Circular Index"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Text="State"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="3"
|
||||
Text="DDF Name"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="4"
|
||||
Text="CSV Name"/>-->
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
Text="DoorCode"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="6"
|
||||
Text="DoorDescription"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="7"
|
||||
Text="M1 CN Path"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="8"
|
||||
Text="M2 CN Path"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="9"
|
||||
Text="Load Time"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="10"
|
||||
Text="Machining 1 Start"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="11"
|
||||
Text="Machining 1 End"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="12"
|
||||
Text="Machining 2 Start"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="13"
|
||||
Text="Machining 2 End"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="14"
|
||||
Text="UnloadTime"/>
|
||||
</Grid>
|
||||
<!--Descrizione porte-->
|
||||
<ItemsControl Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
@@ -840,11 +920,8 @@
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Visibility="{Binding Converter={StaticResource DoorToVisibilityConverter}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid HorizontalAlignment="Center"
|
||||
Visibility="{Binding Converter={StaticResource DoorToVisibilityConverter}}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
@@ -862,93 +939,48 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding nId}"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Text="Circular Index"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding nCircIndex}"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Text="State"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Text="{Binding nState}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="3"
|
||||
Text="DDF Name"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
Text="{Binding sDDFName}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
Text="CSV Name"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
Text="{Binding sCSVName}"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
Text="DoorCode"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding sCSVName}"/>-->
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
Text="{Binding sDoorCode}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="6"
|
||||
Text="DoorDescription"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="6"
|
||||
Text="{Binding sDoorDescription}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="7"
|
||||
Text="M1 CN Path"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="7"
|
||||
Text="{Binding sM1CNPath}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="8"
|
||||
Text="M2 CN Path"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="8"
|
||||
Text="{Binding sM2CNPath}"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="9"
|
||||
Text="Load Time"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="9"
|
||||
Text="{Binding sLoadTime}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="10"
|
||||
Text="Machining 1 Start"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="10"
|
||||
Text="{Binding sMachining1Start}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="11"
|
||||
Text="Machining 1 End"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="11"
|
||||
Text="{Binding sMachining1End}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="12"
|
||||
Text="Machining 2 Start"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="12"
|
||||
Text="{Binding sMachining2Start}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="13"
|
||||
Text="Machining 2 End"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="13"
|
||||
Text="{Binding sMachining2End}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="14"
|
||||
Text="UnloadTime"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="14"
|
||||
Text="{Binding sUnloadTime}"/>
|
||||
@@ -957,277 +989,163 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
<!--Bottoni macchina vecchi-->
|
||||
<!--<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Presenza porta M1S0"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,2,980,0"
|
||||
Width="30"/>
|
||||
<Button Content="1"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,2,980,1"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M1S1"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1360/1,980->1,1,1361/1,981"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M1S2"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1361/1,981->1,1,1362/1,982"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M1S3"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1362/1,982->1,1,1363/1,983"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M1S4/M2S0"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1363/1,983->1,1,1364;2,1,1360/1,984;2,980"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Presenza porta M2S0"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,2,980,0"
|
||||
Width="30"/>
|
||||
<Button Content="1"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,2,980,1"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M2S1"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="1,1,1364;2,1,1360/1,984;2,980->2,1,1361/2,981"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M2S2"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="2,1,1361/2,981->2,1,1362/2,982"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M2S3"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="2,1,1362/2,982->2,1,1363/2,983"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Avanza porta in M2S4"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding MoveVariable_Command}"
|
||||
CommandParameter="2,1,1363/2,983->2,1,1364/2,984"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="State M1"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,0"
|
||||
Width="30"/>
|
||||
<Button Content="1"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,1"
|
||||
Width="30"/>
|
||||
<Button Content="2"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,2"
|
||||
Width="30"/>
|
||||
<Button Content="3"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,3"
|
||||
Width="30"/>
|
||||
<Button Content="4"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,4"
|
||||
Width="30"/>
|
||||
<Button Content="5"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="1,1,1352,5"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="State M2"/>
|
||||
<Button Content="0"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,0"
|
||||
Width="30"/>
|
||||
<Button Content="1"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,1"
|
||||
Width="30"/>
|
||||
<Button Content="2"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,2"
|
||||
Width="30"/>
|
||||
<Button Content="3"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,3"
|
||||
Width="30"/>
|
||||
<Button Content="4"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,4"
|
||||
Width="30"/>
|
||||
<Button Content="5"
|
||||
Command="{Binding WriteVariable_Command}"
|
||||
CommandParameter="2,1,1352,5"
|
||||
Width="30"/>
|
||||
</StackPanel>
|
||||
</Grid>-->
|
||||
<!--Lista circolare porte-->
|
||||
<Grid Grid.Row="2"
|
||||
Visibility="{Binding DoorCircList_Visibility}">
|
||||
<ItemsControl ItemsSource="{Binding LuaDoorList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="10"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding nId}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Text="Circular Index"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding nCircIndex}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Text="State"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Text="{Binding nState}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="3"
|
||||
Text="DDF Name"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
Text="{Binding sDDFName}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="4"
|
||||
Text="CSV Name"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
Text="{Binding sCSVName}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
Text="DoorCode"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
Text="{Binding sDoorCode}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="6"
|
||||
Text="DoorDescription"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="6"
|
||||
Text="{Binding sDoorDescription}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="7"
|
||||
Text="M1 CN Path"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="7"
|
||||
Text="{Binding sM1CNPath}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="8"
|
||||
Text="M2 CN Path"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="8"
|
||||
Text="{Binding sM2CNPath}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="9"
|
||||
Text="Load Time"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="9"
|
||||
Text="{Binding sLoadTime}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="10"
|
||||
Text="Machining 1 Start"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="10"
|
||||
Text="{Binding sMachining1Start}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="11"
|
||||
Text="Machining 1 End"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="11"
|
||||
Text="{Binding sMachining1End}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="12"
|
||||
Text="Machining 2 Start"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="12"
|
||||
Text="{Binding sMachining2Start}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="13"
|
||||
Text="Machining 2 End"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="13"
|
||||
Text="{Binding sMachining2End}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="14"
|
||||
Text="UnloadTime"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="14"
|
||||
Text="{Binding sUnloadTime}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Text="Circular Index"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Text="State"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="3"
|
||||
Text="Position"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="4"
|
||||
Text="DDF Name"/>
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
Text="CSV Name"/>-->
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="6"
|
||||
Text="DoorCode"/>-->
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="7"
|
||||
Text="DoorDescription"/>-->
|
||||
<!--<TextBlock Grid.Column="0"
|
||||
Grid.Row="8"
|
||||
Text="M1 CN Path"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="9"
|
||||
Text="M2 CN Path"/>-->
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="10"
|
||||
Text="Load Time"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="11"
|
||||
Text="Machining 1 Start"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="12"
|
||||
Text="Machining 1 End"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="13"
|
||||
Text="Machining 2 Start"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="14"
|
||||
Text="Machining 2 End"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="15"
|
||||
Text="UnloadTime"/>
|
||||
</Grid>
|
||||
<ItemsControl Grid.Column="1"
|
||||
ItemsSource="{Binding LuaDoorList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Columns="10"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding nId}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding nCircIndex}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Text="{Binding nState}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
Text="{Binding nDoorPosition}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
Text="{Binding sDDFName}"/>
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
Text="{Binding sCSVName}"/>-->
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="6"
|
||||
Text="{Binding sDoorCode}"/>-->
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="7"
|
||||
Text="{Binding sDoorDescription}"/>-->
|
||||
<!--<TextBlock Grid.Column="1"
|
||||
Grid.Row="8"
|
||||
Text="{Binding sM1CNPath}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="9"
|
||||
Text="{Binding sM2CNPath}"/>-->
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="10"
|
||||
Text="{Binding sLoadTime}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="11"
|
||||
Text="{Binding sMachining1Start}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="12"
|
||||
Text="{Binding sMachining1End}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="13"
|
||||
Text="{Binding sMachining2Start}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="14"
|
||||
Text="{Binding sMachining2End}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="15"
|
||||
Text="{Binding sUnloadTime}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
@@ -4,8 +4,8 @@ Imports System.Globalization
|
||||
Imports System.Reflection
|
||||
Imports System.Windows.Threading
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports Supervisor.Plugin.FiveLakes.Variable
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.FiveLakes.Variable
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
Public Class MachinePageVM
|
||||
Inherits VMBase
|
||||
@@ -44,6 +44,13 @@ Public Class MachinePageVM
|
||||
NotifyPropertyChanged(NameOf(nDDfCalcState))
|
||||
End Sub
|
||||
|
||||
Private m_dDdfCalcValue As Double = 0
|
||||
Public ReadOnly Property dDdfCalcValue As Double
|
||||
Get
|
||||
Return m_dDdfCalcValue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nNewDoorState As Integer = -1
|
||||
Public ReadOnly Property nNewDoorState As Integer
|
||||
Get
|
||||
@@ -159,7 +166,7 @@ Public Class MachinePageVM
|
||||
AddHandler m_VarTimer.Tick, AddressOf VarTimer_Tick
|
||||
m_VarTimer.Interval = New TimeSpan(100)
|
||||
m_VarTimer.Start()
|
||||
m_DoorOnMachineList.Add(New Door(35, 1, "Test.ddf", "Produzione2024", 1, 800, 1800, 40, {""}, {""}))
|
||||
' m_DoorOnMachineList.Add(New Door(35, 1, "Test.ddf", "Produzione2024", 1, 800, 1800, 40, {""}, {""}))
|
||||
Dim sResourcesDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, K_RESOURCESDIR, "", sResourcesDirPath)
|
||||
m_sMachineImagePath = sResourcesDirPath & "\FiveLakesMachine.png"
|
||||
@@ -207,7 +214,7 @@ Public Class MachinePageVM
|
||||
End Select
|
||||
Next
|
||||
' se in simulazione
|
||||
If Map.refSupervisorFunction.PlgGetPrivateProfileInt(S_NC, K_NC_SIMULATE, 0) Then
|
||||
If Map.refSupervisorFunction.PlgGetPrivateProfileInt(S_NC, K_NC_SIMULATE, 0) > 0 Then
|
||||
' aggiorno stato porta in macchina da 1 a 2 se in stazione di lavorazione
|
||||
For nMachineIndex = 1 To 2
|
||||
Dim nMachineId As Integer = nMachineIndex
|
||||
@@ -242,6 +249,14 @@ Public Class MachinePageVM
|
||||
Dim nState As Integer = -1
|
||||
If LuaGetGlobVar("MACHINE1.DDfCalcState", nState) Then
|
||||
SetDDfCalcState(nState)
|
||||
If nState = 1 Then
|
||||
m_dDdfCalcValue += 100 / 250
|
||||
m_dDdfCalcValue = Math.Min(100, m_dDdfCalcValue)
|
||||
ElseIf m_dDdfCalcValue <> 0 Then
|
||||
m_dDdfCalcValue = 0
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(dDdfCalcValue))
|
||||
NotifyPropertyChanged(NameOf(nDDfCalcState))
|
||||
End If
|
||||
If LuaGetGlobVar("MACHINE1.NewDoorState", nState) Then
|
||||
SetNewDoorState(nState)
|
||||
@@ -254,6 +269,8 @@ Public Class MachinePageVM
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nCircIndex", nCircIndex)
|
||||
Dim nDoorState As Integer = -1
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nState", nDoorState)
|
||||
Dim nDoorPosition As Integer = -1
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nDoorPosition", nDoorPosition)
|
||||
Dim sDoorCode As String = ""
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".sDoorCode", sDoorCode)
|
||||
Dim sDoorDescription As String = ""
|
||||
@@ -278,7 +295,7 @@ Public Class MachinePageVM
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nMachining2End", lMachining2End)
|
||||
Dim lUnloadTime As Long = 0
|
||||
LuaGetGlobVar("ListaCircPorte." & nDoorIndex & ".nUnloadTime", lUnloadTime)
|
||||
m_LuaDoorList.Add(New LuaDoor(nId, nCircIndex, nDoorState, sDoorCode, sDoorDescription, sDDFName, sCSVName, sM1CNPath, sM2CNPath, lLoadTime, lMachining1Start, lMachining1End, lMachining2Start, lMachining2End, lUnloadTime))
|
||||
m_LuaDoorList.Add(New LuaDoor(nId, nCircIndex, nDoorState, nDoorPosition, sDoorCode, sDoorDescription, sDDFName, sCSVName, sM1CNPath, sM2CNPath, lLoadTime, lMachining1Start, lMachining1End, lMachining2Start, lMachining2End, lUnloadTime))
|
||||
If nId > 0 Then
|
||||
' aggiorno dati in lista porte
|
||||
Dim Door As Door = Map.refDoorListPageVM.DoorList.FirstOrDefault(Function(x) x.nId = nId)
|
||||
@@ -297,7 +314,7 @@ Public Class MachinePageVM
|
||||
Dim Var As Variable = m_VariableList(nVarIndex)
|
||||
If nVarIndex >= 5 AndAlso nVarIndex <= 9 Then
|
||||
Dim nId As Integer = -1
|
||||
If Var.nValue > 0 Then
|
||||
If Var.nValue > 0 AndAlso Var.nValue <= 10 Then
|
||||
m_DoorOnMachineArray(nVarIndex - 5) = m_LuaDoorList(Var.nValue - 1)
|
||||
Else
|
||||
m_DoorOnMachineArray(nVarIndex - 5) = Nothing
|
||||
@@ -305,7 +322,7 @@ Public Class MachinePageVM
|
||||
End If
|
||||
If nVarIndex >= 30 AndAlso nVarIndex <= 33 Then
|
||||
Dim nId As Integer = -1
|
||||
If Var.nValue > 0 Then
|
||||
If Var.nValue > 0 AndAlso Var.nValue <= 10 Then
|
||||
m_DoorOnMachineArray(nVarIndex - 25) = m_LuaDoorList(Var.nValue - 1)
|
||||
Else
|
||||
m_DoorOnMachineArray(nVarIndex - 25) = Nothing
|
||||
@@ -416,10 +433,10 @@ Public Class MachinePageVM
|
||||
If (MachineStateVar.nValue <> 2 AndAlso MachineStateVar.nValue <> 4) OrElse
|
||||
Sent1Var.nValue <> 0 OrElse Sent2Var.nValue <> 0 Then Return
|
||||
End If
|
||||
' verifco se variabile tavolo di lavoro, che la macchina abbia finito di lavorare
|
||||
' verifco se variabile tavolo di lavoro, che la macchina abbia finito di lavorare o che sia a inizializzazione perche' ripartenza
|
||||
If nVerifyFromVarAddress = 1362 Then
|
||||
Dim MachineStateVar As Variable = VariableList.FirstOrDefault(Function(x) x.nMachine = nVerifyFromMachineIndex AndAlso x.sName = "@STATE")
|
||||
If MachineStateVar.nValue <> 3 AndAlso MachineStateVar.nValue <> 5 Then Return
|
||||
If MachineStateVar.nValue <> 1 AndAlso MachineStateVar.nValue <> 3 AndAlso MachineStateVar.nValue <> 5 Then Return
|
||||
End If
|
||||
' verifico che stazione di destinazione non sia gia' occupata
|
||||
Dim sToAndPresenceVariables As String() = sVariableToMoveArgs(1).Split("/"c)
|
||||
@@ -603,7 +620,7 @@ Public Class MachinePageVM
|
||||
Case 0
|
||||
Return
|
||||
Case 1
|
||||
If nStartStop = 1 AndAlso StartDoorPresence.dValue = 1 AndAlso Sent1.nValue = 1 Then
|
||||
If nStartStop = 1 AndAlso (StartDoorPresence.dValue = 1 OrElse EndDoorPresence.dValue = 2) AndAlso Sent1.nValue = 1 Then
|
||||
nState = 2
|
||||
Map.refSupervisorFunction.ComWriteShortVar(Sent1.sIndex, 0, nMachineIndex)
|
||||
Else Return
|
||||
@@ -768,6 +785,13 @@ Public Class LuaDoor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nDoorPosition As Integer = 0
|
||||
Public ReadOnly Property nDoorPosition As Integer
|
||||
Get
|
||||
Return m_nDoorPosition
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sDoorCode As String = ""
|
||||
Public ReadOnly Property sDoorCode As String
|
||||
Get
|
||||
@@ -852,11 +876,12 @@ Public Class LuaDoor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, nCircIndex As Integer, nState As Integer, sDoorCode As String, sDoorDescription As String, sDDFName As String, sCSVName As String,
|
||||
Sub New(nId As Integer, nCircIndex As Integer, nState As Integer, nDoorPosition As Integer, sDoorCode As String, sDoorDescription As String, sDDFName As String, sCSVName As String,
|
||||
sM1CNPath As String, sM2CNPath As String, lLoadTime As Long, lMachining1Start As Long, lMachining1End As Long, lMachining2Start As Long, lMachining2End As Long, lUnloadTime As Long)
|
||||
m_nId = nId
|
||||
m_nCircIndex = nCircIndex
|
||||
m_nState = nState
|
||||
m_nDoorPosition = nDoorPosition
|
||||
m_sDoorCode = sDoorCode
|
||||
m_sDoorDescription = sDoorDescription
|
||||
m_sDDFName = sDDFName
|
||||
@@ -952,6 +977,20 @@ Public Class StringToDDFCalcStateConverter
|
||||
|
||||
End Class
|
||||
|
||||
Public Class DDFCalcStateToVisibilityConverter
|
||||
Implements IValueConverter
|
||||
|
||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||
If TypeOf value IsNot Integer Then Return Visibility.Collapsed
|
||||
Return If(value = 0, Visibility.Collapsed, Visibility.Visible)
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class StringToNewDoorStateConverter
|
||||
Implements IValueConverter
|
||||
|
||||
@@ -1024,3 +1063,26 @@ Public Class DoorToVisibilityConverter
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class StringToStyleConverter
|
||||
Implements IValueConverter
|
||||
|
||||
Dim DoorStyle As Style = Application.Current.TryFindResource("Door")
|
||||
Dim CutOutScrapStyle As Style = Application.Current.TryFindResource("CutOutScrap")
|
||||
|
||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||
If Not TypeOf value Is String OrElse String.IsNullOrWhiteSpace(value) Then Return "Door"
|
||||
Dim sValue As String = value
|
||||
Dim sLowerValue As String = sValue.ToLower()
|
||||
If sLowerValue = "true" Then Return "Door"
|
||||
If sLowerValue = "false" Then Return "Door"
|
||||
Dim nValue As Integer
|
||||
If Not Integer.TryParse(sValue, nValue) Then Return "Door"
|
||||
Return If(nValue = 4, CutOutScrapStyle, DoorStyle)
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -14,19 +14,19 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<RadioButton Content="Door List"
|
||||
<RadioButton Content="DOOR LIST"
|
||||
Command="{Binding Page_Command}"
|
||||
CommandParameter="{StaticResource Door_List}"
|
||||
IsChecked="True"
|
||||
Style="{StaticResource {x:Type ToggleButton}}"/>
|
||||
Style="{StaticResource MainMenu_ToggleButton}"/>
|
||||
<RadioButton Grid.Column="1"
|
||||
Content="Machine Status"
|
||||
Content="MACHINE STATUS"
|
||||
Command="{Binding Page_Command}"
|
||||
CommandParameter="{StaticResource Machine_State}"
|
||||
Style="{StaticResource {x:Type ToggleButton}}"/>
|
||||
<RadioButton Grid.Column="2"
|
||||
Style="{StaticResource MainMenu_ToggleButton}"/>
|
||||
<!--<RadioButton Grid.Column="2"
|
||||
Content="Statistics"
|
||||
Command="{Binding Page_Command}"
|
||||
CommandParameter="{StaticResource Statistics}"
|
||||
Style="{StaticResource {x:Type ToggleButton}}"/>
|
||||
Style="{StaticResource MainMenu_ToggleButton}"/>-->
|
||||
</Grid>
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
<Export(GetType(IPluginControl))>
|
||||
<ExportMetadata("Name", "MainMenu")>
|
||||
@@ -11,10 +11,10 @@ Imports System.Windows
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("Supervisor.Plugin.FiveLakes")>
|
||||
<Assembly: AssemblyTitle("Effector.Plugin.FiveLakes")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Windows User")>
|
||||
<Assembly: AssemblyProduct("Supervisor.Plugin.FiveLakes")>
|
||||
<Assembly: AssemblyProduct("Effector.Plugin.FiveLakes")>
|
||||
<Assembly: AssemblyCopyright("Copyright @ Windows User 2024")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
@@ -64,9 +64,9 @@ Namespace My
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.Supervisor.Plugin.FiveLakes.My.MySettings
|
||||
Friend ReadOnly Property Settings() As Global.Effector.Plugin.FiveLakes.My.MySettings
|
||||
Get
|
||||
Return Global.Supervisor.Plugin.FiveLakes.My.MySettings.Default
|
||||
Return Global.Effector.Plugin.FiveLakes.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
@@ -0,0 +1,67 @@
|
||||
<Lib:EgtWindow x:Class="ProcessManagerV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Lib="clr-namespace:Effector.Plugin.Lib;assembly=Effector.Plugin.Lib"
|
||||
TitleBarHeight="30"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
ShowInTaskbar="False"
|
||||
SizeToContent="WidthAndHeight">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="{Binding TitleBarHeight, RelativeSource={RelativeSource AncestorType={x:Type Lib:EgtWindow}}}"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Lib:TitleBar/>
|
||||
<StackPanel Grid.Row="1">
|
||||
<Grid HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Arguments Queue Count: "/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding ArgumentsQueue}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="ResultQueue: "/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding ResultQueue}"/>
|
||||
</Grid>
|
||||
<!--<DataGrid ItemsSource="{Binding ThreadList}"
|
||||
AutoGenerateColumns="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Process Status"
|
||||
Binding="{Binding ProcessStatus}"/>
|
||||
<DataGridTextColumn Header="Curr Request Id"
|
||||
Binding="{Binding CurrRequest.nId}"/>
|
||||
<DataGridTextColumn Header="Curr Request Args"
|
||||
Binding="{Binding CurrRequest.sArgs}"/>
|
||||
<DataGridTextColumn Header="Process Result"
|
||||
Binding="{Binding nProcResult}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>-->
|
||||
<ItemsControl ItemsSource="{Binding ThreadList}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding ProcessStatus}"/>
|
||||
<TextBlock Text="{Binding CurrRequest.nId}"/>
|
||||
<TextBlock Text="{Binding CurrRequest.sArgs}"/>
|
||||
<TextBlock Text="{Binding nProcResult}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<ProgressBar Value="{Binding dProgress_Value, Mode=OneWay}"
|
||||
Minimum="0"
|
||||
Maximum="{Binding dProgress_Maximum}"
|
||||
Height="20"
|
||||
Width="250"/>
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Lib:EgtWindow>
|
||||
@@ -1,9 +1,12 @@
|
||||
Imports System.Windows.Threading
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports Effector.Plugin.Lib
|
||||
|
||||
Public Class ProcessManagerVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_nTaskQuantity As Integer = 3
|
||||
|
||||
Private m_UpdateDataTimer As New DispatcherTimer
|
||||
|
||||
Private m_ExecProcessManager As ExecProcessManager
|
||||
@@ -35,8 +38,23 @@ Public Class ProcessManagerVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dProgress_Value As Double
|
||||
Public ReadOnly Property dProgress_Value As Double
|
||||
Get
|
||||
Return (m_dProgress_Maximum - m_nTaskQuantity - m_ExecProcessManager.ArgumentsQueueCount) '/ m_dProgress_Maximum * 100
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dProgress_Maximum As Double
|
||||
Public ReadOnly Property dProgress_Maximum As Double
|
||||
Get
|
||||
Return m_dProgress_Maximum
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(ExecProcessManager As ExecProcessManager)
|
||||
m_ExecProcessManager = ExecProcessManager
|
||||
m_dProgress_Maximum = m_ExecProcessManager.ArgumentsQueueCount + m_nTaskQuantity
|
||||
m_UpdateDataTimer.Interval = New TimeSpan(0, 0, 1)
|
||||
AddHandler m_UpdateDataTimer.Tick, AddressOf UpdateDataTimer_Tick
|
||||
m_UpdateDataTimer.Start()
|
||||
@@ -46,6 +64,7 @@ Public Class ProcessManagerVM
|
||||
NotifyPropertyChanged(NameOf(ArgumentsQueue))
|
||||
NotifyPropertyChanged(NameOf(ResultQueue))
|
||||
NotifyPropertyChanged(NameOf(ThreadList))
|
||||
NotifyPropertyChanged(NameOf(dProgress_Value))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
After Width: | Height: | Size: 542 B |
|
After Width: | Height: | Size: 484 B |
|
After Width: | Height: | Size: 608 B |
|
After Width: | Height: | Size: 773 B |
|
After Width: | Height: | Size: 358 B |
|
After Width: | Height: | Size: 328 B |
|
After Width: | Height: | Size: 547 B |
|
After Width: | Height: | Size: 730 B |
|
After Width: | Height: | Size: 626 B |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 767 B |
|
After Width: | Height: | Size: 390 B |
|
After Width: | Height: | Size: 175 B |
|
After Width: | Height: | Size: 685 B |
|
After Width: | Height: | Size: 237 B |
|
After Width: | Height: | Size: 668 B |
@@ -3,13 +3,15 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
Title="{Binding sTitle}">
|
||||
<Window.Resources>
|
||||
<local:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>
|
||||
<local:DoorToVisibilityConverter x:Key="DoorToVisibilityConverter"/>
|
||||
<local:StateToVisibilityConverter x:Key="StateToVisibilityConverter"/>
|
||||
<local:VariableNameToVisibilityConverter x:Key="VariableNameToVisibilityConverter"/>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -45,35 +47,35 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[0].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_00}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[0].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="3"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[1].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_01}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[1].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="5"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[2].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_02}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[2].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="7"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[3].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_03}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[3].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="9"
|
||||
Grid.Row="1"
|
||||
Visibility="{Binding VariableList[4].sValue, Converter={StaticResource StringToVisibilityConverter}}"
|
||||
Visibility="{Binding nMachineIndex, Converter={StaticResource VariableNameToVisibilityConverter}, ConverterParameter=WP_PR_04}"
|
||||
Style="{StaticResource Door}">
|
||||
<TextBlock Text="{Binding DoorOnMachineArray[4].nId}"
|
||||
Style="{StaticResource MachDrawVar_TextBlock}"/>
|
||||
@@ -114,7 +116,7 @@
|
||||
<TextBlock Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="Id"/>
|
||||
<TextBox Grid.Column="1"
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding nId}"/>
|
||||
<TextBlock Grid.Column="0"
|
||||
@@ -265,8 +267,16 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>-->
|
||||
<Button Grid.Row="1"
|
||||
Content="Ok"
|
||||
Command="{Binding Ok_Command}"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Ok"
|
||||
Command="{Binding Ok_Command}"/>
|
||||
<Button Grid.Column="1"
|
||||
Content="Empty Line"
|
||||
Command="{Binding Empty_Command}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -1,15 +1,28 @@
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class RestartWndVM
|
||||
Inherits VMBase
|
||||
|
||||
Friend Event m_CloseWindow(bDialogResult As Boolean)
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_sTitle As String = ""
|
||||
Public ReadOnly Property sTitle As String
|
||||
Get
|
||||
Return m_sTitle
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nMachineIndex As Integer = 1
|
||||
Public ReadOnly Property nMachineIndex As Integer
|
||||
Get
|
||||
Return m_nMachineIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_RestartDoorList As ObservableCollection(Of RestartDoor)
|
||||
Public ReadOnly Property RestartDoorList As ObservableCollection(Of RestartDoor)
|
||||
@@ -45,9 +58,23 @@ Public Class RestartWndVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOk As ICommand
|
||||
Private m_cmdEmpty As ICommand
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
Sub New(nMachineIndex As Integer)
|
||||
m_nMachineIndex = nMachineIndex
|
||||
m_sTitle = "Machine " & m_nMachineIndex
|
||||
If Map.refSupervisorFunction.PlgGetPrivateProfileInt(S_NC, K_NC_SIMULATE, 0) > 0 Then
|
||||
For nIndex = 0 To 4
|
||||
Dim dValue As Double = GetPluginPrivateProfileDouble(S_DEBUG, K_DOORPRESENCE & "M" & m_nMachineIndex & "P" & nIndex, 0)
|
||||
WriteVariableValueToName(nMachineIndex, "@WP_PR_0" & nIndex.ToString(), dValue)
|
||||
Dim nValue As Integer = GetPluginPrivateProfileDouble(S_DEBUG, K_DOORINDEX & "M" & m_nMachineIndex & "P" & nIndex, 0)
|
||||
WriteVariableValueToName(nMachineIndex, "@DOORN_S" & nIndex.ToString(), nValue)
|
||||
Next
|
||||
End If
|
||||
Dim sBackupFilePath As String = ""
|
||||
GetPluginPrivateProfileString("General", "BackupDir", "", sBackupFilePath)
|
||||
sBackupFilePath &= "\LuaBackup.json"
|
||||
@@ -66,9 +93,12 @@ Public Class RestartWndVM
|
||||
|
||||
' leggo presenze porta
|
||||
For nPositionIndex As Integer = 4 To 0 Step -1
|
||||
If GetVariableFromName(1, "@WP_PR_0" & nPositionIndex.ToString()).dValue <> 0 Then
|
||||
Dim dWPValue As Double = 0
|
||||
GetVariableValueFromName(nMachineIndex, "@WP_PR_0" & nPositionIndex.ToString(), dWPValue)
|
||||
If dWPValue <> 0 Then
|
||||
' verifico indice
|
||||
Dim nCircindex As Integer = GetVariableFromName(1, "@DOORN_S" & nPositionIndex.ToString()).nValue
|
||||
Dim nCircindex As Integer = 0
|
||||
GetVariableValueFromName(nMachineIndex, "@DOORN_S" & nPositionIndex.ToString(), nCircindex)
|
||||
If nCircindex <> 0 Then
|
||||
m_DoorOnMachineArray(nPositionIndex) = New RestartDoor(JsonLuaDoorList(nCircindex - 1))
|
||||
End If
|
||||
@@ -109,9 +139,38 @@ Public Class RestartWndVM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Private Function GetVariableFromName(nMachIndex As Integer, sName As String) As Variable
|
||||
Return Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
Public Shared Function GetVariableValueFromName(nMachIndex As Integer, sName As String, ByRef nValue As Integer) As Boolean
|
||||
Dim Variable As Variable = Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
If IsNothing(Variable) Then Return False
|
||||
Dim nIndex As Integer = 0
|
||||
If Not Integer.TryParse(Variable.sIndex, nIndex) Then Return False
|
||||
Return Map.refSupervisorFunction.ComReadShortVar(nIndex, nValue, nMachIndex)
|
||||
End Function
|
||||
|
||||
Public Shared Function GetVariableValueFromName(nMachIndex As Integer, sName As String, ByRef dValue As Double) As Boolean
|
||||
Dim Variable As Variable = Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
If IsNothing(Variable) Then Return False
|
||||
Dim nIndex As Integer = 0
|
||||
If Not Integer.TryParse(Variable.sIndex, nIndex) Then Return False
|
||||
Return Map.refSupervisorFunction.ComReadDoubleVar(nIndex, dValue, nMachIndex)
|
||||
End Function
|
||||
|
||||
Public Shared Function WriteVariableValueToName(nMachIndex As Integer, sName As String, nValue As Integer) As Boolean
|
||||
Dim Variable As Variable = Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
If IsNothing(Variable) Then Return False
|
||||
Dim nIndex As Integer = 0
|
||||
If Not Integer.TryParse(Variable.sIndex, nIndex) Then Return False
|
||||
Return Map.refSupervisorFunction.ComWriteShortVar(nIndex, nValue, nMachIndex)
|
||||
End Function
|
||||
|
||||
Public Shared Function WriteVariableValueToName(nMachIndex As Integer, sName As String, dValue As Double) As Boolean
|
||||
Dim Variable As Variable = Map.refMachinePageVM.VariableList.FirstOrDefault(Function(x) x.nMachine = nMachIndex AndAlso x.sName = sName)
|
||||
If IsNothing(Variable) Then Return False
|
||||
Dim nIndex As Integer = 0
|
||||
If Not Integer.TryParse(Variable.sIndex, nIndex) Then Return False
|
||||
Return Map.refSupervisorFunction.ComWriteDoubleVar(nIndex, dValue, nMachIndex)
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -133,6 +192,25 @@ Public Class RestartWndVM
|
||||
|
||||
#End Region ' Ok
|
||||
|
||||
#Region "Empty"
|
||||
|
||||
Public ReadOnly Property Empty_Command As ICommand
|
||||
Get
|
||||
If m_cmdEmpty Is Nothing Then
|
||||
m_cmdEmpty = New Command(AddressOf Empty)
|
||||
End If
|
||||
Return m_cmdEmpty
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Empty()
|
||||
Map.refDoorListPageVM.ResetProductionQueue()
|
||||
Map.refDoorListPageVM.WriteBackup()
|
||||
RaiseEvent m_CloseWindow(False)
|
||||
End Sub
|
||||
|
||||
#End Region ' Empty
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
@@ -151,6 +229,25 @@ Public Class StateToVisibilityConverter
|
||||
|
||||
End Class
|
||||
|
||||
Public Class VariableNameToVisibilityConverter
|
||||
Implements IValueConverter
|
||||
|
||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
|
||||
If IsNothing(value) OrElse Not TypeOf value Is Integer Then Return Visibility.Collapsed
|
||||
If IsNothing(parameter) OrElse Not TypeOf parameter Is String OrElse String.IsNullOrWhiteSpace(parameter) Then Return Visibility.Collapsed
|
||||
Dim nMachineIndex As Integer = 0
|
||||
If Not Integer.TryParse(value, nMachineIndex) Then Return Visibility.Collapsed
|
||||
Dim dWPValue As Double = 0
|
||||
RestartWndVM.GetVariableValueFromName(nMachineIndex, "@" & parameter, dWPValue)
|
||||
Return If(dWPValue = 1 OrElse dWPValue = 2 OrElse dWPValue = 3, Visibility.Visible, Visibility.Collapsed)
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class RestartDoor
|
||||
Inherits VMBase
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
@@ -0,0 +1,322 @@
|
||||
<ResourceDictionary x:Class="Dictionary"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Effector.Plugin.FiveLakes"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
>
|
||||
|
||||
<!--
|
||||
Assign a Key to every Panel ViewModel to use
|
||||
it in xaml file(ProjectView.xaml).
|
||||
-->
|
||||
<local:FiveLakesUIVM x:Key="FiveLakesUIVM"/>
|
||||
<local:MainMenuVM x:Key="MainMenuVM"/>
|
||||
<local:DoorListPageVM x:Key="DoorListVM"/>
|
||||
<local:MachinePageVM x:Key="MachinePageVM"/>
|
||||
<local:StatisticsPageVM x:Key="StatisticsPageVM"/>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
|
||||
<!--#e8eef5-->
|
||||
<Color x:Key="Effector_LightBlue_Color" R="232" G="238" B="245" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_LightBlue" Color="{StaticResource Effector_LightBlue_Color}" />
|
||||
<!--#afc5d6-->
|
||||
<Color x:Key="Effector_Blue_Color" R="175" G="197" B="214" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Blue" Color="{StaticResource Effector_Blue_Color}" />
|
||||
<!--#749fc4-->
|
||||
<Color x:Key="Effector_DarkBlue_Color" R="116" G="159" B="196" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_DarkBlue" Color="{StaticResource Effector_DarkBlue_Color}" />
|
||||
|
||||
|
||||
<!--#92bde3-->
|
||||
<Color x:Key="Effector_LightBlue_Status_Color" R="146" G="189" B="227" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_LightBlue_Status" Color="{StaticResource Effector_LightBlue_Status_Color}" />
|
||||
<!--#5682a6-->
|
||||
<Color x:Key="Effector_Blue_Status_Color" R="86" G="130" B="166" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Blue_Status" Color="{StaticResource Effector_Blue_Status_Color}" />
|
||||
<!--#cd5c5c-->
|
||||
<Color x:Key="Effector_Red_Status_Color" R="205" G="92" B="92" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Red_Status" Color="{StaticResource Effector_Red_Status_Color}" />
|
||||
<!--#b1cbaa-->
|
||||
<Color x:Key="Effector_Green_Status_Color" R="177" G="203" B="170" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Green_Status" Color="{StaticResource Effector_Green_Status_Color}" />
|
||||
<!--#9c9c9c-->
|
||||
<Color x:Key="Effector_Gray_Status_Color" R="156" G="156" B="156" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Gray_Status" Color="{StaticResource Effector_Gray_Status_Color}" />
|
||||
<!--#ffd932-->
|
||||
<Color x:Key="Effector_Yellow_Status_Color" R="255" G="217" B="50" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Yellow_Status" Color="{StaticResource Effector_Yellow_Status_Color}" />
|
||||
|
||||
<!--#6398c7-->
|
||||
<Color x:Key="Effector_LightBlue_SelStatus_Color" R="99" G="152" B="199" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_LightBlue_SelStatus" Color="{StaticResource Effector_LightBlue_SelStatus_Color}" />
|
||||
<!--#4b677e-->
|
||||
<Color x:Key="Effector_Blue_SelStatus_Color" R="75" G="103" B="126" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Blue_SelStatus" Color="{StaticResource Effector_Blue_SelStatus_Color}" />
|
||||
<!--#a94444-->
|
||||
<Color x:Key="Effector_Red_SelStatus_Color" R="169" G="68" B="68" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Red_SelStatus" Color="{StaticResource Effector_Red_SelStatus_Color}" />
|
||||
<!--#89aa81-->
|
||||
<Color x:Key="Effector_Green_SelStatus_Color" R="137" G="170" B="129" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Green_SelStatus" Color="{StaticResource Effector_Green_SelStatus_Color}" />
|
||||
<!--#7d7d7d-->
|
||||
<Color x:Key="Effector_Gray_SelStatus_Color" R="125" G="125" B="125" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Gray_SelStatus" Color="{StaticResource Effector_Gray_SelStatus_Color}" />
|
||||
<!--#dcb718-->
|
||||
<Color x:Key="Effector_Yellow_SelStatus_Color" R="220" G="183" B="24" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Yellow_SelStatus" Color="{StaticResource Effector_Yellow_SelStatus_Color}" />
|
||||
<!--#e5ebf1-->
|
||||
<Color x:Key="Effector_White_SelStatus_Color" R="229" G="235" B="241" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_White_SelStatus" Color="{StaticResource Effector_Yellow_SelStatus_Color}" />
|
||||
|
||||
<!--#BC373E-->
|
||||
<!--
|
||||
<Color x:Key="Effector_Orange_Color" R="188" G="55" B="62" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Orange" Color="{StaticResource Effector_Orange_Color}" />-->
|
||||
<!--#A74C77-->
|
||||
<!--
|
||||
<Color x:Key="Effector_Purple_Color" R="167" G="76" B="119" A="255"/>
|
||||
<SolidColorBrush x:Key="Effector_Purple" Color="{StaticResource Effector_Purple_Color}" />-->
|
||||
|
||||
<!--Colori default dei controlli-->
|
||||
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
|
||||
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
|
||||
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
|
||||
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
|
||||
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
|
||||
|
||||
<Style x:Key="FocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--Risorsa che toglie le animazioni dai menù popup per evitare che i menù mru di scelta dei file rimangano aperti se il file è grosso -->
|
||||
<!--o viene eseguito un lua che non aggiorna l'interfaccia-->
|
||||
<PopupAnimation x:Key="{x:Static SystemParameters.MenuPopupAnimationKey}">None</PopupAnimation>
|
||||
|
||||
<!--convertert per visibilita' stringa di testo con misure in StatusBar--><!--
|
||||
<PrintApp:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>-->
|
||||
|
||||
<GridLength x:Key="TitleBarHeight">30</GridLength>
|
||||
<Thickness x:Key="WindowBorder_Thickness">2</Thickness>
|
||||
<sys:Double x:Key="WindowBorder_Height">2</sys:Double>
|
||||
|
||||
<!--Button-->
|
||||
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DoorList_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="2"/>
|
||||
</Style>
|
||||
|
||||
<!--ToggleButton-->
|
||||
|
||||
<Style TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource Effector_Blue}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
|
||||
<Setter Property="FontWeight" Value="Medium"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Button.IsDefaulted" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Effector_DarkBlue}"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="White"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
|
||||
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="MainMenu_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Padding" Value="25,0,25,0"/>
|
||||
</Style>
|
||||
|
||||
<!--Border-->
|
||||
|
||||
<Style x:Key="Parameter_MachinePage_Border" TargetType="{x:Type GroupBox}">
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="DarkGray"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!-- Custom SelectedItem colors for DataGrid -->
|
||||
|
||||
<Style x:Key="RowDataGrid_CustomHighLight" TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="BorderBrush" Value="LightGray" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="BorderThickness" Value="2,2,2,2" />
|
||||
<!--<Setter Property="BorderBrush" Value="Cyan" />-->
|
||||
<Setter Property="Padding" Value="0,0,0,0" />
|
||||
<Setter Property="Margin" Value="-2,0,-2,0" />
|
||||
<Setter Property="Foreground" Value="Blue" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
<Style.Resources>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="Black" />
|
||||
</Style.Resources>
|
||||
</Style>
|
||||
|
||||
<!--Styles for DataGrid columns-->
|
||||
|
||||
<Style x:Key="DataGridTextColumn_TextBlock" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="DataGridTextColumn_TextBox" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="DataGridTemplateColumn_ComboBox" TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="ItemContainerStyle">
|
||||
<Setter.Value>
|
||||
<Style TargetType="{x:Type ComboBoxItem}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
</Style>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--Style for page tabcontrol-->
|
||||
|
||||
<ControlTemplate x:Key="NoHeader_TabControl_ControlTemplate" TargetType="{x:Type TabControl}">
|
||||
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
||||
<Border x:Name="contentPanel" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="1" KeyboardNavigation.TabNavigation="Local">
|
||||
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<Style x:Key="NoHeader_TabControl" TargetType="{x:Type TabControl}">
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="Template" Value="{StaticResource NoHeader_TabControl_ControlTemplate}"/>
|
||||
</Style>
|
||||
|
||||
<!-- Image -->
|
||||
|
||||
<Style x:Key="Button_Image" TargetType="{x:Type Image}">
|
||||
<Setter Property="Stretch" Value="Uniform" />
|
||||
</Style>
|
||||
|
||||
<!--Stili per disegno macchina con porte-->
|
||||
|
||||
<Style x:Key="Table" TargetType="Border">
|
||||
<Setter Property="BorderBrush" Value="Gray"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
</Style>
|
||||
<Style x:Key="Door" TargetType="Border">
|
||||
<Setter Property="BorderBrush" Value="SaddleBrown"/>
|
||||
<Setter Property="BorderThickness" Value="5"/>
|
||||
<Setter Property="Background" Value="SandyBrown"/>
|
||||
</Style>
|
||||
<Style x:Key="CutOutScrap" TargetType="Border">
|
||||
<Setter Property="Margin" Value="35,10,10,10"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Background" Value="SandyBrown"/>
|
||||
</Style>
|
||||
<Style x:Key="Advancement_Button" TargetType="Button">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="Sensor" TargetType="Ellipse">
|
||||
<Setter Property="Height" Value="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"/>
|
||||
</Style>
|
||||
<Style x:Key="MachDrawVar_TextBlock" TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="MachDrawVar_CheckBox" TargetType="CheckBox">
|
||||
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,156 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports System.Globalization
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
<Export(GetType(IPluginControl))>
|
||||
<ExportMetadata("Name", "Dictionary")>
|
||||
Public Class Dictionary
|
||||
Inherits ResourceDictionary
|
||||
Implements IPluginControl
|
||||
|
||||
Public Shared ReadOnly MySceneHostVM As String = "MySceneHostVM"
|
||||
|
||||
#Region "Colors"
|
||||
|
||||
Private Shared m_Effector_LightBlue As SolidColorBrush = Application.Current.FindResource("Effector_LightBlue")
|
||||
Public Shared ReadOnly Property Effector_LightBlue As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_LightBlue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Blue As SolidColorBrush = Application.Current.FindResource("Effector_Blue")
|
||||
Public Shared ReadOnly Property Effector_Blue As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Blue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_DarkBlue As SolidColorBrush = Application.Current.FindResource("Effector_DarkBlue")
|
||||
Public Shared ReadOnly Property Effector_DarkBlue As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_DarkBlue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_LightBlue_Status As SolidColorBrush = Application.Current.FindResource("Effector_LightBlue_Status")
|
||||
Public Shared ReadOnly Property Effector_LightBlue_Status As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_LightBlue_Status
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Blue_Status As SolidColorBrush = Application.Current.FindResource("Effector_Blue_Status")
|
||||
Public Shared ReadOnly Property Effector_Blue_Status As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Blue_Status
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Red_Status As SolidColorBrush = Application.Current.FindResource("Effector_Red_Status")
|
||||
Public Shared ReadOnly Property Effector_Red_Status As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Red_Status
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Green_Status As SolidColorBrush = Application.Current.FindResource("Effector_Green_Status")
|
||||
Public Shared ReadOnly Property Effector_Green_Status As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Green_Status
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Gray_Status As SolidColorBrush = Application.Current.FindResource("Effector_Gray_Status")
|
||||
Public Shared ReadOnly Property Effector_Gray_Status As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Gray_Status
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Yellow_Status As SolidColorBrush = Application.Current.FindResource("Effector_Yellow_Status")
|
||||
Public Shared ReadOnly Property Effector_Yellow_Status As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Yellow_Status
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_LightBlue_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_LightBlue_SelStatus")
|
||||
Public Shared ReadOnly Property Effector_LightBlue_SelStatus As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_LightBlue_SelStatus
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Blue_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Blue_SelStatus")
|
||||
Public Shared ReadOnly Property Effector_Blue_SelStatus As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Blue_SelStatus
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Red_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Red_SelStatus")
|
||||
Public Shared ReadOnly Property Effector_Red_SelStatus As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Red_SelStatus
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Green_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Green_SelStatus")
|
||||
Public Shared ReadOnly Property Effector_Green_SelStatus As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Green_SelStatus
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Gray_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Gray_SelStatus")
|
||||
Public Shared ReadOnly Property Effector_Gray_SelStatus As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Gray_SelStatus
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_Yellow_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_Yellow_SelStatus")
|
||||
Public Shared ReadOnly Property Effector_Yellow_SelStatus As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_Yellow_SelStatus
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared m_Effector_White_SelStatus As SolidColorBrush = Application.Current.FindResource("Effector_White_SelStatus")
|
||||
Public Shared ReadOnly Property Effector_White_SelStatus As SolidColorBrush
|
||||
Get
|
||||
Return m_Effector_White_SelStatus
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Private Shared m_Effector_Orange As SolidColorBrush = Application.Current.FindResource("Effector_Orange")
|
||||
'Public Shared ReadOnly Property Effector_Orange As SolidColorBrush
|
||||
' Get
|
||||
' Return m_Effector_Orange
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
#End Region ' Colors
|
||||
|
||||
End Class
|
||||
|
||||
Public Class CenterToolTipConverter
|
||||
Implements IMultiValueConverter
|
||||
|
||||
Public Function Convert(ByVal values As Object(), ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
|
||||
For Each value In values
|
||||
If TypeOf (value) IsNot Double Then
|
||||
Return Double.NaN
|
||||
End If
|
||||
Next
|
||||
Dim dPlacementTarget As Double = CDbl(values(0))
|
||||
Dim dToolTip As Double = CDbl(values(1))
|
||||
Return (dPlacementTarget / 2.0) - (dToolTip / 2.0)
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(ByVal value As Object, ByVal targetTypes As Type(), ByVal parameter As Object, ByVal culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||
Throw New NotSupportedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -1,8 +1,9 @@
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
Imports MS.Internal
|
||||
Imports Supervisor.Plugin.FiveLakes.ThreadData
|
||||
Imports Effector.Plugin.FiveLakes.ThreadData
|
||||
Imports System.Windows.Threading
|
||||
Imports Effector.Plugin.Lib
|
||||
|
||||
Public Class ExecProcessManager
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Imports System.Globalization
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Converters
|
||||
Imports Supervisor.Plugin.FiveLakes.Door
|
||||
Imports Effector.Plugin.FiveLakes.Door
|
||||
|
||||
Public Class JsonDoor
|
||||
|
||||
@@ -61,6 +61,13 @@ Public Class JsonDoor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nSwing As Integer
|
||||
Public ReadOnly Property nSwing As Integer
|
||||
Get
|
||||
Return m_nSwing
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sCSVName As String
|
||||
Public ReadOnly Property sCSVName As String
|
||||
Get
|
||||
@@ -140,7 +147,7 @@ Public Class JsonDoor
|
||||
#End Region ' Statistics
|
||||
|
||||
<JsonConstructor>
|
||||
Sub New(nListIndex As Integer, nId As Integer, nCSVLine As Integer, sDDFName As String, sCSVName As String, nQuantity As Integer, dWidth As Double, dHeight As Double, dThickness As Double, nState As DoorStates, CustomerParameters As List(Of CustomerParameter),
|
||||
Sub New(nListIndex As Integer, nId As Integer, nCSVLine As Integer, sDDFName As String, sCSVName As String, nQuantity As Integer, dWidth As Double, dHeight As Double, dThickness As Double, nSwing As Integer, nState As DoorStates, CustomerParameters As List(Of CustomerParameter),
|
||||
nProdState As DoorProdStates, dtLoadTime As DateTime, dtMachining1Start As DateTime, dtMachining1End As DateTime, dtMachining2Start As DateTime, dtMachining2End As DateTime, dtUnloadTime As DateTime)
|
||||
m_nListIndex = nListIndex
|
||||
m_nId = nId
|
||||
@@ -151,6 +158,7 @@ Public Class JsonDoor
|
||||
m_dHeight = dHeight
|
||||
m_dWidth = dWidth
|
||||
m_dThickness = dThickness
|
||||
m_nSwing = nSwing
|
||||
m_nState = nState
|
||||
m_CustomerParameters = CustomerParameters
|
||||
m_nProdState = nProdState
|
||||
@@ -172,6 +180,7 @@ Public Class JsonDoor
|
||||
m_dHeight = Door.dHeight
|
||||
m_dWidth = Door.dWidth
|
||||
m_dThickness = Door.dThickness
|
||||
m_nSwing = Door.nSwing
|
||||
m_nState = Door.nState
|
||||
m_CustomerParameters = Door.CustomerParameters
|
||||
m_nProdState = Door.nProdState
|
||||
@@ -1,4 +1,4 @@
|
||||
Imports Supervisor.Plugin.Interface
|
||||
Imports Effector.Plugin.Interface
|
||||
|
||||
Module Map
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Google.Apis" version="1.68.0" targetFramework="net472" />
|
||||
<package id="Google.Apis.Auth" version="1.68.0" targetFramework="net472" />
|
||||
<package id="Google.Apis.Core" version="1.68.0" targetFramework="net472" />
|
||||
<package id="Google.Apis.Sheets.v4" version="1.68.0.3624" targetFramework="net472" />
|
||||
<package id="KeraLua" version="1.4.1" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||
<package id="System.CodeDom" version="7.0.0" targetFramework="net472" />
|
||||
<package id="System.Management" version="7.0.2" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -0,0 +1,3 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
|
||||
Copy-Item -Path c:\EgtProg\Effector\Effector*.exe $ProjectDir\..\Exe
|
||||
@@ -1,98 +0,0 @@
|
||||
<Grid x:Class="DoorListPageV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="CSV"
|
||||
ToolTip="Open CSV file"
|
||||
Command="{Binding OpenCSV_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"/>
|
||||
<Button Content="Skip Door"
|
||||
ToolTip="Skip Door"
|
||||
Command="{Binding SkipDoor_Command}"/>
|
||||
<Button Content="↑"
|
||||
ToolTip="Move Up"
|
||||
Command="{Binding MoveUp_Command}"/>
|
||||
<Button Content="↓"
|
||||
ToolTip="Move Down"
|
||||
Command="{Binding MoveDown_Command}"/>
|
||||
<Button Content="Delete"
|
||||
ToolTip="Delete"
|
||||
Command="{Binding Delete_Command}"/>
|
||||
<Button Content="Delete All"
|
||||
ToolTip="Delete All"
|
||||
Command="{Binding DeleteAll_Command}"/>
|
||||
<Button Content="Produce"
|
||||
ToolTip="Send to production"
|
||||
Command="{Binding Produce_Command}"/>
|
||||
<Button Content="Produce All"
|
||||
ToolTip="Send all to production"
|
||||
Command="{Binding ProduceAll_Command}"/>
|
||||
<Button Content="Reset Production Queue"
|
||||
ToolTip="Take all the door ready for production back to Verify state"
|
||||
Command="{Binding ResetProductionQueue_Command}"/>
|
||||
<Button Content="Verify"
|
||||
ToolTip="Verify all the doors that are in state Not Verified"
|
||||
Command="{Binding Verify_Command}"
|
||||
IsEnabled="{Binding bExecButton_IsEnabled}"/>
|
||||
</StackPanel>
|
||||
<DataGrid Grid.Row="1"
|
||||
ItemsSource="{Binding DoorList}"
|
||||
SelectedItem="{Binding SelDoor}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserSortColumns="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header=""
|
||||
Binding="{Binding nId}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Line"
|
||||
Binding="{Binding nCSVLine}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="DDF"
|
||||
Binding="{Binding sDDFName}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Quantity"
|
||||
Binding="{Binding nQuantity}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="State"
|
||||
Binding="{Binding nState}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Height"
|
||||
Binding="{Binding dHeight}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Width"
|
||||
Binding="{Binding dWidth}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Thickness"
|
||||
Binding="{Binding dThickness}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Csv"
|
||||
Binding="{Binding sCSVName}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Production State"
|
||||
Binding="{Binding nProdState}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Load Time"
|
||||
Binding="{Binding sLoadTime}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Machining 1 Start"
|
||||
Binding="{Binding sMachining1Start}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Machining 1 End"
|
||||
Binding="{Binding sMachining1End}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Machining 2 Start"
|
||||
Binding="{Binding sMachining2Start}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Machining 2 End"
|
||||
Binding="{Binding sMachining2End}"
|
||||
Width="Auto"/>
|
||||
<DataGridTextColumn Header="Unload Time"
|
||||
Binding="{Binding sUnloadTime}"
|
||||
Width="Auto"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
@@ -1,858 +0,0 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports Newtonsoft.Json
|
||||
Imports System.Windows.Threading
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Public Class DoorListPageVM
|
||||
Inherits VMBase
|
||||
|
||||
Private m_BackupTimer As New DispatcherTimer
|
||||
Private m_RefreshGraphicsTimer As New DispatcherTimer
|
||||
Private m_ExecProcessManager As ExecProcessManager
|
||||
|
||||
Private m_DoorList As New ObservableCollection(Of Door)
|
||||
Public ReadOnly Property DoorList As ObservableCollection(Of Door)
|
||||
Get
|
||||
Return m_DoorList
|
||||
End Get
|
||||
End Property
|
||||
Private m_SelDoor As Door
|
||||
Public Property SelDoor As Door
|
||||
Get
|
||||
Return m_SelDoor
|
||||
End Get
|
||||
Set(value As Door)
|
||||
m_SelDoor = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_bExecButton_IsEnabled As Boolean = True
|
||||
Public ReadOnly Property bExecButton_IsEnabled As Boolean
|
||||
Get
|
||||
Return m_bExecButton_IsEnabled
|
||||
End Get
|
||||
End Property
|
||||
Private Sub SetExecButtonIsEnabled(bValue As Boolean)
|
||||
m_bExecButton_IsEnabled = bValue
|
||||
NotifyPropertyChanged(NameOf(bExecButton_IsEnabled))
|
||||
End Sub
|
||||
Private m_nModifyIndex As Integer = 0
|
||||
Private m_nBackupindex As Integer = 0
|
||||
Private m_bWritingBackup As Boolean = False
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdOpenCSV As ICommand
|
||||
Private m_cmdSkipDoor As ICommand
|
||||
Private m_cmdMoveUp As ICommand
|
||||
Private m_cmdMoveDown As ICommand
|
||||
Private m_cmdDelete As ICommand
|
||||
Private m_cmdDeleteAll As ICommand
|
||||
Private m_cmdProduce As ICommand
|
||||
Private m_cmdProduceAll As ICommand
|
||||
Private m_cmdResetProductionQueue As ICommand
|
||||
Private m_cmdVerify As ICommand
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
' imposto riferimento in Map
|
||||
Map.SetRefDoorListPageVM(Me)
|
||||
Dim sBackupDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "BackupDir", "", sBackupDirPath)
|
||||
Dim sBackupFilePath As String = sBackupDirPath & "\Backup.json"
|
||||
Read(sBackupFilePath)
|
||||
m_BackupTimer.Interval = New TimeSpan(0, 0, 1)
|
||||
AddHandler m_BackupTimer.Tick, AddressOf BackupTimer_Tick
|
||||
m_RefreshGraphicsTimer.Interval = New TimeSpan(0, 0, 1)
|
||||
AddHandler m_RefreshGraphicsTimer.Tick, AddressOf RefreshGraphicsTimer_Tick
|
||||
m_BackupTimer.Start()
|
||||
m_RefreshGraphicsTimer.Start()
|
||||
End Sub
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Function ExecCAMProcess(sDDFName As String) As Boolean
|
||||
' lancio esecuzione programma
|
||||
Dim sCamExePath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "CAMExePath", "", sCamExePath)
|
||||
Dim sMainLuaPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "MainLUA", "", sMainLuaPath)
|
||||
Dim sDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "DDFDir", "", sDDFDirPath)
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & sDDFName
|
||||
Return Map.refSupervisorFunction.PlgExecProcess(sCamExePath, sMainLuaPath, sDDFFilePath)
|
||||
End Function
|
||||
|
||||
Friend Function ExecCAMProcessAsync(sDDFName As String) As Boolean
|
||||
' lancio esecuzione programma
|
||||
Dim sCamExePath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "CAMExePath", "", sCamExePath)
|
||||
Dim sMainLuaPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "MainLUA", "", sMainLuaPath)
|
||||
Dim sDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "DDFDir", "", sDDFDirPath)
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & sDDFName
|
||||
Return Map.refSupervisorFunction.PlgExecProcessAsync(sCamExePath, sMainLuaPath, sDDFFilePath)
|
||||
End Function
|
||||
|
||||
Public Sub Read(FilePath As String)
|
||||
If Not File.Exists(FilePath) Then Return
|
||||
Dim sReadedFile As String = File.ReadAllText(FilePath)
|
||||
Dim JsonDoorList As List(Of JsonDoor) = JsonConvert.DeserializeObject(Of List(Of JsonDoor))(sReadedFile)
|
||||
JsonDoorList = JsonDoorList.OrderBy(Of Integer)(Function(x) x.nListIndex).ToList()
|
||||
|
||||
m_DoorList = New ObservableCollection(Of Door)((From JsonDoor In JsonDoorList
|
||||
Select New Door(JsonDoor)).ToList())
|
||||
End Sub
|
||||
|
||||
Public Sub Write(FilePath As String)
|
||||
Dim JsonDoorList As New List(Of JsonDoor)
|
||||
For nDoorIndex As Integer = 0 To m_DoorList.Count - 1
|
||||
JsonDoorList.Add(New JsonDoor(nDoorIndex + 1, m_DoorList(nDoorIndex)))
|
||||
Next
|
||||
Dim JsonFromWindow As String = JsonConvert.SerializeObject(JsonDoorList, Formatting.Indented)
|
||||
If File.Exists(FilePath) Then
|
||||
Dim sBackupFilePath As String = Path.ChangeExtension(FilePath, ".bck")
|
||||
If File.Exists(sBackupFilePath) Then
|
||||
Try
|
||||
File.Delete(sBackupFilePath)
|
||||
Catch ex As Exception
|
||||
Map.refSupervisorFunction.PlgOutLog("Error! Impossible deleting backup file!")
|
||||
End Try
|
||||
End If
|
||||
Try
|
||||
File.Move(FilePath, sBackupFilePath)
|
||||
Catch ex As Exception
|
||||
Map.refSupervisorFunction.PlgOutLog("Error! Impossible renaming backup file!")
|
||||
End Try
|
||||
End If
|
||||
File.WriteAllText(FilePath, JsonFromWindow)
|
||||
End Sub
|
||||
|
||||
Private Sub WriteBackupCmd()
|
||||
If m_bWritingBackup Then Return
|
||||
m_bWritingBackup = True
|
||||
m_nBackupindex = m_nModifyIndex
|
||||
Dim sBackupDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, K_BACKUPDIR, "", sBackupDirPath)
|
||||
Dim sBackupFilePath As String = sBackupDirPath & "\Backup.json"
|
||||
Write(sBackupFilePath)
|
||||
m_bWritingBackup = False
|
||||
End Sub
|
||||
|
||||
Friend Sub WriteBackup()
|
||||
m_nModifyIndex += 1
|
||||
End Sub
|
||||
|
||||
Private Sub BackupTimer_Tick(sender As Object, e As EventArgs)
|
||||
If m_nBackupindex < m_nModifyIndex Then
|
||||
WriteBackupCmd()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshGraphicsTimer_Tick(sender As Object, e As EventArgs)
|
||||
If IsNothing(m_ExecProcessManager) Then Return
|
||||
' ciclo su coda risultati
|
||||
Dim ArgumentsResult As ProcessArgsResult = m_ExecProcessManager.ArgumentsResultDequeue
|
||||
While Not IsNothing(ArgumentsResult)
|
||||
' aggiorno risultato sulla porta
|
||||
Dim CurrRequestDoor As Door = m_DoorList.FirstOrDefault(Function(x) x.nId = ArgumentsResult.ProcessArgs.nId)
|
||||
If Not IsNothing(CurrRequestDoor) Then
|
||||
CurrRequestDoor.SetState(If(ArgumentsResult.nResult = 0, Door.DoorStates.VERIFIED, Door.DoorStates.VERIFICATION_FAILED))
|
||||
End If
|
||||
WriteBackup()
|
||||
ArgumentsResult = m_ExecProcessManager.ArgumentsResultDequeue
|
||||
End While
|
||||
If Not bExecButton_IsEnabled AndAlso m_ExecProcessManager.ExecutionThreadStatus = ExecProcessManager.ExecutionThreadStatuses.STOPPED Then
|
||||
SetExecButtonIsEnabled(True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Function GetNextDoor() As Door
|
||||
Dim NextDoor As Door = m_DoorList.FirstOrDefault(Function(x) x.nState = Door.DoorStates.READY_FOR_PRODUCTION)
|
||||
If Not IsNothing(NextDoor) Then
|
||||
NextDoor.SetState(Door.DoorStates.ON_LOAD_STATION)
|
||||
WriteBackup()
|
||||
End If
|
||||
Return NextDoor
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "OpenCSV"
|
||||
|
||||
Public ReadOnly Property OpenCSV_Command As ICommand
|
||||
Get
|
||||
If m_cmdOpenCSV Is Nothing Then
|
||||
m_cmdOpenCSV = New Command(AddressOf OpenCSV)
|
||||
End If
|
||||
Return m_cmdOpenCSV
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub OpenCSV()
|
||||
Dim sDir As String = String.Empty
|
||||
'GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
|
||||
Dim OpenFileDialog As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.DefaultExt = ".csv",
|
||||
.Filter = "CSV (*.csv)|*.csv",
|
||||
.InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True}
|
||||
If OpenFileDialog.ShowDialog() Then
|
||||
Dim sCSVPath As String = OpenFileDialog.FileName
|
||||
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(sCSVPath)
|
||||
MyReader.TextFieldType = FileIO.FieldType.Delimited
|
||||
MyReader.SetDelimiters(";")
|
||||
' leggo intestazione
|
||||
Dim Headers As String() = MyReader.ReadFields()
|
||||
Dim sDDFName As String = ""
|
||||
Dim sQuantityName As String = ""
|
||||
Dim sHeightName As String = ""
|
||||
Dim sWidthName As String = ""
|
||||
Dim sThicknessName As String = ""
|
||||
GetPluginPrivateProfileString(S_CSV, K_DDFNAME, K_DDFNAME, sDDFName)
|
||||
GetPluginPrivateProfileString(S_CSV, K_QUANTITY, "", sQuantityName)
|
||||
GetPluginPrivateProfileString(S_CSV, K_HEIGHT, "", sHeightName)
|
||||
GetPluginPrivateProfileString(S_CSV, K_WIDTH, "", sWidthName)
|
||||
GetPluginPrivateProfileString(S_CSV, K_THICKNESS, "", sThicknessName)
|
||||
Dim nDDFNameIndex As Integer = Array.IndexOf(Headers, sDDFName)
|
||||
Dim nQuantityNameIndex As Integer = Array.IndexOf(Headers, sQuantityName)
|
||||
Dim nHeightNameIndex As Integer = Array.IndexOf(Headers, sHeightName)
|
||||
Dim nWidthNameIndex As Integer = Array.IndexOf(Headers, sWidthName)
|
||||
Dim nThicknessNameIndex As Integer = Array.IndexOf(Headers, sThicknessName)
|
||||
If nDDFNameIndex = -1 Then
|
||||
Dim sMessage As String = "Error! DDFName column not found! Csv file will not be read!"
|
||||
' egtoutlog(sMessage)
|
||||
MessageBox.Show(sMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End If
|
||||
Dim Values As String()
|
||||
Dim nLineIndex As Integer = 1
|
||||
Dim sLineErrorList As String = ""
|
||||
While Not MyReader.EndOfData
|
||||
Try
|
||||
Values = MyReader.ReadFields()
|
||||
Dim nQuantity As Integer = 1
|
||||
If nQuantityNameIndex >= 0 AndAlso nQuantityNameIndex < Values.Count Then
|
||||
If Not Integer.TryParse(Values(nQuantityNameIndex), nQuantity) OrElse nQuantity < 1 Then
|
||||
nQuantity = 1
|
||||
Dim sLine As String = ""
|
||||
For nValueIndex = 0 To Values.Count - 1
|
||||
sLine &= Values(nValueIndex) & If(nValueIndex < Values.Count, ";", "")
|
||||
Next
|
||||
sLineErrorList &= "Quantity not readable in line " & sLine & ". This line will be skipped"
|
||||
Continue While
|
||||
End If
|
||||
End If
|
||||
Dim dWidth As Double = 0
|
||||
If nWidthNameIndex >= 0 AndAlso nWidthNameIndex < Values.Count Then
|
||||
If Not StringToDouble(Values(nWidthNameIndex), dWidth) OrElse dWidth < 0 Then
|
||||
dWidth = 0
|
||||
End If
|
||||
End If
|
||||
Dim dHeight As Double = 0
|
||||
If nHeightNameIndex >= 0 AndAlso nHeightNameIndex < Values.Count Then
|
||||
If Not StringToDouble(Values(nHeightNameIndex), dHeight) OrElse dHeight < 0 Then
|
||||
dHeight = 0
|
||||
End If
|
||||
End If
|
||||
Dim dThickness As Double = 0
|
||||
If nThicknessNameIndex >= 0 AndAlso nThicknessNameIndex < Values.Count Then
|
||||
If Not StringToDouble(Values(nThicknessNameIndex), dThickness) OrElse dThickness < 0 Then
|
||||
dThickness = 0
|
||||
End If
|
||||
End If
|
||||
For nQuantityIndex = 1 To nQuantity
|
||||
Dim nId As Integer = 1
|
||||
If m_DoorList.Count > 0 Then
|
||||
Dim nMaxId As Integer = m_DoorList.Max(Of Integer)(Function(x) x.nId)
|
||||
'If nMaxId < 100 Then
|
||||
nId = nMaxId + 1
|
||||
'End If
|
||||
End If
|
||||
Dim NewDoor As New Door(nId, nLineIndex, Values(nDDFNameIndex), Path.GetFileName(sCSVPath),
|
||||
1, dWidth, dHeight, dThickness, Headers, Values)
|
||||
m_DoorList.Add(NewDoor)
|
||||
Next
|
||||
nLineIndex += 1
|
||||
Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException
|
||||
Dim sMessage As String = "Line " & ex.Message & "is not valid and will be skipped."
|
||||
' egtoutlog(sMessage)
|
||||
sLineErrorList &= Environment.NewLine & ex.Message
|
||||
End Try
|
||||
End While
|
||||
If Not String.IsNullOrWhiteSpace(sLineErrorList) Then
|
||||
MessageBox.Show("The following lines are not valid and have been skipped:" & sLineErrorList, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End If
|
||||
End Using
|
||||
Dim sCamExePath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "CAMExePath", "", sCamExePath)
|
||||
Dim sMainLuaPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "MainPipeLUA", "", sMainLuaPath)
|
||||
Dim bStartExecProcessManager As Boolean = False
|
||||
If IsNothing(m_ExecProcessManager) Then
|
||||
bStartExecProcessManager = True
|
||||
m_ExecProcessManager = New ExecProcessManager(sCamExePath, """" & sMainLuaPath & """")
|
||||
'm_ExecProcessManager.SetPostProcess(AddressOf ExecProcessManager_PostProcess)
|
||||
AddHandler m_ExecProcessManager.m_AllArgsProcessed, AddressOf ExecProcessManager_AllArgsProcessed
|
||||
m_ExecProcessManager.SetMaxCamInstances(3)
|
||||
End If
|
||||
Dim sDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "DDFDir", "", sDDFDirPath)
|
||||
For Each Door In m_DoorList
|
||||
If Door.nState = Door.DoorStates.LOADED_FROM_CSV Then
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & Door.sDDFName
|
||||
m_ExecProcessManager.ArgumentsEnqueue(New ProcessArgs(Door.nId, sDDFFilePath))
|
||||
End If
|
||||
Next
|
||||
If bStartExecProcessManager OrElse m_ExecProcessManager.ExecutionThreadStatus = ExecProcessManager.ExecutionThreadStatuses.STOPPED Then
|
||||
m_ExecProcessManager.StartExecutionThread()
|
||||
SetExecButtonIsEnabled(False)
|
||||
End If
|
||||
End If
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
Public Sub ExecProcessManager_AllArgsProcessed()
|
||||
m_ExecProcessManager.StopExecutionThread()
|
||||
End Sub
|
||||
|
||||
Public Sub ExecProcessManager_PostProcess(ProcessArgsResult As ProcessArgsResult)
|
||||
' verifico file di risultati
|
||||
Dim sDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "DDFDir", "", sDDFDirPath)
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & ProcessArgsResult.ProcessArgs.sArgs
|
||||
Dim sTxtFilePath As String = Path.ChangeExtension(sDDFDirPath, ".txt")
|
||||
If Not File.Exists(sTxtFilePath) Then
|
||||
ProcessArgsResult.SetResult(-1)
|
||||
Return
|
||||
End If
|
||||
Dim TxtFileLines As String() = File.ReadAllLines(sTxtFilePath)
|
||||
For nLineIndex As Integer = 0 To TxtFileLines.Count - 1
|
||||
Dim Match As Match = Regex.Match(TxtFileLines(nLineIndex), "\s*Err\s*=\s*(\d*)\s*")
|
||||
If Not IsNothing(Match) AndAlso Not IsNothing(Match.Groups(1)) Then
|
||||
Dim sResult As String = Match.Groups(1).Value
|
||||
Dim nResult As Integer = -2
|
||||
If Integer.TryParse(sResult, nResult) Then
|
||||
ProcessArgsResult.SetResult(nResult)
|
||||
Else
|
||||
ProcessArgsResult.SetResult(-2)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' OpenCSV
|
||||
|
||||
#Region "SkipDoor"
|
||||
|
||||
Public ReadOnly Property SkipDoor_Command As ICommand
|
||||
Get
|
||||
If m_cmdSkipDoor Is Nothing Then
|
||||
m_cmdSkipDoor = New Command(AddressOf SkipDoor)
|
||||
End If
|
||||
Return m_cmdSkipDoor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub SkipDoor()
|
||||
If IsNothing(SelDoor) OrElse (SelDoor.nState <> Door.DoorStates.VERIFIED AndAlso SelDoor.nState <> Door.DoorStates.SKIPPED) Then Return
|
||||
SelDoor.SetState(If(SelDoor.nState = Door.DoorStates.VERIFIED, Door.DoorStates.SKIPPED, Door.DoorStates.VERIFIED))
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
#End Region ' SkipDoor
|
||||
|
||||
#Region "MoveUp"
|
||||
|
||||
Public ReadOnly Property MoveUp_Command As ICommand
|
||||
Get
|
||||
If m_cmdMoveUp Is Nothing Then
|
||||
m_cmdMoveUp = New Command(AddressOf MoveUp)
|
||||
End If
|
||||
Return m_cmdMoveUp
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub MoveUp()
|
||||
If IsNothing(SelDoor) Then Return
|
||||
Dim nOldIndex As Integer = m_DoorList.IndexOf(SelDoor)
|
||||
If nOldIndex = 0 Then Return
|
||||
If m_DoorList(nOldIndex - 1).nState >= Door.DoorStates.READY_FOR_PRODUCTION Then Return
|
||||
m_DoorList.Move(nOldIndex, nOldIndex - 1)
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
#End Region ' MoveUp
|
||||
|
||||
#Region "MoveDown"
|
||||
|
||||
Public ReadOnly Property MoveDown_Command As ICommand
|
||||
Get
|
||||
If m_cmdMoveDown Is Nothing Then
|
||||
m_cmdMoveDown = New Command(AddressOf MoveDown)
|
||||
End If
|
||||
Return m_cmdMoveDown
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub MoveDown()
|
||||
If IsNothing(SelDoor) OrElse SelDoor.nState >= Door.DoorStates.READY_FOR_PRODUCTION Then Return
|
||||
Dim nOldIndex As Integer = m_DoorList.IndexOf(SelDoor)
|
||||
If nOldIndex = m_DoorList.Count - 1 Then Return
|
||||
m_DoorList.Move(nOldIndex, nOldIndex + 1)
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
#End Region ' MoveDown
|
||||
|
||||
#Region "Delete"
|
||||
|
||||
Public ReadOnly Property Delete_Command As ICommand
|
||||
Get
|
||||
If m_cmdDelete Is Nothing Then
|
||||
m_cmdDelete = New Command(AddressOf Delete)
|
||||
End If
|
||||
Return m_cmdDelete
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Delete()
|
||||
If IsNothing(SelDoor) OrElse SelDoor.nState >= Door.DoorStates.READY_FOR_PRODUCTION Then Return
|
||||
If MessageBox.Show("Are you sure you want to delete the selected door?", "Info", MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then
|
||||
m_DoorList.Remove(SelDoor)
|
||||
WriteBackup()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Delete
|
||||
|
||||
#Region "DeleteAll"
|
||||
|
||||
Public ReadOnly Property DeleteAll_Command As ICommand
|
||||
Get
|
||||
If m_cmdDeleteAll Is Nothing Then
|
||||
m_cmdDeleteAll = New Command(AddressOf DeleteAll)
|
||||
End If
|
||||
Return m_cmdDeleteAll
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub DeleteAll()
|
||||
If m_DoorList.Count = 0 Then Return
|
||||
If MessageBox.Show("Are you sure you want to delete all the doors?", "Info", MessageBoxButton.YesNo, MessageBoxImage.Information) = MessageBoxResult.Yes Then
|
||||
For nDoorIndex = m_DoorList.Count - 1 To 0 Step -1
|
||||
Dim Door As Door = m_DoorList(nDoorIndex)
|
||||
If Door.nState >= Door.DoorStates.READY_FOR_PRODUCTION Then Continue For
|
||||
m_DoorList.Remove(Door)
|
||||
Next
|
||||
WriteBackup()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteAll
|
||||
|
||||
#Region "Produce"
|
||||
|
||||
Public ReadOnly Property Produce_Command As ICommand
|
||||
Get
|
||||
If m_cmdProduce Is Nothing Then
|
||||
m_cmdProduce = New Command(AddressOf Produce)
|
||||
End If
|
||||
Return m_cmdProduce
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Produce()
|
||||
If IsNothing(SelDoor) OrElse SelDoor.nState = Door.DoorStates.SKIPPED OrElse
|
||||
SelDoor.nState = Door.DoorStates.VERIFICATION_FAILED OrElse
|
||||
SelDoor.nState >= Door.DoorStates.READY_FOR_PRODUCTION Then Return
|
||||
' la sposto dopo l'ultima da produrre
|
||||
Dim nNewIndex As Integer = m_DoorList.IndexOf(m_DoorList.FirstOrDefault(Function(x) x.nState < Door.DoorStates.READY_FOR_PRODUCTION))
|
||||
Dim nOldIndex As Integer = m_DoorList.IndexOf(SelDoor)
|
||||
Dim SelectedDoor As Door = m_SelDoor
|
||||
m_DoorList.Move(nOldIndex, nNewIndex)
|
||||
SelectedDoor.SetState(Door.DoorStates.READY_FOR_PRODUCTION)
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
#End Region ' Produce
|
||||
|
||||
#Region "ProduceAll"
|
||||
|
||||
Public ReadOnly Property ProduceAll_Command As ICommand
|
||||
Get
|
||||
If m_cmdProduceAll Is Nothing Then
|
||||
m_cmdProduceAll = New Command(AddressOf ProduceAll)
|
||||
End If
|
||||
Return m_cmdProduceAll
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ProduceAll()
|
||||
If IsNothing(SelDoor) Then Return
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
#End Region ' ProduceAll
|
||||
|
||||
#Region "ResetProductionQueue"
|
||||
|
||||
Public ReadOnly Property ResetProductionQueue_Command As ICommand
|
||||
Get
|
||||
If m_cmdResetProductionQueue Is Nothing Then
|
||||
m_cmdResetProductionQueue = New Command(AddressOf ResetProductionQueue)
|
||||
End If
|
||||
Return m_cmdResetProductionQueue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub ResetProductionQueue()
|
||||
For Each Door In m_DoorList
|
||||
If Door.nState = Door.DoorStates.READY_FOR_PRODUCTION Then
|
||||
Door.SetState(Door.DoorStates.VERIFIED)
|
||||
End If
|
||||
Next
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
#End Region ' ResetProductionQueue
|
||||
|
||||
#Region "Verify"
|
||||
|
||||
Public ReadOnly Property Verify_Command As ICommand
|
||||
Get
|
||||
If m_cmdVerify Is Nothing Then
|
||||
m_cmdVerify = New Command(AddressOf Verify)
|
||||
End If
|
||||
Return m_cmdVerify
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Verify()
|
||||
Dim sCamExePath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "CAMExePath", "", sCamExePath)
|
||||
Dim sMainLuaPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "MainPipeLUA", "", sMainLuaPath)
|
||||
Dim bStartExecProcessManager As Boolean = False
|
||||
If IsNothing(m_ExecProcessManager) Then
|
||||
bStartExecProcessManager = True
|
||||
m_ExecProcessManager = New ExecProcessManager(sCamExePath, """" & sMainLuaPath & """")
|
||||
'm_ExecProcessManager.SetPostProcess(AddressOf ExecProcessManager_PostProcess)
|
||||
AddHandler m_ExecProcessManager.m_AllArgsProcessed, AddressOf ExecProcessManager_AllArgsProcessed
|
||||
m_ExecProcessManager.SetMaxCamInstances(3)
|
||||
End If
|
||||
Dim sDDFDirPath As String = ""
|
||||
GetPluginPrivateProfileString(S_GENERAL, "DDFDir", "", sDDFDirPath)
|
||||
For Each Door In m_DoorList
|
||||
If Door.nState = Door.DoorStates.LOADED_FROM_CSV Or Door.nState = Door.DoorStates.VERIFICATION_FAILED Then
|
||||
Dim sDDFFilePath As String = sDDFDirPath & "\" & Door.sDDFName
|
||||
m_ExecProcessManager.ArgumentsEnqueue(New ProcessArgs(Door.nId, sDDFFilePath))
|
||||
End If
|
||||
Next
|
||||
If bStartExecProcessManager OrElse m_ExecProcessManager.ExecutionThreadStatus = ExecProcessManager.ExecutionThreadStatuses.STOPPED Then
|
||||
m_ExecProcessManager.StartExecutionThread()
|
||||
SetExecButtonIsEnabled(False)
|
||||
End If
|
||||
WriteBackup()
|
||||
End Sub
|
||||
|
||||
#End Region ' Verify
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
End Class
|
||||
|
||||
Public Class Door
|
||||
Inherits VMBase
|
||||
|
||||
Public Enum DoorStates As Integer
|
||||
NULL = 0
|
||||
LOADED_FROM_CSV = 1
|
||||
VERIFIED = 10
|
||||
VERIFICATION_FAILED = 11
|
||||
SKIPPED = 20
|
||||
READY_FOR_PRODUCTION = 30
|
||||
ON_LOAD_STATION = 31
|
||||
MACHINE_1_START = 33
|
||||
MACHINE_1_END = 34
|
||||
MACHINE_2_START = 35
|
||||
MACHINE_2_END = 35
|
||||
PRODUCED = 36
|
||||
SCRAP = 40
|
||||
End Enum
|
||||
|
||||
Public Enum DoorProdStates As Integer
|
||||
NOT_INIT = 0
|
||||
IMPORTED = 1
|
||||
SENT_1 = 2
|
||||
START_MACHINING_1 = 3
|
||||
MACHINED_1 = 4
|
||||
SENT_2 = 5
|
||||
START_MACHINING_2 = 6
|
||||
MACHINED_2 = 7
|
||||
UNLOADED = 8
|
||||
End Enum
|
||||
|
||||
Private m_nId As Integer
|
||||
Public ReadOnly Property nId As Integer
|
||||
Get
|
||||
Return m_nId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nCSVLine As Integer
|
||||
Public ReadOnly Property nCSVLine As Integer
|
||||
Get
|
||||
Return m_nCSVLine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sDDFName As String
|
||||
Public ReadOnly Property sDDFName As String
|
||||
Get
|
||||
Return m_sDDFName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nQuantity As Integer
|
||||
Public ReadOnly Property nQuantity As Integer
|
||||
Get
|
||||
Return m_nQuantity
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dWidth As Double
|
||||
Public ReadOnly Property dWidth As Double
|
||||
Get
|
||||
Return m_dWidth
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dHeight As Double
|
||||
Public ReadOnly Property dHeight As Double
|
||||
Get
|
||||
Return m_dHeight
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_dThickness As Double
|
||||
Public ReadOnly Property dThickness As Double
|
||||
Get
|
||||
Return m_dThickness
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sCSVName As String
|
||||
Public ReadOnly Property sCSVName As String
|
||||
Get
|
||||
Return m_sCSVName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_CustomerParameters As New List(Of CustomerParameter)
|
||||
Public ReadOnly Property CustomerParameters As List(Of CustomerParameter)
|
||||
Get
|
||||
Return m_CustomerParameters
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_nState As DoorStates = DoorStates.LOADED_FROM_CSV
|
||||
Public ReadOnly Property nState As DoorStates
|
||||
Get
|
||||
Return m_nState
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetState(value As DoorStates, Optional bUpdate As Boolean = True)
|
||||
m_nState = value
|
||||
If bUpdate Then NotifyPropertyChanged(NameOf(nState))
|
||||
End Sub
|
||||
|
||||
#Region "Statistics"
|
||||
|
||||
Private m_nProdState As DoorProdStates = DoorProdStates.NOT_INIT
|
||||
Public ReadOnly Property nProdState As DoorProdStates
|
||||
Get
|
||||
Return m_nProdState
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetProdState(value As DoorProdStates)
|
||||
m_nProdState = value
|
||||
Select Case value
|
||||
Case DoorProdStates.START_MACHINING_1
|
||||
SetState(DoorStates.MACHINE_1_START)
|
||||
Case DoorProdStates.MACHINED_1
|
||||
SetState(DoorStates.MACHINE_1_END)
|
||||
Case DoorProdStates.START_MACHINING_2
|
||||
SetState(DoorStates.MACHINE_2_START)
|
||||
Case DoorProdStates.MACHINED_2
|
||||
SetState(DoorStates.MACHINE_2_END)
|
||||
Case DoorProdStates.UNLOADED
|
||||
SetState(DoorStates.PRODUCED)
|
||||
End Select
|
||||
NotifyPropertyChanged(NameOf(nProdState))
|
||||
End Sub
|
||||
|
||||
Private m_dtLoadTime As DateTime = DateTime.MinValue
|
||||
Friend ReadOnly Property dtLoadTime As DateTime
|
||||
Get
|
||||
Return m_dtLoadTime
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property sLoadTime As String
|
||||
Get
|
||||
Return If(m_dtLoadTime <> DateTime.MinValue, m_dtLoadTime.ToString("yy/MM/dd hh:mm:ss"), "")
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetLoadTime(LoadTime As Long)
|
||||
m_dtLoadTime = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(LoadTime).ToLocalTime()
|
||||
NotifyPropertyChanged(NameOf(sLoadTime))
|
||||
End Sub
|
||||
|
||||
Private m_dtMachining1Start As DateTime = DateTime.MinValue
|
||||
Friend ReadOnly Property dtMachining1Start As DateTime
|
||||
Get
|
||||
Return m_dtMachining1Start
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property sMachining1Start As String
|
||||
Get
|
||||
Return If(m_dtMachining1Start <> DateTime.MinValue, m_dtMachining1Start.ToString("yy/MM/dd hh:mm:ss"), "")
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetMachining1Start(Machining1Start As Long)
|
||||
m_dtMachining1Start = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(Machining1Start).ToLocalTime()
|
||||
NotifyPropertyChanged(NameOf(sMachining1Start))
|
||||
End Sub
|
||||
|
||||
Private m_dtMachining1End As DateTime = DateTime.MinValue
|
||||
Friend ReadOnly Property dtMachining1End As DateTime
|
||||
Get
|
||||
Return m_dtMachining1End
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property sMachining1End As String
|
||||
Get
|
||||
Return If(m_dtMachining1End <> DateTime.MinValue, m_dtMachining1End.ToString("yy/MM/dd hh:mm:ss"), "")
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetMachining1End(Machining1End As Long)
|
||||
m_dtMachining1End = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(Machining1End).ToLocalTime()
|
||||
NotifyPropertyChanged(NameOf(sMachining1End))
|
||||
End Sub
|
||||
|
||||
Private m_dtMachining2Start As DateTime = DateTime.MinValue
|
||||
Friend ReadOnly Property dtMachining2Start As DateTime
|
||||
Get
|
||||
Return m_dtMachining2Start
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property sMachining2Start As String
|
||||
Get
|
||||
Return If(m_dtMachining2Start <> DateTime.MinValue, m_dtMachining2Start.ToString("yy/MM/dd hh:mm:ss"), "")
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetMachining2Start(Machining2Start As Long)
|
||||
m_dtMachining2Start = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(Machining2Start).ToLocalTime()
|
||||
NotifyPropertyChanged(NameOf(sMachining2Start))
|
||||
End Sub
|
||||
|
||||
Private m_dtMachining2End As DateTime = DateTime.MinValue
|
||||
Friend ReadOnly Property dtMachining2End As DateTime
|
||||
Get
|
||||
Return m_dtMachining2End
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property sMachining2End As String
|
||||
Get
|
||||
Return If(m_dtMachining2End <> DateTime.MinValue, m_dtMachining2End.ToString("yy/MM/dd hh:mm:ss"), "")
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetMachining2End(Machining2End As Long)
|
||||
m_dtMachining2End = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(Machining2End).ToLocalTime()
|
||||
NotifyPropertyChanged(NameOf(sMachining2End))
|
||||
End Sub
|
||||
|
||||
Private m_dtUnloadTime As DateTime = DateTime.MinValue
|
||||
Friend ReadOnly Property dtUnloadTime As DateTime
|
||||
Get
|
||||
Return m_dtUnloadTime
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property sUnloadTime As String
|
||||
Get
|
||||
Return If(m_dtUnloadTime <> DateTime.MinValue, m_dtUnloadTime.ToString("yy/MM/dd hh:mm:ss"), "")
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetUnloadTime(UnloadTime As Long)
|
||||
m_dtUnloadTime = New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(UnloadTime).ToLocalTime()
|
||||
NotifyPropertyChanged(NameOf(sUnloadTime))
|
||||
End Sub
|
||||
|
||||
#End Region ' Statistics
|
||||
|
||||
Sub New(nId As Integer, nCSVLine As Integer, sDDFName As String, sCSVName As String, nQuantity As Integer, dWidth As Double, dHeight As Double, dThickness As Double, HeaderList As String(), ValueList As String())
|
||||
m_nId = nId
|
||||
m_nCSVLine = nCSVLine
|
||||
m_sDDFName = sDDFName
|
||||
m_sCSVName = sCSVName
|
||||
m_nQuantity = nQuantity
|
||||
m_dHeight = dHeight
|
||||
m_dWidth = dWidth
|
||||
m_dThickness = dThickness
|
||||
If Not IsNothing(HeaderList) AndAlso HeaderList.Count > 0 AndAlso Not IsNothing(ValueList) AndAlso ValueList.Count > 0 Then
|
||||
For nParamIndex = 0 To Math.Max(HeaderList.Count, ValueList.Count) - 1
|
||||
m_CustomerParameters.Add(New CustomerParameter(If(HeaderList.Count > nParamIndex, HeaderList(nParamIndex), ""), If(ValueList.Count > nParamIndex, ValueList(nParamIndex), "")))
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub New(JsonDoor As JsonDoor)
|
||||
m_nId = JsonDoor.nId
|
||||
m_nCSVLine = JsonDoor.nCSVLine
|
||||
m_sDDFName = JsonDoor.sDDFName
|
||||
m_sCSVName = JsonDoor.sCSVName
|
||||
m_nQuantity = JsonDoor.nQuantity
|
||||
m_dHeight = JsonDoor.dHeight
|
||||
m_dWidth = JsonDoor.dWidth
|
||||
m_dThickness = JsonDoor.dThickness
|
||||
m_nState = JsonDoor.nState
|
||||
m_CustomerParameters = JsonDoor.CustomerParameters
|
||||
m_nProdState = JsonDoor.nProdState
|
||||
m_dtLoadTime = JsonDoor.dtLoadTime
|
||||
m_dtMachining1Start = JsonDoor.dtMachining1Start
|
||||
m_dtMachining1End = JsonDoor.dtMachining1End
|
||||
m_dtMachining2Start = JsonDoor.dtMachining2Start
|
||||
m_dtMachining2End = JsonDoor.dtMachining2End
|
||||
m_dtUnloadTime = JsonDoor.dtUnloadTime
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class CustomerParameter
|
||||
|
||||
Private m_sHeader As String
|
||||
Public ReadOnly Property sHeader As String
|
||||
Get
|
||||
Return m_sHeader
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_sValue As String
|
||||
Public ReadOnly Property sValue As String
|
||||
Get
|
||||
Return m_sValue
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(sHeader As String, sValue As String)
|
||||
m_sHeader = sHeader
|
||||
m_sValue = sValue
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,52 +0,0 @@
|
||||
<Window x:Class="ProcessManagerV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Height="200"
|
||||
Width="300">
|
||||
<StackPanel>
|
||||
<Grid HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Arguments Queue Count: "/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding ArgumentsQueue}"/>
|
||||
<TextBlock Grid.Row="1"
|
||||
Text="ResultQueue: "/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
Text="{Binding ResultQueueCount}"/>
|
||||
</Grid>
|
||||
<!--<DataGrid ItemsSource="{Binding ThreadList}"
|
||||
AutoGenerateColumns="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Process Status"
|
||||
Binding="{Binding ProcessStatus}"/>
|
||||
<DataGridTextColumn Header="Curr Request Id"
|
||||
Binding="{Binding CurrRequest.nId}"/>
|
||||
<DataGridTextColumn Header="Curr Request Args"
|
||||
Binding="{Binding CurrRequest.sArgs}"/>
|
||||
<DataGridTextColumn Header="Process Result"
|
||||
Binding="{Binding nProcResult}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>-->
|
||||
<ItemsControl ItemsSource="{Binding ThreadList}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding ProcessStatus}"/>
|
||||
<TextBlock Text="{Binding CurrRequest.nId}"/>
|
||||
<TextBlock Text="{Binding CurrRequest.sArgs}"/>
|
||||
<TextBlock Text="{Binding nProcResult}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</StackPanel>
|
||||
</Window>
|
||||
@@ -1,155 +0,0 @@
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||
<RootNamespace>Supervisor.Plugin.FiveLakes</RootNamespace>
|
||||
<AssemblyName>Supervisor.Plugin.FiveLakes</AssemblyName>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<MyType>Custom</MyType>
|
||||
<Deterministic>true</Deterministic>
|
||||
<ProjectGuid>{7C77F537-8235-40AB-B24A-4E71CFB96D2C}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>true</IncrementalBuild>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Supervisor.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<IncrementalBuild>false</IncrementalBuild>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>Supervisor.Plugin.FiveLakes.xml</DocumentationFile>
|
||||
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtWPFLib48">
|
||||
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib48.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Supervisor.Plugin.Interface">
|
||||
<HintPath>..\..\Supervisor\Supervisor.Plugin.Interface\bin\Debug\Supervisor.Plugin.Interface.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows" />
|
||||
<Import Include="System.Windows.Controls" />
|
||||
<Import Include="System.Windows.Data" />
|
||||
<Import Include="System.Windows.Documents" />
|
||||
<Import Include="System.Windows.Input" />
|
||||
<Import Include="System.Windows.Shapes" />
|
||||
<Import Include="System.Windows.Media" />
|
||||
<Import Include="System.Windows.Media.Imaging" />
|
||||
<Import Include="System.Windows.Navigation" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DoorList\DoorListV.xaml.vb">
|
||||
<DependentUpon>DoorListV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DoorList\DoorListVM.vb" />
|
||||
<Compile Include="FiveLakesUI.xaml.vb">
|
||||
<DependentUpon>FiveLakesUI.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FiveLakesUIVM.vb" />
|
||||
<Compile Include="MainMenu\MainMenuV.xaml.vb">
|
||||
<DependentUpon>MainMenuV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainMenu\MainMenuVM.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Command.vb" />
|
||||
<Compile Include="Utility\Dictionary.xaml.vb" />
|
||||
<Compile Include="Utility\VMBase.vb" />
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="DoorList\DoorListV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="FiveLakesUI.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MainMenu\MainMenuV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Utility\Dictionary.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\pre-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>copy $(TargetPath) c:\EgtData\Supervisor\Plugin\Supervisor.Plugin.FiveLakes\Supervisor.Plugin.FiveLakes.dll
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,105 +0,0 @@
|
||||
<ResourceDictionary x:Class="Dictionary"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Supervisor.Plugin.FiveLakes"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
>
|
||||
|
||||
<!--
|
||||
Assign a Key to every Panel ViewModel to use
|
||||
it in xaml file(ProjectView.xaml).
|
||||
-->
|
||||
<local:FiveLakesUIVM x:Key="FiveLakesUIVM"/>
|
||||
<local:MainMenuVM x:Key="MainMenuVM"/>
|
||||
<local:DoorListPageVM x:Key="DoorListVM"/>
|
||||
<local:MachinePageVM x:Key="MachinePageVM"/>
|
||||
<local:StatisticsPageVM x:Key="StatisticsPageVM"/>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF4D84C4" />
|
||||
<SolidColorBrush x:Key="EgaltechBlue2" Color="#FF7096CE" />
|
||||
<SolidColorBrush x:Key="EgaltechBlue3" Color="#FF90ABD9" />
|
||||
<SolidColorBrush x:Key="EgaltechBlue4" Color="#FFB2C3E4" />
|
||||
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="EgaltechGray" Color="#FF585858" />
|
||||
<SolidColorBrush x:Key="EgaltechLightGray" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="EgaltechUltralightGray" Color="#FFF2F2F2" />
|
||||
<SolidColorBrush x:Key="EgaltechGreen" Color="#FF00FF00" />
|
||||
|
||||
<SolidColorBrush x:Key="Roller" Color="#FF585858" />
|
||||
<SolidColorBrush x:Key="TableFrame" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="Structure" Color="#61b0ff" />
|
||||
<SolidColorBrush x:Key="Bridge" Color="LightBlue" />
|
||||
<SolidColorBrush x:Key="Shuttle" Color="DarkGray" />
|
||||
|
||||
<!--#92908d-->
|
||||
<Color x:Key="Icarus_Gray_Color" R="146" G="144" B="141" A="255"/>
|
||||
<SolidColorBrush x:Key="Icarus_Gray" Color="{StaticResource Icarus_Gray_Color}" />
|
||||
<!--#3c89c9-->
|
||||
<Color x:Key="Icarus_LightBlue_Color" R="60" G="137" B="201" A="255"/>
|
||||
<SolidColorBrush x:Key="Icarus_LightBlue" Color="{StaticResource Icarus_LightBlue_Color}" />
|
||||
<!--#2e5a81-->
|
||||
<Color x:Key="Icarus_Blue_Color" R="46" G="90" B="129" A="255"/>
|
||||
<SolidColorBrush x:Key="Icarus_Blue" Color="{StaticResource Icarus_Blue_Color}" />
|
||||
<!--#50A388-->
|
||||
<Color x:Key="Icarus_Green_Color" R="80" G="163" B="136" A="255"/>
|
||||
<SolidColorBrush x:Key="Icarus_Green" Color="{StaticResource Icarus_Green_Color}" />
|
||||
<!--#BC373E-->
|
||||
<Color x:Key="Icarus_Orange_Color" R="188" G="55" B="62" A="255"/>
|
||||
<SolidColorBrush x:Key="Icarus_Orange" Color="{StaticResource Icarus_Orange_Color}" />
|
||||
<!--#A74C77-->
|
||||
<Color x:Key="Icarus_Purple_Color" R="167" G="76" B="119" A="255"/>
|
||||
<SolidColorBrush x:Key="Icarus_Purple" Color="{StaticResource Icarus_Purple_Color}" />
|
||||
|
||||
<!--Colori per EgtWPFLib5-->
|
||||
<SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3"/>
|
||||
|
||||
<!--Risorsa che toglie le animazioni dai menù popup per evitare che i menù mru di scelta dei file rimangano aperti se il file è grosso -->
|
||||
<!--o viene eseguito un lua che non aggiorna l'interfaccia-->
|
||||
<PopupAnimation x:Key="{x:Static SystemParameters.MenuPopupAnimationKey}">None</PopupAnimation>
|
||||
|
||||
<!--convertert per visibilita' stringa di testo con misure in StatusBar--><!--
|
||||
<PrintApp:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>-->
|
||||
|
||||
<GridLength x:Key="TitleBarHeight">30</GridLength>
|
||||
<Thickness x:Key="WindowBorder_Thickness">2</Thickness>
|
||||
<sys:Double x:Key="WindowBorder_Height">2</sys:Double>
|
||||
|
||||
<!--Stili per disegno macchina con porte-->
|
||||
|
||||
<Style x:Key="Table" TargetType="Border">
|
||||
<Setter Property="BorderBrush" Value="Gray"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
</Style>
|
||||
<Style x:Key="Door" TargetType="Border">
|
||||
<Setter Property="BorderBrush" Value="SaddleBrown"/>
|
||||
<Setter Property="BorderThickness" Value="5"/>
|
||||
<Setter Property="Background" Value="SandyBrown"/>
|
||||
</Style>
|
||||
<Style x:Key="Advancement_Button" TargetType="Button">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="Sensor" TargetType="Ellipse">
|
||||
<Setter Property="Height" Value="{Binding ActualWidth, RelativeSource={RelativeSource Self}}"/>
|
||||
</Style>
|
||||
<Style x:Key="MachDrawVar_TextBlock" TargetType="TextBlock">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
<Style x:Key="MachDrawVar_CheckBox" TargetType="CheckBox">
|
||||
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<!--Border-->
|
||||
|
||||
<Style x:Key="Parameter_MachinePage_Border" TargetType="{x:Type GroupBox}">
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="DarkGray"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -1,108 +0,0 @@
|
||||
Imports System.ComponentModel.Composition
|
||||
Imports System.Globalization
|
||||
Imports Supervisor.Plugin.Interface
|
||||
|
||||
<Export(GetType(IPluginControl))>
|
||||
<ExportMetadata("Name", "Dictionary")>
|
||||
Public Class Dictionary
|
||||
Inherits ResourceDictionary
|
||||
Implements IPluginControl
|
||||
|
||||
Public Shared ReadOnly MySceneHostVM As String = "MySceneHostVM"
|
||||
|
||||
#Region "Colors"
|
||||
|
||||
'Private m_Omag_Red As SolidColorBrush = Brushes.Red
|
||||
'Public ReadOnly Property Omag_Red As SolidColorBrush
|
||||
' Get
|
||||
' Return m_Omag_Red
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Private Shared m_Button_Static_Background As SolidColorBrush = New BrushConverter().ConvertFrom("#FFDDDDDD")
|
||||
'Public Shared ReadOnly Property Button_Static_Background As SolidColorBrush
|
||||
' Get
|
||||
' Return m_Button_Static_Background
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Private Shared m_TabControl_Header_Background As LinearGradientBrush = Application.Current.FindResource("TabItem.Static.Background")
|
||||
'Public Shared ReadOnly Property TabControl_Header_Background As LinearGradientBrush
|
||||
' Get
|
||||
' Return m_TabControl_Header_Background
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
|
||||
'Private Shared m_Icarus_Gray As SolidColorBrush = Application.Current.FindResource("Icarus_Gray")
|
||||
'Public Shared ReadOnly Property Icarus_Gray As SolidColorBrush
|
||||
' Get
|
||||
' Return m_Icarus_Gray
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Private Shared m_Icarus_LightBlue As SolidColorBrush = Application.Current.FindResource("Icarus_LightBlue")
|
||||
'Public Shared ReadOnly Property Icarus_LightBlue As SolidColorBrush
|
||||
' Get
|
||||
' Return m_Icarus_LightBlue
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Private Shared m_Icarus_Blue As SolidColorBrush = Application.Current.FindResource("Icarus_Blue")
|
||||
'Public Shared ReadOnly Property Icarus_Blue As SolidColorBrush
|
||||
' Get
|
||||
' Return m_Icarus_Blue
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Private Shared m_Icarus_Green As SolidColorBrush = Application.Current.FindResource("Icarus_Green")
|
||||
'Public Shared ReadOnly Property Icarus_Green As SolidColorBrush
|
||||
' Get
|
||||
' Return m_Icarus_Green
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Private Shared m_Icarus_Orange As SolidColorBrush = Application.Current.FindResource("Icarus_Orange")
|
||||
'Public Shared ReadOnly Property Icarus_Orange As SolidColorBrush
|
||||
' Get
|
||||
' Return m_Icarus_Orange
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Private Shared m_Icarus_Purple As SolidColorBrush = Application.Current.FindResource("Icarus_Purple")
|
||||
'Public Shared ReadOnly Property Icarus_Purple As SolidColorBrush
|
||||
' Get
|
||||
' Return m_Icarus_Purple
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'<SolidColorBrush x : Key="Icarus_Gray" Color="#92908d" />
|
||||
'<SolidColorBrush x : Key="Icarus_LightBlue" Color="#3c89c9" />
|
||||
'<SolidColorBrush x : Key="Icarus_Blue" Color="#2e5a81" />
|
||||
'<SolidColorBrush x : Key="Icarus_Green" Color="#40826d" />
|
||||
'<SolidColorBrush x : Key="Icarus_Orange" Color="#C37636" />
|
||||
'<SolidColorBrush x : Key="Icarus_Purple" Color="#990066" />
|
||||
|
||||
#End Region ' Colors
|
||||
|
||||
End Class
|
||||
|
||||
Public Class CenterToolTipConverter
|
||||
Implements IMultiValueConverter
|
||||
|
||||
Public Function Convert(ByVal values As Object(), ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
|
||||
For Each value In values
|
||||
If TypeOf (value) IsNot Double Then
|
||||
Return Double.NaN
|
||||
End If
|
||||
Next
|
||||
Dim dPlacementTarget As Double = CDbl(values(0))
|
||||
Dim dToolTip As Double = CDbl(values(1))
|
||||
Return (dPlacementTarget / 2.0) - (dToolTip / 2.0)
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(ByVal value As Object, ByVal targetTypes As Type(), ByVal parameter As Object, ByVal culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
|
||||
Throw New NotSupportedException()
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="KeraLua" version="1.4.1" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -1,3 +0,0 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
|
||||
Copy-Item -Path c:\EgtProg\Supervisor\Supervisor*.exe $ProjectDir\..\Exe
|
||||