Skip to content

Commit 950bd30

Browse files
author
Juan Segura
committed
- Botones para iniciar ZXBasicStudio y refrescar
- Añadidos iconos en los botones
1 parent be08476 commit 950bd30

15 files changed

Lines changed: 125 additions & 24 deletions

File tree

MsBox.Avalonia/MsBox.Avalonia.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<AvaloniaResource Include="Assets\*" />
2727
</ItemGroup>
2828
<ItemGroup>
29-
<PackageReference Include="Avalonia" Version="11.3.11" />
30-
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.3.0" />
29+
<PackageReference Include="Avalonia" Version="11.3.12" />
30+
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.4.1" />
3131
<PackageReference Include="DialogHost.Avalonia" Version="0.10.4" />
3232
<PackageReference Include="Markdown.Avalonia.Tight" Version="11.0.2" />
3333
</ItemGroup>

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ Have fun!
3333
- <a href="https://www.wishforge.games/?ref=svgrepo.com" target="_blank">Wishforge.games</a> in CC Attribution License
3434
- <a href="https://github.com/yamatsum/nonicons?ref=svgrepo.com" target="_blank">Yamatsum</a> in MIT License
3535
- <a href="https://github.com/32pixelsCo/zest-icons/blob/master/packages/zest-free/LICENSE.md?ref=svgrepo.com" target="_blank">Zest</a> in MIT License
36+
- <a href="https://github.com/neuicons/neu?ref=svgrepo.com" target="_blank">Neuicons</a> in MIT License via
37+
- <a href="https://dazzleui.gumroad.com/l/dazzleiconsfree?ref=svgrepo.com" target="_blank">Dazzle Ui</a> in CC Attribution License

ZXBSInstaller.Log/ServiceLayer.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,5 +1152,35 @@ private static void SetZXBSConfig()
11521152

11531153
#endregion
11541154

1155+
1156+
public static bool RunZXBasicStudio()
1157+
{
1158+
try
1159+
{
1160+
var fileName = Path.Combine(GeneralConfig.BasePath, "zxbs", "ZXBasicStudio.exe");
1161+
if (!File.Exists(fileName))
1162+
{
1163+
fileName = Path.Combine(GeneralConfig.BasePath, "zxbs", "ZXBasicStudio");
1164+
}
1165+
if (!File.Exists(fileName))
1166+
{
1167+
ServiceLayer.ShowMessage("ZX Basic Studio executable not found. Please check the installation.");
1168+
return false;
1169+
}
1170+
ProcessStartInfo psi = new ProcessStartInfo
1171+
{
1172+
FileName = fileName,
1173+
};
1174+
using Process process = new Process { StartInfo = psi };
1175+
process.Start();
1176+
return true;
1177+
}
1178+
catch (Exception ex)
1179+
{
1180+
ServiceLayer.ShowMessage("Error launching ZX Basic Studio. Please check the installation.");
1181+
return false;
1182+
}
1183+
}
1184+
11551185
}
11561186
}

ZXBSInstaller/Assets/install.svg

Lines changed: 7 additions & 0 deletions
Loading

ZXBSInstaller/Assets/play.svg

Lines changed: 7 additions & 0 deletions
Loading

ZXBSInstaller/Assets/refresh.svg

Lines changed: 7 additions & 0 deletions
Loading

ZXBSInstaller/Controls/MainControl.axaml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:svg="using:Avalonia.Svg.Skia"
56
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="600"
67
x:Class="ZXBSInstaller.Controls.MainControl">
78
<Grid Grid.ColumnDefinitions="*,1,250" Grid.RowDefinitions="Auto,1,*,1,Auto">
@@ -36,10 +37,32 @@
3637
<CheckBox x:Name="chkSetZXBSOptions" Grid.Row="3" Margin="0,4,0,0" Content="Update ZX Basic Studio Options"/>
3738
</Grid>
3839
</Grid>
39-
<Grid Grid.Column="2" Grid.Row="4" Margin="8" HorizontalAlignment="Right" VerticalAlignment="Bottom">
40-
<Button x:Name="btnInstall" Click="btnInstall_Click">Install selected components</Button>
40+
41+
<Grid Grid.Column="2" Grid.Row="4" Grid.RowDefinitions="*,Auto" Margin="8" HorizontalAlignment="Right">
42+
<StackPanel Orientation="Vertical" HorizontalAlignment="Right">
43+
<Button x:Name="btnPlayZXBS" Width="200" Click="btnPlayZXBS_Click">
44+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
45+
<svg:Svg Path="/Assets/play.svg" Width="20" Margin="0,0,4,0"></svg:Svg>
46+
<TextBlock Text="Run ZX Basic Studio"/>
47+
</StackPanel>
48+
</Button>
49+
<Button x:Name="btnRefresh" Width="200" Margin="0,4,0,0" Click="btnRefresh_Click">
50+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
51+
<svg:Svg Path="/Assets/refresh.svg" Width="20" Margin="0,0,4,0"></svg:Svg>
52+
<TextBlock Text="Refrsh"/>
53+
</StackPanel>
54+
</Button>
55+
</StackPanel>
56+
57+
<Button x:Name="btnInstall" Grid.Row="1" Width="200" Click="btnInstall_Click">
58+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
59+
<svg:Svg Path="/Assets/install.svg" Width="20" Margin="0,0,4,0"></svg:Svg>
60+
<TextBlock Text="Install components"/>
61+
</StackPanel>
62+
</Button>
4163
</Grid>
4264

65+
4366
<!-- Progress Status -->
4467
<Grid x:Name="pnlStatus" Grid.ColumnSpan="3" Grid.RowSpan="5" Margin="0" IsVisible="False">
4568
<Grid Background="Black" Opacity="0.8"></Grid>

0 commit comments

Comments
 (0)