Rev 50 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
#include "WizardCore1.h"
namespace Creator {
/// <summary>
/// Summary for WizardBasic1
/// </summary>
#ifdef DESIGNER
public ref class WizardBasic1 : public System::Windows::Forms::UserControl
#else
public ref class WizardBasic1 : public Creator::WizardCore1
#endif
{
public:
#ifdef DESIGNER
WizardBasic1(Windows::Forms::Form ^parent, CBaseFile *p)
#else
WizardBasic1(Windows::Forms::Form ^parent, CBaseFile *p) : WizardCore1(parent, p)
#endif
{
InitializeComponent();
m_pParent = parent;
this->Tag = "basic1";
}
void UpdateDone()
{
if ( this->textBox2->Text && this->textBox3->Text && this->textBox4->Text )
this->EnableDone(true, -1);
else
this->EnableDone(false, -1);
}
virtual Windows::Forms::UserControl ^GetNext(CBaseFile *package) override
{
/*
if ( this->radioButton1->Checked )
return gcnew WizardBasic1(m_pParent, package);
else if ( this->radioButton2->Checked )
return gcnew WizardUpdate(m_pParent, package);
else if ( this->radioButton3->Checked )
return gcnew WizardRebalance(m_pParent, package);*/
return nullptr;
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~WizardBasic1()
{
if (components)
{
delete components;
}
}
private:
Windows::Forms::Form ^m_pParent;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::GroupBox^ groupBox1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::GroupBox^ groupBox2;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::GroupBox^ groupBox3;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::TextBox^ textBox3;
private: System::Windows::Forms::DateTimePicker^ dateTimePicker1;
private: System::Windows::Forms::GroupBox^ groupBox4;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::TextBox^ textBox4;
/// <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(WizardBasic1::typeid));
this->label1 = (gcnew System::Windows::Forms::Label());
this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
this->label2 = (gcnew System::Windows::Forms::Label());
this->dateTimePicker1 = (gcnew System::Windows::Forms::DateTimePicker());
this->groupBox2 = (gcnew System::Windows::Forms::GroupBox());
this->label3 = (gcnew System::Windows::Forms::Label());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->groupBox3 = (gcnew System::Windows::Forms::GroupBox());
this->label4 = (gcnew System::Windows::Forms::Label());
this->textBox3 = (gcnew System::Windows::Forms::TextBox());
this->groupBox4 = (gcnew System::Windows::Forms::GroupBox());
this->label5 = (gcnew System::Windows::Forms::Label());
this->textBox4 = (gcnew System::Windows::Forms::TextBox());
this->groupBox1->SuspendLayout();
this->groupBox2->SuspendLayout();
this->groupBox3->SuspendLayout();
this->groupBox4->SuspendLayout();
this->SuspendLayout();
//
// label1
//
this->label1->Dock = System::Windows::Forms::DockStyle::Top;
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label1->Location = System::Drawing::Point(10, 10);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(649, 65);
this->label1->TabIndex = 4;
this->label1->Text = L"Required Basic Package Settings";
this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
//
// groupBox1
//
this->groupBox1->Controls->Add(this->label2);
this->groupBox1->Controls->Add(this->dateTimePicker1);
this->groupBox1->Dock = System::Windows::Forms::DockStyle::Top;
this->groupBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->groupBox1->Location = System::Drawing::Point(10, 376);
this->groupBox1->Name = L"groupBox1";
this->groupBox1->Padding = System::Windows::Forms::Padding(10);
this->groupBox1->Size = System::Drawing::Size(649, 96);
this->groupBox1->TabIndex = 3;
this->groupBox1->TabStop = false;
this->groupBox1->Text = L"Creation Date";
//
// label2
//
this->label2->Dock = System::Windows::Forms::DockStyle::Fill;
this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label2->Location = System::Drawing::Point(10, 23);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(629, 43);
this->label2->TabIndex = 0;
this->label2->Text = L"The creation date is the date the package was created, or updated, this is mainly"
L" just to allow other users to know how old the package might be, or when it was "
L"last updated";
//
// dateTimePicker1
//
this->dateTimePicker1->CalendarFont = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Regular,
System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
this->dateTimePicker1->Dock = System::Windows::Forms::DockStyle::Bottom;
this->dateTimePicker1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->dateTimePicker1->Location = System::Drawing::Point(10, 66);
this->dateTimePicker1->Name = L"dateTimePicker1";
this->dateTimePicker1->Size = System::Drawing::Size(629, 20);
this->dateTimePicker1->TabIndex = 0;
this->dateTimePicker1->ValueChanged += gcnew System::EventHandler(this, &WizardBasic1::dateTimePicker1_ValueChanged);
//
// groupBox2
//
this->groupBox2->Controls->Add(this->label3);
this->groupBox2->Controls->Add(this->textBox2);
this->groupBox2->Dock = System::Windows::Forms::DockStyle::Top;
this->groupBox2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->groupBox2->Location = System::Drawing::Point(10, 280);
this->groupBox2->Name = L"groupBox2";
this->groupBox2->Padding = System::Windows::Forms::Padding(10);
this->groupBox2->Size = System::Drawing::Size(649, 96);
this->groupBox2->TabIndex = 2;
this->groupBox2->TabStop = false;
this->groupBox2->Text = L"Package Version";
//
// label3
//
this->label3->Dock = System::Windows::Forms::DockStyle::Fill;
this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label3->Location = System::Drawing::Point(10, 23);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(629, 43);
this->label3->TabIndex = 0;
this->label3->Text = L"The version number is used to display what version the current package is, and fo"
L"r the installer to determine if its a new or older version than whats previously"
L" installed";
//
// textBox2
//
this->textBox2->Dock = System::Windows::Forms::DockStyle::Bottom;
this->textBox2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->textBox2->Location = System::Drawing::Point(10, 66);
this->textBox2->Name = L"textBox2";
this->textBox2->Size = System::Drawing::Size(629, 20);
this->textBox2->TabIndex = 0;
this->textBox2->Text = L"1.00";
this->textBox2->TextChanged += gcnew System::EventHandler(this, &WizardBasic1::textBox2_TextChanged);
this->textBox2->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &WizardBasic1::textBox2_KeyPress);
//
// groupBox3
//
this->groupBox3->Controls->Add(this->label4);
this->groupBox3->Controls->Add(this->textBox3);
this->groupBox3->Dock = System::Windows::Forms::DockStyle::Top;
this->groupBox3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->groupBox3->Location = System::Drawing::Point(10, 184);
this->groupBox3->Name = L"groupBox3";
this->groupBox3->Padding = System::Windows::Forms::Padding(10);
this->groupBox3->Size = System::Drawing::Size(649, 96);
this->groupBox3->TabIndex = 1;
this->groupBox3->TabStop = false;
this->groupBox3->Text = L"Package Author";
//
// label4
//
this->label4->Dock = System::Windows::Forms::DockStyle::Fill;
this->label4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label4->Location = System::Drawing::Point(10, 23);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(629, 43);
this->label4->TabIndex = 0;
this->label4->Text = resources->GetString(L"label4.Text");
//
// textBox3
//
this->textBox3->AcceptsReturn = true;
this->textBox3->Dock = System::Windows::Forms::DockStyle::Bottom;
this->textBox3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->textBox3->Location = System::Drawing::Point(10, 66);
this->textBox3->Name = L"textBox3";
this->textBox3->Size = System::Drawing::Size(629, 20);
this->textBox3->TabIndex = 0;
this->textBox3->TextChanged += gcnew System::EventHandler(this, &WizardBasic1::textBox3_TextChanged);
this->textBox3->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &WizardBasic1::textBox3_KeyPress);
//
// groupBox4
//
this->groupBox4->Controls->Add(this->label5);
this->groupBox4->Controls->Add(this->textBox4);
this->groupBox4->Dock = System::Windows::Forms::DockStyle::Top;
this->groupBox4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->groupBox4->Location = System::Drawing::Point(10, 75);
this->groupBox4->Name = L"groupBox4";
this->groupBox4->Padding = System::Windows::Forms::Padding(10);
this->groupBox4->Size = System::Drawing::Size(649, 109);
this->groupBox4->TabIndex = 0;
this->groupBox4->TabStop = false;
this->groupBox4->Text = L"Package Name";
//
// label5
//
this->label5->Dock = System::Windows::Forms::DockStyle::Fill;
this->label5->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label5->Location = System::Drawing::Point(10, 23);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(629, 56);
this->label5->TabIndex = 0;
this->label5->Text = resources->GetString(L"label5.Text");
//
// textBox4
//
this->textBox4->Dock = System::Windows::Forms::DockStyle::Bottom;
this->textBox4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->textBox4->Location = System::Drawing::Point(10, 79);
this->textBox4->Name = L"textBox4";
this->textBox4->Size = System::Drawing::Size(629, 20);
this->textBox4->TabIndex = 0;
this->textBox4->TextChanged += gcnew System::EventHandler(this, &WizardBasic1::textBox4_TextChanged);
this->textBox4->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &WizardBasic1::textBox4_KeyPress);
//
// WizardBasic1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->Controls->Add(this->groupBox1);
this->Controls->Add(this->groupBox2);
this->Controls->Add(this->groupBox3);
this->Controls->Add(this->groupBox4);
this->Controls->Add(this->label1);
this->Name = L"WizardBasic1";
this->Padding = System::Windows::Forms::Padding(10);
this->Size = System::Drawing::Size(669, 595);
this->Load += gcnew System::EventHandler(this, &WizardBasic1::WizardBasic1_Load);
this->groupBox1->ResumeLayout(false);
this->groupBox2->ResumeLayout(false);
this->groupBox2->PerformLayout();
this->groupBox3->ResumeLayout(false);
this->groupBox3->PerformLayout();
this->groupBox4->ResumeLayout(false);
this->groupBox4->PerformLayout();
this->ResumeLayout(false);
}
#pragma endregion
private: System::Void textBox4_TextChanged(System::Object^ sender, System::EventArgs^ e) {
m_pPackage->setName(_WS(this->textBox4->Text));
this->UpdateDone();
}
private: System::Void textBox3_TextChanged(System::Object^ sender, System::EventArgs^ e) {
m_pPackage->setAuthor(_WS(this->textBox3->Text));
this->UpdateDone();
}
private: System::Void textBox2_TextChanged(System::Object^ sender, System::EventArgs^ e) {
m_pPackage->setVersion(_WS(this->textBox2->Text));
this->UpdateDone();
}
private: System::Void dateTimePicker1_ValueChanged(System::Object^ sender, System::EventArgs^ e) {
System::DateTime ^time = DateTime(this->dateTimePicker1->Value);
m_pPackage->setCreationDate(_WS(System::Convert::ToString(time->Day) + "/" + System::Convert::ToString(time->Month) + "/" + System::Convert::ToString(time->Year)));
this->UpdateDone();
}
private: System::Void WizardBasic1_Load(System::Object^ sender, System::EventArgs^ e) {
this->textBox4->Focus();
}
private: System::Void textBox3_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e) {
if ( e->KeyChar == 13 ) {
this->textBox2->Focus();
}
}
private: System::Void textBox4_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e) {
if ( e->KeyChar == 13 ) {
this->textBox3->Focus();
}
}
private: System::Void textBox2_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e) {
if ( e->KeyChar == 13 ) {
this->dateTimePicker1->Focus();
}
}
};
}