Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.TVP
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.TVP
Commits
ea748a40
Commit
ea748a40
authored
Dec 22, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对viz4支持
parent
ddb79947
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
5 deletions
+49
-5
VIZ.TVP.Domain/ApplicationDomainEx.cs
+5
-0
VIZ.TVP.Domain/Manager/LocalVizManager.cs
+19
-0
VIZ.TVP.Domain/VIZ.TVP.Domain.csproj
+1
-0
VIZ.TVP.Module/VizRender/Controller/VizController/VizController.cs
+15
-4
VIZ.TVP.Module/VizRender/ViewModel/VizRenderViewModel.cs
+9
-1
No files found.
VIZ.TVP.Domain/ApplicationDomainEx.cs
View file @
ea748a40
...
@@ -41,6 +41,11 @@ namespace VIZ.TVP.Domain
...
@@ -41,6 +41,11 @@ namespace VIZ.TVP.Domain
public
static
SelectionManager
SelectionManager
{
get
;
private
set
;
}
=
new
SelectionManager
();
public
static
SelectionManager
SelectionManager
{
get
;
private
set
;
}
=
new
SelectionManager
();
/// <summary>
/// <summary>
/// 本地VIZ渲染器管理器
/// </summary>
public
static
LocalVizManager
LocalVizManager
{
get
;
private
set
;
}
=
new
LocalVizManager
();
/// <summary>
/// 当前项目领域
/// 当前项目领域
/// </summary>
/// </summary>
public
static
ProjectDomain
CurrentProjectDomain
{
get
;
set
;
}
public
static
ProjectDomain
CurrentProjectDomain
{
get
;
set
;
}
...
...
VIZ.TVP.Domain/Manager/LocalVizManager.cs
0 → 100644
View file @
ea748a40
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.TVP.Domain
{
/// <summary>
/// 本地VIZ管理器
/// </summary>
public
class
LocalVizManager
{
/// <summary>
/// VIZ渲染器名字
/// </summary>
public
string
VizRendererName
{
get
;
set
;
}
}
}
VIZ.TVP.Domain/VIZ.TVP.Domain.csproj
View file @
ea748a40
...
@@ -75,6 +75,7 @@
...
@@ -75,6 +75,7 @@
<Compile Include="Enum\PluginIDs.cs" />
<Compile Include="Enum\PluginIDs.cs" />
<Compile Include="Enum\ServiceKeys.cs" />
<Compile Include="Enum\ServiceKeys.cs" />
<Compile Include="Manager\DataBaseManager.cs" />
<Compile Include="Manager\DataBaseManager.cs" />
<Compile Include="Manager\LocalVizManager.cs" />
<Compile Include="Manager\PluginManager.cs" />
<Compile Include="Manager\PluginManager.cs" />
<Compile Include="Manager\SelectionManager.cs" />
<Compile Include="Manager\SelectionManager.cs" />
<Compile Include="Manager\TVPConnectionManager.cs" />
<Compile Include="Manager\TVPConnectionManager.cs" />
...
...
VIZ.TVP.Module/VizRender/Controller/VizController/VizController.cs
View file @
ea748a40
using
DevExpress.Mvvm.Native
;
using
DevExpress.Mvvm.Native
;
using
DevExpress.Printing.StreamingPagination
;
using
log4net
;
using
log4net
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -51,8 +52,6 @@ namespace VIZ.TVP.Module
...
@@ -51,8 +52,6 @@ namespace VIZ.TVP.Module
/// <param name="connectionModel">连接模型</param>
/// <param name="connectionModel">连接模型</param>
public
void
StartVizEngine
(
VizRenderView
view
,
string
path
,
TVPConnectionModel
connectionModel
)
public
void
StartVizEngine
(
VizRenderView
view
,
string
path
,
TVPConnectionModel
connectionModel
)
{
{
LocalInfoEntity
info
=
ApplicationDomainEx
.
DataBaseManager
.
LocalInfo
;
this
.
Support
.
IsEngineReady
=
false
;
this
.
Support
.
IsEngineReady
=
false
;
var
dpi
=
WPFHelper
.
GetDpiByGraphics
();
var
dpi
=
WPFHelper
.
GetDpiByGraphics
();
...
@@ -66,6 +65,8 @@ namespace VIZ.TVP.Module
...
@@ -66,6 +65,8 @@ namespace VIZ.TVP.Module
ThreadHelper
.
SafeRun
(()
=>
ThreadHelper
.
SafeRun
(()
=>
{
{
LocalInfoEntity
info
=
ApplicationDomainEx
.
DataBaseManager
.
LocalInfo
;
// Step 1. 启动进程
// Step 1. 启动进程
this
.
VizProcess
=
new
Process
();
this
.
VizProcess
=
new
Process
();
this
.
VizProcess
.
StartInfo
.
WorkingDirectory
=
System
.
IO
.
Path
.
GetDirectoryName
(
path
);
this
.
VizProcess
.
StartInfo
.
WorkingDirectory
=
System
.
IO
.
Path
.
GetDirectoryName
(
path
);
...
@@ -99,8 +100,18 @@ namespace VIZ.TVP.Module
...
@@ -99,8 +100,18 @@ namespace VIZ.TVP.Module
{
{
System
.
Threading
.
Thread
.
Sleep
(
1000
);
System
.
Threading
.
Thread
.
Sleep
(
1000
);
string
cmd
=
$"RENDERER WINDOW_OPEN_ON_PARENT 0x
{
hWnd
.
ToString
(
"X6"
)}
{
width
}
{
height
}
ONAIR"
;
if
(
info
.
LocalEngineType
==
LocalEngineType
.
Eng3
)
connectionModel
.
EndpointManager
.
Send
(
cmd
);
{
string
cmd
=
$"RENDERER WINDOW_OPEN_ON_PARENT 0x
{
hWnd
.
ToString
(
"X6"
)}
{
width
}
{
height
}
ONAIR"
;
connectionModel
.
EndpointManager
.
Send
(
cmd
);
}
else
if
(
info
.
LocalEngineType
==
LocalEngineType
.
Eng4
)
{
// 创建 EDITOR
ApplicationDomainEx
.
LocalVizManager
.
VizRendererName
=
connectionModel
.
EndpointManager
.
Request
(
"EDITOR CREATE RENDERER"
);
string
cmd
=
$"
{
ApplicationDomainEx
.
LocalVizManager
.
VizRendererName
}
WINDOW_OPEN_ON_PARENT 0x
{
hWnd
.
ToString
(
"X6"
)}
{
width
}
{
height
}
ONAIR"
;
connectionModel
.
EndpointManager
.
Send
(
cmd
);
}
WPFHelper
.
Invoke
(()
=>
WPFHelper
.
Invoke
(()
=>
{
{
...
...
VIZ.TVP.Module/VizRender/ViewModel/VizRenderViewModel.cs
View file @
ea748a40
...
@@ -157,6 +157,7 @@ namespace VIZ.TVP.Module
...
@@ -157,6 +157,7 @@ namespace VIZ.TVP.Module
/// </summary>
/// </summary>
private
void
WindowHostSizeChanged
(
System
.
Windows
.
SizeChangedEventArgs
e
)
private
void
WindowHostSizeChanged
(
System
.
Windows
.
SizeChangedEventArgs
e
)
{
{
LocalInfoEntity
info
=
ApplicationDomainEx
.
DataBaseManager
.
LocalInfo
;
TVPConnectionModel
local
=
ApplicationDomainEx
.
TVPConnectionManager
.
LocalConnection
;
TVPConnectionModel
local
=
ApplicationDomainEx
.
TVPConnectionManager
.
LocalConnection
;
if
(
local
==
null
||
!
local
.
IsConnected
)
if
(
local
==
null
||
!
local
.
IsConnected
)
...
@@ -169,7 +170,14 @@ namespace VIZ.TVP.Module
...
@@ -169,7 +170,14 @@ namespace VIZ.TVP.Module
ImageHelper
.
AdjustSize
(
width
,
height
,
1920
,
1080
,
out
width
,
out
height
);
ImageHelper
.
AdjustSize
(
width
,
height
,
1920
,
1080
,
out
width
,
out
height
);
local
.
EndpointManager
.
Send
(
$"RENDERER WINDOW_RESIZE
{
width
}
{
height
}
"
);
if
(
info
.
LocalEngineType
==
LocalEngineType
.
Eng3
)
{
local
.
EndpointManager
.
Send
(
$"RENDERER WINDOW_RESIZE
{
width
}
{
height
}
"
);
}
else
{
local
.
EndpointManager
.
Send
(
$"
{
ApplicationDomainEx
.
LocalVizManager
.
VizRendererName
}
WINDOW_RESIZE
{
width
}
{
height
}
"
);
}
}
}
#
endregion
#
endregion
...
...
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