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
169033ef
Commit
169033ef
authored
Mar 08, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IBCSystemClient 没有继承INotifyPropertyChanged, 导致界面不会更新 IBC服务器连接断开
parent
c7392bef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
+27
-9
Page_DynArea.xaml.cs
...t.FLY.IBC/FLY.IBC.UI.Client/UIModule/Page_DynArea.xaml.cs
+9
-6
IBCSystemClient.cs
Project.FLY.IBC/FLY.IBC/Client/IBCSystemClient.cs
+18
-3
No files found.
Project.FLY.IBC/FLY.IBC.UI.Client/UIModule/Page_DynArea.xaml.cs
View file @
169033ef
...
...
@@ -57,7 +57,7 @@ namespace FLY.IBC.UI.Client.UIModule
reason_list_index
--;
if
(
reason_list_index
<
0
)
reason_list_index
=
mWindow
.
Record
.
Count
();
updateError
();
updateError
01
();
};
mWindow
.
Record
.
CollectionChanged
+=
Record_CollectionChanged
;
...
...
@@ -81,25 +81,28 @@ namespace FLY.IBC.UI.Client.UIModule
{
if
(
e
.
PropertyName
==
"IsConnected"
)
{
updateError
();
updateError
01
();
}
};
updateError
();
updateError
01
();
}
private
void
Record_CollectionChanged
(
object
sender
,
System
.
Collections
.
Specialized
.
NotifyCollectionChangedEventArgs
e
)
{
reason_list_index
=
mWindow
.
Record
.
Count
()
-
1
;
updateError01
();
}
void
updateError01
()
{
FObjBase
.
PollModule
.
Current
.
Poll_JustOnce
(
new
FObjBase
.
PollModule
.
PollHandler
(
delegate
()
{
reason_list_index
=
mWindow
.
Record
.
Count
()
-
1
;
updateError
();
}),
this
,
MARKNO_UPDATEERROR
);
}
void
updateError
()
{
if
(!
iBCSystemClient
.
IsConnected
)
...
...
Project.FLY.IBC/FLY.IBC/Client/IBCSystemClient.cs
View file @
169033ef
...
...
@@ -15,7 +15,7 @@ using System.Threading.Tasks;
namespace
FLY.IBC.Client
{
public
class
IBCSystemClient
:
FObj
,
IIBCSystemService
public
class
IBCSystemClient
:
FObj
,
IIBCSystemService
,
INotifyPropertyChanged
{
public
BufferServiceClient
<
Db_Width
>
CtrlList
;
#
region
IIBCSystemService
...
...
@@ -32,8 +32,23 @@ namespace FLY.IBC.Client
public
IPLCProxySystemService
PLCos
{
get
;
private
set
;
}
#
endregion
public
bool
IsConnected
{
get
;
set
;
}
=
false
;
//private bool isConnected;
public
bool
IsConnected
{
get
;
set
;
}
//{
// get {
// return isConnected;
// }
// set {
// if (isConnected != value)
// {
// isConnected = value;
// this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("IsConnected"));
// }
// }
//}
IFConn
mConn
;
UInt32
mServerID
;
...
...
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