protected virtual void Initialize(object sender, WriterSceneInfoSelectedEventArgs e) { var sceneInfo = e.SceneInfo; var encounterStatus = new EncounterStatus(new EncounterBasicStatus(), new EncounterContentStatus()); var encounter = new UserEncounter(sceneInfo.User, sceneInfo.Encounter, encounterStatus); var encounterResult = new WaitableTask <UserEncounter>(encounter); var loadingInfo = new LoadingReaderSceneInfo(sceneInfo.User, sceneInfo.LoadingScreen, encounterResult); LoadingReaderSceneInfoSelector.Select(this, new LoadingReaderSceneInfoSelectedEventArgs(loadingInfo)); }
public UserEncounter(User user, Encounter data, EncounterStatus status) { User = user; Data = data; Status = status; foreach (var section in data.Content.NonImageContent.Sections) { var sectionStatus = status.ContentStatus.GetSectionStatus(section.Key); var userSection = new UserSection(this, section.Value, sectionStatus); userSection.StatusChanged += UpdateIsRead; Sections.Add(section.Key, userSection); } }
protected virtual void StartReader() { SceneInfoSelector.CurrentValue.SceneInfo.Encounter.Content.NonImageContent.SetCurrentSection(SectionSelector.CurrentValue.SelectedSection); SectionSelector.CurrentValue.SelectedSection.SetCurrentTab(TabSelector.CurrentValue.SelectedTab); SignalBus.Fire <SerializeEncounterSignal>(); var sceneInfo = SceneInfoSelector.CurrentValue.SceneInfo; var encounterStatus = new EncounterStatus(new EncounterBasicStatus(), new EncounterContentStatus()); var encounter = new UserEncounter(sceneInfo.User, sceneInfo.Encounter, encounterStatus); var encounterResult = new WaitableTask <UserEncounter>(encounter); var loadingInfo = new LoadingReaderSceneInfo(sceneInfo.User, sceneInfo.LoadingScreen, encounterResult); ReaderSceneStarter.StartScene(loadingInfo); }