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
6337e659
Commit
6337e659
authored
Jun 18, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 Reflect_SeviceClient IsSynced
parent
a8a2fe2d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
Reflect_SeviceClient.cs
Project.FLY.FObjSys/FObjBaseReflect/Reflect_SeviceClient.cs
+22
-2
No files found.
Project.FLY.FObjSys/FObjBaseReflect/Reflect_SeviceClient.cs
View file @
6337e659
...
...
@@ -22,7 +22,11 @@ namespace FObjBase.Reflect
/// </summary>
protected
virtual
Type
InterfaceType
{
get
;
}
/// <summary>
/// 已经同步完成;
/// 已经收到了 CALL_GetAllProperties, 全部属性都与服务器一致
/// </summary>
public
bool
IsSynced
{
get
;
private
set
;
}
class
AnyEvent
{
public
string
name
;
...
...
@@ -67,6 +71,17 @@ namespace FObjBase.Reflect
COMMON
.
InitPropertyPush
(
rootNode
);
InitEventPush
();
InitCall
();
this
.
PropertyChanged
+=
(
s
,
e
)
=>
{
if
(
e
.
PropertyName
==
nameof
(
IsConnected
))
{
if
(
IsConnected
==
false
)
{
IsSynced
=
false
;
}
}
};
}
void
InitPropertyChanged
()
{
...
...
@@ -232,6 +247,11 @@ namespace FObjBase.Reflect
Call
(
methodName
,
null
,
null
,
null
);
}
void
request_CALL_GetAllProperties
(
Reflect_OBJ_INTERFACE
.
ReflectData
rData
)
{
IsSynced
=
true
;
request_PUSH_PropertyChanged
(
rData
);
}
void
request_PUSH_PropertyChanged
(
Reflect_OBJ_INTERFACE
.
ReflectData
rData
)
{
ignoreSet
=
true
;
...
...
@@ -356,7 +376,7 @@ namespace FObjBase.Reflect
string
json
=
Misc
.
Converter
.
BytesToString
(
retdata
);
var
rData
=
JsonConvert
.
DeserializeObject
<
Reflect_OBJ_INTERFACE
.
ReflectData
>(
json
);
request_
PUSH_PropertyChanged
(
rData
);
request_
CALL_GetAllProperties
(
rData
);
}
break
;
case
Reflect_OBJ_INTERFACE
.
CALL_MethodInvoke
:
...
...
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