Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.Package
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.Package
Commits
331a29fb
Commit
331a29fb
authored
Jan 18, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式调整
parent
ef392993
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
458 additions
and
50 deletions
+458
-50
Lib/DevExpress.Xpf.Themes.VizTheme.v22.1.dll
+0
-0
VIZ.Package.Domain/Message/Application/ApplicationCloseMessage.cs
+4
-0
VIZ.Package.Module.Resource/DevExpreess/Theme/VizThemeThemePalette.cs
+29
-0
VIZ.Package.Module.Resource/Icons/icon_save_30x30.png
+0
-0
VIZ.Package.Module.Resource/Icons/icon_save_as_30x30.png
+0
-0
VIZ.Package.Module.Resource/Icons/icon_save_as_hover_30x30.png
+0
-0
VIZ.Package.Module.Resource/Icons/icon_save_hover_30x30.png
+0
-0
VIZ.Package.Module.Resource/Style/IconButton/IconButton_Default.xaml
+38
-0
VIZ.Package.Module.Resource/VIZ.Package.Module.Resource.csproj
+15
-0
VIZ.Package.Module/Control/ViewModel/ControlViewModel.cs
+25
-2
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/BooleanListCellEdit.xaml.cs
+4
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/DupletListCellEdit.xaml.cs
+4
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FloatListCellEdit.xaml.cs
+5
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FontListCellEdit.xaml.cs
+4
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/ImageListCellEdit.xaml.cs
+4
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/IntegerListCellEdit.xaml.cs
+4
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/RichTextListCellEdit.xaml.cs
+4
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TextListCellEdit.xaml.cs
+4
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TripletListCellEdit.xaml.cs
+4
-0
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditView.xaml
+42
-7
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModel.cs
+85
-0
VIZ.Package.Module/ControlObject/FieldTree/Service/IFieldTreeService.cs
+5
-0
VIZ.Package.Module/ControlObject/FieldTree/ViewModel/FieldTreeViewModel.cs
+10
-17
VIZ.Package.Module/Login/View/LoginView.xaml
+1
-1
VIZ.Package.Module/Main/View/MainView.xaml
+1
-0
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
+23
-4
VIZ.Package.Module/Page/Group/Service/IPageGroupService.cs
+14
-1
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
+74
-3
VIZ.Package.Module/Preview/VizPreview/View/VizPreviewView.xaml
+1
-1
VIZ.Package.Service/DB/ControlObject/ControlObjectService.cs
+14
-0
VIZ.Package.Service/Viz/VizCommandService.cs
+13
-7
VIZ.Package/App.xaml.cs
+6
-1
VIZ.Package/MainWindow.xaml
+5
-5
VIZ.Package/MainWindow.xaml.cs
+2
-0
VIZ.Package/VIZ.Package.csproj
+12
-0
VIZ.Package/packages.config
+2
-0
No files found.
Lib/DevExpress.Xpf.Themes.VizTheme.v22.1.dll
deleted
100644 → 0
View file @
ef392993
File deleted
VIZ.Package.Domain/Message/Application/ApplicationCloseMessage.cs
View file @
331a29fb
...
@@ -11,5 +11,9 @@ namespace VIZ.Package.Domain
...
@@ -11,5 +11,9 @@ namespace VIZ.Package.Domain
/// </summary>
/// </summary>
public
class
ApplicationCloseMessage
public
class
ApplicationCloseMessage
{
{
/// <summary>
/// 是否取消关闭
/// </summary>
public
bool
IsCancel
{
get
;
set
;
}
}
}
}
}
VIZ.Package.Module.Resource/DevExpreess/Theme/VizThemeThemePalette.cs
0 → 100644
View file @
331a29fb
using
DevExpress.Xpf.Core
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Media
;
namespace
VIZ.Package.Module.Resource
{
/// <summary>
/// Viz主题资源
/// </summary>
public
class
VizThemeThemePalette
:
ThemePalette
{
public
VizThemeThemePalette
()
:
base
(
"VizTheme"
)
{
SetColor
(
"HoverBackground"
,
(
Color
)
ColorConverter
.
ConvertFromString
(
"#11FFFFFF"
));
SetColor
(
"Backstage.Button.Background"
,
(
Color
)
ColorConverter
.
ConvertFromString
(
"#FF4E4BDE"
));
SetColor
(
"Backstage.Delimiter"
,
(
Color
)
ColorConverter
.
ConvertFromString
(
"#FF4E4BDE"
));
SetColor
(
"Backstage.HoverBackground"
,
(
Color
)
ColorConverter
.
ConvertFromString
(
"#FF4E4BDE"
));
SetColor
(
"Backstage.Window.Background"
,
(
Color
)
ColorConverter
.
ConvertFromString
(
"#FF4E4BDE"
));
SetColor
(
"Focused"
,
(
Color
)
ColorConverter
.
ConvertFromString
(
"#FF4E4BDE"
));
SetColor
(
"SelectionBackground"
,
(
Color
)
ColorConverter
.
ConvertFromString
(
"#FF4E4BDE"
));
SetColor
(
"SelectionBorder"
,
(
Color
)
ColorConverter
.
ConvertFromString
(
"#FF4E4BDE"
));
SetColor
(
"Window.HeaderButton.SelectionBackground"
,
(
Color
)
ColorConverter
.
ConvertFromString
(
"#FF4E4BDE"
));
}
}
}
VIZ.Package.Module.Resource/Icons/icon_save_30x30.png
0 → 100644
View file @
331a29fb
540 Bytes
VIZ.Package.Module.Resource/Icons/icon_save_as_30x30.png
0 → 100644
View file @
331a29fb
583 Bytes
VIZ.Package.Module.Resource/Icons/icon_save_as_hover_30x30.png
0 → 100644
View file @
331a29fb
722 Bytes
VIZ.Package.Module.Resource/Icons/icon_save_hover_30x30.png
0 → 100644
View file @
331a29fb
615 Bytes
VIZ.Package.Module.Resource/Style/IconButton/IconButton_Default.xaml
View file @
331a29fb
...
@@ -83,5 +83,42 @@
...
@@ -83,5 +83,42 @@
</Setter>
</Setter>
</Style>
</Style>
<!-- IconButton_Menu -->
<Style x:Key="IconButton_Menu" TargetType="fcommon:IconButton">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="BorderBrush" Value="Transparent"></Setter>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="Height" Value="20"></Setter>
<Setter Property="Width" Value="20"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="fcommon:IconButton">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}">
<Grid x:Name="content" Opacity="1">
<Image x:Name="img" Width="20" Height="20" Visibility="Visible"
Source="{TemplateBinding Icon}"></Image>
<Image x:Name="img_hover" Width="20" Height="20" Visibility="Collapsed"
Source="{TemplateBinding IconHover}"></Image>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="content" Property="Opacity" Value="1"></Setter>
<Setter TargetName="img" Property="Visibility" Value="Collapsed"></Setter>
<Setter TargetName="img_hover" Property="Visibility" Value="Visible"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="content" Property="Opacity" Value="0.9"></Setter>
<Setter TargetName="img" Property="Visibility" Value="Collapsed"></Setter>
<Setter TargetName="img_hover" Property="Visibility" Value="Visible"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
VIZ.Package.Module.Resource/VIZ.Package.Module.Resource.csproj
View file @
331a29fb
...
@@ -102,6 +102,7 @@
...
@@ -102,6 +102,7 @@
<Compile Include="Converter\ResourceFileSelectionModeConverter.cs" />
<Compile Include="Converter\ResourceFileSelectionModeConverter.cs" />
<Compile Include="Converter\RichText2TextConverter.cs" />
<Compile Include="Converter\RichText2TextConverter.cs" />
<Compile Include="Converter\RowHandleConverter.cs" />
<Compile Include="Converter\RowHandleConverter.cs" />
<Compile Include="DevExpreess\Theme\VizThemeThemePalette.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
</Compile>
</Compile>
...
@@ -194,5 +195,18 @@
...
@@ -194,5 +195,18 @@
<ItemGroup>
<ItemGroup>
<Resource Include="Images\logo_large.png" />
<Resource Include="Images\logo_large.png" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\icon_save_30x30.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\icon_save_hover_30x30.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\icon_save_as_30x30.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\icon_save_as_hover_30x30.png" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
\ No newline at end of file
VIZ.Package.Module/Control/ViewModel/ControlViewModel.cs
View file @
331a29fb
using
log4net
;
using
DevExpress.Data
;
using
log4net
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
...
@@ -72,10 +73,23 @@ namespace VIZ.Package.Module
...
@@ -72,10 +73,23 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
Take
()
private
void
Take
()
{
{
// 更新控制字段List的值
IFieldTreeService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IFieldTreeService
>(
ViewServiceKeys
.
FIELD_TREE_SERVICE
);
if
(
service
==
null
)
return
;
// 尝试更新控制字段List的值
service
.
TryUpdateControlFieldListValue
();
// 执行上版流程
this
.
Execute
(
this
.
Execute
(
controlObjectAction
:
(
obj
,
conn
)
=>
controlObjectAction
:
(
obj
,
conn
)
=>
{
{
this
.
vizCommandService
.
TakeIn
(
conn
,
ApplicationDomainEx
.
CurrentPage
.
ScenePath
,
ApplicationDomainEx
.
CurrentPage
.
Layer
);
this
.
vizCommandService
.
SetEnabledUpdate
(
conn
,
false
);
this
.
vizCommandService
.
SetObject
(
conn
,
ApplicationDomainEx
.
CurrentPage
.
ScenePath
,
ApplicationDomainEx
.
CurrentPage
.
Layer
);
this
.
vizCommandControlObjectService
.
SetControlObject
(
conn
,
obj
);
this
.
vizCommandService
.
SetEnabledUpdate
(
conn
,
true
);
this
.
vizCommandService
.
Start
(
conn
,
ApplicationDomainEx
.
CurrentPage
.
Layer
);
},
},
pluginAction
:
(
view
,
conns
)
=>
pluginAction
:
(
view
,
conns
)
=>
{
{
...
@@ -147,6 +161,15 @@ namespace VIZ.Package.Module
...
@@ -147,6 +161,15 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
Update
()
private
void
Update
()
{
{
// 更新控制字段List的值
IFieldTreeService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IFieldTreeService
>(
ViewServiceKeys
.
FIELD_TREE_SERVICE
);
if
(
service
==
null
)
return
;
// 尝试更新控制字段List的值
service
.
TryUpdateControlFieldListValue
();
// 执行更新流程
this
.
Execute
(
this
.
Execute
(
controlObjectAction
:
(
obj
,
conn
)
=>
controlObjectAction
:
(
obj
,
conn
)
=>
{
{
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/BooleanListCellEdit.xaml.cs
View file @
331a29fb
...
@@ -64,6 +64,10 @@ namespace VIZ.Package.Module
...
@@ -64,6 +64,10 @@ namespace VIZ.Package.Module
bool
.
TryParse
(
e
.
NewValue
?.
ToString
(),
out
bool
value
);
bool
.
TryParse
(
e
.
NewValue
?.
ToString
(),
out
bool
value
);
// 设置值
IDictionary
<
string
,
object
>
dic
=
cellData
.
Row
as
IDictionary
<
string
,
object
>;
dic
[
columnDefinition
.
FieldName
]
=
value
?
"1"
:
"0"
;
// 向Viz发送指令
// 向Viz发送指令
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
ApplicationDomainEx
.
PreviewConn
,
ApplicationDomainEx
.
PreviewConn
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/DupletListCellEdit.xaml.cs
View file @
331a29fb
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
if
(
columnDefinition
==
null
)
if
(
columnDefinition
==
null
)
return
;
return
;
// 设置值
IDictionary
<
string
,
object
>
dic
=
cellData
.
Row
as
IDictionary
<
string
,
object
>;
dic
[
columnDefinition
.
FieldName
]
=
e
.
NewValue
?.
ToString
()
??
string
.
Empty
;
// 向Viz发送指令
// 向Viz发送指令
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
ApplicationDomainEx
.
PreviewConn
,
ApplicationDomainEx
.
PreviewConn
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FloatListCellEdit.xaml.cs
View file @
331a29fb
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
if
(
columnDefinition
==
null
)
if
(
columnDefinition
==
null
)
return
;
return
;
// 设置值
IDictionary
<
string
,
object
>
dic
=
cellData
.
Row
as
IDictionary
<
string
,
object
>;
dic
[
columnDefinition
.
FieldName
]
=
e
.
NewValue
?.
ToString
()
??
string
.
Empty
;
// 向Viz发送指令
// 向Viz发送指令
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
ApplicationDomainEx
.
PreviewConn
,
ApplicationDomainEx
.
PreviewConn
,
...
@@ -69,7 +73,7 @@ namespace VIZ.Package.Module
...
@@ -69,7 +73,7 @@ namespace VIZ.Package.Module
columnDefinition
.
ControlField
.
FieldIdentifier
,
columnDefinition
.
ControlField
.
FieldIdentifier
,
cellData
.
RowData
.
RowHandle
.
Value
,
cellData
.
RowData
.
RowHandle
.
Value
,
columnDefinition
.
FieldName
,
columnDefinition
.
FieldName
,
e
.
NewValue
?.
ToString
());
e
.
NewValue
?.
ToString
()
??
string
.
Empty
);
}
}
}
}
}
}
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FontListCellEdit.xaml.cs
View file @
331a29fb
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
if
(
columnDefinition
==
null
)
if
(
columnDefinition
==
null
)
return
;
return
;
// 设置值
IDictionary
<
string
,
object
>
dic
=
cellData
.
Row
as
IDictionary
<
string
,
object
>;
dic
[
columnDefinition
.
FieldName
]
=
e
.
NewValue
?.
ToString
()
??
string
.
Empty
;
// 向Viz发送指令
// 向Viz发送指令
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
ApplicationDomainEx
.
PreviewConn
,
ApplicationDomainEx
.
PreviewConn
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/ImageListCellEdit.xaml.cs
View file @
331a29fb
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
if
(
columnDefinition
==
null
)
if
(
columnDefinition
==
null
)
return
;
return
;
// 设置值
IDictionary
<
string
,
object
>
dic
=
cellData
.
Row
as
IDictionary
<
string
,
object
>;
dic
[
columnDefinition
.
FieldName
]
=
e
.
NewValue
?.
ToString
()
??
string
.
Empty
;
// 向Viz发送指令
// 向Viz发送指令
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
ApplicationDomainEx
.
PreviewConn
,
ApplicationDomainEx
.
PreviewConn
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/IntegerListCellEdit.xaml.cs
View file @
331a29fb
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
if
(
columnDefinition
==
null
)
if
(
columnDefinition
==
null
)
return
;
return
;
// 设置值
IDictionary
<
string
,
object
>
dic
=
cellData
.
Row
as
IDictionary
<
string
,
object
>;
dic
[
columnDefinition
.
FieldName
]
=
e
.
NewValue
?.
ToString
()
??
string
.
Empty
;
// 向Viz发送指令
// 向Viz发送指令
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
ApplicationDomainEx
.
PreviewConn
,
ApplicationDomainEx
.
PreviewConn
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/RichTextListCellEdit.xaml.cs
View file @
331a29fb
...
@@ -74,6 +74,10 @@ namespace VIZ.Package.Module
...
@@ -74,6 +74,10 @@ namespace VIZ.Package.Module
string
richText
=
$"
{
RICH_TEXT_LEFT
}{
e
.
NewValue
?.
ToString
()
??
string
.
Empty
}{
RICH_TEXT_RIGHT
}
"
;
string
richText
=
$"
{
RICH_TEXT_LEFT
}{
e
.
NewValue
?.
ToString
()
??
string
.
Empty
}{
RICH_TEXT_RIGHT
}
"
;
// 设置值
IDictionary
<
string
,
object
>
dic
=
cellData
.
Row
as
IDictionary
<
string
,
object
>;
dic
[
columnDefinition
.
FieldName
]
=
richText
;
// 向Viz发送指令
// 向Viz发送指令
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
ApplicationDomainEx
.
PreviewConn
,
ApplicationDomainEx
.
PreviewConn
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TextListCellEdit.xaml.cs
View file @
331a29fb
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
if
(
columnDefinition
==
null
)
if
(
columnDefinition
==
null
)
return
;
return
;
// 设置值
IDictionary
<
string
,
object
>
dic
=
cellData
.
Row
as
IDictionary
<
string
,
object
>;
dic
[
columnDefinition
.
FieldName
]
=
e
.
NewValue
?.
ToString
()
??
string
.
Empty
;
// 向Viz发送指令
// 向Viz发送指令
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
ApplicationDomainEx
.
PreviewConn
,
ApplicationDomainEx
.
PreviewConn
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TripletListCellEdit.xaml.cs
View file @
331a29fb
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
...
@@ -62,6 +62,10 @@ namespace VIZ.Package.Module
if
(
columnDefinition
==
null
)
if
(
columnDefinition
==
null
)
return
;
return
;
// 设置值
IDictionary
<
string
,
object
>
dic
=
cellData
.
Row
as
IDictionary
<
string
,
object
>;
dic
[
columnDefinition
.
FieldName
]
=
e
.
NewValue
?.
ToString
()
??
string
.
Empty
;
// 向Viz发送指令
// 向Viz发送指令
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
this
.
VizCommandControlObjectService
.
SetControlObjectListValue
(
ApplicationDomainEx
.
PreviewConn
,
ApplicationDomainEx
.
PreviewConn
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditView.xaml
View file @
331a29fb
...
@@ -3,22 +3,57 @@
...
@@ -3,22 +3,57 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:common="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:
f
common="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:local="clr-namespace:VIZ.Package.Module"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:FieldEditViewModel}"
d:DataContext="{d:DesignInstance Type=local:FieldEditViewModel}"
d:Background="Black"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.Package.Module.Resource;component/Style/IconButton/IconButton_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="25"></RowDefinition>
<RowDefinition Height="25"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- 描述 -->
<Border Background="#11FFFFFF" Grid.Row="0">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
<TextBlock Text="页:" Margin="8,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
<TextBlock Text="{Binding PageID}" Margin="5,0,0,0" d:Foreground="White"></TextBlock>
<TextBlock Text="场景:" Margin="30,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
<TextBlock Text="{Binding Scene}" Margin="5,0,0,0" d:Foreground="White"></TextBlock>
<TextBlock Text="字段:" Margin="30,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
<TextBlock Text="{Binding Path=ControlField.FieldIdentifier}" Margin="5,0,0,0" d:Foreground="White"></TextBlock>
</StackPanel>
</Border>
<!-- 按钮组 -->
<!-- 按钮组 -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Border Background="#11FFFFFF" Grid.Row="1">
<Button Width="80" Height="24" Content="保存字段" Command="{Binding SaveCommand}"></Button>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
</StackPanel>
<!-- 保存 -->
<fcommon:IconButton Icon="/VIZ.Package.Module.Resource;component/Icons/icon_save_30x30.png"
IconHover="/VIZ.Package.Module.Resource;component/Icons/icon_save_hover_30x30.png"
Style="{StaticResource IconButton_Menu}"
ToolTip="保存" Margin="5,0,0,0"
Command="{Binding SaveCommand}"></fcommon:IconButton>
<!-- 另存为 -->
<fcommon:IconButton Icon="/VIZ.Package.Module.Resource;component/Icons/icon_save_as_30x30.png"
IconHover="/VIZ.Package.Module.Resource;component/Icons/icon_save_as_hover_30x30.png"
Style="{StaticResource IconButton_Menu}"
ToolTip="另保为" Margin="5,0,0,0"
Command="{Binding SaveAsCommand}"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 字段编辑 -->
<!-- 字段编辑 -->
<
common:NavigationControl ItemsSource="{Binding Path=NavigationConfigs}" Grid.Row="1
"
<
fcommon:NavigationControl ItemsSource="{Binding Path=NavigationConfigs}" Grid.Row="2" Margin="0,5,0,0
"
SelectedValue="{Binding Path=SelectedNavigationConfig,Mode=OneWay}"></common:NavigationControl>
SelectedValue="{Binding Path=SelectedNavigationConfig,Mode=OneWay}"></
f
common:NavigationControl>
</Grid>
</Grid>
</UserControl>
</UserControl>
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModel.cs
View file @
331a29fb
...
@@ -37,6 +37,7 @@ namespace VIZ.Package.Module
...
@@ -37,6 +37,7 @@ namespace VIZ.Package.Module
private
void
InitCommand
()
private
void
InitCommand
()
{
{
this
.
SaveCommand
=
new
VCommand
(
this
.
Save
);
this
.
SaveCommand
=
new
VCommand
(
this
.
Save
);
this
.
SaveAsCommand
=
new
VCommand
(
this
.
SaveAs
);
}
}
/// <summary>
/// <summary>
...
@@ -45,6 +46,7 @@ namespace VIZ.Package.Module
...
@@ -45,6 +46,7 @@ namespace VIZ.Package.Module
private
void
InitMessage
()
private
void
InitMessage
()
{
{
ApplicationDomainEx
.
MessageManager
.
Register
<
ControlFieldChangedMessage
>(
this
,
this
.
OnControlFieldChangedMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ControlFieldChangedMessage
>(
this
,
this
.
OnControlFieldChangedMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageOpenMessage
>(
this
,
this
.
OnPageOpenMessage
);
}
}
// =============================================================
// =============================================================
...
@@ -88,6 +90,34 @@ namespace VIZ.Package.Module
...
@@ -88,6 +90,34 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
#
region
PageID
--
页
ID
private
int
?
pageID
;
/// <summary>
/// 页ID
/// </summary>
public
int
?
PageID
{
get
{
return
pageID
;
}
set
{
pageID
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PageID
));
}
}
#
endregion
#
region
Scene
--
场景
private
string
scene
;
/// <summary>
/// 场景
/// </summary>
public
string
Scene
{
get
{
return
scene
;
}
set
{
scene
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Scene
));
}
}
#
endregion
// =============================================================
// =============================================================
// Command
// Command
// =============================================================
// =============================================================
...
@@ -134,11 +164,66 @@ namespace VIZ.Package.Module
...
@@ -134,11 +164,66 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
#
region
SaveAsCommand
--
另存为命令
/// <summary>
/// 另存为命令
/// </summary>
public
VCommand
SaveAsCommand
{
get
;
set
;
}
/// <summary>
/// 另存为
/// </summary>
private
void
SaveAs
()
{
// 当前没有打开的页或模板 || 当前没有打开的项目
if
(
ApplicationDomainEx
.
CurrentPage
==
null
||
ApplicationDomainEx
.
ProjectDbContext
==
null
)
{
DXMessageBox
.
Show
(
"另存失败!"
);
return
;
}
// 页分组服务不可用
IPageGroupService
pageGroupService
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IPageGroupService
>(
ViewServiceKeys
.
PAGE_GROUP_SERVICE
);
if
(
pageGroupService
==
null
)
{
DXMessageBox
.
Show
(
"另存失败!"
);
return
;
}
// 另存模板
if
(
ApplicationDomainEx
.
CurrentPage
is
PageTemplateModel
srcTemplate
)
{
PageModel
page
=
pageGroupService
.
AddPage
(
srcTemplate
);
this
.
controlObjectService
.
CopyControlFields
(
srcTemplate
.
TemplateID
,
page
.
PageID
);
pageGroupService
.
OpenPage
(
page
);
}
// 另存页
else
if
(
ApplicationDomainEx
.
CurrentPage
is
PageModel
srcPage
)
{
PageModel
page
=
pageGroupService
.
CopyPage
();
this
.
controlObjectService
.
CopyControlFields
(
srcPage
.
PageID
,
page
.
PageID
);
pageGroupService
.
OpenPage
(
page
);
}
}
#
endregion
// =============================================================
// =============================================================
// Message
// Message
// =============================================================
// =============================================================
/// <summary>
/// <summary>
/// 页打开消息
/// </summary>
/// <param name="msg">消息</param>
private
void
OnPageOpenMessage
(
PageOpenMessage
msg
)
{
this
.
PageID
=
1000
;
this
.
Scene
=
msg
.
Page
?.
Scene
;
}
/// <summary>
/// 控制字段切换消息
/// 控制字段切换消息
/// </summary>
/// </summary>
/// <param name="msg">消息</param>
/// <param name="msg">消息</param>
...
...
VIZ.Package.Module/ControlObject/FieldTree/Service/IFieldTreeService.cs
View file @
331a29fb
...
@@ -18,5 +18,10 @@ namespace VIZ.Package.Module
...
@@ -18,5 +18,10 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
/// <returns>获取控制对象</returns>
/// <returns>获取控制对象</returns>
ControlObjectModel
GetControlObject
();
ControlObjectModel
GetControlObject
();
/// <summary>
/// 尝试更新控制字段List的值
/// </summary>
void
TryUpdateControlFieldListValue
();
}
}
}
}
VIZ.Package.Module/ControlObject/FieldTree/ViewModel/FieldTreeViewModel.cs
View file @
331a29fb
...
@@ -102,8 +102,8 @@ namespace VIZ.Package.Module
...
@@ -102,8 +102,8 @@ namespace VIZ.Package.Module
get
{
return
selectedControlField
;
}
get
{
return
selectedControlField
;
}
set
set
{
{
//
字段改变处理
//
尝试更新List的值
this
.
beforeControlFieldChanged
(
selectedControlField
,
value
);
this
.
TryUpdateControlFieldListValue
(
);
selectedControlField
=
value
;
selectedControlField
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedControlField
));
this
.
RaisePropertyChanged
(
nameof
(
SelectedControlField
));
...
@@ -186,25 +186,18 @@ namespace VIZ.Package.Module
...
@@ -186,25 +186,18 @@ namespace VIZ.Package.Module
return
this
.
ControlObject
;
return
this
.
ControlObject
;
}
}
// =============================================================
// Private Function
// =============================================================
/// <summary>
/// <summary>
///
控制字段改变之前触发
///
尝试更新控制字段List的值
/// </summary>
/// </summary>
/// <param name="oldField">改变之前的字段</param>
public
void
TryUpdateControlFieldListValue
()
/// <param name="newField">改变之后的字段</param>
private
void
beforeControlFieldChanged
(
ControlFieldNodeModel
oldField
,
ControlFieldNodeModel
newField
)
{
{
// 如果之前的字段为list字段,那么需要更新最新的list值
if
(
this
.
SelectedControlField
==
null
||
this
.
SelectedControlField
.
Type
!=
VizControlFieldType
.
list
)
if
(
oldField
!=
null
&&
oldField
.
Type
==
Storage
.
VizControlFieldType
.
list
)
return
;
IFieldEditService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IFieldEditService
>(
ViewServiceKeys
.
FIELD_EDIT_SERVICE
);
if
(
service
!=
null
)
{
{
IFieldEditService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IFieldEditService
>(
ViewServiceKeys
.
FIELD_EDIT_SERVICE
);
this
.
SelectedControlField
.
Value
=
service
.
GetCurrentEditFieldValue
();
if
(
service
!=
null
)
{
oldField
.
Value
=
service
.
GetCurrentEditFieldValue
();
}
}
}
}
}
}
}
...
...
VIZ.Package.Module/Login/View/LoginView.xaml
View file @
331a29fb
...
@@ -81,6 +81,6 @@
...
@@ -81,6 +81,6 @@
Command="{Binding Path=LoginCommand}"></Button>
Command="{Binding Path=LoginCommand}"></Button>
</Grid>
</Grid>
<dx:WaitIndicator DeferedVisibility="{Binding IsLoading}" Content="Loading..." />
<dx:WaitIndicator DeferedVisibility="{Binding IsLoading}" Content="Loading..."
Grid.RowSpan="2"
/>
</Grid>
</Grid>
</UserControl>
</UserControl>
VIZ.Package.Module/Main/View/MainView.xaml
View file @
331a29fb
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
</dxmvvm:Interaction.Behaviors>
</dxmvvm:Interaction.Behaviors>
<dxdo:DockLayoutManager x:Name="dockLayoutManager" FloatingMode="Desktop" EnableWin32Compatibility="True"
<dxdo:DockLayoutManager x:Name="dockLayoutManager" FloatingMode="Desktop" EnableWin32Compatibility="True"
ViewStyle="Light"
AutoHideExpandMode="MouseDown">
AutoHideExpandMode="MouseDown">
<dxdo:LayoutGroup ItemsSource="{Binding ItemsSource}"></dxdo:LayoutGroup>
<dxdo:LayoutGroup ItemsSource="{Binding ItemsSource}"></dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
</dxdo:DockLayoutManager>
...
...
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
View file @
331a29fb
...
@@ -366,13 +366,32 @@ namespace VIZ.Package.Module
...
@@ -366,13 +366,32 @@ namespace VIZ.Package.Module
/// <param name="msg">消息</param>
/// <param name="msg">消息</param>
private
void
OnApplicationCloseMessage
(
ApplicationCloseMessage
msg
)
private
void
OnApplicationCloseMessage
(
ApplicationCloseMessage
msg
)
{
{
// 项目未打开
if
(
ApplicationDomainEx
.
ProjectDbContext
==
null
)
if
(
ApplicationDomainEx
.
ProjectDbContext
==
null
)
return
;
{
var
result
=
DXMessageBox
.
Show
(
"确定关闭系统?"
,
"提示"
,
MessageBoxButton
.
YesNo
);
if
(
DXMessageBox
.
Show
(
"是否保存项目?"
,
"提示"
,
MessageBoxButton
.
YesNo
)
!=
MessageBoxResult
.
Yes
)
msg
.
IsCancel
=
result
==
MessageBoxResult
.
No
;
return
;
}
// 项目已经打开
else
{
var
result
=
DXMessageBox
.
Show
(
"是否保存项目?"
,
"提示"
,
MessageBoxButton
.
YesNoCancel
);
this
.
SaveProject
();
// 保存项目
if
(
result
==
MessageBoxResult
.
Yes
)
{
this
.
SaveProject
();
return
;
}
// 取消关闭
if
(
result
==
MessageBoxResult
.
Cancel
)
{
msg
.
IsCancel
=
true
;
}
}
}
}
// =====================================================================
// =====================================================================
...
...
VIZ.Package.Module/Page/Group/Service/IPageGroupService.cs
View file @
331a29fb
...
@@ -17,6 +17,19 @@ namespace VIZ.Package.Module
...
@@ -17,6 +17,19 @@ namespace VIZ.Package.Module
/// 添加页
/// 添加页
/// </summary>
/// </summary>
/// <param name="template">模板</param>
/// <param name="template">模板</param>
void
AddPage
(
PageTemplateModel
template
);
/// <returns>页</returns>
PageModel
AddPage
(
PageTemplateModel
template
);
/// <summary>
/// 拷贝页
/// </summary>
/// <returns>页</returns>
PageModel
CopyPage
();
/// <summary>
/// 打开页
/// </summary>
/// <param name="page">页</param>
void
OpenPage
(
PageModel
page
);
}
}
}
}
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
View file @
331a29fb
...
@@ -6,6 +6,7 @@ using System.Collections.ObjectModel;
...
@@ -6,6 +6,7 @@ using System.Collections.ObjectModel;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Web.UI
;
using
System.Windows
;
using
System.Windows
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Core
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain
;
...
@@ -73,6 +74,11 @@ namespace VIZ.Package.Module
...
@@ -73,6 +74,11 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
GHService
ghService
=
new
GHService
();
private
GHService
ghService
=
new
GHService
();
/// <summary>
/// 控制对象服务
/// </summary>
private
ControlObjectService
controlObjectService
=
new
ControlObjectService
();
// ======================================================================================
// ======================================================================================
// Property
// Property
// ======================================================================================
// ======================================================================================
...
@@ -372,10 +378,11 @@ namespace VIZ.Package.Module
...
@@ -372,10 +378,11 @@ namespace VIZ.Package.Module
/// 添加页
/// 添加页
/// </summary>
/// </summary>
/// <param name="template">模板</param>
/// <param name="template">模板</param>
public
void
AddPage
(
PageTemplateModel
template
)
/// <returns>页</returns>
public
PageModel
AddPage
(
PageTemplateModel
template
)
{
{
if
(
this
.
SelectedPageGroupModel
==
null
)
if
(
this
.
SelectedPageGroupModel
==
null
)
return
;
return
null
;
PageAddWindow
window
=
new
PageAddWindow
();
PageAddWindow
window
=
new
PageAddWindow
();
PageAddViewModel
vm
=
window
.
DataContext
as
PageAddViewModel
;
PageAddViewModel
vm
=
window
.
DataContext
as
PageAddViewModel
;
...
@@ -384,7 +391,7 @@ namespace VIZ.Package.Module
...
@@ -384,7 +391,7 @@ namespace VIZ.Package.Module
vm
.
Layer
=
template
.
Layer
;
vm
.
Layer
=
template
.
Layer
;
if
(
window
.
ShowDialog
()
!=
true
)
if
(
window
.
ShowDialog
()
!=
true
)
return
;
return
null
;
PageModel
page
=
new
PageModel
();
PageModel
page
=
new
PageModel
();
page
.
PageID
=
Guid
.
NewGuid
();
page
.
PageID
=
Guid
.
NewGuid
();
...
@@ -415,6 +422,70 @@ namespace VIZ.Package.Module
...
@@ -415,6 +422,70 @@ namespace VIZ.Package.Module
});
});
});
});
}
}
return
page
;
}
/// <summary>
/// 拷贝页
/// </summary>
/// <returns>页</returns>
public
PageModel
CopyPage
()
{
if
(
this
.
SelectedPageGroupModel
==
null
||
this
.
SelectedPageModel
==
null
)
return
null
;
// 当前没有打开的页
if
(
ApplicationDomainEx
.
CurrentPage
==
null
)
return
null
;
PageModel
page
=
new
PageModel
();
page
.
PageID
=
Guid
.
NewGuid
();
page
.
PageGroupID
=
this
.
SelectedPageGroupModel
.
GroupID
;
page
.
Scene
=
this
.
SelectedPageModel
.
Scene
;
page
.
ScenePath
=
this
.
SelectedPageModel
.
ScenePath
;
page
.
ThumbnailUri
=
this
.
SelectedPageModel
.
ThumbnailUri
;
page
.
Remark
=
this
.
SelectedPageModel
.
Remark
;
page
.
Layer
=
this
.
SelectedPageModel
.
Layer
;
page
.
EngineType
=
this
.
SelectedPageModel
.
EngineType
;
page
.
PageType
=
this
.
SelectedPageModel
.
PageType
;
page
.
TemplateID
=
this
.
SelectedPageModel
.
TemplateID
;
page
.
ThumbnailBitmap
=
this
.
SelectedPageModel
.
ThumbnailBitmap
;
page
.
PluginID
=
this
.
SelectedPageModel
.
PluginID
;
page
.
PluginName
=
this
.
SelectedPageModel
.
PluginName
;
this
.
SelectedPageGroupModel
.
Pages
.
Add
(
page
);
if
(
page
.
ThumbnailBitmap
==
null
)
{
ThreadHelper
.
SafeRun
(()
=>
{
var
bmp
=
this
.
ghService
.
GetImage
(
page
.
ThumbnailUri
);
WPFHelper
.
BeginInvoke
(()
=>
{
page
.
ThumbnailBitmap
=
bmp
;
});
});
}
return
page
;
}
/// <summary>
/// 打开页
/// </summary>
/// <param name="page">页</param>
public
void
OpenPage
(
PageModel
page
)
{
PageGroupModel
group
=
this
.
PageGroupModels
.
FirstOrDefault
(
p
=>
p
.
GroupID
==
page
.
PageGroupID
);
if
(
group
==
null
)
return
;
this
.
SelectedPageGroupModel
=
group
;
this
.
SelectedPageModel
=
page
;
this
.
OpenPage
();
}
}
}
}
}
}
VIZ.Package.Module/Preview/VizPreview/View/VizPreviewView.xaml
View file @
331a29fb
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
</StackPanel>
</StackPanel>
</Grid>
</Grid>
<!-- VIZ引擎 -->
<!-- VIZ引擎 -->
<fcommon:WindowHost x:Name="host" Grid.Row="1" Background="
#ff252526" BackColor="#ff252526
">
<fcommon:WindowHost x:Name="host" Grid.Row="1" Background="
Black" BackColor="Black
">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand PassEventArgsToCommand="True" EventName="SizeChanged"
<dxmvvm:EventToCommand PassEventArgsToCommand="True" EventName="SizeChanged"
Command="{Binding Path=WindowHostSizeChangedCommand}"></dxmvvm:EventToCommand>
Command="{Binding Path=WindowHostSizeChangedCommand}"></dxmvvm:EventToCommand>
...
...
VIZ.Package.Service/DB/ControlObject/ControlObjectService.cs
View file @
331a29fb
...
@@ -72,6 +72,20 @@ namespace VIZ.Package.Service
...
@@ -72,6 +72,20 @@ namespace VIZ.Package.Service
}
}
/// <summary>
/// <summary>
/// 拷贝控制字段
/// </summary>
/// <param name="srcID">源ID</param>
/// <param name="distID">目标ID</param>
public
void
CopyControlFields
(
Guid
srcID
,
Guid
distID
)
{
ILiteCollection
<
ControlFieldEntity
>
srcCollection
=
ApplicationDomainEx
.
ProjectDbContext
.
GetControlFiled
(
srcID
);
ILiteCollection
<
ControlFieldEntity
>
dstCollection
=
ApplicationDomainEx
.
ProjectDbContext
.
GetControlFiled
(
distID
);
dstCollection
.
DeleteAll
();
dstCollection
.
Insert
(
srcCollection
.
FindAll
());
}
/// <summary>
/// 获取控制字段
/// 获取控制字段
/// </summary>
/// </summary>
/// <param name="pageBase">页或模板</param>
/// <param name="pageBase">页或模板</param>
...
...
VIZ.Package.Service/Viz/VizCommandService.cs
View file @
331a29fb
...
@@ -231,16 +231,22 @@ namespace VIZ.Package.Service
...
@@ -231,16 +231,22 @@ namespace VIZ.Package.Service
}
}
/// <summary>
/// <summary>
///
上版子
///
设置更新
/// </summary>
/// </summary>
/// <param name="connection">连接</param>
/// <param name="conn">连接</param>
/// <param name="scene">场景</param>
/// <param name="isEnabled">是否启用</param>
public
void
SetEnabledUpdate
(
ConnModel
conn
,
bool
isEnabled
)
{
conn
.
EndpointManager
.
Send
(
$"RENDERER*UPDATE SET
{(
isEnabled
?
1
:
0
)}
"
);
}
/// <summary>
/// 开始动画
/// </summary>
/// <param name="conn">连接</param>
/// <param name="layer">层</param>s
/// <param name="layer">层</param>s
public
void
TakeIn
(
ConnModel
conn
,
string
scene
,
VizLayer
layer
)
public
void
Start
(
ConnModel
conn
,
VizLayer
layer
)
{
{
conn
.
EndpointManager
.
Send
(
"RENDERER*UPDATE SET 0"
);
conn
.
EndpointManager
.
Send
(
$"RENDERER*
{
layer
}
SET_OBJECT
{
scene
}
"
);
conn
.
EndpointManager
.
Send
(
"RENDERER*UPDATE SET 1"
);
conn
.
EndpointManager
.
Send
(
$"RENDERER*
{
layer
}
*STAGE START"
);
conn
.
EndpointManager
.
Send
(
$"RENDERER*
{
layer
}
*STAGE START"
);
}
}
...
...
VIZ.Package/App.xaml.cs
View file @
331a29fb
...
@@ -7,10 +7,12 @@ using System.Linq;
...
@@ -7,10 +7,12 @@ using System.Linq;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows
;
using
System.Windows.Controls.Primitives
;
using
System.Windows.Controls.Primitives
;
using
System.Windows.Media
;
using
VIZ.Framework.Module
;
using
VIZ.Framework.Module
;
using
VIZ.Package.Common
;
using
VIZ.Package.Common
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Module
;
using
VIZ.Package.Module
;
using
VIZ.Package.Module.Resource
;
namespace
VIZ.Package
namespace
VIZ.Package
{
{
...
@@ -22,7 +24,10 @@ namespace VIZ.Package
...
@@ -22,7 +24,10 @@ namespace VIZ.Package
public
App
()
public
App
()
{
{
// 设置DevExpress主题
// 设置DevExpress主题
ApplicationThemeHelper
.
ApplicationThemeName
=
Theme
.
VS2019DarkName
;
VizThemeThemePalette
palette
=
new
VizThemeThemePalette
();
Theme
theme
=
Theme
.
CreateTheme
(
palette
,
Theme
.
VS2019Dark
);
Theme
.
RegisterTheme
(
theme
);
ApplicationThemeHelper
.
ApplicationThemeName
=
theme
.
Name
;
// 初始化LiteDB
// 初始化LiteDB
AppSetup
.
AppendSetup
(
new
AppSetup_InitLiteDB
());
AppSetup
.
AppendSetup
(
new
AppSetup_InitLiteDB
());
...
...
VIZ.Package/MainWindow.xaml
View file @
331a29fb
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:module="clr-namespace:VIZ.Package.Module;assembly=VIZ.Package.Module"
xmlns:module="clr-namespace:VIZ.Package.Module;assembly=VIZ.Package.Module"
Title="魔羯座" Height="1000" Width="1600" ShowTitle="False"
Title="魔羯座" Height="1000" Width="1600" ShowTitle="False"
Padding="0"
WindowStartupLocation="CenterScreen" WindowState="Maximized">
WindowStartupLocation="CenterScreen" WindowState="Maximized">
<dx:ThemedWindow.ToolbarItems>
<dx:ThemedWindow.ToolbarItems>
<!-- 主视图顶部 -->
<!-- 主视图顶部 -->
...
@@ -12,17 +12,17 @@
...
@@ -12,17 +12,17 @@
<Grid>
<Grid>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="
3
5"></RowDefinition>
<RowDefinition Height="
2
5"></RowDefinition>
<RowDefinition Height="
3
5"></RowDefinition>
<RowDefinition Height="
2
5"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- 主视图 -->
<!-- 主视图 -->
<module:MainView></module:MainView>
<module:MainView></module:MainView>
<!-- 状态视图 -->
<!-- 状态视图 -->
<Border B
orderBrush="#ff3f3f46" BorderThickness="1" Grid.Row="1" Margin="0,5,0,0
">
<Border B
ackground="#11ffffff" Grid.Row="1
">
<module:MainStatusView></module:MainStatusView>
<module:MainStatusView></module:MainStatusView>
</Border>
</Border>
<!-- 连接视图 -->
<!-- 连接视图 -->
<Border B
orderBrush="#ff3f3f46" BorderThickness="1" Grid.Row="2" Margin="0,5,0,0
">
<Border B
ackground="#11ffffff" Grid.Row="2
">
<module:MainConnView></module:MainConnView>
<module:MainConnView></module:MainConnView>
</Border>
</Border>
</Grid>
</Grid>
...
...
VIZ.Package/MainWindow.xaml.cs
View file @
331a29fb
...
@@ -45,6 +45,8 @@ namespace VIZ.Package
...
@@ -45,6 +45,8 @@ namespace VIZ.Package
{
{
ApplicationCloseMessage
msg
=
new
ApplicationCloseMessage
();
ApplicationCloseMessage
msg
=
new
ApplicationCloseMessage
();
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
e
.
Cancel
=
msg
.
IsCancel
;
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
VIZ.Package/VIZ.Package.csproj
View file @
331a29fb
...
@@ -68,6 +68,18 @@
...
@@ -68,6 +68,18 @@
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
<HintPath>..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference>
</Reference>
<Reference Include="Mono.Cecil, Version=0.11.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Mdb, Version=0.11.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Pdb, Version=0.11.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Rocks, Version=0.11.4.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
<HintPath>..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Data" />
...
...
VIZ.Package/packages.config
View file @
331a29fb
...
@@ -2,4 +2,5 @@
...
@@ -2,4 +2,5 @@
<
packages
>
<
packages
>
<
package
id
=
"LiteDB"
version
=
"5.0.15"
targetFramework
=
"net48"
/>
<
package
id
=
"LiteDB"
version
=
"5.0.15"
targetFramework
=
"net48"
/>
<
package
id
=
"log4net"
version
=
"2.0.14"
targetFramework
=
"net48"
/>
<
package
id
=
"log4net"
version
=
"2.0.14"
targetFramework
=
"net48"
/>
<
package
id
=
"Mono.Cecil"
version
=
"0.11.4"
targetFramework
=
"net48"
/>
</
packages
>
</
packages
>
\ No newline at end of file
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