|
@@ -14,28 +14,60 @@
|
|
|
<Grid>
|
|
|
<DockPanel LastChildFill="True" Margin="20">
|
|
|
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
|
|
|
- <My:MComboBox Title="选择字典种类">
|
|
|
- <ComboBoxItem>常规</ComboBoxItem>
|
|
|
- <ComboBoxItem>警告</ComboBoxItem>
|
|
|
- <ComboBoxItem>报警</ComboBoxItem>
|
|
|
+ <My:MComboBox Title="选择字典种类" Text="{Binding Type}">
|
|
|
+ <ComboBoxItem>Normal</ComboBoxItem>
|
|
|
+ <ComboBoxItem>Alarm</ComboBoxItem>
|
|
|
+ <ComboBoxItem>Warn</ComboBoxItem>
|
|
|
</My:MComboBox>
|
|
|
- <My:MButton Type="Primary">新增</My:MButton>
|
|
|
- <My:MButton Type="Warning">导入</My:MButton>
|
|
|
+ <My:MTextBox Title="字典编码" Text="{Binding Code}"/>
|
|
|
+ <My:MButton Type="Primary" Click="MButton_Search_Click">查询</My:MButton>
|
|
|
+ <My:MButton Click="MButton_Reset_Click">条件重置</My:MButton>
|
|
|
+ <My:MButton Type="Primary" Click="MButton_Add_Click">新增</My:MButton>
|
|
|
+ <My:MButton Type="Success" Click="MButton_Import_Click">导入</My:MButton>
|
|
|
+ <My:MButton Type="Warning" Click="MButton_Export_Click">导出</My:MButton>
|
|
|
+ <Popup x:Name="PopDict" Placement="Bottom" PopupAnimation="Slide" StaysOpen="False">
|
|
|
+ <Border Background="White"
|
|
|
+ BorderBrush="{StaticResource DefaultBorderBrushLight}"
|
|
|
+ BorderThickness="{StaticResource DefaultBorderThickness}"
|
|
|
+ Margin="0">
|
|
|
+ <StackPanel>
|
|
|
+ <TextBlock x:Name="TextTitle" FontSize="18" Margin="10 10 10 0"/>
|
|
|
+ <Grid Height="260" Width="300" Margin="10">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ <RowDefinition/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <My:MComboBox x:Name="EditType" Grid.Row="0" Title="选择字典种类">
|
|
|
+ <ComboBoxItem>Normal</ComboBoxItem>
|
|
|
+ <ComboBoxItem>Alarm</ComboBoxItem>
|
|
|
+ <ComboBoxItem>Warn</ComboBoxItem>
|
|
|
+ </My:MComboBox>
|
|
|
+ <My:MTextBox x:Name="EditCode" Grid.Row="1" Title="字典编码"/>
|
|
|
+ <My:MTextBox x:Name="EditKey" Grid.Row="2" Title="字典键"/>
|
|
|
+ <My:MTextBox x:Name="EditValue" Grid.Row="3" Title="字典值"/>
|
|
|
+ <My:MButton Grid.Row="4" Type="Primary" Width="{StaticResource DefaultWidth}" Click="MButton_OK_Click">确定</My:MButton>
|
|
|
+ </Grid>
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ </Popup>
|
|
|
+
|
|
|
</StackPanel>
|
|
|
- <My:MPagination DockPanel.Dock="Bottom"/>
|
|
|
+ <My:MPagination x:Name="MyPagination" DockPanel.Dock="Bottom" PageIndexChange="MPagination_PageIndexChange" PageSizeChange="MPagination_PageSizeChange"/>
|
|
|
<My:MDataGrid ItemsSource="{Binding Dicts}" DockPanel.Dock="Top">
|
|
|
<DataGrid.Columns>
|
|
|
<DataGridTextColumn Header="类型" Binding="{Binding Type}" Width="100"></DataGridTextColumn>
|
|
|
<DataGridTextColumn Header="编码" Binding="{Binding Code}" Width="100"></DataGridTextColumn>
|
|
|
<DataGridTextColumn Header="键" Binding="{Binding Key}" Width="100"></DataGridTextColumn>
|
|
|
<DataGridTextColumn Header="值" Binding="{Binding Value}" Width="100"></DataGridTextColumn>
|
|
|
- <DataGridTextColumn Header="备注" Binding="{Binding Mask}" Width="100"></DataGridTextColumn>
|
|
|
<DataGridTemplateColumn>
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
<DataTemplate>
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
- <My:MButton IsText="True" Icon="{StaticResource Icon-edit}">编辑</My:MButton>
|
|
|
- <My:MButton IsText="True" Icon="{StaticResource Icon-trash-alt}">删除</My:MButton>
|
|
|
+ <My:MButton IsText="True" Icon="{StaticResource Icon-edit}" Click="MButton_Edit_Click">编辑</My:MButton>
|
|
|
+ <My:MButton IsText="True" Icon="{StaticResource Icon-trash-alt}" Click="MButton_Delete_Click">删除</My:MButton>
|
|
|
</StackPanel>
|
|
|
</DataTemplate>
|
|
|
</DataGridTemplateColumn.CellTemplate>
|