Rev 182 | 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;
namespace PluginManager {
/// <summary>
/// Summary for FakePatchAssign
///
/// 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 FakePatchAssign : public System::Windows::Forms::Form
{
public:
FakePatchAssign(CPackages *p)
{
InitializeComponent();
m_pPackages = p;
UpdateDisplay();
}
void UpdateDisplay()
{
int patch = m_pPackages->findNextFakePatch();
for ( int i = 1; i < patch; i++ )
{
ListViewItem ^item = gcnew ListViewItem(_US(Utils::WString::PadNumber(i, 2) + ".cat"));
this->listView1->Items->Add(item);
// find the package that has the file
C_File *f = m_pPackages->findFile(FILETYPE_MOD, Utils::WString::PadNumber(i, 2) + ".cat");
if ( f )
{
item->ImageIndex = 1;
CBaseFile *p = m_pPackages->findFirstPackageWithFile(f);
if ( p )
item->SubItems->Add(_US(p->getFullPackageName(m_pPackages->GetLanguage())));
else
item->SubItems->Add("[Unknown]");
}
else
{
item->ImageIndex = 0;
item->SubItems->Add("[Not Controlled]");
}
}
this->listView1->AutoResizeColumns(Windows::Forms::ColumnHeaderAutoResizeStyle::HeaderSize);
}
private: System::Windows::Forms::ListView^ listView1;
public:
private: System::Windows::Forms::ColumnHeader^ columnHeader1;
private: System::Windows::Forms::ColumnHeader^ columnHeader2;
private: System::Windows::Forms::ImageList^ imageList1;
protected:
CPackages *m_pPackages;
/// <summary>
/// Clean up any resources being used.
/// </summary>
~FakePatchAssign()
{
if (components)
{
delete components;
}
}
private: System::ComponentModel::IContainer^ components;
protected:
private:
/// <summary>
/// Required designer variable.
/// </summary>
#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(FakePatchAssign::typeid));
this->listView1 = (gcnew System::Windows::Forms::ListView());
this->columnHeader1 = (gcnew System::Windows::Forms::ColumnHeader());
this->columnHeader2 = (gcnew System::Windows::Forms::ColumnHeader());
this->imageList1 = (gcnew System::Windows::Forms::ImageList(this->components));
this->SuspendLayout();
//
// listView1
//
this->listView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^ >(2) {this->columnHeader1, this->columnHeader2});
this->listView1->Dock = System::Windows::Forms::DockStyle::Fill;
this->listView1->FullRowSelect = true;
this->listView1->LargeImageList = this->imageList1;
this->listView1->Location = System::Drawing::Point(0, 0);
this->listView1->Name = L"listView1";
this->listView1->Size = System::Drawing::Size(376, 379);
this->listView1->SmallImageList = this->imageList1;
this->listView1->TabIndex = 0;
this->listView1->UseCompatibleStateImageBehavior = false;
this->listView1->View = System::Windows::Forms::View::Details;
//
// columnHeader1
//
this->columnHeader1->Text = L"Patch";
//
// columnHeader2
//
this->columnHeader2->Text = L"Package";
//
// imageList1
//
this->imageList1->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^ >(resources->GetObject(L"imageList1.ImageStream")));
this->imageList1->TransparentColor = System::Drawing::Color::Transparent;
this->imageList1->Images->SetKeyName(0, L"X3.ico");
this->imageList1->Images->SetKeyName(1, L"X3TC.ico");
//
// FakePatchAssign
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(376, 379);
this->Controls->Add(this->listView1);
this->MinimizeBox = false;
this->Name = L"FakePatchAssign";
this->ShowIcon = false;
this->ShowInTaskbar = false;
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"Fake Patch Assignment";
this->TopMost = true;
this->ResumeLayout(false);
}
#pragma endregion
};
}