Changeset 9915 for trunk/sources/HeuristicLab.MainForm
- Timestamp:
- 08/29/13 11:43:55 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm/3.3/ViewAttribute.cs
r9456 r9915 28 28 public ViewAttribute(string name) { 29 29 this.name = name; 30 this.helpResourcePath = string.Empty; 31 } 32 33 public ViewAttribute(string name, string helpResourcePath) { 34 this.name = name; 35 this.helpResourcePath = helpResourcePath; 30 36 } 31 37 … … 34 40 get { return this.name; } 35 41 set { this.name = value; } 42 } 43 44 private string helpResourcePath; 45 public string HelpResourcePath { 46 get { return this.helpResourcePath; } 47 set { this.helpResourcePath = value; } 36 48 } 37 49 … … 47 59 return viewType.Name; 48 60 } 61 62 public static string GetHelpResourcePath(MemberInfo viewType) { 63 ViewAttribute[] attributes = (ViewAttribute[])viewType.GetCustomAttributes(typeof(ViewAttribute), false); 64 if (attributes.Length == 1) 65 return attributes[0].helpResourcePath; 66 return string.Empty; 67 } 68 69 public static bool HasHelpResourcePath(MemberInfo viewType) { 70 ViewAttribute[] attributes = (ViewAttribute[])viewType.GetCustomAttributes(typeof(ViewAttribute), false); 71 if (attributes.Length == 1) 72 return attributes[0].helpResourcePath != string.Empty; 73 return false; 74 } 49 75 } 50 76 }
Note: See TracChangeset
for help on using the changeset viewer.