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
f504e6ba
Commit
f504e6ba
authored
Jan 01, 2019
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 测试报警异常
parent
9c836bcf
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
97 additions
and
65 deletions
+97
-65
BufferWindow.cs
...ct.FLY.OBJComponents/OBJComponents/Client/BufferWindow.cs
+31
-22
BuffserServiceClient.cs
...BJComponents/OBJComponents/Client/BuffserServiceClient.cs
+18
-13
NotifyBufferChangedEventArgs.cs
...ents/OBJComponents/Common/NotifyBufferChangedEventArgs.cs
+1
-1
Buffer_OBJProxy.cs
...mponents/OBJComponents/Server.OBJProxy/Buffer_OBJProxy.cs
+5
-6
Buffer.cs
Project.FLY.OBJComponents/OBJComponents/Server/Buffer.cs
+15
-14
WarningSystem.cs
...t.FLY.OBJComponents/OBJComponents/Server/WarningSystem.cs
+9
-8
MainWindow.xaml
Project.FLY.Weight/FLY.Weight.UI.Server/MainWindow.xaml
+7
-1
MainWindow.xaml.cs
Project.FLY.Weight/FLY.Weight.UI.Server/MainWindow.xaml.cs
+1
-0
hemei.sln
hemei.sln
+10
-0
No files found.
Project.FLY.OBJComponents/OBJComponents/Client/BufferWindow.cs
View file @
f504e6ba
...
@@ -24,9 +24,10 @@ namespace FLY.OBJComponents.Client
...
@@ -24,9 +24,10 @@ namespace FLY.OBJComponents.Client
#
region
property
#
region
property
/// <summary>
/// <summary>
/// 最后一行数据的ID
/// 最新数据的ID,就是 Buffer.NewestID,
/// 但不直接使用Buffer.NewestID,因为 Buffer.NewestID可能与接收的数据滞后,或超前
/// </summary>
/// </summary>
public
int
RecordLastID
{
get
;
private
set
;
}
=
0
;
public
int
RecordLastID
{
get
;
private
set
;
}
=
-
1
;
/// <summary>
/// <summary>
/// 窗口最后一行的目标ID
/// 窗口最后一行的目标ID
/// </summary>
/// </summary>
...
@@ -40,7 +41,7 @@ namespace FLY.OBJComponents.Client
...
@@ -40,7 +41,7 @@ namespace FLY.OBJComponents.Client
/// </summary>
/// </summary>
public
int
TotalPages
{
get
;
private
set
;
}
public
int
TotalPages
{
get
;
private
set
;
}
/// <summary>
/// <summary>
/// 当前页码
/// 当前页码
, 页码从1-TotalPages
/// </summary>
/// </summary>
public
int
CurrentPage
{
get
;
private
set
;
}
public
int
CurrentPage
{
get
;
private
set
;
}
...
@@ -70,7 +71,7 @@ namespace FLY.OBJComponents.Client
...
@@ -70,7 +71,7 @@ namespace FLY.OBJComponents.Client
Buffer
=
buffer
;
Buffer
=
buffer
;
IsKeepNewest
=
true
;
IsKeepNewest
=
true
;
WindowID
=
Buffer
.
NewestID
;
WindowID
=
Buffer
.
NewestID
;
//显示最新数据!!!
updatePageInfo
();
updatePageInfo
();
GetWindow
();
GetWindow
();
...
@@ -142,13 +143,13 @@ namespace FLY.OBJComponents.Client
...
@@ -142,13 +143,13 @@ namespace FLY.OBJComponents.Client
{
{
case
NotifyBufferChangedAction
.
Add
:
case
NotifyBufferChangedAction
.
Add
:
{
{
int
newEndingI
ndex
=
e
.
StartingIndex
-
1
+
1
;
int
newEndingI
D
=
e
.
EndingID
;
int
nFirstID
=
e
.
StartingIndex
;
int
nFirstID
=
e
.
EndingID
;
int
nLastID
=
newEndingI
ndex
;
int
nLastID
=
newEndingI
D
;
if
(
IsKeepNewest
)
//保持数据最新
if
(
IsKeepNewest
)
//保持数据最新
{
{
WindowID
=
newEndingI
ndex
;
WindowID
=
newEndingI
D
;
}
}
int
wLastID
=
WindowID
;
int
wLastID
=
WindowID
;
...
@@ -164,27 +165,25 @@ namespace FLY.OBJComponents.Client
...
@@ -164,27 +165,25 @@ namespace FLY.OBJComponents.Client
}
}
else
else
{
{
push
(
newEndingI
ndex
,
(
IList
<
T
>)
e
.
Items
);
push
(
newEndingI
D
,
(
IList
<
T
>)
e
.
Items
);
}
}
}
}
break
;
break
;
case
NotifyBufferChangedAction
.
Replace
:
case
NotifyBufferChangedAction
.
Replace
:
{
{
int
newEndingIndex
=
e
.
StartingIndex
-
1
+
1
;
push
(
e
.
EndingID
,
(
IList
<
T
>)
e
.
Items
);
push
(
newEndingIndex
,
(
IList
<
T
>)
e
.
Items
);
}
}
break
;
break
;
case
NotifyBufferChangedAction
.
Remove
:
case
NotifyBufferChangedAction
.
Remove
:
{
{
int
newEndingIndex
=
e
.
StartingIndex
-
1
+
1
;
remove
(
e
.
EndingID
,
1
);
remove
(
newEndingIndex
,
1
);
}
}
break
;
break
;
case
NotifyBufferChangedAction
.
Reset
:
case
NotifyBufferChangedAction
.
Reset
:
{
{
//数据清空
//数据清空
Record
.
Clear
();
Record
.
Clear
();
RecordLastID
=
0
;
RecordLastID
=
-
1
;
WindowID
=
Size
-
1
;
WindowID
=
Size
-
1
;
}
}
break
;
break
;
...
@@ -220,8 +219,8 @@ namespace FLY.OBJComponents.Client
...
@@ -220,8 +219,8 @@ namespace FLY.OBJComponents.Client
int
offset
=
-
rFirstID
;
int
offset
=
-
rFirstID
;
firstID
+=
offset
;
firstID
+=
offset
;
lastID
+=
offset
;
lastID
+=
offset
;
rLastID
+=
offset
;
rLastID
+=
offset
;
// = Record.Count()-1
rFirstID
=
0
;
rFirstID
=
0
;
// = 0
if
(
lastID
<
-
1
)
//新数据在旧数据前面,不能合并
if
(
lastID
<
-
1
)
//新数据在旧数据前面,不能合并
{
{
...
@@ -288,7 +287,7 @@ namespace FLY.OBJComponents.Client
...
@@ -288,7 +287,7 @@ namespace FLY.OBJComponents.Client
int
offset
=
-
rFirstID
;
int
offset
=
-
rFirstID
;
firstID
+=
offset
;
firstID
+=
offset
;
lastID
+=
offset
;
lastID
+=
offset
;
rLastID
+=
offset
;
rLastID
+=
offset
;
// = Record.Count() - 1;
rFirstID
=
0
;
rFirstID
=
0
;
if
(
lastID
<=
-
1
)
//被删除数据在当前数据前面,什么都不用做
if
(
lastID
<=
-
1
)
//被删除数据在当前数据前面,什么都不用做
...
@@ -299,11 +298,12 @@ namespace FLY.OBJComponents.Client
...
@@ -299,11 +298,12 @@ namespace FLY.OBJComponents.Client
{
{
//重新问buffer获取当前数据块
//重新问buffer获取当前数据块
Record
.
Clear
();
Record
.
Clear
();
RecordLastID
=
0
;
RecordLastID
=
-
1
;
GetWindow
();
GetWindow
();
}
}
}
}
}
}
/// <summary>
/// <summary>
/// 把多出window范围的数据删除
/// 把多出window范围的数据删除
/// </summary>
/// </summary>
...
@@ -366,19 +366,28 @@ namespace FLY.OBJComponents.Client
...
@@ -366,19 +366,28 @@ namespace FLY.OBJComponents.Client
void
updatePageInfo
()
void
updatePageInfo
()
{
{
int
firstID
=
Buffer
.
NewestID
-
Buffer
.
Count
+
1
;
int
firstID
=
Buffer
.
NewestID
-
(
Buffer
.
Count
-
1
)
;
int
lastID
=
Buffer
.
NewestID
;
int
lastID
=
Buffer
.
NewestID
;
int
wLastID
=
WindowID
;
int
wLastID
=
WindowID
;
//修正后,firstID,lastID 就是Buffer 内部数据量的排序,lastID=Count-1
int
offset
=
-
firstID
;
int
offset
=
-
firstID
;
lastID
+=
offset
;
lastID
+=
offset
;
wLastID
+=
offset
;
wLastID
+=
offset
;
firstID
=
0
;
firstID
=
0
;
int
page
=
(
int
)(
Math
.
Ceiling
(
1.0
*
wLastID
/
Size
));
int
page
=
wLastID
/
Size
;
TotalPages
=
page
+
(
int
)(
Math
.
Ceiling
((
1.0
*
(
lastID
-
wLastID
)
/
Size
)));
int
page1st_size
=
wLastID
%
Size
;
int
totalpages
=
(
int
)(
Math
.
Ceiling
((
1.0
*
(
lastID
-
page1st_size
)
/
Size
)));
if
(
page1st_size
!=
0
)
{
page
++;
totalpages
++;
}
CurrentPage
=
page
;
CurrentPage
=
page
;
TotalPages
=
totalpages
;
if
(
CurrentPage
<=
1
)
if
(
CurrentPage
<=
1
)
IsFirstPage
=
true
;
IsFirstPage
=
true
;
else
else
...
...
Project.FLY.OBJComponents/OBJComponents/Client/BuffserServiceClient.cs
View file @
f504e6ba
...
@@ -17,7 +17,7 @@ namespace FLY.OBJComponents.Client
...
@@ -17,7 +17,7 @@ namespace FLY.OBJComponents.Client
public
class
BufferServiceClient
<
T
>
:
FObj
,
IBuffer
<
T
>
public
class
BufferServiceClient
<
T
>
:
FObj
,
IBuffer
<
T
>
{
{
#
region
property
#
region
property
public
int
NewestID
{
get
;
private
set
;
}
=
0
;
public
int
NewestID
{
get
;
private
set
;
}
=
-
1
;
public
int
Count
{
get
;
private
set
;
}
=
0
;
public
int
Count
{
get
;
private
set
;
}
=
0
;
/// <summary>
/// <summary>
/// 总容量,当总数量 大于等于 总容量的 100%, 前面的10%数据会被删除
/// 总容量,当总数量 大于等于 总容量的 100%, 前面的10%数据会被删除
...
@@ -45,11 +45,12 @@ namespace FLY.OBJComponents.Client
...
@@ -45,11 +45,12 @@ namespace FLY.OBJComponents.Client
{
{
if
(
isIgnore
)
if
(
isIgnore
)
return
;
return
;
Dictionary
<
string
,
object
>
datas
=
new
Dictionary
<
string
,
object
>();
Dictionary
<
string
,
object
>
datas
=
new
Dictionary
<
string
,
object
>
datas
.
Add
(
e
.
PropertyName
,
Misc
.
PropertiesManager
.
GetValue
(
sender
,
e
.
PropertyName
));
{
{
e
.
PropertyName
,
Misc
.
PropertiesManager
.
GetValue
(
sender
,
e
.
PropertyName
)
}
};
string
json
=
JsonConvert
.
SerializeObject
(
datas
);
string
json
=
JsonConvert
.
SerializeObject
(
datas
);
CurrObjSys
.
SetValueEx
(
mConn
,
mServerID
,
ID
,
BUFFER_OBJ_INTERFACE
.
SET_PARAMS
,
CurrObjSys
.
SetValueEx
(
mConn
,
mServerID
,
ID
,
BUFFER_OBJ_INTERFACE
.
SET_PARAMS
,
Misc
.
Converter
.
StringToBytes
(
json
));
Misc
.
Converter
.
StringToBytes
(
json
));
}
}
...
@@ -92,6 +93,8 @@ namespace FLY.OBJComponents.Client
...
@@ -92,6 +93,8 @@ namespace FLY.OBJComponents.Client
Dictionary
<
string
,
object
>
datas
=
JsonConvert
.
DeserializeObject
<
Dictionary
<
string
,
object
>>(
json
);
Dictionary
<
string
,
object
>
datas
=
JsonConvert
.
DeserializeObject
<
Dictionary
<
string
,
object
>>(
json
);
//设置属性
//屏蔽属性改变后,设置到服务器
isIgnore
=
true
;
isIgnore
=
true
;
foreach
(
KeyValuePair
<
string
,
object
>
kv
in
datas
)
foreach
(
KeyValuePair
<
string
,
object
>
kv
in
datas
)
...
@@ -129,12 +132,6 @@ namespace FLY.OBJComponents.Client
...
@@ -129,12 +132,6 @@ namespace FLY.OBJComponents.Client
switch
(
funcid
)
switch
(
funcid
)
{
{
case
BUFFER_OBJ_INTERFACE
.
CALL_GETRECORD
:
case
BUFFER_OBJ_INTERFACE
.
CALL_GETRECORD
:
{
string
json
=
Misc
.
Converter
.
BytesToString
(
retdata
);
GetRecordReponse
<
T
>
p
=
JsonConvert
.
DeserializeObject
<
GetRecordReponse
<
T
>>(
json
);
((
AsyncCBHandler
)
AsyncDelegate
)(
AsyncState
,
p
);
}
break
;
case
BUFFER_OBJ_INTERFACE
.
CALL_GETRECORD_NEWEST
:
case
BUFFER_OBJ_INTERFACE
.
CALL_GETRECORD_NEWEST
:
{
{
string
json
=
Misc
.
Converter
.
BytesToString
(
retdata
);
string
json
=
Misc
.
Converter
.
BytesToString
(
retdata
);
...
@@ -152,7 +149,12 @@ namespace FLY.OBJComponents.Client
...
@@ -152,7 +149,12 @@ namespace FLY.OBJComponents.Client
public
void
GetRecord
(
int
last_id
,
int
count
,
AsyncCBHandler
asyncCB
,
object
asyncContext
)
public
void
GetRecord
(
int
last_id
,
int
count
,
AsyncCBHandler
asyncCB
,
object
asyncContext
)
{
{
BUFFER_OBJ_INTERFACE
.
Pack_GetRecordRequest
request
=
new
BUFFER_OBJ_INTERFACE
.
Pack_GetRecordRequest
()
{
last_id
=
last_id
,
count
=
count
};
BUFFER_OBJ_INTERFACE
.
Pack_GetRecordRequest
request
=
new
BUFFER_OBJ_INTERFACE
.
Pack_GetRecordRequest
()
{
last_id
=
last_id
,
count
=
count
};
string
json
=
JsonConvert
.
SerializeObject
(
request
);
string
json
=
JsonConvert
.
SerializeObject
(
request
);
CurrObjSys
.
CallFunctionEx
(
mConn
,
mServerID
,
ID
,
BUFFER_OBJ_INTERFACE
.
CALL_GETRECORD
,
CurrObjSys
.
CallFunctionEx
(
mConn
,
mServerID
,
ID
,
BUFFER_OBJ_INTERFACE
.
CALL_GETRECORD
,
...
@@ -162,7 +164,10 @@ namespace FLY.OBJComponents.Client
...
@@ -162,7 +164,10 @@ namespace FLY.OBJComponents.Client
}
}
public
void
GetRecord
(
int
count
,
AsyncCBHandler
asyncCB
,
object
asyncContext
)
public
void
GetRecord
(
int
count
,
AsyncCBHandler
asyncCB
,
object
asyncContext
)
{
{
BUFFER_OBJ_INTERFACE
.
Pack_GetRecordNewestRequest
request
=
new
BUFFER_OBJ_INTERFACE
.
Pack_GetRecordNewestRequest
()
{
count
=
count
};
BUFFER_OBJ_INTERFACE
.
Pack_GetRecordNewestRequest
request
=
new
BUFFER_OBJ_INTERFACE
.
Pack_GetRecordNewestRequest
()
{
count
=
count
};
string
json
=
JsonConvert
.
SerializeObject
(
request
);
string
json
=
JsonConvert
.
SerializeObject
(
request
);
CurrObjSys
.
CallFunctionEx
(
mConn
,
mServerID
,
ID
,
BUFFER_OBJ_INTERFACE
.
CALL_GETRECORD_NEWEST
,
CurrObjSys
.
CallFunctionEx
(
mConn
,
mServerID
,
ID
,
BUFFER_OBJ_INTERFACE
.
CALL_GETRECORD_NEWEST
,
...
...
Project.FLY.OBJComponents/OBJComponents/Common/NotifyBufferChangedEventArgs.cs
View file @
f504e6ba
...
@@ -20,7 +20,7 @@ namespace FLY.OBJComponents.Common
...
@@ -20,7 +20,7 @@ namespace FLY.OBJComponents.Common
{
{
public
NotifyBufferChangedAction
Action
{
get
;
set
;
}
public
NotifyBufferChangedAction
Action
{
get
;
set
;
}
public
IList
<
T
>
Items
{
get
;
set
;
}
public
IList
<
T
>
Items
{
get
;
set
;
}
public
int
StartingIndex
{
get
;
set
;
}
public
int
EndingID
{
get
;
set
;
}
}
}
public
enum
NotifyBufferChangedAction
public
enum
NotifyBufferChangedAction
...
...
Project.FLY.OBJComponents/OBJComponents/Server.OBJProxy/Buffer_OBJProxy.cs
View file @
f504e6ba
...
@@ -36,8 +36,10 @@ namespace FLY.OBJComponents.Server.OBJProxy
...
@@ -36,8 +36,10 @@ namespace FLY.OBJComponents.Server.OBJProxy
private
void
Buffer_PropertyChanged
(
object
sender
,
System
.
ComponentModel
.
PropertyChangedEventArgs
e
)
private
void
Buffer_PropertyChanged
(
object
sender
,
System
.
ComponentModel
.
PropertyChangedEventArgs
e
)
{
{
Dictionary
<
string
,
object
>
p
=
new
Dictionary
<
string
,
object
>();
Dictionary
<
string
,
object
>
p
=
new
Dictionary
<
string
,
object
>
p
.
Add
(
e
.
PropertyName
,
Misc
.
PropertiesManager
.
GetValue
(
buffer
,
e
.
PropertyName
));
{
{
e
.
PropertyName
,
Misc
.
PropertiesManager
.
GetValue
(
sender
,
e
.
PropertyName
)
}
};
string
json
=
JsonConvert
.
SerializeObject
(
p
);
string
json
=
JsonConvert
.
SerializeObject
(
p
);
CurrObjSys
.
PushObjInfoEx
(
CurrObjSys
.
PushObjInfoEx
(
...
@@ -62,9 +64,6 @@ namespace FLY.OBJComponents.Server.OBJProxy
...
@@ -62,9 +64,6 @@ namespace FLY.OBJComponents.Server.OBJProxy
}
}
}
}
break
;
break
;
default
:
infodata
=
null
;
break
;
}
}
}
}
...
...
Project.FLY.OBJComponents/OBJComponents/Server/Buffer.cs
View file @
f504e6ba
...
@@ -20,7 +20,7 @@ namespace FLY.OBJComponents.Server
...
@@ -20,7 +20,7 @@ namespace FLY.OBJComponents.Server
public
List
<
T
>
list
=
new
List
<
T
>();
public
List
<
T
>
list
=
new
List
<
T
>();
#
region
property
#
region
property
public
int
NewestID
{
get
;
set
;
}
public
int
NewestID
{
get
;
set
;
}
=
-
1
;
public
int
Count
{
get
;
private
set
;
}
=
0
;
public
int
Count
{
get
;
private
set
;
}
=
0
;
/// <summary>
/// <summary>
...
@@ -46,11 +46,14 @@ namespace FLY.OBJComponents.Server
...
@@ -46,11 +46,14 @@ namespace FLY.OBJComponents.Server
public
int
GetID
(
int
idx
)
public
int
GetID
(
int
idx
)
{
{
return
NewestID
-
(
list
.
Count
()
-
1
-
idx
);
int
offset
=
(
NewestID
-
(
list
.
Count
()
-
1
));
return
offset
+
idx
;
}
}
public
int
GetIndex
(
int
id
)
public
int
GetIndex
(
int
id
)
{
{
return
list
.
Count
()
-
1
-
(
NewestID
-
id
);
int
offset
=
(
NewestID
-
(
list
.
Count
()
-
1
));
return
id
-
offset
;
}
}
public
void
Add
(
T
t
)
public
void
Add
(
T
t
)
{
{
...
@@ -61,7 +64,6 @@ namespace FLY.OBJComponents.Server
...
@@ -61,7 +64,6 @@ namespace FLY.OBJComponents.Server
list
.
RemoveRange
(
0
,
Capacity
/
10
);
list
.
RemoveRange
(
0
,
Capacity
/
10
);
}
}
if
(
list
.
Count
()
!=
1
)
NewestID
++;
NewestID
++;
Count
=
list
.
Count
();
Count
=
list
.
Count
();
...
@@ -72,7 +74,7 @@ namespace FLY.OBJComponents.Server
...
@@ -72,7 +74,7 @@ namespace FLY.OBJComponents.Server
{
{
Action
=
NotifyBufferChangedAction
.
Add
,
Action
=
NotifyBufferChangedAction
.
Add
,
Items
=
new
T
[]
{
t
},
Items
=
new
T
[]
{
t
},
StartingIndex
=
NewestID
EndingID
=
NewestID
});
});
}
}
public
void
AddRange
(
IList
<
T
>
array
)
public
void
AddRange
(
IList
<
T
>
array
)
...
@@ -84,7 +86,6 @@ namespace FLY.OBJComponents.Server
...
@@ -84,7 +86,6 @@ namespace FLY.OBJComponents.Server
list
.
RemoveRange
(
0
,
Capacity
/
10
);
list
.
RemoveRange
(
0
,
Capacity
/
10
);
}
}
if
(
list
.
Count
()
!=
1
)
NewestID
+=
array
.
Count
();
NewestID
+=
array
.
Count
();
Count
=
list
.
Count
();
Count
=
list
.
Count
();
...
@@ -93,7 +94,7 @@ namespace FLY.OBJComponents.Server
...
@@ -93,7 +94,7 @@ namespace FLY.OBJComponents.Server
{
{
Action
=
NotifyBufferChangedAction
.
Add
,
Action
=
NotifyBufferChangedAction
.
Add
,
Items
=
array
,
Items
=
array
,
StartingIndex
=
NewestID
EndingID
=
NewestID
});
});
}
}
public
override
string
ToString
()
public
override
string
ToString
()
...
@@ -111,7 +112,7 @@ namespace FLY.OBJComponents.Server
...
@@ -111,7 +112,7 @@ namespace FLY.OBJComponents.Server
{
{
Action
=
NotifyBufferChangedAction
.
Replace
,
Action
=
NotifyBufferChangedAction
.
Replace
,
Items
=
new
T
[]
{
t
},
Items
=
new
T
[]
{
t
},
StartingIndex
=
id
EndingID
=
id
});
});
}
}
public
void
Remove
(
int
id
)
public
void
Remove
(
int
id
)
...
@@ -127,14 +128,14 @@ namespace FLY.OBJComponents.Server
...
@@ -127,14 +128,14 @@ namespace FLY.OBJComponents.Server
new
NotifyBufferChangedEventArgs
<
T
>()
new
NotifyBufferChangedEventArgs
<
T
>()
{
{
Action
=
NotifyBufferChangedAction
.
Remove
,
Action
=
NotifyBufferChangedAction
.
Remove
,
StartingIndex
=
id
,
EndingID
=
id
,
Items
=
new
T
[]
{
t
}
Items
=
new
T
[]
{
t
}
});
});
}
}
public
void
Reset
()
public
void
Reset
()
{
{
list
.
Clear
();
list
.
Clear
();
NewestID
=
0
;
NewestID
=
-
1
;
Count
=
0
;
Count
=
0
;
BufferChanged
?.
Invoke
(
this
,
BufferChanged
?.
Invoke
(
this
,
new
NotifyBufferChangedEventArgs
<
T
>()
new
NotifyBufferChangedEventArgs
<
T
>()
...
...
Project.FLY.OBJComponents/OBJComponents/Server/WarningSystem.cs
View file @
f504e6ba
...
@@ -52,12 +52,13 @@ namespace FLY.OBJComponents.Server
...
@@ -52,12 +52,13 @@ namespace FLY.OBJComponents.Server
public
void
Add
(
byte
errcode
,
string
description
,
ERR_STATE
state
)
public
void
Add
(
byte
errcode
,
string
description
,
ERR_STATE
state
)
{
{
FlyData_WarningHistory
reason
=
new
FlyData_WarningHistory
();
FlyData_WarningHistory
reason
=
new
FlyData_WarningHistory
reason
.
Time
=
DateTime
.
Now
;
{
Time
=
DateTime
.
Now
,
reason
.
ErrCode
=
errcode
;
ErrCode
=
errcode
,
reason
.
Description
=
description
;
Description
=
description
,
reason
.
State
=
state
;
State
=
state
};
FlyData_WarningHistory
error
=
null
;
FlyData_WarningHistory
error
=
null
;
Buffer
<
FlyData_WarningHistory
>
reasonList
=
ReasonList
as
Buffer
<
FlyData_WarningHistory
>;
Buffer
<
FlyData_WarningHistory
>
reasonList
=
ReasonList
as
Buffer
<
FlyData_WarningHistory
>;
...
@@ -77,7 +78,7 @@ namespace FLY.OBJComponents.Server
...
@@ -77,7 +78,7 @@ namespace FLY.OBJComponents.Server
case
ERR_STATE
.
ON
:
case
ERR_STATE
.
ON
:
if
(
error
==
null
)
if
(
error
==
null
)
{
{
((
Buffer
<
FlyData_WarningHistory
>)
ReasonList
)
.
Add
(
reason
.
Clone
());
reasonList
.
Add
(
reason
.
Clone
());
}
}
else
else
...
@@ -95,7 +96,7 @@ namespace FLY.OBJComponents.Server
...
@@ -95,7 +96,7 @@ namespace FLY.OBJComponents.Server
else
else
{
{
error
.
State
=
state
;
error
.
State
=
state
;
((
Buffer
<
FlyData_WarningHistory
>)
ReasonList
)
.
Remove
(
error_id
);
reasonList
.
Remove
(
error_id
);
}
}
break
;
break
;
...
...
Project.FLY.Weight/FLY.Weight.UI.Server/MainWindow.xaml
View file @
f504e6ba
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<Grid>
<Grid>
<Grid x:Name="grid_plc"/>
<Grid x:Name="grid_plc"/>
<Grid x:Name="grid_plcos"/>
<Grid x:Name="grid_plcos"/>
<Grid x:Name="grid_WeightSystem"/>
<StackPanel Orientation="Vertical" Margin="5">
<StackPanel Orientation="Vertical" Margin="5">
<StackPanel Orientation="Horizontal" >
<StackPanel Orientation="Horizontal" >
...
@@ -26,7 +27,12 @@
...
@@ -26,7 +27,12 @@
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" DataContext="{Binding ElementName=grid_WeightSystem,Path=DataContext}">
<StackPanel Orientation="Vertical">
<CheckBox Content="A层 No.1料斗加料异常" IsChecked="{Binding Items[0].IsErrorOfAdd_1}"/>
<CheckBox Content="B层 No.2料斗加料异常" IsChecked="{Binding Items[1].IsErrorOfAdd_2}"/>
</StackPanel>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
...
...
Project.FLY.Weight/FLY.Weight.UI.Server/MainWindow.xaml.cs
View file @
f504e6ba
...
@@ -45,6 +45,7 @@ namespace FLY.Weight.UI.Server
...
@@ -45,6 +45,7 @@ namespace FLY.Weight.UI.Server
mTDGage
.
mData
.
PLCos
as
FLY
.
OBJComponents
.
Server
.
PLCProxySystem
;
mTDGage
.
mData
.
PLCos
as
FLY
.
OBJComponents
.
Server
.
PLCProxySystem
;
grid_plcos
.
DataContext
=
plsos
;
grid_plcos
.
DataContext
=
plsos
;
grid_plc
.
DataContext
=
plsos
.
PLCs
[
0
];
grid_plc
.
DataContext
=
plsos
.
PLCs
[
0
];
grid_WeightSystem
.
DataContext
=
mTDGage
.
mData
;
}
}
}
}
}
}
hemei.sln
View file @
f504e6ba
...
@@ -73,6 +73,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyADBase", "Project.FLY.Fl
...
@@ -73,6 +73,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlyADBase", "Project.FLY.Fl
EndProject
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TCPManager", "Project.FLY.FObjSys\TCPManager\TCPManager.csproj", "{7D455950-7D7D-4C79-8E9C-4CF53F09559A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TCPManager", "Project.FLY.FObjSys\TCPManager\TCPManager.csproj", "{7D455950-7D7D-4C79-8E9C-4CF53F09559A}"
EndProject
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Thick-Common", "Thick-Common", "{2488C4FB-3677-405B-BE1B-C9F532708DE3}"
EndProject
Global
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Any CPU = Debug|Any CPU
...
@@ -434,15 +436,20 @@ Global
...
@@ -434,15 +436,20 @@ Global
HideSolutionNode = FALSE
HideSolutionNode = FALSE
EndGlobalSection
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
GlobalSection(NestedProjects) = preSolution
{6D4B9BDA-2A66-4583-B244-758BC4213D9F} = {2488C4FB-3677-405B-BE1B-C9F532708DE3}
{88EFEDF8-8228-4EEE-90AF-1EBF747B9FAB} = {4439B7B4-75FB-48D3-8705-BB6C46802F23}
{88EFEDF8-8228-4EEE-90AF-1EBF747B9FAB} = {4439B7B4-75FB-48D3-8705-BB6C46802F23}
{76C9AC3F-D569-4D2C-BCFD-77421B532BBE} = {4439B7B4-75FB-48D3-8705-BB6C46802F23}
{76C9AC3F-D569-4D2C-BCFD-77421B532BBE} = {4439B7B4-75FB-48D3-8705-BB6C46802F23}
{10C1112E-B7D6-4ACF-B03F-80C2EE58F17D} = {4439B7B4-75FB-48D3-8705-BB6C46802F23}
{10C1112E-B7D6-4ACF-B03F-80C2EE58F17D} = {4439B7B4-75FB-48D3-8705-BB6C46802F23}
{97C282A9-F2F0-4B3C-A3B0-B351918D5C4D} = {618447B0-5185-4A52-878E-4C380741E839}
{97C282A9-F2F0-4B3C-A3B0-B351918D5C4D} = {618447B0-5185-4A52-878E-4C380741E839}
{654515F2-CAAE-450B-A344-547321836E8F} = {618447B0-5185-4A52-878E-4C380741E839}
{654515F2-CAAE-450B-A344-547321836E8F} = {618447B0-5185-4A52-878E-4C380741E839}
{F0D844CD-3B55-4D3F-88CA-40EC4CDFE1DD} = {618447B0-5185-4A52-878E-4C380741E839}
{F0D844CD-3B55-4D3F-88CA-40EC4CDFE1DD} = {618447B0-5185-4A52-878E-4C380741E839}
{119C3ADC-F8E1-4F72-B89B-006236FF8586} = {2488C4FB-3677-405B-BE1B-C9F532708DE3}
{A539505D-9AC0-426B-A9A0-197DF50598B0} = {2488C4FB-3677-405B-BE1B-C9F532708DE3}
{5EE61AC6-5269-4F0F-B8FA-4334FE4A678F} = {2488C4FB-3677-405B-BE1B-C9F532708DE3}
{A989E480-3730-4B26-809F-DFF94D145D6E} = {086F6EF1-272B-4AFE-89DD-D6EDDF8333E6}
{A989E480-3730-4B26-809F-DFF94D145D6E} = {086F6EF1-272B-4AFE-89DD-D6EDDF8333E6}
{9A289B5D-24AA-4031-86C7-1300B4FDCB55} = {086F6EF1-272B-4AFE-89DD-D6EDDF8333E6}
{9A289B5D-24AA-4031-86C7-1300B4FDCB55} = {086F6EF1-272B-4AFE-89DD-D6EDDF8333E6}
{6B762AA7-5C5F-4E1D-AC6A-CAF327056EBE} = {086F6EF1-272B-4AFE-89DD-D6EDDF8333E6}
{6B762AA7-5C5F-4E1D-AC6A-CAF327056EBE} = {086F6EF1-272B-4AFE-89DD-D6EDDF8333E6}
{ABFE87D4-B692-4AE9-A8C0-1F470B8ACBB8} = {2488C4FB-3677-405B-BE1B-C9F532708DE3}
{CC20ABEB-59F6-492B-A963-51121EB5AE66} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{CC20ABEB-59F6-492B-A963-51121EB5AE66} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{EC11911F-D868-49EA-BDA4-9F91CA7186AF} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{EC11911F-D868-49EA-BDA4-9F91CA7186AF} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{973DE547-A50D-4FF0-90A4-15FCCE8771BD} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{973DE547-A50D-4FF0-90A4-15FCCE8771BD} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
...
@@ -453,8 +460,11 @@ Global
...
@@ -453,8 +460,11 @@ Global
{FB1D06A7-081C-48B7-A3D9-136C7162BB9F} = {5D1BC40E-05AA-4682-B637-4F522EEB82E9}
{FB1D06A7-081C-48B7-A3D9-136C7162BB9F} = {5D1BC40E-05AA-4682-B637-4F522EEB82E9}
{8E19C40F-CE7F-4982-BD90-4EB4E9E04E34} = {5D1BC40E-05AA-4682-B637-4F522EEB82E9}
{8E19C40F-CE7F-4982-BD90-4EB4E9E04E34} = {5D1BC40E-05AA-4682-B637-4F522EEB82E9}
{2F88B5EC-85BC-4B5E-B254-06D2F2771F67} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{2F88B5EC-85BC-4B5E-B254-06D2F2771F67} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{4DF79671-E814-49BD-864D-8257D6C6E072} = {2488C4FB-3677-405B-BE1B-C9F532708DE3}
{8CAD11B7-BF6E-48BB-92A4-7273FEE9846D} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{8CAD11B7-BF6E-48BB-92A4-7273FEE9846D} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{9C46D98F-6500-490B-9E56-C89DFFFA05F8} = {2488C4FB-3677-405B-BE1B-C9F532708DE3}
{DD8A6858-1261-49F7-86BE-5AC5C3A0EC34} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{DD8A6858-1261-49F7-86BE-5AC5C3A0EC34} = {1262AB40-4503-469A-A00B-50C1AE6A3BA6}
{7D455950-7D7D-4C79-8E9C-4CF53F09559A} = {2488C4FB-3677-405B-BE1B-C9F532708DE3}
EndGlobalSection
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BD78A3E8-6F11-4F24-AB5F-A9F25461F64F}
SolutionGuid = {BD78A3E8-6F11-4F24-AB5F-A9F25461F64F}
...
...
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