Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- namespace SQLScriptGenerator {
- using namespace System;
- using namespace System::ComponentModel;
- using namespace System::Collections;
- using namespace System::Windows::Forms;
- using namespace System::Data;
- using namespace System::Drawing;
- /// <summary>
- /// Summary for Form1
- ///
- /// WARNING: If you change the name of this class, you will need to change the
- /// 'Resource File Name' property for the managed resource compiler tool
- /// associated with all .resx files this class depends on. Otherwise,
- /// the designers will not be able to interact properly with localized
- /// resources associated with this form.
- /// </summary>
- public ref class Form1 : public System::Windows::Forms::Form
- {
- public:
- Form1(void)
- {
- InitializeComponent();
- //
- //TODO: Add the constructor code here
- //
- }
- protected:
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- ~Form1()
- {
- if (components)
- {
- delete components;
- }
- }
- private: System::Windows::Forms::Button^ button1;
- protected:
- private: System::Windows::Forms::Button^ button2;
- private: System::Windows::Forms::Button^ button3;
- private: System::Windows::Forms::Button^ button4;
- private: System::Windows::Forms::Button^ button5;
- private: System::Windows::Forms::TextBox^ textBox1;
- private: System::Windows::Forms::SaveFileDialog^ saveFileDialog1;
- private: System::Windows::Forms::FontDialog^ fontDialog1;
- private: System::Windows::Forms::TextBox^ textBox2;
- private: System::Windows::Forms::Label^ label1;
- private: System::Windows::Forms::Label^ label2;
- private: System::Windows::Forms::Label^ label3;
- private: System::Windows::Forms::RichTextBox^ richTextBox1;
- private:
- /// <summary>
- /// Required designer variable.
- /// </summary>
- System::ComponentModel::Container ^components;
- #pragma region Windows Form Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- void InitializeComponent(void)
- {
- System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
- this->button1 = (gcnew System::Windows::Forms::Button());
- this->button2 = (gcnew System::Windows::Forms::Button());
- this->button3 = (gcnew System::Windows::Forms::Button());
- this->button4 = (gcnew System::Windows::Forms::Button());
- this->button5 = (gcnew System::Windows::Forms::Button());
- this->textBox1 = (gcnew System::Windows::Forms::TextBox());
- this->saveFileDialog1 = (gcnew System::Windows::Forms::SaveFileDialog());
- this->fontDialog1 = (gcnew System::Windows::Forms::FontDialog());
- this->textBox2 = (gcnew System::Windows::Forms::TextBox());
- this->label1 = (gcnew System::Windows::Forms::Label());
- this->label2 = (gcnew System::Windows::Forms::Label());
- this->label3 = (gcnew System::Windows::Forms::Label());
- this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());
- this->SuspendLayout();
- //
- // button1
- //
- this->button1->Location = System::Drawing::Point(26, 55);
- this->button1->Name = L"button1";
- this->button1->Size = System::Drawing::Size(91, 37);
- this->button1->TabIndex = 0;
- this->button1->Text = L"Create Creature";
- this->button1->UseVisualStyleBackColor = true;
- this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
- //
- // button2
- //
- this->button2->Location = System::Drawing::Point(26, 98);
- this->button2->Name = L"button2";
- this->button2->Size = System::Drawing::Size(91, 30);
- this->button2->TabIndex = 1;
- this->button2->Text = L"Create Object";
- this->button2->UseVisualStyleBackColor = true;
- this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
- //
- // button3
- //
- this->button3->Location = System::Drawing::Point(26, 134);
- this->button3->Name = L"button3";
- this->button3->Size = System::Drawing::Size(91, 29);
- this->button3->TabIndex = 2;
- this->button3->Text = L"Create Recall";
- this->button3->UseVisualStyleBackColor = true;
- this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
- //
- // button4
- //
- this->button4->Location = System::Drawing::Point(26, 169);
- this->button4->Name = L"button4";
- this->button4->Size = System::Drawing::Size(91, 33);
- this->button4->TabIndex = 3;
- this->button4->Text = L"Create Item";
- this->button4->UseVisualStyleBackColor = true;
- this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
- //
- // button5
- //
- this->button5->Location = System::Drawing::Point(26, 208);
- this->button5->Name = L"button5";
- this->button5->Size = System::Drawing::Size(91, 33);
- this->button5->TabIndex = 4;
- this->button5->Text = L"Create Quest";
- this->button5->UseVisualStyleBackColor = true;
- this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);
- //
- // textBox1
- //
- this->textBox1->Location = System::Drawing::Point(124, 34);
- this->textBox1->Multiline = true;
- this->textBox1->Name = L"textBox1";
- this->textBox1->ScrollBars = System::Windows::Forms::ScrollBars::Both;
- this->textBox1->Size = System::Drawing::Size(379, 31);
- this->textBox1->TabIndex = 5;
- this->textBox1->Text = L"Copy and Paste This SQL Code";
- this->textBox1->TextChanged += gcnew System::EventHandler(this, &Form1::textBox1_TextChanged);
- //
- // fontDialog1
- //
- this->fontDialog1->Apply += gcnew System::EventHandler(this, &Form1::fontDialog1_Apply);
- //
- // textBox2
- //
- this->textBox2->Location = System::Drawing::Point(125, 81);
- this->textBox2->Multiline = true;
- this->textBox2->Name = L"textBox2";
- this->textBox2->Size = System::Drawing::Size(378, 28);
- this->textBox2->TabIndex = 8;
- this->textBox2->Text = L"Copy and Paste this SQL Code Also if needed";
- //
- // label1
- //
- this->label1->AutoSize = true;
- this->label1->Location = System::Drawing::Point(123, 134);
- this->label1->Name = L"label1";
- this->label1->Size = System::Drawing::Size(505, 13);
- this->label1->TabIndex = 9;
- this->label1->Text = L"Tips: Right click on Select All, and click on Copy and Paste and Copy and Paste "
- L"the code generated into";
- this->label1->Click += gcnew System::EventHandler(this, &Form1::label1_Click);
- //
- // label2
- //
- this->label2->AutoSize = true;
- this->label2->Location = System::Drawing::Point(124, 153);
- this->label2->Name = L"label2";
- this->label2->Size = System::Drawing::Size(323, 13);
- this->label2->TabIndex = 10;
- this->label2->Text = L" notepad edit whatever needs to be edited and save it as a .sql file.";
- //
- // label3
- //
- this->label3->AutoSize = true;
- this->label3->Location = System::Drawing::Point(168, 222);
- this->label3->Name = L"label3";
- this->label3->Size = System::Drawing::Size(110, 13);
- this->label3->TabIndex = 11;
- this->label3->Text = L"Created by: Pedregon";
- //
- // richTextBox1
- //
- this->richTextBox1->Location = System::Drawing::Point(518, 22);
- this->richTextBox1->Name = L"richTextBox1";
- this->richTextBox1->Size = System::Drawing::Size(109, 105);
- this->richTextBox1->TabIndex = 12;
- this->richTextBox1->Text = L"This is a simple SQL Script Generator that generates five diffrent SQL scripts. C"
- L"hoose one and following and follow the Tips displayed bellow.";
- //
- // Form1
- //
- this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
- this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
- this->ClientSize = System::Drawing::Size(657, 264);
- this->Controls->Add(this->richTextBox1);
- this->Controls->Add(this->label3);
- this->Controls->Add(this->label2);
- this->Controls->Add(this->textBox2);
- this->Controls->Add(this->textBox1);
- this->Controls->Add(this->button5);
- this->Controls->Add(this->button4);
- this->Controls->Add(this->button3);
- this->Controls->Add(this->button2);
- this->Controls->Add(this->button1);
- this->Controls->Add(this->label1);
- this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
- this->Name = L"Form1";
- this->Text = L"SQL Script Generator";
- this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
- this->ResumeLayout(false);
- this->PerformLayout();
- }
- #pragma endregion
- private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
- textBox1->Text = " INSERT INTO `creature_names` (`entry`, `name`, `subname`, `info_str`, `male_displayid`) VALUES ('NPCID', 'Name', 'Subname', '', 'DISPLAYID'); ";
- 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'); ";
- }
- private: System::Void linkLabel1_LinkClicked(System::Object^ sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^ e) {
- }
- private: System::Void fontDialog1_Apply(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
- 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'); ";
- }
- private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
- textBox1->Text = "INSERT INTO `recall` (`id`, `name`, `MapId`, `positionX`, `positionY`, `positionZ`, `Orientation`) VALUES ('EntryID', 'Name', 'MapID', 'XPos', 'YPos', 'ZPos', 'Orientation'); ";
- }
- private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
- 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');";
- }
- private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e) {
- 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', '', '');";
- }
- private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) {
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement