public SystemViewModel(ISaveKhBbs save) { this.save = save; Difficulty = new KhEnumListModel <DifficultyType>(() => save.Difficulty, x => save.Difficulty = x); Character = new KhEnumListModel <CharacterType>(() => save.PlayableCharacter, x => save.PlayableCharacter = x); Worlds = new KhEnumListModel <WorldType>(); }
public void OpenStream(Stream stream) { switch (SaveKhBbs.GetGameVersion(stream)) { case GameVersion.FinalMix: save = SaveKhBbs.Read <SaveKhBbs.SaveFinalMix>(stream); break; default: throw new SaveNotSupportedException("The version is not supported."); } RefreshUi(); }