Advertisement
Guest User

Untitled

a guest
May 30th, 2010
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.79 KB | None | 0 0
  1. #pragma once
  2.  
  3.  
  4. namespace SQLScriptGenerator {
  5.  
  6. using namespace System;
  7. using namespace System::ComponentModel;
  8. using namespace System::Collections;
  9. using namespace System::Windows::Forms;
  10. using namespace System::Data;
  11. using namespace System::Drawing;
  12.  
  13. /// <summary>
  14. /// Summary for Form1
  15. ///
  16. /// WARNING: If you change the name of this class, you will need to change the
  17. /// 'Resource File Name' property for the managed resource compiler tool
  18. /// associated with all .resx files this class depends on. Otherwise,
  19. /// the designers will not be able to interact properly with localized
  20. /// resources associated with this form.
  21. /// </summary>
  22. public ref class Form1 : public System::Windows::Forms::Form
  23. {
  24. public:
  25. Form1(void)
  26. {
  27. InitializeComponent();
  28. //
  29. //TODO: Add the constructor code here
  30. //
  31. }
  32.  
  33. protected:
  34. /// <summary>
  35. /// Clean up any resources being used.
  36. /// </summary>
  37. ~Form1()
  38. {
  39. if (components)
  40. {
  41. delete components;
  42. }
  43. }
  44. private: System::Windows::Forms::Button^ button1;
  45. protected:
  46. private: System::Windows::Forms::Button^ button2;
  47. private: System::Windows::Forms::Button^ button3;
  48. private: System::Windows::Forms::Button^ button4;
  49. private: System::Windows::Forms::Button^ button5;
  50. private: System::Windows::Forms::TextBox^ textBox1;
  51.  
  52.  
  53. private: System::Windows::Forms::SaveFileDialog^ saveFileDialog1;
  54. private: System::Windows::Forms::FontDialog^ fontDialog1;
  55. private: System::Windows::Forms::TextBox^ textBox2;
  56. private: System::Windows::Forms::Label^ label1;
  57. private: System::Windows::Forms::Label^ label2;
  58. private: System::Windows::Forms::Label^ label3;
  59. private: System::Windows::Forms::RichTextBox^ richTextBox1;
  60.  
  61.  
  62. private:
  63. /// <summary>
  64. /// Required designer variable.
  65. /// </summary>
  66. System::ComponentModel::Container ^components;
  67.  
  68. #pragma region Windows Form Designer generated code
  69. /// <summary>
  70. /// Required method for Designer support - do not modify
  71. /// the contents of this method with the code editor.
  72. /// </summary>
  73. void InitializeComponent(void)
  74. {
  75. System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
  76. this->button1 = (gcnew System::Windows::Forms::Button());
  77. this->button2 = (gcnew System::Windows::Forms::Button());
  78. this->button3 = (gcnew System::Windows::Forms::Button());
  79. this->button4 = (gcnew System::Windows::Forms::Button());
  80. this->button5 = (gcnew System::Windows::Forms::Button());
  81. this->textBox1 = (gcnew System::Windows::Forms::TextBox());
  82. this->saveFileDialog1 = (gcnew System::Windows::Forms::SaveFileDialog());
  83. this->fontDialog1 = (gcnew System::Windows::Forms::FontDialog());
  84. this->textBox2 = (gcnew System::Windows::Forms::TextBox());
  85. this->label1 = (gcnew System::Windows::Forms::Label());
  86. this->label2 = (gcnew System::Windows::Forms::Label());
  87. this->label3 = (gcnew System::Windows::Forms::Label());
  88. this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());
  89. this->SuspendLayout();
  90. //
  91. // button1
  92. //
  93. this->button1->Location = System::Drawing::Point(26, 55);
  94. this->button1->Name = L"button1";
  95. this->button1->Size = System::Drawing::Size(91, 37);
  96. this->button1->TabIndex = 0;
  97. this->button1->Text = L"Create Creature";
  98. this->button1->UseVisualStyleBackColor = true;
  99. this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
  100. //
  101. // button2
  102. //
  103. this->button2->Location = System::Drawing::Point(26, 98);
  104. this->button2->Name = L"button2";
  105. this->button2->Size = System::Drawing::Size(91, 30);
  106. this->button2->TabIndex = 1;
  107. this->button2->Text = L"Create Object";
  108. this->button2->UseVisualStyleBackColor = true;
  109. this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
  110. //
  111. // button3
  112. //
  113. this->button3->Location = System::Drawing::Point(26, 134);
  114. this->button3->Name = L"button3";
  115. this->button3->Size = System::Drawing::Size(91, 29);
  116. this->button3->TabIndex = 2;
  117. this->button3->Text = L"Create Recall";
  118. this->button3->UseVisualStyleBackColor = true;
  119. this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
  120. //
  121. // button4
  122. //
  123. this->button4->Location = System::Drawing::Point(26, 169);
  124. this->button4->Name = L"button4";
  125. this->button4->Size = System::Drawing::Size(91, 33);
  126. this->button4->TabIndex = 3;
  127. this->button4->Text = L"Create Item";
  128. this->button4->UseVisualStyleBackColor = true;
  129. this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
  130. //
  131. // button5
  132. //
  133. this->button5->Location = System::Drawing::Point(26, 208);
  134. this->button5->Name = L"button5";
  135. this->button5->Size = System::Drawing::Size(91, 33);
  136. this->button5->TabIndex = 4;
  137. this->button5->Text = L"Create Quest";
  138. this->button5->UseVisualStyleBackColor = true;
  139. this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);
  140. //
  141. // textBox1
  142. //
  143. this->textBox1->Location = System::Drawing::Point(124, 34);
  144. this->textBox1->Multiline = true;
  145. this->textBox1->Name = L"textBox1";
  146. this->textBox1->ScrollBars = System::Windows::Forms::ScrollBars::Both;
  147. this->textBox1->Size = System::Drawing::Size(379, 31);
  148. this->textBox1->TabIndex = 5;
  149. this->textBox1->Text = L"Copy and Paste This SQL Code";
  150. this->textBox1->TextChanged += gcnew System::EventHandler(this, &Form1::textBox1_TextChanged);
  151. //
  152. // fontDialog1
  153. //
  154. this->fontDialog1->Apply += gcnew System::EventHandler(this, &Form1::fontDialog1_Apply);
  155. //
  156. // textBox2
  157. //
  158. this->textBox2->Location = System::Drawing::Point(125, 81);
  159. this->textBox2->Multiline = true;
  160. this->textBox2->Name = L"textBox2";
  161. this->textBox2->Size = System::Drawing::Size(378, 28);
  162. this->textBox2->TabIndex = 8;
  163. this->textBox2->Text = L"Copy and Paste this SQL Code Also if needed";
  164. //
  165. // label1
  166. //
  167. this->label1->AutoSize = true;
  168. this->label1->Location = System::Drawing::Point(123, 134);
  169. this->label1->Name = L"label1";
  170. this->label1->Size = System::Drawing::Size(505, 13);
  171. this->label1->TabIndex = 9;
  172. this->label1->Text = L"Tips: Right click on Select All, and click on Copy and Paste and Copy and Paste "
  173. L"the code generated into";
  174. this->label1->Click += gcnew System::EventHandler(this, &Form1::label1_Click);
  175. //
  176. // label2
  177. //
  178. this->label2->AutoSize = true;
  179. this->label2->Location = System::Drawing::Point(124, 153);
  180. this->label2->Name = L"label2";
  181. this->label2->Size = System::Drawing::Size(323, 13);
  182. this->label2->TabIndex = 10;
  183. this->label2->Text = L" notepad edit whatever needs to be edited and save it as a .sql file.";
  184. //
  185. // label3
  186. //
  187. this->label3->AutoSize = true;
  188. this->label3->Location = System::Drawing::Point(168, 222);
  189. this->label3->Name = L"label3";
  190. this->label3->Size = System::Drawing::Size(110, 13);
  191. this->label3->TabIndex = 11;
  192. this->label3->Text = L"Created by: Pedregon";
  193. //
  194. // richTextBox1
  195. //
  196. this->richTextBox1->Location = System::Drawing::Point(518, 22);
  197. this->richTextBox1->Name = L"richTextBox1";
  198. this->richTextBox1->Size = System::Drawing::Size(109, 105);
  199. this->richTextBox1->TabIndex = 12;
  200. this->richTextBox1->Text = L"This is a simple SQL Script Generator that generates five diffrent SQL scripts. C"
  201. L"hoose one and following and follow the Tips displayed bellow.";
  202. //
  203. // Form1
  204. //
  205. this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  206. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  207. this->ClientSize = System::Drawing::Size(657, 264);
  208. this->Controls->Add(this->richTextBox1);
  209. this->Controls->Add(this->label3);
  210. this->Controls->Add(this->label2);
  211. this->Controls->Add(this->textBox2);
  212. this->Controls->Add(this->textBox1);
  213. this->Controls->Add(this->button5);
  214. this->Controls->Add(this->button4);
  215. this->Controls->Add(this->button3);
  216. this->Controls->Add(this->button2);
  217. this->Controls->Add(this->button1);
  218. this->Controls->Add(this->label1);
  219. this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
  220. this->Name = L"Form1";
  221. this->Text = L"SQL Script Generator";
  222. this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
  223. this->ResumeLayout(false);
  224. this->PerformLayout();
  225.  
  226. }
  227. #pragma endregion
  228. private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
  229. textBox1->Text = " INSERT INTO `creature_names` (`entry`, `name`, `subname`, `info_str`, `male_displayid`) VALUES ('NPCID', 'Name', 'Subname', '', 'DISPLAYID'); ";
  230.  
  231. textBox2->Text = " INSERT INTO `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `attacktime`, `mindamage`, `maxdamage`, `rangedmindamage`, `rangedmaxdamage`, `respawntime`, `armor`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`) VALUES ('EntryID', 'minlevel', 'maxlevel', 'faction', 'minhealth', 'maxhealth', 'mana', 'scale', 'attacktime', 'mindamage', 'maxdamage', 'rangedmindamage', 'rangedmaxdamage', 'respawntime', 'armor', '0', '0', '0', '0', '0'); ";
  232. }
  233. private: System::Void linkLabel1_LinkClicked(System::Object^ sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^ e) {
  234. }
  235. private: System::Void fontDialog1_Apply(System::Object^ sender, System::EventArgs^ e) {
  236. }
  237. private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
  238. }
  239. private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
  240. }
  241. private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
  242. textBox1->Text = " INSERT INTO `gameobject_names` (`entry`, `Type`, `DisplayID`, `Name`, `Category`, `CastBarText`, `UnkStr`, `spellfocus`, `sound1`, `QuestItem1`) VALUES ('EntryId', 'Type', 'DisplayID', 'Name', 'Category', 'CastBarText', 'UnkStr', 'SpellFocus', 'Sound', 'Size'); ";
  243. }
  244. private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
  245. textBox1->Text = "INSERT INTO `recall` (`id`, `name`, `MapId`, `positionX`, `positionY`, `positionZ`, `Orientation`) VALUES ('EntryID', 'Name', 'MapID', 'XPos', 'YPos', 'ZPos', 'Orientation'); ";
  246. }
  247. private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
  248. textBox1->Text = "INSERT INTO `items` (`entry`, `class`, `name1`, `displayid`, `buyprice`, `sellprice`, `itemlevel`, `requiredlevel`, `dmg_min1`, `dmg_max1`, `armor`, `mapid`, `TotemCategory`, `socket_color_1`, `socket_color_2`, `socket_color_3`, `socket_bonus`, `GemProperties`) VALUES ('EntryID', '0', 'Name', 'DisplayID', 'Buy', 'Sell', 'itemlevel', 'reqlevel', 'mindam', 'maxdam', 'armor', '0', '0', '0', '0', '0', '0', '0');";
  249.  
  250. }
  251. private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {
  252. textBox1->Text = "INSERT INTO `quests` (`entry`, `ZoneId`, `MinLevel`, `questlevel`, `Title`, `Details`, `Objectives`, `CompletionText`, `IncompleteText`, `EndText`, `ObjectiveText1`, `ObjectiveText2`, `ObjectiveText3`, `ObjectiveText4`, `ReqItemId1`, `ReqItemCount1`, `ReqItemCount6`, `ReqKillMobOrGOCount1`, `RewChoiceItemId1`, `RewChoiceItemCount1`, `RewItemId1`, `RewItemCount1`, `RewMoney`, `RewXP`, `RequiredOneOfQuest`, `RemoveQuests`) VALUES ('EntryID', 'ZoneID', 'MinLevel', 'questlevel', 'Name', 'Details', 'Objectives', 'Complete', 'Incomplete', 'End', '', '', '', '', 'ReqItemId1', '1', 'ReqKillMob1', '1', 'RewChoiceItemId1', '1', 'ReqItemId1', '1', 'RewXp', '', '');";
  253. }
  254. private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) {
  255. }
  256. };
  257. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement