整理PLC DB块对应关系,整理IO列表中层级配置
This commit is contained in:
@@ -59,26 +59,35 @@ namespace MECF.Framework.Common.IOCore
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new NotifiableIoItem
|
||||
try
|
||||
{
|
||||
Address = Address,
|
||||
BlockIndex = BlockIndex,
|
||||
BlockOffset = BlockOffset,
|
||||
BoolValue = BoolValue,
|
||||
Description = Description,
|
||||
Display_En = Display_En,
|
||||
Display_Zh = Display_Zh,
|
||||
AltName = AltName,
|
||||
HoldValue = HoldValue,
|
||||
Index = Index,
|
||||
Name = Name,
|
||||
Provider = Provider,
|
||||
ShortValue = ShortValue,
|
||||
FloatValue = FloatValue,
|
||||
IntValue = IntValue,
|
||||
StringValue = StringValue,
|
||||
Visible = Visible
|
||||
};
|
||||
return new NotifiableIoItem
|
||||
{
|
||||
Address = Address,
|
||||
BlockIndex = BlockIndex,
|
||||
BlockOffset = BlockOffset,
|
||||
BoolValue = BoolValue,
|
||||
Description = Description,
|
||||
Display_En = Display_En,
|
||||
Display_Zh = Display_Zh,
|
||||
AltName = AltName,
|
||||
HoldValue = HoldValue,
|
||||
Index = Index,
|
||||
Name = Name,
|
||||
Provider = Provider,
|
||||
ShortValue = ShortValue,
|
||||
FloatValue = FloatValue,
|
||||
IntValue = IntValue,
|
||||
StringValue = StringValue,
|
||||
Visible = Visible
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,73 +1,75 @@
|
||||
<UserControl x:Class="MECF.Framework.UI.Client.Ctrlib.Controls.ModuleStatusIndicator"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:MECF.Framework.UI.Client.Ctrlib.Controls"
|
||||
xmlns:converters="clr-namespace:MECF.Framework.UI.Core.Converters;assembly=MECF.Framework.UI.Core"
|
||||
xmlns:lex="http://wpflocalizeextension.codeplex.com"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="50" d:DesignWidth="800"
|
||||
lex:LocalizeDictionary.DesignCulture="en"
|
||||
lex:ResxLocalizationProvider.DefaultAssembly="Sicentury.Localization"
|
||||
lex:ResxLocalizationProvider.DefaultDictionary="lang_terms"
|
||||
SnapsToDevicePixels="True">
|
||||
<UserControl
|
||||
x:Class="MECF.Framework.UI.Client.Ctrlib.Controls.ModuleStatusIndicator"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:MECF.Framework.UI.Core.Converters;assembly=MECF.Framework.UI.Core"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:lex="http://wpflocalizeextension.codeplex.com"
|
||||
xmlns:local="clr-namespace:MECF.Framework.UI.Client.Ctrlib.Controls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="50"
|
||||
d:DesignWidth="800"
|
||||
lex:LocalizeDictionary.DesignCulture="en"
|
||||
lex:ResxLocalizationProvider.DefaultAssembly="Sicentury.Localization"
|
||||
lex:ResxLocalizationProvider.DefaultDictionary="lang_terms"
|
||||
SnapsToDevicePixels="True"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<converters:BoolReverseConverter x:Key="BoolReverseConverter"/>
|
||||
<converters:BoolVisibilityConverter x:Key="BoolVisibilityConverter"/>
|
||||
<local:ModuleIsOnlineToBgColorConverter x:Key="IsOnlineToBdrColor"/>
|
||||
<local:ModuleStatusToBackgroundColorConverter x:Key="StatusToBgColor"/>
|
||||
<converters:BoolReverseConverter x:Key="BoolReverseConverter" />
|
||||
<converters:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
|
||||
<local:ModuleIsOnlineToBgColorConverter x:Key="IsOnlineToBdrColor" />
|
||||
<local:ModuleStatusToBackgroundColorConverter x:Key="StatusToBgColor" />
|
||||
</UserControl.Resources>
|
||||
<DockPanel LastChildFill="True" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}, Mode=OneTime}">
|
||||
<DockPanel DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl}, Mode=OneTime}" LastChildFill="True">
|
||||
<Label
|
||||
DockPanel.Dock="Left"
|
||||
Width="{Binding CaptionWidth}"
|
||||
HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Width="{Binding CaptionWidth}"
|
||||
d:BorderBrush="{SolidColorBrush LawnGreen}"
|
||||
d:Content="Caption"
|
||||
BorderBrush="{Binding IsOnline, Converter={StaticResource IsOnlineToBdrColor}}"
|
||||
Content="{Binding Caption}"
|
||||
ToolTip="{Binding ModuleDescription}"
|
||||
Style="{StaticResource TopLable_LeftTop}"
|
||||
HorizontalAlignment="Left"
|
||||
d:Content="Caption"
|
||||
d:BorderBrush="{SolidColorBrush LawnGreen}">
|
||||
DockPanel.Dock="Left"
|
||||
Style="{StaticResource TopLable_LeftTop}"
|
||||
ToolTip="{Binding ModuleDescription}">
|
||||
<Label.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem
|
||||
x:Name="CmSetOnline"
|
||||
Header="{Binding RelativeSource={RelativeSource AncestorType=ContextMenu}, Path=PlacementTarget.Content}"
|
||||
<MenuItem
|
||||
x:Name="CmSetOnline"
|
||||
Click="CmSetOnline_OnClick"
|
||||
Header="{Binding RelativeSource={RelativeSource AncestorType=ContextMenu}, Path=PlacementTarget.Content}"
|
||||
HeaderStringFormat="Set {0} Online"
|
||||
IsEnabled="{Binding IsOnline, Converter={StaticResource BoolReverseConverter}}"
|
||||
Click="CmSetOnline_OnClick"/>
|
||||
<MenuItem
|
||||
x:Name="CmSetOffline"
|
||||
Header="{Binding RelativeSource={RelativeSource AncestorType=ContextMenu}, Path=PlacementTarget.Content}"
|
||||
IsEnabled="{Binding IsOnline, Converter={StaticResource BoolReverseConverter}}" />
|
||||
<MenuItem
|
||||
x:Name="CmSetOffline"
|
||||
Click="CmSetOffline_OnClick"
|
||||
Header="{Binding RelativeSource={RelativeSource AncestorType=ContextMenu}, Path=PlacementTarget.Content}"
|
||||
HeaderStringFormat="Set {0} Offline"
|
||||
IsEnabled="{Binding IsOnline}"
|
||||
Click="CmSetOffline_OnClick"/>
|
||||
IsEnabled="{Binding IsOnline}" />
|
||||
</ContextMenu>
|
||||
</Label.ContextMenu>
|
||||
</Label>
|
||||
|
||||
<Grid>
|
||||
<Image
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/SystemLog/Warning.png"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0 0 10 0"
|
||||
Height="16"
|
||||
<Image
|
||||
Width="16"
|
||||
Visibility="{Binding HasWarning, Converter={StaticResource BoolVisibilityConverter}, ConverterParameter=True}"
|
||||
Height="16"
|
||||
Margin="0,0,10,0"
|
||||
HorizontalAlignment="Right"
|
||||
Panel.ZIndex="999"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/SystemLog/Warning.png"
|
||||
ToolTip="{Binding WarningTip}"
|
||||
Panel.ZIndex="999"/>
|
||||
Visibility="{Binding HasWarning, Converter={StaticResource BoolVisibilityConverter}, ConverterParameter=True}" />
|
||||
<TextBox
|
||||
VerticalContentAlignment="Center"
|
||||
Background="{Binding Status, Converter={StaticResource StatusToBgColor}}"
|
||||
BorderBrush="{Binding IsOnline, Converter={StaticResource IsOnlineToBdrColor}}"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource TextBox_Top}"
|
||||
Text="{lex:Loc {Binding Status, Mode=OneWay}}"
|
||||
IsReadOnly="True"
|
||||
TextWrapping="Wrap"/>
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
|
||||
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
d:DesignWidth="30"
|
||||
mc:Ignorable="d">
|
||||
<Border x:Name="TopGrid" Background="Transparent">
|
||||
<Grid Width="30" Height="85">
|
||||
<Grid Width="30" Height="85">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="20" />
|
||||
<RowDefinition Height="20" />
|
||||
@@ -19,105 +19,105 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Image
|
||||
Name="rectangle1"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Height="20"
|
||||
VerticalAlignment="Top"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/red.png"
|
||||
Stretch="Fill">
|
||||
Name="rectangle1"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Height="20"
|
||||
VerticalAlignment="Top"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/red.png"
|
||||
Stretch="Fill">
|
||||
<Image.Effect>
|
||||
<DropShadowEffect
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="Red" />
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="Red" />
|
||||
</Image.Effect>
|
||||
|
||||
</Image>
|
||||
<Image
|
||||
Name="rectangle2"
|
||||
Grid.Row="1"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Height="20"
|
||||
VerticalAlignment="Bottom"
|
||||
PreviewMouseDown="rectangle2_PreviewMouseDown"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/yellow.png"
|
||||
Stretch="Fill">
|
||||
Name="rectangle2"
|
||||
Grid.Row="1"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Height="20"
|
||||
VerticalAlignment="Bottom"
|
||||
PreviewMouseDown="rectangle2_PreviewMouseDown"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/yellow.png"
|
||||
Stretch="Fill">
|
||||
<Image.Effect>
|
||||
<DropShadowEffect
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="Green" />
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="Green" />
|
||||
<!--<BlurEffect RenderingBias="Performance" Radius="15" >
|
||||
|
||||
</BlurEffect>-->
|
||||
</Image.Effect>
|
||||
</Image>
|
||||
<Image
|
||||
Name="rectangle3"
|
||||
Grid.Row="2"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/Lime.png"
|
||||
Stretch="Fill">
|
||||
Name="rectangle3"
|
||||
Grid.Row="2"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/Lime.png"
|
||||
Stretch="Fill">
|
||||
<Image.Effect>
|
||||
<DropShadowEffect
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="Green" />
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="Green" />
|
||||
<!--<BlurEffect RenderingBias="Performance" Radius="15" >
|
||||
|
||||
</BlurEffect>-->
|
||||
</Image.Effect>
|
||||
</Image>
|
||||
<Image
|
||||
Name="rectangle4"
|
||||
Grid.Row="3"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Height="20"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/Blue.png"
|
||||
Stretch="Fill"
|
||||
Visibility="Hidden">
|
||||
Name="rectangle4"
|
||||
Grid.Row="3"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Height="20"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/Blue.png"
|
||||
Stretch="Fill"
|
||||
Visibility="Hidden">
|
||||
<Image.Effect>
|
||||
<DropShadowEffect
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="Green" />
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="Green" />
|
||||
<!--<BlurEffect RenderingBias="Performance" Radius="15" >
|
||||
|
||||
</BlurEffect>-->
|
||||
</Image.Effect>
|
||||
</Image>
|
||||
<Image
|
||||
Name="rectangle5"
|
||||
Grid.Row="3"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Height="30"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/lights.png"
|
||||
Stretch="Fill">
|
||||
Name="rectangle5"
|
||||
Grid.Row="3"
|
||||
Canvas.Left="0"
|
||||
Canvas.Top="0"
|
||||
Width="30"
|
||||
Height="30"
|
||||
Source="pack://application:,,,/MECF.Framework.UI.Core;component/Resources/lights.png"
|
||||
Stretch="Fill">
|
||||
<Image.Effect>
|
||||
<DropShadowEffect
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="White" />
|
||||
BlurRadius="20"
|
||||
Opacity="1"
|
||||
RenderingBias="Performance"
|
||||
ShadowDepth="0"
|
||||
Color="White" />
|
||||
<!--<BlurEffect RenderingBias="Performance" Radius="15" >
|
||||
|
||||
</BlurEffect>-->
|
||||
|
||||
Reference in New Issue
Block a user