コード例 #1
0
        public BookViewModel(BookToken token)
        {
            Requires.NotNull(token, nameof(token));
            Token   = token;
            Sheets  = new ObservableCollection <SheetViewModel>();
            Windows = new BookWindowsViewModel();

            Activate = new RelayCommand(obj => SessionCommands.ActivateBook(Token.Id));
        }
コード例 #2
0
        public static BookWindowsViewModel GetBookWindows(BookToken token)
        {
            Requires.NotNull(token, nameof(token));

            var result = new BookWindowsViewModel();

            foreach (var windowToken in token.Windows)
            {
                result.Windows.Add(ConvertWindow(windowToken));
            }
            return(result);
        }