Exemplo n.º 1
0
        private Navigator CreateNavigator(Models.MasterData masters)
        {
            var model = new UnitModel(masters);
            var frame = MainFrame;

            return(new Navigator()
            {
                PG.Item("マイページ", () => default(object), vm => new Pages.MyPage.MyPageNavigator(frame)).WithoutHistory(),
                PG.Item("強化合成", () => new ViewModels.UnionPageModel(masters, model), vm => new Pages.UnitEnhancement.UnitEnhancementNavigator(frame, vm)),
                PG.Item("ガチャ", () => new ViewModels.GachaPageModel(masters, model), vm => new Pages.Gacha.GachaNavigator(frame, vm)),
                PG.Item("売却", () => new ViewModels.UnitSellingPageModel(masters, model), vm => new Pages.UnitSelling.UnitSellingNavigator(frame, vm)),
            });
        }
Exemplo n.º 2
0
 public static IEnumerable <UnitWithMaster> With(this IEnumerable <Unit> units, MasterData m)
 {
     return(units.Select(u => u.With(m)));
 }
Exemplo n.º 3
0
 public static UnitWithMaster With(this Unit u, MasterData m)
 {
     return(new UnitWithMaster(u, m));
 }
Exemplo n.º 4
0
 public UnitWithMaster(Unit u, MasterData masters)
 {
     Unit    = u;
     Masters = masters;
     Master  = masters.Units.FirstOrDefault(x => x.Id == u.MasterId);
 }