|
@@ -26,8 +26,6 @@ internal partial class HelloTherePopup : PixiEditorPopup
|
|
{
|
|
{
|
|
public RecentlyOpenedCollection RecentlyOpened { get => FileViewModel.RecentlyOpened; }
|
|
public RecentlyOpenedCollection RecentlyOpened { get => FileViewModel.RecentlyOpened; }
|
|
|
|
|
|
- public List<BetaExampleFile> BetaExampleFiles { get; }
|
|
|
|
-
|
|
|
|
public static readonly StyledProperty<FileViewModel> FileViewModelProperty =
|
|
public static readonly StyledProperty<FileViewModel> FileViewModelProperty =
|
|
AvaloniaProperty.Register<HelloTherePopup, FileViewModel>(nameof(FileViewModel));
|
|
AvaloniaProperty.Register<HelloTherePopup, FileViewModel>(nameof(FileViewModel));
|
|
|
|
|
|
@@ -80,8 +78,6 @@ internal partial class HelloTherePopup : PixiEditorPopup
|
|
|
|
|
|
public RelayCommand<string> OpenRecentCommand { get; set; }
|
|
public RelayCommand<string> OpenRecentCommand { get; set; }
|
|
|
|
|
|
- public AsyncRelayCommand<BetaExampleFile> OpenBetaExampleCommand { get; set; }
|
|
|
|
-
|
|
|
|
public RelayCommand<string> OpenInExplorerCommand { get; set; }
|
|
public RelayCommand<string> OpenInExplorerCommand { get; set; }
|
|
|
|
|
|
public bool IsClosing { get; private set; }
|
|
public bool IsClosing { get; private set; }
|
|
@@ -107,19 +103,11 @@ internal partial class HelloTherePopup : PixiEditorPopup
|
|
OpenFileCommand = new AsyncRelayCommand(OpenFile);
|
|
OpenFileCommand = new AsyncRelayCommand(OpenFile);
|
|
OpenNewFileCommand = new AsyncRelayCommand(OpenNewFile);
|
|
OpenNewFileCommand = new AsyncRelayCommand(OpenNewFile);
|
|
OpenRecentCommand = new RelayCommand<string>(OpenRecent);
|
|
OpenRecentCommand = new RelayCommand<string>(OpenRecent);
|
|
- OpenBetaExampleCommand = new AsyncRelayCommand<BetaExampleFile>(OpenBetaExample);
|
|
|
|
OpenInExplorerCommand = new RelayCommand<string>(OpenInExplorer, CanOpenInExplorer);
|
|
OpenInExplorerCommand = new RelayCommand<string>(OpenInExplorer, CanOpenInExplorer);
|
|
|
|
|
|
RecentlyOpenedEmpty = RecentlyOpened.Count == 0;
|
|
RecentlyOpenedEmpty = RecentlyOpened.Count == 0;
|
|
RecentlyOpened.CollectionChanged += RecentlyOpened_CollectionChanged;
|
|
RecentlyOpened.CollectionChanged += RecentlyOpened_CollectionChanged;
|
|
|
|
|
|
- // Beta examples
|
|
|
|
- (string file, LocalizedString name)[] files = [
|
|
|
|
- ("Pond.pixi", "POND_EXAMPLE")
|
|
|
|
- ];
|
|
|
|
-
|
|
|
|
- BetaExampleFiles = new List<BetaExampleFile>(files.Select(x => new BetaExampleFile(x.file, x.name)));
|
|
|
|
-
|
|
|
|
_newsDisabled = PixiEditorSettings.StartupWindow.DisableNewsPanel.Value;
|
|
_newsDisabled = PixiEditorSettings.StartupWindow.DisableNewsPanel.Value;
|
|
|
|
|
|
NewsProvider = new NewsProvider();
|
|
NewsProvider = new NewsProvider();
|
|
@@ -195,19 +183,6 @@ internal partial class HelloTherePopup : PixiEditorPopup
|
|
await FileViewModel.CreateFromNewFileDialog();
|
|
await FileViewModel.CreateFromNewFileDialog();
|
|
}
|
|
}
|
|
|
|
|
|
- private async Task OpenBetaExample(BetaExampleFile? arg)
|
|
|
|
- {
|
|
|
|
- await using var stream = arg.GetStream();
|
|
|
|
-
|
|
|
|
- var bytes = new byte[stream.Length];
|
|
|
|
- await stream.ReadExactlyAsync(bytes);
|
|
|
|
-
|
|
|
|
- Application.Current.ForDesktopMainWindow(mainWindow => mainWindow.Activate());
|
|
|
|
- Close();
|
|
|
|
-
|
|
|
|
- FileViewModel.OpenRecoveredDotPixi(null, bytes);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private void OpenRecent(string parameter)
|
|
private void OpenRecent(string parameter)
|
|
{
|
|
{
|
|
Application.Current.ForDesktopMainWindow(mainWindow => mainWindow.Activate());
|
|
Application.Current.ForDesktopMainWindow(mainWindow => mainWindow.Activate());
|