Skip to content

Commit 75e3868

Browse files
authored
Merge pull request #16 from Yuuki-Walsh/master
Use IsSelected for some UI operations
2 parents 4346799 + 2a3d006 commit 75e3868

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

xivModdingFramework/Mods/DataContainers/SimpleModPackEntries.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

1717
using System;
18+
using System.ComponentModel;
1819

1920
namespace xivModdingFramework.Mods.DataContainers
2021
{
21-
public class SimpleModPackEntries : IComparable<SimpleModPackEntries>
22+
public class SimpleModPackEntries : IComparable<SimpleModPackEntries>, INotifyPropertyChanged
2223
{
24+
private bool isSelected;
25+
2326
/// <summary>
2427
/// The name of the item
2528
/// </summary>
@@ -70,6 +73,24 @@ public class SimpleModPackEntries : IComparable<SimpleModPackEntries>
7073
/// </summary>
7174
public ModsJson JsonEntry { get; set; }
7275

76+
/// <summary>
77+
/// Is this entry selected in the ui
78+
/// </summary>
79+
public bool IsSelected
80+
{
81+
get
82+
{
83+
return isSelected;
84+
}
85+
set
86+
{
87+
isSelected = value;
88+
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsSelected)));
89+
}
90+
}
91+
92+
public event PropertyChangedEventHandler PropertyChanged;
93+
7394
public int CompareTo(SimpleModPackEntries obj)
7495
{
7596
return Name.CompareTo(obj.Name);

0 commit comments

Comments
 (0)