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
ff3e2be2
Commit
ff3e2be2
authored
Aug 17, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 warningService.ReasonList 可以为null, 直接读取它会出错
parent
2c1358f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
OnInitError.cs
...ct.FLY.Thick.Base/FLY.Thick.Base.UI/OnInit/OnInitError.cs
+23
-10
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/OnInit/OnInitError.cs
View file @
ff3e2be2
...
...
@@ -63,23 +63,36 @@ namespace FLY.Thick.Base.UI.OnInit
List
<
int
>
errCodes
=
new
List
<
int
>
{
ERRNOs
.
Instance
.
SCAN_ERRNO_OVERCTRL
.
Code
,
ERRNOs
.
Instance
.
SCAN_ERRNO_OVERTOL
.
Code
};
var
record
=
warningService
.
ReasonList
;
if
(
record
==
null
)
{
//什么报警都没有
//不需要提示
if
(
warningTipId
!=
-
1
)
{
//需要把之前的报警关闭
FLY
.
ControlLibrary
.
Window_WarningTip
.
Stop
(
warningTipId
);
warningTipId
=
-
1
;
}
return
;
}
var
rs
=
from
r
in
record
where
errCodes
.
Contains
(
r
.
ErrCode
)
select
r
;
if
(
rs
.
Count
()
==
0
)
{
//不需要提示
if
(
warningTipId
!=
-
1
)
//不需要提示
if
(
warningTipId
!=
-
1
)
{
//需要把之前的报警关闭
FLY
.
ControlLibrary
.
Window_WarningTip
.
Stop
(
warningTipId
);
//需要把之前的报警关闭
FLY
.
ControlLibrary
.
Window_WarningTip
.
Stop
(
warningTipId
);
warningTipId
=
-
1
;
}
return
;
}
else
{
int
errcode
=
rs
.
First
().
ErrCode
;
string
msg
=
rs
.
First
().
Description
;
int
errcode
=
rs
.
First
().
ErrCode
;
string
msg
=
rs
.
First
().
Description
;
string
path
=
paramDictionary
.
GetValue
<
string
>(
ParamDistItemKeys
.
WarningTipPath
);
string
path
=
paramDictionary
.
GetValue
<
string
>(
ParamDistItemKeys
.
WarningTipPath
);
//报警!!!!!!!!
//记录打开的报警提示框Id,用于以后关闭
...
...
@@ -90,7 +103,7 @@ namespace FLY.Thick.Base.UI.OnInit
path
,
warningService
.
Reset
);
}
}),
this
,
MARKNO_WARNING_RING
);
}
}
...
...
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