프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / MarkupToPDF / Common / CommentUserInfo.cs @ 661b7416

이력 | 보기 | 이력해설 | 다운로드 (2.63 KB)

1
using MarkupToPDF.Controls.Common;
2
using System;
3
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 static readonly string[] delimiterChars = { "|DZ|" };
18
        public static readonly string[] delimiterChars2 = { "|" };
19
        public static readonly SolidColorBrush DefaultColor = new SolidColorBrush(MarkupToPDF.Controls.Common.ValueConverter.StringToColorConverter.Parse(""));
20

    
21
        public string Memo { get; set; }
22
        public string MarkupInfoID { get; set; }
23
        public bool IsMouseOver { get; set; }
24
        public bool IsNew { get; set; }
25
        public string CommentID { get; set; }
26
        public string SymbolID { get; set; }
27
        public long GroupID { get; set; }
28

    
29
        //public event EventHandler<MyEventArgs> StateChanged;
30

    
31
        public CommentUserInfo()
32
        {
33
            //this.BorderThickness = new System.Windows.Thickness(5.0);
34
            this.BorderThickness = new System.Windows.Thickness(20.0);
35

    
36

    
37
            this.MouseEnter += CommentUserInfo_MouseEnter;
38
            this.MouseLeave += CommentUserInfo_MouseLeave;
39
        }
40

    
41
        protected override GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters)
42
        {
43
            var temp = base.HitTestCore(hitTestParameters);
44
            return temp;
45
            //return base.HitTestCore(hitTestParameters);
46
        }
47

    
48
        private void CommentUserInfo_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
49
        {
50
            this.IsMouseOver = false;
51
            //if (StateChanged !=null)
52
            //{
53
            //    StateChanged(this, new MyEventArgs { isMouseOver = false });
54
            //}
55
            //this.Opacity = 1;
56
        }
57

    
58
        private void CommentUserInfo_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
59
        {
60
            this.IsMouseOver = true;
61
            //this.Opacity = 0.5;
62
            //if (StateChanged != null)
63
            //{
64
            //    StateChanged(this, new MyEventArgs { isMouseOver = true });
65
            //}
66
        }
67

    
68
        /// <summary>
69
        /// subclass has to override this property
70
        /// </summary>
71
        virtual public ControlType ControlType { get; set; }
72

    
73
        /// <summary>
74
        /// subclass has to override this method
75
        /// </summary>
76
        /// <returns>serialized string</returns>
77
        public virtual string Serialize() { return string.Empty; }
78
    }
79
}
80
 
클립보드 이미지 추가 (최대 크기: 500 MB)