-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Create/Delete Address Breakpoint
Signed-off-by: Maximilien Noal <noal.maximilien@gmail.com>
- Loading branch information
1 parent
e7e60df
commit 3e58dd8
Showing
10 changed files
with
98 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace Spice86.Messages; | ||
|
||
public record StatusMessage(DateTime Time, object Origin, string Message); |
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
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,25 @@ | ||
namespace Spice86.ViewModels; | ||
|
||
using Avalonia.Collections; | ||
|
||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using CommunityToolkit.Mvvm.Messaging; | ||
|
||
using Spice86.Messages; | ||
|
||
public partial class StatusMessageViewModel : ViewModelBase, IRecipient<StatusMessage> { | ||
[ObservableProperty] | ||
private AvaloniaList<StatusMessage> _previousMessages = new(); | ||
|
||
[ObservableProperty] | ||
private StatusMessage? _message; | ||
|
||
public StatusMessageViewModel(IMessenger messenger) => messenger.Register(this); | ||
|
||
public void Receive(StatusMessage message) { | ||
PreviousMessages.Add(message); | ||
Message = message; | ||
if (PreviousMessages.Count > 50) | ||
PreviousMessages.RemoveAt(0); | ||
} | ||
} |
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
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,29 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
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:viewModels="clr-namespace:Spice86.ViewModels" | ||
xmlns:controls="clr-namespace:Spice86.Controls" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="Spice86.Views.StatusMessageView" | ||
x:DataType="viewModels:StatusMessageViewModel"> | ||
<controls:StatusBar> | ||
<controls:StatusBarItem> | ||
<StackPanel Orientation="Horizontal"> | ||
<ComboBox SelectedItem="{Binding Message, Mode=TwoWay}" ItemsSource="{Binding PreviousMessages}"> | ||
<ComboBox.ItemTemplate> | ||
<DataTemplate> | ||
<TextBlock> | ||
<Run Text="{Binding Time}" /> | ||
<Run Text=": " /> | ||
<Run Text="{Binding Origin}" /> | ||
<Run Text=" - " /> | ||
<Run Text="{Binding Message}" /> | ||
</TextBlock> | ||
</DataTemplate> | ||
</ComboBox.ItemTemplate> | ||
</ComboBox> | ||
</StackPanel> | ||
</controls:StatusBarItem> | ||
</controls:StatusBar> | ||
</UserControl> |
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,11 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Markup.Xaml; | ||
|
||
namespace Spice86.Views; | ||
|
||
public partial class StatusMessageView : UserControl { | ||
public StatusMessageView() { | ||
InitializeComponent(); | ||
} | ||
} |