public MainWindowViewModel(MainWindowView view) { IsAdsVisibility = false; _selectedTab = 0; _view = view; _writersBattleFieldViewModel = new WritersBattleFieldViewModel(); _characterBuildControlViewModel = new CharacterBuildViewModel(); _storyFrameBuildControlViewModel = new StoryFrameBuildControlViewModel(); _itemBuildControlViewModel = new ItemBuildControlViewModel(); _fileService = new SaveFileService(); PluginLoad(); InitializeViews(); //TestBizModel.PrepareForTest(); // WindowShowイベントに登録 EventAggregator.ShowEventRised += OnShowWindowEvent; EventAggregator.AdsLoaded += OnAdsLoaded; EventAggregator.DataReloaded += OnDataReloaded; EventAggregator.ModelValueChanged += OnModelChanged; EventAggregator.SaveSucceeded += OnSaved; EventAggregator.TryClose += OnTryClose; EventAggregator.TrySave += OnTrySave; EventAggregator.TryOpen += OnTryOpen; EventAggregator.TryCreateNew += OnTryCreateNew; EventAggregator.TryCreateNewPlus += OnTryCreateNewPlus; EventAggregator.ChangeTabOccuredHandler += OnChangeTabOccured; EventAggregator.FontSettingChangedHandler += EventAggregator_FontSettingChangedHandler; _view.GetTimelineControl().EventChangedRised += OnTimelineEventChanged; }
public void BindData(CharacterBuildViewModel model) { _model = model; this.DataContext = _model; }