Beispiel #1
0
        public void PreviewColumn(ColumnViewModel columnViewModel)
        {
            mainPageViewModel.TableViewModel.SkipAllAnimationToFill();

            previewingColumnViewModel = columnViewModel;

            if (ViewStatus.SelectedColumnViewModels.IndexOf(previewingColumnViewModel) >= 0)
            {
                return;
            }

            // 현재 선택된 view status를 가져옴
            ViewStatus selectedViewStatus = ViewStatus.Clone();

            // 새 컬럼 추가
            selectedViewStatus.SelectedColumnViewModels.Add(columnViewModel);
            selectedViewStatus.Refresh();

            // 현재 추가된 컬럼으로 groupedRows와 GroupedRowViewModels를 만듦.
            selectedViewStatus.Generate(mainPageViewModel.SheetViewModel);

            // 탑 페이지 뷰 모델 가져와서
            PageViewModel pageViewModel = TopPageView.ViewModel;

            // 복제한 view status를 추가 한 다음
            pageViewModel.ViewStatus = selectedViewStatus;
            pageViewModel.State      = PageViewModel.PageViewState.Previewing;

            // 이걸로 pageView를 채움
            pageViewModel.Reflect(ReflectReason.Preview); // ReflectType2.TrackPreviousParagraph | ReflectType2.OnCreate, ReflectReason2.PreviewRequested);
            TopPageView.ReflectState();

            ExpandFilters();
        }
Beispiel #2
0
        public void StashViewStatus(ViewStatus viewStatus, AnimationHint.AnimationType animationType)
        {
            stashedViewStatus = viewStatus.Clone();
            stashedViewStatus.TableViewState = state;
            stashedViewStatus.SelectedRows   = SelectedRows;
            if (stashedViewStatus.GroupedRowViewModels != null)
            {
                foreach (RowViewModel rvm in stashedViewStatus.GroupedRowViewModels)
                {
                    rvm.Stash();
                }
            }

            foreach (RowViewModel rvm in AllRowViewModels)
            {
                rvm.Stash();
            }

            foreach (ColumnViewModel cvm in SheetViewModel.ColumnViewModels)
            {
                cvm.Stash();
            }
        }