Commit 9df48ebb by liulongfei

字体文件支持

parent bfd9aa95
...@@ -14,11 +14,11 @@ namespace VIZ.Package.Domain ...@@ -14,11 +14,11 @@ namespace VIZ.Package.Domain
/// <summary> /// <summary>
/// 未指定 /// 未指定
/// </summary> /// </summary>
None, NONE,
/// <summary> /// <summary>
/// 未知 /// 未知
/// </summary> /// </summary>
Unknow, UNKNOW,
/// <summary> /// <summary>
/// 图片 /// 图片
/// </summary> /// </summary>
...@@ -30,6 +30,10 @@ namespace VIZ.Package.Domain ...@@ -30,6 +30,10 @@ namespace VIZ.Package.Domain
/// <summary> /// <summary>
/// 视频 /// 视频
/// </summary> /// </summary>
Video VIDEO,
/// <summary>
/// 字体
/// </summary>
FONT
} }
} }
<UserControl x:Class="VIZ.Package.Module.FontEditPanel"
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"
d:DataContext="{d:DesignInstance Type=local:FontEditPanelModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="值:" Margin="0,0,10,0" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
<dxe:TextEdit Grid.Column="1" Height="30" EditValue="{Binding Path=Path}" IsReadOnly="True"></dxe:TextEdit>
</Grid>
<dx:DXTabControl Grid.Row="1">
<dx:DXTabItem Header="GH库" >
<!-- GH资源面板 -->
<local:GHResourcePanel x:Name="ghResourcePanel">
<local:GHResourcePanel.FolderContextMenu>
<ContextMenu>
<MenuItem Header="刷新" Command="{Binding Path=PlacementTarget.DataContext.RefreshFolderCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
</ContextMenu>
</local:GHResourcePanel.FolderContextMenu>
<local:GHResourcePanel.FileContextMenu>
<ContextMenu>
<MenuItem Header="刷新" Command="{Binding Path=PlacementTarget.DataContext.RefreshFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
</ContextMenu>
</local:GHResourcePanel.FileContextMenu>
</local:GHResourcePanel>
</dx:DXTabItem>
</dx:DXTabControl>
</Grid>
</UserControl>
\ No newline at end of file
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.Framework.Core;
namespace VIZ.Package.Module
{
/// <summary>
/// FontEditPanel.xaml 的交互逻辑
/// </summary>
public partial class FontEditPanel : UserControl
{
public FontEditPanel()
{
InitializeComponent();
FontEditPanelModel vm = new FontEditPanelModel();
WPFHelper.BindingViewModel(this.ghResourcePanel, vm.GHResourceEditPartModel);
WPFHelper.BindingViewModel(this, vm);
}
}
}
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Storage;
namespace VIZ.Package.Module
{
/// <summary>
/// 字体编辑面板模型
/// </summary>
public class FontEditPanelModel : ResourceEditPanelModelBase
{
public FontEditPanelModel()
{
this.GHResourceEditPartModel.FilterResourceFileType = ResourceFileType.FONT;
this.GHResourceEditPartModel.OnFileDoubleClick += GHResourceEditPartModel_OnFileDoubleClick;
}
// =====================================================================
// Property
// =====================================================================
#region Path -- 路径
private string path;
/// <summary>
/// 路径
/// </summary>
public string Path
{
get { return path; }
set
{
path = value;
this.RaisePropertyChanged(nameof(Path));
this.OnPathChanged();
}
}
#endregion
// =====================================================================
// Command
// =====================================================================
// =====================================================================
// Public Function
// =====================================================================
/// <summary>
/// 更新
/// </summary>
/// <param name="controlObject">控制对象</param>
/// <param name="controlField">控制字段</param>
public override void Update(ControlObjectModel controlObject, ControlFieldNodeModel controlField)
{
base.Update(controlObject, controlField);
this.IsSendToPreview = false;
this.Path = controlField?.Value;
this.IsSendToPreview = true;
}
/// <summary>
/// 更新动态数据
/// </summary>
/// <param name="listCellEdit">列单元格编辑器</param>
/// <param name="columnDefinition">列定义</param>
/// <param name="rowHandle">行号</param>
/// <param name="row">行数据</param>
public override void UpdateDynamic(ListCellEditBase listCellEdit, GridColumnDefinition columnDefinition, int rowHandle, ExpandoObject row)
{
base.UpdateDynamic(listCellEdit, columnDefinition, rowHandle, row);
IDictionary<string, object> dic = row as IDictionary<string, object>;
this.IsSendToPreview = false;
this.Path = dic?[columnDefinition.FieldName]?.ToString();
this.IsSendToPreview = true;
}
/// <summary>
/// 获取字段值
/// </summary>
/// <returns>字段值</returns>
public override string GetFieldValue()
{
return this.Path;
}
// =====================================================================
// Private Function
// =====================================================================
/// <summary>
/// 路径切换时触发
/// </summary>
private void OnPathChanged()
{
// 不需要向预览发送值
if (!this.IsSendToPreview)
return;
// 没有预览连接
if (ApplicationDomainEx.PreviewConn == null)
return;
// 没有控制对象或控制字段
if (this.ControlObject == null || this.ControlField == null)
return;
if (this.FieldEditMode == FieldEditMode.Normal)
{
this.ControlField.Value = this.Path;
this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn,
this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier,
this.ControlField.Value);
return;
}
// 没有列信息或行数据
if (this.ColumnDefinition == null || this.Row == null)
return;
// 动态模式编辑
if (this.FieldEditMode == FieldEditMode.Dynamic)
{
IDictionary<string, object> dic = this.Row as IDictionary<string, object>;
dic[this.ColumnDefinition.FieldName] = this.Path;
this.ListCellEdit.UpdateEditValue(this.ColumnDefinition, this.RowHandle, this.Row);
return;
}
}
/// <summary>
/// GH库双击文件时触发
/// </summary>
private void GHResourceEditPartModel_OnFileDoubleClick(object sender, GHResourceFileDoubleClickEventArgs e)
{
if (e.File == null)
return;
this.Path = e.File?.ResourcePath;
}
}
}
...@@ -20,12 +20,9 @@ namespace VIZ.Package.Module ...@@ -20,12 +20,9 @@ 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.MHResourceEditPartModel.FilterResourceFileType = ResourceFileType.IMAGE; this.MHResourceEditPartModel.FilterResourceFileType = ResourceFileType.IMAGE;
this.MHResourceEditPartModel.OnFileDoubleClick += MHResourceEditPartModel_OnFileDoubleClick; this.MHResourceEditPartModel.OnFileDoubleClick += MHResourceEditPartModel_OnFileDoubleClick;
// 初始化命令 // 初始化命令
this.InitCommand(); this.InitCommand();
} }
...@@ -209,8 +206,6 @@ namespace VIZ.Package.Module ...@@ -209,8 +206,6 @@ namespace VIZ.Package.Module
/// <summary> /// <summary>
/// 媒体库点击文件时触发 /// 媒体库点击文件时触发
/// </summary> /// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void MHResourceEditPartModel_OnFileDoubleClick(object sender, MHResourceFileDoubleClickEventArgs e) private void MHResourceEditPartModel_OnFileDoubleClick(object sender, MHResourceFileDoubleClickEventArgs e)
{ {
if (e.File == null) if (e.File == null)
...@@ -218,7 +213,5 @@ namespace VIZ.Package.Module ...@@ -218,7 +213,5 @@ namespace VIZ.Package.Module
this.Path = e.File?.Path; this.Path = e.File?.Path;
} }
} }
} }
<local:ListCellEditBase x:Class="VIZ.Package.Module.FontListCellEdit"
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">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<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"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="2" Click="EditClick"></Button>
</Grid>
</local:ListCellEditBase>
using System;
using System.Collections.Generic;
using System.Dynamic;
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;
using VIZ.Package.Service;
namespace VIZ.Package.Module
{
/// <summary>
/// FontListCellEdit.xaml 的交互逻辑
/// </summary>
public partial class FontListCellEdit : ListCellEditBase
{
public FontListCellEdit()
{
InitializeComponent();
}
/// <summary>
/// 数据上下文改变时触发
/// </summary>
/// <param name="e">事件参数</param>
protected override void OnDataContextChanged(DependencyPropertyChangedEventArgs e)
{
DevExpress.Xpf.Grid.EditGridCellData cellData = e.NewValue as DevExpress.Xpf.Grid.EditGridCellData;
this.IsSendToPreview = false;
this.PART_Text.EditValue = cellData?.Value?.ToString();
this.IsSendToPreview = true;
}
/// <summary>
/// 值改变时触发
/// </summary>
private void EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
// 是否需要发送至预览
if (!this.IsSendToPreview)
return;
// 预览连接不存在
if (ApplicationDomainEx.PreviewConn == null)
return;
DevExpress.Xpf.Grid.EditGridCellData cellData = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
if (cellData == null)
return;
GridColumnDefinition columnDefinition = cellData.Column.DataContext as GridColumnDefinition;
if (columnDefinition == null)
return;
// 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn,
columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value,
columnDefinition.FieldName,
e.NewValue?.ToString() ?? string.Empty);
}
/// <summary>
/// 显示编辑窗口
/// </summary>
private void EditClick(object sender, RoutedEventArgs e)
{
DevExpress.Xpf.Grid.EditGridCellData cellData = this.DataContext as DevExpress.Xpf.Grid.EditGridCellData;
if (cellData == null)
return;
GridColumnDefinition columnDefinition = cellData.Column.DataContext as GridColumnDefinition;
if (columnDefinition == null)
return;
FieldEditWindow window = this.GetFieldEditWindow();
FieldEditWindowModel vm = window.DataContext as FieldEditWindowModel;
vm.Update(this, columnDefinition, cellData.RowData.RowHandle.Value, cellData.Row as ExpandoObject);
window.ShowInTaskbar = true;
window.Visibility = Visibility.Visible;
}
/// <summary>
/// 更新
/// </summary>
/// <param name="columnDefinition">列定义</param>
/// <param name="rowHandle">行号</param>
/// <param name="row">行数据</param>
public override void UpdateEditValue(GridColumnDefinition columnDefinition, int rowHandle, ExpandoObject row)
{
IDictionary<string, object> dic = row as IDictionary<string, object>;
if (dic == null)
{
this.PART_Text.EditValue = null;
return;
}
this.PART_Text.EditValue = dic[columnDefinition.FieldName]?.ToString();
}
}
}
...@@ -56,6 +56,12 @@ ...@@ -56,6 +56,12 @@
<local:ImageListCellEdit></local:ImageListCellEdit> <local:ImageListCellEdit></local:ImageListCellEdit>
</DataTemplate> </DataTemplate>
</local:ListEditPanelCellTemplateSelector.ImageDataTemplate> </local:ListEditPanelCellTemplateSelector.ImageDataTemplate>
<!-- 字体 -->
<local:ListEditPanelCellTemplateSelector.FontDataTemplate>
<DataTemplate>
<local:FontListCellEdit></local:FontListCellEdit>
</DataTemplate>
</local:ListEditPanelCellTemplateSelector.FontDataTemplate>
</local:ListEditPanelCellTemplateSelector> </local:ListEditPanelCellTemplateSelector>
<!-- 单元格编辑模板选择器 --> <!-- 单元格编辑模板选择器 -->
......
...@@ -58,6 +58,11 @@ namespace VIZ.Package.Module ...@@ -58,6 +58,11 @@ namespace VIZ.Package.Module
public DataTemplate TripletDataTemplate { get; set; } public DataTemplate TripletDataTemplate { get; set; }
/// <summary> /// <summary>
/// 字体
/// </summary>
public DataTemplate FontDataTemplate { get; set; }
/// <summary>
/// 筛选模板 /// 筛选模板
/// </summary> /// </summary>
/// <param name="item">项</param> /// <param name="item">项</param>
......
...@@ -103,6 +103,13 @@ namespace VIZ.Package.Module ...@@ -103,6 +103,13 @@ namespace VIZ.Package.Module
ViewCreated = this.OnViewCreated ViewCreated = this.OnViewCreated
}); });
// 字体
this.NavigationConfigs.Add(new NavigationConfig
{
Key = VizControlFieldType.font.ToString(),
ViewType = typeof(FontEditPanel),
ViewCreated = this.OnViewCreated
});
} }
// ============================================================= // =============================================================
......
...@@ -268,7 +268,7 @@ namespace VIZ.Package.Module ...@@ -268,7 +268,7 @@ namespace VIZ.Package.Module
return; return;
} }
if (this.FilterResourceFileType == ResourceFileType.None) if (this.FilterResourceFileType == ResourceFileType.NONE)
{ {
e.Visible = true; e.Visible = true;
return; return;
......
...@@ -111,7 +111,7 @@ namespace VIZ.Package.Module ...@@ -111,7 +111,7 @@ namespace VIZ.Package.Module
{ {
GHFile.Name = file.fileName; GHFile.Name = file.fileName;
GHFile.Path = file.smallIconUrl; GHFile.Path = file.smallIconUrl;
GHFile.FileType = ResourceFileType.Video; GHFile.FileType = ResourceFileType.VIDEO;
GHFile.Date = Convert.ToDateTime(file.fileUpdateTime).ToString("yyyy/MM/dd HH:mm"); GHFile.Date = Convert.ToDateTime(file.fileUpdateTime).ToString("yyyy/MM/dd HH:mm");
GHFile.FileSize = file.fileSize; GHFile.FileSize = file.fileSize;
string strVedioPath = string.Format("{0}{1}", System.Environment.CurrentDirectory, "\\Resources\\Vedio.jpeg"); string strVedioPath = string.Format("{0}{1}", System.Environment.CurrentDirectory, "\\Resources\\Vedio.jpeg");
...@@ -119,7 +119,7 @@ namespace VIZ.Package.Module ...@@ -119,7 +119,7 @@ namespace VIZ.Package.Module
vedioImage = ThumbnailHelper.GetThumbnail(vedioImage, vedioImage.Width / 2, vedioImage.Height / 2); vedioImage = ThumbnailHelper.GetThumbnail(vedioImage, vedioImage.Width / 2, vedioImage.Height / 2);
Bitmap vedioBtm = new Bitmap(vedioImage); Bitmap vedioBtm = new Bitmap(vedioImage);
GHFile.ThumbnailBitmap = vedioBtm; GHFile.ThumbnailBitmap = vedioBtm;
GHFile.FileType = ResourceFileType.Video; GHFile.FileType = ResourceFileType.VIDEO;
list.Add(GHFile); list.Add(GHFile);
} }
i++; i++;
......
...@@ -909,7 +909,7 @@ namespace VIZ.Package.Module ...@@ -909,7 +909,7 @@ namespace VIZ.Package.Module
return; return;
} }
if (this.FilterResourceFileType == ResourceFileType.None) if (this.FilterResourceFileType == ResourceFileType.NONE)
{ {
e.Visible = true; e.Visible = true;
return; return;
......
...@@ -94,9 +94,16 @@ ...@@ -94,9 +94,16 @@
<DependentUpon>FloatEditPanel.xaml</DependentUpon> <DependentUpon>FloatEditPanel.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="ControlObject\FieldEdit\Edit\FloatEdit\FloatEditPanelModel.cs" /> <Compile Include="ControlObject\FieldEdit\Edit\FloatEdit\FloatEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\FontEdit\FontEditPanel.xaml.cs">
<DependentUpon>FontEditPanel.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\FontEdit\FontEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\FloatListCellEdit.xaml.cs"> <Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\FloatListCellEdit.xaml.cs">
<DependentUpon>FloatListCellEdit.xaml</DependentUpon> <DependentUpon>FloatListCellEdit.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\FontListCellEdit.xaml.cs">
<DependentUpon>FontListCellEdit.xaml</DependentUpon>
</Compile>
<Compile Include="Help\About\View\AboutWindow.xaml.cs"> <Compile Include="Help\About\View\AboutWindow.xaml.cs">
<DependentUpon>AboutWindow.xaml</DependentUpon> <DependentUpon>AboutWindow.xaml</DependentUpon>
</Compile> </Compile>
...@@ -345,10 +352,18 @@ ...@@ -345,10 +352,18 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="ControlObject\FieldEdit\Edit\FontEdit\FontEditPanel.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\FloatListCellEdit.xaml"> <Page Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\FloatListCellEdit.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\FontListCellEdit.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Help\About\View\AboutWindow.xaml"> <Page Include="Help\About\View\AboutWindow.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
......
...@@ -111,6 +111,12 @@ namespace VIZ.Package.Service ...@@ -111,6 +111,12 @@ namespace VIZ.Package.Service
child.FileType = ResourceFileType.SCENE; child.FileType = ResourceFileType.SCENE;
} }
// 字体
if (entry_node.categorys.Any(p => p.term == GH_Category_Term_Enums.FONT))
{
child.FileType = ResourceFileType.FONT;
}
list.Add(child); list.Add(child);
} }
......
...@@ -30,7 +30,8 @@ namespace VIZ.Package.Service ...@@ -30,7 +30,8 @@ namespace VIZ.Package.Service
VizControlFieldType.integer, VizControlFieldType.integer,
VizControlFieldType.@float, VizControlFieldType.@float,
VizControlFieldType.duplet, VizControlFieldType.duplet,
VizControlFieldType.triplet VizControlFieldType.triplet,
VizControlFieldType.font
}; };
/// <summary> /// <summary>
...@@ -434,6 +435,9 @@ namespace VIZ.Package.Service ...@@ -434,6 +435,9 @@ namespace VIZ.Package.Service
if (type == "triplet") if (type == "triplet")
return VizControlFieldType.triplet; return VizControlFieldType.triplet;
if (type == "font")
return VizControlFieldType.font;
if (type.StartsWith("<?xml")) if (type.StartsWith("<?xml"))
return VizControlFieldType.list; return VizControlFieldType.list;
......
...@@ -72,6 +72,10 @@ namespace VIZ.Package.Storage ...@@ -72,6 +72,10 @@ namespace VIZ.Package.Storage
[Description("三元组")] [Description("三元组")]
triplet, triplet,
/// <summary>
/// 字体
/// </summary>
[Description("字体")]
font
} }
} }
...@@ -36,6 +36,9 @@ namespace VIZ.Package.Storage ...@@ -36,6 +36,9 @@ namespace VIZ.Package.Storage
/// </summary> /// </summary>
public const string asset = "asset"; public const string asset = "asset";
/// <summary>
/// 字体
/// </summary>
public const string FONT = "FONT";
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment