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
e8f8a419
Commit
e8f8a419
authored
Jan 19, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加页编号
parent
331a29fb
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
227 additions
and
35 deletions
+227
-35
VIZ.Package.Domain/Message/Application/ApplicationClosedMessage.cs
+2
-5
VIZ.Package.Domain/Message/Application/ApplicationClosingMessage.cs
+19
-0
VIZ.Package.Domain/Model/Page/PageModel.cs
+14
-0
VIZ.Package.Domain/VIZ.Package.Domain.csproj
+2
-1
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditView.xaml
+7
-5
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModel.cs
+10
-3
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
+5
-5
VIZ.Package.Module/Main/ViewModel/MainViewModel.cs
+2
-2
VIZ.Package.Module/Page/Group/Service/IPageGroupService.cs
+8
-0
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
+9
-2
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
+22
-0
VIZ.Package.Module/Page/Group/Widgets/PageNumberEdit.xaml
+22
-0
VIZ.Package.Module/Page/Group/Widgets/PageNumberEdit.xaml.cs
+76
-0
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
+0
-7
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
+2
-2
VIZ.Package.Module/VIZ.Package.Module.csproj
+7
-0
VIZ.Package.Service/DB/Page/PageService.cs
+2
-0
VIZ.Package.Storage/Entity/Page/PageEntity.cs
+5
-0
VIZ.Package/MainWindow.xaml.cs
+13
-3
No files found.
VIZ.Package.Domain/Message/Application/ApplicationCloseMessage.cs
→
VIZ.Package.Domain/Message/Application/ApplicationClose
d
Message.cs
View file @
e8f8a419
...
@@ -9,11 +9,8 @@ namespace VIZ.Package.Domain
...
@@ -9,11 +9,8 @@ namespace VIZ.Package.Domain
/// <summary>
/// <summary>
/// 系统关闭消息
/// 系统关闭消息
/// </summary>
/// </summary>
public
class
ApplicationCloseMessage
public
class
ApplicationClose
d
Message
{
{
/// <summary>
/// 是否取消关闭
/// </summary>
public
bool
IsCancel
{
get
;
set
;
}
}
}
}
}
VIZ.Package.Domain/Message/Application/ApplicationClosingMessage.cs
0 → 100644
View file @
e8f8a419
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.Package.Domain
{
/// <summary>
/// 应用程序关闭之前消息
/// </summary>
public
class
ApplicationClosingMessage
{
/// <summary>
/// 是否取消
/// </summary>
public
bool
Cancel
{
get
;
set
;
}
}
}
VIZ.Package.Domain/Model/Page/PageModel.cs
View file @
e8f8a419
...
@@ -82,5 +82,19 @@ namespace VIZ.Package.Domain
...
@@ -82,5 +82,19 @@ namespace VIZ.Package.Domain
}
}
#
endregion
#
endregion
#
region
PageNum
--
页号
private
int
pageNum
;
/// <summary>
/// 页号
/// </summary>
public
int
PageNum
{
get
{
return
pageNum
;
}
set
{
pageNum
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PageNum
));
}
}
#
endregion
}
}
}
}
VIZ.Package.Domain/VIZ.Package.Domain.csproj
View file @
e8f8a419
...
@@ -78,7 +78,8 @@
...
@@ -78,7 +78,8 @@
<Compile Include="Enum\ModulePluginIds.cs" />
<Compile Include="Enum\ModulePluginIds.cs" />
<Compile Include="Enum\ViewServiceKeys.cs" />
<Compile Include="Enum\ViewServiceKeys.cs" />
<Compile Include="Info\VizTreeNodeInfo.cs" />
<Compile Include="Info\VizTreeNodeInfo.cs" />
<Compile Include="Message\Application\ApplicationCloseMessage.cs" />
<Compile Include="Message\Application\ApplicationClosedMessage.cs" />
<Compile Include="Message\Application\ApplicationClosingMessage.cs" />
<Compile Include="Message\Conn\ConnChangedMessage.cs" />
<Compile Include="Message\Conn\ConnChangedMessage.cs" />
<Compile Include="Message\ControlObject\ControlListFieldChangedMessage.cs" />
<Compile Include="Message\ControlObject\ControlListFieldChangedMessage.cs" />
<Compile Include="Message\ControlObject\ControlFieldChangedMessage.cs" />
<Compile Include="Message\ControlObject\ControlFieldChangedMessage.cs" />
...
...
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditView.xaml
View file @
e8f8a419
...
@@ -28,11 +28,13 @@
...
@@ -28,11 +28,13 @@
<Border Background="#11FFFFFF" Grid.Row="0">
<Border Background="#11FFFFFF" Grid.Row="0">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
<TextBlock Text="页:" Margin="8,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
<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="{Binding PageID}" Margin="10,0,0,0" MinWidth="40" d:Foreground="White"></TextBlock>
<TextBlock Text="场景:" Margin="30,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
<TextBlock Text="场景:" Margin="40,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="{Binding Scene}" Margin="10,0,0,0" MinWidth="80" d:Foreground="White"></TextBlock>
<TextBlock Text="字段:" Margin="30,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
<TextBlock Text="字段:" Margin="40,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>
<TextBlock Text="{Binding Path=ControlField.FieldIdentifier}" MinWidth="80" Margin="10,0,0,0" d:Foreground="White"></TextBlock>
<TextBlock Text="字段描述:" Margin="40,0,0,0" d:Foreground="White" Opacity="0.7"></TextBlock>
<TextBlock Text="{Binding Path=ControlField.Description}" Margin="10,0,0,0" d:Foreground="White"></TextBlock>
</StackPanel>
</StackPanel>
</Border>
</Border>
<!-- 按钮组 -->
<!-- 按钮组 -->
...
...
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModel.cs
View file @
e8f8a419
...
@@ -92,11 +92,11 @@ namespace VIZ.Package.Module
...
@@ -92,11 +92,11 @@ namespace VIZ.Package.Module
#
region
PageID
--
页
ID
#
region
PageID
--
页
ID
private
int
?
pageID
;
private
string
pageID
;
/// <summary>
/// <summary>
/// 页ID
/// 页ID
/// </summary>
/// </summary>
public
int
?
PageID
public
string
PageID
{
{
get
{
return
pageID
;
}
get
{
return
pageID
;
}
set
{
pageID
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PageID
));
}
set
{
pageID
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PageID
));
}
...
@@ -219,8 +219,15 @@ namespace VIZ.Package.Module
...
@@ -219,8 +219,15 @@ namespace VIZ.Package.Module
/// <param name="msg">消息</param>
/// <param name="msg">消息</param>
private
void
OnPageOpenMessage
(
PageOpenMessage
msg
)
private
void
OnPageOpenMessage
(
PageOpenMessage
msg
)
{
{
this
.
PageID
=
1000
;
this
.
Scene
=
msg
.
Page
?.
Scene
;
this
.
Scene
=
msg
.
Page
?.
Scene
;
if
(
msg
.
Page
is
PageModel
page
)
{
this
.
PageID
=
string
.
Format
(
"{0:D4}"
,
page
.
PageNum
);
}
else
{
this
.
PageID
=
null
;
}
}
}
/// <summary>
/// <summary>
...
...
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
View file @
e8f8a419
...
@@ -52,7 +52,7 @@ namespace VIZ.Package.Module
...
@@ -52,7 +52,7 @@ namespace VIZ.Package.Module
private
void
InitMessage
()
private
void
InitMessage
()
{
{
ApplicationDomainEx
.
MessageManager
.
Register
<
VizPreviewReadyMessage
>(
this
,
this
.
OnVizPreviewReadyMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
VizPreviewReadyMessage
>(
this
,
this
.
OnVizPreviewReadyMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ApplicationClos
eMessage
>(
this
,
this
.
OnApplicationClose
Message
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ApplicationClos
ingMessage
>(
this
,
this
.
OnApplicationClosing
Message
);
}
}
// =====================================================================
// =====================================================================
...
@@ -361,17 +361,17 @@ namespace VIZ.Package.Module
...
@@ -361,17 +361,17 @@ namespace VIZ.Package.Module
}
}
/// <summary>
/// <summary>
/// 应用程序关闭消息
/// 应用程序关闭
前
消息
/// </summary>
/// </summary>
/// <param name="msg">消息</param>
/// <param name="msg">消息</param>
private
void
OnApplicationClos
eMessage
(
ApplicationClose
Message
msg
)
private
void
OnApplicationClos
ingMessage
(
ApplicationClosing
Message
msg
)
{
{
// 项目未打开
// 项目未打开
if
(
ApplicationDomainEx
.
ProjectDbContext
==
null
)
if
(
ApplicationDomainEx
.
ProjectDbContext
==
null
)
{
{
var
result
=
DXMessageBox
.
Show
(
"确定关闭系统?"
,
"提示"
,
MessageBoxButton
.
YesNo
);
var
result
=
DXMessageBox
.
Show
(
"确定关闭系统?"
,
"提示"
,
MessageBoxButton
.
YesNo
);
msg
.
Is
Cancel
=
result
==
MessageBoxResult
.
No
;
msg
.
Cancel
=
result
==
MessageBoxResult
.
No
;
}
}
// 项目已经打开
// 项目已经打开
else
else
...
@@ -389,7 +389,7 @@ namespace VIZ.Package.Module
...
@@ -389,7 +389,7 @@ namespace VIZ.Package.Module
// 取消关闭
// 取消关闭
if
(
result
==
MessageBoxResult
.
Cancel
)
if
(
result
==
MessageBoxResult
.
Cancel
)
{
{
msg
.
Is
Cancel
=
true
;
msg
.
Cancel
=
true
;
}
}
}
}
}
}
...
...
VIZ.Package.Module/Main/ViewModel/MainViewModel.cs
View file @
e8f8a419
...
@@ -41,7 +41,7 @@ namespace VIZ.Package.Module
...
@@ -41,7 +41,7 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
InitMessage
()
private
void
InitMessage
()
{
{
ApplicationDomainEx
.
MessageManager
.
Register
<
ApplicationClose
Message
>(
this
,
this
.
OnApplicationClose
Message
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ApplicationClose
dMessage
>(
this
,
this
.
OnApplicationClosed
Message
);
}
}
// ============================================================
// ============================================================
...
@@ -113,7 +113,7 @@ namespace VIZ.Package.Module
...
@@ -113,7 +113,7 @@ namespace VIZ.Package.Module
/// 系统关闭消息
/// 系统关闭消息
/// </summary>
/// </summary>
/// <param name="msg">消息</param>
/// <param name="msg">消息</param>
private
void
OnApplicationClose
Message
(
ApplicationClose
Message
msg
)
private
void
OnApplicationClose
dMessage
(
ApplicationClosed
Message
msg
)
{
{
// 保存布局
// 保存布局
this
.
SaveLayout
();
this
.
SaveLayout
();
...
...
VIZ.Package.Module/Page/Group/Service/IPageGroupService.cs
View file @
e8f8a419
...
@@ -31,5 +31,13 @@ namespace VIZ.Package.Module
...
@@ -31,5 +31,13 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
/// <param name="page">页</param>
/// <param name="page">页</param>
void
OpenPage
(
PageModel
page
);
void
OpenPage
(
PageModel
page
);
/// <summary>
/// 尝试改变页号
/// </summary>
/// <param name="page">页</param>
/// <param name="pageNum">页号</param>
/// <returns>是否成功改变</returns>
bool
TryChangePageNum
(
PageModel
page
,
int
pageNum
);
}
}
}
}
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
View file @
e8f8a419
...
@@ -64,12 +64,19 @@
...
@@ -64,12 +64,19 @@
<dxg:GridControl ItemsSource="{Binding Pages}" ShowBorder="False" IsFilterEnabled="False"
<dxg:GridControl ItemsSource="{Binding Pages}" ShowBorder="False" IsFilterEnabled="False"
SelectedItem="{Binding ElementName=uc, Path=DataContext.SelectedPageModel,Mode=TwoWay}">
SelectedItem="{Binding ElementName=uc, Path=DataContext.SelectedPageModel,Mode=TwoWay}">
<dxg:GridControl.Columns>
<dxg:GridControl.Columns>
<dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False">
<dxg:GridColumn Header="编号" AllowSorting="False" AllowColumnFiltering="False" AllowResizing="True"
FieldName="PageNum">
<dxg:GridColumn.CellTemplate>
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<DataTemplate>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="4,0,4,0"
Text="{Binding Row.PageNum,StringFormat={}{0:D4}}"></TextBlock>
</DataTemplate>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn.CellTemplate>
<dxg:GridColumn.CellEditTemplate>
<DataTemplate>
<local:PageNumberEdit></local:PageNumberEdit>
</DataTemplate>
</dxg:GridColumn.CellEditTemplate>
</dxg:GridColumn>
</dxg:GridColumn>
<dxg:GridColumn Header="缩略图" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="120" MinWidth="40" MaxWidth="300" AllowResizing="True">
<dxg:GridColumn Header="缩略图" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="120" MinWidth="40" MaxWidth="300" AllowResizing="True">
<dxg:GridColumn.CellTemplate>
<dxg:GridColumn.CellTemplate>
...
...
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
View file @
e8f8a419
...
@@ -407,6 +407,7 @@ namespace VIZ.Package.Module
...
@@ -407,6 +407,7 @@ namespace VIZ.Package.Module
page
.
ThumbnailBitmap
=
template
.
ThumbnailBitmap
;
page
.
ThumbnailBitmap
=
template
.
ThumbnailBitmap
;
page
.
PluginID
=
vm
.
SelectedTemplatePlugin
?.
ID
;
page
.
PluginID
=
vm
.
SelectedTemplatePlugin
?.
ID
;
page
.
PluginName
=
vm
.
SelectedTemplatePlugin
?.
Name
;
page
.
PluginName
=
vm
.
SelectedTemplatePlugin
?.
Name
;
page
.
PageNum
=
this
.
SelectedPageGroupModel
.
Pages
.
Max
(
p
=>
p
.
PageNum
)
+
1
;
this
.
SelectedPageGroupModel
.
Pages
.
Add
(
page
);
this
.
SelectedPageGroupModel
.
Pages
.
Add
(
page
);
...
@@ -453,6 +454,7 @@ namespace VIZ.Package.Module
...
@@ -453,6 +454,7 @@ namespace VIZ.Package.Module
page
.
ThumbnailBitmap
=
this
.
SelectedPageModel
.
ThumbnailBitmap
;
page
.
ThumbnailBitmap
=
this
.
SelectedPageModel
.
ThumbnailBitmap
;
page
.
PluginID
=
this
.
SelectedPageModel
.
PluginID
;
page
.
PluginID
=
this
.
SelectedPageModel
.
PluginID
;
page
.
PluginName
=
this
.
SelectedPageModel
.
PluginName
;
page
.
PluginName
=
this
.
SelectedPageModel
.
PluginName
;
page
.
PageNum
=
this
.
SelectedPageGroupModel
.
Pages
.
Max
(
p
=>
p
.
PageNum
)
+
1
;
this
.
SelectedPageGroupModel
.
Pages
.
Add
(
page
);
this
.
SelectedPageGroupModel
.
Pages
.
Add
(
page
);
...
@@ -487,5 +489,25 @@ namespace VIZ.Package.Module
...
@@ -487,5 +489,25 @@ namespace VIZ.Package.Module
this
.
OpenPage
();
this
.
OpenPage
();
}
}
/// <summary>
/// 尝试改变页号
/// </summary>
/// <param name="page">页</param>
/// <param name="pageNum">页号</param>
/// <returns>是否成功改变</returns>
public
bool
TryChangePageNum
(
PageModel
page
,
int
pageNum
)
{
if
(
this
.
SelectedPageGroupModel
==
null
)
return
false
;
PageModel
same
=
this
.
SelectedPageGroupModel
.
Pages
.
FirstOrDefault
(
p
=>
p
!=
page
&&
p
.
PageNum
==
pageNum
);
if
(
same
==
null
)
return
true
;
DXMessageBox
.
Show
(
$"页
{
pageNum
}
已经存在!"
,
"提示"
);
return
false
;
}
}
}
}
}
VIZ.Package.Module/Page/Group/Widgets/PageNumberEdit.xaml
0 → 100644
View file @
e8f8a419
<UserControl x:Class="VIZ.Package.Module.PageNumberEdit"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:Background="White"
mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="200">
<dxe:TextEdit x:Name="PART_Text" MaskType="RegEx" Mask="[0-9]{4}" ShowBorder="False"
EditValuePostMode="Delayed" EditValueChanged="EditValueChanged"></dxe:TextEdit>
</UserControl>
VIZ.Package.Module/Page/Group/Widgets/PageNumberEdit.xaml.cs
0 → 100644
View file @
e8f8a419
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Controls
;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
using
VIZ.Package.Domain
;
namespace
VIZ.Package.Module
{
/// <summary>
/// PageNumberEdit.xaml 的交互逻辑
/// </summary>
public
partial
class
PageNumberEdit
:
UserControl
{
public
PageNumberEdit
()
{
InitializeComponent
();
this
.
DataContextChanged
+=
OnDataContextChanged
;
}
/// <summary>
/// 是否处于初始化中
/// </summary>
private
bool
isInInited
;
private
void
OnDataContextChanged
(
object
sender
,
DependencyPropertyChangedEventArgs
e
)
{
DevExpress
.
Xpf
.
Grid
.
EditGridCellData
cellData
=
e
.
NewValue
as
DevExpress
.
Xpf
.
Grid
.
EditGridCellData
;
int
.
TryParse
(
cellData
?.
Value
?.
ToString
(),
out
int
value
);
this
.
isInInited
=
true
;
this
.
PART_Text
.
EditValue
=
string
.
Format
(
"{0:d4}"
,
value
);
this
.
isInInited
=
false
;
}
/// <summary>
/// 值改变
/// </summary>
private
void
EditValueChanged
(
object
sender
,
DevExpress
.
Xpf
.
Editors
.
EditValueChangedEventArgs
e
)
{
if
(
this
.
isInInited
)
return
;
DevExpress
.
Xpf
.
Grid
.
EditGridCellData
cellData
=
this
.
DataContext
as
DevExpress
.
Xpf
.
Grid
.
EditGridCellData
;
PageModel
page
=
cellData
.
Row
as
PageModel
;
if
(
page
==
null
)
return
;
int
.
TryParse
(
e
.
NewValue
?.
ToString
(),
out
int
newNum
);
if
(
page
.
PageNum
==
newNum
)
return
;
IPageGroupService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IPageGroupService
>(
ViewServiceKeys
.
PAGE_GROUP_SERVICE
);
if
(
service
==
null
)
return
;
if
(
service
.
TryChangePageNum
(
page
,
newNum
))
{
page
.
PageNum
=
newNum
;
}
}
}
}
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
View file @
e8f8a419
...
@@ -41,13 +41,6 @@
...
@@ -41,13 +41,6 @@
</ContextMenu>
</ContextMenu>
</dxg:GridControl.ContextMenu>
</dxg:GridControl.ContextMenu>
<dxg:GridControl.Columns>
<dxg:GridControl.Columns>
<dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="缩略图" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="120" MinWidth="40" MaxWidth="300" AllowResizing="True">
<dxg:GridColumn Header="缩略图" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="120" MinWidth="40" MaxWidth="300" AllowResizing="True">
<dxg:GridColumn.CellTemplate>
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<DataTemplate>
...
...
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
View file @
e8f8a419
...
@@ -65,7 +65,7 @@ namespace VIZ.Package.Module
...
@@ -65,7 +65,7 @@ namespace VIZ.Package.Module
private
void
initMessage
()
private
void
initMessage
()
{
{
ApplicationDomainEx
.
MessageManager
.
Register
<
PageOpenMessage
>(
this
,
this
.
OnPageOpenMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageOpenMessage
>(
this
,
this
.
OnPageOpenMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ApplicationClose
Message
>(
this
,
this
.
OnApplicationClose
Message
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ApplicationClose
dMessage
>(
this
,
this
.
OnApplicationClosed
Message
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ControlFieldChangedMessage
>(
this
,
this
.
OnControlFieldChangedMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ControlFieldChangedMessage
>(
this
,
this
.
OnControlFieldChangedMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ControlListFieldChangedMessage
>(
this
,
this
.
OnControlListFieldChangedMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ControlListFieldChangedMessage
>(
this
,
this
.
OnControlListFieldChangedMessage
);
}
}
...
@@ -418,7 +418,7 @@ namespace VIZ.Package.Module
...
@@ -418,7 +418,7 @@ namespace VIZ.Package.Module
/// 应用程序关闭消息
/// 应用程序关闭消息
/// </summary>
/// </summary>
/// <param name="msg">消息</param>
/// <param name="msg">消息</param>
private
void
OnApplicationClose
Message
(
ApplicationClose
Message
msg
)
private
void
OnApplicationClose
dMessage
(
ApplicationClosed
Message
msg
)
{
{
if
(
ApplicationDomainEx
.
VizPreviewProcess
==
null
||
ApplicationDomainEx
.
VizPreviewProcess
.
HasExited
)
if
(
ApplicationDomainEx
.
VizPreviewProcess
==
null
||
ApplicationDomainEx
.
VizPreviewProcess
.
HasExited
)
return
;
return
;
...
...
VIZ.Package.Module/VIZ.Package.Module.csproj
View file @
e8f8a419
...
@@ -125,6 +125,9 @@
...
@@ -125,6 +125,9 @@
<Compile Include="Main\View\MainStatusView.xaml.cs">
<Compile Include="Main\View\MainStatusView.xaml.cs">
<DependentUpon>MainStatusView.xaml</DependentUpon>
<DependentUpon>MainStatusView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Page\Group\Widgets\PageNumberEdit.xaml.cs">
<DependentUpon>PageNumberEdit.xaml</DependentUpon>
</Compile>
<Compile Include="Plugin\Service\IPluginService.cs" />
<Compile Include="Plugin\Service\IPluginService.cs" />
<Compile Include="Resource\MediaResource\Controller\Model\ms.cs" />
<Compile Include="Resource\MediaResource\Controller\Model\ms.cs" />
<Compile Include="Resource\MediaResource\Core\MHResourceFileDoubleClickEventArgs.cs" />
<Compile Include="Resource\MediaResource\Core\MHResourceFileDoubleClickEventArgs.cs" />
...
@@ -382,6 +385,10 @@
...
@@ -382,6 +385,10 @@
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
</Page>
</Page>
<Page Include="Page\Group\Widgets\PageNumberEdit.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Setting\Conn\View\ConnSettingView.xaml">
<Page Include="Setting\Conn\View\ConnSettingView.xaml">
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
...
...
VIZ.Package.Service/DB/Page/PageService.cs
View file @
e8f8a419
...
@@ -120,6 +120,7 @@ namespace VIZ.Package.Service
...
@@ -120,6 +120,7 @@ namespace VIZ.Package.Service
model
.
PluginID
=
entity
.
PluginID
;
model
.
PluginID
=
entity
.
PluginID
;
model
.
Order
=
entity
.
Order
;
model
.
Order
=
entity
.
Order
;
model
.
PluginName
=
ApplicationDomainEx
.
PluginInfos
.
FirstOrDefault
(
p
=>
p
.
ID
==
entity
.
PluginID
)?.
Name
;
model
.
PluginName
=
ApplicationDomainEx
.
PluginInfos
.
FirstOrDefault
(
p
=>
p
.
ID
==
entity
.
PluginID
)?.
Name
;
model
.
PageNum
=
entity
.
PageNum
;
groupModel
.
Pages
.
Add
(
model
);
groupModel
.
Pages
.
Add
(
model
);
}
}
...
@@ -175,6 +176,7 @@ namespace VIZ.Package.Service
...
@@ -175,6 +176,7 @@ namespace VIZ.Package.Service
pageEntity
.
PageGroupID
=
pageModel
.
PageGroupID
;
pageEntity
.
PageGroupID
=
pageModel
.
PageGroupID
;
pageEntity
.
TemplateID
=
pageModel
.
TemplateID
;
pageEntity
.
TemplateID
=
pageModel
.
TemplateID
;
pageEntity
.
PluginID
=
pageModel
.
PluginID
;
pageEntity
.
PluginID
=
pageModel
.
PluginID
;
pageEntity
.
PageNum
=
pageModel
.
PageNum
;
pageEntity
.
Order
=
j
;
pageEntity
.
Order
=
j
;
pages
.
Add
(
pageEntity
);
pages
.
Add
(
pageEntity
);
...
...
VIZ.Package.Storage/Entity/Page/PageEntity.cs
View file @
e8f8a419
...
@@ -31,5 +31,10 @@ namespace VIZ.Package.Storage
...
@@ -31,5 +31,10 @@ namespace VIZ.Package.Storage
/// 关联插件ID
/// 关联插件ID
/// </summary>
/// </summary>
public
string
PluginID
{
get
;
set
;
}
public
string
PluginID
{
get
;
set
;
}
/// <summary>
/// 页号
/// </summary>
public
int
PageNum
{
get
;
set
;
}
}
}
}
}
VIZ.Package/MainWindow.xaml.cs
View file @
e8f8a419
...
@@ -43,10 +43,20 @@ namespace VIZ.Package
...
@@ -43,10 +43,20 @@ namespace VIZ.Package
// 发送系统关闭消息
// 发送系统关闭消息
try
try
{
{
ApplicationClos
eMessage
msg
=
new
ApplicationClose
Message
();
ApplicationClos
ingMessage
closeingMsg
=
new
ApplicationClosing
Message
();
ApplicationDomainEx
.
MessageManager
.
Send
(
m
sg
);
ApplicationDomainEx
.
MessageManager
.
Send
(
closeingM
sg
);
e
.
Cancel
=
msg
.
IsCancel
;
// 如果取消关闭
if
(
closeingMsg
.
Cancel
)
{
e
.
Cancel
=
true
;
return
;
}
// 发送确定关闭消息
ApplicationClosedMessage
closedMsg
=
new
ApplicationClosedMessage
();
ApplicationDomainEx
.
MessageManager
.
Send
(
closedMsg
);
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
...
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