| 1 | cycrow | 1 | #pragma once
 | 
        
           |  |  | 2 |   | 
        
           |  |  | 3 | using namespace System;
 | 
        
           |  |  | 4 | using namespace System::ComponentModel;
 | 
        
           |  |  | 5 | using namespace System::Collections;
 | 
        
           |  |  | 6 | using namespace System::Windows::Forms;
 | 
        
           |  |  | 7 | using namespace System::Data;
 | 
        
           |  |  | 8 | using namespace System::Drawing;
 | 
        
           |  |  | 9 |   | 
        
           |  |  | 10 | #include "../../common/listviewsorter.h"
 | 
        
           |  |  | 11 |   | 
        
           |  |  | 12 | namespace SpkExplorer {
 | 
        
           |  |  | 13 |   | 
        
           |  |  | 14 | 	/// <summary>
 | 
        
           |  |  | 15 | 	/// Summary for SpkForm
 | 
        
           |  |  | 16 | 	///
 | 
        
           |  |  | 17 | 	/// WARNING: If you change the name of this class, you will need to change the
 | 
        
           |  |  | 18 | 	///          'Resource File Name' property for the managed resource compiler tool
 | 
        
           |  |  | 19 | 	///          associated with all .resx files this class depends on.  Otherwise,
 | 
        
           |  |  | 20 | 	///          the designers will not be able to interact properly with localized
 | 
        
           |  |  | 21 | 	///          resources associated with this form.
 | 
        
           |  |  | 22 | 	/// </summary>
 | 
        
           |  |  | 23 | 	public ref class SpkForm : public System::Windows::Forms::Form
 | 
        
           |  |  | 24 | 	{
 | 
        
           |  |  | 25 | 	public:
 | 
        
           | 129 | cycrow | 26 | 		SpkForm(System::Windows::Forms::Form ^parent, System::Windows::Forms::TabControl ^ctrl, System::Windows::Forms::TabPage ^page, CPackages *packages);
 | 
        
           | 1 | cycrow | 27 |   | 
        
           |  |  | 28 | 		bool ReadSelectedMultiPackage();
 | 
        
           |  |  | 29 | 		bool ReadMultiPackage();
 | 
        
           | 128 | cycrow | 30 | 		bool IsMultiPackage();
 | 
        
           |  |  | 31 | 		void SetToolButton(ToolStripMenuItem ^menu);
 | 
        
           | 1 | cycrow | 32 | 		bool IsSelected();
 | 
        
           |  |  | 33 | 		bool IsPackageSelected();
 | 
        
           |  |  | 34 |   | 
        
           | 128 | cycrow | 35 | 		void UpdateView(bool onlyPackage);
 | 
        
           | 1 | cycrow | 36 |   | 
        
           |  |  | 37 | 		System::Windows::Forms::TabControl ^TabControl() { return m_pTabCtrl; }
 | 
        
           |  |  | 38 | 		System::Windows::Forms::TabPage ^TabPage() { return m_pTabPage; }
 | 
        
           |  |  | 39 | 		ToolStripMenuItem ^MenuItem() { return m_pMenuItem; }
 | 
        
           |  |  | 40 |   | 
        
           |  |  | 41 | 		bool CheckFilename(System::String ^filename);
 | 
        
           |  |  | 42 | 		void SetMultiPackage(CMultiSpkFile *p, System::String ^filename);
 | 
        
           |  |  | 43 | 		void SetPackage(CBaseFile *p, System::String ^filename);
 | 
        
           |  |  | 44 | 		void AddFile(C_File *file);
 | 
        
           |  |  | 45 | 		void AddMultiFile(SMultiSpkFile *file);
 | 
        
           |  |  | 46 | 		System::String ^GetExtractDir(bool package);
 | 
        
           |  |  | 47 |   | 
        
           |  |  | 48 | 		CBaseFile *GetPackage() { return m_pPackage; }
 | 
        
           |  |  | 49 | 		CMultiSpkFile *GetMultiPackage() { return m_pMultiPackage; }
 | 
        
           |  |  | 50 |   | 
        
           |  |  | 51 | 		void ChangeView(System::Windows::Forms::View view)
 | 
        
           |  |  | 52 | 		{
 | 
        
           |  |  | 53 | 			this->listView1->View = view;
 | 
        
           |  |  | 54 | 		}
 | 
        
           |  |  | 55 |   | 
        
           |  |  | 56 | 		void	DroppedFile(C_File *file);
 | 
        
           |  |  | 57 | 		void	DraggedFile(C_File *file);
 | 
        
           |  |  | 58 |   | 
        
           |  |  | 59 | 		void WritePackage();
 | 
        
           |  |  | 60 | 		bool ReadPackageFiles(bool all);
 | 
        
           |  |  | 61 |   | 
        
           |  |  | 62 | 		void PasteFiles(CLinkList<C_File> *list);
 | 
        
           |  |  | 63 | 		void RestoreCut(CLinkList<C_File> *file);
 | 
        
           |  |  | 64 | 		void RemoveItem(ListViewItem ^item);
 | 
        
           |  |  | 65 | 		void RemoveSelected();
 | 
        
           |  |  | 66 | 		void RemoveSelectedPackage();
 | 
        
           |  |  | 67 | 		void ExtractSelected(System::String ^toDir);
 | 
        
           |  |  | 68 | 		void ExtractSelectedPackage(System::String ^toDir);
 | 
        
           |  |  | 69 | 		void ExtractAll(System::String ^toDir);
 | 
        
           |  |  | 70 | 		void ExtractAllPackage(System::String ^toDir);
 | 
        
           |  |  | 71 | 	private: System::Windows::Forms::ContextMenuStrip^  contextMenuStrip1;
 | 
        
           |  |  | 72 | 	private: System::Windows::Forms::ToolStripMenuItem^  extractToolStripMenuItem;
 | 
        
           |  |  | 73 | 	private: System::Windows::Forms::ToolStripMenuItem^  ContextName;
 | 
        
           |  |  | 74 | 	private: System::Windows::Forms::ToolStripSeparator^  toolStripSeparator1;
 | 
        
           |  |  | 75 | private: System::Windows::Forms::ImageList^  imageList1;
 | 
        
           |  |  | 76 |   | 
        
           |  |  | 77 |   | 
        
           |  |  | 78 | 	private: System::Windows::Forms::ToolStripMenuItem^  deleteToolStripMenuItem;
 | 
        
           |  |  | 79 | 	private: System::Windows::Forms::ToolStripSeparator^  toolStripSeparator2;
 | 
        
           |  |  | 80 | 	private: System::Windows::Forms::ToolStripMenuItem^  ToolCopy;
 | 
        
           |  |  | 81 | 	private: System::Windows::Forms::ToolStripMenuItem^  ToolPaste;
 | 
        
           |  |  | 82 | 	private: System::Windows::Forms::ToolStripMenuItem^  ToolCut;
 | 
        
           |  |  | 83 | private: System::Windows::Forms::SplitContainer^  splitContainer1;
 | 
        
           |  |  | 84 | private: System::Windows::Forms::ListView^  listView2;
 | 
        
           |  |  | 85 | private: System::Windows::Forms::ColumnHeader^  columnHeader5;
 | 
        
           |  |  | 86 | private: System::Windows::Forms::ColumnHeader^  columnHeader6;
 | 
        
           |  |  | 87 | private: System::Windows::Forms::ColumnHeader^  columnHeader7;
 | 
        
           |  |  | 88 | private: System::Windows::Forms::ColumnHeader^  columnHeader8;
 | 
        
           |  |  | 89 |   | 
        
           |  |  | 90 |   | 
        
           |  |  | 91 | 	public: 
 | 
        
           |  |  | 92 |   | 
        
           |  |  | 93 |   | 
        
           |  |  | 94 | 	protected:
 | 
        
           |  |  | 95 | 		System::String ^m_sFilename;
 | 
        
           |  |  | 96 |   | 
        
           |  |  | 97 | 		/// <summary>
 | 
        
           |  |  | 98 | 		/// Clean up any resources being used.
 | 
        
           |  |  | 99 | 		/// </summary>
 | 
        
           | 128 | cycrow | 100 | 		~SpkForm();
 | 
        
           |  |  | 101 |   | 
        
           | 1 | cycrow | 102 | 	private: System::Windows::Forms::ColumnHeader^  columnHeader1;
 | 
        
           |  |  | 103 | 	private: System::Windows::Forms::ColumnHeader^  columnHeader2;
 | 
        
           |  |  | 104 | 	private: System::Windows::Forms::ColumnHeader^  columnHeader3;
 | 
        
           |  |  | 105 | 	private: System::Windows::Forms::ColumnHeader^  columnHeader4;
 | 
        
           |  |  | 106 | 	private: System::Windows::Forms::ListView^  listView1;
 | 
        
           |  |  | 107 |   | 
        
           |  |  | 108 | 	private:
 | 
        
           |  |  | 109 | 		void	AddImage(System::String ^filename, ImageList ^list, System::String ^key);
 | 
        
           |  |  | 110 | 		void	SelectedCheck();
 | 
        
           |  |  | 111 | 		void	DoExtract(CLinkList<C_File> *list, System::String ^toDir, int game);
 | 
        
           |  |  | 112 | 		void	DoPackageExtract(CLinkList<SMultiSpkFile> *list, System::String ^toDir);
 | 
        
           |  |  | 113 | 		void	CopyFile();
 | 
        
           |  |  | 114 | 		void	CutFile();
 | 
        
           |  |  | 115 | 		void	PasteFile();
 | 
        
           | 180 | cycrow | 116 | 		void	DropGetDirectories(String ^dir, Utils::CStringList *list, bool packages);
 | 
        
           | 1 | cycrow | 117 | 		void	RunFile(ListViewItem ^item);
 | 
        
           |  |  | 118 |   | 
        
           |  |  | 119 | 		ListViewItem ^FindSelectedItem();
 | 
        
           |  |  | 120 | 		C_File *GetFileFromItem(ListViewItem ^item);
 | 
        
           |  |  | 121 |   | 
        
           |  |  | 122 | 		System::Void OpenContextMenu(System::Object ^Sender, CancelEventArgs ^E);
 | 
        
           |  |  | 123 | 		System::Void DragEnterEvent(System::Object ^Sender, DragEventArgs ^E);
 | 
        
           |  |  | 124 | 		System::Void ItemDragEvent(System::Object ^Sender, ItemDragEventArgs ^E);
 | 
        
           |  |  | 125 |   | 
        
           |  |  | 126 | 		bool								 m_bSortingAsc;
 | 
        
           |  |  | 127 | 		int									 m_iSortingCol;
 | 
        
           |  |  | 128 | 		bool								 m_bSortingAsc2;
 | 
        
           |  |  | 129 | 		int									 m_iSortingCol2;
 | 
        
           |  |  | 130 | 		bool								 m_bLoading;
 | 
        
           |  |  | 131 | 		SMultiSpkFile						*m_pSelectedPackage;
 | 
        
           |  |  | 132 | 		CBaseFile							*m_pPackage;
 | 
        
           |  |  | 133 | 		CMultiSpkFile						*m_pMultiPackage;
 | 
        
           |  |  | 134 | 		System::Windows::Forms::TabControl	^m_pTabCtrl;
 | 
        
           |  |  | 135 | 		System::Windows::Forms::TabPage		^m_pTabPage;
 | 
        
           |  |  | 136 | 		ListViewItem						^m_pListItem;
 | 
        
           |  |  | 137 | 		ToolStripMenuItem					^m_pMenuItem;
 | 
        
           | 128 | cycrow | 138 | 		CPackages							*_pPackages;
 | 
        
           |  |  | 139 |   | 
        
           | 1 | cycrow | 140 | 	private: System::ComponentModel::IContainer^  components;
 | 
        
           |  |  | 141 |   | 
        
           |  |  | 142 | 		/// <summary>
 | 
        
           |  |  | 143 | 		/// Required designer variable.
 | 
        
           |  |  | 144 | 		/// </summary>
 | 
        
           |  |  | 145 |   | 
        
           |  |  | 146 |   | 
        
           |  |  | 147 | #pragma region Windows Form Designer generated code
 | 
        
           |  |  | 148 | 		/// <summary>
 | 
        
           |  |  | 149 | 		/// Required method for Designer support - do not modify
 | 
        
           |  |  | 150 | 		/// the contents of this method with the code editor.
 | 
        
           |  |  | 151 | 		/// </summary>
 | 
        
           |  |  | 152 | 		void InitializeComponent(void)
 | 
        
           |  |  | 153 | 		{
 | 
        
           |  |  | 154 | 			this->components = (gcnew System::ComponentModel::Container());
 | 
        
           |  |  | 155 | 			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(SpkForm::typeid));
 | 
        
           |  |  | 156 | 			this->listView1 = (gcnew System::Windows::Forms::ListView());
 | 
        
           |  |  | 157 | 			this->columnHeader1 = (gcnew System::Windows::Forms::ColumnHeader());
 | 
        
           |  |  | 158 | 			this->columnHeader2 = (gcnew System::Windows::Forms::ColumnHeader());
 | 
        
           |  |  | 159 | 			this->columnHeader3 = (gcnew System::Windows::Forms::ColumnHeader());
 | 
        
           |  |  | 160 | 			this->columnHeader4 = (gcnew System::Windows::Forms::ColumnHeader());
 | 
        
           |  |  | 161 | 			this->contextMenuStrip1 = (gcnew System::Windows::Forms::ContextMenuStrip(this->components));
 | 
        
           |  |  | 162 | 			this->ContextName = (gcnew System::Windows::Forms::ToolStripMenuItem());
 | 
        
           |  |  | 163 | 			this->toolStripSeparator1 = (gcnew System::Windows::Forms::ToolStripSeparator());
 | 
        
           |  |  | 164 | 			this->extractToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
 | 
        
           |  |  | 165 | 			this->deleteToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
 | 
        
           |  |  | 166 | 			this->toolStripSeparator2 = (gcnew System::Windows::Forms::ToolStripSeparator());
 | 
        
           |  |  | 167 | 			this->ToolCut = (gcnew System::Windows::Forms::ToolStripMenuItem());
 | 
        
           |  |  | 168 | 			this->ToolCopy = (gcnew System::Windows::Forms::ToolStripMenuItem());
 | 
        
           |  |  | 169 | 			this->ToolPaste = (gcnew System::Windows::Forms::ToolStripMenuItem());
 | 
        
           |  |  | 170 | 			this->imageList1 = (gcnew System::Windows::Forms::ImageList(this->components));
 | 
        
           |  |  | 171 | 			this->splitContainer1 = (gcnew System::Windows::Forms::SplitContainer());
 | 
        
           |  |  | 172 | 			this->listView2 = (gcnew System::Windows::Forms::ListView());
 | 
        
           |  |  | 173 | 			this->columnHeader5 = (gcnew System::Windows::Forms::ColumnHeader());
 | 
        
           |  |  | 174 | 			this->columnHeader6 = (gcnew System::Windows::Forms::ColumnHeader());
 | 
        
           |  |  | 175 | 			this->columnHeader7 = (gcnew System::Windows::Forms::ColumnHeader());
 | 
        
           |  |  | 176 | 			this->columnHeader8 = (gcnew System::Windows::Forms::ColumnHeader());
 | 
        
           |  |  | 177 | 			this->contextMenuStrip1->SuspendLayout();
 | 
        
           |  |  | 178 | 			this->splitContainer1->Panel1->SuspendLayout();
 | 
        
           |  |  | 179 | 			this->splitContainer1->Panel2->SuspendLayout();
 | 
        
           |  |  | 180 | 			this->splitContainer1->SuspendLayout();
 | 
        
           |  |  | 181 | 			this->SuspendLayout();
 | 
        
           |  |  | 182 | 			// 
 | 
        
           |  |  | 183 | 			// listView1
 | 
        
           |  |  | 184 | 			// 
 | 
        
           |  |  | 185 | 			this->listView1->AllowDrop = true;
 | 
        
           |  |  | 186 | 			this->listView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^  >(5) {this->columnHeader1, this->columnHeader2, 
 | 
        
           |  |  | 187 | 				this->columnHeader3, this->columnHeader4, this->columnHeader8});
 | 
        
           |  |  | 188 | 			this->listView1->ContextMenuStrip = this->contextMenuStrip1;
 | 
        
           |  |  | 189 | 			this->listView1->Dock = System::Windows::Forms::DockStyle::Fill;
 | 
        
           |  |  | 190 | 			this->listView1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
 | 
        
           |  |  | 191 | 				static_cast<System::Byte>(0)));
 | 
        
           |  |  | 192 | 			this->listView1->FullRowSelect = true;
 | 
        
           |  |  | 193 | 			this->listView1->Location = System::Drawing::Point(0, 0);
 | 
        
           |  |  | 194 | 			this->listView1->Margin = System::Windows::Forms::Padding(20);
 | 
        
           |  |  | 195 | 			this->listView1->Name = L"listView1";
 | 
        
           |  |  | 196 | 			this->listView1->Size = System::Drawing::Size(458, 192);
 | 
        
           |  |  | 197 | 			this->listView1->TabIndex = 0;
 | 
        
           |  |  | 198 | 			this->listView1->TileSize = System::Drawing::Size(64, 64);
 | 
        
           |  |  | 199 | 			this->listView1->UseCompatibleStateImageBehavior = false;
 | 
        
           |  |  | 200 | 			this->listView1->View = System::Windows::Forms::View::Details;
 | 
        
           |  |  | 201 | 			this->listView1->VirtualListSize = 10;
 | 
        
           |  |  | 202 | 			this->listView1->MouseDoubleClick += gcnew System::Windows::Forms::MouseEventHandler(this, &SpkForm::listView1_MouseDoubleClick);
 | 
        
           |  |  | 203 | 			this->listView1->SelectedIndexChanged += gcnew System::EventHandler(this, &SpkForm::listView1_SelectedIndexChanged);
 | 
        
           |  |  | 204 | 			this->listView1->DragDrop += gcnew System::Windows::Forms::DragEventHandler(this, &SpkForm::listView1_DragDrop);
 | 
        
           |  |  | 205 | 			// 
 | 
        
           |  |  | 206 | 			// columnHeader1
 | 
        
           |  |  | 207 | 			// 
 | 
        
           |  |  | 208 | 			this->columnHeader1->Text = L"File";
 | 
        
           |  |  | 209 | 			// 
 | 
        
           |  |  | 210 | 			// columnHeader2
 | 
        
           |  |  | 211 | 			// 
 | 
        
           |  |  | 212 | 			this->columnHeader2->Text = L"Size";
 | 
        
           |  |  | 213 | 			// 
 | 
        
           |  |  | 214 | 			// columnHeader3
 | 
        
           |  |  | 215 | 			// 
 | 
        
           |  |  | 216 | 			this->columnHeader3->Text = L"Type";
 | 
        
           |  |  | 217 | 			// 
 | 
        
           |  |  | 218 | 			// columnHeader4
 | 
        
           |  |  | 219 | 			// 
 | 
        
           |  |  | 220 | 			this->columnHeader4->Text = L"Last Modified";
 | 
        
           |  |  | 221 | 			// 
 | 
        
           |  |  | 222 | 			// contextMenuStrip1
 | 
        
           |  |  | 223 | 			// 
 | 
        
           |  |  | 224 | 			this->contextMenuStrip1->ImageScalingSize = System::Drawing::Size(24, 24);
 | 
        
           |  |  | 225 | 			this->contextMenuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(8) {this->ContextName, 
 | 
        
           |  |  | 226 | 				this->toolStripSeparator1, this->extractToolStripMenuItem, this->deleteToolStripMenuItem, this->toolStripSeparator2, this->ToolCut, 
 | 
        
           |  |  | 227 | 				this->ToolCopy, this->ToolPaste});
 | 
        
           |  |  | 228 | 			this->contextMenuStrip1->Name = L"contextMenuStrip1";
 | 
        
           |  |  | 229 | 			this->contextMenuStrip1->Size = System::Drawing::Size(118, 196);
 | 
        
           |  |  | 230 | 			// 
 | 
        
           |  |  | 231 | 			// ContextName
 | 
        
           |  |  | 232 | 			// 
 | 
        
           |  |  | 233 | 			this->ContextName->Name = L"ContextName";
 | 
        
           |  |  | 234 | 			this->ContextName->Size = System::Drawing::Size(117, 30);
 | 
        
           |  |  | 235 | 			this->ContextName->Text = L"Name";
 | 
        
           |  |  | 236 | 			this->ContextName->Click += gcnew System::EventHandler(this, &SpkForm::ContextName_Click);
 | 
        
           |  |  | 237 | 			// 
 | 
        
           |  |  | 238 | 			// toolStripSeparator1
 | 
        
           |  |  | 239 | 			// 
 | 
        
           |  |  | 240 | 			this->toolStripSeparator1->Name = L"toolStripSeparator1";
 | 
        
           |  |  | 241 | 			this->toolStripSeparator1->Size = System::Drawing::Size(114, 6);
 | 
        
           |  |  | 242 | 			// 
 | 
        
           |  |  | 243 | 			// extractToolStripMenuItem
 | 
        
           |  |  | 244 | 			// 
 | 
        
           |  |  | 245 | 			this->extractToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"extractToolStripMenuItem.Image")));
 | 
        
           |  |  | 246 | 			this->extractToolStripMenuItem->Name = L"extractToolStripMenuItem";
 | 
        
           |  |  | 247 | 			this->extractToolStripMenuItem->Size = System::Drawing::Size(117, 30);
 | 
        
           |  |  | 248 | 			this->extractToolStripMenuItem->Text = L"Extract";
 | 
        
           |  |  | 249 | 			this->extractToolStripMenuItem->Click += gcnew System::EventHandler(this, &SpkForm::extractToolStripMenuItem_Click);
 | 
        
           |  |  | 250 | 			// 
 | 
        
           |  |  | 251 | 			// deleteToolStripMenuItem
 | 
        
           |  |  | 252 | 			// 
 | 
        
           |  |  | 253 | 			this->deleteToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"deleteToolStripMenuItem.Image")));
 | 
        
           |  |  | 254 | 			this->deleteToolStripMenuItem->Name = L"deleteToolStripMenuItem";
 | 
        
           |  |  | 255 | 			this->deleteToolStripMenuItem->Size = System::Drawing::Size(117, 30);
 | 
        
           |  |  | 256 | 			this->deleteToolStripMenuItem->Text = L"Delete";
 | 
        
           |  |  | 257 | 			this->deleteToolStripMenuItem->Click += gcnew System::EventHandler(this, &SpkForm::deleteToolStripMenuItem_Click);
 | 
        
           |  |  | 258 | 			// 
 | 
        
           |  |  | 259 | 			// toolStripSeparator2
 | 
        
           |  |  | 260 | 			// 
 | 
        
           |  |  | 261 | 			this->toolStripSeparator2->Name = L"toolStripSeparator2";
 | 
        
           |  |  | 262 | 			this->toolStripSeparator2->Size = System::Drawing::Size(114, 6);
 | 
        
           |  |  | 263 | 			// 
 | 
        
           |  |  | 264 | 			// ToolCut
 | 
        
           |  |  | 265 | 			// 
 | 
        
           |  |  | 266 | 			this->ToolCut->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"ToolCut.Image")));
 | 
        
           |  |  | 267 | 			this->ToolCut->Name = L"ToolCut";
 | 
        
           |  |  | 268 | 			this->ToolCut->Size = System::Drawing::Size(117, 30);
 | 
        
           |  |  | 269 | 			this->ToolCut->Text = L"Cut";
 | 
        
           |  |  | 270 | 			this->ToolCut->Click += gcnew System::EventHandler(this, &SpkForm::ToolCut_Click);
 | 
        
           |  |  | 271 | 			// 
 | 
        
           |  |  | 272 | 			// ToolCopy
 | 
        
           |  |  | 273 | 			// 
 | 
        
           |  |  | 274 | 			this->ToolCopy->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"ToolCopy.Image")));
 | 
        
           |  |  | 275 | 			this->ToolCopy->Name = L"ToolCopy";
 | 
        
           |  |  | 276 | 			this->ToolCopy->Size = System::Drawing::Size(117, 30);
 | 
        
           |  |  | 277 | 			this->ToolCopy->Text = L"Copy";
 | 
        
           |  |  | 278 | 			this->ToolCopy->Click += gcnew System::EventHandler(this, &SpkForm::ToolCopy_Click);
 | 
        
           |  |  | 279 | 			// 
 | 
        
           |  |  | 280 | 			// ToolPaste
 | 
        
           |  |  | 281 | 			// 
 | 
        
           |  |  | 282 | 			this->ToolPaste->Enabled = false;
 | 
        
           |  |  | 283 | 			this->ToolPaste->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"ToolPaste.Image")));
 | 
        
           |  |  | 284 | 			this->ToolPaste->Name = L"ToolPaste";
 | 
        
           |  |  | 285 | 			this->ToolPaste->Size = System::Drawing::Size(117, 30);
 | 
        
           |  |  | 286 | 			this->ToolPaste->Text = L"Paste";
 | 
        
           |  |  | 287 | 			this->ToolPaste->Click += gcnew System::EventHandler(this, &SpkForm::ToolPaste_Click);
 | 
        
           |  |  | 288 | 			// 
 | 
        
           |  |  | 289 | 			// imageList1
 | 
        
           |  |  | 290 | 			// 
 | 
        
           |  |  | 291 | 			this->imageList1->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^  >(resources->GetObject(L"imageList1.ImageStream")));
 | 
        
           |  |  | 292 | 			this->imageList1->TransparentColor = System::Drawing::Color::Transparent;
 | 
        
           |  |  | 293 | 			this->imageList1->Images->SetKeyName(0, L"advert.png");
 | 
        
           |  |  | 294 | 			this->imageList1->Images->SetKeyName(1, L"backup.png");
 | 
        
           |  |  | 295 | 			this->imageList1->Images->SetKeyName(2, L"cockpitscene.png");
 | 
        
           |  |  | 296 | 			this->imageList1->Images->SetKeyName(3, L"extras.png");
 | 
        
           |  |  | 297 | 			this->imageList1->Images->SetKeyName(4, L"map.png");
 | 
        
           |  |  | 298 | 			this->imageList1->Images->SetKeyName(5, L"mission.png");
 | 
        
           |  |  | 299 | 			this->imageList1->Images->SetKeyName(6, L"mods.png");
 | 
        
           |  |  | 300 | 			this->imageList1->Images->SetKeyName(7, L"readme.png");
 | 
        
           |  |  | 301 | 			this->imageList1->Images->SetKeyName(8, L"screenshot.png");
 | 
        
           |  |  | 302 | 			this->imageList1->Images->SetKeyName(9, L"script.png");
 | 
        
           |  |  | 303 | 			this->imageList1->Images->SetKeyName(10, L"shipmodel.png");
 | 
        
           |  |  | 304 | 			this->imageList1->Images->SetKeyName(11, L"shipother.png");
 | 
        
           |  |  | 305 | 			this->imageList1->Images->SetKeyName(12, L"shipscene.png");
 | 
        
           |  |  | 306 | 			this->imageList1->Images->SetKeyName(13, L"sound.png");
 | 
        
           |  |  | 307 | 			this->imageList1->Images->SetKeyName(14, L"textfile.png");
 | 
        
           |  |  | 308 | 			this->imageList1->Images->SetKeyName(15, L"uninstall.png");
 | 
        
           |  |  | 309 | 			this->imageList1->Images->SetKeyName(16, L"package");
 | 
        
           |  |  | 310 | 			// 
 | 
        
           |  |  | 311 | 			// splitContainer1
 | 
        
           |  |  | 312 | 			// 
 | 
        
           |  |  | 313 | 			this->splitContainer1->Dock = System::Windows::Forms::DockStyle::Fill;
 | 
        
           |  |  | 314 | 			this->splitContainer1->Location = System::Drawing::Point(0, 0);
 | 
        
           |  |  | 315 | 			this->splitContainer1->Name = L"splitContainer1";
 | 
        
           |  |  | 316 | 			this->splitContainer1->Orientation = System::Windows::Forms::Orientation::Horizontal;
 | 
        
           |  |  | 317 | 			// 
 | 
        
           |  |  | 318 | 			// splitContainer1.Panel1
 | 
        
           |  |  | 319 | 			// 
 | 
        
           |  |  | 320 | 			this->splitContainer1->Panel1->Controls->Add(this->listView2);
 | 
        
           |  |  | 321 | 			// 
 | 
        
           |  |  | 322 | 			// splitContainer1.Panel2
 | 
        
           |  |  | 323 | 			// 
 | 
        
           |  |  | 324 | 			this->splitContainer1->Panel2->Controls->Add(this->listView1);
 | 
        
           |  |  | 325 | 			this->splitContainer1->Size = System::Drawing::Size(458, 391);
 | 
        
           |  |  | 326 | 			this->splitContainer1->SplitterDistance = 195;
 | 
        
           |  |  | 327 | 			this->splitContainer1->TabIndex = 1;
 | 
        
           |  |  | 328 | 			// 
 | 
        
           |  |  | 329 | 			// listView2
 | 
        
           |  |  | 330 | 			// 
 | 
        
           |  |  | 331 | 			this->listView2->AllowDrop = true;
 | 
        
           |  |  | 332 | 			this->listView2->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^  >(3) {this->columnHeader5, this->columnHeader6, 
 | 
        
           |  |  | 333 | 				this->columnHeader7});
 | 
        
           |  |  | 334 | 			this->listView2->ContextMenuStrip = this->contextMenuStrip1;
 | 
        
           |  |  | 335 | 			this->listView2->Dock = System::Windows::Forms::DockStyle::Fill;
 | 
        
           |  |  | 336 | 			this->listView2->FullRowSelect = true;
 | 
        
           |  |  | 337 | 			this->listView2->HideSelection = false;
 | 
        
           |  |  | 338 | 			this->listView2->LargeImageList = this->imageList1;
 | 
        
           |  |  | 339 | 			this->listView2->Location = System::Drawing::Point(0, 0);
 | 
        
           |  |  | 340 | 			this->listView2->Name = L"listView2";
 | 
        
           |  |  | 341 | 			this->listView2->Size = System::Drawing::Size(458, 195);
 | 
        
           |  |  | 342 | 			this->listView2->SmallImageList = this->imageList1;
 | 
        
           |  |  | 343 | 			this->listView2->TabIndex = 0;
 | 
        
           |  |  | 344 | 			this->listView2->UseCompatibleStateImageBehavior = false;
 | 
        
           |  |  | 345 | 			this->listView2->View = System::Windows::Forms::View::Details;
 | 
        
           |  |  | 346 | 			this->listView2->SelectedIndexChanged += gcnew System::EventHandler(this, &SpkForm::listView2_SelectedIndexChanged);
 | 
        
           |  |  | 347 | 			this->listView2->DragDrop += gcnew System::Windows::Forms::DragEventHandler(this, &SpkForm::listView2_DragDrop);
 | 
        
           |  |  | 348 | 			this->listView2->ColumnClick += gcnew System::Windows::Forms::ColumnClickEventHandler(this, &SpkForm::listView2_ColumnClick);
 | 
        
           |  |  | 349 | 			this->listView2->DragOver += gcnew System::Windows::Forms::DragEventHandler(this, &SpkForm::listView2_DragOver);
 | 
        
           |  |  | 350 | 			// 
 | 
        
           |  |  | 351 | 			// columnHeader5
 | 
        
           |  |  | 352 | 			// 
 | 
        
           |  |  | 353 | 			this->columnHeader5->Text = L"Filename";
 | 
        
           |  |  | 354 | 			// 
 | 
        
           |  |  | 355 | 			// columnHeader6
 | 
        
           |  |  | 356 | 			// 
 | 
        
           |  |  | 357 | 			this->columnHeader6->Text = L"File Type";
 | 
        
           |  |  | 358 | 			// 
 | 
        
           |  |  | 359 | 			// columnHeader7
 | 
        
           |  |  | 360 | 			// 
 | 
        
           |  |  | 361 | 			this->columnHeader7->Text = L"Size";
 | 
        
           |  |  | 362 | 			// 
 | 
        
           |  |  | 363 | 			// columnHeader8
 | 
        
           |  |  | 364 | 			// 
 | 
        
           |  |  | 365 | 			this->columnHeader8->Text = L"Game";
 | 
        
           |  |  | 366 | 			// 
 | 
        
           |  |  | 367 | 			// SpkForm
 | 
        
           |  |  | 368 | 			// 
 | 
        
           |  |  | 369 | 			this->AllowDrop = true;
 | 
        
           |  |  | 370 | 			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
 | 
        
           |  |  | 371 | 			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
 | 
        
           |  |  | 372 | 			this->AutoValidate = System::Windows::Forms::AutoValidate::EnableAllowFocusChange;
 | 
        
           |  |  | 373 | 			this->ClientSize = System::Drawing::Size(458, 391);
 | 
        
           |  |  | 374 | 			this->Controls->Add(this->splitContainer1);
 | 
        
           |  |  | 375 | 			this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
 | 
        
           |  |  | 376 | 			this->Icon = (cli::safe_cast<System::Drawing::Icon^  >(resources->GetObject(L"$this.Icon")));
 | 
        
           |  |  | 377 | 			this->Name = L"SpkForm";
 | 
        
           |  |  | 378 | 			this->ShowIcon = false;
 | 
        
           |  |  | 379 | 			this->ShowInTaskbar = false;
 | 
        
           |  |  | 380 | 			this->SizeGripStyle = System::Windows::Forms::SizeGripStyle::Hide;
 | 
        
           |  |  | 381 | 			this->Text = L"SpkForm";
 | 
        
           |  |  | 382 | 			this->contextMenuStrip1->ResumeLayout(false);
 | 
        
           |  |  | 383 | 			this->splitContainer1->Panel1->ResumeLayout(false);
 | 
        
           |  |  | 384 | 			this->splitContainer1->Panel2->ResumeLayout(false);
 | 
        
           |  |  | 385 | 			this->splitContainer1->ResumeLayout(false);
 | 
        
           |  |  | 386 | 			this->ResumeLayout(false);
 | 
        
           |  |  | 387 |   | 
        
           |  |  | 388 | 		}
 | 
        
           |  |  | 389 | #pragma endregion
 | 
        
           |  |  | 390 | 	private: System::Void Event_Activated(System::Object^  sender, System::EventArgs^  e);
 | 
        
           |  |  | 391 | 	private: System::Void Event_Closing(System::Object^  sender, CancelEventArgs^  e);
 | 
        
           |  |  | 392 | private: System::Void SortList(System::Object ^Sender, ColumnClickEventArgs ^E)
 | 
        
           |  |  | 393 | 	{
 | 
        
           |  |  | 394 | 		if ( E->Column == m_iSortingCol )
 | 
        
           |  |  | 395 | 		{
 | 
        
           |  |  | 396 | 			m_bSortingAsc = !m_bSortingAsc;
 | 
        
           |  |  | 397 | 			this->listView1->ListViewItemSorter = gcnew ListViewItemComparer(E->Column, !m_bSortingAsc);
 | 
        
           |  |  | 398 | 		}
 | 
        
           |  |  | 399 | 		else
 | 
        
           |  |  | 400 | 		{
 | 
        
           |  |  | 401 | 			m_bSortingAsc = true;
 | 
        
           |  |  | 402 | 			this->listView1->ListViewItemSorter = gcnew ListViewItemComparer(E->Column, !m_bSortingAsc);
 | 
        
           |  |  | 403 | 		}
 | 
        
           |  |  | 404 | 		this->listView1->Sort();
 | 
        
           |  |  | 405 | 		m_iSortingCol = E->Column;
 | 
        
           |  |  | 406 | 	}
 | 
        
           |  |  | 407 | private: System::Void listView1_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
 | 
        
           |  |  | 408 | 			this->SelectedCheck();
 | 
        
           |  |  | 409 | 		 }
 | 
        
           |  |  | 410 | private: System::Void extractToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
 | 
        
           |  |  | 411 | 			if ( !m_pListItem )
 | 
        
           |  |  | 412 | 				return;
 | 
        
           |  |  | 413 |   | 
        
           |  |  | 414 | 			C_File *f =  this->GetFileFromItem(m_pListItem);
 | 
        
           |  |  | 415 | 			if ( f )
 | 
        
           |  |  | 416 | 			{
 | 
        
           |  |  | 417 | 				CLinkList<C_File> list;
 | 
        
           |  |  | 418 | 				list.push_back(f);
 | 
        
           |  |  | 419 | 				this->DoExtract(&list, this->GetExtractDir(false), -1);
 | 
        
           |  |  | 420 | 				list.clear();
 | 
        
           |  |  | 421 | 			}
 | 
        
           |  |  | 422 | 		 }
 | 
        
           |  |  | 423 | private: System::Void ToolCopy_Click(System::Object^  sender, System::EventArgs^  e) {
 | 
        
           |  |  | 424 | 			 this->CopyFile();
 | 
        
           |  |  | 425 | 		 }
 | 
        
           |  |  | 426 | private: System::Void ToolPaste_Click(System::Object^  sender, System::EventArgs^  e) {
 | 
        
           |  |  | 427 | 			 this->PasteFile();
 | 
        
           |  |  | 428 | 		 }
 | 
        
           |  |  | 429 | private: System::Void ToolCut_Click(System::Object^  sender, System::EventArgs^  e) {
 | 
        
           |  |  | 430 | 			 this->CutFile();
 | 
        
           |  |  | 431 | 		 }
 | 
        
           |  |  | 432 | private: System::Void listView1_DragDrop(System::Object^  sender, System::Windows::Forms::DragEventArgs^  e);
 | 
        
           |  |  | 433 | private: System::Void ContextName_Click(System::Object^  sender, System::EventArgs^  e) {
 | 
        
           |  |  | 434 | 			 this->RunFile(m_pListItem);
 | 
        
           |  |  | 435 | 		 }
 | 
        
           |  |  | 436 | private: System::Void listView1_MouseDoubleClick(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) {
 | 
        
           |  |  | 437 | 			Point ^mousePoint = this->listView1->PointToClient(this->listView1->MousePosition);
 | 
        
           |  |  | 438 | 			this->RunFile(this->listView1->GetItemAt(mousePoint->X, mousePoint->Y));
 | 
        
           |  |  | 439 | 		 }
 | 
        
           |  |  | 440 | private: System::Void listView2_ColumnClick(System::Object^  sender, System::Windows::Forms::ColumnClickEventArgs^  E) {
 | 
        
           |  |  | 441 | 			if ( E->Column == m_iSortingCol2 )
 | 
        
           |  |  | 442 | 			{
 | 
        
           |  |  | 443 | 				m_bSortingAsc2 = !m_bSortingAsc2;
 | 
        
           |  |  | 444 | 				this->listView2->ListViewItemSorter = gcnew ListViewItemComparer(E->Column, !m_bSortingAsc2);
 | 
        
           |  |  | 445 | 			}
 | 
        
           |  |  | 446 | 			else
 | 
        
           |  |  | 447 | 			{
 | 
        
           |  |  | 448 | 				m_bSortingAsc2 = true;
 | 
        
           |  |  | 449 | 				this->listView2->ListViewItemSorter = gcnew ListViewItemComparer(E->Column, !m_bSortingAsc2);
 | 
        
           |  |  | 450 | 			}
 | 
        
           |  |  | 451 | 			this->listView2->Sort();
 | 
        
           |  |  | 452 | 			m_iSortingCol2 = E->Column;
 | 
        
           |  |  | 453 | 		 }
 | 
        
           |  |  | 454 | private: System::Void listView2_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
 | 
        
           |  |  | 455 | 			this->SelectedCheck();
 | 
        
           |  |  | 456 | 		 }
 | 
        
           |  |  | 457 | private: System::Void listView2_DragOver(System::Object^  sender, System::Windows::Forms::DragEventArgs^  e) {
 | 
        
           |  |  | 458 | 			e->Effect = DragDropEffects::None;
 | 
        
           |  |  | 459 | 			if ( e->Data->GetDataPresent(DataFormats::FileDrop) )
 | 
        
           |  |  | 460 | 			{
 | 
        
           |  |  | 461 | 				cli::array<String ^> ^a = (cli::array<String ^> ^)e->Data->GetData(DataFormats::FileDrop, false);
 | 
        
           |  |  | 462 | 				int i;
 | 
        
           |  |  | 463 | 				for(i = 0; i < a->Length; i++)
 | 
        
           |  |  | 464 | 				{
 | 
        
           |  |  | 465 | 					if ( String::Compare(IO::FileInfo(a[i]).Extension, ".xsp", true) == 0 || String::Compare(IO::FileInfo(a[i]).Extension, ".spk", true) == 0 )
 | 
        
           |  |  | 466 | 					{
 | 
        
           |  |  | 467 | 						e->Effect = DragDropEffects::Copy;
 | 
        
           |  |  | 468 | 						break;
 | 
        
           |  |  | 469 | 					}
 | 
        
           |  |  | 470 | 				}
 | 
        
           |  |  | 471 | 			}
 | 
        
           |  |  | 472 | 		 }
 | 
        
           |  |  | 473 | private: System::Void listView2_DragDrop(System::Object^  sender, System::Windows::Forms::DragEventArgs^  e);
 | 
        
           |  |  | 474 | private: System::Void deleteToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
 | 
        
           |  |  | 475 | 			if ( !m_pListItem )
 | 
        
           |  |  | 476 | 				return;
 | 
        
           |  |  | 477 |   | 
        
           |  |  | 478 | 			this->RemoveItem(m_pListItem);
 | 
        
           |  |  | 479 | 		 }
 | 
        
           |  |  | 480 | };
 | 
        
           |  |  | 481 | }
 |