markus / TEST_WPF / TalkPane / MessageViewModel.cs @ 811712ec
이력 | 보기 | 이력해설 | 다운로드 (1.67 KB)
1 |
using KCOMDataModel.DataModel; |
---|---|
2 |
using System; |
3 |
using System.Collections.Generic; |
4 |
using System.ComponentModel; |
5 |
using System.Linq; |
6 |
using System.Text; |
7 |
|
8 |
namespace TEST_WPF.TalkPane |
9 |
{ |
10 |
public class MessageViewModel : System.ComponentModel.INotifyPropertyChanged |
11 |
{ |
12 |
public event PropertyChangedEventHandler PropertyChanged; |
13 |
protected void OnPropertyChanged(string name) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(name)); } } |
14 |
|
15 |
private List<TALK> _MessageSet { get; set; } |
16 |
public List<TALK> MessageSet |
17 |
{ |
18 |
get |
19 |
{ |
20 |
return _MessageSet; |
21 |
} |
22 |
set |
23 |
{ |
24 |
|
25 |
_MessageSet = value; |
26 |
OnPropertyChanged("MessageSet"); |
27 |
} |
28 |
} |
29 |
|
30 |
public MessageViewModel() |
31 |
{ |
32 |
MessageSet = new List<TALK>(); |
33 |
|
34 |
MessageSet.Add(new TALK |
35 |
{ |
36 |
TEXT = "안녕하세요", |
37 |
MSGTYPE = (int)MessageType.Normal, |
38 |
PAGENUMBER = 1, |
39 |
MSGSIDE = (int)MessageSide.Me, |
40 |
TIMESTAMP = DateTime.Now, |
41 |
MEMBER_NAME = "조장원", |
42 |
MEMBER_ID = "honeyhead", |
43 |
}); |
44 |
|
45 |
MessageSet.Add(new TALK |
46 |
{ |
47 |
TEXT = "두번째 메시지입니다", |
48 |
MSGTYPE = (int)MessageType.Normal, |
49 |
PAGENUMBER = 1, |
50 |
MSGSIDE = (int)MessageSide.You, |
51 |
TIMESTAMP = DateTime.Now, |
52 |
MEMBER_ID = "ara707", |
53 |
MEMBER_NAME = "김아라" |
54 |
}); |
55 |
} |
56 |
} |
57 |
} |