StandardCharName.cs 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. // Permission is hereby granted, free of charge, to any person obtaining
  2. // a copy of this software and associated documentation files (the
  3. // "Software"), to deal in the Software without restriction, including
  4. // without limitation the rights to use, copy, modify, merge, publish,
  5. // distribute, sublicense, and/or sell copies of the Software, and to
  6. // permit persons to whom the Software is furnished to do so, subject to
  7. // the following conditions:
  8. //
  9. // The above copyright notice and this permission notice shall be
  10. // included in all copies or substantial portions of the Software.
  11. //
  12. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  13. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  15. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  16. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  17. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  18. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  19. //
  20. // Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
  21. //
  22. // Authors:
  23. // Peter Bartok ([email protected])
  24. //
  25. //
  26. // COMPLETE
  27. namespace System.Windows.Forms.RTF {
  28. #if RTF_LIB
  29. public
  30. #else
  31. internal
  32. #endif
  33. class StandardCharName {
  34. public static string[] Names = {
  35. "nothing",
  36. "space",
  37. "exclam",
  38. "quotedbl",
  39. "numbersign",
  40. "dollar",
  41. "percent",
  42. "ampersand",
  43. "quoteright",
  44. "parenleft",
  45. "parenright",
  46. "asterisk",
  47. "plus",
  48. "comma",
  49. "hyphen",
  50. "period",
  51. "slash",
  52. "zero",
  53. "one",
  54. "two",
  55. "three",
  56. "four",
  57. "five",
  58. "six",
  59. "seven",
  60. "eight",
  61. "nine",
  62. "colon",
  63. "semicolon",
  64. "less",
  65. "equal",
  66. "greater",
  67. "question",
  68. "at",
  69. "A",
  70. "B",
  71. "C",
  72. "D",
  73. "E",
  74. "F",
  75. "G",
  76. "H",
  77. "I",
  78. "J",
  79. "K",
  80. "L",
  81. "M",
  82. "N",
  83. "O",
  84. "P",
  85. "Q",
  86. "R",
  87. "S",
  88. "T",
  89. "U",
  90. "V",
  91. "W",
  92. "X",
  93. "Y",
  94. "Z",
  95. "bracketleft",
  96. "backslash",
  97. "bracketright",
  98. "asciicircum",
  99. "underscore",
  100. "quoteleft",
  101. "a",
  102. "b",
  103. "c",
  104. "d",
  105. "e",
  106. "f",
  107. "g",
  108. "h",
  109. "i",
  110. "j",
  111. "k",
  112. "l",
  113. "m",
  114. "n",
  115. "o",
  116. "p",
  117. "q",
  118. "r",
  119. "s",
  120. "t",
  121. "u",
  122. "v",
  123. "w",
  124. "x",
  125. "y",
  126. "z",
  127. "braceleft",
  128. "bar",
  129. "braceright",
  130. "asciitilde",
  131. "exclamdown",
  132. "cent",
  133. "sterling",
  134. "fraction",
  135. "yen",
  136. "florin",
  137. "section",
  138. "currency",
  139. "quotedblleft",
  140. "guillemotleft",
  141. "guilsinglleft",
  142. "guilsinglright",
  143. "fi",
  144. "fl",
  145. "endash",
  146. "dagger",
  147. "daggerdbl",
  148. "periodcentered",
  149. "paragraph",
  150. "bullet",
  151. "quotesinglbase",
  152. "quotedblbase",
  153. "quotedblright",
  154. "guillemotright",
  155. "ellipsis",
  156. "perthousand",
  157. "questiondown",
  158. "grave",
  159. "acute",
  160. "circumflex",
  161. "tilde",
  162. "macron",
  163. "breve",
  164. "dotaccent",
  165. "dieresis",
  166. "ring",
  167. "cedilla",
  168. "hungarumlaut",
  169. "ogonek",
  170. "caron",
  171. "emdash",
  172. "AE",
  173. "ordfeminine",
  174. "Lslash",
  175. "Oslash",
  176. "OE",
  177. "ordmasculine",
  178. "ae",
  179. "dotlessi",
  180. "lslash",
  181. "oslash",
  182. "oe",
  183. "germandbls",
  184. "Aacute",
  185. "Acircumflex",
  186. "Adieresis",
  187. "Agrave",
  188. "Aring",
  189. "Atilde",
  190. "Ccedilla",
  191. "Eacute",
  192. "Ecircumflex",
  193. "Edieresis",
  194. "Egrave",
  195. "Eth",
  196. "Iacute",
  197. "Icircumflex",
  198. "Idieresis",
  199. "Igrave",
  200. "Ntilde",
  201. "Oacute",
  202. "Ocircumflex",
  203. "Odieresis",
  204. "Ograve",
  205. "Otilde",
  206. "Scaron",
  207. "Thorn",
  208. "Uacute",
  209. "Ucircumflex",
  210. "Udieresis",
  211. "Ugrave",
  212. "Yacute",
  213. "Ydieresis",
  214. "aacute",
  215. "acircumflex",
  216. "adieresis",
  217. "agrave",
  218. "aring",
  219. "atilde",
  220. "brokenbar",
  221. "ccedilla",
  222. "copyright",
  223. "degree",
  224. "divide",
  225. "eacute",
  226. "ecircumflex",
  227. "edieresis",
  228. "egrave",
  229. "eth",
  230. "iacute",
  231. "icircumflex",
  232. "idieresis",
  233. "igrave",
  234. "logicalnot",
  235. "minus",
  236. "multiply",
  237. "ntilde",
  238. "oacute",
  239. "ocircumflex",
  240. "odieresis",
  241. "ograve",
  242. "onehalf",
  243. "onequarter",
  244. "onesuperior",
  245. "otilde",
  246. "plusminus",
  247. "registered",
  248. "thorn",
  249. "threequarters",
  250. "threesuperior",
  251. "trademark",
  252. "twosuperior",
  253. "uacute",
  254. "ucircumflex",
  255. "udieresis",
  256. "ugrave",
  257. "yacute",
  258. "ydieresis",
  259. "Alpha",
  260. "Beta",
  261. "Chi",
  262. "Delta",
  263. "Epsilon",
  264. "Phi",
  265. "Gamma",
  266. "Eta",
  267. "Iota",
  268. "Kappa",
  269. "Lambda",
  270. "Mu",
  271. "Nu",
  272. "Omicron",
  273. "Pi",
  274. "Theta",
  275. "Rho",
  276. "Sigma",
  277. "Tau",
  278. "Upsilon",
  279. "varUpsilon",
  280. "Omega",
  281. "Xi",
  282. "Psi",
  283. "Zeta",
  284. "alpha",
  285. "beta",
  286. "chi",
  287. "delta",
  288. "epsilon",
  289. "phi",
  290. "varphi",
  291. "gamma",
  292. "eta",
  293. "iota",
  294. "kappa",
  295. "lambda",
  296. "mu",
  297. "nu",
  298. "omicron",
  299. "pi",
  300. "varpi",
  301. "theta",
  302. "vartheta",
  303. "rho",
  304. "sigma",
  305. "varsigma",
  306. "tau",
  307. "upsilon",
  308. "omega",
  309. "xi",
  310. "psi",
  311. "zeta",
  312. "nobrkspace",
  313. "nobrkhyphen",
  314. "lessequal",
  315. "greaterequal",
  316. "infinity",
  317. "integral",
  318. "notequal",
  319. "radical",
  320. "radicalex",
  321. "approxequal",
  322. "apple",
  323. "partialdiff",
  324. "opthyphen",
  325. "formula",
  326. "lozenge",
  327. "universal",
  328. "existential",
  329. "suchthat",
  330. "congruent",
  331. "therefore",
  332. "perpendicular",
  333. "minute",
  334. "club",
  335. "diamond",
  336. "heart",
  337. "spade",
  338. "arrowboth",
  339. "arrowleft",
  340. "arrowup",
  341. "arrowright",
  342. "arrowdown",
  343. "second",
  344. "proportional",
  345. "equivalence",
  346. "arrowvertex",
  347. "arrowhorizex",
  348. "carriagereturn",
  349. "aleph",
  350. "Ifraktur",
  351. "Rfraktur",
  352. "weierstrass",
  353. "circlemultiply",
  354. "circleplus",
  355. "emptyset",
  356. "intersection",
  357. "union",
  358. "propersuperset",
  359. "reflexsuperset",
  360. "notsubset",
  361. "propersubset",
  362. "reflexsubset",
  363. "element",
  364. "notelement",
  365. "angle",
  366. "gradient",
  367. "product",
  368. "logicaland",
  369. "logicalor",
  370. "arrowdblboth",
  371. "arrowdblleft",
  372. "arrowdblup",
  373. "arrowdblright",
  374. "arrowdbldown",
  375. "angleleft",
  376. "registersans",
  377. "copyrightsans",
  378. "trademarksans",
  379. "angleright",
  380. "mathplus",
  381. "mathminus",
  382. "mathasterisk",
  383. "mathnumbersign",
  384. "dotmath",
  385. "mathequal",
  386. "mathtilde"
  387. };
  388. /// <summary>Lookup name by ID</summary>
  389. public static string Name(int index) {
  390. if ((index < 0) || (index >= Names.Length)) {
  391. return string.Empty;
  392. }
  393. return Names[index];
  394. }
  395. /// <summary>Lookup ID by name (e.g. mathtilde)</summary>
  396. public static int ID(string name) {
  397. for (int i=0; i < Names.Length; i++) {
  398. if (name.Equals(Names[i])) {
  399. return i;
  400. }
  401. }
  402. return 0;
  403. }
  404. }
  405. }