File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
xivModdingFramework/Mods/DataContainers Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change 15
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
17
17
using System . Collections . Generic ;
18
+ using System . ComponentModel ;
18
19
using System . Security . Cryptography ;
19
20
using System . Text ;
20
21
@@ -122,7 +123,7 @@ public class ModGroupJson
122
123
public List < ModOptionJson > OptionList { get ; set ; }
123
124
}
124
125
125
- public class ModOptionJson
126
+ public class ModOptionJson : INotifyPropertyChanged
126
127
{
127
128
/// <summary>
128
129
/// The name of the option
@@ -157,7 +158,32 @@ public class ModOptionJson
157
158
/// <summary>
158
159
/// The status of the radio or checkbox
159
160
/// </summary>
160
- public bool IsChecked { get ; set ; }
161
+ private bool isChecked ;
162
+ public bool IsChecked {
163
+ get {
164
+ return isChecked ;
165
+ }
166
+ set {
167
+ isChecked = value ;
168
+ NotifyPropertyChanged ( "IsChecked" ) ;
169
+ }
170
+ }
171
+
172
+ /// <summary>
173
+ /// Implementation of INotifyPropertyChanged (to update UI)
174
+ /// </summary>
175
+ public event PropertyChangedEventHandler PropertyChanged ;
176
+
177
+ /// <summary>
178
+ /// Helper to raise the property changed event
179
+ /// </summary>
180
+ /// <param name="propName">Name of the property that changed</param>
181
+ private void NotifyPropertyChanged ( string propName )
182
+ {
183
+ if ( PropertyChanged != null )
184
+ PropertyChanged ( this , new PropertyChangedEventArgs ( propName ) ) ;
185
+ }
186
+
161
187
}
162
188
163
189
public class ModsJson
You can’t perform that action at this time.
0 commit comments