7,655
社区成员
发帖
与我相关
我的任务
分享
Task A;
public MainPage()
{
InitializeComponent();
Class1 cl = new Class1
{
Second = 600
};
collecion.Add(cl);
A = new Task(() => Task_A());
A.Start();
}
private void Task_A()
{
Class1 cl = new Class1
{
Second = 600
};
collecion.Add(cl);
}
public class Class1: INotifyPropertyChanged
{
int second;
public event PropertyChangedEventHandler PropertyChanged;
public Class1()
{
}
public int Second
{
set
{
if (value != second)
{
second = value;
OnPropertyChanged(new PropertyChangedEventArgs("Second"));
}
}
get
{
return second;
}
}
protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)
{
if (PropertyChanged != null)
PropertyChanged(this, args);
}
}