Skip to content

Commit

Permalink
WIP, reworking all addresses textboxes...
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilien Noal <[email protected]>
  • Loading branch information
maximilien-noal committed Feb 22, 2025
1 parent de3f910 commit c53e03f
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 293 deletions.
30 changes: 0 additions & 30 deletions src/Spice86/Converters/HexadecimalToDecimalConverter.cs

This file was deleted.

5 changes: 0 additions & 5 deletions src/Spice86/Spice86.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,4 @@
<ProjectReference Include="..\Spice86.Logging\Spice86.Logging.csproj" />
<ProjectReference Include="..\Spice86.Shared\Spice86.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="UserControls\AddressAutoCompleteBox.axaml.cs">
<DependentUpon>AddressAutoCompleteBox.axaml</DependentUpon>
</Compile>
</ItemGroup>
</Project>
12 changes: 0 additions & 12 deletions src/Spice86/UserControls/AddressAutoCompleteBox.axaml

This file was deleted.

128 changes: 0 additions & 128 deletions src/Spice86/UserControls/AddressAutoCompleteBox.axaml.cs

This file was deleted.

12 changes: 0 additions & 12 deletions src/Spice86/UserControls/HexadecimalTextBox.axaml

This file was deleted.

73 changes: 0 additions & 73 deletions src/Spice86/UserControls/HexadecimalTextBox.axaml.cs

This file was deleted.

26 changes: 14 additions & 12 deletions src/Spice86/Views/BreakpointsView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Spice86.Views.BreakpointsView"
x:DataType="viewModels:BreakpointsViewModel">
<UserControl.Resources>
<converters:HexadecimalToDecimalConverter x:Key="HexadecimalToDecimalConverter" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand All @@ -34,7 +31,7 @@
<DataGrid.Columns>
<DataGridCheckBoxColumn IsReadOnly="False" Binding="{Binding IsEnabled}" Header="Is Enabled ?" />
<DataGridCheckBoxColumn IsReadOnly="True" Binding="{Binding IsRemovedOnTrigger}" Header="Is removed on trigger ?" />
<DataGridTextColumn IsReadOnly="True" Binding="{Binding Address, Converter={StaticResource HexadecimalToDecimalConverter}}" Header="Parameter" />
<DataGridTextColumn IsReadOnly="True" Binding="{Binding Address, Converter={StaticResource DecimalToHexadecimalConverter}}" Header="Parameter" />
<DataGridTextColumn IsReadOnly="True" Binding="{Binding Type}" Header="Type" />
<DataGridTextColumn IsReadOnly="False" Binding="{Binding Comment}" Header="Comment" />
</DataGrid.Columns>
Expand Down Expand Up @@ -69,30 +66,35 @@
ItemsSource="{Binding MemoryBreakpointTypes}" />
</controls:GroupBox>
<controls:GroupBox Grid.Column="1" Header="Memory address">
<userControls:AddressAutoCompleteBox
State="{Binding State}"
ParsedAddress="{Binding MemoryAddressValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5,0,0,0" />
<TextBox
Text="{Binding MemoryAddressValue, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Margin="5,0,0,0" />
</controls:GroupBox>
</Grid>
</controls:GroupBox>
<controls:GroupBox Grid.Row="0" Header="Execution"
IsVisible="{Binding IsExecutionBreakpointSelected}">
<controls:GroupBox Header="Memory address">
<userControls:AddressAutoCompleteBox
State="{Binding State}"
ParsedAddress="{Binding ExecutionAddressValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5,0,0,0" />
<TextBox
Text="{Binding ExecutionAddressValue,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}" Margin="5,0,0,0" />
</controls:GroupBox>
</controls:GroupBox>
<controls:GroupBox Grid.Row="0" Header="Interrupt"
IsVisible="{Binding IsInterruptBreakpointSelected}">
<controls:GroupBox Header="Interrupt Number">
<userControls:HexadecimalTextBox ParsedHexadecimalNumber="{Binding InterruptNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5,0,0,0" />
<NumericUpDown Text="{Binding InterruptNumber,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}" Margin="5,0,0,0" />
</controls:GroupBox>
</controls:GroupBox>
<controls:GroupBox Grid.Row="0" Header="I/O Port"
IsVisible="{Binding IsIoPortBreakpointSelected}">
<controls:GroupBox Header="I/O Port Number">
<userControls:HexadecimalTextBox ParsedHexadecimalNumber="{Binding IoPortNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="5,0,0,0" />
<NumericUpDown
Text="{Binding IoPortNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Margin="5,0,0,0" />
</controls:GroupBox>
</controls:GroupBox>
<StackPanel
Expand Down
11 changes: 5 additions & 6 deletions src/Spice86/Views/DisassemblyView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@
<StackPanel Orientation="Vertical" Grid.Column="3">
<Label HorizontalAlignment="Center" Content="Start Address" />
<Grid ColumnDefinitions="*,*">
<userControls:AddressAutoCompleteBox Name="StartAddressTextBox"
<TextBox Name="StartAddressTextBox"
Grid.Column="0"
Width="150"
State="{Binding State}"
ParsedAddress="{Binding StartAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
MinWidth="150"
Text="{Binding StartAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</StackPanel>
<StackPanel Orientation="Vertical" Grid.Column="4">
Expand Down Expand Up @@ -226,8 +225,8 @@
<StackPanel
Grid.Row="1"
Orientation="Vertical">
<userControls:AddressAutoCompleteBox
ParsedAddress="{Binding BreakpointAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
<TextBox
Text="{Binding BreakpointAddress, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>
</Grid>
<StackPanel
Expand Down
Loading

0 comments on commit c53e03f

Please sign in to comment.