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
Show 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,6 +63,19 @@ namespace FLY.Thick.Base.UI.OnInit
...
@@ -63,6 +63,19 @@ namespace FLY.Thick.Base.UI.OnInit
List
<
int
>
errCodes
=
new
List
<
int
>
{
ERRNOs
.
Instance
.
SCAN_ERRNO_OVERCTRL
.
Code
,
ERRNOs
.
Instance
.
SCAN_ERRNO_OVERTOL
.
Code
};
List
<
int
>
errCodes
=
new
List
<
int
>
{
ERRNOs
.
Instance
.
SCAN_ERRNO_OVERCTRL
.
Code
,
ERRNOs
.
Instance
.
SCAN_ERRNO_OVERTOL
.
Code
};
var
record
=
warningService
.
ReasonList
;
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
;
var
rs
=
from
r
in
record
where
errCodes
.
Contains
(
r
.
ErrCode
)
select
r
;
if
(
rs
.
Count
()
==
0
)
if
(
rs
.
Count
()
==
0
)
{
{
...
@@ -73,9 +86,9 @@ namespace FLY.Thick.Base.UI.OnInit
...
@@ -73,9 +86,9 @@ namespace FLY.Thick.Base.UI.OnInit
FLY
.
ControlLibrary
.
Window_WarningTip
.
Stop
(
warningTipId
);
FLY
.
ControlLibrary
.
Window_WarningTip
.
Stop
(
warningTipId
);
warningTipId
=
-
1
;
warningTipId
=
-
1
;
}
}
return
;
}
}
else
{
int
errcode
=
rs
.
First
().
ErrCode
;
int
errcode
=
rs
.
First
().
ErrCode
;
string
msg
=
rs
.
First
().
Description
;
string
msg
=
rs
.
First
().
Description
;
...
@@ -90,7 +103,7 @@ namespace FLY.Thick.Base.UI.OnInit
...
@@ -90,7 +103,7 @@ namespace FLY.Thick.Base.UI.OnInit
path
,
path
,
warningService
.
Reset
warningService
.
Reset
);
);
}
}),
this
,
MARKNO_WARNING_RING
);
}),
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