Commit df9b169d by liulongfei

样式调整

parent d86c8faf
...@@ -74,6 +74,20 @@ namespace VIZ.Package.Domain ...@@ -74,6 +74,20 @@ namespace VIZ.Package.Domain
// 扩展属性 // 扩展属性
// =========================================================== // ===========================================================
#region SelectedPage -- 当前选中的页
private PageModel selectedPage;
/// <summary>
/// 当前选中的页
/// </summary>
public PageModel SelectedPage
{
get { return selectedPage; }
set { selectedPage = value; this.RaisePropertyChanged(nameof(SelectedPage)); }
}
#endregion
#region SelectedPages -- 当前选中的页集合 #region SelectedPages -- 当前选中的页集合
private ObservableCollection<PageModel> selectedPages = new ObservableCollection<PageModel>(); private ObservableCollection<PageModel> selectedPages = new ObservableCollection<PageModel>();
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition> <ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged"></dxe:TextEdit> <dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button> <Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid> </Grid>
</local:ListCellEditBase> </local:ListCellEditBase>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="200"> d:DesignHeight="30" d:DesignWidth="200">
<Grid> <Grid>
<dxe:TextEdit x:Name="PART_Text" <dxe:TextEdit x:Name="PART_Text" Margin="1"
MaskType="Numeric" EditValueChanged="EditValueChanged"></dxe:TextEdit> MaskType="Numeric" EditValueChanged="EditValueChanged"></dxe:TextEdit>
</Grid> </Grid>
</local:ListCellEditBase> </local:ListCellEditBase>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<ColumnDefinition Width="30"></ColumnDefinition> <ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Width="16" Height="16" Source="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"></Image> <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> <dxe:TextEdit x:Name="PART_Text" Grid.Column="1" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="2" Click="EditClick"></Button> <Button x:Name="PART_Show" Content=".." Grid.Column="2" Click="EditClick"></Button>
</Grid> </Grid>
</local:ListCellEditBase> </local:ListCellEditBase>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<ColumnDefinition Width="30"></ColumnDefinition> <ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Width="16" Height="16" Source="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"></Image> <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> <dxe:TextEdit x:Name="PART_Text" Grid.Column="1" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="2" Click="EditClick"></Button> <Button x:Name="PART_Show" Content=".." Grid.Column="2" Click="EditClick"></Button>
</Grid> </Grid>
</local:ListCellEditBase> </local:ListCellEditBase>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="30" d:DesignWidth="200"> d:DesignHeight="30" d:DesignWidth="200">
<Grid> <Grid>
<dxe:TextEdit x:Name="PART_Text" <dxe:TextEdit x:Name="PART_Text" Margin="1"
MaskType="Numeric" Mask="d" EditValueChanged="EditValueChanged"></dxe:TextEdit> MaskType="Numeric" Mask="d" EditValueChanged="EditValueChanged"></dxe:TextEdit>
</Grid> </Grid>
</local:ListCellEditBase> </local:ListCellEditBase>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition> <ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" EditValueChanged="EditValueChanged"></dxe:TextEdit> <dxe:TextEdit x:Name="PART_Text" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button> <Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid> </Grid>
</local:ListCellEditBase> </local:ListCellEditBase>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition> <ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" EditValueChanged="EditValueChanged"></dxe:TextEdit> <dxe:TextEdit x:Name="PART_Text" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button> <Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid> </Grid>
</local:ListCellEditBase> </local:ListCellEditBase>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="30"></ColumnDefinition> <ColumnDefinition Width="30"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged"></dxe:TextEdit> <dxe:TextEdit x:Name="PART_Text" IsReadOnly="True" EditValueChanged="EditValueChanged" Margin="1"></dxe:TextEdit>
<Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button> <Button x:Name="PART_Show" Content=".." Grid.Column="1" Click="EditClick"></Button>
</Grid> </Grid>
</local:ListCellEditBase> </local:ListCellEditBase>
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
<Separator></Separator> <Separator></Separator>
<MenuItem Header="显示列" Command="{Binding Path=PlacementTarget.DataContext.ColumnChoiceCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/> <MenuItem Header="显示列" Command="{Binding Path=PlacementTarget.DataContext.ColumnChoiceCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator> <Separator></Separator>
<MenuItem Header="更新页" Command="{Binding Path=PlacementTarget.DataContext.UpdateCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/> <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}}"/> <MenuItem Header="初始化选中页" Command="{Binding Path=PlacementTarget.DataContext.TakeInitCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator> <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}}"/> <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>
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
<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"
SelectedItem="{Binding Path=SelectedPage,Mode=TwoWay}"
SelectedItems="{Binding Path=SelectedPages}"> SelectedItems="{Binding Path=SelectedPages}">
<dxg:GridControl.Columns> <dxg:GridControl.Columns>
<dxg:GridColumn Header="编号" AllowSorting="False" AllowColumnFiltering="False" AllowResizing="True" <dxg:GridColumn Header="编号" AllowSorting="False" AllowColumnFiltering="False" AllowResizing="True"
......
...@@ -316,11 +316,10 @@ namespace VIZ.Package.Module ...@@ -316,11 +316,10 @@ namespace VIZ.Package.Module
if (this.SelectedPageGroupModel == null) if (this.SelectedPageGroupModel == null)
return; return;
if (this.SelectedPageGroupModel.SelectedPages == null || this.SelectedPageGroupModel.SelectedPages.Count == 0) if (this.SelectedPageGroupModel.SelectedPage == null)
return; return;
PageModel page = this.SelectedPageGroupModel.SelectedPages.First(); this.OpenPage(this.SelectedPageGroupModel.SelectedPage);
this.OpenPage(page);
} }
#endregion #endregion
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<Grid IsEnabled="{Binding Path=IsEnabled}" Margin="0,10,0,10"> <Grid IsEnabled="{Binding Path=IsEnabled}" Margin="0,10,0,10">
<dxg:GridControl ItemsSource="{Binding Path=SceneTemplateModels}" ShowBorder="False" SelectionMode="Row" <dxg:GridControl ItemsSource="{Binding Path=SceneTemplateModels}" ShowBorder="False" SelectionMode="Row"
SelectedItem="{Binding Path=SelectedSceneTemplateModel}"
SelectedItems="{Binding Path=SelectedSceneTemplateModels}"> SelectedItems="{Binding Path=SelectedSceneTemplateModels}">
<dxg:GridControl.ContextMenu> <dxg:GridControl.ContextMenu>
<ContextMenu> <ContextMenu>
......
...@@ -144,6 +144,20 @@ namespace VIZ.Package.Module ...@@ -144,6 +144,20 @@ namespace VIZ.Package.Module
#endregion #endregion
#region SelectedSceneTemplateModel -- 当前选中的场景模板
private PageTemplateModel selectedSceneTemplateModel;
/// <summary>
/// 当前选中的场景模板
/// </summary>
public PageTemplateModel SelectedSceneTemplateModel
{
get { return selectedSceneTemplateModel; }
set { selectedSceneTemplateModel = value; this.RaisePropertyChanged(nameof(SelectedSceneTemplateModel)); }
}
#endregion
#region SelectedSceneTemplateModels -- 当前选中的场景模板集合 #region SelectedSceneTemplateModels -- 当前选中的场景模板集合
private ObservableCollection<PageTemplateModel> selectedSceneTemplateModels = new ObservableCollection<PageTemplateModel>(); private ObservableCollection<PageTemplateModel> selectedSceneTemplateModels = new ObservableCollection<PageTemplateModel>();
...@@ -200,11 +214,10 @@ namespace VIZ.Package.Module ...@@ -200,11 +214,10 @@ namespace VIZ.Package.Module
/// </summary> /// </summary>
private void OpenScenePage() private void OpenScenePage()
{ {
if (this.SelectedSceneTemplateModels == null || this.SelectedSceneTemplateModels.Count == 0) if (this.SelectedSceneTemplateModel == null)
return; return;
PageTemplateModel template = this.SelectedSceneTemplateModels.First(); this.OpenScenePage(this.SelectedSceneTemplateModel);
this.OpenScenePage(template);
} }
/// <summary> /// <summary>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<GroupBox Header="分组" Margin="5" Padding="5"> <GroupBox Header="分组" Margin="10,10,5,10" Padding="10">
<dxg:GridControl ItemsSource="{Binding Path=Groups}" ShowBorder="False" <dxg:GridControl ItemsSource="{Binding Path=Groups}" ShowBorder="False"
SelectedItem="{Binding Path=SelectedGroup,Mode=TwoWay}"> SelectedItem="{Binding Path=SelectedGroup,Mode=TwoWay}">
<dxg:GridControl.ContextMenu> <dxg:GridControl.ContextMenu>
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
ReadOnly="True"></dxg:GridColumn> ReadOnly="True"></dxg:GridColumn>
</dxg:GridControl.Columns> </dxg:GridControl.Columns>
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView AllowEditing="True" ShowIndicator="True" <dxg:TableView AllowEditing="True" ShowIndicator="False"
IsColumnMenuEnabled="False" IsColumnMenuEnabled="False"
ShowGroupPanelsForUngroupedDetails="False" ShowGroupPanelsForUngroupedDetails="False"
NavigationStyle="Cell" ShowVerticalLines="False" NavigationStyle="Cell" ShowVerticalLines="False"
ShowGroupPanel="False" ShowGroupPanel="False"
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<GridSplitter HorizontalAlignment="Right" VerticalAlignment="Stretch" Width="5" <GridSplitter HorizontalAlignment="Right" VerticalAlignment="Stretch" Width="5"
Style="{StaticResource GridSplitter_None}"></GridSplitter> Style="{StaticResource GridSplitter_None}"></GridSplitter>
<GroupBox Header="项" Margin="5" Padding="5" Grid.Column="1"> <GroupBox Header="项" Margin="0,10,10,10" Padding="10" Grid.Column="1">
<dxg:GridControl ItemsSource="{Binding Path=SelectedGroup.Items}" ShowBorder="False" Grid.Column="1" <dxg:GridControl ItemsSource="{Binding Path=SelectedGroup.Items}" ShowBorder="False" Grid.Column="1"
SelectedItem="{Binding Path=SelectedItem,Mode=TwoWay}"> SelectedItem="{Binding Path=SelectedItem,Mode=TwoWay}">
<dxg:GridControl.ContextMenu> <dxg:GridControl.ContextMenu>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
</dxg:GridColumn> </dxg:GridColumn>
</dxg:GridControl.Columns> </dxg:GridControl.Columns>
<dxg:GridControl.View> <dxg:GridControl.View>
<dxg:TableView AllowEditing="True" ShowIndicator="True" <dxg:TableView AllowEditing="True" ShowIndicator="False"
IsColumnMenuEnabled="False" IsColumnMenuEnabled="False"
NavigationStyle="Cell" ShowVerticalLines="False" NavigationStyle="Cell" ShowVerticalLines="False"
ShowGroupPanel="False" ShowGroupPanel="False"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<RowDefinition Height="60"></RowDefinition> <RowDefinition Height="60"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- 设置项 --> <!-- 设置项 -->
<GroupBox Header="设置" Margin="5" Padding="5"> <GroupBox Header="设置" Margin="10" Padding="5">
<ListBox ItemsSource="{Binding Path=ItemsSource}" Margin="0,0,6,0" Background="Transparent" <ListBox ItemsSource="{Binding Path=ItemsSource}" Margin="0,0,6,0" Background="Transparent"
SelectedValue="{Binding Path=SelectedValue,Mode=TwoWay}" BorderThickness="0"> SelectedValue="{Binding Path=SelectedValue,Mode=TwoWay}" BorderThickness="0">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
......
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