| While I still answer questions about this project, it is no longer being changed and has been archived to read-only mode. Please contact me if you want it reopened. |
7 |
13 |
14 | Lesson details: https://soscsrpg.com/
15 |
--------------------------------------------------------------------------------
/SOSCSRPG.Models/GroupedInventoryItem.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace SOSCSRPG.Models
4 | {
5 | public class GroupedInventoryItem : INotifyPropertyChanged
6 | {
7 | public event PropertyChangedEventHandler PropertyChanged;
8 |
9 | public GameItem Item { get; set; }
10 | public int Quantity { get; set; }
11 |
12 | public GroupedInventoryItem(GameItem item, int quantity)
13 | {
14 | Item = item;
15 | Quantity = quantity;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/SOSCSRPG.Models/ItemQuantity.cs:
--------------------------------------------------------------------------------
1 | namespace SOSCSRPG.Models
2 | {
3 | public class ItemQuantity
4 | {
5 | private readonly GameItem _gameItem;
6 |
7 | public int ItemID => _gameItem.ItemTypeID;
8 | public int Quantity { get; }
9 |
10 | public string QuantityItemDescription =>
11 | $"{Quantity} {_gameItem.Name}";
12 |
13 | public ItemQuantity(GameItem item, int quantity)
14 | {
15 | _gameItem = item;
16 | Quantity = quantity;
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/SOSCSRPG.Models/PopupDetails.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace SOSCSRPG.Models
4 | {
5 | public class PopupDetails : INotifyPropertyChanged
6 | {
7 | public bool IsVisible { get; set; }
8 | public int Top { get; set; }
9 | public int Left { get; set; }
10 | public int MinHeight { get; set; }
11 | public int MaxHeight { get; set; }
12 | public int MinWidth { get; set; }
13 | public int MaxWidth { get; set; }
14 |
15 | public event PropertyChangedEventHandler PropertyChanged;
16 | }
17 | }
--------------------------------------------------------------------------------
/SOSCSRPG.Models/Actions/BaseAction.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using SOSCSRPG.Models;
3 |
4 | namespace SOSCSRPG.Models.Actions
5 | {
6 | public abstract class BaseAction
7 | {
8 | protected readonly GameItem _itemInUse;
9 |
10 | public event EventHandler