diff --git a/StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs index b41cd3f7..2979f9ad 100644 --- a/StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/LaunchPageViewModel.cs @@ -46,8 +46,8 @@ public partial class LaunchPageViewModel : PageViewModelBase { var info = new ProcessStartInfo { - FileName = "py", - WorkingDirectory = "py", + FileName = "python", + //WorkingDirectory = "py", Arguments = "-uc \"import tqdm, time; print('start'); [time.sleep(0.1) for _ in tqdm.tqdm(range(25))]; print('end')\"" }; @@ -61,7 +61,7 @@ public partial class LaunchPageViewModel : PageViewModelBase private void OnProcessOutputReceived(ProcessOutput output) { var raw = output.RawText; - // Replace /n and /r with literals + // Replace \n and \r with literals raw = raw.Replace("\n", "\\n").Replace("\r", "\\r"); Debug.WriteLine($"output raw: '{raw}', output: '{output.Text}', clear lines: {output.ClearLines}"); Debug.Flush(); diff --git a/StabilityMatrix.Avalonia/ViewModels/PackageManagerViewModel.cs b/StabilityMatrix.Avalonia/ViewModels/PackageManagerViewModel.cs index 9c4911c8..027e952d 100644 --- a/StabilityMatrix.Avalonia/ViewModels/PackageManagerViewModel.cs +++ b/StabilityMatrix.Avalonia/ViewModels/PackageManagerViewModel.cs @@ -33,6 +33,11 @@ public partial class PackageManagerViewModel : PageViewModelBase Packages = new ObservableCollection(settingsManager.Settings.InstalledPackages); } + public PackageManagerViewModel() : this(new SettingsManager(), null!) + { + + } + [NotifyPropertyChangedFor(nameof(ProgressBarVisibility))] [ObservableProperty] private int progressValue; diff --git a/StabilityMatrix.Avalonia/Views/MainWindow.axaml b/StabilityMatrix.Avalonia/Views/MainWindow.axaml index 5a45fb87..13ce8c0b 100644 --- a/StabilityMatrix.Avalonia/Views/MainWindow.axaml +++ b/StabilityMatrix.Avalonia/Views/MainWindow.axaml @@ -11,7 +11,9 @@ x:Class="StabilityMatrix.Avalonia.Views.MainWindow" x:DataType="vm:MainWindowViewModel" Icon="/Assets/Icon.ico" - Title="StabilityMatrix.Avalonia"> + Width="900" + Height="650" + Title="Stability Matrix Avalonia"> @@ -56,6 +58,8 @@ Grid.RowSpan="2" AlwaysShowHeader="False" PaneDisplayMode="Left" + IsPaneOpen="False" + OpenPaneLength="200" Content="{Binding CurrentPage}" MenuItemsSource="{Binding Pages, Mode=OneWay}" SelectedItem="{Binding SelectedCategory}" diff --git a/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml b/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml index 6d68cc90..409d8267 100644 --- a/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml +++ b/StabilityMatrix.Avalonia/Views/PackageManagerPage.axaml @@ -45,7 +45,6 @@ Command="{Binding ShowInstallWindowCommand}" Height="40" HorizontalAlignment="Stretch" - IsEnabled="{Binding InstallButtonEnabled, FallbackValue=True}" Margin="0,0,0,16" VerticalContentAlignment="Center"> @@ -59,10 +58,9 @@ + SelectedItem="{Binding SelectedPackage, Mode=TwoWay}"> - +