Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
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
潘栩锋
Thick-Common
Commits
1131b035
Commit
1131b035
authored
Aug 09, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 由于配置问题,LCUS1 无法使用
parent
94decdd5
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
28 deletions
+68
-28
UcSectionError.xaml
....Base/FLY.Thick.Base.UI/CustomSection/UcSectionError.xaml
+3
-1
UcSectionError.xaml.cs
...se/FLY.Thick.Base.UI/CustomSection/UcSectionError.xaml.cs
+5
-5
LCUS1_dependOn.cs
...Y.Thick.Base/FLY.Thick.Base.UI/DependOn/LCUS1_dependOn.cs
+1
-22
FLY.Thick.Base.UI.csproj
...FLY.Thick.Base/FLY.Thick.Base.UI/FLY.Thick.Base.UI.csproj
+1
-0
LCUS1.cs
Project.FLY.Thick.Base/FLY.Thick.Base.UI/LCUS1.cs
+4
-0
OnInitLcus1_One.cs
...LY.Thick.Base/FLY.Thick.Base.UI/OnInit/OnInitLcus1_One.cs
+54
-0
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/CustomSection/UcSectionError.xaml
View file @
1131b035
...
@@ -94,7 +94,9 @@
...
@@ -94,7 +94,9 @@
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<TextBlock x:Name="textblock_lcus" Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding ErrMsg}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
状态:<Run Text="{Binding LCUS1.ErrMsg,Mode=OneWay}"/>
</TextBlock>
</StackPanel>
</StackPanel>
</GroupBox>
</GroupBox>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/CustomSection/UcSectionError.xaml.cs
View file @
1131b035
...
@@ -78,20 +78,20 @@ namespace FLY.Thick.Base.UI.CustomSection
...
@@ -78,20 +78,20 @@ namespace FLY.Thick.Base.UI.CustomSection
ParamDictionary
paramDictionary
;
ParamDictionary
paramDictionary
;
LCUS1
l
CUS
1
;
LCUS1
l
cus
1
;
public
LCUS1
LCUS1
=>
lcus1
;
public
UcSectionErrorVm
()
public
UcSectionErrorVm
()
{
{
PlayCmd
=
new
RelayCommand
(
Play
);
PlayCmd
=
new
RelayCommand
(
Play
);
OpenCmd
=
new
RelayCommand
(
Open
);
OpenCmd
=
new
RelayCommand
(
Open
);
BellRingCmd
=
new
RelayCommand
(()
=>
{
l
CUS
1
.
On
();
});
BellRingCmd
=
new
RelayCommand
(()
=>
{
l
cus
1
.
On
();
});
BellOffCmd
=
new
RelayCommand
(()
=>
{
l
CUS
1
.
Off
();
});
BellOffCmd
=
new
RelayCommand
(()
=>
{
l
cus
1
.
Off
();
});
}
}
public
void
Init
(
ParamDictionary
paramDictionary
,
LCUS1
lCUS1
)
public
void
Init
(
ParamDictionary
paramDictionary
,
LCUS1
lCUS1
)
{
{
this
.
paramDictionary
=
paramDictionary
;
this
.
paramDictionary
=
paramDictionary
;
this
.
l
CUS
1
=
lCUS1
;
this
.
l
cus
1
=
lCUS1
;
paramDictionary
.
SetBinding
(
this
,
"WarningTipPath"
,
""
);
paramDictionary
.
SetBinding
(
this
,
"WarningTipPath"
,
""
);
paramDictionary
.
SetBinding
(
this
,
"WarningDurationSec"
,
5
);
paramDictionary
.
SetBinding
(
this
,
"WarningDurationSec"
,
5
);
paramDictionary
.
SetBinding
(
this
,
"EnableScanErrBigTip"
,
false
);
paramDictionary
.
SetBinding
(
this
,
"EnableScanErrBigTip"
,
false
);
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/DependOn/LCUS1_dependOn.cs
View file @
1131b035
...
@@ -10,13 +10,10 @@ namespace FLY.Thick.Base.UI
...
@@ -10,13 +10,10 @@ namespace FLY.Thick.Base.UI
public
class
LCUS1_dependOn
:
LCUS1
public
class
LCUS1_dependOn
:
LCUS1
{
{
ParamDictionary
paramDictionary
;
ParamDictionary
paramDictionary
;
FLY
.
OBJComponents
.
IService
.
IWarningService
warningService
;
public
LCUS1_dependOn
(
public
LCUS1_dependOn
(
ParamDictionary
paramDictionary
,
ParamDictionary
paramDictionary
)
FLY
.
OBJComponents
.
IService
.
IWarningService
warningService
)
{
{
this
.
paramDictionary
=
paramDictionary
;
this
.
paramDictionary
=
paramDictionary
;
this
.
warningService
=
warningService
;
PortName
=
this
.
paramDictionary
.
GetValue
(
"LCUS1_PortName"
,
"COM1"
);
PortName
=
this
.
paramDictionary
.
GetValue
(
"LCUS1_PortName"
,
"COM1"
);
this
.
paramDictionary
.
ValueChanged
+=
(
s
,
e
)
=>
this
.
paramDictionary
.
ValueChanged
+=
(
s
,
e
)
=>
{
{
...
@@ -25,24 +22,6 @@ namespace FLY.Thick.Base.UI
...
@@ -25,24 +22,6 @@ namespace FLY.Thick.Base.UI
PortName
=
e
.
Value
as
string
;
PortName
=
e
.
Value
as
string
;
}
}
};
};
this
.
warningService
.
PropertyChanged
+=
(
s
,
e
)
=>
{
if
(
e
.
PropertyName
==
"IsRinging"
)
{
if
(
this
.
paramDictionary
.
GetValue
(
"EnableLCUS1"
,
false
))
{
if
(
this
.
warningService
.
IsRinging
)
{
On
();
}
else
{
Off
();
}
}
}
};
}
}
}
}
}
}
Project.FLY.Thick.Base/FLY.Thick.Base.UI/FLY.Thick.Base.UI.csproj
View file @
1131b035
...
@@ -147,6 +147,7 @@
...
@@ -147,6 +147,7 @@
<Compile
Include=
"OnInit\OnInitError.cs"
/>
<Compile
Include=
"OnInit\OnInitError.cs"
/>
<Compile
Include=
"OnInit\OnInitGageCommand.cs"
/>
<Compile
Include=
"OnInit\OnInitGageCommand.cs"
/>
<Compile
Include=
"OnInit\OnInitLanguage.cs"
/>
<Compile
Include=
"OnInit\OnInitLanguage.cs"
/>
<Compile
Include=
"OnInit\OnInitLcus1_One.cs"
/>
<Compile
Include=
"OnInit\OnInitOSK.cs"
/>
<Compile
Include=
"OnInit\OnInitOSK.cs"
/>
<Compile
Include=
"PasswordAuthorize.cs"
/>
<Compile
Include=
"PasswordAuthorize.cs"
/>
<Compile
Include=
"PgBorderSearchPlastic.xaml.cs"
>
<Compile
Include=
"PgBorderSearchPlastic.xaml.cs"
>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/LCUS1.cs
View file @
1131b035
...
@@ -27,6 +27,8 @@ namespace FLY.Thick.Base.UI
...
@@ -27,6 +27,8 @@ namespace FLY.Thick.Base.UI
serial
.
Open
();
serial
.
Open
();
byte
[]
buf
=
new
byte
[]
{
0xa0
,
0x01
,
0x01
,
0xa2
};
byte
[]
buf
=
new
byte
[]
{
0xa0
,
0x01
,
0x01
,
0xa2
};
serial
.
Write
(
buf
,
0
,
buf
.
Length
);
serial
.
Write
(
buf
,
0
,
buf
.
Length
);
//等0.5s确保发送出去了
Task
.
Delay
(
500
).
Wait
();
serial
.
Close
();
serial
.
Close
();
ErrMsg
=
$"
{
DateTime
.
Now
}
ON"
;
ErrMsg
=
$"
{
DateTime
.
Now
}
ON"
;
}
}
...
@@ -48,6 +50,8 @@ namespace FLY.Thick.Base.UI
...
@@ -48,6 +50,8 @@ namespace FLY.Thick.Base.UI
serial
.
Open
();
serial
.
Open
();
byte
[]
buf
=
new
byte
[]
{
0xa0
,
0x01
,
0x00
,
0xa1
};
byte
[]
buf
=
new
byte
[]
{
0xa0
,
0x01
,
0x00
,
0xa1
};
serial
.
Write
(
buf
,
0
,
buf
.
Length
);
serial
.
Write
(
buf
,
0
,
buf
.
Length
);
//等0.5s确保发送出去了
Task
.
Delay
(
500
).
Wait
();
serial
.
Close
();
serial
.
Close
();
ErrMsg
=
$"
{
DateTime
.
Now
}
OFF"
;
ErrMsg
=
$"
{
DateTime
.
Now
}
OFF"
;
}
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/OnInit/OnInitLcus1_One.cs
0 → 100644
View file @
1131b035
using
Misc
;
using
MultiLayout.UiModule
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
FLY.Thick.Base.UI.OnInit
{
/// <summary>
/// LCUS1 USB继电器模块, 监听 单个报警服务 IWarningSystem2Service
/// </summary>
public
class
OnInitLcus1_One
:
IOnInit
{
public
int
Level
{
get
;
private
set
;
}
ParamDictionary
paramDictionary
;
LCUS1
lcus1
;
FLY
.
OBJComponents
.
IService
.
IWarningService
warningService
;
public
OnInitLcus1_One
(
ParamDictionary
paramDictionary
,
FLY
.
OBJComponents
.
IService
.
IWarningService
warningService
,
LCUS1
lcus1
,
int
lv
=
1
)
{
Level
=
lv
;
this
.
lcus1
=
lcus1
;
this
.
paramDictionary
=
paramDictionary
;
this
.
warningService
=
warningService
;
}
public
void
OnInit
()
{
warningService
.
PropertyChanged
+=
(
s
,
e
)
=>
{
if
(
e
.
PropertyName
==
nameof
(
warningService
.
IsRinging
))
{
if
(
this
.
paramDictionary
.
GetValue
(
"EnableLCUS1"
,
false
))
{
if
(
this
.
warningService
.
IsRinging
)
{
lcus1
.
On
();
}
else
{
lcus1
.
Off
();
}
}
}
};
}
}
}
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