Timeline command visual navigation

This commit is contained in:
2022-02-06 22:16:53 +01:00
parent dfe44cfb16
commit 7489e0eb1c
8 changed files with 227 additions and 70 deletions

View File

@@ -2,18 +2,23 @@
using System.Collections.Generic;
using System;
using FileTime.Core.Timeline;
using MvvmGen;
using System.Collections.ObjectModel;
namespace FileTime.Avalonia.ViewModels
{
public class ParallelCommandsViewModel : IDisposable
[ViewModel]
public partial class ParallelCommandsViewModel : IDisposable
{
private bool _disposed;
public IReadOnlyCollection<ParallelCommandViewModel> ParallelCommands { get; }
[Property]
private ObservableCollection<ParallelCommandViewModel> _parallelCommands;
public ushort Id { get; }
public ParallelCommandsViewModel(ReadOnlyParallelCommands parallelCommands)
{
ParallelCommands = parallelCommands.Commands.Select(c => new ParallelCommandViewModel(c)).ToList().AsReadOnly();
_parallelCommands = new ObservableCollection<ParallelCommandViewModel>(parallelCommands.Commands.Select(c => new ParallelCommandViewModel(c)));
Id = parallelCommands.Id;
}