-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dilshod Komilov
committed
Feb 26, 2021
1 parent
06d94c0
commit d340c07
Showing
4 changed files
with
88 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<Window x:Class="OData4.LINQPadDriver.CustomHeadersDialog" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:OData4.LINQPadDriver" | ||
mc:Ignorable="d" | ||
Background="{x:Static SystemColors.ControlBrush}" | ||
Width="450" | ||
WindowStartupLocation="CenterScreen" | ||
SizeToContent="Height" | ||
ResizeMode="NoResize" | ||
Title="CustomHeaders" > | ||
<StackPanel Orientation="Vertical" Margin="4" > | ||
<DataGrid AutoGenerateColumns="False" MinHeight="200" ItemsSource="{Binding CustomHeaders}"> | ||
<DataGrid.Columns> | ||
<DataGridTextColumn Width="*" Header="Name" Binding="{Binding Name}"/> | ||
<DataGridTextColumn Width="*" Header="Value" Binding="{Binding Value}"/> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
<DockPanel > | ||
<Button Padding="4" Content="Cancel" Margin="4 0 0 0" Width="60" DockPanel.Dock="Right" Click="Cancel_Click" /> | ||
<Button Padding="4" Width="60" Margin="0,0,4,0" Click="OK_Click" Content="OK" DockPanel.Dock="Right"/> | ||
<Grid/> | ||
</DockPanel> | ||
</StackPanel> | ||
</Window> |
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,36 @@ | ||
using System.Collections.Generic; | ||
using System.Windows; | ||
|
||
namespace OData4.LINQPadDriver | ||
{ | ||
/// <summary> | ||
/// Interaction logic for CustomHeadersDialog.xaml | ||
/// </summary> | ||
public partial class CustomHeadersDialog : Window | ||
{ | ||
public List<CustomHeader> CustomHeaders { get; set; } = new List<CustomHeader>(); | ||
public CustomHeadersDialog() | ||
{ | ||
InitializeComponent(); | ||
DataContext = this; | ||
} | ||
|
||
private void OK_Click(object sender, RoutedEventArgs e) | ||
{ | ||
this.Close(); | ||
} | ||
|
||
private void Cancel_Click(object sender, RoutedEventArgs e) | ||
{ | ||
CustomHeaders.Clear(); | ||
this.Close(); | ||
} | ||
} | ||
|
||
public class CustomHeader | ||
{ | ||
public string Name { get; set; } | ||
|
||
public string Value { get; set; } | ||
} | ||
} |