Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hemei
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
hemei
Commits
2953169c
Commit
2953169c
authored
Jul 30, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 温区更新,设置问题
parent
69f2dd8b
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
137 additions
and
35 deletions
+137
-35
App.xaml
Project.FLY.IBC/FLY.IBC.UI.Client/App.xaml
+12
-0
App.xaml.cs
Project.FLY.IBC/FLY.IBC.UI.Client/App.xaml.cs
+12
-0
FLY.IBC.UI.Client.csproj
Project.FLY.IBC/FLY.IBC.UI.Client/FLY.IBC.UI.Client.csproj
+7
-0
UcTcStyle.xaml
Project.FLY.IBC/FLY.IBC.UI.Client/Themes/UcTcStyle.xaml
+0
-1
TempAreaPanel.xaml
...ect.FLY.IBC/FLY.IBC.UI.Client/UiModule/TempAreaPanel.xaml
+75
-20
TempAreaPanel.xaml.cs
....FLY.IBC/FLY.IBC.UI.Client/UiModule/TempAreaPanel.xaml.cs
+1
-1
UcTc.xaml
Project.FLY.IBC/FLY.IBC.UI.Client/UiModule/UcTc.xaml
+3
-4
UcTcSet.xaml
Project.FLY.IBC/FLY.IBC.UI.Client/UiModule/UcTcSet.xaml
+1
-1
WdTempAreaSet.xaml
...ect.FLY.IBC/FLY.IBC.UI.Client/UiModule/WdTempAreaSet.xaml
+3
-3
WdTempAreaSet.xaml.cs
....FLY.IBC/FLY.IBC.UI.Client/UiModule/WdTempAreaSet.xaml.cs
+20
-2
plcgroup.json
Resource/IBC/IBC&温控_5/Generated/plcgroup.json
+1
-1
IBC地址表.xlsx
Resource/IBC/IBC&温控_5/IBC地址表.xlsx
+0
-0
plcgroup.json
Resource/IBC/IBC&温控_7/Generated/plcgroup.json
+1
-1
IBC地址表.xlsx
Resource/IBC/IBC&温控_7/IBC地址表.xlsx
+0
-0
plcgroup.json
Resource/IBC/IBC带外风_v2/Generated/plcgroup.json
+1
-1
IBC地址表.xlsx
Resource/IBC/IBC带外风_v2/IBC地址表.xlsx
+0
-0
No files found.
Project.FLY.IBC/FLY.IBC.UI.Client/App.xaml
0 → 100644
View file @
2953169c
<Application x:Class="FLY.IBC.UI.Client.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.IBC.UI.Client;component/Themes/UcTcStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Project.FLY.IBC/FLY.IBC.UI.Client/App.xaml.cs
0 → 100644
View file @
2953169c
using
System.Windows
;
namespace
FLY.IBC.UI.Client
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public
partial
class
App
:
Application
{
}
}
Project.FLY.IBC/FLY.IBC.UI.Client/FLY.IBC.UI.Client.csproj
View file @
2953169c
...
...
@@ -67,6 +67,10 @@
<Reference
Include=
"PresentationFramework"
/>
</ItemGroup>
<ItemGroup>
<Page
Include=
"App.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
</Page>
<Page
Include=
"PgMenu2.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
...
...
@@ -165,6 +169,9 @@
</Page>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"App.xaml.cs"
>
<DependentUpon>
App.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"PgMenu2.xaml.cs"
>
<DependentUpon>
PgMenu2.xaml
</DependentUpon>
</Compile>
...
...
Project.FLY.IBC/FLY.IBC.UI.Client/Themes/UcTcStyle.xaml
View file @
2953169c
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:FLY.IBC.UI.Client.Themes"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.IBC.UI.Client;component/Themes/TempAreaPanelStyle.xaml"/>
...
...
Project.FLY.IBC/FLY.IBC.UI.Client/UiModule/TempAreaPanel.xaml
View file @
2953169c
...
...
@@ -10,8 +10,73 @@
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.IBC.UI.Client;component/Themes/TempAreaPanelStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.IBC.UI.Client;component/Themes/UcTcStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<ut:IbcServiceUt x:Key="viewModel"/>
<Style x:Key="UcTcStyle1" TargetType="{x:Type UserControl}">
<Setter Property="Width" Value="155"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type UserControl}">
<Grid >
<Border Background="{StaticResource DashBoardBrush}" BorderBrush="{StaticResource DashBoardBorderBrush}" BorderThickness="3" CornerRadius="3">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel>
<Grid Margin="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="PV" Foreground="{StaticResource PrintBrush}" Margin="2"/>
<TextBlock Grid.Column="1" Style="{StaticResource SegTextStyle}"
Text="{Binding TempPV,StringFormat={}{0:0.#}}" />
</Grid>
<Rectangle Height="2" Fill="{StaticResource PrintBrush}"/>
<Grid Margin="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="SV" Foreground="{StaticResource PrintBrush}" Margin="2"/>
<TextBlock Grid.Column="1" Style="{StaticResource SegTextStyle}" Foreground="{StaticResource SegOrangeBrush}"
Text="{Binding TempSV,StringFormat={}{0:0.#}}" />
</Grid>
<Rectangle Height="2" Fill="{StaticResource PrintBrush}"/>
<Grid Margin="2,2,2,5">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ToggleButton IsChecked="{Binding IsHeatingSet,Mode=OneWay}" Content="Run" IsEnabled="False" Style="{DynamicResource LedStyle}"/>
<ToggleButton Grid.Column="1" IsChecked="{Binding IsHeating,Mode=OneWay}" Content="OT1" IsEnabled="False" Style="{DynamicResource LedStyle}"/>
<ToggleButton Grid.Column="2" IsChecked="{Binding IsSelfAdjusting,Mode=OneWay}" Content="AT" IsEnabled="False" Style="{DynamicResource LedStyle}"/>
<ToggleButton Grid.Column="3" IsChecked="{Binding IsCooling,Mode=OneWay}" Content="OT2" IsEnabled="False" Style="{DynamicResource LedStyle}"/>
</Grid>
</StackPanel>
<TextBlock Background="{StaticResource BrandBrush}" Grid.Row="1" Height="8" Text="8888888" FontWeight="Bold" Padding="1" FontSize="5" Foreground="{StaticResource PrintBrush}"/>
</Grid>
</Border>
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Top"
Background="{StaticResource Color_badgeBg}" Foreground="{StaticResource Color_badgeText}"
Padding="6,2"
FontSize="30"
Text="{Binding Number}" Margin="0,-5,-5,0"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Viewbox Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Left">
...
...
@@ -21,7 +86,7 @@
<RowDefinition Height="871*"/>
</Grid.RowDefinitions>
<StackPanel Grid.RowSpan="2">
<ItemsControl ItemsSource="{Binding TAreas}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
...
...
@@ -32,23 +97,6 @@
<DataTemplate>
<Button Style="{StaticResource ButtonStyle_empty}" Tag="{Binding .}" Click="btnTAreaClick">
<Grid>
<Grid.Resources>
<ResourceDictionary>
<Style TargetType="local:UcTc">
<Setter Property="Number" Value="{Binding Number}"/>
<Setter Property="PV" Value="{Binding TempPV}"/>
<Setter Property="SV" Value="{Binding TempSV}"/>
<Setter Property="IsRun" Value="{Binding IsHeatingSet}" />
<Setter Property="IsOT1" Value="{Binding IsHeating}" />
<Setter Property="IsAT" Value="{Binding IsSelfAdjusting}" />
<Setter Property="IsOT2" Value="{Binding IsCooling}" />
<Setter Property="Margin" Value="5"/>
</Style>
<Style TargetType="Viewbox">
<Setter Property="Margin" Value="5"/>
</Style>
</ResourceDictionary>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition />
...
...
@@ -61,12 +109,19 @@
<Border Style="{StaticResource BorderStyle_block}" CornerRadius="5,0,0,5" Margin="5" Width="100">
<TextBlock Text="{Binding Number}" FontSize="50" Foreground="{StaticResource Color_title}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<local:UcTc Grid.Column="1" DataContext="{Binding Temperatures[0]}" />
<UserControl Style="{StaticResource UcTcStyle1}" Grid.Column="1" DataContext="{Binding Temperatures[0]}" />
<UserControl Style="{StaticResource UcTcStyle1}" Grid.Column="2" DataContext="{Binding Temperatures[1]}" />
<UserControl Style="{StaticResource UcTcStyle1}" Grid.Column="3" DataContext="{Binding Temperatures[2]}" />
<UserControl Style="{StaticResource UcTcStyle1}" Grid.Column="4" DataContext="{Binding Temperatures[3]}" />
<UserControl Style="{StaticResource UcTcStyle1}" Grid.Column="5" DataContext="{Binding Temperatures[4]}" />
<UserControl Style="{StaticResource UcTcStyle1}" Grid.Column="6" DataContext="{Binding Temperatures[5]}" />
<!--<local:UcTc Grid.Column="1" DataContext="{Binding Temperatures[0]}" />
<local:UcTc Grid.Column="2" DataContext="{Binding Temperatures[1]}" />
<local:UcTc Grid.Column="3" DataContext="{Binding Temperatures[2]}" />
<local:UcTc Grid.Column="4" DataContext="{Binding Temperatures[3]}" />
<local:UcTc Grid.Column="5" DataContext="{Binding Temperatures[4]}" />
<local:UcTc Grid.Column="6" DataContext="{Binding Temperatures[5]}" />
<local:UcTc Grid.Column="6" DataContext="{Binding Temperatures[5]}" />-->
</Grid>
</Button>
...
...
Project.FLY.IBC/FLY.IBC.UI.Client/UiModule/TempAreaPanel.xaml.cs
View file @
2953169c
...
...
@@ -34,7 +34,7 @@ namespace FLY.IBC.UI.Client.UiModule
for
(
int
i
=
0
;
i
<
6
;
i
++)
{
for
(
int
j
=
0
;
j
<
propertynames
.
Count
();
j
++)
{
update_propertynames
.
Add
(
propertynames
[
i
].
Replace
(
"1"
,
(
i
+
1
).
ToString
()));
update_propertynames
.
Add
(
propertynames
[
j
].
Replace
(
"1"
,
(
i
+
1
).
ToString
()));
}
}
...
...
Project.FLY.IBC/FLY.IBC.UI.Client/UiModule/UcTc.xaml
View file @
2953169c
...
...
@@ -4,16 +4,15 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.IBC.UI.Client.UiModule"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:flyctrl="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" x:Class="FLY.IBC.UI.Client.UiModule.UcTc"
x:Class="FLY.IBC.UI.Client.UiModule.UcTc"
mc:Ignorable="d" Width="155"
x:Name="uc">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!--加载 ResourceDictionary 会很慢,在TempAreaPanel中不能直接调用 UcTc,然后需要等3-4s才能启动 -->
<ResourceDictionary Source="pack://application:,,,/FLY.IBC.UI.Client;component/Themes/UcTcStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--资料内的数据不调用,是不会创建的,所以不用担心浪费内存-->
...
...
Project.FLY.IBC/FLY.IBC.UI.Client/UiModule/UcTcSet.xaml
View file @
2953169c
...
...
@@ -58,7 +58,7 @@
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ToggleButton Grid.Column="0" IsChecked="{Binding IsRun}" Content="Run" Style="{StaticResource LedStyle}" Foreground="{StaticResource Color_text}"/>
<ToggleButton Grid.Column="1" IsChecked="{Binding IsOT1}" Content="OT1" Style="{StaticResource LedStyle}" Foreground="{StaticResource Color_text}"/>
<ToggleButton Grid.Column="2" IsChecked="{Binding IsAT}" Content="AT" Style="{StaticResource LedStyle}" Foreground="{StaticResource Color_text}"/>
<ToggleButton Grid.Column="3" IsChecked="{Binding IsOT2}" Content="OT2" Style="{StaticResource LedStyle}" Foreground="{StaticResource Color_text}"/>
...
...
Project.FLY.IBC/FLY.IBC.UI.Client/UiModule/WdTempAreaSet.xaml
View file @
2953169c
...
...
@@ -20,8 +20,8 @@
<Setter Property="Margin" Value="5"/>
<Setter Property="Number" Value="{Binding Number}"/>
<Setter Property="PV" Value="{Binding TempPV}" />
<Setter Property="SV" Value="{Binding TempSV}" />
<Setter Property="IsRun" Value="{Binding IsHeatingSet}"/>
<Setter Property="SV" Value="{Binding TempSV
,Mode=TwoWay
}" />
<Setter Property="IsRun" Value="{Binding IsHeatingSet
,Mode=TwoWay
}"/>
<Setter Property="IsOT1" Value="{Binding IsHeating}"/>
<Setter Property="IsAT" Value="{Binding IsSelfAdjusting}"/>
<Setter Property="IsOT2" Value="{Binding IsCooling}"/>
...
...
@@ -45,7 +45,7 @@
<local:UcTcSet DataContext="{Binding Temperatures[3]}"/>
</StackPanel>
<StackPanel>
<local:UcTcAll Number="{Binding Number}" SV="{Binding AllTempSet
}" IsAllRun="{Binding IsAllTempSame
}"/>
<local:UcTcAll Number="{Binding Number}" SV="{Binding AllTempSet
,Mode=TwoWay}" IsAllRun="{Binding IsAllTempSame,Mode=TwoWay
}"/>
<local:UcTcSet DataContext="{Binding Temperatures[4]}" />
</StackPanel>
...
...
Project.FLY.IBC/FLY.IBC.UI.Client/UiModule/WdTempAreaSet.xaml.cs
View file @
2953169c
...
...
@@ -3,6 +3,7 @@ using FLY.IBC.Client;
using
FLY.IBC.Common
;
using
FLY.IBC.IService
;
using
FLY.OBJComponents.Client
;
using
FObjBase
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -24,6 +25,11 @@ namespace FLY.IBC.UI.Client.UiModule
/// </summary>
public
partial
class
WdTempAreaSet
:
WindowBigClose
{
#
region
MARKNO
const
int
MARKNO_IsTempSetChanged
=
1
;
const
int
MARKNO_IsAllTempSetChanged
=
2
;
#
endregion
static
string
[]
update_propertynames
=
new
string
[]
{
nameof
(
Common
.
TempArea
.
IsTempSetChanged1
),
nameof
(
Common
.
TempArea
.
IsTempSetChanged2
),
...
...
@@ -76,7 +82,14 @@ namespace FLY.IBC.UI.Client.UiModule
var
tempCell
=
sender
as
TempCell
;
if
(
e
.
PropertyName
==
nameof
(
Common
.
TempCell
.
TempSV
))
{
tempCell
.
IsTempSetChanged
=
true
;
//0.5s 后再set 1
PollModule
.
Current
.
Poll_Config
(
PollModule
.
POLL_CONFIG
.
ADD
,
()
=>
{
tempCell
.
IsTempSetChanged
=
false
;
tempCell
.
IsTempSetChanged
=
true
;
},
TimeSpan
.
FromSeconds
(
0.5
),
false
,
false
,
this
,
MARKNO_IsTempSetChanged
,
true
);
}
}
...
...
@@ -91,7 +104,12 @@ namespace FLY.IBC.UI.Client.UiModule
}
if
(
e
.
PropertyName
==
nameof
(
Common
.
TempArea
.
AllTempSet
))
{
tempArea
.
IsAllTempSetChanged
=
true
;
//0.5s 后再set 1
PollModule
.
Current
.
Poll_Config
(
PollModule
.
POLL_CONFIG
.
ADD
,
()
=>
{
tempArea
.
IsAllTempSetChanged
=
false
;
tempArea
.
IsAllTempSetChanged
=
true
;
},
TimeSpan
.
FromSeconds
(
0.5
),
false
,
false
,
this
,
MARKNO_IsAllTempSetChanged
,
true
);
}
}
...
...
Resource/IBC/IBC&温控_5/Generated/plcgroup.json
View file @
2953169c
...
...
@@ -99,7 +99,7 @@
"DeviceIndex"
:
0
,
"Mode"
:
"4"
,
"Addr"
:
668
,
"Type"
:
"
u
int16"
,
"Type"
:
"int16"
,
"Scale"
:
1.0
,
"OwnerName"
:
"Item"
,
"PropertyName"
:
"FilmWidth"
...
...
Resource/IBC/IBC&温控_5/IBC地址表.xlsx
View file @
2953169c
No preview for this file type
Resource/IBC/IBC&温控_7/Generated/plcgroup.json
View file @
2953169c
...
...
@@ -99,7 +99,7 @@
"DeviceIndex"
:
0
,
"Mode"
:
"4"
,
"Addr"
:
668
,
"Type"
:
"
u
int16"
,
"Type"
:
"int16"
,
"Scale"
:
1.0
,
"OwnerName"
:
"Item"
,
"PropertyName"
:
"FilmWidth"
...
...
Resource/IBC/IBC&温控_7/IBC地址表.xlsx
View file @
2953169c
No preview for this file type
Resource/IBC/IBC带外风_v2/Generated/plcgroup.json
View file @
2953169c
...
...
@@ -72,7 +72,7 @@
"DeviceIndex"
:
0
,
"Mode"
:
"4"
,
"Addr"
:
668
,
"Type"
:
"
u
int16"
,
"Type"
:
"int16"
,
"Scale"
:
1.0
,
"OwnerName"
:
"Item"
,
"PropertyName"
:
"FilmWidth"
...
...
Resource/IBC/IBC带外风_v2/IBC地址表.xlsx
View file @
2953169c
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment