diff --git a/Artwork/IconAbout.png b/Artwork/IconAbout.png
new file mode 100644
index 0000000..894b638
Binary files /dev/null and b/Artwork/IconAbout.png differ
diff --git a/ZXBStudio/Assets/Icon.png b/ZXBStudio/Assets/Icon.png
new file mode 100644
index 0000000..3030aec
Binary files /dev/null and b/ZXBStudio/Assets/Icon.png differ
diff --git a/ZXBStudio/Assets/IconAbout.png b/ZXBStudio/Assets/IconAbout.png
new file mode 100644
index 0000000..894b638
Binary files /dev/null and b/ZXBStudio/Assets/IconAbout.png differ
diff --git a/ZXBStudio/Classes/ZXKeybMapper.cs b/ZXBStudio/Classes/ZXKeybMapper.cs
index 93feb22..fabb2c6 100644
--- a/ZXBStudio/Classes/ZXKeybMapper.cs
+++ b/ZXBStudio/Classes/ZXKeybMapper.cs
@@ -69,7 +69,7 @@ public static ZXKeybMapperSource[] GetKeybCommands()
if (!mappings.ContainsKey(SourceId))
return null;
- return mappings[SourceId].FirstOrDefault(m => m.Key == Key && m.Modifiers == Modifiers)?.CommandId;
+ return mappings[SourceId].FirstOrDefault(m => m.Key != Key.None && m.Key == Key && m.Modifiers == Modifiers)?.CommandId;
}
public static bool UpdateCommands(Guid SourceId, ZXKeybCommand[] Commands)
{
diff --git a/ZXBStudio/Dialogs/ZXAboutDialog.axaml b/ZXBStudio/Dialogs/ZXAboutDialog.axaml
new file mode 100644
index 0000000..3b39305
--- /dev/null
+++ b/ZXBStudio/Dialogs/ZXAboutDialog.axaml
@@ -0,0 +1,25 @@
+
+
+
+ ZX Basic Studio
+ Beta release
+ Build 1.3.5.6
+ 2023-10-29
+ The ZX Basic Studio development team
+ El Dr. Gusman, Duefectu, AdolFITO, SirRickster
+ Many thanks to Boriel for the ZX Basic compiler and his support to this project.
+ (C) 2023, El Dr. Gusman
+
+
+
diff --git a/ZXBStudio/Dialogs/ZXAboutDialog.axaml.cs b/ZXBStudio/Dialogs/ZXAboutDialog.axaml.cs
new file mode 100644
index 0000000..492e168
--- /dev/null
+++ b/ZXBStudio/Dialogs/ZXAboutDialog.axaml.cs
@@ -0,0 +1,36 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Interactivity;
+using Avalonia.Markup.Xaml;
+using System;
+
+namespace ZXBasicStudio;
+
+public partial class ZXAboutDialog : Window
+{
+ public ZXAboutDialog()
+ {
+ InitializeComponent();
+
+ btnClose.Click += BtnClose_Click;
+
+ var name = System.Reflection.Assembly.GetExecutingAssembly().GetName();
+
+ if(name == null || name.Version == null)
+ {
+ txtBuild.Text = "Unknown build";
+ txtDate.Text = "Unknown date";
+ return;
+ }
+
+ DateTime buildDate = new DateTime(2000, 1, 1).AddDays(name.Version.Build);
+
+ txtBuild.Text = $"Build {name.Version.ToString()}";
+ txtDate.Text = buildDate.ToString("yyyy-MM-dd");
+ }
+
+ private void BtnClose_Click(object? sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+}
\ No newline at end of file
diff --git a/ZXBStudio/MainWindow.axaml b/ZXBStudio/MainWindow.axaml
index d9abda7..00a5769 100644
--- a/ZXBStudio/MainWindow.axaml
+++ b/ZXBStudio/MainWindow.axaml
@@ -46,7 +46,8 @@
-
+
+
+
+
+
+
+
+
+
-
-
@@ -120,6 +122,13 @@
+
+
+
Spectrum 48k
Spectrum 128k
diff --git a/ZXBStudio/MainWindow.axaml.cs b/ZXBStudio/MainWindow.axaml.cs
index 1549588..8e66caf 100644
--- a/ZXBStudio/MainWindow.axaml.cs
+++ b/ZXBStudio/MainWindow.axaml.cs
@@ -18,6 +18,7 @@
using CoreSpectrum.Enums;
using CoreSpectrum.SupportClasses;
using HarfBuzzSharp;
+using Metsys.Bson;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SkiaSharp;
@@ -55,6 +56,8 @@ namespace ZXBasicStudio
{
public partial class MainWindow : ZXWindowBase //, IObserver
{
+ const string repoUrl = "https://github.com/gusmanb/ZXBasicStudio";
+ const string zxbHelpUrl = "https://zxbasic.readthedocs.io/en/docs/";
#region Shortcut handling
@@ -62,7 +65,6 @@ public partial class MainWindow : ZXWindowBase //, IObserver
internal static ZXKeybCommand[] KeybCommands =
{
- new ZXKeybCommand { CommandId = Guid.Parse("21bc5c34-df5e-449e-a826-88e1f42d7810"), CommandName = "Exit application", Key = Key.None, Modifiers = KeyModifiers.None },
new ZXKeybCommand { CommandId = Guid.Parse("62c23849-7312-41ac-8788-9f6d851cc3b9"), CommandName = "Build and run", Key = Key.F5, Modifiers = KeyModifiers.None },
new ZXKeybCommand { CommandId = Guid.Parse("d9222ec4-5d7a-4b04-b9e3-e29d6d8bca78"), CommandName = "Build and debug", Key = Key.F6, Modifiers = KeyModifiers.None },
new ZXKeybCommand { CommandId = Guid.Parse("57aff55a-f4a1-4a57-a532-a38117e1a532"), CommandName = "Pause emulation", Key = Key.F7, Modifiers = KeyModifiers.None },
@@ -77,6 +79,7 @@ public partial class MainWindow : ZXWindowBase //, IObserver
new ZXKeybCommand { CommandId = Guid.Parse("7b50369f-3f48-4653-99c1-26e566691e3c"), CommandName = "Debug View", Key = Key.F10, Modifiers = KeyModifiers.Control | KeyModifiers.Shift },
new ZXKeybCommand { CommandId = Guid.Parse("86b341a1-8d07-4af2-b4b0-ca953cd3dbc0"), CommandName = "Play View", Key = Key.F11, Modifiers = KeyModifiers.Control | KeyModifiers.Shift },
new ZXKeybCommand { CommandId = Guid.Parse("424f7395-c29d-44f9-8f9e-43b8891ec261"), CommandName = "All tools View", Key = Key.F12, Modifiers = KeyModifiers.Control | KeyModifiers.Shift },
+ new ZXKeybCommand { CommandId = Guid.Parse("21bc5c34-df5e-449e-a826-88e1f42d7810"), CommandName = "Exit application", Key = Key.None, Modifiers = KeyModifiers.None }
};
Dictionary _shortcuts = new Dictionary();
@@ -158,7 +161,9 @@ public MainWindow()
mnuAllToolsView.Click += ToolsLayout;
mnuDebugView.Click += DebugLayout;
mnuPlayView.Click += PlayLayout;
-
+ mnuRepo.Click += OpenRepository;
+ mnuZXHelp.Click += OpenZXHelp;
+ mnuAbout.Click += OpenAbout;
#endregion
#region Attach toolbar events
@@ -278,6 +283,22 @@ public MainWindow()
ZXLayoutPersister.RestoreLayout(grdMain, dockLeft, dockRight, dockBottom, new[] { _playerDock });
}
+ private void OpenAbout(object? sender, RoutedEventArgs e)
+ {
+ ZXAboutDialog zXAboutDialog = new ZXAboutDialog();
+ zXAboutDialog.ShowDialog(this);
+ }
+
+ private void OpenZXHelp(object? sender, RoutedEventArgs e)
+ {
+ OpenUrl(zxbHelpUrl);
+ }
+
+ private void OpenRepository(object? sender, RoutedEventArgs e)
+ {
+ OpenUrl(repoUrl);
+ }
+
#region File manipulation
private void PeExplorer_SelectedPathChanged(object? sender, System.EventArgs e)
{
@@ -1840,6 +1861,39 @@ private void BtnMapKeyboard_Click(object? sender, RoutedEventArgs e)
emu.EnableKeyMapping = btnMapKeyboard.IsChecked ?? false;
}
+ private void OpenUrl(string Url)
+ {
+
+ if (string.IsNullOrWhiteSpace(Url))
+ return;
+
+ try
+ {
+ ProcessStartInfo processInfo = new()
+ {
+ FileName = Url,
+ UseShellExecute = true
+ };
+
+ Process.Start(processInfo);
+ }
+ catch
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ Process.Start("xdg-open", Url);
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ Process.Start("open", Url);
+ }
+ else
+ {
+ return;
+ }
+ }
+ }
+
private async void DumpRegisters(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
var select = await StorageProvider.SaveFilePickerAsync(new Avalonia.Platform.Storage.FilePickerSaveOptions
diff --git a/ZXBStudio/Svg/White/circle-info-solid.svg b/ZXBStudio/Svg/White/circle-info-solid.svg
new file mode 100644
index 0000000..1b20578
--- /dev/null
+++ b/ZXBStudio/Svg/White/circle-info-solid.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ZXBStudio/Svg/White/circle-question-solid.svg b/ZXBStudio/Svg/White/circle-question-solid.svg
new file mode 100644
index 0000000..b14a570
--- /dev/null
+++ b/ZXBStudio/Svg/White/circle-question-solid.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ZXBStudio/Svg/White/github.svg b/ZXBStudio/Svg/White/github.svg
new file mode 100644
index 0000000..0a97273
--- /dev/null
+++ b/ZXBStudio/Svg/White/github.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ZXBStudio/Svg/circle-info-solid.svg b/ZXBStudio/Svg/circle-info-solid.svg
new file mode 100644
index 0000000..652acbe
--- /dev/null
+++ b/ZXBStudio/Svg/circle-info-solid.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ZXBStudio/Svg/circle-question-solid.svg b/ZXBStudio/Svg/circle-question-solid.svg
new file mode 100644
index 0000000..dadbbd2
--- /dev/null
+++ b/ZXBStudio/Svg/circle-question-solid.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ZXBStudio/Svg/github.svg b/ZXBStudio/Svg/github.svg
new file mode 100644
index 0000000..25f9df5
--- /dev/null
+++ b/ZXBStudio/Svg/github.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ZXBStudio/ZXBasicStudio.csproj b/ZXBStudio/ZXBasicStudio.csproj
index 7c465fa..1334f6c 100644
--- a/ZXBStudio/ZXBasicStudio.csproj
+++ b/ZXBStudio/ZXBasicStudio.csproj
@@ -10,7 +10,10 @@
True
AnyCPU;x64
zxbs.ico
- 0.1.23.0930
+ 1.0.0-beta1
+ ZX Basic Studio
+ 1.0.*
+ False
@@ -40,6 +43,8 @@
+
+
@@ -118,7 +123,9 @@
+
+
@@ -153,6 +160,7 @@
+
@@ -193,7 +201,9 @@
+
+
@@ -217,6 +227,7 @@
+
@@ -254,6 +265,8 @@
+
+
@@ -315,6 +328,11 @@
+
+
+
+
+
@@ -446,6 +464,7 @@
+