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
259bfd4b
Commit
259bfd4b
authored
Jan 07, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
媒体库选择资源
parent
7f6e11b6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
105 additions
and
7 deletions
+105
-7
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ImageEdit/ImageEditPanelModel.cs
+2
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ResourceEdit/MHResourceEditPartModel.cs
+13
-0
VIZ.Package.Module/Resource/MediaResource/Core/MHResourceFileDoubleClickEventArgs.cs
+20
-0
VIZ.Package.Module/Resource/MediaResource/Core/MHResourceSelectedFileChangedEventArgs.cs
+20
-0
VIZ.Package.Module/Resource/MediaResource/View/MediaResourcePanel.xaml
+10
-5
VIZ.Package.Module/Resource/MediaResource/ViewModel/MediaResourcePanelViewModel.cs
+37
-2
VIZ.Package.Module/VIZ.Package.Module.csproj
+3
-0
No files found.
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ImageEdit/ImageEditPanelModel.cs
View file @
259bfd4b
...
@@ -20,6 +20,8 @@ namespace VIZ.Package.Module
...
@@ -20,6 +20,8 @@ namespace VIZ.Package.Module
this
.
GHResourceEditPartModel
.
FilterResourceFileType
=
ResourceFileType
.
IMAGE
;
this
.
GHResourceEditPartModel
.
FilterResourceFileType
=
ResourceFileType
.
IMAGE
;
this
.
GHResourceEditPartModel
.
OnFileDoubleClick
+=
GHResourceEditPartModel_OnFileDoubleClick
;
this
.
GHResourceEditPartModel
.
OnFileDoubleClick
+=
GHResourceEditPartModel_OnFileDoubleClick
;
// 初始化命令
// 初始化命令
this
.
InitCommand
();
this
.
InitCommand
();
}
}
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ResourceEdit/MHResourceEditPartModel.cs
0 → 100644
View file @
259bfd4b
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.Package.Module
{
public
class
MHResourceEditPartModel
:
MediaResourcePanelViewModel
{
}
}
VIZ.Package.Module/Resource/MediaResource/Core/MHResourceFileDoubleClickEventArgs.cs
0 → 100644
View file @
259bfd4b
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Package.Domain
;
namespace
VIZ.Package.Module
{
/// <summary>
/// 媒体资源双击事件
/// </summary>
public
class
MHResourceFileDoubleClickEventArgs
:
EventArgs
{
/// <summary>
/// 文件
/// </summary>
public
MHResourceFileModel
File
{
get
;
set
;
}
}
}
VIZ.Package.Module/Resource/MediaResource/Core/MHResourceSelectedFileChangedEventArgs.cs
0 → 100644
View file @
259bfd4b
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Package.Domain
;
namespace
VIZ.Package.Module
{
/// <summary>
/// 媒体资源库选中事件
/// </summary>
public
class
MHResourceSelectedFileChangedEventArgs
:
EventArgs
{
/// <summary>
/// 文件
/// </summary>
public
MHResourceFileModel
File
{
get
;
set
;
}
}
}
VIZ.Package.Module/Resource/MediaResource/View/MediaResourcePanel.xaml
View file @
259bfd4b
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<
RowDefinition Height="30"></RowDefinition
>
<
!--<RowDefinition Height="30"></RowDefinition>--
>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- 资源文件夹 -->
<!-- 资源文件夹 -->
...
@@ -66,18 +66,18 @@
...
@@ -66,18 +66,18 @@
<GridSplitter HorizontalAlignment="Right" Width="4" Grid.Row="1"></GridSplitter>
<GridSplitter HorizontalAlignment="Right" Width="4" Grid.Row="1"></GridSplitter>
<!-- 资源文件 -->
<!-- 资源文件 -->
<StackPanel Grid.Column="1" Orientation="Horizontal">
<
!--<
StackPanel Grid.Column="1" Orientation="Horizontal">
<RadioButton Height="30" Width="60" Content="All" IsChecked="True">
<RadioButton Height="30" Width="60" Content="All" IsChecked="True">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=FileFilterCommand}" CommandParameter="{x:Static Member=domain:ResourceFileType.None}"></dxmvvm:EventToCommand>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=FileFilterCommand}" CommandParameter="{x:Static Member=domain:ResourceFileType.None}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</dxmvvm:Interaction.Behaviors>
</RadioButton>
</RadioButton>
<
!--<
RadioButton Height="30" Width="60" Content="场景">
<RadioButton Height="30" Width="60" Content="场景">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=FileFilterCommand}" CommandParameter="{x:Static Member=domain:ResourceFileType.SCENE}"></dxmvvm:EventToCommand>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=FileFilterCommand}" CommandParameter="{x:Static Member=domain:ResourceFileType.SCENE}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</dxmvvm:Interaction.Behaviors>
</RadioButton>
-->
</RadioButton>
<RadioButton Height="30" Width="60" Content="图片">
<RadioButton Height="30" Width="60" Content="图片">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:Interaction.Behaviors>
...
@@ -89,12 +89,17 @@
...
@@ -89,12 +89,17 @@
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=FileFilterCommand}" CommandParameter="{x:Static Member=domain:ResourceFileType.Video}"></dxmvvm:EventToCommand>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=FileFilterCommand}" CommandParameter="{x:Static Member=domain:ResourceFileType.Video}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</dxmvvm:Interaction.Behaviors>
</RadioButton>
</RadioButton>
</StackPanel>
</StackPanel>
-->
<dxg:GridControl x:Name="fileGrid" Grid.Column="1" ShowBorder="False" Grid.Row="1"
<dxg:GridControl x:Name="fileGrid" Grid.Column="1" ShowBorder="False" Grid.Row="1"
CustomRowFilterCommand="{Binding Path=FileRowFilterCommand}"
CustomRowFilterCommand="{Binding Path=FileRowFilterCommand}"
ItemsSource="{Binding Path=FileModels}"
ItemsSource="{Binding Path=FileModels}"
SelectedItem="{Binding Path=SelectedFileModel,Mode=TwoWay}"
SelectedItem="{Binding Path=SelectedFileModel,Mode=TwoWay}"
ContextMenu="{Binding Path=FileContextMenu,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:MediaResourcePanel}}}">
ContextMenu="{Binding Path=FileContextMenu,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:MediaResourcePanel}}}">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="MouseDoubleClick" Command="{Binding Path=FileDoubleClickCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<dxg:GridControl.Resources>
<dxg:GridControl.Resources>
<!-- 定义Card模板 -->
<!-- 定义Card模板 -->
<DataTemplate x:Key="CardTemplate">
<DataTemplate x:Key="CardTemplate">
...
...
VIZ.Package.Module/Resource/MediaResource/ViewModel/MediaResourcePanelViewModel.cs
View file @
259bfd4b
...
@@ -54,9 +54,10 @@ namespace VIZ.Package.Module
...
@@ -54,9 +54,10 @@ namespace VIZ.Package.Module
this
.
FolderExpandCommand
=
new
VCommand
<
DevExpress
.
Xpf
.
Grid
.
TreeList
.
NodeDoubleClickEventArgs
>(
this
.
FolderExpand
);
this
.
FolderExpandCommand
=
new
VCommand
<
DevExpress
.
Xpf
.
Grid
.
TreeList
.
NodeDoubleClickEventArgs
>(
this
.
FolderExpand
);
this
.
FileFilterCommand
=
new
VCommand
<
ResourceFileType
>(
this
.
FileFilter
);
this
.
FileFilterCommand
=
new
VCommand
<
ResourceFileType
>(
this
.
FileFilter
);
this
.
FileRowFilterCommand
=
new
DevExpress
.
Mvvm
.
DelegateCommand
<
RowFilterArgs
>(
this
.
FileRowFilter
);
this
.
FileRowFilterCommand
=
new
DevExpress
.
Mvvm
.
DelegateCommand
<
RowFilterArgs
>(
this
.
FileRowFilter
);
this
.
FileDoubleClickCommand
=
new
VCommand
(
this
.
FileDoubleClick
);
//this.FileContextMenuOpendCommand = new VCommand(this.FileContextMenuOpend);
//this.FileContextMenuOpendCommand = new VCommand(this.FileContextMenuOpend);
//this.AddProgramTemplateCommand = new VCommand(this.AddProgramTemplate, this.CanAddProgramTemplate);
//this.AddProgramTemplateCommand = new VCommand(this.AddProgramTemplate, this.CanAddProgramTemplate);
// this.CopyFilePathCommand = new VCommand(this.CopyFilePath, this.CanCopyFilePath);
// this.CopyFilePathCommand = new VCommand(this.CopyFilePath, this.CanCopyFilePath);
}
}
...
@@ -129,7 +130,12 @@ namespace VIZ.Package.Module
...
@@ -129,7 +130,12 @@ namespace VIZ.Package.Module
public
MHResourceFileModel
SelectedFileModel
public
MHResourceFileModel
SelectedFileModel
{
{
get
{
return
selectedFileModel
;
}
get
{
return
selectedFileModel
;
}
set
{
selectedFileModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedFileModel
));
}
set
{
selectedFileModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedFileModel
));
this
.
OnSelectedFileModelChanged
?.
Invoke
(
this
,
new
MHResourceSelectedFileChangedEventArgs
{
File
=
value
});
}
}
}
#
endregion
#
endregion
...
@@ -219,6 +225,35 @@ namespace VIZ.Package.Module
...
@@ -219,6 +225,35 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
/// <summary>
/// 选择文件改变时触发
/// </summary>
public
event
EventHandler
<
MHResourceSelectedFileChangedEventArgs
>
OnSelectedFileModelChanged
;
/// <summary>
/// 文件双击时触发
/// </summary>
public
event
EventHandler
<
MHResourceFileDoubleClickEventArgs
>
OnFileDoubleClick
;
#
region
FileDoubleClickCommand
--
文件双击命令
/// <summary>
/// 文件双击命令
/// </summary>
public
VCommand
FileDoubleClickCommand
{
get
;
set
;
}
/// <summary>
/// 文件双击
/// </summary>
private
void
FileDoubleClick
()
{
this
.
OnFileDoubleClick
?.
Invoke
(
this
,
new
MHResourceFileDoubleClickEventArgs
{
File
=
this
.
SelectedFileModel
});
}
#
endregion
#
region
RefreshFolderCommand
--
刷新文件夹命令
#
region
RefreshFolderCommand
--
刷新文件夹命令
/// <summary>
/// <summary>
...
...
VIZ.Package.Module/VIZ.Package.Module.csproj
View file @
259bfd4b
...
@@ -90,6 +90,7 @@
...
@@ -90,6 +90,7 @@
<Reference Include="WindowsFormsIntegration" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="ControlObject\FieldEdit\Edit\ResourceEdit\MHResourceEditPartModel.cs" />
<Compile Include="ControlObject\FieldEdit\Service\IFieldEditService.cs" />
<Compile Include="ControlObject\FieldEdit\Service\IFieldEditService.cs" />
<Compile Include="ControlObject\FieldEdit\ViewModel\FieldEditViewModelBase.cs" />
<Compile Include="ControlObject\FieldEdit\ViewModel\FieldEditViewModelBase.cs" />
<Compile Include="ControlObject\FieldTree\Service\IFieldTreeService.cs" />
<Compile Include="ControlObject\FieldTree\Service\IFieldTreeService.cs" />
...
@@ -102,6 +103,8 @@
...
@@ -102,6 +103,8 @@
<DependentUpon>MainStatusView.xaml</DependentUpon>
<DependentUpon>MainStatusView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Plugin\Service\IPluginService.cs" />
<Compile Include="Plugin\Service\IPluginService.cs" />
<Compile Include="Resource\MediaResource\Core\MHResourceFileDoubleClickEventArgs.cs" />
<Compile Include="Resource\MediaResource\Core\MHResourceSelectedFileChangedEventArgs.cs" />
<Compile Include="Setting\Conn\View\ConnSettingView.xaml.cs">
<Compile Include="Setting\Conn\View\ConnSettingView.xaml.cs">
<DependentUpon>ConnSettingView.xaml</DependentUpon>
<DependentUpon>ConnSettingView.xaml</DependentUpon>
</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