Rev 122 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#pragma once
#include <spk.h>
namespace PluginManager {
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 DirectoryControl
/// </summary>
public ref class DirectoryControl : public System::Windows::Forms::Form
{
public:
DirectoryControl(CPackages *packages, Utils::WStringList *currentDirs, Utils::WStringList *removedDirs);
Utils::WStringList *directories();
Utils::WStringList *removeDirectories();
protected:
void AddFoundDir(const Utils::WString &dir);
void FindAllAddons(const Utils::WString &exe, bool checkBase);
void getAllDirs(Utils::WStringList *currentDirs, Utils::WStringList *removedDirs);
void UpdateGameDirs();
void UpdateFoundDirs();
void UpdateTexts();
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~DirectoryControl();
protected:
private: System::Windows::Forms::GroupBox^ groupBox1;
private: System::Windows::Forms::Panel^ panel1;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Button^ removeButton;
private: System::Windows::Forms::ImageList^ imageListGames;
private: System::ComponentModel::IContainer^ components;
private:
/// <summary>
/// Required designer variable.
/// </summary>
Utils::WStringList *_lDirs;
Utils::WStringList *_lRemoveDirs;
Utils::WStringList *_lFoundDirs;
CPackages *_packages;
private: System::Windows::Forms::GroupBox^ groupBox2;
private: System::Windows::Forms::Panel^ panel2;
private: System::Windows::Forms::ListView^ listView2;
private: System::Windows::Forms::SplitContainer^ splitContainer1;
private: System::Windows::Forms::Panel^ panel3;
private: System::Windows::Forms::Button^ buttonAccept;
private: System::Windows::Forms::Button^ ButtonAddFound;
private: System::Windows::Forms::ColumnHeader^ ColumnDir2;
private: System::Windows::Forms::ColumnHeader^ ColumnGame2;
private: System::Windows::Forms::ColumnHeader^ ColumnLang2;
private: System::Windows::Forms::ColumnHeader^ ColumnID2;
private: System::Windows::Forms::ListView^ listView1;
private: System::Windows::Forms::ColumnHeader^ ColumnDirectory;
private: System::Windows::Forms::ColumnHeader^ ColumnGame;
private: System::Windows::Forms::ColumnHeader^ ColumnStatus;
private: System::Windows::Forms::ColumnHeader^ ColumnLang;
private: System::Windows::Forms::ColumnHeader^ ColumnID;
private: System::Windows::Forms::ColumnHeader^ columnAddon2;
private: System::Windows::Forms::ColumnHeader^ columnAddon;
private: System::Windows::Forms::Button^ buttonCancel;
#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)
{
this->components = (gcnew System::ComponentModel::Container());
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(DirectoryControl::typeid));
this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
this->listView1 = (gcnew System::Windows::Forms::ListView());
this->ColumnDirectory = (gcnew System::Windows::Forms::ColumnHeader());
this->ColumnGame = (gcnew System::Windows::Forms::ColumnHeader());
this->ColumnStatus = (gcnew System::Windows::Forms::ColumnHeader());
this->ColumnLang = (gcnew System::Windows::Forms::ColumnHeader());
this->columnAddon = (gcnew System::Windows::Forms::ColumnHeader());
this->ColumnID = (gcnew System::Windows::Forms::ColumnHeader());
this->panel1 = (gcnew System::Windows::Forms::Panel());
this->removeButton = (gcnew System::Windows::Forms::Button());
this->button1 = (gcnew System::Windows::Forms::Button());
this->imageListGames = (gcnew System::Windows::Forms::ImageList(this->components));
this->groupBox2 = (gcnew System::Windows::Forms::GroupBox());
this->listView2 = (gcnew System::Windows::Forms::ListView());
this->ColumnDir2 = (gcnew System::Windows::Forms::ColumnHeader());
this->ColumnGame2 = (gcnew System::Windows::Forms::ColumnHeader());
this->ColumnLang2 = (gcnew System::Windows::Forms::ColumnHeader());
this->columnAddon2 = (gcnew System::Windows::Forms::ColumnHeader());
this->ColumnID2 = (gcnew System::Windows::Forms::ColumnHeader());
this->panel2 = (gcnew System::Windows::Forms::Panel());
this->ButtonAddFound = (gcnew System::Windows::Forms::Button());
this->splitContainer1 = (gcnew System::Windows::Forms::SplitContainer());
this->panel3 = (gcnew System::Windows::Forms::Panel());
this->buttonCancel = (gcnew System::Windows::Forms::Button());
this->buttonAccept = (gcnew System::Windows::Forms::Button());
this->groupBox1->SuspendLayout();
this->panel1->SuspendLayout();
this->groupBox2->SuspendLayout();
this->panel2->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->splitContainer1))->BeginInit();
this->splitContainer1->Panel1->SuspendLayout();
this->splitContainer1->Panel2->SuspendLayout();
this->splitContainer1->SuspendLayout();
this->panel3->SuspendLayout();
this->SuspendLayout();
//
// groupBox1
//
this->groupBox1->AutoSizeMode = System::Windows::Forms::AutoSizeMode::GrowAndShrink;
this->groupBox1->Controls->Add(this->listView1);
this->groupBox1->Controls->Add(this->panel1);
this->groupBox1->Dock = System::Windows::Forms::DockStyle::Fill;
this->groupBox1->Location = System::Drawing::Point(0, 0);
this->groupBox1->Name = L"groupBox1";
this->groupBox1->Size = System::Drawing::Size(1084, 325);
this->groupBox1->TabIndex = 1;
this->groupBox1->TabStop = false;
this->groupBox1->Text = L"Current Directories";
//
// listView1
//
this->listView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^ >(6) {
this->ColumnDirectory,
this->ColumnGame, this->ColumnStatus, this->ColumnLang, this->columnAddon, this->ColumnID
});
this->listView1->Dock = System::Windows::Forms::DockStyle::Fill;
this->listView1->FullRowSelect = true;
this->listView1->HideSelection = false;
this->listView1->Location = System::Drawing::Point(3, 18);
this->listView1->Name = L"listView1";
this->listView1->Size = System::Drawing::Size(1078, 253);
this->listView1->TabIndex = 0;
this->listView1->UseCompatibleStateImageBehavior = false;
this->listView1->View = System::Windows::Forms::View::Details;
this->listView1->SelectedIndexChanged += gcnew System::EventHandler(this, &DirectoryControl::listView1_SelectedIndexChanged);
this->listView1->DoubleClick += gcnew System::EventHandler(this, &DirectoryControl::listView1_DoubleClick);
//
// ColumnDirectory
//
this->ColumnDirectory->Text = L"Directory";
this->ColumnDirectory->Width = 211;
//
// ColumnGame
//
this->ColumnGame->Text = L"Game";
//
// ColumnStatus
//
this->ColumnStatus->Text = L"Status";
//
// ColumnLang
//
this->ColumnLang->Text = L"Language";
//
// columnAddon
//
this->columnAddon->Text = L"Addon";
//
// ColumnID
//
this->ColumnID->Text = L"";
//
// panel1
//
this->panel1->Controls->Add(this->removeButton);
this->panel1->Controls->Add(this->button1);
this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;
this->panel1->Location = System::Drawing::Point(3, 271);
this->panel1->Name = L"panel1";
this->panel1->Size = System::Drawing::Size(1078, 51);
this->panel1->TabIndex = 2;
//
// removeButton
//
this->removeButton->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"removeButton.Image")));
this->removeButton->Location = System::Drawing::Point(201, 0);
this->removeButton->Name = L"removeButton";
this->removeButton->Size = System::Drawing::Size(194, 48);
this->removeButton->TabIndex = 1;
this->removeButton->Text = L"Remove Selected";
this->removeButton->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
this->removeButton->UseVisualStyleBackColor = true;
this->removeButton->Click += gcnew System::EventHandler(this, &DirectoryControl::removeButton_Click);
//
// button1
//
this->button1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"button1.Image")));
this->button1->Location = System::Drawing::Point(0, 0);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(195, 50);
this->button1->TabIndex = 0;
this->button1->Text = L"Add New Directory";
this->button1->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &DirectoryControl::button1_Click);
//
// imageListGames
//
this->imageListGames->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^>(resources->GetObject(L"imageListGames.ImageStream")));
this->imageListGames->TransparentColor = System::Drawing::Color::Transparent;
this->imageListGames->Images->SetKeyName(0, L"X2");
this->imageListGames->Images->SetKeyName(1, L"X3");
this->imageListGames->Images->SetKeyName(2, L"X3TC");
this->imageListGames->Images->SetKeyName(3, L"X3AP");
this->imageListGames->Images->SetKeyName(4, L"X3FL");
//
// groupBox2
//
this->groupBox2->AutoSizeMode = System::Windows::Forms::AutoSizeMode::GrowAndShrink;
this->groupBox2->Controls->Add(this->listView2);
this->groupBox2->Controls->Add(this->panel2);
this->groupBox2->Dock = System::Windows::Forms::DockStyle::Fill;
this->groupBox2->Location = System::Drawing::Point(0, 0);
this->groupBox2->Name = L"groupBox2";
this->groupBox2->Size = System::Drawing::Size(1084, 321);
this->groupBox2->TabIndex = 2;
this->groupBox2->TabStop = false;
this->groupBox2->Text = L"Available Directories";
//
// listView2
//
this->listView2->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^ >(5) {
this->ColumnDir2, this->ColumnGame2,
this->ColumnLang2, this->columnAddon2, this->ColumnID2
});
this->listView2->Dock = System::Windows::Forms::DockStyle::Fill;
this->listView2->FullRowSelect = true;
this->listView2->HideSelection = false;
this->listView2->Location = System::Drawing::Point(3, 18);
this->listView2->Name = L"listView2";
this->listView2->Size = System::Drawing::Size(1078, 251);
this->listView2->TabIndex = 0;
this->listView2->UseCompatibleStateImageBehavior = false;
this->listView2->View = System::Windows::Forms::View::Details;
this->listView2->SelectedIndexChanged += gcnew System::EventHandler(this, &DirectoryControl::listView2_SelectedIndexChanged);
this->listView2->DoubleClick += gcnew System::EventHandler(this, &DirectoryControl::listView2_DoubleClick);
//
// ColumnDir2
//
this->ColumnDir2->Text = L"Directory";
//
// ColumnGame2
//
this->ColumnGame2->Text = L"Game";
//
// ColumnLang2
//
this->ColumnLang2->Text = L"Language";
//
// columnAddon2
//
this->columnAddon2->Text = L"Addon";
//
// ColumnID2
//
this->ColumnID2->Text = L"";
//
// panel2
//
this->panel2->Controls->Add(this->ButtonAddFound);
this->panel2->Dock = System::Windows::Forms::DockStyle::Bottom;
this->panel2->Location = System::Drawing::Point(3, 269);
this->panel2->Name = L"panel2";
this->panel2->Size = System::Drawing::Size(1078, 49);
this->panel2->TabIndex = 1;
//
// ButtonAddFound
//
this->ButtonAddFound->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ButtonAddFound.Image")));
this->ButtonAddFound->Location = System::Drawing::Point(0, 3);
this->ButtonAddFound->Name = L"ButtonAddFound";
this->ButtonAddFound->Size = System::Drawing::Size(260, 46);
this->ButtonAddFound->TabIndex = 0;
this->ButtonAddFound->Text = L"Add Selected Directory";
this->ButtonAddFound->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
this->ButtonAddFound->UseVisualStyleBackColor = true;
this->ButtonAddFound->Click += gcnew System::EventHandler(this, &DirectoryControl::ButtonAddFound_Click);
//
// splitContainer1
//
this->splitContainer1->Dock = System::Windows::Forms::DockStyle::Fill;
this->splitContainer1->Location = System::Drawing::Point(0, 0);
this->splitContainer1->Name = L"splitContainer1";
this->splitContainer1->Orientation = System::Windows::Forms::Orientation::Horizontal;
//
// splitContainer1.Panel1
//
this->splitContainer1->Panel1->Controls->Add(this->groupBox1);
//
// splitContainer1.Panel2
//
this->splitContainer1->Panel2->Controls->Add(this->groupBox2);
this->splitContainer1->Size = System::Drawing::Size(1084, 650);
this->splitContainer1->SplitterDistance = 325;
this->splitContainer1->TabIndex = 4;
//
// panel3
//
this->panel3->Controls->Add(this->buttonCancel);
this->panel3->Controls->Add(this->buttonAccept);
this->panel3->Dock = System::Windows::Forms::DockStyle::Bottom;
this->panel3->Location = System::Drawing::Point(0, 650);
this->panel3->Name = L"panel3";
this->panel3->Size = System::Drawing::Size(1084, 41);
this->panel3->TabIndex = 5;
//
// buttonCancel
//
this->buttonCancel->DialogResult = System::Windows::Forms::DialogResult::Cancel;
this->buttonCancel->Dock = System::Windows::Forms::DockStyle::Right;
this->buttonCancel->Location = System::Drawing::Point(934, 0);
this->buttonCancel->Name = L"buttonCancel";
this->buttonCancel->Size = System::Drawing::Size(75, 41);
this->buttonCancel->TabIndex = 1;
this->buttonCancel->Text = L"Cancel";
this->buttonCancel->UseVisualStyleBackColor = true;
//
// buttonAccept
//
this->buttonAccept->DialogResult = System::Windows::Forms::DialogResult::OK;
this->buttonAccept->Dock = System::Windows::Forms::DockStyle::Right;
this->buttonAccept->Location = System::Drawing::Point(1009, 0);
this->buttonAccept->Name = L"buttonAccept";
this->buttonAccept->Size = System::Drawing::Size(75, 41);
this->buttonAccept->TabIndex = 0;
this->buttonAccept->Text = L"Accept";
this->buttonAccept->UseVisualStyleBackColor = true;
//
// DirectoryControl
//
this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(1084, 691);
this->Controls->Add(this->splitContainer1);
this->Controls->Add(this->panel3);
this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));
this->Name = L"DirectoryControl";
this->Text = L"Directory Control";
this->groupBox1->ResumeLayout(false);
this->panel1->ResumeLayout(false);
this->groupBox2->ResumeLayout(false);
this->panel2->ResumeLayout(false);
this->splitContainer1->Panel1->ResumeLayout(false);
this->splitContainer1->Panel2->ResumeLayout(false);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->splitContainer1))->EndInit();
this->splitContainer1->ResumeLayout(false);
this->panel3->ResumeLayout(false);
this->ResumeLayout(false);
}
#pragma endregion
private: System::Void listView1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e);
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e);
private: System::Void removeButton_Click(System::Object^ sender, System::EventArgs^ e);
private: System::Void listView2_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e);
private: System::Void ButtonAddFound_Click(System::Object^ sender, System::EventArgs^ e);
private: System::Void listView1_DoubleClick(System::Object^ sender, System::EventArgs^ e);
private: System::Void listView2_DoubleClick(System::Object^ sender, System::EventArgs^ e);
};
}