Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
thick-casting
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-casting
Commits
7e62d955
Commit
7e62d955
authored
Jan 20, 2025
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 WSCF 服务
parent
2f450226
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
87 deletions
+47
-87
FLY.Thick.FilmCasting.sln
FLY.Thick.FilmCasting.sln
+11
-0
MainWindow.xaml.cs
...asting/FLY.Thick.FilmCasting.UI.Server/MainWindow.xaml.cs
+26
-3
FLY.Thick.FilmCasting.csproj
...asting/FLY.Thick.FilmCasting/FLY.Thick.FilmCasting.csproj
+9
-1
OBJProxy.cs
...Casting/FLY.Thick.FilmCasting/Server.OBJProxy/OBJProxy.cs
+0
-76
TDGage.cs
....Thick.FilmCasting/FLY.Thick.FilmCasting/Server/TDGage.cs
+1
-7
No files found.
FLY.Thick.FilmCasting.sln
View file @
7e62d955
...
...
@@ -75,6 +75,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveCharts.Feng.Wpf", "thic
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.Thick.FilmCasting.WebAPI", "Project.FLY.Thick.FilmCasting\FLY.Thick.FilmCasting.WebAPI\FLY.Thick.FilmCasting.WebAPI.csproj", "{3BFDB604-CA63-4034-B967-25DECA190C21}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WSCF", "Project.FLY.Thick.FilmCasting\WSCF\WSCF.csproj", "{712D814B-00B7-4DEC-8105-FE06F25D36A1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
...
...
@@ -323,6 +325,14 @@ Global
{3BFDB604-CA63-4034-B967-25DECA190C21}.Release|Any CPU.Build.0 = Release|Any CPU
{3BFDB604-CA63-4034-B967-25DECA190C21}.Release|x86.ActiveCfg = Release|Any CPU
{3BFDB604-CA63-4034-B967-25DECA190C21}.Release|x86.Build.0 = Release|Any CPU
{712D814B-00B7-4DEC-8105-FE06F25D36A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{712D814B-00B7-4DEC-8105-FE06F25D36A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{712D814B-00B7-4DEC-8105-FE06F25D36A1}.Debug|x86.ActiveCfg = Debug|Any CPU
{712D814B-00B7-4DEC-8105-FE06F25D36A1}.Debug|x86.Build.0 = Debug|Any CPU
{712D814B-00B7-4DEC-8105-FE06F25D36A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{712D814B-00B7-4DEC-8105-FE06F25D36A1}.Release|Any CPU.Build.0 = Release|Any CPU
{712D814B-00B7-4DEC-8105-FE06F25D36A1}.Release|x86.ActiveCfg = Release|Any CPU
{712D814B-00B7-4DEC-8105-FE06F25D36A1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
@@ -358,6 +368,7 @@ Global
{349CDC12-8CA8-4606-957E-F378E118B93D} = {9069666C-D456-4983-8AA5-AEE36F7177FF}
{A7ACD496-9D04-4F8E-B97E-C6C29CE2DE06} = {9069666C-D456-4983-8AA5-AEE36F7177FF}
{3BFDB604-CA63-4034-B967-25DECA190C21} = {084448C0-49B0-44CE-850E-24E6DBE224D1}
{712D814B-00B7-4DEC-8105-FE06F25D36A1} = {084448C0-49B0-44CE-850E-24E6DBE224D1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2E6E5899-CCF7-4DE1-BE64-7EB93DC24D73}
...
...
Project.FLY.Thick.FilmCasting/FLY.Thick.FilmCasting.UI.Server/MainWindow.xaml.cs
View file @
7e62d955
using
FLY.Thick.FilmCasting.Server
;
using
FLY.Thick.FilmCasting.Server.OBJProxy
;
using
FLY.Thick.FilmCasting.Server.WsProxy
;
using
FLY.Thick.FilmCasting.WebAPI
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Navigation
;
using
WebSocketSharp.Server
;
namespace
FLY.Thick.FilmCasting.UI.Server
{
...
...
@@ -14,9 +16,15 @@ namespace FLY.Thick.FilmCasting.UI.Server
{
FLY
.
AppHelper
.
WindowNotifyIconHelper
notifyiconhelper
;
TDGage
mGage
;
OBJProxy
mOBJProxy
;
OBJProxy
s
mOBJProxy
;
PicHistory
picHistory
;
ThkWebApiServer
thkWebApiServer
;
/// <summary>
/// WebSocket 服务
/// </summary>
WebSocketServer
wss
;
WsProxys
thkWsProxys
;
public
MainWindow
()
{
InitializeComponent
();
...
...
@@ -30,10 +38,21 @@ namespace FLY.Thick.FilmCasting.UI.Server
private
async
void
NavigationWindow_Loaded
(
object
sender
,
RoutedEventArgs
e
)
{
mGage
=
new
TDGage
(
"Gage1"
);
string
mParamDirectory
=
"Gage1"
;
if
(!
System
.
IO
.
Directory
.
Exists
(
mParamDirectory
))
{
System
.
IO
.
Directory
.
CreateDirectory
(
mParamDirectory
);
}
System
.
Environment
.
CurrentDirectory
=
mParamDirectory
;
mGage
=
new
TDGage
();
await
mGage
.
Init
();
mOBJProxy
=
new
OBJProxy
(
0
,
mGage
);
mOBJProxy
=
new
OBJProxys
(
0
,
mGage
);
FObjBase
.
FObjSys
.
Currents
[
0
].
Start_Conn_Server
(
Misc
.
StringConverter
.
ToIPEndPoint
(
mGage
.
sysParam
.
Addr
));
FObjBase
.
PollModule
.
Current
.
Start
();
...
...
@@ -49,6 +68,10 @@ namespace FLY.Thick.FilmCasting.UI.Server
thkWebApiServer
.
Init
(
mGage
);
thkWebApiServer
.
Start
();
wss
=
new
WebSocketServer
(
$"ws://localhost:5540/"
);
thkWsProxys
=
new
WsProxys
(
wss
,
mGage
);
wss
.
Start
();
this
.
Hide
();
PgMain
p
=
new
PgMain
();
p
.
Init
(
mGage
,
picHistory
,
thkWebApiServer
);
...
...
Project.FLY.Thick.FilmCasting/FLY.Thick.FilmCasting/FLY.Thick.FilmCasting.csproj
View file @
7e62d955
...
...
@@ -63,7 +63,8 @@
<Compile
Include=
"IService\IShareDbService.cs"
/>
<Compile
Include=
"OBJ_INTERFACE\OBJ_INTERFACE_ID.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"Server.OBJProxy\OBJProxy.cs"
/>
<Compile
Include=
"Server.OBJProxy\OBJProxys.cs"
/>
<Compile
Include=
"Server.WsProxy\WsProxys.cs"
/>
<Compile
Include=
"Server\BoltMapFilmCasting.cs"
/>
<Compile
Include=
"Server\FilmCastingProfile.cs"
/>
<Compile
Include=
"Server\FilmPositionDetect2.cs"
/>
...
...
@@ -109,6 +110,10 @@
<Project>
{4cbabfaa-1c62-4510-ac63-a51ee5fd50ff}
</Project>
<Name>
SQLiteHelper
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\WSCF\WSCF.csproj"
>
<Project>
{712d814b-00b7-4dec-8105-fe06f25d36a1}
</Project>
<Name>
WSCF
</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference
Include=
"AutoMapper"
>
...
...
@@ -123,6 +128,9 @@
<PackageReference
Include=
"PropertyChanged.Fody"
>
<Version>
4.1.0
</Version>
</PackageReference>
<PackageReference
Include=
"WebSocketSharp-netstandard"
>
<Version>
1.0.1
</Version>
</PackageReference>
</ItemGroup>
<ItemGroup
/>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
...
...
Project.FLY.Thick.FilmCasting/FLY.Thick.FilmCasting/Server.OBJProxy/OBJProxy.cs
deleted
100644 → 0
View file @
2f450226
using
FLY.Thick.Base.IService
;
using
FLY.Thick.Base.Server
;
using
FLY.Thick.FilmCasting.Common
;
using
FLY.Thick.FilmCasting.IService
;
using
FLY.Thick.FilmCasting.OBJ_INTERFACE
;
using
IInitParamService
=
FLY
.
Thick
.
FilmCasting
.
IService
.
IInitParamService
;
namespace
FLY.Thick.FilmCasting.Server.OBJProxy
{
public
class
OBJProxy
{
FlyAdService
flyAdService
;
public
OBJProxy
(
int
objsys_idx
,
TDGage
gage
)
{
var
jsonDistOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
JSONDIST_ID
,
typeof
(
OBJComponents
.
IService
.
IJsonDistService
),
new
OBJComponents
.
Server
.
JsonDist
());
var
warnSystemOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
WARNING_OBJ_ID
,
typeof
(
OBJComponents
.
IService
.
IWarningSystem2Service
),
gage
.
warning
);
var
ioDefineObjProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
IO_ID
,
typeof
(
IFlyAdIoDefineService
),
FlyADIODefine
.
Instance
);
var
gageOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
TDGAGE_ID
,
typeof
(
ITDGageService
),
gage
);
var
borderSearchOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
BORDERSEARCH_ID
,
typeof
(
IBorderSearchService
),
gage
.
borderSearch
);
var
curveOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
CURVE_ID
,
typeof
(
ICurveService
),
gage
.
curve
);
var
getSampleOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
GET_SAMPLE_ID
,
typeof
(
IGetSampleService
),
gage
.
getSample
);
var
initParamOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
INITPARAM_ID
,
typeof
(
IInitParamService
),
gage
.
initParam
);
var
scanCorrOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
SCANCORR_ID
,
typeof
(
IScanCorrService
),
gage
.
gmScanCorr
);
var
flyAdOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
FLYAD_ID
,
typeof
(
IFlyADService
),
gage
.
flyAdService
);
var
gageInfoOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
GAGEINFO_ID
,
typeof
(
IGageInfoService
),
gage
.
gmGageInfo
);
var
fixOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
FIX_ID
,
typeof
(
IFixService
),
gage
.
gmFix
);
var
profileOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
PROFILE_ID
,
typeof
(
IFilmCastingProfileService
),
gage
.
profile
);
var
scanWarningOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
SCANWARNING_ID
,
typeof
(
IScanWarningService
),
gage
.
scanWarning
);
var
boltMapOBJProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
BOLTMAP_ID
,
typeof
(
IBoltMapFilmCastingService
),
gage
.
boltmap
);
var
bulkDbObjProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
BULKDB_ID
,
typeof
(
IBulkDbService
),
gage
.
bulkDb
);
var
rejectObjProxy
=
new
FObjBase
.
Reflect
.
Reflect_Proxy
(
objsys_idx
,
OBJ_INTERFACE_ID
.
REJECT_ID
,
typeof
(
IRejectService
),
gage
.
reject
);
FObjBase
.
FObjSys
.
Currents
[
objsys_idx
].
Start_Conn_Server
(
Misc
.
StringConverter
.
ToIPEndPoint
(
gage
.
sysParam
.
Addr
));
}
}
}
Project.FLY.Thick.FilmCasting/FLY.Thick.FilmCasting/Server/TDGage.cs
View file @
7e62d955
...
...
@@ -192,15 +192,9 @@ namespace FLY.Thick.FilmCasting.Server
#
endregion
public
TDGage
(
string
nam
)
public
TDGage
()
{
mParamDirectory
=
nam
;
// @"D:\" + m_name;
if
(!
System
.
IO
.
Directory
.
Exists
(
mParamDirectory
))
{
System
.
IO
.
Directory
.
CreateDirectory
(
mParamDirectory
);
}
System
.
Environment
.
CurrentDirectory
=
mParamDirectory
;
#
region
create
sysParam
=
new
SysParam
(
null
);
//系统参数
...
...
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