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
e9f9b120
Commit
e9f9b120
authored
May 06, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
命令窗口加保存
parent
3116ff1a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
24 deletions
+63
-24
VIZ.Package.Module/PageCommand/View/PageCommandView.xaml
+14
-1
VIZ.Package.Module/PageCommand/ViewModel/PageCommandViewModel.cs
+49
-2
VIZ.Package.TestPlugin/PluginAssembly.cs
+0
-20
VIZ.Package.TestPlugin/VIZ.Package.TestPlugin.csproj
+0
-1
No files found.
VIZ.Package.Module/PageCommand/View/PageCommandView.xaml
View file @
e9f9b120
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
<Grid>
<Grid>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="25"></RowDefinition>
<RowDefinition Height="25"></RowDefinition>
<RowDefinition Height="35"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- 描述 -->
<!-- 描述 -->
...
@@ -48,8 +49,20 @@
...
@@ -48,8 +49,20 @@
<TextBlock Text="{Binding PageType}" Margin="10,0,0,0" MinWidth="80" d:Foreground="White"></TextBlock>
<TextBlock Text="{Binding PageType}" Margin="10,0,0,0" MinWidth="80" d:Foreground="White"></TextBlock>
</StackPanel>
</StackPanel>
</Border>
</Border>
<!-- 按钮组 -->
<Border Background="#11FFFFFF" Grid.Row="1">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<!-- 保存 -->
<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"
IconWidth="24" IconHeight="24" Width="24" Height="24"
Command="{Binding SaveCommand}"></fcommon:IconButton>
</StackPanel>
</Border>
<!-- 命令输入框 -->
<!-- 命令输入框 -->
<dx:DXTabControl Grid.Row="
1
" Margin="0,10,0,0" Padding="0,5,0,0">
<dx:DXTabControl Grid.Row="
2
" Margin="0,10,0,0" Padding="0,5,0,0">
<dx:DXTabItem Header="Take">
<dx:DXTabItem Header="Take">
<dxe:TextEdit AcceptsReturn="True" EditValue="{Binding Path=TakeCommand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="5"
<dxe:TextEdit AcceptsReturn="True" EditValue="{Binding Path=TakeCommand,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="5"
VerticalContentAlignment="Top"></dxe:TextEdit>
VerticalContentAlignment="Top"></dxe:TextEdit>
...
...
VIZ.Package.Module/PageCommand/ViewModel/PageCommandViewModel.cs
View file @
e9f9b120
...
@@ -49,7 +49,7 @@ namespace VIZ.Package.Module
...
@@ -49,7 +49,7 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
InitCommand
()
private
void
InitCommand
()
{
{
this
.
SaveCommand
=
new
VCommand
(
this
.
Save
);
}
}
/// <summary>
/// <summary>
...
@@ -60,6 +60,7 @@ namespace VIZ.Package.Module
...
@@ -60,6 +60,7 @@ namespace VIZ.Package.Module
ApplicationDomainEx
.
MessageManager
.
Register
<
PageOpenMessage
>(
this
,
this
.
OnPageOpenMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageOpenMessage
>(
this
,
this
.
OnPageOpenMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageSaveMessage
>(
this
,
this
.
OnPageSaveMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageSaveMessage
>(
this
,
this
.
OnPageSaveMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageSaveAsMessage
>(
this
,
this
.
OnPageSaveAsMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageSaveAsMessage
>(
this
,
this
.
OnPageSaveAsMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
HotkeyMessage
>(
this
,
this
.
OnHotkeyMessage
);
}
}
// ======================================================================================
// ======================================================================================
...
@@ -177,6 +178,41 @@ namespace VIZ.Package.Module
...
@@ -177,6 +178,41 @@ namespace VIZ.Package.Module
// Command
// Command
// ======================================================================================
// ======================================================================================
#
region
SaveCommand
--
保存命令
/// <summary>
/// 保存命令
/// </summary>
public
VCommand
SaveCommand
{
get
;
set
;
}
/// <summary>
/// 保存
/// </summary>
private
void
Save
()
{
if
(
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
Guid
templateIdOrPageId
=
ApplicationDomainEx
.
CurrentPage
.
GetTemplateIdOrPageId
();
PageCommandEntity
entity
=
ApplicationDomainEx
.
ProjectDbContext
.
PageCommand
.
Find
(
p
=>
p
.
PageID
==
templateIdOrPageId
).
FirstOrDefault
();
entity
=
entity
??
new
PageCommandEntity
();
entity
.
PageID
=
templateIdOrPageId
;
entity
.
TakeCommand
=
this
.
TakeCommand
;
entity
.
TakeContinueCommand
=
this
.
TakeContinueCommand
;
entity
.
TakeOutCommand
=
this
.
TakeOutCommand
;
entity
.
TakeUpdateCommand
=
this
.
TakeUpdateCommand
;
ApplicationDomainEx
.
ProjectDbContext
.
PageCommand
.
Upsert
(
entity
);
// 发送弹出提示
AlertMessage
alertMessage
=
new
AlertMessage
();
alertMessage
.
Message
=
"保存成功"
;
ApplicationDomainEx
.
MessageManager
.
Send
(
alertMessage
);
}
#
endregion
// ======================================================================================
// ======================================================================================
// Message
// Message
// ======================================================================================
// ======================================================================================
...
@@ -247,6 +283,18 @@ namespace VIZ.Package.Module
...
@@ -247,6 +283,18 @@ namespace VIZ.Package.Module
ApplicationDomainEx
.
ProjectDbContext
.
PageCommand
.
Upsert
(
entity
);
ApplicationDomainEx
.
ProjectDbContext
.
PageCommand
.
Upsert
(
entity
);
}
}
/// <summary>
/// 处理热键
/// </summary>
/// <param name="msg">消息</param>
private
void
OnHotkeyMessage
(
HotkeyMessage
msg
)
{
if
(
msg
.
Key
==
ApplicationDomainEx
.
HotKeyConfig
.
SaveOpendPageOrTemplateAndProject
)
{
this
.
Save
();
}
}
// ======================================================================================
// ======================================================================================
// Public Function
// Public Function
// ======================================================================================
// ======================================================================================
...
@@ -294,6 +342,5 @@ namespace VIZ.Package.Module
...
@@ -294,6 +342,5 @@ namespace VIZ.Package.Module
// ======================================================================================
// ======================================================================================
// Private Function
// Private Function
// ======================================================================================
// ======================================================================================
}
}
}
}
VIZ.Package.TestPlugin/PluginAssembly.cs
deleted
100644 → 0
View file @
3116ff1a
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Package.Domain
;
namespace
VIZ.Package.TestPlugin
{
/// <summary>
/// 插件程序集
/// </summary>
public
class
PluginAssembly
:
IPluginAssembly
{
public
void
Check
()
{
}
}
}
VIZ.Package.TestPlugin/VIZ.Package.TestPlugin.csproj
View file @
e9f9b120
...
@@ -69,7 +69,6 @@
...
@@ -69,7 +69,6 @@
<Compile Include="Module\TestModuleViewModel.cs" />
<Compile Include="Module\TestModuleViewModel.cs" />
<Compile Include="Module\TestModulePluginLifeCycle.cs" />
<Compile Include="Module\TestModulePluginLifeCycle.cs" />
<Compile Include="Page\TestPagePluginLifeCycle.cs" />
<Compile Include="Page\TestPagePluginLifeCycle.cs" />
<Compile Include="PluginAssembly.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
</Compile>
</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