Commit 118cfb6c by liulongfei

自定义字段

parent 20ed5a57
...@@ -125,5 +125,19 @@ namespace VIZ.Package.Domain ...@@ -125,5 +125,19 @@ namespace VIZ.Package.Domain
} }
#endregion #endregion
#region IsCustom -- 是否是自定义字段
private bool isCustom;
/// <summary>
/// 是否是自定义字段
/// </summary>
public bool IsCustom
{
get { return isCustom; }
set { isCustom = value; this.RaisePropertyChanged(nameof(IsCustom)); }
}
#endregion
} }
} }
...@@ -270,5 +270,8 @@ ...@@ -270,5 +270,8 @@
<Resource Include="Icons\icon_field_edit_32x32.png" /> <Resource Include="Icons\icon_field_edit_32x32.png" />
<Resource Include="Icons\icon_play_list_32x32.png" /> <Resource Include="Icons\icon_play_list_32x32.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Icons\icon_custom_32x32.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
...@@ -16,10 +16,23 @@ ...@@ -16,10 +16,23 @@
d:DataContext="{d:DesignInstance Type=local:FieldTreeViewModel}" d:DataContext="{d:DesignInstance Type=local:FieldTreeViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<fcore:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter" TrueVisibility="Visible" FalseVisibility="Visible"></fcore:Bool2VisibilityConverter>
</UserControl.Resources>
<Grid> <Grid>
<dxg:GridControl ItemsSource="{Binding Path=ControlObject.FieldNodes}" ShowBorder="False" <dxg:GridControl ItemsSource="{Binding Path=ControlObject.FieldNodes}" ShowBorder="False"
SelectedItem="{Binding Path=SelectedControlField,Mode=TwoWay}"> SelectedItem="{Binding Path=SelectedControlField,Mode=TwoWay}">
<dxg:GridControl.Columns> <dxg:GridControl.Columns>
<dxg:GridColumn FieldName="IsCustom" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="50" AllowResizing="False">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Image Width="20" Height="20" VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding Path=Row.IsCustom,Converter={StaticResource Bool2VisibilityConverter}}"
Source="/VIZ.Package.Module.Resource;component/Icons/icon_custom_32x32.png"></Image>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="字段" FieldName="FieldIdentifier" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="150" AllowResizing="True"></dxg:GridColumn> <dxg:GridColumn Header="字段" FieldName="FieldIdentifier" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="150" AllowResizing="True"></dxg:GridColumn>
<dxg:GridColumn Header="类型" FieldName="Type" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="100" AllowResizing="True"></dxg:GridColumn> <dxg:GridColumn Header="类型" FieldName="Type" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="100" AllowResizing="True"></dxg:GridColumn>
<dxg:GridColumn Header="描述" FieldName="Description" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="*" AllowResizing="True"></dxg:GridColumn> <dxg:GridColumn Header="描述" FieldName="Description" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="*" AllowResizing="True"></dxg:GridColumn>
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
<!-- VIZ引擎 --> <!-- VIZ引擎 -->
<fcommon:WindowHost x:Name="host" Grid.Row="1" Background="Black" BackColor="Black"> <fcommon:WindowHost x:Name="host" Grid.Row="1" Background="#FF222222" BackColor="#FF222222">
<dxmvvm:Interaction.Behaviors> <dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand PassEventArgsToCommand="True" EventName="SizeChanged" <dxmvvm:EventToCommand PassEventArgsToCommand="True" EventName="SizeChanged"
Command="{Binding Path=WindowHostSizeChangedCommand}"></dxmvvm:EventToCommand> Command="{Binding Path=WindowHostSizeChangedCommand}"></dxmvvm:EventToCommand>
......
...@@ -37,5 +37,10 @@ namespace VIZ.Package.Storage ...@@ -37,5 +37,10 @@ namespace VIZ.Package.Storage
/// 字段类型 /// 字段类型
/// </summary> /// </summary>
public VizControlFieldType Type { get; set; } public VizControlFieldType Type { get; set; }
/// <summary>
/// 是否是自定义字段
/// </summary>
public bool IsCustom { get; set; }
} }
} }
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