Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DesignerVerb.cs
Go to the documentation of this file.
2
4
6{
7 public string Description
8 {
9 get
10 {
11 object obj = Properties["Description"];
12 if (obj == null)
13 {
14 return string.Empty;
15 }
16 return (string)obj;
17 }
18 set
19 {
20 Properties["Description"] = value;
21 }
22 }
23
24 public string Text
25 {
26 get
27 {
28 object obj = Properties["Text"];
29 if (obj == null)
30 {
31 return string.Empty;
32 }
33 return (string)obj;
34 }
35 }
36
37 public DesignerVerb(string text, EventHandler handler)
38 : base(handler, StandardCommands.VerbFirst)
39 {
40 Properties["Text"] = ((text == null) ? null : Regex.Replace(text, "\\(\\&.\\)", ""));
41 }
42
43 public DesignerVerb(string text, EventHandler handler, CommandID startCommandID)
44 : base(handler, startCommandID)
45 {
46 Properties["Text"] = ((text == null) ? null : Regex.Replace(text, "\\(\\&.\\)", ""));
47 }
48
49 public override string ToString()
50 {
51 return Text + " : " + base.ToString();
52 }
53}
DesignerVerb(string text, EventHandler handler, CommandID startCommandID)
DesignerVerb(string text, EventHandler handler)
static string Replace(string input, string pattern, string replacement)
Definition Regex.cs:514