示例#1
0
        public void SelectTabChanged()
        {
            switch (MainTabKindUtil.ToMainTabKind(_selectedTab))
            {
            case MainTabKind.WritingTab:
                _writersBattleFieldViewModel.DoShowMarkReviewer = false;
                _writersBattleFieldViewModel.Mode = WritersBattleField.ViewModel.ViewMode.Writing;
                break;

            case MainTabKind.CharacterTab:
                _characterBuildControlViewModel.Initialize(_view.characterBuildControl1.Content as CharacterBuildControll.CharacterBuilder);
                break;

            case MainTabKind.ItemTab:
                _itemBuildControlViewModel.Initialize(_view.itemBuildControl.Content as ItemBuildControl.ItemBuildControl);
                break;

            case MainTabKind.StoryFrameTab:
                _storyFrameBuildControlViewModel.Initialize(_view.storyFrameBuildControll.Content as StoryFrameBuildControl.StoryFrameBuildControll);
                break;

            case MainTabKind.TimelineTab:
                ShowTimelineViewer();
                break;

            case MainTabKind.FromKienaiTab:
                break;
            }
        }
示例#2
0
        private void OnChangeTabOccured(object sender, ChangeTabEventArg arg)
        {
            if (!IsMainWindowDisplayable())
            {
                Application.Current.MainWindow.Activate();
                return;
            }

            SelectedTab = MainTabKindUtil.ToInt(arg.ChangeTo);
            EventAggregator.OnSelectObjectForceOccured(sender, new SelectObjectForceEventArgs()
            {
                Model = arg.SubObject
            });
        }