Line 201... |
Line 201... |
201 |
// gui updates
|
201 |
// gui updates
|
202 |
void UpdateDirList();
|
202 |
void UpdateDirList();
|
203 |
void UpdatePackages();
|
203 |
void UpdatePackages();
|
204 |
void UpdateControls();
|
204 |
void UpdateControls();
|
205 |
bool UpdateBuiltInPackages();
|
205 |
bool UpdateBuiltInPackages();
|
- |
|
206 |
void AddIconToPackages(String ^icon);
|
206 |
|
207 |
|
207 |
// auto update
|
208 |
// auto update
|
208 |
void AutoUpdate();
|
209 |
void AutoUpdate();
|
209 |
System::String ^GetDownloadFile() { return m_sDownload; }
|
210 |
System::String ^GetDownloadFile() { return m_sDownload; }
|
210 |
|
211 |
|
Line 525... |
Line 526... |
525 |
this->ListPackages->UseCompatibleStateImageBehavior = false;
|
526 |
this->ListPackages->UseCompatibleStateImageBehavior = false;
|
526 |
this->ListPackages->View = System::Windows::Forms::View::Details;
|
527 |
this->ListPackages->View = System::Windows::Forms::View::Details;
|
527 |
this->ListPackages->MouseDoubleClick += gcnew System::Windows::Forms::MouseEventHandler(this, &MainGui::ListPackages_MouseDoubleClick);
|
528 |
this->ListPackages->MouseDoubleClick += gcnew System::Windows::Forms::MouseEventHandler(this, &MainGui::ListPackages_MouseDoubleClick);
|
528 |
this->ListPackages->DragDrop += gcnew System::Windows::Forms::DragEventHandler(this, &MainGui::ListPackages_DragDrop);
|
529 |
this->ListPackages->DragDrop += gcnew System::Windows::Forms::DragEventHandler(this, &MainGui::ListPackages_DragDrop);
|
529 |
this->ListPackages->DragOver += gcnew System::Windows::Forms::DragEventHandler(this, &MainGui::ListPackages_DragOver);
|
530 |
this->ListPackages->DragOver += gcnew System::Windows::Forms::DragEventHandler(this, &MainGui::ListPackages_DragOver);
|
- |
|
531 |
this->ListPackages->DrawSubItem += gcnew System::Windows::Forms::DrawListViewSubItemEventHandler(this, &MainGui::ListPackages_DrawSubItem);
|
530 |
//
|
532 |
//
|
531 |
// columnHeader1
|
533 |
// columnHeader1
|
532 |
//
|
534 |
//
|
533 |
this->columnHeader1->Text = L"Package";
|
535 |
this->columnHeader1->Text = L"Package";
|
534 |
//
|
536 |
//
|
Line 562... |
Line 564... |
562 |
this->contextMenuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(15) {this->ContextName,
|
564 |
this->contextMenuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(15) {this->ContextName,
|
563 |
this->toolStripSeparator3, this->uninstallToolStripMenuItem, this->UninstallSelectedContext, this->ContextEnable, this->ContextDisable,
|
565 |
this->toolStripSeparator3, this->uninstallToolStripMenuItem, this->UninstallSelectedContext, this->ContextEnable, this->ContextDisable,
|
564 |
this->ContextSeperator, this->viewReadmeToolStripMenuItem, this->extrasToolStripMenuItem, this->ContextSeperator2, this->emailAuthorToolStripMenuItem,
|
566 |
this->ContextSeperator, this->viewReadmeToolStripMenuItem, this->extrasToolStripMenuItem, this->ContextSeperator2, this->emailAuthorToolStripMenuItem,
|
565 |
this->visitForumPageToolStripMenuItem, this->visitWebSiteToolStripMenuItem, this->toolStripSeparator2, this->checkForUpdatesToolStripMenuItem});
|
567 |
this->visitForumPageToolStripMenuItem, this->visitWebSiteToolStripMenuItem, this->toolStripSeparator2, this->checkForUpdatesToolStripMenuItem});
|
566 |
this->contextMenuStrip1->Name = L"contextMenuStrip1";
|
568 |
this->contextMenuStrip1->Name = L"contextMenuStrip1";
|
567 |
this->contextMenuStrip1->Size = System::Drawing::Size(216, 600);
|
569 |
this->contextMenuStrip1->Size = System::Drawing::Size(216, 578);
|
568 |
this->contextMenuStrip1->Opening += gcnew System::ComponentModel::CancelEventHandler(this, &MainGui::contextMenuStrip1_Opening);
|
570 |
this->contextMenuStrip1->Opening += gcnew System::ComponentModel::CancelEventHandler(this, &MainGui::contextMenuStrip1_Opening);
|
569 |
//
|
571 |
//
|
570 |
// ContextName
|
572 |
// ContextName
|
571 |
//
|
573 |
//
|
572 |
this->ContextName->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"ContextName.Image")));
|
574 |
this->ContextName->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"ContextName.Image")));
|
Line 860... |
Line 862... |
860 |
this->imageList1->Images->SetKeyName(0, L"ship.png");
|
862 |
this->imageList1->Images->SetKeyName(0, L"ship.png");
|
861 |
this->imageList1->Images->SetKeyName(1, L"package.png");
|
863 |
this->imageList1->Images->SetKeyName(1, L"package.png");
|
862 |
this->imageList1->Images->SetKeyName(2, L"fake.png");
|
864 |
this->imageList1->Images->SetKeyName(2, L"fake.png");
|
863 |
this->imageList1->Images->SetKeyName(3, L"library.png");
|
865 |
this->imageList1->Images->SetKeyName(3, L"library.png");
|
864 |
this->imageList1->Images->SetKeyName(4, L"archive.png");
|
866 |
this->imageList1->Images->SetKeyName(4, L"archive.png");
|
- |
|
867 |
this->imageList1->Images->SetKeyName(5, L"tick.png");
|
- |
|
868 |
this->imageList1->Images->SetKeyName(6, L"no.png");
|
865 |
//
|
869 |
//
|
866 |
// imageList2
|
870 |
// imageList2
|
867 |
//
|
871 |
//
|
868 |
this->imageList2->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^ >(resources->GetObject(L"imageList2.ImageStream")));
|
872 |
this->imageList2->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^ >(resources->GetObject(L"imageList2.ImageStream")));
|
869 |
this->imageList2->TransparentColor = System::Drawing::Color::Transparent;
|
873 |
this->imageList2->TransparentColor = System::Drawing::Color::Transparent;
|
Line 1058... |
Line 1062... |
1058 |
}
|
1062 |
}
|
1059 |
|
1063 |
|
1060 |
if ( !errored )
|
1064 |
if ( !errored )
|
1061 |
this->StartInstallingArchive(false, true);
|
1065 |
this->StartInstallingArchive(false, true);
|
1062 |
}
|
1066 |
}
|
- |
|
1067 |
}
|
- |
|
1068 |
private: System::Void ListPackages_DrawSubItem(System::Object^ sender, System::Windows::Forms::DrawListViewSubItemEventArgs^ e) {
|
- |
|
1069 |
if ( System::String::Compare(e->SubItem->Text, "Yes") == 0 ) {
|
- |
|
1070 |
e->DrawDefault = false;
|
- |
|
1071 |
e->DrawBackground();
|
- |
|
1072 |
|
- |
|
1073 |
Image ^img = this->imageList1->Images[this->imageList1->Images->IndexOfKey("tick.png")];
|
- |
|
1074 |
e->Graphics->DrawImage(img, e->SubItem->Bounds.Location);
|
- |
|
1075 |
e->Graphics->DrawString(e->SubItem->Text, e->SubItem->Font, gcnew SolidBrush(e->SubItem->ForeColor), (float)(e->SubItem->Bounds.Location.X + img->Width), (float)e->SubItem->Bounds.Location.Y);
|
- |
|
1076 |
}
|
- |
|
1077 |
else
|
- |
|
1078 |
e->DrawDefault = true;
|
1063 |
}
|
1079 |
}
|
1064 |
};
|
1080 |
};
|
1065 |
}
|
1081 |
}
|