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
0b64f6ef
Commit
0b64f6ef
authored
Jun 24, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 FObject.Reflect_SeviceClient Call -> Call2 , 自动获取调用它的函数名。
parent
9f2fb05b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
19 deletions
+50
-19
Reflect_SeviceClient.cs
Project.FLY.FObjSys/FObjBaseReflect/Reflect_SeviceClient.cs
+34
-3
BorderSearchServiceClient.cs
...k.Base/FLY.Thick.Base/Client/BorderSearchServiceClient.cs
+2
-2
FilmPositionDetectServiceClient.cs
.../FLY.Thick.Base/Client/FilmPositionDetectServiceClient.cs
+8
-8
GageInfoServiceClient.cs
...Thick.Base/FLY.Thick.Base/Client/GageInfoServiceClient.cs
+2
-2
InitParamServiceClient.cs
...hick.Base/FLY.Thick.Base/Client/InitParamServiceClient.cs
+1
-1
TDGageServiceClient.cs
...Y.Thick.Base/FLY.Thick.Base/Client/TDGageServiceClient.cs
+3
-3
No files found.
Project.FLY.FObjSys/FObjBaseReflect/Reflect_SeviceClient.cs
View file @
0b64f6ef
...
@@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq;
...
@@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
using
System.Diagnostics
;
using
System.Linq
;
using
System.Linq
;
using
System.Reflection
;
using
System.Reflection
;
using
System.Text
;
using
System.Text
;
...
@@ -373,13 +374,14 @@ namespace FObjBase.Reflect
...
@@ -373,13 +374,14 @@ namespace FObjBase.Reflect
}
}
protected
void
Call
(
string
methodName
,
object
parameters
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
)
void
Call
(
string
methodName
,
object
parameters
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
)
{
{
var
rData
=
new
Reflect_OBJ_INTERFACE
.
ReflectData
()
var
rData
=
new
Reflect_OBJ_INTERFACE
.
ReflectData
()
{
{
name
=
methodName
,
name
=
methodName
,
data
=
parameters
==
null
?
null
:
JObject
.
FromObject
(
parameters
)
data
=
parameters
==
null
?
null
:
JObject
.
FromObject
(
parameters
)
};
};
string
json
=
JsonConvert
.
SerializeObject
(
rData
);
string
json
=
JsonConvert
.
SerializeObject
(
rData
);
CurrObjSys
.
CallFunctionEx
(
mConn
,
mServerID
,
ID
,
CurrObjSys
.
CallFunctionEx
(
mConn
,
mServerID
,
ID
,
...
@@ -387,13 +389,42 @@ namespace FObjBase.Reflect
...
@@ -387,13 +389,42 @@ namespace FObjBase.Reflect
Misc
.
Converter
.
StringToBytes
(
json
),
Misc
.
Converter
.
StringToBytes
(
json
),
asyncDelegate
,
asyncContext
);
asyncDelegate
,
asyncContext
);
}
}
protected
void
Call
(
string
methodName
,
object
parameters
)
{
void
Call
(
string
methodName
,
object
parameters
)
{
Call
(
methodName
,
parameters
,
null
,
null
);
Call
(
methodName
,
parameters
,
null
,
null
);
}
}
protected
void
Call
(
string
methodName
)
void
Call
(
string
methodName
)
{
{
Call
(
methodName
,
null
,
null
,
null
);
Call
(
methodName
,
null
,
null
,
null
);
}
}
protected
void
Call2
(
object
parameters
,
AsyncCBHandler
asyncDelegate
,
object
asyncContext
)
{
System
.
Diagnostics
.
StackTrace
st
=
new
System
.
Diagnostics
.
StackTrace
();
var
frame
=
st
.
GetFrame
(
2
);
var
method
=
frame
.
GetMethod
();
string
methodName
=
method
.
Name
;
Call
(
methodName
,
parameters
,
asyncDelegate
,
asyncContext
);
}
protected
void
Call2
(
object
parameters
)
{
System
.
Diagnostics
.
StackTrace
st
=
new
System
.
Diagnostics
.
StackTrace
();
var
frame
=
st
.
GetFrame
(
2
);
var
method
=
frame
.
GetMethod
();
string
methodName
=
method
.
Name
;
Call
(
methodName
,
parameters
);
}
protected
void
Call2
()
{
System
.
Diagnostics
.
StackTrace
st
=
new
System
.
Diagnostics
.
StackTrace
();
var
frame
=
st
.
GetFrame
(
2
);
var
method
=
frame
.
GetMethod
();
string
methodName
=
method
.
Name
;
Call
(
methodName
);
}
#
endregion
#
endregion
}
}
}
}
Project.FLY.Thick.Base/FLY.Thick.Base/Client/BorderSearchServiceClient.cs
View file @
0b64f6ef
...
@@ -107,11 +107,11 @@ namespace FLY.Thick.Base.Client
...
@@ -107,11 +107,11 @@ namespace FLY.Thick.Base.Client
public
void
GetView
(
AsyncCBHandler
asyncDelegate
,
object
asyncContext
)
public
void
GetView
(
AsyncCBHandler
asyncDelegate
,
object
asyncContext
)
{
{
Call
(
"GetView"
,
null
,
asyncDelegate
,
asyncContext
);
Call
2
(
null
,
asyncDelegate
,
asyncContext
);
}
}
public
void
Apply
()
public
void
Apply
()
{
{
Call
(
"Apply"
);
Call
2
(
);
}
}
}
}
}
}
Project.FLY.Thick.Base/FLY.Thick.Base/Client/FilmPositionDetectServiceClient.cs
View file @
0b64f6ef
...
@@ -106,7 +106,7 @@ namespace FLY.Thick.Base.Client
...
@@ -106,7 +106,7 @@ namespace FLY.Thick.Base.Client
/// <param name="filmPosition">极片位置m</param>
/// <param name="filmPosition">极片位置m</param>
public
void
ResetCore
(
double
filmPosition
)
public
void
ResetCore
(
double
filmPosition
)
{
{
Call
(
"ResetCore"
,
new
{
filmPosition
});
Call
2
(
new
{
filmPosition
});
}
}
/// <summary>
/// <summary>
/// 改变逻辑偏移量,从而设置膜位置为某值
/// 改变逻辑偏移量,从而设置膜位置为某值
...
@@ -114,7 +114,7 @@ namespace FLY.Thick.Base.Client
...
@@ -114,7 +114,7 @@ namespace FLY.Thick.Base.Client
/// <param name="filmPosition"></param>
/// <param name="filmPosition"></param>
public
void
ResetOffset
(
double
filmPosition
)
public
void
ResetOffset
(
double
filmPosition
)
{
{
Call
(
"ResetOffset"
,
new
{
filmPosition
});
Call
2
(
new
{
filmPosition
});
}
}
/// <summary>
/// <summary>
...
@@ -123,14 +123,14 @@ namespace FLY.Thick.Base.Client
...
@@ -123,14 +123,14 @@ namespace FLY.Thick.Base.Client
/// <param name="filmOffset"></param>
/// <param name="filmOffset"></param>
public
void
SetOffset
(
double
filmOffset
)
public
void
SetOffset
(
double
filmOffset
)
{
{
Call
(
"SetOffset"
,
new
{
filmOffset
});
Call
2
(
new
{
filmOffset
});
}
}
/// <summary>
/// <summary>
/// 把膜位置设置为 -VDistanceWithHeader
/// 把膜位置设置为 -VDistanceWithHeader
/// </summary>
/// </summary>
public
void
Reset
()
public
void
Reset
()
{
{
Call
(
"Reset"
);
Call
2
(
);
}
}
...
@@ -141,7 +141,7 @@ namespace FLY.Thick.Base.Client
...
@@ -141,7 +141,7 @@ namespace FLY.Thick.Base.Client
/// <param name="filmPos">极片位置m</param>
/// <param name="filmPos">极片位置m</param>
public
void
SetFilmPosAt01
(
double
filmPos
)
public
void
SetFilmPosAt01
(
double
filmPos
)
{
{
Call
(
"SetFilmPosAt01"
,
new
{
filmPos
});
Call
2
(
new
{
filmPos
});
}
}
/// <summary>
/// <summary>
...
@@ -149,7 +149,7 @@ namespace FLY.Thick.Base.Client
...
@@ -149,7 +149,7 @@ namespace FLY.Thick.Base.Client
/// </summary>
/// </summary>
public
void
Stop
()
public
void
Stop
()
{
{
Call
(
"Stop"
);
Call
2
(
);
}
}
/// <summary>
/// <summary>
...
@@ -157,12 +157,12 @@ namespace FLY.Thick.Base.Client
...
@@ -157,12 +157,12 @@ namespace FLY.Thick.Base.Client
/// </summary>
/// </summary>
public
void
Start
()
public
void
Start
()
{
{
Call
(
"Start"
);
Call
2
(
);
}
}
public
void
Apply
()
public
void
Apply
()
{
{
Call
(
"Apply"
);
Call
2
(
);
}
}
}
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Client/GageInfoServiceClient.cs
View file @
0b64f6ef
...
@@ -55,11 +55,11 @@ namespace FLY.Thick.Base.Client
...
@@ -55,11 +55,11 @@ namespace FLY.Thick.Base.Client
/// </summary>
/// </summary>
public
void
StartMeasure
()
public
void
StartMeasure
()
{
{
Call
(
"StartMeasure"
);
Call
2
(
);
}
}
public
void
Stop
()
public
void
Stop
()
{
{
Call
(
"Stop"
);
Call
2
(
);
}
}
}
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Client/InitParamServiceClient.cs
View file @
0b64f6ef
...
@@ -191,7 +191,7 @@ namespace FLY.Thick.Base.Client
...
@@ -191,7 +191,7 @@ namespace FLY.Thick.Base.Client
public
void
Apply
()
public
void
Apply
()
{
{
Call
(
"Apply"
);
Call
2
(
);
}
}
}
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base/Client/TDGageServiceClient.cs
View file @
0b64f6ef
...
@@ -32,7 +32,7 @@ namespace FLY.Thick.Base.Client
...
@@ -32,7 +32,7 @@ namespace FLY.Thick.Base.Client
/// </summary>
/// </summary>
public
void
StartP1
()
public
void
StartP1
()
{
{
Call
(
"StartP1"
);
Call
2
(
);
}
}
/// <summary>
/// <summary>
///
///
...
@@ -40,7 +40,7 @@ namespace FLY.Thick.Base.Client
...
@@ -40,7 +40,7 @@ namespace FLY.Thick.Base.Client
/// <param name="mode"></param>
/// <param name="mode"></param>
public
void
StartP2
(
STARTP2_MODE
mode
)
public
void
StartP2
(
STARTP2_MODE
mode
)
{
{
Call
(
"StartP2"
,
new
{
mode
});
Call
2
(
new
{
mode
});
}
}
/// <summary>
/// <summary>
///
///
...
@@ -48,7 +48,7 @@ namespace FLY.Thick.Base.Client
...
@@ -48,7 +48,7 @@ namespace FLY.Thick.Base.Client
/// <param name="targetpos"></param>
/// <param name="targetpos"></param>
public
void
RunTo
(
int
targetpos
)
public
void
RunTo
(
int
targetpos
)
{
{
Call
(
"RunTo"
,
new
{
targetpos
});
Call
2
(
new
{
targetpos
});
}
}
#
region
IFObj
成员
#
region
IFObj
成员
...
...
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