Ascii.cpp
上传用户:lulishicai
上传日期:2010-03-01
资源大小:13202k
文件大小:11k
源码类别:

Delphi/CppBuilder

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "Ascii.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma resource "*.dfm"
  8. TForm1 *Form1;
  9. String str1;
  10. //---------------------------------------------------------------------------
  11. __fastcall TForm1::TForm1(TComponent* Owner)
  12.         : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16. void __fastcall TForm1::RadioButton1Click(TObject *Sender)
  17. {
  18. str1="";
  19. str1=str1+"                       ___                                "+"n";
  20. str1=str1+"                       \  \                               "+"n";
  21. str1=str1+"                        \  `\                             "+"n";
  22. str1=str1+"     ___                 \   \                            "+"n";
  23. str1=str1+"    |    \                \   `\                          "+"n";
  24. str1=str1+"    |_____\                \    \                         "+"n";
  25. str1=str1+"    |______\                \    `\                       "+"n";
  26. str1=str1+"    |       \                \     \                      "+"n";
  27. str1=str1+"    |      __\__---------------------------------._.      "+"n";
  28. str1=str1+"  __|---~~~__o_o_o_o_o_o_o_o_o_o_o_o_o_o_o_o_o_o_[][__   "+"n";
  29. str1=str1+" |___                         /~      )                __"+"n";
  30. str1=str1+"     ~~~---..._______________/      ,/_________________/  "+"n";
  31. str1=str1+"                            /      /                      "+"n";
  32. str1=str1+"                           /     ,/                       "+"n";
  33. str1=str1+"                          /     /                         "+"n";
  34. str1=str1+"                         /    ,/                          "+"n";
  35. str1=str1+"                        /    /                            "+"n";
  36. str1=str1+"                       /   ,/                             "+"n";
  37. str1=str1+"                      /   /                               "+"n";
  38. str1=str1+"                     /  ,/                                "+"n";
  39. str1=str1+"                    /__/                                  "+"n";
  40. //飞机图案
  41. }
  42. //---------------------------------------------------------------------------
  43. void __fastcall TForm1::RadioButton2Click(TObject *Sender)
  44. {
  45. str1="";
  46. str1=str1+"    ,                                           "+"n";
  47. str1=str1+" _,,).~,,._                                    "+"n";
  48. str1=str1+" (()`  ``)))),,_                               "+"n";
  49. str1=str1+"  |      ''(()))),,_          ____            "+"n";
  50. str1=str1+"  |6`   |   ''((()))  -._____-     `-.-,       "+"n";
  51. str1=str1+"  |    .| |    )))))                  )))     "+"n";
  52. str1=str1+"  |   |   `.     ''                     ((((    "+"n";
  53. str1=str1+"  ,__)     /                          |))))   "+"n";
  54. str1=str1+"            |                           (((((   "+"n";
  55. str1=str1+"                               |       ))))))  "+"n";
  56. str1=str1+"              `|    |           ,     /((((((  "+"n";
  57. str1=str1+"               |   / `-.______.<     |  )))))  "+"n";
  58. str1=str1+"               |   |  /         `.     ((((   "+"n";
  59. str1=str1+"               |  /  |           `.  | (((    "+"n";
  60. str1=str1+"                 | | |             )| |  ))    "+"n";
  61. str1=str1+"                | | | |            / | |        "+"n";
  62. str1=str1+"                | | /_(           /_(/ /        "+"n";
  63. str1=str1+"                /_(/__]           _/_(         "+"n";
  64. str1=str1+"               /__]                /__]         "+"n";
  65. //奔马图案
  66. }
  67. //---------------------------------------------------------------------------
  68. void __fastcall TForm1::RadioButton3Click(TObject *Sender)
  69. {
  70. str1="";
  71. str1=str1+"               -. -.                     "+"n";
  72. str1=str1+"             (  (  (                     "+"n";
  73. str1=str1+"                )  ) _..-.._            "+"n";
  74. str1=str1+"             __)/ , ,        `.          "+"n";
  75. str1=str1+"           ,'     `.     ,--.  `.        "+"n";
  76. str1=str1+"         ,'   @        .     `          "+"n";
  77. str1=str1+"        (Y            (           ;''.   "+"n";
  78. str1=str1+"         `--.____,               ,  ;   "+"n";
  79. str1=str1+"         ((_ ,----  ,---       _, _,     "+"n";
  80. str1=str1+"            (((_,- (((______,-           "+"n";
  81. //兔子图案
  82. }
  83. //---------------------------------------------------------------------------
  84. void __fastcall TForm1::RadioButton4Click(TObject *Sender)
  85. {
  86. str1="";
  87. str1=str1+"       .==-.                   .-==.     "+"n";
  88. str1=str1+"        ()8`-._   .   .   _.- 8()/      "+"n";
  89. str1=str1+"        (88'   ::.  ./  .::   '88)      "+"n";
  90. str1=str1+"         _. `-::::.(#).::::- `._/       "+"n";
  91. str1=str1+"           `._... .q(_)p. ..._.          "+"n";
  92. str1=str1+"             ""-..- |=|`-..-""           "+"n";
  93. str1=str1+"             .""  . |=|`. `"".           "+"n";
  94. str1=str1+"           , :8(o)./|=|.(o)8:`.         "+"n";
  95. str1=str1+"          (O :8 ::/ _/ :: 8: O)        "+"n";
  96. str1=str1+"           O `::/       ::  O/         "+"n";
  97. str1=str1+"            ""--          `--""          "+"n";
  98. //蝴蝶图案
  99. }
  100. //---------------------------------------------------------------------------
  101. void __fastcall TForm1::RadioButton5Click(TObject *Sender)
  102. {
  103. str1="";
  104. str1=str1+"     .-''-.                             "+"n";
  105. str1=str1+"    / ,                                "+"n";
  106. str1=str1+" .- `(o)    ;                           "+"n";
  107. str1=str1+" -==.       |                           "+"n";
  108. str1=str1+"     `._...-;-.                         "+"n";
  109. str1=str1+"      )--'''   `-.                      "+"n";
  110. str1=str1+"     /   .        `-.                   "+"n";
  111. str1=str1+"    /   /      `.    `-.                "+"n";
  112. str1=str1+"    |       ;         `-._________    "+"n";
  113. str1=str1+"    |        `.`.;          -------`.  "+"n";
  114. str1=str1+"         `-.   \\          `---...|  "+"n";
  115. str1=str1+"      `.     `-. ```.-- ._   `---...|  "+"n";
  116. str1=str1+"        `-.....7`-.))     `-._`-.. /   "+"n";
  117. str1=str1+"          `._ /   `-`         `-.,     "+"n";
  118. str1=str1+"            / /                         "+"n";
  119. str1=str1+"           /=(_                         "+"n";
  120. str1=str1+"        -./--  `                        "+"n";
  121. str1=str1+"      ,^-(_                             "+"n";
  122. str1=str1+"      ,--  `                            "+"n";
  123. //鸟图案
  124. }
  125. //---------------------------------------------------------------------------
  126. void __fastcall TForm1::RadioButton6Click(TObject *Sender)
  127. {
  128. str1="";
  129. str1=str1+"        ***********                ***********          "+"n";
  130. str1=str1+"     ******************          ******************     "+"n";
  131. str1=str1+"  ***********************      ***********************  "+"n";
  132. str1=str1+" *************************    ************************* "+"n";
  133. str1=str1+"***************************  ***************************"+"n";
  134. str1=str1+"********************************************************"+"n";
  135. str1=str1+"********************************************************"+"n";
  136. str1=str1+" ****************************************************** "+"n";
  137. str1=str1+"  ****************************************************  "+"n";
  138. str1=str1+"   **************************************************   "+"n";
  139. str1=str1+"     **********************************************     "+"n";
  140. str1=str1+"       ******************************************       "+"n";
  141. str1=str1+"         **************************************         "+"n";
  142. str1=str1+"           **********************************           "+"n";
  143. str1=str1+"             ******************************             "+"n";
  144. str1=str1+"               **************************               "+"n";
  145. str1=str1+"                  ********************                  "+"n";
  146. str1=str1+"                      ************                      "+"n";
  147. str1=str1+"                          **                            "+"n";
  148. //心图案
  149. }
  150. //---------------------------------------------------------------------------
  151. void __fastcall TForm1::RadioButton7Click(TObject *Sender)
  152. {
  153. str1="";
  154. str1=str1+"__        __                             "+"n";
  155. str1=str1+"\ \      / /_ _ _ __   __ _              "+"n";
  156. str1=str1+" \ \ /\ / / _` | '_ \ / _` |             "+"n";
  157. str1=str1+"  \ V  V / (_| | | | | (_| |             "+"n";
  158. str1=str1+"   \_/\_/ \__,_|_| |_|\__, |             "+"n";
  159. str1=str1+"                      |___/              "+"n";
  160. str1=str1+"__  ___                                  "+"n";
  161. str1=str1+"\ \/ (_)_ __   __ _                      "+"n";
  162. str1=str1+" \  /| | '_ \ / _` |                     "+"n";
  163. str1=str1+" /  \| | | | | (_| |                     "+"n";
  164. str1=str1+"/_/\_\_|_| |_|\__, |                     "+"n";
  165. str1=str1+"              |___/                      "+"n";
  166. str1=str1+"     _ _                                 "+"n";
  167. str1=str1+"    | (_)_ __   __ _                     "+"n";
  168. str1=str1+" _  | | | '_ \ / _` |                    "+"n";
  169. str1=str1+"| |_| | | | | | (_| |                    "+"n";
  170. str1=str1+" \___/|_|_| |_|\__, |                    "+"n";
  171. str1=str1+"               |___/                     "+"n";
  172. //名字图案
  173. }
  174. //---------------------------------------------------------------------------
  175. void __fastcall TForm1::RadioButton8Click(TObject *Sender)
  176. {
  177. str1="";
  178. str1=str1+"  +---------------------------------------------+"+"n";
  179. str1=str1+"  |*********************************************|"+"n";
  180. str1=str1+"  |*...........................................*|"+"n";
  181. str1=str1+"  |*.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.*|"+"n";
  182. str1=str1+"  |*.%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %.*|"+"n";
  183. str1=str1+"  |*.%!################################### ! %.*|"+"n";
  184. str1=str1+"  |*.%!#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# ! %.*|"+"n";
  185. str1=str1+"  |*.%!#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# ! %.*|"+"n";
  186. str1=str1+"  |*.%!################################### ! %.*|"+"n";
  187. str1=str1+"  |*.%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! %.*|"+"n";
  188. str1=str1+"  |*.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.*|"+"n";
  189. str1=str1+"  |*...........................................*|"+"n";
  190. str1=str1+"  |*********************************************|"+"n";
  191. str1=str1+"  +---------------------------------------------+"+"n";
  192. //矩形图案
  193. }
  194. //---------------------------------------------------------------------------
  195. void __fastcall TForm1::Button1Click(TObject *Sender)
  196. {
  197. Form1->RichEdit1->Lines->Text=str1;
  198. //绘制艺术图案
  199. }
  200. //---------------------------------------------------------------------------
  201. void __fastcall TForm1::Button2Click(TObject *Sender)
  202. {
  203. Form1->RichEdit1->Lines->Clear();
  204. //清除文本框中的艺图案
  205. }
  206. //---------------------------------------------------------------------------
  207.