Ejemplo n.º 1
0
        public EquipmentOverrideWindow(RootViewModel rootViewModel)
        {
            InitializeComponent();

            this.rootViewModel = rootViewModel;

            Func <IList <EquipmentSaveSlotInfo>, EquipmentSaveSlotInfo> saveSlotSelector = SaveDataUtils.CreateSaveSlotSelector <EquipmentSaveSlotInfo>(this);

            rootViewModel.EquipmentOverride.SetSaveSelector(saveSlotSelector);

            InputBindings.Add(new InputBinding(new AnonymousCommand(OnCancel), new KeyGesture(Key.Escape, ModifierKeys.None)));

            this.Loaded += EquipmentOverrideWindow_Loaded;
        }
Ejemplo n.º 2
0
        public DecorationsOverrideWindow(RootViewModel rootViewModel)
        {
            InitializeComponent();

            this.rootViewModel = rootViewModel;

            Func <IList <DecorationsSaveSlotInfo>, DecorationsSaveSlotInfo> saveSlotSelector = SaveDataUtils.CreateSaveSlotSelector <DecorationsSaveSlotInfo>(this);

            decorationsOverrideViewModel = new DecorationsOverrideViewModel(GlobalData.Instance.Jewels, saveSlotSelector);

            InputBindings.Add(new InputBinding(new AnonymousCommand(OnCancel), new KeyGesture(Key.Escape, ModifierKeys.None)));

            DataContext = decorationsOverrideViewModel;
        }
Ejemplo n.º 3
0
        public void OnOpening(bool isAlreadyOpened, object argument)
        {
            if (isAlreadyOpened)
            {
                return;
            }

            rootViewModel.WeaponsContainer.UpdateHighlights();

            Func <IList <EquipmentSaveSlotInfo>, EquipmentSaveSlotInfo> saveSlotSelector = SaveDataUtils.CreateSaveSlotSelector <EquipmentSaveSlotInfo>(this);

            rootViewModel.WeaponsContainer.SetSaveSlotSelector(saveSlotSelector);
        }