Commit eea5ebf5 by liulongfei

样式调整,右键菜单位置调整

parent 22b39f0f
...@@ -106,16 +106,17 @@ ...@@ -106,16 +106,17 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="Widgets\GridColumnEx\ColumnDefintionGeneratorTemplate.cs" /> <Compile Include="Widgets\GridControlEx\ColumnDefintionGeneratorTemplate.cs" />
<Compile Include="Widgets\GridColumnEx\ColumnDefintionGeneratorTemplateCollection.cs" /> <Compile Include="Widgets\GridControlEx\ColumnDefintionGeneratorTemplateCollection.cs" />
<Compile Include="Widgets\GridColumnEx\ColumnDefintionGeneratorTemplateSelector.cs" /> <Compile Include="Widgets\GridControlEx\ColumnDefintionGeneratorTemplateSelector.cs" />
<Compile Include="Widgets\GridControlEx\GridControlHelper.cs" />
<Compile Include="Widgets\InputControl\TextInputControl\TextInputWindow.xaml.cs"> <Compile Include="Widgets\InputControl\TextInputControl\TextInputWindow.xaml.cs">
<DependentUpon>TextInputWindow.xaml</DependentUpon> <DependentUpon>TextInputWindow.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Widgets\InputControl\TextInputControl\TextInputControl.xaml.cs"> <Compile Include="Widgets\InputControl\TextInputControl\TextInputControl.xaml.cs">
<DependentUpon>TextInputControl.xaml</DependentUpon> <DependentUpon>TextInputControl.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Widgets\GridColumnEx\GridColumnResizeMinHeight.cs" /> <Compile Include="Widgets\GridControlEx\GridColumnResizeMinHeight.cs" />
<Compile Include="Widgets\InputControl\TextInputControl\TextInputControlModel.cs" /> <Compile Include="Widgets\InputControl\TextInputControl\TextInputControlModel.cs" />
<Compile Include="Widgets\InputControl\TextInputControl\TextInputWindowModel.cs" /> <Compile Include="Widgets\InputControl\TextInputControl\TextInputWindowModel.cs" />
<Compile Include="Widgets\LeftRightTextEdit\LeftRightTextEdit.cs" /> <Compile Include="Widgets\LeftRightTextEdit\LeftRightTextEdit.cs" />
......
using DevExpress.Xpf.Grid;
using DevExpress.Xpf.Bars;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Package.Common
{
/// <summary>
/// 列表控件辅助类
/// </summary>
public static class GridControlHelper
{
/// <summary>
/// 保留菜单标志
/// </summary>
public const string KEEP_MENU_TAG = "VIZ";
/// <summary>
/// 移除所有默认的菜单
/// </summary>
/// <param name="e">菜单事件参数</param>
public static void RemoveAllDefaultMenuItem(GridMenuEventArgs e)
{
if (e.Items == null || e.Items.Count == 0)
return;
foreach (var item in e.Items)
{
if (KEEP_MENU_TAG.Equals(item.Tag))
continue;
e.Customizations.Add(new RemoveBarItemAndLinkAction() { ItemName = item.Name });
}
}
}
}
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
</ContextMenu> </ContextMenu>
</dxg:GridControl.ContextMenu> </dxg:GridControl.ContextMenu>
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView x:Name="tabView" AllowEditing="True" ShowIndicator="False" <dxg:TableView x:Name="tabView" AllowEditing="True" ShowIndicator="False" ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
IsColumnMenuEnabled="False" IsColumnMenuEnabled="False"
NavigationStyle="Cell" EditorShowMode="MouseDown" ShowVerticalLines="False" NavigationStyle="Cell" EditorShowMode="MouseDown" ShowVerticalLines="False"
ShowGroupPanel="False" ShowGroupPanel="False"
......
using DevExpress.Xpf.Core; using DevExpress.Xpf.Core;
using LiteDB; using LiteDB;
using log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -19,6 +20,11 @@ namespace VIZ.Package.Module ...@@ -19,6 +20,11 @@ namespace VIZ.Package.Module
/// </summary> /// </summary>
public class FieldEditViewModel : FieldEditViewModelBase, IFieldEditService public class FieldEditViewModel : FieldEditViewModelBase, IFieldEditService
{ {
/// <summary>
/// 日志
/// </summary>
private readonly static ILog log = LogManager.GetLogger(typeof(FieldEditViewModel));
public FieldEditViewModel() public FieldEditViewModel()
{ {
// 初始化命令 // 初始化命令
...@@ -254,8 +260,15 @@ namespace VIZ.Package.Module ...@@ -254,8 +260,15 @@ namespace VIZ.Package.Module
if (model != null) if (model != null)
{ {
model.FieldEditMode = FieldEditMode.Normal; try
model.Update(this.ControlObject, this.ControlField); {
model.FieldEditMode = FieldEditMode.Normal;
model.Update(this.ControlObject, this.ControlField);
}
catch (Exception ex)
{
log.Error(ex);
}
} }
} }
...@@ -285,8 +298,15 @@ namespace VIZ.Package.Module ...@@ -285,8 +298,15 @@ namespace VIZ.Package.Module
if (model == null) if (model == null)
return; return;
model.FieldEditMode = FieldEditMode.Normal; try
model.Update(this.ControlObject, this.ControlField); {
model.FieldEditMode = FieldEditMode.Normal;
model.Update(this.ControlObject, this.ControlField);
}
catch (Exception ex)
{
log.Error(ex);
}
} }
} }
} }
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<dxg:GridColumn Header="值" FieldName="Value" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="*" AllowResizing="True"></dxg:GridColumn> <dxg:GridColumn Header="值" FieldName="Value" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="*" AllowResizing="True"></dxg:GridColumn>
</dxg:GridControl.Columns> </dxg:GridControl.Columns>
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TreeListView AllowEditing="False" ShowIndicator="False" <dxg:TreeListView AllowEditing="False" ShowIndicator="False" ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
IsColumnMenuEnabled="False" IsColumnMenuEnabled="False"
NavigationStyle="Row" ShowVerticalLines="False" NavigationStyle="Row" ShowVerticalLines="False"
ShowBandsPanel="False" ShowBandsPanel="False"
......
...@@ -233,32 +233,23 @@ ...@@ -233,32 +233,23 @@
</StackPanel> </StackPanel>
</Border> </Border>
<dx:DXTabControl Grid.Row="1" Margin="0,5,0,0" Padding="0,5,0,0" <dx:DXTabControl Grid.Row="1" Margin="0,10,0,0" Padding="0,5,0,0"
ItemsSource="{Binding Path=PageGroupModels}" ItemsSource="{Binding Path=PageGroupModels}" Background="Transparent"
SelectedItem="{Binding Path=SelectedPageGroupModel,Mode=TwoWay}"> SelectedItem="{Binding Path=SelectedPageGroupModel,Mode=TwoWay}">
<dx:DXTabControl.ContextMenu> <dx:DXTabControl.ContextMenu>
<ContextMenu> <ContextMenu>
<MenuItem Header="打开" Command="{Binding Path=PlacementTarget.DataContext.OpenPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator>
<MenuItem Header="新建分组" Command="{Binding Path=PlacementTarget.DataContext.AddGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/> <MenuItem Header="新建分组" Command="{Binding Path=PlacementTarget.DataContext.AddGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="重命名分组" Command="{Binding Path=PlacementTarget.DataContext.RenameGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/> <MenuItem Header="重命名分组" Command="{Binding Path=PlacementTarget.DataContext.RenameGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator> <Separator></Separator>
<MenuItem Header="显示列" Command="{Binding Path=PlacementTarget.DataContext.ColumnChoiceCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator>
<MenuItem Header="更新选中页" Command="{Binding Path=PlacementTarget.DataContext.UpdateCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="初始化选中页" Command="{Binding Path=PlacementTarget.DataContext.TakeInitCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator>
<MenuItem Header="删除分组" Command="{Binding Path=PlacementTarget.DataContext.DeleteGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/> <MenuItem Header="删除分组" Command="{Binding Path=PlacementTarget.DataContext.DeleteGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="删除选中节目单" Command="{Binding Path=PlacementTarget.DataContext.DeleteItemCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
</ContextMenu> </ContextMenu>
</dx:DXTabControl.ContextMenu> </dx:DXTabControl.ContextMenu>
<dx:DXTabControl.View> <dx:DXTabControl.View>
<dx:TabControlStretchView Tag="Stretch" <dx:TabControlStretchView Tag="Stretch"
HeaderLocation="Top" HeaderLocation="Top" ShowHeaderMenu="False"
NewButtonShowMode="InTabPanel" NewButtonShowMode="InTabPanel"
HideButtonShowMode="InAllTabs" HideButtonShowMode="InAllTabs"
PinnedTabSize="100"> PinnedTabSize="100">
</dx:TabControlStretchView> </dx:TabControlStretchView>
</dx:DXTabControl.View> </dx:DXTabControl.View>
...@@ -271,26 +262,49 @@ ...@@ -271,26 +262,49 @@
<Setter Property="ContentTemplate"> <Setter Property="ContentTemplate">
<Setter.Value> <Setter.Value>
<DataTemplate> <DataTemplate>
<dxg:GridControl ItemsSource="{Binding Path=Pages}" ShowBorder="False" IsFilterEnabled="False" SelectionMode="Row" <dxg:GridControl ItemsSource="{Binding Path=Pages}" ShowBorder="False" IsFilterEnabled="False" SelectionMode="Row" Margin="0,5,0,0"
SelectedItem="{Binding Path=SelectedPage,Mode=TwoWay}" SelectedItem="{Binding Path=SelectedPage,Mode=TwoWay}"
SelectedItems="{Binding Path=SelectedPages}" SelectedItems="{Binding Path=SelectedPages}"
ColumnsSource="{Binding ElementName=uc, Path=DataContext.Columns}" ColumnsSource="{Binding ElementName=uc, Path=DataContext.Columns}"
ColumnGeneratorTemplateSelector="{StaticResource ResourceKey=ColumnDefintionGeneratorTemplateSelector}"> ColumnGeneratorTemplateSelector="{StaticResource ResourceKey=ColumnDefintionGeneratorTemplateSelector}">
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView IsColumnMenuEnabled="False" <dxg:TableView IsColumnMenuEnabled="True" ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
IsColumnChooserVisible="{Binding ElementName=uc, Path=DataContext.IsColumnChooserVisible,Mode=TwoWay}" IsColumnChooserVisible="{Binding ElementName=uc, Path=DataContext.IsColumnChooserVisible,Mode=TwoWay}"
AllowEditing="True" ShowIndicator="False" RowMinHeight="69.5" AllowEditing="True" ShowIndicator="False" RowMinHeight="69.5"
NavigationStyle="Cell" ShowVerticalLines="False" NavigationStyle="Cell" ShowVerticalLines="False"
ShowGroupPanel="False" EditorShowMode="MouseDown" ShowGroupPanel="False" EditorShowMode="MouseDown"
AllowDragDrop="True" AllowDragDrop="True"
ShowBandsPanel="False" ShowBandsPanel="False"
ShowTotalSummary="False" ShowTotalSummary="False"
ShowFixedTotalSummary="False" ShowFixedTotalSummary="False"
ShowDragDropHint="False" ShowDragDropHint="False"
ShowTargetInfoInDragDropHint="false"> ShowTargetInfoInDragDropHint="false">
<dxmvvm:Interaction.Behaviors> <dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="RowDoubleClick" Command="{Binding ElementName=uc, Path=DataContext.OpenPageCommand,Mode=TwoWay}"></dxmvvm:EventToCommand> <dxmvvm:EventToCommand EventName="RowDoubleClick" Command="{Binding ElementName=uc, Path=DataContext.OpenPageCommand}"></dxmvvm:EventToCommand>
<dxmvvm:EventToCommand EventName="ShowGridMenu" Command="{Binding ElementName=uc, Path=DataContext.ShowGridMenuCommand}" PassEventArgsToCommand="True"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors> </dxmvvm:Interaction.Behaviors>
<dxg:TableView.ColumnMenuCustomizations>
<dxb:BarButtonItem Name="ShowColumnChooser" Content="显示列选择"
Command="{Binding ElementName=uc,Path=DataContext.ColumnChoiceCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
</dxg:TableView.ColumnMenuCustomizations>
<dxg:TableView.RowCellMenuCustomizations>
<dxb:BarButtonItem Name="OpenPage" Content="打开"
Command="{Binding ElementName=uc,Path=DataContext.OpenPageCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
<dxb:BarItemLinkSeparator />
<dxb:BarButtonItem Name="Update" Content="更新选中页"
Command="{Binding ElementName=uc,Path=DataContext.UpdateCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
<dxb:BarButtonItem Name="TakeInit" Content="初始化选中页"
Command="{Binding ElementName=uc,Path=DataContext.TakeInitCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
<dxb:BarItemLinkSeparator />
<dxb:BarButtonItem Name="DeleteItem" Content="删除选中页"
Command="{Binding ElementName=uc,Path=DataContext.DeleteItemCommand}"
Tag="{x:Static Member=common:GridControlHelper.KEEP_MENU_TAG}"/>
</dxg:TableView.RowCellMenuCustomizations>
</dxg:TableView> </dxg:TableView>
</dxg:GridControl.View> </dxg:GridControl.View>
</dxg:GridControl> </dxg:GridControl>
......
using DevExpress.Xpf.Core; using DevExpress.Xpf.Core;
using DevExpress.Xpf.Grid;
using DevExpress.Xpf.Bars;
using log4net; using log4net;
using Newtonsoft.Json.Serialization;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
...@@ -10,6 +13,7 @@ using System.Web.UI; ...@@ -10,6 +13,7 @@ using System.Web.UI;
using System.Windows; using System.Windows;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.Package.Common;
using VIZ.Package.Service; using VIZ.Package.Service;
using VIZ.Package.Storage; using VIZ.Package.Storage;
...@@ -92,6 +96,7 @@ namespace VIZ.Package.Module ...@@ -92,6 +96,7 @@ namespace VIZ.Package.Module
this.TakeInitCommand = new VCommand(this.TakeInit); this.TakeInitCommand = new VCommand(this.TakeInit);
this.TakeInitAllCommand = new VCommand(this.TakeInitAll); this.TakeInitAllCommand = new VCommand(this.TakeInitAll);
this.ColumnChoiceCommand = new VCommand(this.ColumnChoice); this.ColumnChoiceCommand = new VCommand(this.ColumnChoice);
this.ShowGridMenuCommand = new VCommand<GridMenuEventArgs>(this.ShowGridMenu);
} }
/// <summary> /// <summary>
...@@ -527,6 +532,24 @@ namespace VIZ.Package.Module ...@@ -527,6 +532,24 @@ namespace VIZ.Package.Module
#endregion #endregion
#region ShowGridMenuCommand -- 显示列命令
/// <summary>
/// 显示列命令
/// </summary>
public VCommand<GridMenuEventArgs> ShowGridMenuCommand { get; set; }
/// <summary>
/// 显示列
/// </summary>
/// <param name="e">事件参数</param>
private void ShowGridMenu(GridMenuEventArgs e)
{
GridControlHelper.RemoveAllDefaultMenuItem(e);
}
#endregion
// ====================================================================================== // ======================================================================================
// Message // Message
// ====================================================================================== // ======================================================================================
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<dxg:GridColumn Header="引擎类型" FieldName="EngineType" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False"></dxg:GridColumn> <dxg:GridColumn Header="引擎类型" FieldName="EngineType" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False"></dxg:GridColumn>
</dxg:GridControl.Columns> </dxg:GridControl.Columns>
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView IsColumnMenuEnabled="False" RowMinHeight="69.5" <dxg:TableView IsColumnMenuEnabled="False" RowMinHeight="69.5" ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
AllowEditing="True" ShowIndicator="False" AllowEditing="True" ShowIndicator="False"
NavigationStyle="Cell" ShowVerticalLines="False" NavigationStyle="Cell" ShowVerticalLines="False"
ShowGroupPanel="False" EditorShowMode="MouseDown" ShowGroupPanel="False" EditorShowMode="MouseDown"
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<dxg:TreeViewControl ItemsSource="{Binding Path=FolderModels}" Margin="0,0,5,0" <dxg:TreeViewControl ItemsSource="{Binding Path=FolderModels}" Margin="0,0,5,0"
SelectedItem="{Binding Path=SelectedFolderModel,Mode=TwoWay}" SelectedItem="{Binding Path=SelectedFolderModel,Mode=TwoWay}"
ContextMenu="{Binding Path=FolderContextMenu,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:GHResourcePanel}}}" ContextMenu="{Binding Path=FolderContextMenu,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:GHResourcePanel}}}"
SelectionMode="Row" SelectionMode="Row" ScrollAnimationMode="EaseInOut" AllowScrollAnimation="True"
ShowNodeImages="True" ShowSearchPanel="False" ShowNodeImages="True" ShowSearchPanel="False"
ExpandStateFieldName="IsExpand" ExpandStateFieldName="IsExpand"
AllowEditing="False" TreeViewFieldName="Name" ChildNodesPath="Children"> AllowEditing="False" TreeViewFieldName="Name" ChildNodesPath="Children">
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<dxg:GridControl x:Name="fileGrid" Grid.Column="1" ShowBorder="True" <dxg:GridControl x:Name="fileGrid" Grid.Column="1" ShowBorder="True"
ContextMenu="{Binding Path=FileContextMenu,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:GHResourcePanel}}}" ContextMenu="{Binding Path=FileContextMenu,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:GHResourcePanel}}}"
SelectionMode="Row" SelectionMode="Row"
CustomRowFilterCommand="{Binding Path=FileRowFilterCommand}" CustomRowFilterCommand="{Binding Path=FileRowFilterCommand}"
ItemsSource="{Binding Path=FileModels}" ItemsSource="{Binding Path=FileModels}"
SelectedItems="{Binding Path=SelectedFileModels}" SelectedItems="{Binding Path=SelectedFileModels}"
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<dxg:GridColumn FieldName="Name" AllowColumnFiltering="False" AllowEditing="False" ReadOnly="True"></dxg:GridColumn> <dxg:GridColumn FieldName="Name" AllowColumnFiltering="False" AllowEditing="False" ReadOnly="True"></dxg:GridColumn>
</dxg:GridControl.Columns> </dxg:GridControl.Columns>
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:CardView IsColumnChooserVisible="False" <dxg:CardView IsColumnChooserVisible="False"
SeparatorThickness="0" SeparatorThickness="0"
CardLayout="Rows" CardLayout="Rows"
ShowCardExpandButton="False" ShowCardExpandButton="False"
......
using System; using log4net;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Dynamic; using System.Dynamic;
using System.Linq; using System.Linq;
...@@ -18,6 +19,11 @@ namespace VIZ.Package.Service ...@@ -18,6 +19,11 @@ namespace VIZ.Package.Service
public class VizCommandControlObjectService public class VizCommandControlObjectService
{ {
/// <summary> /// <summary>
/// 日志
/// </summary>
private readonly static ILog log = LogManager.GetLogger(typeof(VizCommandControlObjectService));
/// <summary>
/// 不启用编辑类型 /// 不启用编辑类型
/// </summary> /// </summary>
/// <remarks> /// <remarks>
...@@ -81,29 +87,38 @@ namespace VIZ.Package.Service ...@@ -81,29 +87,38 @@ namespace VIZ.Package.Service
public List<ExpandoObject> GetControlObjectListData(string xml) public List<ExpandoObject> GetControlObjectListData(string xml)
{ {
List<ExpandoObject> items = new List<ExpandoObject>(); List<ExpandoObject> items = new List<ExpandoObject>();
if (string.IsNullOrWhiteSpace(xml))
return items;
using (System.IO.MemoryStream ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(xml))) try
{ {
XElement element = XElement.Load(ms); using (System.IO.MemoryStream ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(xml)))
ControlObject_Entry_Node root = new ControlObject_Entry_Node();
root.FromXmlElement(element);
foreach (var row in root.Elements)
{ {
IDictionary<string, object> obj = new ExpandoObject(); XElement element = XElement.Load(ms);
ControlObject_Entry_Node data = row.Entrys.FirstOrDefault(p => p.Name == "data");
if (data == null)
continue;
foreach (var cell in data.Entrys) ControlObject_Entry_Node root = new ControlObject_Entry_Node();
root.FromXmlElement(element);
foreach (var row in root.Elements)
{ {
obj[cell.Name] = cell.Value; IDictionary<string, object> obj = new ExpandoObject();
} ControlObject_Entry_Node data = row.Entrys.FirstOrDefault(p => p.Name == "data");
if (data == null)
continue;
foreach (var cell in data.Entrys)
{
obj[cell.Name] = cell.Value;
}
items.Add(obj as ExpandoObject); items.Add(obj as ExpandoObject);
}
} }
} }
catch (Exception ex)
{
log.Error(ex);
}
return items; return items;
} }
......
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