프로젝트

일반

사용자정보

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

markus / MarkupToPDF / Common / CommentUserInfo.cs @ 038c77fd

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

1 cb33ad14 humkyung
using KCOMDataModel.DataModel;
2
using MarkupToPDF.Controls.Common;
3
using MarkupToPDF.Controls.Parsing;
4 036650a0 humkyung
using System;
5 787a4489 KangIngu
using System.Collections.Generic;
6
using System.Linq;
7
using System.Text;
8
using System.Windows.Media;
9
10
namespace MarkupToPDF.Common
11
{
12
    //public class MyEventArgs : System.EventArgs
13
    //{
14
    //    public bool isMouseOver { get; set; }
15
    //}
16
17
    public class CommentUserInfo : System.Windows.Controls.Control
18
    {
19 661b7416 humkyung
        public static readonly string[] delimiterChars = { "|DZ|" };
20
        public static readonly string[] delimiterChars2 = { "|" };
21
        public static readonly SolidColorBrush DefaultColor = new SolidColorBrush(MarkupToPDF.Controls.Common.ValueConverter.StringToColorConverter.Parse(""));
22
23 787a4489 KangIngu
        public string Memo { get; set; }
24
        public string MarkupInfoID { get; set; }
25
        public bool IsMouseOver { get; set; }
26
        public bool IsNew { get; set; }
27
        public string CommentID { get; set; }
28 c8e9b3e4 ljiyeon
        public string SymbolID { get; set; }
29 53880c83 ljiyeon
        public long GroupID { get; set; }
30 787a4489 KangIngu
31
        //public event EventHandler<MyEventArgs> StateChanged;
32
33
        public CommentUserInfo()
34
        {
35
            //this.BorderThickness = new System.Windows.Thickness(5.0);
36
            this.BorderThickness = new System.Windows.Thickness(20.0);
37
38
39
            this.MouseEnter += CommentUserInfo_MouseEnter;
40
            this.MouseLeave += CommentUserInfo_MouseLeave;
41
        }
42
43
        protected override GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters)
44
        {
45
            var temp = base.HitTestCore(hitTestParameters);
46
            return temp;
47
            //return base.HitTestCore(hitTestParameters);
48
        }
49
50
        private void CommentUserInfo_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
51
        {
52
            this.IsMouseOver = false;
53
            //if (StateChanged !=null)
54
            //{
55
            //    StateChanged(this, new MyEventArgs { isMouseOver = false });
56
            //}
57
            //this.Opacity = 1;
58
        }
59
60
        private void CommentUserInfo_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
61
        {
62
            this.IsMouseOver = true;
63
            //this.Opacity = 0.5;
64
            //if (StateChanged != null)
65
            //{
66
            //    StateChanged(this, new MyEventArgs { isMouseOver = true });
67
            //}
68
        }
69 036650a0 humkyung
70
        /// <summary>
71
        /// subclass has to override this property
72
        /// </summary>
73
        virtual public ControlType ControlType { get; set; }
74
75
        /// <summary>
76
        /// subclass has to override this method
77
        /// </summary>
78
        /// <returns>serialized string</returns>
79
        public virtual string Serialize() { return string.Empty; }
80 cb33ad14 humkyung
81
        /// <summary>
82
        /// return MARKUP_DATA
83
        /// </summary>
84
        /// <param name="sUserID"></param>
85
        /// <param name="iPageNo"></param>
86
        /// <returns></returns>
87
        public virtual MARKUP_DATA GetMarkupData(string sUserID, int iPageNo, string sMarkupVersionID)
88
        {
89
            var root = MarkupParser.MarkupToString(this, sUserID);
90
            return new MARKUP_DATA
91
            {
92
                ID = this.CommentID,
93
                DATA = root.ConvertData,
94
                DATA_TYPE = root.DATA_TYPE,
95
                PAGENUMBER = iPageNo,
96
                MARKUPINFO_VERSION_ID = sMarkupVersionID,
97
                SYMBOL_ID = this.SymbolID,
98
                GROUP_ID = this.GroupID
99
            };
100
        }
101 787a4489 KangIngu
    }
102
}
클립보드 이미지 추가 (최대 크기: 500 MB)