-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add search function when editing GMD + version bump
- Loading branch information
Showing
8 changed files
with
156 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<UserControl x:Class="Cirilla.UserControls.GMDEditor" | ||
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:root="clr-namespace:Cirilla" | ||
xmlns:convert="clr-namespace:Cirilla.Converters" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800"> | ||
<UserControl.Resources> | ||
<convert:InverseBooleanConverter x:Key="InverseBooleanConverter"/> | ||
</UserControl.Resources> | ||
|
||
<TabControl> | ||
<TabItem Header="Header"> | ||
<DataGrid ItemsSource="{Binding HeaderMetadata}" ColumnWidth="*" AutoGenerateColumns="False" BorderThickness="0" CanUserAddRows="False"> | ||
<DataGrid.Columns> | ||
<DataGridTextColumn Header="Key" Binding="{Binding Key}" IsReadOnly="True"/> | ||
<DataGridTextColumn Header="Value" Binding="{Binding Value}" IsReadOnly="True"/> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
</TabItem> | ||
|
||
<TabItem Header="Entries"> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
</Grid.RowDefinitions> | ||
|
||
<Grid Grid.Row="0" Margin="5"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
|
||
<TextBlock Grid.Column="0" Text="Search: "/> | ||
<TextBox Grid.Column="1" Text="{Binding SearchQuery, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}"> | ||
<TextBox.InputBindings> | ||
<KeyBinding Key="Return" Command="{Binding TriggerSearchCommand}"/> | ||
</TextBox.InputBindings> | ||
</TextBox> | ||
</Grid> | ||
|
||
<DataGrid Grid.Row="1" ItemsSource="{Binding FilteredEntries}" ColumnWidth="*" AutoGenerateColumns="False" BorderThickness="0" CanUserDeleteRows="{root:SettingBinding UnsafeModeEnabled}" CanUserAddRows="False"> | ||
<DataGrid.Columns> | ||
<DataGridTextColumn Header="Index" Binding="{Binding Index}" IsReadOnly="True" Width="50"/> | ||
<DataGridTextColumn Header="Key" Binding="{Binding Key}" IsReadOnly="{root:SettingBinding UnsafeModeEnabled, Converter={StaticResource InverseBooleanConverter}}"/> | ||
<DataGridTextColumn Header="Value" Binding="{Binding Value}"> | ||
<DataGridTextColumn.EditingElementStyle> | ||
<Style TargetType="TextBox"> | ||
<Setter Property="AcceptsReturn" Value="true" /> | ||
</Style> | ||
</DataGridTextColumn.EditingElementStyle> | ||
</DataGridTextColumn> | ||
</DataGrid.Columns> | ||
|
||
<DataGrid.RowStyle> | ||
<Style TargetType="DataGridRow"> | ||
<Style.Triggers> | ||
<DataTrigger Binding="{Binding Value}" Value="Invalid Message"> | ||
<Setter Property="Background" Value="Yellow"/> | ||
</DataTrigger> | ||
<DataTrigger Binding="{Binding Key}" Value=""> | ||
<Setter Property="Background" Value="Orange"/> | ||
</DataTrigger> | ||
</Style.Triggers> | ||
</Style> | ||
</DataGrid.RowStyle> | ||
|
||
<DataGrid.ContextMenu> | ||
<ContextMenu> | ||
<MenuItem Header="Add Normal entry (with key)" Command="{Binding AddEntryCommand}"/> | ||
<MenuItem Header="Add Padding entry (no key)" Command="{Binding AddEntryNoKeyCommand}"/> | ||
</ContextMenu> | ||
</DataGrid.ContextMenu> | ||
</DataGrid> | ||
</Grid> | ||
</TabItem> | ||
</TabControl> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
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; | ||
|
||
namespace Cirilla.UserControls | ||
{ | ||
/// <summary> | ||
/// Interaction logic for GMDEditor.xaml | ||
/// </summary> | ||
public partial class GMDEditor : UserControl | ||
{ | ||
public GMDEditor() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters