1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-29 10:50:28 +00:00

Layout for app settings

Multi-tab dialog with tons of controls.

Also, fixed WorkProgress owner, and removed debug delay from source
gen dialog.
This commit is contained in:
Andy McFadden 2019-06-24 15:48:11 -07:00
parent 8d8112f5c9
commit 0a96e014e2
8 changed files with 451 additions and 4 deletions

View File

@ -250,8 +250,8 @@ namespace SourceGenWPF.AsmGen.WpfGui {
mGenerator = gen;
}
public object DoWork(BackgroundWorker worker) {
worker.ReportProgress(50, "Halfway there!");
System.Threading.Thread.Sleep(3000);
//worker.ReportProgress(50, "Halfway there!");
//System.Threading.Thread.Sleep(5000);
return mGenerator.GenerateSource(worker);
}
public void RunWorkerCompleted(object results) {

View File

@ -1148,6 +1148,16 @@ namespace SourceGenWPF {
dlg.ShowDialog();
}
/// <summary>
/// Opens the application settings dialog. All changes to settings are made directly
/// to the AppSettings.Global object.
/// </summary>
public void EditSettings() {
EditAppSettings dlg = new EditAppSettings(mMainWin, EditAppSettings.Tab.Unknown,
AsmGen.AssemblerInfo.Id.Unknown);
dlg.ShowDialog();
}
public void HandleCodeListDoubleClick(int row, int col) {
Debug.WriteLine("DCLICK: row=" + row + " col=" + col);

View File

@ -73,6 +73,9 @@
<Compile Include="AsmGen\IGenerator.cs" />
<Compile Include="AsmGen\LabelLocalizer.cs" />
<Compile Include="AsmGen\StringGather.cs" />
<Compile Include="WpfGui\EditAppSettings.xaml.cs">
<DependentUpon>EditAppSettings.xaml</DependentUpon>
</Compile>
<Compile Include="WpfGui\WorkProgress.xaml.cs">
<DependentUpon>WorkProgress.xaml</DependentUpon>
</Compile>
@ -164,6 +167,10 @@
<Resource Include="Res\Logo.png" />
</ItemGroup>
<ItemGroup>
<Page Include="WpfGui\EditAppSettings.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WpfGui\WorkProgress.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>

View File

@ -0,0 +1,364 @@
<!--
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="SourceGenWPF.WpfGui.EditAppSettings"
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:SourceGenWPF.WpfGui"
mc:Ignorable="d"
Title="Edit Application Settings"
Width="680" Height="480" ResizeMode="NoResize"
ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
<DockPanel Margin="8">
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Name="applyButton" Content="Apply" Margin="0,0,20,0"
Width="70"/>
<Button Name="okButton" Content="OK" IsDefault="True"
Width="70"/>
<Button Name="cancelButton" Content="Cancel" IsCancel="True"
Width="70" Margin="4,0,0,0"/>
</StackPanel>
<TabControl DockPanel.Dock="Top" Margin="0,0,0,8">
<TabItem Header="Code View">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.75*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<GroupBox Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" Header="Column Visibility"
Margin="0,0,10,0">
<StackPanel>
<Button Content="{}{0} Offset" Width="120" Margin="0,4"/>
<Button Content="{}{0} Address" Width="120" Margin="0,4"/>
<Button Content="{}{0} Bytes" Width="120" Margin="0,4"/>
<Button Content="{}{0} Flags" Width="120" Margin="0,4"/>
<Button Content="{}{0} Attributes" Width="120" Margin="0,4"/>
<Button Content="{}{0} Label" Width="120" Margin="0,4"/>
<Button Content="{}{0} Opcode" Width="120" Margin="0,4"/>
<Button Content="{}{0} Operand" Width="120" Margin="0,4"/>
<Button Content="{}{0} Comment" Width="120" Margin="0,4"/>
</StackPanel>
</GroupBox>
<GroupBox Grid.Column="1" Grid.Row="0" Header="Code List Font"
Margin="5,0,5,0">
<StackPanel>
<TextBlock Margin="0,4,0,0">Current font:</TextBlock>
<TextBlock Margin="0,4,0,0">Constantia, 10pt</TextBlock>
<Button Content="Select Font..." Width="120" Margin="0,8,0,0"
HorizontalAlignment="Left"/>
</StackPanel>
</GroupBox>
<GroupBox Grid.Column="1" Grid.Row="1" Header="Upper Case Display"
Margin="5,0,5,0">
<StackPanel>
<CheckBox Content="Hexadecimal Values" Margin="0,4"/>
<CheckBox Content="Opcodes" Margin="0,4"/>
<CheckBox Content="Pseudo-opcodes" Margin="0,4"/>
<CheckBox Content="Operand A" Margin="0,4"/>
<CheckBox Content="Operand S" Margin="0,4"/>
<CheckBox Content="Operand X/Y" Margin="0,4"/>
<StackPanel Orientation="Horizontal">
<Button Content="All Lower" Width="75" Margin="0,4,0,0"/>
<Button Content="All Upper" Width="75" Margin="8,4,0,0"/>
</StackPanel>
</StackPanel>
</GroupBox>
<GroupBox Grid.Column="2" Grid.Row="0" Header="Clipboard"
Margin="10,0,0,0">
<StackPanel>
<TextBlock Margin="0,4,0,0">Format for lines copied to clipboard:</TextBlock>
<ComboBox IsReadOnly="True" Margin="0,8,0,0">
<ComboBoxItem>Assembler Source</ComboBoxItem>
<ComboBoxItem>Disassembly</ComboBoxItem>
</ComboBox>
</StackPanel>
</GroupBox>
<GroupBox Grid.Column="2" Grid.Row="1" Header="Miscellaneous"
Margin="10,0,0,0">
<CheckBox Content="Add spaces in bytes column" Margin="0,4,0,0"/>
</GroupBox>
<CheckBox Grid.Column="0" Grid.Row="3" Margin="0,16,0,0" Content="Enable DEBUG menu"/>
</Grid>
</TabItem>
<TabItem Header="Asm Config">
<StackPanel>
<GroupBox Header="Assembler Configuration">
<Grid Margin="0,4,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Text="Assembler:"
HorizontalAlignment="Right" Margin="0,5,4,0"/>
<ComboBox Grid.Column="1" Grid.Row="0" IsReadOnly="True"
Width="150" HorizontalAlignment="Left" Margin="0,4,0,20"/>
<TextBlock Grid.Column="0" Grid.Row="1" Text="Executable:"
HorizontalAlignment="Right" Margin="0,0,4,0"/>
<DockPanel Grid.Column="1" Grid.Row="1">
<Button DockPanel.Dock="Right" Content="Browse..." Width="75"
Margin="8,0,0,8"/>
<TextBox DockPanel.Dock="Left" Margin="0,0,0,8">C:\something</TextBox>
</DockPanel>
<TextBlock Grid.Column="0" Grid.Row="2" Text="Column widths:"
HorizontalAlignment="Right" Margin="0,0,4,0"/>
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal">
<TextBox Width="60" Margin="0,0,4,0"/>
<TextBox Width="60" Margin="0,0,4,0"/>
<TextBox Width="60" Margin="0,0,4,0"/>
<TextBox Width="60" Margin="0,0,8,0"/>
<TextBlock Text="(label, opcode, operand, comment)"/>
</StackPanel>
</Grid>
</GroupBox>
<TextBlock Text="General code generation:" Margin="0,16,0,0"/>
<CheckBox Content="Show cycle counts" Margin="0,8,0,0"/>
<CheckBox Content="Put long labels on separate line" Margin="0,8,0,0"/>
<CheckBox Content="Identify assembler in output" Margin="0,8,0,0"/>
<CheckBox Content="Disable label localization" Margin="0,8,0,0"/>
</StackPanel>
</TabItem>
<TabItem Header="Display Format">
<DockPanel LastChildFill="False">
<TextBlock DockPanel.Dock="Top"
Text="Configure display format options. This does not affect source code generation."/>
<GroupBox Header="Operand Width Disambiguator" Width="300" DockPanel.Dock="Top" HorizontalAlignment="Left">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Text="Opcode suffix:" Margin="0,4,0,0"/>
<TextBlock Grid.Column="3" Grid.Row="0" Grid.ColumnSpan="2"
Text="Operand prefix:" Margin="0,4,0,0"/>
<TextBlock Grid.Column="0" Grid.Row="1" Text="16-bit:"
Margin="0,4,0,0"/>
<TextBox Grid.Column="1" Grid.Row="1" Text=".placeho"
Margin="0,4,0,0" FontFamily="{StaticResource GeneralMonoFont}"/>
<TextBlock Grid.Column="3" Grid.Row="1" Text="16-bit:"
Margin="0,4,0,0"/>
<TextBox Grid.Column="4" Grid.Row="1" Text=".placeho"
Margin="0,4,0,0" FontFamily="{StaticResource GeneralMonoFont}"/>
<TextBlock Grid.Column="0" Grid.Row="2" Text="24-bit:"
Margin="0,4,0,0"/>
<TextBox Grid.Column="1" Grid.Row="2" Text=".placeho"
Margin="0,4,0,0" FontFamily="{StaticResource GeneralMonoFont}"/>
<TextBlock Grid.Column="3" Grid.Row="2" Text="24-bit:"
Margin="0,4,0,0"/>
<TextBox Grid.Column="4" Grid.Row="2" Text=".placeho"
Margin="0,4,0,0" FontFamily="{StaticResource GeneralMonoFont}"/>
</Grid>
</GroupBox>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,16,0,0">
<TextBlock Text="Expression style:"/>
<ComboBox Width="120" Margin="8,0,0,0"/>
</StackPanel>
</DockPanel>
</TabItem>
<TabItem Header="Pseudo-Op">
<TabItem.Resources>
<!-- TextBox spacer -->
<Thickness x:Key="TBS" Left="6" Top="0" Right="0" Bottom="0"/>
</TabItem.Resources>
<DockPanel LastChildFill="False">
<TextBlock DockPanel.Dock="Top"
Text="Select pseudo-op names for display. This does not affect source code generation. Blank entries get a default value."/>
<Grid DockPanel.Dock="Top" Height="240">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.8*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- first column -->
<TextBlock Grid.Column="0" Grid.Row="0" Text="Equate:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<StackPanel Grid.Column="0" Grid.Row="1" VerticalAlignment="Center">
<TextBlock Text="Little-endian" HorizontalAlignment="Right"/>
<TextBlock Text="data, one byte:" HorizontalAlignment="Right"/>
</StackPanel>
<StackPanel Grid.Column="0" Grid.Row="2" VerticalAlignment="Center">
<TextBlock Text="Big-endian data," HorizontalAlignment="Right"/>
<TextBlock Text="two bytes:" HorizontalAlignment="Right"/>
</StackPanel>
<TextBlock Grid.Column="0" Grid.Row="3" Text="Generic string:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="0" Grid.Row="4" Text="1-byte len:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="0" Grid.Row="5" Text="Null term string:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBox Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<!-- second column -->
<TextBlock Grid.Column="3" Grid.Row="0" Text="Origin:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="3" Grid.Row="1" Text="Two bytes:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="3" Grid.Row="3" Text="Generic/hi:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="3" Grid.Row="4" Text="1-byte len/hi:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="3" Grid.Row="5" Text="Null term/hi:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBox Grid.Column="4" Grid.Row="0" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="4" Grid.Row="1" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="4" Grid.Row="3" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="4" Grid.Row="4" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="4" Grid.Row="5" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<!-- third column -->
<TextBlock Grid.Column="6" Grid.Row="0" Text="Reg width:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="6" Grid.Row="1" Text="Three bytes:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="6" Grid.Row="2" Text="Fill:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="6" Grid.Row="3" Text="Reverse:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="6" Grid.Row="4" Text="2-byte len:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="6" Grid.Row="5" Text="DCI:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBox Grid.Column="7" Grid.Row="0" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="7" Grid.Row="1" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="7" Grid.Row="2" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="7" Grid.Row="3" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="7" Grid.Row="4" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="7" Grid.Row="5" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<!-- fourth column -->
<TextBlock Grid.Column="9" Grid.Row="1" Text="Four bytes:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="9" Grid.Row="2" Text="Bulk data:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="9" Grid.Row="3" Text="Reverse/hi:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="9" Grid.Row="4" Text="2-byte len/hi:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="9" Grid.Row="5" Text="DCI/hi:"
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBox Grid.Column="10" Grid.Row="1" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="10" Grid.Row="2" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="10" Grid.Row="3" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="10" Grid.Row="4" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
<TextBox Grid.Column="10" Grid.Row="5" VerticalAlignment="Center" Text=".placeho"
FontFamily="{StaticResource GeneralMonoFont}" Margin="{StaticResource TBS}"/>
</Grid>
<GroupBox DockPanel.Dock="Bottom" Header="Quick Set"
Width="400" HorizontalAlignment="Right">
<DockPanel LastChildFill="False" Margin="8">
<Button DockPanel.Dock="Left" Content="Default" Width="75"/>
<Button DockPanel.Dock="Right" Content="Set" Width="75" Margin="8,0,0,0"/>
<ComboBox DockPanel.Dock="Right" Width="170"/>
</DockPanel>
</GroupBox>
</DockPanel>
</TabItem>
</TabControl>
</DockPanel>
</Window>

View File

@ -0,0 +1,59 @@
/*
* 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.
*/
using System;
using System.Windows;
using AssemblerInfo = SourceGenWPF.AsmGen.AssemblerInfo;
using AssemblerConfig = SourceGenWPF.AsmGen.AssemblerConfig;
using ExpressionMode = Asm65.Formatter.FormatConfig.ExpressionMode;
namespace SourceGenWPF.WpfGui {
/// <summary>
/// Application settings dialog.
/// </summary>
public partial class EditAppSettings : Window {
/// <summary>
/// Tab page enumeration. Numbers must match page indices in designer.
/// </summary>
public enum Tab {
Unknown = -1,
CodeView = 0,
AsmConfig = 1,
DisplayFormat = 2,
PseudoOp = 3
}
/// <summary>
/// Tab to show when dialog is first opened.
/// </summary>
private Tab mInitialTab;
/// <summary>
/// Assembler to initially select in combo boxes.
/// </summary>
private AssemblerInfo.Id mInitialAsmId;
public EditAppSettings(Window owner, Tab initialTab,
AsmGen.AssemblerInfo.Id initialAsmId) {
InitializeComponent();
Owner = owner;
mInitialTab = initialTab;
mInitialAsmId = initialAsmId;
}
}
}

View File

@ -47,6 +47,7 @@ limitations under the License.
<Setter Property="HorizontalContentAlignment" Value="Left" />
</Style>
<RoutedUICommand x:Key="AppSettingsCmd" Text="Settings..."/>
<RoutedUICommand x:Key="AssembleCmd" Text="Assemble...">
<RoutedUICommand.InputGestures>
<KeyGesture>Ctrl+Shift+A</KeyGesture>
@ -98,6 +99,8 @@ limitations under the License.
</Window.Resources>
<Window.CommandBindings>
<CommandBinding Command="{StaticResource AppSettingsCmd}"
Executed="AppSettingsCmd_Executed"/>
<CommandBinding Command="{StaticResource AssembleCmd}"
CanExecute="IsProjectOpen" Executed="AssembleCmd_Executed"/>
<CommandBinding Command="{StaticResource CloseCmd}"
@ -174,7 +177,7 @@ limitations under the License.
<MenuItem Command="Properties" Header="Project Properties..."/>
<MenuItem Header="Toggle Data Scan"/>
<Separator/>
<MenuItem Header="Settings..."/>
<MenuItem Command="{StaticResource AppSettingsCmd}"/>
</MenuItem>
<MenuItem Name="actionsMenu" Header="_Actions">
<MenuItem Command="{StaticResource EditAddressCmd}"/>

View File

@ -717,6 +717,10 @@ namespace SourceGenWPF.WpfGui {
#region Command handlers
private void AppSettingsCmd_Executed(object sender, ExecutedRoutedEventArgs e) {
mMainCtrl.EditSettings();
}
private void AssembleCmd_Executed(object sender, ExecutedRoutedEventArgs e) {
mMainCtrl.AssembleProject();
}

View File

@ -48,7 +48,7 @@ namespace SourceGenWPF.WpfGui {
public WorkProgress(Window owner, IWorker callbacks, bool indeterminate) {
InitializeComponent();
Owner = Owner;
Owner = owner;
progressBar.IsIndeterminate = indeterminate;