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
ee9cc580
Commit
ee9cc580
authored
Feb 27, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://49.233.21.66/liulongfei/VIZ.Package
parents
1d77b812
515bb9e4
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
394 additions
and
59 deletions
+394
-59
VIZ.Package.Domain/ApplicationDomainEx.cs
+6
-1
VIZ.Package.Domain/Enum/MenuItemType.cs
+29
-0
VIZ.Package.Domain/Model/Menu/MenuItemModel.cs
+85
-0
VIZ.Package.Domain/Model/Page/PageModelBase.cs
+14
-0
VIZ.Package.Domain/VIZ.Package.Domain.csproj
+6
-1
VIZ.Package.Module.Resource/Icons/down_32x32.png
+0
-0
VIZ.Package.Module.Resource/VIZ.Package.Module.Resource.csproj
+4
-0
VIZ.Package.Module/Control/ViewModel/ControlViewModel.cs
+54
-7
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/DupletListCellEdit.xaml
+2
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FloatListCellEdit.xaml
+1
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FontListCellEdit.xaml
+2
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/ImageListCellEdit.xaml
+2
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/IntegerListCellEdit.xaml
+1
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/RichTextListCellEdit.xaml
+2
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TextListCellEdit.xaml
+2
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TripletListCellEdit.xaml
+2
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/ListEditPanel.xaml
+4
-2
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditWindow.xaml.cs
+17
-0
VIZ.Package.Module/ControlObject/FieldTree/View/FieldTreeView.xaml
+3
-1
VIZ.Package.Module/Main/Core/MainTopViewMenuDataTemplateSelector.cs
+53
-0
VIZ.Package.Module/Main/View/MainTopView.xaml
+27
-11
VIZ.Package.Module/Main/View/MainTopView.xaml.cs
+1
-1
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
+23
-5
VIZ.Package.Module/Page/Group/PageGroupPluginLifeCycle.cs
+1
-1
VIZ.Package.Module/Page/Group/View/PageAddWindow.xaml
+2
-2
VIZ.Package.Module/Page/Group/View/PageGroupRenameWindow.xaml
+1
-1
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
+10
-4
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
+7
-0
VIZ.Package.Module/Page/Templage/PageTemplatePluginLifeCycle.cs
+1
-1
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
+9
-3
VIZ.Package.Module/Preview/VizPreview/View/VizPreviewView.xaml
+16
-7
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
+3
-0
VIZ.Package.Module/Resource/GHResource/View/GHSceneView.xaml
+2
-2
VIZ.Package.Module/Setting/PluginMapping/View/PluginMappingSettingView.xaml
+1
-1
VIZ.Package.Module/VIZ.Package.Module.csproj
+1
-0
No files found.
VIZ.Package.Domain/ApplicationDomainEx.cs
View file @
ee9cc580
...
...
@@ -134,11 +134,16 @@ namespace VIZ.Package.Domain
public
static
string
VizPreviewRenderer
{
get
;
set
;
}
/// <summary>
/// 当前页
/// 当前页
或模板
/// </summary>
public
static
PageModelBase
CurrentPage
{
get
;
set
;
}
/// <summary>
/// 当前上板的页或模板
/// </summary>
public
static
PageModelBase
CurrentTake
{
get
;
set
;
}
/// <summary>
/// 场景是否正在加载
/// </summary>
public
static
bool
IsSceneLoading
{
get
;
set
;
}
...
...
VIZ.Package.Domain/Enum/MenuItemType.cs
0 → 100644
View file @
ee9cc580
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.Package.Domain
{
/// <summary>
/// 菜单项类型
/// </summary>
public
enum
MenuItemType
{
/// <summary>
/// 按钮
/// </summary>
Button
,
/// <summary>
/// 勾选
/// </summary>
CheckBox
,
/// <summary>
/// 分隔线
/// </summary>
Separator
}
}
VIZ.Package.Domain/Model/Menu/MenuItemModel.cs
0 → 100644
View file @
ee9cc580
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
namespace
VIZ.Package.Domain.Model
{
/// <summary>
/// 菜单项
/// </summary>
public
class
MenuItemModel
:
ModelBase
{
#
region
Icon
--
图标
private
string
icon
;
/// <summary>
/// 图标
/// </summary>
public
string
Icon
{
get
{
return
icon
;
}
set
{
icon
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Icon
));
}
}
#
endregion
#
region
Header
--
头部
private
object
header
;
/// <summary>
/// 头部
/// </summary>
public
object
Header
{
get
{
return
header
;
}
set
{
header
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Header
));
}
}
#
endregion
#
region
Data
--
数据
private
object
data
;
/// <summary>
/// 数据
/// </summary>
public
object
Data
{
get
{
return
data
;
}
set
{
data
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Data
));
}
}
#
endregion
#
region
Type
--
菜单类型
private
MenuItemType
type
;
/// <summary>
/// 菜单类型
/// </summary>
public
MenuItemType
Type
{
get
{
return
type
;
}
set
{
type
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Type
));
}
}
#
endregion
#
region
Command
--
命令
private
VCommand
command
;
/// <summary>
/// 命令
/// </summary>
public
VCommand
Command
{
get
{
return
command
;
}
set
{
command
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Command
));
}
}
#
endregion
}
}
VIZ.Package.Domain/Model/Page/PageModelBase.cs
View file @
ee9cc580
...
...
@@ -157,5 +157,19 @@ namespace VIZ.Package.Domain
}
#
endregion
#
region
IsTake
--
是否上板
private
bool
isTake
;
/// <summary>
/// 是否上板
/// </summary>
public
bool
IsTake
{
get
{
return
isTake
;
}
set
{
isTake
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsTake
));
}
}
#
endregion
}
}
VIZ.Package.Domain/VIZ.Package.Domain.csproj
View file @
ee9cc580
...
...
@@ -79,6 +79,7 @@
<Compile Include="Core\GridColumnDefinition.cs" />
<Compile Include="Core\IHotkeySupport.cs" />
<Compile Include="Enum\ConnGroupStatus.cs" />
<Compile Include="Enum\MenuItemType.cs" />
<Compile Include="Enum\ModulePluginIds.cs" />
<Compile Include="Enum\ViewServiceKeys.cs" />
<Compile Include="Info\VizTreeNodeInfo.cs" />
...
...
@@ -106,6 +107,7 @@
<Compile Include="Model\ControlObject\ControlObjectModel.cs" />
<Compile Include="Model\File\FileModel.cs" />
<Compile Include="Model\File\FolderModel.cs" />
<Compile Include="Model\Menu\MenuItemModel.cs" />
<Compile Include="Model\Page\PageGroupModel.cs" />
<Compile Include="Model\Page\PageModel.cs" />
<Compile Include="Model\Page\PageModelBase.cs" />
...
...
@@ -160,6 +162,8 @@
<Name>VIZ.Package.Storage</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="Message\Control\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
VIZ.Package.Module.Resource/Icons/down_32x32.png
0 → 100644
View file @
ee9cc580
451 Bytes
VIZ.Package.Module.Resource/VIZ.Package.Module.Resource.csproj
View file @
ee9cc580
...
...
@@ -277,5 +277,8 @@
<Resource Include="Icons\update_36x36.png" />
<Resource Include="Icons\update_hover_36x36.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\down_32x32.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
VIZ.Package.Module/Control/ViewModel/ControlViewModel.cs
View file @
ee9cc580
...
...
@@ -96,7 +96,8 @@ namespace VIZ.Package.Module
service
.
TryUpdateControlFieldListValue
();
// 执行上版流程
this
.
Execute
((
obj
,
view
,
conn
)
=>
this
.
Execute
(
action
:
(
obj
,
view
,
conn
)
=>
{
this
.
vizCommandService
.
SetEnabledUpdate
(
conn
,
false
);
try
...
...
@@ -118,6 +119,24 @@ namespace VIZ.Package.Module
}
this
.
vizCommandService
.
SetEnabledUpdate
(
conn
,
true
);
this
.
vizCommandService
.
Start
(
conn
,
ApplicationDomainEx
.
CurrentPage
.
Layer
);
},
over
:
()
=>
{
// 设置当前Take的模板
WPFHelper
.
BeginInvoke
(()
=>
{
if
(
ApplicationDomainEx
.
CurrentTake
!=
null
)
{
ApplicationDomainEx
.
CurrentTake
.
IsTake
=
false
;
}
ApplicationDomainEx
.
CurrentTake
=
ApplicationDomainEx
.
CurrentPage
;
if
(
ApplicationDomainEx
.
CurrentTake
!=
null
)
{
ApplicationDomainEx
.
CurrentTake
.
IsTake
=
true
;
}
});
});
}
...
...
@@ -135,11 +154,13 @@ namespace VIZ.Package.Module
/// </summary>
private
void
Continue
()
{
this
.
Execute
((
obj
,
view
,
conn
)
=>
this
.
Execute
(
action
:
(
obj
,
view
,
conn
)
=>
{
this
.
vizCommandService
.
TakeContinue
(
conn
,
ApplicationDomainEx
.
CurrentPage
.
Layer
);
view
?.
TakeContinue
(
conn
);
});
},
over
:
null
);
}
#
endregion
...
...
@@ -156,10 +177,23 @@ namespace VIZ.Package.Module
/// </summary>
private
void
TakeOut
()
{
this
.
Execute
((
obj
,
view
,
conn
)
=>
this
.
Execute
(
action
:
(
obj
,
view
,
conn
)
=>
{
this
.
vizCommandService
.
TakeOut
(
conn
,
ApplicationDomainEx
.
CurrentPage
.
Layer
);
view
?.
TakeOut
(
conn
);
},
over
:
()
=>
{
// 清理Take状态
WPFHelper
.
BeginInvoke
(()
=>
{
if
(
ApplicationDomainEx
.
CurrentTake
!=
null
)
{
ApplicationDomainEx
.
CurrentTake
.
IsTake
=
false
;
ApplicationDomainEx
.
CurrentTake
=
null
;
}
});
});
}
...
...
@@ -186,7 +220,8 @@ namespace VIZ.Package.Module
service
.
TryUpdateControlFieldListValue
();
// 执行更新流程
this
.
Execute
((
obj
,
view
,
conn
)
=>
this
.
Execute
(
action
:
(
obj
,
view
,
conn
)
=>
{
this
.
vizCommandService
.
SetEnabledUpdate
(
conn
,
false
);
try
...
...
@@ -203,7 +238,8 @@ namespace VIZ.Package.Module
log
.
Error
(
ex
);
}
this
.
vizCommandService
.
SetEnabledUpdate
(
conn
,
true
);
});
},
over
:
null
);
}
#
endregion
...
...
@@ -262,7 +298,8 @@ namespace VIZ.Package.Module
/// 执行
/// </summary>
/// <param name="action">行为</param>
private
void
Execute
(
Action
<
ControlObjectModel
,
IPluginView
,
ConnModel
>
action
)
/// <param name="over">执行完成时处理</param>
private
void
Execute
(
Action
<
ControlObjectModel
,
IPluginView
,
ConnModel
>
action
,
Action
over
)
{
// 是否拥有打开的页或模板页
if
(
ApplicationDomainEx
.
CurrentPage
==
null
)
...
...
@@ -340,6 +377,15 @@ namespace VIZ.Package.Module
}
}
}
try
{
over
?.
Invoke
();
}
catch
(
Exception
ex
)
{
log
.
Error
(
ex
);
}
}
}
}
\ No newline at end of file
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/DupletListCellEdit.xaml
View file @
ee9cc580
...
...
@@ -20,7 +20,8 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"
Background="Transparent" ShowBorder="False"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FloatListCellEdit.xaml
View file @
ee9cc580
...
...
@@ -16,7 +16,7 @@
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="200">
<Grid>
<dxe:TextEdit x:Name="PART_Text" Margin="1"
<dxe:TextEdit x:Name="PART_Text" Margin="1"
Background="Transparent" ShowBorder="False"
MaskType="Numeric" EditValueChanged="EditValueChanged"></dxe:TextEdit>
</Grid>
</local:ListCellEditBase>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FontListCellEdit.xaml
View file @
ee9cc580
...
...
@@ -22,7 +22,8 @@
<ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Width="16" Height="16" Source="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"></Image>
<dxe:TextEdit x:Name="PART_Text" Grid.Column="1" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<dxe:TextEdit x:Name="PART_Text" Grid.Column="1" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"
Background="Transparent" ShowBorder="False"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="2" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/ImageListCellEdit.xaml
View file @
ee9cc580
...
...
@@ -22,7 +22,8 @@
<ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Width="16" Height="16" Source="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"></Image>
<dxe:TextEdit x:Name="PART_Text" Grid.Column="1" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<dxe:TextEdit x:Name="PART_Text" Grid.Column="1" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"
Background="Transparent" ShowBorder="False"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="2" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/IntegerListCellEdit.xaml
View file @
ee9cc580
...
...
@@ -16,7 +16,7 @@
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="200">
<Grid>
<dxe:TextEdit x:Name="PART_Text" Margin="1"
<dxe:TextEdit x:Name="PART_Text" Margin="1"
Background="Transparent" ShowBorder="False"
MaskType="Numeric" Mask="d" EditValueChanged="EditValueChanged"></dxe:TextEdit>
</Grid>
</local:ListCellEditBase>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/RichTextListCellEdit.xaml
View file @
ee9cc580
...
...
@@ -20,7 +20,8 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<dxe:TextEdit x:Name="PART_Text" EditValueChanged="EditValueChanged" Margin="1"
Background="Transparent" ShowBorder="False"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TextListCellEdit.xaml
View file @
ee9cc580
...
...
@@ -20,7 +20,8 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<dxe:TextEdit x:Name="PART_Text" EditValueChanged="EditValueChanged" Margin="1"
Background="Transparent" ShowBorder="False"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TripletListCellEdit.xaml
View file @
ee9cc580
...
...
@@ -20,7 +20,8 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"
Background="Transparent" ShowBorder="False"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/ListEditPanel.xaml
View file @
ee9cc580
...
...
@@ -123,10 +123,12 @@
</ContextMenu>
</dxg:GridControl.ContextMenu>
<dxg:GridControl.View>
<dxg:TableView x:Name="tabView" AllowEditing="True" ShowIndicator="False"
ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
<dxg:TableView x:Name="tabView" AllowEditing="True" ShowIndicator="False"
IsColumnMenuEnabled="False"
NavigationStyle="Cell" EditorShowMode="MouseDown" ShowVerticalLines="False"
ShowGroupPanel="False"
ShowHorizontalLines="False"
AlternateRowBackground="#05ffffff"
ShowGroupPanel="False" RowMinHeight="24"
AllowDrop="True"
ShowBandsPanel="False"
ShowTotalSummary="False"
...
...
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditWindow.xaml.cs
View file @
ee9cc580
...
...
@@ -8,10 +8,12 @@ using System.Windows.Controls;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Interop
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Shapes
;
using
VIZ.Framework.Core
;
using
VIZ.Package.Domain
;
namespace
VIZ.Package.Module
{
...
...
@@ -30,6 +32,11 @@ namespace VIZ.Package.Module
}
/// <summary>
/// 窗口句柄辅助类
/// </summary>
private
WindowInteropHelper
windowInteropHelper
;
/// <summary>
/// 窗口关闭之前触发
/// </summary>
private
void
FieldEditWindow_Closing
(
object
sender
,
System
.
ComponentModel
.
CancelEventArgs
e
)
...
...
@@ -38,6 +45,16 @@ namespace VIZ.Package.Module
this
.
ShowInTaskbar
=
false
;
this
.
Visibility
=
Visibility
.
Collapsed
;
if
(
this
.
Owner
==
null
)
return
;
if
(
this
.
windowInteropHelper
==
null
)
{
this
.
windowInteropHelper
=
new
WindowInteropHelper
(
this
.
Owner
);
}
Win32Helper
.
SetWindowPos
(
this
.
windowInteropHelper
.
Handle
,
new
IntPtr
(
Win32Helper
.
HWND_NOTOPMOST
),
0
,
0
,
0
,
0
,
Win32Helper
.
SWP_NOMOVE
|
Win32Helper
.
SWP_NOSIZE
);
}
}
}
VIZ.Package.Module/ControlObject/FieldTree/View/FieldTreeView.xaml
View file @
ee9cc580
...
...
@@ -38,9 +38,11 @@
<dxg:GridColumn Header="值" FieldName="Value" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="*" AllowResizing="True"></dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TreeListView AllowEditing="False" ShowIndicator="False"
ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
<dxg:TreeListView AllowEditing="False" ShowIndicator="False"
IsColumnMenuEnabled="False"
NavigationStyle="Row" ShowVerticalLines="False"
ShowHorizontalLines="False"
AlternateRowBackground="#05ffffff"
ShowBandsPanel="False"
ShowTotalSummary="False"
ShowFixedTotalSummary="False"
...
...
VIZ.Package.Module/Main/Core/MainTopViewMenuDataTemplateSelector.cs
0 → 100644
View file @
ee9cc580
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Controls
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain.Model
;
namespace
VIZ.Package.Module
{
/// <summary>
/// 主视图菜单模板选择器
/// </summary>
public
class
MainTopViewMenuDataTemplateSelector
:
DataTemplateSelector
{
/// <summary>
/// 勾选框数据模型
/// </summary>
public
DataTemplate
CheckBoxDataTemplate
{
get
;
set
;
}
/// <summary>
/// 按钮数据模板
/// </summary>
public
DataTemplate
ButtonDataTemplate
{
get
;
set
;
}
/// <summary>
/// 分隔线数据模板
/// </summary>
public
DataTemplate
SeparatorTemplate
{
get
;
set
;
}
/// <summary>
/// 选择模板
/// </summary>
/// <returns></returns>
public
override
DataTemplate
SelectTemplate
(
object
item
,
DependencyObject
container
)
{
MenuItemModel
model
=
item
as
MenuItemModel
;
if
(
model
==
null
)
return
null
;
switch
(
model
.
Type
)
{
case
MenuItemType
.
Button
:
return
this
.
ButtonDataTemplate
;
case
MenuItemType
.
CheckBox
:
return
this
.
CheckBoxDataTemplate
;
case
MenuItemType
.
Separator
:
return
this
.
SeparatorTemplate
;
}
return
null
;
}
}
}
VIZ.Package.Module/Main/View/MainTopView.xaml
View file @
ee9cc580
...
...
@@ -18,12 +18,31 @@
<UserControl.Resources>
<fcore:Bool2BoolConverterSimple x:Key="Bool2BoolConverterSimple"></fcore:Bool2BoolConverterSimple>
<DataTemplate x:Key="ViewItemTemplate">
<ContentControl>
<dxb:BarCheckItem Content="{Binding Name}"
IsChecked="{Binding Path=IsClosed,Mode=TwoWay,Converter={StaticResource Bool2BoolConverterSimple}}"></dxb:BarCheckItem>
</ContentControl>
</DataTemplate>
<local:MainTopViewMenuDataTemplateSelector x:Key="MainTopViewMenuDataTemplateSelector">
<local:MainTopViewMenuDataTemplateSelector.ButtonDataTemplate>
<DataTemplate>
<ContentControl>
<dxb:BarButtonItem Glyph="{Binding Icon}" Content="{Binding Header}"
Command="{Binding Path=Command}"></dxb:BarButtonItem>
</ContentControl>
</DataTemplate>
</local:MainTopViewMenuDataTemplateSelector.ButtonDataTemplate>
<local:MainTopViewMenuDataTemplateSelector.CheckBoxDataTemplate>
<DataTemplate>
<ContentControl>
<dxb:BarCheckItem Content="{Binding Data.Name}"
IsChecked="{Binding Path=Data.IsClosed,Mode=TwoWay,Converter={StaticResource Bool2BoolConverterSimple}}"></dxb:BarCheckItem>
</ContentControl>
</DataTemplate>
</local:MainTopViewMenuDataTemplateSelector.CheckBoxDataTemplate>
<local:MainTopViewMenuDataTemplateSelector.SeparatorTemplate>
<DataTemplate>
<ContentControl>
<dxb:BarItemSeparator></dxb:BarItemSeparator>
</ContentControl>
</DataTemplate>
</local:MainTopViewMenuDataTemplateSelector.SeparatorTemplate>
</local:MainTopViewMenuDataTemplateSelector>
</UserControl.Resources>
...
...
@@ -60,11 +79,8 @@
</dxb:BarSubItem>
<dxb:BarSubItem Content="设置" Command="{Binding Path=SettingCommand}">
</dxb:BarSubItem>
<dxb:BarSubItem Content="视图" ItemLinksSource="{Binding Path=ItemsSource}" ItemTemplate="{StaticResource ViewItemTemplate}">
</dxb:BarSubItem>
<dxb:BarSubItem Content="布局">
<dxb:BarButtonItem Content="重置布局" Glyph="/VIZ.Package.Module.Resource;component/Icons/top_icon_layout_20x20.png"
Command="{Binding Path=ResetLayoutCommand}" />
<dxb:BarSubItem Content="视图" ItemLinksSource="{Binding Path=ItemsSource}"
ItemTemplateSelector="{StaticResource MainTopViewMenuDataTemplateSelector}">
</dxb:BarSubItem>
<dxb:BarSubItem Content="帮助">
<dxb:BarButtonItem Content="关于" Glyph="/VIZ.Package.Module.Resource;component/Icons/top_icon_about_20x20.png"
...
...
VIZ.Package.Module/Main/View/MainTopView.xaml.cs
View file @
ee9cc580
...
...
@@ -26,7 +26,7 @@ namespace VIZ.Package.Module
public
MainTopView
()
{
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
MainTopViewModel
());
}
}
...
...
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
View file @
ee9cc580
...
...
@@ -12,6 +12,7 @@ using System.Windows;
using
System.Windows.Forms
;
using
VIZ.Framework.Core
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain.Model
;
using
VIZ.Package.Storage
;
namespace
VIZ.Package.Module
...
...
@@ -107,11 +108,11 @@ namespace VIZ.Package.Module
#
region
ItemsSource
--
视图项
private
ObservableCollection
<
PluginInfo
>
itemsSource
;
private
ObservableCollection
<
MenuItemModel
>
itemsSource
;
/// <summary>
/// 视图项
/// </summary>
public
ObservableCollection
<
PluginInfo
>
ItemsSource
public
ObservableCollection
<
MenuItemModel
>
ItemsSource
{
get
{
return
itemsSource
;
}
set
{
itemsSource
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
ItemsSource
));
}
...
...
@@ -140,9 +141,26 @@ namespace VIZ.Package.Module
this
.
IsAlreadyLoaded
=
true
;
this
.
ItemsSource
=
ApplicationDomainEx
.
PluginInfos
.
Where
(
p
=>
(
p
.
Group
==
ApplicationConstants
.
APPLICATION_GROUP_NAME
||
p
.
Group
==
ApplicationDomainEx
.
VizConfig
.
PluginGroup
)
&&
p
.
PluginType
==
PluginType
.
Module
).
ToObservableCollection
();
List
<
PluginInfo
>
plugins
=
ApplicationDomainEx
.
PluginInfos
.
Where
(
p
=>
(
p
.
Group
==
ApplicationConstants
.
APPLICATION_GROUP_NAME
||
p
.
Group
==
ApplicationDomainEx
.
VizConfig
.
PluginGroup
)
&&
p
.
PluginType
==
PluginType
.
Module
).
ToList
();
var
items
=
plugins
.
Select
(
p
=>
new
MenuItemModel
{
Data
=
p
,
Type
=
MenuItemType
.
CheckBox
}).
ToList
();
items
.
Add
(
new
MenuItemModel
{
Type
=
MenuItemType
.
Separator
});
items
.
Add
(
new
MenuItemModel
{
Header
=
"重置布局"
,
Icon
=
"/VIZ.Package.Module.Resource;component/Icons/top_icon_layout_20x20.png"
,
Type
=
MenuItemType
.
Button
,
Command
=
this
.
ResetLayoutCommand
});
this
.
ItemsSource
=
items
.
ToObservableCollection
();
}
#
endregion
...
...
VIZ.Package.Module/Page/Group/PageGroupPluginLifeCycle.cs
View file @
ee9cc580
...
...
@@ -29,7 +29,7 @@ namespace VIZ.Package.Module
/// <summary>
/// 插件名称
/// </summary>
public
const
string
PLUGIN_NAME
=
"
节目
单"
;
public
const
string
PLUGIN_NAME
=
"
播出
单"
;
/// <summary>
/// 注册
...
...
VIZ.Package.Module/Page/Group/View/PageAddWindow.xaml
View file @
ee9cc580
...
...
@@ -11,7 +11,7 @@
xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:PageAddViewModel}"
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
Title="添加
页
" Height="330" Width="600">
Title="添加
至播出单
" Height="330" Width="600">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
...
...
@@ -46,7 +46,7 @@
SelectedItem="{Binding Path=Layer,Mode=TwoWay}"></dxe:ComboBoxEdit>
<!-- 插件 -->
<TextBlock Text="
插件
:" Grid.Row="3" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
<TextBlock Text="
数据模板
:" Grid.Row="3" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"></TextBlock>
<dxe:ComboBoxEdit Grid.Row="3" Grid.Column="1" Height="30" IsTextEditable="False"
ItemsSource="{Binding Path=TemplatePlugins}" DisplayMember="Name"
SelectedItem="{Binding Path=SelectedTemplatePlugin,Mode=TwoWay}"></dxe:ComboBoxEdit>
...
...
VIZ.Package.Module/Page/Group/View/PageGroupRenameWindow.xaml
View file @
ee9cc580
...
...
@@ -8,7 +8,7 @@
xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:PageGroupRenameViewModel}"
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
Title="
节目
单命名" Height="160" Width="400">
Title="
播出
单命名" Height="160" Width="400">
<dx:ThemedWindow.Resources>
<fcore:StringNotNull2BoolConverter x:Key="StringNotNull2BoolConverter"></fcore:StringNotNull2BoolConverter>
...
...
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
View file @
ee9cc580
...
...
@@ -36,6 +36,9 @@
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleBgConverter"
TrueBrush="#FF0078D7"
FalseBrush="Transparent"></fcore:Bool2SolidColorBrushConverter>
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleTakeConverter"
TrueBrush="#FF67ad5b"
FalseBrush="Transparent"></fcore:Bool2SolidColorBrushConverter>
<!-- 列模板选择器 -->
<common:ColumnDefintionGeneratorTemplateSelector x:Key="ColumnDefintionGeneratorTemplateSelector">
...
...
@@ -50,6 +53,8 @@
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Grid Background="{Binding Path=Row.IsOpen,Converter={StaticResource RowHandleBgConverter}}">
<Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}"
Width="10" HorizontalAlignment="Left"></Rectangle>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
</Grid>
</DataTemplate>
...
...
@@ -221,7 +226,7 @@
<common:ColumnDefintionGeneratorTemplate.DataTemplate>
<DataTemplate>
<ContentControl>
<dxg:GridColumn Header="
插件
" FieldName="PluginName" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False"
<dxg:GridColumn Header="
数据模板
" FieldName="PluginName" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False"
Visible="{Binding Path=Visible,Mode=TwoWay}"
VisibleIndex="{Binding Path=VisibleIndex,Mode=TwoWay}"></dxg:GridColumn>
</ContentControl>
...
...
@@ -301,12 +306,13 @@
</dxg:GridControl.ContextMenu>
<dxg:GridControl.View>
<dxg:TableView IsColumnMenuEnabled="True"
ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
<dxg:TableView IsColumnMenuEnabled="True"
IsColumnChooserVisible="{Binding ElementName=uc, Path=DataContext.IsColumnChooserVisible,Mode=TwoWay}"
AllowEditing="True" ShowIndicator="False" RowMinHeight="69.5"
NavigationStyle="Cell" ShowVerticalLines="False"
NavigationStyle="Cell" ShowVerticalLines="False"
ShowHorizontalLines="False"
ShowGroupPanel="False" EditorShowMode="MouseDown"
AllowDragDrop="True"
AllowDragDrop="True"
AlternateRowBackground="#05ffffff"
ShowBandsPanel="False"
ShowTotalSummary="False"
ShowFixedTotalSummary="False"
...
...
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
View file @
ee9cc580
...
...
@@ -496,6 +496,13 @@ namespace VIZ.Package.Module
// 开始清理
List
<
ConnGroupModel
>
groups
=
ApplicationDomainEx
.
ConnGroups
.
ToList
();
this
.
pageModelController
.
BeginTakeClear
(
groups
);
// 清理Take状态
if
(
ApplicationDomainEx
.
CurrentTake
!=
null
)
{
ApplicationDomainEx
.
CurrentTake
.
IsTake
=
false
;
ApplicationDomainEx
.
CurrentTake
=
null
;
}
}
#
endregion
...
...
VIZ.Package.Module/Page/Templage/PageTemplatePluginLifeCycle.cs
View file @
ee9cc580
...
...
@@ -29,7 +29,7 @@ namespace VIZ.Package.Module
/// <summary>
/// 插件名称
/// </summary>
public
const
string
PLUGIN_NAME
=
"模板"
;
public
const
string
PLUGIN_NAME
=
"模板
列表
"
;
/// <summary>
/// 注册
...
...
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
View file @
ee9cc580
...
...
@@ -31,6 +31,9 @@
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleBgConverter"
TrueBrush="#FF0078D7"
FalseBrush="Transparent"></fcore:Bool2SolidColorBrushConverter>
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleTakeConverter"
TrueBrush="#FF67ad5b"
FalseBrush="Transparent"></fcore:Bool2SolidColorBrushConverter>
</ResourceDictionary>
</UserControl.Resources>
...
...
@@ -42,7 +45,7 @@
<ContextMenu>
<MenuItem Header="打开" Command="{Binding Path=PlacementTarget.DataContext.OpenScenePageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator>
<MenuItem Header="添加至
节目
单" Command="{Binding Path=PlacementTarget.DataContext.AddToPageGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="添加至
播出
单" Command="{Binding Path=PlacementTarget.DataContext.AddToPageGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="更新模板" Command="{Binding Path=PlacementTarget.DataContext.UpdateCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator>
<MenuItem Header="删除模板 ( Delete )" Command="{Binding Path=PlacementTarget.DataContext.DeleteCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
...
...
@@ -53,6 +56,8 @@
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Grid Background="{Binding Path=Row.IsOpen,Converter={StaticResource RowHandleBgConverter}}">
<Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}"
Width="10" HorizontalAlignment="Left"></Rectangle>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
</Grid>
</DataTemplate>
...
...
@@ -83,9 +88,10 @@
<dxg:GridColumn Header="引擎类型" FieldName="EngineType" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False"></dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView IsColumnMenuEnabled="False" RowMinHeight="69.5"
ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
<dxg:TableView IsColumnMenuEnabled="False" RowMinHeight="69.5"
AllowEditing="True" ShowIndicator="False"
NavigationStyle="Cell" ShowVerticalLines="False"
NavigationStyle="Cell" ShowVerticalLines="False" ShowHorizontalLines="False"
AlternateRowBackground="#05ffffff"
ShowGroupPanel="False" EditorShowMode="MouseDown"
AllowDragDrop="True"
ShowBandsPanel="False"
...
...
VIZ.Package.Module/Preview/VizPreview/View/VizPreviewView.xaml
View file @
ee9cc580
...
...
@@ -56,14 +56,23 @@
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center">
<fcommon:IconButton Icon="/VIZ.Package.Module.Resource;component/Icons/preview_refresh_32x32.png"
ToolTip="重启预览引擎"
IsEnabled="{Binding Path=IsVizPreviewRefreshEnabled}"
Style="{StaticResource IconButton_Menu_Mask}" Margin="0,0,40,0"
IconWidth="16" IconHeight="16" Height="30" Width="30"
Command="{Binding Path=RestartPreviewCommand}"></fcommon:IconButton>
<Menu IsEnabled="{Binding Path=IsVizPreviewRefreshEnabled}" Height="24">
<MenuItem Height="24">
<MenuItem.Header>
<Border Background="Transparent">
<Image Width="14" Height="14" Source="/VIZ.Package.Module.Resource;component/Icons/down_32x32.png"></Image>
</Border>
</MenuItem.Header>
<MenuItem Header="重启预览引擎"
Command="{Binding Path=RestartPreviewCommand}">
<MenuItem.Icon>
<Image Width="14" Height="14" Source="/VIZ.Package.Module.Resource;component/Icons/preview_refresh_32x32.png"></Image>
</MenuItem.Icon>
</MenuItem>
</MenuItem>
</Menu>
<CheckBox Content="TA" Style="{StaticResource CheckBox_Preview_TA}" Margin="5,0,0,0"
<CheckBox Content="TA" Style="{StaticResource CheckBox_Preview_TA}" Margin="5
0
,0,0,0"
ToolTip="Title Safe"
IsChecked="{Binding Path=IsShowTS,Mode=TwoWay}">
</CheckBox>
...
...
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
View file @
ee9cc580
...
...
@@ -288,6 +288,9 @@ namespace VIZ.Package.Module
/// </summary>
private
void
RestartPreview
()
{
if
(
DXMessageBox
.
Show
(
"是否重启预览引擎?"
,
"提示"
,
MessageBoxButton
.
YesNo
)
!=
MessageBoxResult
.
Yes
)
return
;
// 设置预览引擎未准备完毕
ApplicationDomainEx
.
IsVizPreviewReadly
=
false
;
this
.
IsVizPreviewReadly
=
false
;
...
...
VIZ.Package.Module/Resource/GHResource/View/GHSceneView.xaml
View file @
ee9cc580
...
...
@@ -22,13 +22,13 @@
<ContextMenu>
<MenuItem Header="刷新" Command="{Binding Path=PlacementTarget.DataContext.RefreshFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator/>
<MenuItem Header="添加
场景模板
" Command="{Binding Path=PlacementTarget.DataContext.AddSceneTemplateCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="添加
至模板列表
" Command="{Binding Path=PlacementTarget.DataContext.AddSceneTemplateCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
</ContextMenu>
</local:GHResourcePanel.FileContextMenu>
</local:GHResourcePanel>
<!-- 按钮组 -->
<StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0">
<Button Content="添加
模板" Width="10
0" Height="30" Command="{Binding Path=AddSceneTemplateCommand}"></Button>
<Button Content="添加
至模板列表" Width="12
0" Height="30" Command="{Binding Path=AddSceneTemplateCommand}"></Button>
</StackPanel>
</Grid>
</UserControl>
VIZ.Package.Module/Setting/PluginMapping/View/PluginMappingSettingView.xaml
View file @
ee9cc580
...
...
@@ -66,7 +66,7 @@
<dxe:TextEditSettings AcceptsReturn="False"></dxe:TextEditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn Header="
插件
" FieldName="PluginID" AllowSorting="False" AllowColumnFiltering="False" Width="120" AllowResizing="False">
<dxg:GridColumn Header="
数据模板
" FieldName="PluginID" AllowSorting="False" AllowColumnFiltering="False" Width="120" AllowResizing="False">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings ItemsSource="{Binding Path=PluginInfos}" IsTextEditable="False"
SelectItemWithNullValue="True"
...
...
VIZ.Package.Module/VIZ.Package.Module.csproj
View file @
ee9cc580
...
...
@@ -130,6 +130,7 @@
<Compile Include="ControlObject\FieldTree\Service\IFieldTreeService.cs" />
<Compile Include="Log\ViewModel\VizCommandWindowModel.cs" />
<Compile Include="Main\Controller\HotkeyController.cs" />
<Compile Include="Main\Core\MainTopViewMenuDataTemplateSelector.cs" />
<Compile Include="Page\Core\View\PageLoadingWindow.xaml.cs">
<DependentUpon>PageLoadingWindow.xaml</DependentUpon>
</Compile>
...
...
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