Properties.cs 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. using System;
  2. using System.Xml;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace ConsoleApplication
  8. {
  9. public class Properties
  10. {
  11. private Boolean _flip,
  12. _formEnabled,
  13. _fx,
  14. _height,
  15. _isActionExectuer,
  16. _isCopyable,
  17. _isMovable,
  18. _isRemovable,
  19. _isSwapable,
  20. _opacity,
  21. _rotation,
  22. _text,
  23. _width,
  24. _xpos,
  25. _ypos;
  26. public Properties()
  27. {
  28. _flip = false;
  29. _formEnabled = false;
  30. _fx = false;
  31. _height = false;
  32. _isActionExectuer = false;
  33. _isCopyable = false;
  34. _isMovable = false;
  35. _isRemovable = false;
  36. _isSwapable = false;
  37. _opacity = false;
  38. _rotation = false;
  39. _text = false;
  40. _width = false;
  41. _xpos = false;
  42. _ypos = false;
  43. }
  44. public Properties( Boolean flip,
  45. Boolean formEnabled,
  46. Boolean fx,
  47. Boolean height,
  48. Boolean isActionExectuer,
  49. Boolean isCopyable,
  50. Boolean isMovable,
  51. Boolean isRemovable,
  52. Boolean isSwapable,
  53. Boolean opacity,
  54. Boolean rotation,
  55. Boolean text,
  56. Boolean width,
  57. Boolean xpos,
  58. Boolean ypos)
  59. {
  60. _flip = flip;
  61. _formEnabled = formEnabled;
  62. _fx = fx;
  63. _height = height;
  64. _isActionExectuer = isActionExectuer;
  65. _isCopyable = isCopyable;
  66. _isMovable = isMovable;
  67. _isRemovable = isRemovable;
  68. _isSwapable = isSwapable;
  69. _opacity = opacity;
  70. _rotation = rotation;
  71. _text = text;
  72. _width = width;
  73. _xpos = xpos;
  74. _ypos = ypos;
  75. }
  76. public Properties(SceneObject sceneObject)
  77. {
  78. Console.WriteLine();
  79. }
  80. public void setProperties( Boolean flip,
  81. Boolean formEnabled,
  82. Boolean fx,
  83. Boolean height,
  84. Boolean isActionExectuer,
  85. Boolean isCopyable,
  86. Boolean isMovable,
  87. Boolean isRemovable,
  88. Boolean isSwapable,
  89. Boolean opacity,
  90. Boolean rotation,
  91. Boolean text,
  92. Boolean width,
  93. Boolean xpos,
  94. Boolean ypos)
  95. {
  96. _flip = flip;
  97. _formEnabled = formEnabled;
  98. _fx = fx;
  99. _height = height;
  100. _isActionExectuer = isActionExectuer;
  101. _isCopyable = isCopyable;
  102. _isMovable = isMovable;
  103. _isRemovable = isRemovable;
  104. _isSwapable = isSwapable;
  105. _opacity = opacity;
  106. _rotation = rotation;
  107. _text = text;
  108. _width = width;
  109. _xpos = xpos;
  110. _ypos = ypos;
  111. }
  112. public Boolean Ypos
  113. {
  114. get { return _ypos; }
  115. set { _ypos = value; }
  116. }
  117. public Boolean Xpos
  118. {
  119. get { return _xpos; }
  120. set { _xpos = value; }
  121. }
  122. public Boolean Width
  123. {
  124. get { return _width; }
  125. set { _width = value; }
  126. }
  127. public Boolean Text
  128. {
  129. get { return _text; }
  130. set { _text = value; }
  131. }
  132. public Boolean Rotation
  133. {
  134. get { return _rotation; }
  135. set { _rotation = value; }
  136. }
  137. public Boolean Opacity
  138. {
  139. get { return _opacity; }
  140. set { _opacity = value; }
  141. }
  142. public Boolean IsSwapable
  143. {
  144. get { return _isSwapable; }
  145. set { _isSwapable = value; }
  146. }
  147. public Boolean IsRemovable
  148. {
  149. get { return _isRemovable; }
  150. set { _isRemovable = value; }
  151. }
  152. public Boolean IsMovable
  153. {
  154. get { return _isMovable; }
  155. set { _isMovable = value; }
  156. }
  157. public Boolean IsCopyable
  158. {
  159. get { return _isCopyable; }
  160. set { _isCopyable = value; }
  161. }
  162. public Boolean IsActionExectuer
  163. {
  164. get { return _isActionExectuer; }
  165. set { _isActionExectuer = value; }
  166. }
  167. public Boolean Height
  168. {
  169. get { return _height; }
  170. set { _height = value; }
  171. }
  172. public Boolean Fx
  173. {
  174. get { return _fx; }
  175. set { _fx = value; }
  176. }
  177. public Boolean FormEnabled
  178. {
  179. get { return _formEnabled; }
  180. set { _formEnabled = value; }
  181. }
  182. public Boolean Flip
  183. {
  184. get { return _flip; }
  185. set { _flip = value; }
  186. }
  187. public XmlElement getNode(XmlDocument root)
  188. {
  189. XmlElement node = root.CreateElement("properties");
  190. node.InnerText = toString();
  191. return node;
  192. }
  193. public string toString()
  194. {
  195. string output = "";
  196. output += (_flip) ? "flip," : "";
  197. output += (_formEnabled) ? "formEnabled," : "";
  198. output += (_fx) ? "fx," : "";
  199. output += (_height) ? "height," : "";
  200. output += (_isActionExectuer) ? "isActionExectuer," : "";
  201. output += (_isCopyable) ? "isCopyable," : "";
  202. output += (_isMovable) ? "isMovable," : "";
  203. output += (_isRemovable) ? "isRemovable," : "";
  204. output += (_isSwapable) ? "isSwapable," : "";
  205. output += (_opacity) ? "opacity," : "";
  206. output += (_rotation) ? "rotation," : "";
  207. output += (_text) ? "text," : "";
  208. output += (_width) ? "width," : "";
  209. output += (_xpos) ? "xpos," : "";
  210. output += (_ypos) ? "ypos," : "";
  211. if (output.Contains(","))
  212. output = output.Remove(output.LastIndexOf(","));
  213. return output;
  214. }
  215. }
  216. }