markus / TEST_WPF / TalkPane / Message.cs @ f87ee33e
이력 | 보기 | 이력해설 | 다운로드 (868 Bytes)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
|
6 |
namespace TEST_WPF.TalkPane |
7 |
{ |
8 |
public enum MessageSide |
9 |
{ |
10 |
Me, |
11 |
You |
12 |
} |
13 |
|
14 |
public enum MessageType |
15 |
{ |
16 |
Normal, |
17 |
Anchor, |
18 |
} |
19 |
|
20 |
public class Message |
21 |
{ |
22 |
private static DateTime _Now = DateTime.Now; |
23 |
private static Random _Rand = new Random(); |
24 |
|
25 |
public string Text { get; set; } |
26 |
public DateTime Timestamp { get; set; } |
27 |
public MessageSide Side { get; set; } |
28 |
public MessageType MsgStype { get; set; } |
29 |
public string UserName { get; set; } |
30 |
public System.Windows.Rect AnchorBound { get; set; } |
31 |
public int PageNumber { get; set; } |
32 |
|
33 |
|
34 |
public Message() |
35 |
{ |
36 |
Timestamp = _Now; |
37 |
_Now = _Now.AddMinutes(_Rand.Next(100)); |
38 |
} |
39 |
} |
40 |
} |