-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainWindow.xaml
101 lines (99 loc) · 5.98 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<Window x:Class="DngOpcodesEditor.MainWindow" xmlns:local="clr-namespace:DngOpcodesEditor"
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" mc:Ignorable="d"
WindowStartupLocation="CenterScreen" WindowState="Normal" SnapsToDevicePixels="True" AllowDrop="True" Drop="Window_Drop"
Title="" Width="1200" Height="768" Background="#FFDEDEDE">
<Window.DataContext>
<local:MainWindowVM x:Name="ViewModel" />
</Window.DataContext>
<Grid Margin="10">
<Grid.Resources>
<!--MouseMove="Image_MouseMove" MouseLeave="Image_MouseLeave"-->
<Style TargetType="Image">
<EventSetter Event="MouseMove" Handler="Image_MouseMove" />
<EventSetter Event="MouseLeave" Handler="Image_MouseLeave" />
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="220" />
<RowDefinition Height="10"/>
<RowDefinition/>
<RowDefinition Height="5"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="5"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<DataGrid Grid.Column="2" ItemsSource="{Binding SelectedOpcode.Parameters}" AutoGenerateColumns="False"
CanUserAddRows="False" CanUserDeleteRows="False">
<DataGrid.Columns>
<DataGridTextColumn IsReadOnly="True" Header="Parameter" Binding="{Binding Description}" />
<DataGridTextColumn Header="Value" Binding="{Binding Value, StringFormat=F4}" />
<DataGridTemplateColumn Header="Value (Slider)" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Slider Value="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Minimum="-10" Maximum="10" SmallChange="0.01" LargeChange="0.1"
TickFrequency="0.01" IsSnapToTickEnabled="True"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ListView ItemsSource="{Binding Opcodes}" SelectedItem="{Binding SelectedOpcode}">
<ListView.View>
<GridView>
<GridViewColumn Header="Enabled">
<GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Enabled}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="OpcodeID" DisplayMemberBinding="{Binding}" />
<GridViewColumn Header="OpcodeList" DisplayMemberBinding="{Binding ListIndex}" />
</GridView>
</ListView.View>
</ListView>
<StackPanel Grid.Column="2">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="0,0,0,10" />
<Setter Property="Padding" Value="5" />
</Style>
</StackPanel.Resources>
<Button Content="Import from DNG" Click="btnImportDNG_Click" />
<Button Content="Import from Binary" Click="btnImportBin_Click" />
<Button Content="Export to DNG" Click="btnExportDNG_Click" />
<Button Content="Export to Binary" Click="btnExportBin_Click" />
<!--<Button Content="Move Up" Click="btnMoveUp_Click" />
<Button Content="Move Down" Click="btnMoveDown_Click" />-->
<Button Content="Delete Opcode" Click="btnDeleteOpcode_Click" />
<Button Content="Clear" Click="btnClear_Click" />
<!--<ComboBox x:Name="cbOpcodesIDs" SelectedIndex="0" />
<Button Content="Add Opcode" Click="btnAddOpcode_Click" />-->
</StackPanel>
</Grid>
<Image x:Name="imageSrc" Grid.Row="2" Source="{Binding ImgSrc.Bmp}" />
<Button Content="Open Reference Image" Grid.Row="6" Click="btnOpenImage_Click" />
<Image x:Name="imageDst" Grid.Row="2" Source="{Binding ImgDst.Bmp}" Grid.Column="2"/>
<Button Content="Save Preview Image" Grid.Row="6" Grid.Column="2" Click="btnSaveImage_Click" />
<!--<Button Grid.Column="2" Content="Apply Opcodes" Grid.Row="5" Click="btnApplyOpcodes_Click"/>-->
<GridSplitter Grid.ColumnSpan="3" Grid.Row="1" HorizontalAlignment="Stretch" Background="#00F0F0F0" />
<TextBlock x:Name="tbInfo" Grid.ColumnSpan="3" Grid.Row="4" HorizontalAlignment="Center" d:Text="Info" />
<TextBlock x:Name="tbPosition" Grid.ColumnSpan="3" Grid.Row="4" HorizontalAlignment="Right" d:Text="Position" />
<StackPanel Grid.Row="4" Orientation="Horizontal">
<CheckBox IsChecked="{Binding DecodeGamma,Mode=TwoWay}" Content="Decode Input Gamma" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked" />
<CheckBox IsChecked="{Binding EncodeGamma,Mode=TwoWay}" Content="Encode Output Gamma" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked" Margin="5,0,0,0" />
</StackPanel>
</Grid>
</Window>