/// <summary> /// Constructor /// </summary> /// <param name="colorSettings"> /// The color settings data. /// </param> /// <param name="requirements"> /// The requirement dictionary. /// </param> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// A factory for creating undoable actions. /// </param> /// <param name="alternativeFactory"> /// An Autofac factory for creating alternative requirements. /// </param> /// <param name="alwaysDisplayFactory"> /// An Autofac factory for creating always display dungeon items requirements. /// </param> /// <param name="dungeon"> /// The dungeon whose small keys are to be represented. /// </param> public SmallKeySmallItemVM( IColorSettings colorSettings, IRequirementDictionary requirements, IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, AlternativeRequirement.Factory alternativeFactory, AlwaysDisplayDungeonItemsRequirement.Factory alwaysDisplayFactory, IDungeon dungeon) { _colorSettings = colorSettings; _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _item = dungeon.SmallKeyItem; _spacerRequirement = alternativeFactory(new List <IRequirement> { alwaysDisplayFactory(true), requirements[RequirementType.SmallKeyShuffleOn] }); _requirement = dungeon.ID == LocationID.EasternPalace ? requirements[RequirementType.KeyDropShuffleOn] : requirements[RequirementType.NoRequirement]; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _colorSettings.PropertyChanged += OnColorsChanged; _item.PropertyChanged += OnItemChanged; _requirement.PropertyChanged += OnRequirementChanged; _spacerRequirement.PropertyChanged += OnRequirementChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// A factory for creating undoable actions. /// </param> /// <param name="section"> /// The entrance section to be represented. /// </param> public EntranceSectionIconVM( IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, IEntranceSection section) { _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _section = section; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _section.PropertyChanged += OnSectionChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// A factory for creating undoable actions. /// </param> /// <param name="imageSourceBase"> /// A string representing the base image source. /// </param> /// <param name="item"> /// An item that is to be represented by this control. /// </param> public LargeItemVM( IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, IItem item, string imageSourceBase) { _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _item = item; _imageSourceBase = imageSourceBase; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _item.PropertyChanged += OnItemChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// The factory for creating undoable actions. /// </param> /// <param name="imageSourceBase"> /// A string representing the base image source. /// </param> /// <param name="section"> /// An item that is to be represented by this control. /// </param> public PrizeLargeItemVM( IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, IPrizeSection section, string imageSourceBase) { _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _section = section; _imageSourceBase = imageSourceBase; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _section.PropertyChanged += OnSectionChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// The factory for creating undoable actions. /// </param> /// <param name="imageSourceBase"> /// A string representing the base image source. /// </param> /// <param name="dropdown"> /// An item that is to be represented by this control. /// </param> public DropdownVM( IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, IDropdown dropdown, string imageSourceBase) { _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _dropdown = dropdown; _imageSourceBase = imageSourceBase; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _dropdown.PropertyChanged += OnDropdownChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="prizes"> /// The prizes dictionary. /// </param> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// A factory for creating undoable actions. /// </param> /// <param name="section"> /// The prize section to be represented. /// </param> public PrizeSmallItemVM( IPrizeDictionary prizes, IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, IPrizeSection section) { _prizes = prizes; _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _section = section; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _section.PropertyChanged += OnSectionChanged; _section.PrizePlacement.PropertyChanged += OnPrizeChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="requirements"> /// The requirements dictionary. /// </param> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// A factory for creating undoable actions. /// </param> /// <param name="imageSourceBase"> /// A string representing the image source base. /// </param> /// <param name="item"> /// An item that is to be represented by this control. /// </param> public SmallKeyLargeItemVM( IRequirementDictionary requirements, IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, IItem item, string imageSourceBase) { _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _item = item; _requirement = requirements[RequirementType.GenericKeys]; _imageSourceBase = imageSourceBase; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _item.PropertyChanged += OnItemChanged; _requirement.PropertyChanged += OnRequirementChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="layoutSettings"> /// The layout settings data. /// </param> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// A factory for creating undoable actions. /// </param> /// <param name="location"> /// The location to be represented. /// </param> /// <param name="sections"> /// The observable collection of section control ViewModels. /// </param> /// <param name="notes"> /// The pinned location note area control. /// </param> public PinnedLocationVM( ILayoutSettings layoutSettings, IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, ILocation location, List <ISectionVM> sections, IPinnedLocationNoteAreaVM notes) { _layoutSettings = layoutSettings; _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _location = location; Sections = sections; Notes = notes; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _layoutSettings.PropertyChanged += OnLayoutChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// A factory for creating undoable actions. /// </param> /// <param name="dungeon"> /// The dungeon whose big keys are to be represented. /// </param> /// <param name="requirement"> /// The requirement for the control to be visible. /// </param> /// <param name="spacerRequirement"> /// The requirement for the control to take reserve space. /// </param> public BigKeySmallItemVM( IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, IDungeon dungeon, IRequirement requirement, IRequirement spacerRequirement) { _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _item = dungeon.BigKeyItem ?? throw new ArgumentOutOfRangeException(nameof(dungeon)); _requirement = requirement; _spacerRequirement = spacerRequirement; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _item.PropertyChanged += OnItemChanged; _requirement.PropertyChanged += OnRequirementChanged; _spacerRequirement.PropertyChanged += OnRequirementChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="colorSettings"> /// The color settings data. /// </param> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// The factory for creating undoable actions. /// </param> /// <param name="imageSource"> /// A string representing the image source. /// </param> /// <param name="item"> /// An item that is to be represented by this control. /// </param> public CrystalRequirementLargeItemVM( IColorSettings colorSettings, IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, ICrystalRequirementItem item, string imageSource) { _colorSettings = colorSettings; _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _item = item; ImageSource = imageSource; HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); _item.PropertyChanged += OnItemChanged; _colorSettings.PropertyChanged += OnColorsChanged; _colorSettings.AccessibilityColors.PropertyChanged += OnColorsChanged; }
/// <summary> /// Constructor /// </summary> /// <param name="undoRedoManager"> /// The undo/redo manager. /// </param> /// <param name="undoableFactory"> /// A factory for creating undoable actions. /// </param> /// <param name="imageSourceBase"> /// A string representing the image source base. /// </param> /// <param name="items"> /// An array of items that are to be represented by this control. /// </param> public PairLargeItemVM( IUndoRedoManager undoRedoManager, IUndoableFactory undoableFactory, IItem[] items, string imageSourceBase) { _undoRedoManager = undoRedoManager; _undoableFactory = undoableFactory; _items = items; _imageSourceBase = imageSourceBase; if (_items.Length != 2) { throw new ArgumentOutOfRangeException(nameof(items)); } HandleClick = ReactiveCommand.Create <PointerReleasedEventArgs>(HandleClickImpl); foreach (var item in _items) { item.PropertyChanged += OnItemChanged; } }