Implement the INotifyPropertyChanged
interface
This commit is contained in:
parent
12a7fe3c17
commit
80a8817143
Binary file not shown.
|
@ -2,13 +2,14 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using DT2;
|
||||
|
||||
namespace DT3 {
|
||||
|
||||
public class UrlTesterModel /* TO BE DONE */ {
|
||||
public class UrlTesterModel : INotifyPropertyChanged {
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
int size;
|
||||
|
@ -31,17 +32,34 @@ namespace DT3 {
|
|||
|
||||
public int Size {
|
||||
get { return size; }
|
||||
set /* TO BE DONE */
|
||||
set
|
||||
{
|
||||
NotifyPropertyChanged();
|
||||
size = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Time {
|
||||
get { return time; }
|
||||
set /* TO BE DONE */
|
||||
set
|
||||
{
|
||||
NotifyPropertyChanged();
|
||||
time = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Url {
|
||||
get { return url; }
|
||||
set /* TO BE DONE */
|
||||
set
|
||||
{
|
||||
NotifyPropertyChanged();
|
||||
url = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void NotifyPropertyChanged([CallerMemberName] string memberName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(memberName));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue