markus / MarkupToPDF / Common / CommentUserInfo.cs @ a4e5d148
이력 | 보기 | 이력해설 | 다운로드 (2.34 KB)
1 | 036650a0 | humkyung | using MarkupToPDF.Controls.Common; |
---|---|---|---|
2 | using System; |
||
3 | 787a4489 | KangIngu | using System.Collections.Generic; |
4 | using System.Linq; |
||
5 | using System.Text; |
||
6 | using System.Windows.Media; |
||
7 | |||
8 | namespace MarkupToPDF.Common |
||
9 | { |
||
10 | //public class MyEventArgs : System.EventArgs |
||
11 | //{ |
||
12 | // public bool isMouseOver { get; set; } |
||
13 | //} |
||
14 | |||
15 | public class CommentUserInfo : System.Windows.Controls.Control |
||
16 | { |
||
17 | public string Memo { get; set; } |
||
18 | public string MarkupInfoID { get; set; } |
||
19 | public bool IsMouseOver { get; set; } |
||
20 | public bool IsNew { get; set; } |
||
21 | public string CommentID { get; set; } |
||
22 | c8e9b3e4 | ljiyeon | public string SymbolID { get; set; } |
23 | 53880c83 | ljiyeon | public long GroupID { get; set; } |
24 | 787a4489 | KangIngu | |
25 | //public event EventHandler<MyEventArgs> StateChanged; |
||
26 | |||
27 | public CommentUserInfo() |
||
28 | { |
||
29 | //this.BorderThickness = new System.Windows.Thickness(5.0); |
||
30 | this.BorderThickness = new System.Windows.Thickness(20.0); |
||
31 | |||
32 | |||
33 | this.MouseEnter += CommentUserInfo_MouseEnter; |
||
34 | this.MouseLeave += CommentUserInfo_MouseLeave; |
||
35 | } |
||
36 | |||
37 | protected override GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters) |
||
38 | { |
||
39 | var temp = base.HitTestCore(hitTestParameters); |
||
40 | return temp; |
||
41 | //return base.HitTestCore(hitTestParameters); |
||
42 | } |
||
43 | |||
44 | private void CommentUserInfo_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) |
||
45 | { |
||
46 | this.IsMouseOver = false; |
||
47 | //if (StateChanged !=null) |
||
48 | //{ |
||
49 | // StateChanged(this, new MyEventArgs { isMouseOver = false }); |
||
50 | //} |
||
51 | //this.Opacity = 1; |
||
52 | } |
||
53 | |||
54 | private void CommentUserInfo_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) |
||
55 | { |
||
56 | this.IsMouseOver = true; |
||
57 | //this.Opacity = 0.5; |
||
58 | //if (StateChanged != null) |
||
59 | //{ |
||
60 | // StateChanged(this, new MyEventArgs { isMouseOver = true }); |
||
61 | //} |
||
62 | } |
||
63 | 036650a0 | humkyung | |
64 | /// <summary> |
||
65 | /// subclass has to override this property |
||
66 | /// </summary> |
||
67 | virtual public ControlType ControlType { get; set; } |
||
68 | |||
69 | /// <summary> |
||
70 | /// subclass has to override this method |
||
71 | /// </summary> |
||
72 | /// <returns>serialized string</returns> |
||
73 | public virtual string Serialize() { return string.Empty; } |
||
74 | 787a4489 | KangIngu | } |
75 | } |
||
76 |