2019-09-11 00:43:31 +00:00
|
|
|
<!--
|
|
|
|
Copyright 2019 faddenSoft
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<Window x:Class="SourceGen.WpfGui.Export"
|
|
|
|
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:SourceGen.WpfGui"
|
|
|
|
mc:Ignorable="d"
|
|
|
|
Title="Export Source"
|
|
|
|
SizeToContent="WidthAndHeight" ResizeMode="NoResize"
|
2019-09-12 20:57:52 +00:00
|
|
|
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
|
|
|
|
Loaded="Window_Loaded">
|
2019-09-11 00:43:31 +00:00
|
|
|
<Grid Margin="8">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
2019-09-12 20:57:52 +00:00
|
|
|
|
2019-09-11 00:43:31 +00:00
|
|
|
<GroupBox Grid.Row="0" Header="General Options" Padding="2,4">
|
|
|
|
<StackPanel>
|
2019-09-14 00:09:06 +00:00
|
|
|
<CheckBox Content="Include only selected lines" IsChecked="{Binding SelectionOnly}"/>
|
|
|
|
<CheckBox Content="Include notes" Margin="0,2,0,0" IsChecked="{Binding IncludeNotes}"/>
|
2019-09-12 20:57:52 +00:00
|
|
|
<CheckBox Content="Show Offset column" Margin="0,2,0,0" IsChecked="{Binding ShowOffset}"/>
|
|
|
|
<CheckBox Content="Show Address column" Margin="0,2,0,0" IsChecked="{Binding ShowAddress}"/>
|
|
|
|
<CheckBox Content="Show Bytes column" Margin="0,2,0,0" IsChecked="{Binding ShowBytes}"/>
|
|
|
|
<CheckBox Content="Show Flags column" Margin="0,2,0,0" IsChecked="{Binding ShowFlags}"/>
|
|
|
|
<CheckBox Content="Show Attributes column" Margin="0,2,0,0" IsChecked="{Binding ShowAttr}"/>
|
2019-09-11 00:43:31 +00:00
|
|
|
|
|
|
|
<TextBlock Text="Column widths (label, opcode, operand, comment):" Margin="0,4,0,0"/>
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,4,0,0">
|
|
|
|
<TextBox Name="asmLabelColWidthTextBox" Width="60" Margin="0,0,4,0"
|
|
|
|
TextChanged="AsmColWidthTextBox_TextChanged">
|
|
|
|
<TextBox.Text>
|
|
|
|
<Binding Path="AsmLabelColWidth" UpdateSourceTrigger="PropertyChanged">
|
|
|
|
<Binding.ValidationRules>
|
|
|
|
<local:AsmColWidthRule ValidatesOnTargetUpdated="True"/>
|
|
|
|
</Binding.ValidationRules>
|
|
|
|
</Binding>
|
|
|
|
</TextBox.Text>
|
|
|
|
</TextBox>
|
|
|
|
<TextBox Name="asmOpcodeColWidthTextBox" Width="60" Margin="0,0,4,0"
|
|
|
|
TextChanged="AsmColWidthTextBox_TextChanged">
|
|
|
|
<TextBox.Text>
|
|
|
|
<Binding Path="AsmOpcodeColWidth" UpdateSourceTrigger="PropertyChanged">
|
|
|
|
<Binding.ValidationRules>
|
|
|
|
<local:AsmColWidthRule ValidatesOnTargetUpdated="True"/>
|
|
|
|
</Binding.ValidationRules>
|
|
|
|
</Binding>
|
|
|
|
</TextBox.Text>
|
|
|
|
</TextBox>
|
|
|
|
<TextBox Name="asmOperandColWidthTextBox" Width="60" Margin="0,0,4,0"
|
|
|
|
TextChanged="AsmColWidthTextBox_TextChanged">
|
|
|
|
<TextBox.Text>
|
|
|
|
<Binding Path="AsmOperandColWidth" UpdateSourceTrigger="PropertyChanged">
|
|
|
|
<Binding.ValidationRules>
|
|
|
|
<local:AsmColWidthRule ValidatesOnTargetUpdated="True"/>
|
|
|
|
</Binding.ValidationRules>
|
|
|
|
</Binding>
|
|
|
|
</TextBox.Text>
|
|
|
|
</TextBox>
|
|
|
|
<TextBox Name="asmCommentColWidthTextBox" Width="60" Margin="0,0,8,0"
|
|
|
|
TextChanged="AsmColWidthTextBox_TextChanged">
|
|
|
|
<TextBox.Text>
|
|
|
|
<Binding Path="AsmCommentColWidth" UpdateSourceTrigger="PropertyChanged">
|
|
|
|
<Binding.ValidationRules>
|
|
|
|
<local:AsmColWidthRule ValidatesOnTargetUpdated="True"/>
|
|
|
|
</Binding.ValidationRules>
|
|
|
|
</Binding>
|
|
|
|
</TextBox.Text>
|
|
|
|
</TextBox>
|
|
|
|
</StackPanel>
|
2019-09-18 18:05:52 +00:00
|
|
|
|
|
|
|
<CheckBox Content="Put long labels on separate line" Margin="0,8,0,0"
|
|
|
|
IsChecked="{Binding LongLabelNewLine}"/>
|
2019-09-11 00:43:31 +00:00
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
<GroupBox Grid.Row="1" Header="Text Options" Padding="2,4">
|
|
|
|
<StackPanel>
|
2019-09-12 20:57:52 +00:00
|
|
|
<RadioButton Content="Plain text (UTF-8)" GroupName="TextMode" IsChecked="{Binding TextModePlain}"/>
|
|
|
|
<RadioButton Content="CSV" GroupName="TextMode" Margin="0,2,0,0" IsChecked="{Binding TextModeCsv}"/>
|
2019-09-11 00:43:31 +00:00
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
<GroupBox Grid.Row="2" Header="HTML Options" Padding="2,4">
|
|
|
|
<StackPanel>
|
2019-09-12 20:57:52 +00:00
|
|
|
<CheckBox Content="Overwrite CSS file" Margin="0,2,0,0" IsChecked="{Binding OverwriteCss}"/>
|
2019-09-11 00:43:31 +00:00
|
|
|
</StackPanel>
|
|
|
|
</GroupBox>
|
|
|
|
|
|
|
|
<Grid Grid.Row="3" Margin="0,8,0,0">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Button Grid.Column="0" Content="Generate HTML" Width="100"
|
2019-09-12 20:57:52 +00:00
|
|
|
IsEnabled="{Binding IsValid}" Click="GenerateHtmlButton_Click"/>
|
2019-09-11 00:43:31 +00:00
|
|
|
<Button Grid.Column="1" Content="Generate Text" Width="100" Margin="8,0,0,0"
|
2019-09-12 20:57:52 +00:00
|
|
|
IsEnabled="{Binding IsValid}" Click="GenerateTextButton_Click"/>
|
2019-09-11 00:43:31 +00:00
|
|
|
<Button Grid.Column="2" Content="Cancel" IsCancel="True" Width="70" Margin="8,0,0,0"
|
|
|
|
HorizontalAlignment="Right"/>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|