-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathBookmark.cs
119 lines (103 loc) · 2.63 KB
/
Bookmark.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Documents;
namespace ProverbTeleprompter
{
public class Bookmark : NotifyPropertyChangedBase
{
private string _name;
public string Name
{
get { return _name; }
set { _name = value;
if(Hyperlink != null)
{
Hyperlink.NavigateUri = new Uri(String.Format("http://bookmark/{0}", _name));
}
Changed(() => Name);
}
}
private double _topOffset;
public double TopOffset
{
get { return _topOffset; }
set
{
_topOffset = value;
Changed(() => TopOffset);
}
}
private int _line;
public int Line
{
get { return _line; }
set
{
_line = value;
Changed(() => Line);
}
}
private int _ordinal;
public int Ordinal
{
get { return _ordinal; }
set
{
Changed(() => Ordinal);
_ordinal = value;
}
}
[DependsUpon("Name")]
[DependsUpon("Ordinal")]
public string DisplayTitle { get
{
return string.Format("{0}: {1}",Ordinal, Name);
} }
private Hyperlink _hyperlink;
public Hyperlink Hyperlink
{
get { return _hyperlink; }
set
{
_hyperlink = value;
Changed(() => Hyperlink);
}
}
private TextPointer _position;
public TextPointer Position
{
get { return _position; }
set
{
_position = value;
Changed(() => Position);
}
}
private Image _image;
public Image Image
{
get { return _image; }
set
{
_image = value;
Changed(() => Image);
}
}
private string _tooltipText;
[DependsUpon("Position")]
public string TooltipText
{
get { return _tooltipText; }
set
{
_tooltipText = value;
Changed(() => TooltipText);
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
}