Rev 182 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#pragma once
#include <spk.h>
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 CompareList
///
/// 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 CompareList : public System::Windows::Forms::Form
{
public:
CompareList(String ^title)
{
InitializeComponent();
this->Text = title;
}
void SetHeadings(String ^h1, String ^h2)
{
this->columnHeader1->Text = h1;
this->columnHeader2->Text = h2;
}
void AddStringList(Utils::WStringList &list)
{
for(auto itr = list.begin(); itr != list.end(); itr++)
AddItem(_US((*itr)->str), _US((*itr)->data));
}
void AddItem(String ^item1, String ^item2)
{
ListViewItem ^i = gcnew ListViewItem(item1);
i->SubItems->Add(item2);
this->listView1->Items->Add(i);
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~CompareList()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::ListView^ listView1;
private: System::Windows::Forms::ColumnHeader^ columnHeader1;
private: System::Windows::Forms::ColumnHeader^ columnHeader2;
protected:
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)
{
this->listView1 = (gcnew System::Windows::Forms::ListView());
this->columnHeader1 = (gcnew System::Windows::Forms::ColumnHeader());
this->columnHeader2 = (gcnew System::Windows::Forms::ColumnHeader());
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->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->listView1->FullRowSelect = true;
this->listView1->Location = System::Drawing::Point(0, 0);
this->listView1->Name = L"listView1";
this->listView1->Size = System::Drawing::Size(645, 243);
this->listView1->TabIndex = 0;
this->listView1->UseCompatibleStateImageBehavior = false;
this->listView1->View = System::Windows::Forms::View::Details;
//
// columnHeader1
//
this->columnHeader1->Text = L"File 1";
//
// columnHeader2
//
this->columnHeader2->Text = L"File 2";
//
// CompareList
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(645, 243);
this->Controls->Add(this->listView1);
this->MinimizeBox = false;
this->Name = L"CompareList";
this->ShowIcon = false;
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"CompareList";
this->TopMost = true;
this->Load += gcnew System::EventHandler(this, &CompareList::CompareList_Load);
this->ResumeLayout(false);
}
#pragma endregion
private: System::Void CompareList_Load(System::Object^ sender, System::EventArgs^ e) {
this->listView1->AutoResizeColumns(ColumnHeaderAutoResizeStyle::HeaderSize);
}
};
}