Subversion Repositories spk

Rev

Rev 104 | Rev 126 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 cycrow 1
#pragma once
2
 
3
#include <spk.h>
4
 
5
using namespace System;
6
using namespace System::ComponentModel;
7
using namespace System::Collections;
8
using namespace System::Windows::Forms;
9
using namespace System::Data;
10
using namespace System::Drawing;
11
using namespace System::Threading;
12
 
121 cycrow 13
#include "DirectoryControl.h"
1 cycrow 14
#include "About.h"
15
#include "PackageInstalled.h"
16
#include "GameLauncherFlags.h"
17
#include "FakePatchControl.h"
2 cycrow 18
//TODO: remove this, move to a generic shared space
19
#include "..\..\SpkExplorer\src\Forms\PackageInfo.h"
1 cycrow 20
#include "CheckUpdate.h"
21
#include "MenuBar.h"
2 cycrow 22
//TODO: remove this, move to a generic shared space
23
#include "..\..\Creator\src\Forms\Waiting.h"
1 cycrow 24
 
121 cycrow 25
enum {MGUI_BACKGROUND_NONE, MGUI_BACKGROUND_INSTALL, MGUI_BACKGROUND_UNINSTALL, MGUI_BACKGROUND_DISABLE, MGUI_BACKGROUND_CHANGEDIR, MGUI_BACKGROUND_INSTALLBUILTIN, MGUI_BACKGROUND_CLOSEDIR};
1 cycrow 26
enum {SORT_NAME, SORT_AUTHOR, SORT_VERSION, SORT_CREATED, SORT_TYPE, SORT_ENABLE, SORT_SIGNED};
27
 
28
#define MAXTIPS 1
29
 
30
#define TIPSECTION_YESNO		0
31
 
32
#define TIP_NONE				0
33
#define TIP_SHIPUNINSTALL		1
34
#define TIP_SHIPDISABLE			2
35
 
36
namespace PluginManager {
37
 
38
	/// <summary>
39
	/// Summary for MainGui
40
	///
41
	/// WARNING: If you change the name of this class, you will need to change the
42
	///          'Resource File Name' property for the managed resource compiler tool
43
	///          associated with all .resx files this class depends on.  Otherwise,
44
	///          the designers will not be able to interact properly with localized
45
	///          resources associated with this form.
46
	/// </summary>
47
	public ref class MainGui : public System::Windows::Forms::Form
48
	{
49
	public:
121 cycrow 50
		MainGui(CPackages *p, Utils::CStringList *list, Utils::CStringList *removed, bool advanced)
1 cycrow 51
		{
52
			InitializeComponent();
53
 
54
			// additional controls
55
			m_pMenuBar = gcnew MenuBar(this, advanced);
56
			m_pWait = nullptr;
57
 
58
			m_bAdvanced = advanced;
59
			m_iSaveGameManager = -1;
60
 
61
			m_lTips = gcnew ArrayList();
62
			for ( int i = 0; i < MAXTIPS; i++ )
63
			{
64
				STips ^t = gcnew STips;
65
				t->iTips = 0;
66
				m_lTips->Add(t);
67
				this->SetTipStrings(i);
68
			}
69
 
70
			// set  pointers
71
			m_pPackages = p;
72
			m_pDirList = list;
73
			m_pRemovedDirList = removed;
74
			m_pUpdateList = NULL;
75
			m_pListItem = nullptr;
76
			m_pFileErrors = new CyStringList;
77
			m_bDirLocked = false;
78
 
79
			// default values
80
			m_iBackgroundTask = MGUI_BACKGROUND_NONE;
81
			m_bSortingAsc = true;
82
			m_iSortingColumn = SORT_NAME;
83
			m_bExperimental = m_bCheat = m_bModSelectorDetails = m_bShips = m_bDownloadable = m_bSigned = false;
84
			m_bAutoUpdate = true;
85
			m_bRunningBackground = false;
86
			m_bDisplayDialog = false;
87
			m_bDisplayMessage = false;
88
 
89
			m_sGameArgs = "-noabout";
90
			m_pLauncherFlags = new SGameLauncherFlags;
91
			m_pLauncherFlags->iIgnoreJoy = 0;
92
			m_pLauncherFlags->bNoAbout = true;
93
 
94
			m_iSizeX = -1;
95
			m_iSizeY = -1;
96
 
97
			this->Text = GetProgramName(m_bAdvanced) + " " + GetVersionString();
98
 
99
			// update the gui
100
			this->UpdateControls();
101
 
102
			// update the display
121 cycrow 103
			this->UpdateDirList("");
1 cycrow 104
			this->UpdatePackages();
105
 
106
			// setup the events
107
			this->SetupEventHandlers();
108
 
109
			//this->ButRun->Hide();
110
		}
111
 
112
		void DisplayLocked(bool inthread);
113
		void CheckProtectedDir();
114
		void PrepareSaveGameManager()
115
		{
116
			// copy save games to each game dir
117
		}
118
 
119
		void InstallArchive()
120
		{
121
			if ( m_bDirLocked ) {
122
				this->DisplayLocked(false);
123
				return;
124
			}
125
			OpenFileDialog ^ofd = gcnew OpenFileDialog();
126
			ofd->Filter = "All Supported Archives|*.zip; *.rar|Zip Archive (*.zip)|*.zip|Rar Archive (*.rar)|*.rar";
127
			ofd->Title = "Select archive file you wish to install";
128
			ofd->FilterIndex = 1;
129
			ofd->RestoreDirectory = true;
130
			ofd->Multiselect = false;
131
 
132
			if ( ofd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
133
			{
134
				m_sConvertFile = ofd->FileName;
135
				m_pWait = gcnew Creator::Waiting("Converting: " + IO::FileInfo(m_sConvertFile).Name);
136
				this->backgroundWorker2->RunWorkerAsync();
137
				m_pWait->ShowDialog(this);
138
			}
139
		}
140
 
121 cycrow 141
		void OpenDirectoryControl();
142
		void AboutDialog();
1 cycrow 143
 
144
		// config
145
		void SetSize(int x, int y) { m_iSizeX = x; m_iSizeY = y; }
146
		void SetTipStrings(int section);
147
		void SetTips(int tip, int done)
148
		{
149
			if ( tip < 0 )
150
				return;
151
			if ( tip > (int)MAXTIPS )
152
				return;
153
			((STips ^)m_lTips[tip])->iTips = done;
154
		}
155
		void SetSaveGameManager(int i) { m_iSaveGameManager = i; }
156
		void SetExperimental(bool b) { m_bExperimental = b; }
157
		void SetShips(bool b) { m_bShips = b; }
158
		void SetOnlySigned(bool b) { m_bSigned = b; }
159
		void SetCheat(bool b) { m_bCheat = b; }
160
		void SetDownloadable(bool b) { m_bDownloadable = b; }
161
		void SetModSelectorDetails(bool b) { m_bModSelectorDetails = b; }
162
		void SetAutoUpdate(bool b) { m_bAutoUpdate = b; }
163
		void SetIgnoreJoy(long j) { m_pLauncherFlags->iIgnoreJoy = j; }
164
		void ForceEMP(bool b) { m_pPackages->SetForceEMP(b); }
165
 
166
		int GetSaveGameManager() { return m_iSaveGameManager; }
167
		bool IsModSelectorDetailsShowing() { return m_bModSelectorDetails; }
168
		bool IsShips() { return m_bShips; }
169
		bool IsOnlySigned() { return m_bSigned; }
170
		bool IsExperimental() { return m_bExperimental; }
171
		bool IsCheat() { return m_bCheat; }
172
		bool IsDownloadable() { return m_bDownloadable; }
173
		bool IsAutoUpdate() { return m_bAutoUpdate; }
174
		int GetTips(int tip)
175
		{
176
			if ( tip < 0 || tip >= MAXTIPS )
177
				return -1;
178
			return ((STips ^)m_lTips[tip])->iTips;
179
		}
180
		int GetMaxTips() { return (int)MAXTIPS; }
181
		long GetIgnoreJoy() { return m_pLauncherFlags->iIgnoreJoy; }
182
 
183
		// gui updates
121 cycrow 184
		void UpdateDirList(const Utils::String &current);
1 cycrow 185
		void UpdatePackages();
186
		void UpdateControls();
187
		bool UpdateBuiltInPackages();
86 cycrow 188
		void AddIconToPackages(String ^icon);
1 cycrow 189
 
190
		// auto update
191
		void AutoUpdate();
192
		System::String ^GetDownloadFile() { return m_sDownload; }
193
 
194
		// Run
195
		System::String ^GetRunFile() { return m_sRun; }
196
		System::String ^GetGameArgs() { return m_sGameArgs; }
197
 
198
		// setup functions
199
		void SetupEventHandlers();
200
		void StartCheckTimer();
201
 
202
		// control functions
203
		bool InstallPackage(System::String ^file, bool straightAway, bool builtin, bool background);
121 cycrow 204
		void CloseCurrentDirectory();
205
		void ChangeDirectory(const Utils::String &dir);
1 cycrow 206
 
207
		void SetGameArgs(System::String ^args) { m_sGameArgs = args; }
208
		void AddGameArgs(System::String ^args) { m_sGameArgs += " " + args; }
209
 
210
		bool DisplayTip(int tipsection, int tip);
211
		void CheckUnusedShared();
212
 
213
		bool CheckAccessRights(String ^dir);
214
		void ClearSelectedItems();
215
		void CheckFakePatchCompatability();
216
 
217
		void PackageUpdates()
218
		{
219
			CheckUpdate ^update = gcnew CheckUpdate(m_pPackages, this->imageList1);
220
			this->ClearSelectedItems();
221
			if ( update->ShowDialog(this) == Windows::Forms::DialogResult::OK )
222
			{
223
				for ( int i = 0; i < update->GetInstallList()->Count; i++ )
224
					this->InstallPackage(Convert::ToString(update->GetInstallList()[i]), false, false, true);
225
				this->StartInstalling(false, true);
226
			}
227
		}
228
 
229
		// external control events
230
		void InstallEvent(System::Object ^Sender, System::EventArgs ^E);
231
		void VanillaEvent(System::Object ^Sender, System::EventArgs ^E);
232
		void ModifiedEvent(System::Object ^Sender, System::EventArgs ^E);
233
		void ModSelectorEvent(System::Object ^Sender, System::EventArgs ^E);
234
		void PackageBrowserEvent(System::Object ^Sender, System::EventArgs ^E);
235
 
236
		void FindPackagesOnline();
237
		void ViewFileLog();
238
		void EditGlobalsDialog();
88 cycrow 239
		void EditWaresDialog();
89 cycrow 240
		void CommandSlotsDialog();
1 cycrow 241
		void FakePatchControlDialog();
242
		void ExportPackageList();
243
		void VerifyInstalledFiles();
244
		CPackages *GetPackageControl() { return m_pPackages; }
245
 
246
	protected:
247
		/// <summary>
248
		/// Clean up any resources being used.
249
		/// </summary>
250
		~MainGui()
251
		{
252
			if (components)
253
			{
254
				delete components;
255
			}
256
			delete m_pFileErrors;
257
			delete m_pLauncherFlags;
104 cycrow 258
 
259
			CLanguages::Release();
1 cycrow 260
		}
261
 
262
	private:
263
		// Events
264
		void ClosedEvent(System::Object ^Sender, System::EventArgs ^E) { this->Close(); }
265
		void PackageListSelected(System::Object ^Sender, System::EventArgs ^E);
266
		void PackageListSort(System::Object ^Sender, ColumnClickEventArgs ^E);
267
		void UninstallEvent(System::Object ^Sender, System::EventArgs ^E);
268
		void DisableEvent(System::Object ^Sender, System::EventArgs ^E);
269
		void ChangeDirectoryEvent(System::Object ^Sender, System::EventArgs ^E);
270
		void Background_DoWork(System::Object ^Sender, DoWorkEventArgs ^E);
271
		void Background_Progress(System::Object ^Sender, ProgressChangedEventArgs ^E);
272
		void Background_Finished(System::Object ^Sender, RunWorkerCompletedEventArgs ^E) { this->Background_Finished(); }
273
		void Background_Finished();
274
		void CloseEvent(System::Object ^Sender, FormClosingEventArgs ^E);
275
		void Updater_Finished(System::Object ^Sender, RunWorkerCompletedEventArgs ^E);
276
		void Updater_DoWork(System::Object ^Sender, DoWorkEventArgs ^E);
277
		void TimerEvent_CheckFile(System::Object ^Sender, System::EventArgs ^E);
278
		void RunItem(System::Object ^sender, System::EventArgs ^e);
279
 
280
		ListViewItem ^FindSelectedItem();
281
		CBaseFile *GetFileFromItem(ListViewItem ^item);
282
 
283
		System::Void OpenContextMenu(System::Object ^Sender, CancelEventArgs ^E);
284
		void _DisplayPackages(CBaseFile *currentParent, ListViewGroup ^addGroup);
285
 
286
		void UpdateRunButton();
287
		bool EnablePackage(CBaseFile *p);
288
		bool StartInstallingArchive(bool builtin, bool background) { return StartInstalling(builtin, background, true); }
289
		bool StartInstalling(bool builtin, bool background) { return StartInstalling(builtin, background, false); }
290
		bool StartInstalling(bool builtin, bool background, bool archive);
291
		void DoInstall(bool builtin, bool frombackground);
292
		void DoUninstall();
293
		void DoDisable();
294
		CBaseFile *FindPackageFromList(ListViewItem ^item);
295
 
296
		bool StartBackground(int type);
297
		bool StartBackground(int type, System::String ^info);
298
		void LaunchGame();
299
		System::Windows::Forms::DialogResult DisplayMessageBox(bool inthread, System::String ^title, System::String ^text, MessageBoxButtons buttons, MessageBoxIcon icon);
300
 
301
		void DisableList(ArrayList ^List);
302
		void UninstallList(ArrayList ^List);
303
 
304
		void RunFromToolItem(ToolStripMenuItem ^item);
305
 
306
		MenuBar			^m_pMenuBar;
307
		CPackages		*m_pPackages;
121 cycrow 308
		Utils::CStringList	*m_pDirList;
309
		Utils::CStringList	*m_pRemovedDirList;
1 cycrow 310
		CyStringList	*m_pUpdateList;
311
		CyStringList	*m_pFileErrors;
312
		int				 m_iBackgroundTask;
313
		int				 m_iSortingColumn;
314
		bool			 m_bSortingAsc;
315
 
316
		bool			 m_bSigned;
317
		bool			 m_bShips;
318
		bool			 m_bExperimental;
319
		bool			 m_bCheat;
320
		bool			 m_bDownloadable;
321
		bool			 m_bModSelectorDetails;
322
		bool			 m_bAutoUpdate;
323
		bool			 m_bRunningBackground;
324
		bool			 m_bAdvanced;
325
		bool			 m_bDirLocked;
326
 
327
		System::String	^m_sBackgroundInfo;
328
		System::String	^m_sDownload;
329
		System::String	^m_sRun;
330
		System::String	^m_sGameArgs;
331
 
332
		PackageInstalled ^m_pPi;
333
		bool			m_bDisplayDialog;
334
		bool			m_bDisplayMessage;
335
		System::String ^m_sMessageTitle;
336
		System::String ^m_sMessageText;
337
		MessageBoxIcon  m_messageIcon;
338
		MessageBoxButtons m_messageButtons;
339
 
340
		int			m_iSizeX;
341
		int			m_iSizeY;
342
 
343
		SGameLauncherFlags *m_pLauncherFlags;
344
 
345
		ArrayList ^m_lTips;
346
		ListViewItem						^m_pListItem;
347
 
348
		int			m_iSaveGameManager;
349
		String			^m_sConvertFile;
350
		Creator::Waiting	^m_pWait;
351
		CArchiveFile	*m_pConverted;
352
 
353
	private:
354
	private:
355
	private: System::Windows::Forms::GroupBox^  GroupDir;
356
	private: System::Windows::Forms::ComboBox^  ComboDir;
357
	private: System::Windows::Forms::ListView^  ListPackages;
358
	private: System::Windows::Forms::ColumnHeader^  columnHeader1;
359
	private: System::Windows::Forms::ColumnHeader^  columnHeader2;
360
	private: System::Windows::Forms::ColumnHeader^  columnHeader3;
361
	private: System::Windows::Forms::ColumnHeader^  columnHeader4;
362
	private: System::Windows::Forms::ColumnHeader^  columnHeader5;
363
	private: System::Windows::Forms::Panel^  panel1;
364
	private: System::Windows::Forms::Button^  ButClose;
365
	private: System::Windows::Forms::GroupBox^  GroupPackages;
366
	private: System::Windows::Forms::ProgressBar^  ProgressBar;
367
	private: System::Windows::Forms::Panel^  panel2;
368
	private: System::Windows::Forms::Button^  ButUninstall;
369
	private: System::Windows::Forms::Button^  ButDisable;
370
	private: System::Windows::Forms::Button^  ButInstall;
371
	private: System::ComponentModel::BackgroundWorker^  backgroundWorker1;
372
private: System::Windows::Forms::RichTextBox^  TextDesc;
373
private: System::Windows::Forms::Panel^  PanelDisplay;
374
private: System::Windows::Forms::PictureBox^  PictureDisplay;
375
private: System::ComponentModel::BackgroundWorker^  backgroundUpdater;
376
private: System::Windows::Forms::Button^  ButRun;
377
private: System::Windows::Forms::StatusStrip^  statusStrip1;
378
private: System::Windows::Forms::ToolStripStatusLabel^  LabelStatus;
379
private: System::Windows::Forms::ContextMenuStrip^  contextMenuStrip1;
380
private: System::Windows::Forms::ToolStripMenuItem^  uninstallToolStripMenuItem;
381
private: System::Windows::Forms::ToolStripSeparator^  ContextSeperator;
382
private: System::Windows::Forms::ToolStripMenuItem^  ContextEnable;
383
private: System::Windows::Forms::ToolStripMenuItem^  ContextDisable;
384
private: System::Windows::Forms::ToolStripMenuItem^  ContextName;
385
private: System::Windows::Forms::ToolStripSeparator^  toolStripSeparator3;
386
private: System::Windows::Forms::ImageList^  imageList1;
387
private: System::Windows::Forms::ToolStripMenuItem^  UninstallSelectedContext;
388
private: System::Windows::Forms::ColumnHeader^  columnHeader6;
389
private: System::Windows::Forms::ToolStripMenuItem^  viewReadmeToolStripMenuItem;
390
private: System::Windows::Forms::ToolStripMenuItem^  extrasToolStripMenuItem;
391
private: System::Windows::Forms::ImageList^  imageList2;
392
private: System::Windows::Forms::ImageList^  imageList3;
393
private: System::Windows::Forms::ToolStripSeparator^  ContextSeperator2;
394
private: System::Windows::Forms::ToolStripMenuItem^  emailAuthorToolStripMenuItem;
395
private: System::Windows::Forms::ToolStripMenuItem^  visitForumPageToolStripMenuItem;
396
private: System::Windows::Forms::ToolStripMenuItem^  visitWebSiteToolStripMenuItem;
397
private: System::Windows::Forms::ToolStripSeparator^  toolStripSeparator2;
398
private: System::Windows::Forms::ToolStripMenuItem^  checkForUpdatesToolStripMenuItem;
399
private: System::Windows::Forms::Button^  button1;
400
private: System::ComponentModel::BackgroundWorker^  backgroundWorker2;
401
 
402
private: System::ComponentModel::IContainer^  components;
403
		 /// <summary>
404
		/// Required designer variable.
405
		/// </summary>
406
 
407
 
408
#pragma region Windows Form Designer generated code
409
		/// <summary>
410
		/// Required method for Designer support - do not modify
411
		/// the contents of this method with the code editor.
412
		/// </summary>
413
		void InitializeComponent(void)
414
		{
415
			this->components = (gcnew System::ComponentModel::Container());
416
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(MainGui::typeid));
417
			this->GroupDir = (gcnew System::Windows::Forms::GroupBox());
418
			this->ComboDir = (gcnew System::Windows::Forms::ComboBox());
419
			this->ListPackages = (gcnew System::Windows::Forms::ListView());
420
			this->columnHeader1 = (gcnew System::Windows::Forms::ColumnHeader());
421
			this->columnHeader2 = (gcnew System::Windows::Forms::ColumnHeader());
422
			this->columnHeader3 = (gcnew System::Windows::Forms::ColumnHeader());
423
			this->columnHeader4 = (gcnew System::Windows::Forms::ColumnHeader());
424
			this->columnHeader6 = (gcnew System::Windows::Forms::ColumnHeader());
425
			this->columnHeader5 = (gcnew System::Windows::Forms::ColumnHeader());
426
			this->contextMenuStrip1 = (gcnew System::Windows::Forms::ContextMenuStrip(this->components));
427
			this->ContextName = (gcnew System::Windows::Forms::ToolStripMenuItem());
428
			this->toolStripSeparator3 = (gcnew System::Windows::Forms::ToolStripSeparator());
429
			this->uninstallToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
430
			this->UninstallSelectedContext = (gcnew System::Windows::Forms::ToolStripMenuItem());
431
			this->ContextEnable = (gcnew System::Windows::Forms::ToolStripMenuItem());
432
			this->ContextDisable = (gcnew System::Windows::Forms::ToolStripMenuItem());
433
			this->ContextSeperator = (gcnew System::Windows::Forms::ToolStripSeparator());
434
			this->viewReadmeToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
435
			this->extrasToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
436
			this->ContextSeperator2 = (gcnew System::Windows::Forms::ToolStripSeparator());
437
			this->emailAuthorToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
438
			this->visitForumPageToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
439
			this->visitWebSiteToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
440
			this->toolStripSeparator2 = (gcnew System::Windows::Forms::ToolStripSeparator());
441
			this->checkForUpdatesToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
442
			this->panel1 = (gcnew System::Windows::Forms::Panel());
443
			this->ProgressBar = (gcnew System::Windows::Forms::ProgressBar());
444
			this->ButRun = (gcnew System::Windows::Forms::Button());
445
			this->ButClose = (gcnew System::Windows::Forms::Button());
446
			this->GroupPackages = (gcnew System::Windows::Forms::GroupBox());
447
			this->PanelDisplay = (gcnew System::Windows::Forms::Panel());
448
			this->TextDesc = (gcnew System::Windows::Forms::RichTextBox());
449
			this->PictureDisplay = (gcnew System::Windows::Forms::PictureBox());
450
			this->panel2 = (gcnew System::Windows::Forms::Panel());
451
			this->button1 = (gcnew System::Windows::Forms::Button());
452
			this->ButUninstall = (gcnew System::Windows::Forms::Button());
453
			this->ButDisable = (gcnew System::Windows::Forms::Button());
454
			this->ButInstall = (gcnew System::Windows::Forms::Button());
455
			this->backgroundWorker1 = (gcnew System::ComponentModel::BackgroundWorker());
456
			this->backgroundUpdater = (gcnew System::ComponentModel::BackgroundWorker());
457
			this->statusStrip1 = (gcnew System::Windows::Forms::StatusStrip());
458
			this->LabelStatus = (gcnew System::Windows::Forms::ToolStripStatusLabel());
459
			this->imageList1 = (gcnew System::Windows::Forms::ImageList(this->components));
460
			this->imageList2 = (gcnew System::Windows::Forms::ImageList(this->components));
461
			this->imageList3 = (gcnew System::Windows::Forms::ImageList(this->components));
462
			this->backgroundWorker2 = (gcnew System::ComponentModel::BackgroundWorker());
463
			this->GroupDir->SuspendLayout();
464
			this->contextMenuStrip1->SuspendLayout();
465
			this->panel1->SuspendLayout();
466
			this->GroupPackages->SuspendLayout();
467
			this->PanelDisplay->SuspendLayout();
121 cycrow 468
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->PictureDisplay))->BeginInit();
1 cycrow 469
			this->panel2->SuspendLayout();
470
			this->statusStrip1->SuspendLayout();
471
			this->SuspendLayout();
472
			// 
473
			// GroupDir
474
			// 
475
			this->GroupDir->Controls->Add(this->ComboDir);
476
			this->GroupDir->Dock = System::Windows::Forms::DockStyle::Top;
477
			this->GroupDir->Location = System::Drawing::Point(0, 0);
121 cycrow 478
			this->GroupDir->Margin = System::Windows::Forms::Padding(4);
1 cycrow 479
			this->GroupDir->Name = L"GroupDir";
121 cycrow 480
			this->GroupDir->Padding = System::Windows::Forms::Padding(7, 6, 7, 6);
481
			this->GroupDir->Size = System::Drawing::Size(835, 64);
1 cycrow 482
			this->GroupDir->TabIndex = 0;
483
			this->GroupDir->TabStop = false;
484
			this->GroupDir->Text = L"Current Directory";
485
			// 
486
			// ComboDir
487
			// 
488
			this->ComboDir->Dock = System::Windows::Forms::DockStyle::Fill;
489
			this->ComboDir->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
490
			this->ComboDir->FormattingEnabled = true;
121 cycrow 491
			this->ComboDir->Location = System::Drawing::Point(7, 21);
492
			this->ComboDir->Margin = System::Windows::Forms::Padding(13, 12, 13, 12);
1 cycrow 493
			this->ComboDir->Name = L"ComboDir";
121 cycrow 494
			this->ComboDir->Size = System::Drawing::Size(821, 24);
1 cycrow 495
			this->ComboDir->TabIndex = 0;
496
			// 
497
			// ListPackages
498
			// 
499
			this->ListPackages->AllowDrop = true;
121 cycrow 500
			this->ListPackages->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^  >(6) {
501
				this->columnHeader1,
502
					this->columnHeader2, this->columnHeader3, this->columnHeader4, this->columnHeader6, this->columnHeader5
503
			});
1 cycrow 504
			this->ListPackages->ContextMenuStrip = this->contextMenuStrip1;
505
			this->ListPackages->Dock = System::Windows::Forms::DockStyle::Fill;
506
			this->ListPackages->FullRowSelect = true;
507
			this->ListPackages->HideSelection = false;
121 cycrow 508
			this->ListPackages->Location = System::Drawing::Point(4, 19);
509
			this->ListPackages->Margin = System::Windows::Forms::Padding(4);
1 cycrow 510
			this->ListPackages->Name = L"ListPackages";
511
			this->ListPackages->ShowItemToolTips = true;
121 cycrow 512
			this->ListPackages->Size = System::Drawing::Size(827, 478);
1 cycrow 513
			this->ListPackages->TabIndex = 0;
514
			this->ListPackages->UseCompatibleStateImageBehavior = false;
515
			this->ListPackages->View = System::Windows::Forms::View::Details;
121 cycrow 516
			this->ListPackages->DrawSubItem += gcnew System::Windows::Forms::DrawListViewSubItemEventHandler(this, &MainGui::ListPackages_DrawSubItem);
1 cycrow 517
			this->ListPackages->DragDrop += gcnew System::Windows::Forms::DragEventHandler(this, &MainGui::ListPackages_DragDrop);
518
			this->ListPackages->DragOver += gcnew System::Windows::Forms::DragEventHandler(this, &MainGui::ListPackages_DragOver);
121 cycrow 519
			this->ListPackages->MouseDoubleClick += gcnew System::Windows::Forms::MouseEventHandler(this, &MainGui::ListPackages_MouseDoubleClick);
1 cycrow 520
			// 
521
			// columnHeader1
522
			// 
523
			this->columnHeader1->Text = L"Package";
524
			// 
525
			// columnHeader2
526
			// 
527
			this->columnHeader2->Text = L"Author";
528
			// 
529
			// columnHeader3
530
			// 
531
			this->columnHeader3->Text = L"Version";
532
			this->columnHeader3->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
533
			// 
534
			// columnHeader4
535
			// 
536
			this->columnHeader4->Text = L"Updated";
537
			// 
538
			// columnHeader6
539
			// 
540
			this->columnHeader6->DisplayIndex = 5;
541
			this->columnHeader6->Text = L"Type";
542
			// 
543
			// columnHeader5
544
			// 
545
			this->columnHeader5->DisplayIndex = 4;
546
			this->columnHeader5->Text = L"Enabled";
547
			this->columnHeader5->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
548
			// 
549
			// contextMenuStrip1
550
			// 
551
			this->contextMenuStrip1->ImageScalingSize = System::Drawing::Size(24, 24);
121 cycrow 552
			this->contextMenuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(15) {
553
				this->ContextName,
554
					this->toolStripSeparator3, this->uninstallToolStripMenuItem, this->UninstallSelectedContext, this->ContextEnable, this->ContextDisable,
555
					this->ContextSeperator, this->viewReadmeToolStripMenuItem, this->extrasToolStripMenuItem, this->ContextSeperator2, this->emailAuthorToolStripMenuItem,
556
					this->visitForumPageToolStripMenuItem, this->visitWebSiteToolStripMenuItem, this->toolStripSeparator2, this->checkForUpdatesToolStripMenuItem
557
			});
1 cycrow 558
			this->contextMenuStrip1->Name = L"contextMenuStrip1";
121 cycrow 559
			this->contextMenuStrip1->Size = System::Drawing::Size(244, 578);
1 cycrow 560
			this->contextMenuStrip1->Opening += gcnew System::ComponentModel::CancelEventHandler(this, &MainGui::contextMenuStrip1_Opening);
561
			// 
562
			// ContextName
563
			// 
121 cycrow 564
			this->ContextName->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ContextName.Image")));
1 cycrow 565
			this->ContextName->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
566
			this->ContextName->Name = L"ContextName";
121 cycrow 567
			this->ContextName->Size = System::Drawing::Size(243, 50);
1 cycrow 568
			this->ContextName->Text = L"Name";
569
			this->ContextName->Click += gcnew System::EventHandler(this, &MainGui::ContextName_Click);
570
			// 
571
			// toolStripSeparator3
572
			// 
573
			this->toolStripSeparator3->Name = L"toolStripSeparator3";
121 cycrow 574
			this->toolStripSeparator3->Size = System::Drawing::Size(240, 6);
1 cycrow 575
			// 
576
			// uninstallToolStripMenuItem
577
			// 
121 cycrow 578
			this->uninstallToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"uninstallToolStripMenuItem.Image")));
1 cycrow 579
			this->uninstallToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
580
			this->uninstallToolStripMenuItem->Name = L"uninstallToolStripMenuItem";
121 cycrow 581
			this->uninstallToolStripMenuItem->Size = System::Drawing::Size(243, 50);
1 cycrow 582
			this->uninstallToolStripMenuItem->Text = L"Uninstall";
583
			this->uninstallToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::uninstallToolStripMenuItem_Click);
584
			// 
585
			// UninstallSelectedContext
586
			// 
121 cycrow 587
			this->UninstallSelectedContext->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"UninstallSelectedContext.Image")));
1 cycrow 588
			this->UninstallSelectedContext->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
589
			this->UninstallSelectedContext->Name = L"UninstallSelectedContext";
121 cycrow 590
			this->UninstallSelectedContext->Size = System::Drawing::Size(243, 50);
1 cycrow 591
			this->UninstallSelectedContext->Text = L"Uninstall Selected";
592
			this->UninstallSelectedContext->Click += gcnew System::EventHandler(this, &MainGui::UninstallSelectedContext_Click);
593
			// 
594
			// ContextEnable
595
			// 
121 cycrow 596
			this->ContextEnable->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ContextEnable.Image")));
1 cycrow 597
			this->ContextEnable->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
598
			this->ContextEnable->Name = L"ContextEnable";
121 cycrow 599
			this->ContextEnable->Size = System::Drawing::Size(243, 50);
1 cycrow 600
			this->ContextEnable->Text = L"Enable";
601
			this->ContextEnable->Click += gcnew System::EventHandler(this, &MainGui::ContextEnable_Click);
602
			// 
603
			// ContextDisable
604
			// 
121 cycrow 605
			this->ContextDisable->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ContextDisable.Image")));
1 cycrow 606
			this->ContextDisable->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
607
			this->ContextDisable->Name = L"ContextDisable";
121 cycrow 608
			this->ContextDisable->Size = System::Drawing::Size(243, 50);
1 cycrow 609
			this->ContextDisable->Text = L"Disable";
610
			this->ContextDisable->Click += gcnew System::EventHandler(this, &MainGui::ContextDisable_Click);
611
			// 
612
			// ContextSeperator
613
			// 
614
			this->ContextSeperator->Name = L"ContextSeperator";
121 cycrow 615
			this->ContextSeperator->Size = System::Drawing::Size(240, 6);
1 cycrow 616
			// 
617
			// viewReadmeToolStripMenuItem
618
			// 
121 cycrow 619
			this->viewReadmeToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"viewReadmeToolStripMenuItem.Image")));
1 cycrow 620
			this->viewReadmeToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
621
			this->viewReadmeToolStripMenuItem->Name = L"viewReadmeToolStripMenuItem";
121 cycrow 622
			this->viewReadmeToolStripMenuItem->Size = System::Drawing::Size(243, 50);
1 cycrow 623
			this->viewReadmeToolStripMenuItem->Text = L"View Readme";
624
			// 
625
			// extrasToolStripMenuItem
626
			// 
121 cycrow 627
			this->extrasToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"extrasToolStripMenuItem.Image")));
1 cycrow 628
			this->extrasToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
629
			this->extrasToolStripMenuItem->Name = L"extrasToolStripMenuItem";
121 cycrow 630
			this->extrasToolStripMenuItem->Size = System::Drawing::Size(243, 50);
1 cycrow 631
			this->extrasToolStripMenuItem->Text = L"Extras";
632
			// 
633
			// ContextSeperator2
634
			// 
635
			this->ContextSeperator2->Name = L"ContextSeperator2";
121 cycrow 636
			this->ContextSeperator2->Size = System::Drawing::Size(240, 6);
1 cycrow 637
			// 
638
			// emailAuthorToolStripMenuItem
639
			// 
121 cycrow 640
			this->emailAuthorToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"emailAuthorToolStripMenuItem.Image")));
1 cycrow 641
			this->emailAuthorToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
642
			this->emailAuthorToolStripMenuItem->Name = L"emailAuthorToolStripMenuItem";
121 cycrow 643
			this->emailAuthorToolStripMenuItem->Size = System::Drawing::Size(243, 50);
1 cycrow 644
			this->emailAuthorToolStripMenuItem->Text = L"Email Author";
645
			this->emailAuthorToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::emailAuthorToolStripMenuItem_Click);
646
			// 
647
			// visitForumPageToolStripMenuItem
648
			// 
121 cycrow 649
			this->visitForumPageToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"visitForumPageToolStripMenuItem.Image")));
1 cycrow 650
			this->visitForumPageToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
651
			this->visitForumPageToolStripMenuItem->Name = L"visitForumPageToolStripMenuItem";
121 cycrow 652
			this->visitForumPageToolStripMenuItem->Size = System::Drawing::Size(243, 50);
1 cycrow 653
			this->visitForumPageToolStripMenuItem->Text = L"Visit Forum Page";
654
			this->visitForumPageToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::visitForumPageToolStripMenuItem_Click);
655
			// 
656
			// visitWebSiteToolStripMenuItem
657
			// 
121 cycrow 658
			this->visitWebSiteToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"visitWebSiteToolStripMenuItem.Image")));
1 cycrow 659
			this->visitWebSiteToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
660
			this->visitWebSiteToolStripMenuItem->Name = L"visitWebSiteToolStripMenuItem";
121 cycrow 661
			this->visitWebSiteToolStripMenuItem->Size = System::Drawing::Size(243, 50);
1 cycrow 662
			this->visitWebSiteToolStripMenuItem->Text = L"Visit Web Site";
663
			this->visitWebSiteToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::visitWebSiteToolStripMenuItem_Click);
664
			// 
665
			// toolStripSeparator2
666
			// 
667
			this->toolStripSeparator2->Name = L"toolStripSeparator2";
121 cycrow 668
			this->toolStripSeparator2->Size = System::Drawing::Size(240, 6);
1 cycrow 669
			// 
670
			// checkForUpdatesToolStripMenuItem
671
			// 
121 cycrow 672
			this->checkForUpdatesToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"checkForUpdatesToolStripMenuItem.Image")));
1 cycrow 673
			this->checkForUpdatesToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
674
			this->checkForUpdatesToolStripMenuItem->Name = L"checkForUpdatesToolStripMenuItem";
121 cycrow 675
			this->checkForUpdatesToolStripMenuItem->Size = System::Drawing::Size(243, 50);
1 cycrow 676
			this->checkForUpdatesToolStripMenuItem->Text = L"Check For Updates";
677
			this->checkForUpdatesToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::checkForUpdatesToolStripMenuItem_Click);
678
			// 
679
			// panel1
680
			// 
681
			this->panel1->AllowDrop = true;
682
			this->panel1->Controls->Add(this->ProgressBar);
683
			this->panel1->Controls->Add(this->ButRun);
684
			this->panel1->Controls->Add(this->ButClose);
685
			this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;
121 cycrow 686
			this->panel1->Location = System::Drawing::Point(0, 681);
687
			this->panel1->Margin = System::Windows::Forms::Padding(7, 12, 7, 12);
1 cycrow 688
			this->panel1->Name = L"panel1";
121 cycrow 689
			this->panel1->Size = System::Drawing::Size(835, 46);
1 cycrow 690
			this->panel1->TabIndex = 2;
691
			// 
692
			// ProgressBar
693
			// 
694
			this->ProgressBar->Dock = System::Windows::Forms::DockStyle::Fill;
695
			this->ProgressBar->Location = System::Drawing::Point(0, 0);
121 cycrow 696
			this->ProgressBar->Margin = System::Windows::Forms::Padding(13, 12, 13, 12);
1 cycrow 697
			this->ProgressBar->MarqueeAnimationSpeed = 5;
698
			this->ProgressBar->Name = L"ProgressBar";
121 cycrow 699
			this->ProgressBar->Size = System::Drawing::Size(576, 46);
1 cycrow 700
			this->ProgressBar->Style = System::Windows::Forms::ProgressBarStyle::Marquee;
701
			this->ProgressBar->TabIndex = 1;
702
			this->ProgressBar->Visible = false;
703
			// 
704
			// ButRun
705
			// 
706
			this->ButRun->AutoSize = true;
707
			this->ButRun->Dock = System::Windows::Forms::DockStyle::Right;
121 cycrow 708
			this->ButRun->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ButRun.Image")));
709
			this->ButRun->Location = System::Drawing::Point(576, 0);
710
			this->ButRun->Margin = System::Windows::Forms::Padding(4);
1 cycrow 711
			this->ButRun->Name = L"ButRun";
121 cycrow 712
			this->ButRun->Size = System::Drawing::Size(159, 46);
1 cycrow 713
			this->ButRun->TabIndex = 2;
714
			this->ButRun->Text = L"Run Game";
715
			this->ButRun->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
716
			this->ButRun->UseVisualStyleBackColor = true;
717
			this->ButRun->Click += gcnew System::EventHandler(this, &MainGui::ButRun_Click);
718
			// 
719
			// ButClose
720
			// 
721
			this->ButClose->Dock = System::Windows::Forms::DockStyle::Right;
121 cycrow 722
			this->ButClose->Location = System::Drawing::Point(735, 0);
723
			this->ButClose->Margin = System::Windows::Forms::Padding(4);
1 cycrow 724
			this->ButClose->Name = L"ButClose";
121 cycrow 725
			this->ButClose->Size = System::Drawing::Size(100, 46);
1 cycrow 726
			this->ButClose->TabIndex = 0;
727
			this->ButClose->Text = L"Close";
728
			this->ButClose->UseVisualStyleBackColor = true;
729
			// 
730
			// GroupPackages
731
			// 
732
			this->GroupPackages->Controls->Add(this->ListPackages);
733
			this->GroupPackages->Controls->Add(this->PanelDisplay);
734
			this->GroupPackages->Controls->Add(this->panel2);
735
			this->GroupPackages->Dock = System::Windows::Forms::DockStyle::Fill;
121 cycrow 736
			this->GroupPackages->Location = System::Drawing::Point(0, 64);
737
			this->GroupPackages->Margin = System::Windows::Forms::Padding(4);
1 cycrow 738
			this->GroupPackages->Name = L"GroupPackages";
121 cycrow 739
			this->GroupPackages->Padding = System::Windows::Forms::Padding(4);
740
			this->GroupPackages->Size = System::Drawing::Size(835, 617);
1 cycrow 741
			this->GroupPackages->TabIndex = 3;
742
			this->GroupPackages->TabStop = false;
743
			this->GroupPackages->Text = L"Installed Packages";
744
			// 
745
			// PanelDisplay
746
			// 
747
			this->PanelDisplay->AllowDrop = true;
748
			this->PanelDisplay->Controls->Add(this->TextDesc);
749
			this->PanelDisplay->Controls->Add(this->PictureDisplay);
750
			this->PanelDisplay->Dock = System::Windows::Forms::DockStyle::Bottom;
121 cycrow 751
			this->PanelDisplay->Location = System::Drawing::Point(4, 497);
752
			this->PanelDisplay->Margin = System::Windows::Forms::Padding(4);
1 cycrow 753
			this->PanelDisplay->Name = L"PanelDisplay";
121 cycrow 754
			this->PanelDisplay->Size = System::Drawing::Size(827, 84);
1 cycrow 755
			this->PanelDisplay->TabIndex = 2;
756
			// 
757
			// TextDesc
758
			// 
759
			this->TextDesc->Dock = System::Windows::Forms::DockStyle::Fill;
121 cycrow 760
			this->TextDesc->Location = System::Drawing::Point(96, 0);
761
			this->TextDesc->Margin = System::Windows::Forms::Padding(4);
1 cycrow 762
			this->TextDesc->Name = L"TextDesc";
763
			this->TextDesc->ReadOnly = true;
121 cycrow 764
			this->TextDesc->Size = System::Drawing::Size(731, 84);
1 cycrow 765
			this->TextDesc->TabIndex = 1;
766
			this->TextDesc->Text = L"";
767
			// 
768
			// PictureDisplay
769
			// 
770
			this->PictureDisplay->Dock = System::Windows::Forms::DockStyle::Left;
121 cycrow 771
			this->PictureDisplay->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"PictureDisplay.Image")));
1 cycrow 772
			this->PictureDisplay->Location = System::Drawing::Point(0, 0);
121 cycrow 773
			this->PictureDisplay->Margin = System::Windows::Forms::Padding(4);
1 cycrow 774
			this->PictureDisplay->Name = L"PictureDisplay";
121 cycrow 775
			this->PictureDisplay->Size = System::Drawing::Size(96, 84);
1 cycrow 776
			this->PictureDisplay->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
777
			this->PictureDisplay->TabIndex = 2;
778
			this->PictureDisplay->TabStop = false;
779
			// 
780
			// panel2
781
			// 
782
			this->panel2->AllowDrop = true;
783
			this->panel2->Controls->Add(this->button1);
784
			this->panel2->Controls->Add(this->ButUninstall);
785
			this->panel2->Controls->Add(this->ButDisable);
786
			this->panel2->Controls->Add(this->ButInstall);
787
			this->panel2->Dock = System::Windows::Forms::DockStyle::Bottom;
121 cycrow 788
			this->panel2->Location = System::Drawing::Point(4, 581);
789
			this->panel2->Margin = System::Windows::Forms::Padding(4);
1 cycrow 790
			this->panel2->Name = L"panel2";
121 cycrow 791
			this->panel2->Size = System::Drawing::Size(827, 32);
1 cycrow 792
			this->panel2->TabIndex = 0;
793
			// 
794
			// button1
795
			// 
796
			this->button1->Dock = System::Windows::Forms::DockStyle::Left;
121 cycrow 797
			this->button1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"button1.Image")));
798
			this->button1->Location = System::Drawing::Point(172, 0);
799
			this->button1->Margin = System::Windows::Forms::Padding(4);
1 cycrow 800
			this->button1->Name = L"button1";
121 cycrow 801
			this->button1->Size = System::Drawing::Size(161, 32);
1 cycrow 802
			this->button1->TabIndex = 3;
803
			this->button1->Text = L"Install Archive";
804
			this->button1->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
805
			this->button1->UseVisualStyleBackColor = true;
806
			this->button1->Click += gcnew System::EventHandler(this, &MainGui::button1_Click);
807
			// 
808
			// ButUninstall
809
			// 
810
			this->ButUninstall->AutoSize = true;
811
			this->ButUninstall->Dock = System::Windows::Forms::DockStyle::Right;
121 cycrow 812
			this->ButUninstall->Location = System::Drawing::Point(476, 0);
813
			this->ButUninstall->Margin = System::Windows::Forms::Padding(4);
1 cycrow 814
			this->ButUninstall->Name = L"ButUninstall";
121 cycrow 815
			this->ButUninstall->Size = System::Drawing::Size(163, 32);
1 cycrow 816
			this->ButUninstall->TabIndex = 2;
817
			this->ButUninstall->Text = L"Uninstall";
818
			this->ButUninstall->UseVisualStyleBackColor = true;
819
			// 
820
			// ButDisable
821
			// 
822
			this->ButDisable->AutoSize = true;
823
			this->ButDisable->Dock = System::Windows::Forms::DockStyle::Right;
121 cycrow 824
			this->ButDisable->Location = System::Drawing::Point(639, 0);
825
			this->ButDisable->Margin = System::Windows::Forms::Padding(4);
1 cycrow 826
			this->ButDisable->Name = L"ButDisable";
121 cycrow 827
			this->ButDisable->Size = System::Drawing::Size(188, 32);
1 cycrow 828
			this->ButDisable->TabIndex = 1;
829
			this->ButDisable->Text = L"Disable";
830
			this->ButDisable->UseVisualStyleBackColor = true;
831
			// 
832
			// ButInstall
833
			// 
834
			this->ButInstall->AutoSize = true;
835
			this->ButInstall->Dock = System::Windows::Forms::DockStyle::Left;
121 cycrow 836
			this->ButInstall->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ButInstall.Image")));
1 cycrow 837
			this->ButInstall->Location = System::Drawing::Point(0, 0);
121 cycrow 838
			this->ButInstall->Margin = System::Windows::Forms::Padding(4);
1 cycrow 839
			this->ButInstall->Name = L"ButInstall";
121 cycrow 840
			this->ButInstall->Size = System::Drawing::Size(172, 32);
1 cycrow 841
			this->ButInstall->TabIndex = 0;
842
			this->ButInstall->Text = L"Install Package";
843
			this->ButInstall->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
844
			this->ButInstall->UseVisualStyleBackColor = true;
845
			// 
846
			// statusStrip1
847
			// 
121 cycrow 848
			this->statusStrip1->ImageScalingSize = System::Drawing::Size(20, 20);
849
			this->statusStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(1) { this->LabelStatus });
850
			this->statusStrip1->Location = System::Drawing::Point(0, 727);
1 cycrow 851
			this->statusStrip1->Name = L"statusStrip1";
121 cycrow 852
			this->statusStrip1->Padding = System::Windows::Forms::Padding(1, 0, 19, 0);
853
			this->statusStrip1->Size = System::Drawing::Size(835, 24);
1 cycrow 854
			this->statusStrip1->TabIndex = 5;
855
			this->statusStrip1->Text = L"statusStrip1";
856
			// 
857
			// LabelStatus
858
			// 
859
			this->LabelStatus->Name = L"LabelStatus";
121 cycrow 860
			this->LabelStatus->Size = System::Drawing::Size(0, 19);
1 cycrow 861
			// 
862
			// imageList1
863
			// 
121 cycrow 864
			this->imageList1->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^>(resources->GetObject(L"imageList1.ImageStream")));
1 cycrow 865
			this->imageList1->TransparentColor = System::Drawing::Color::Transparent;
866
			this->imageList1->Images->SetKeyName(0, L"ship.png");
867
			this->imageList1->Images->SetKeyName(1, L"package.png");
868
			this->imageList1->Images->SetKeyName(2, L"fake.png");
869
			this->imageList1->Images->SetKeyName(3, L"library.png");
870
			this->imageList1->Images->SetKeyName(4, L"archive.png");
86 cycrow 871
			this->imageList1->Images->SetKeyName(5, L"tick.png");
872
			this->imageList1->Images->SetKeyName(6, L"no.png");
1 cycrow 873
			// 
874
			// imageList2
875
			// 
121 cycrow 876
			this->imageList2->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^>(resources->GetObject(L"imageList2.ImageStream")));
1 cycrow 877
			this->imageList2->TransparentColor = System::Drawing::Color::Transparent;
878
			this->imageList2->Images->SetKeyName(0, L"application");
879
			this->imageList2->Images->SetKeyName(1, L"exe");
880
			this->imageList2->Images->SetKeyName(2, L"doc");
881
			this->imageList2->Images->SetKeyName(3, L"pdf");
882
			this->imageList2->Images->SetKeyName(4, L"xls");
883
			this->imageList2->Images->SetKeyName(5, L"xlsx");
884
			// 
885
			// imageList3
886
			// 
887
			this->imageList3->ColorDepth = System::Windows::Forms::ColorDepth::Depth8Bit;
888
			this->imageList3->ImageSize = System::Drawing::Size(16, 16);
889
			this->imageList3->TransparentColor = System::Drawing::Color::Transparent;
890
			// 
891
			// backgroundWorker2
892
			// 
893
			this->backgroundWorker2->WorkerReportsProgress = true;
894
			this->backgroundWorker2->WorkerSupportsCancellation = true;
895
			this->backgroundWorker2->DoWork += gcnew System::ComponentModel::DoWorkEventHandler(this, &MainGui::backgroundWorker2_DoWork);
896
			this->backgroundWorker2->RunWorkerCompleted += gcnew System::ComponentModel::RunWorkerCompletedEventHandler(this, &MainGui::backgroundWorker2_RunWorkerCompleted);
897
			// 
898
			// MainGui
899
			// 
900
			this->AllowDrop = true;
121 cycrow 901
			this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
1 cycrow 902
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
121 cycrow 903
			this->ClientSize = System::Drawing::Size(835, 751);
1 cycrow 904
			this->Controls->Add(this->GroupPackages);
905
			this->Controls->Add(this->panel1);
906
			this->Controls->Add(this->GroupDir);
907
			this->Controls->Add(this->statusStrip1);
121 cycrow 908
			this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));
909
			this->Margin = System::Windows::Forms::Padding(4);
1 cycrow 910
			this->Name = L"MainGui";
911
			this->StartPosition = System::Windows::Forms::FormStartPosition::Manual;
912
			this->Text = L"X-Universe Plugin Manager Lite";
913
			this->Load += gcnew System::EventHandler(this, &MainGui::MainGui_Load);
121 cycrow 914
			this->Shown += gcnew System::EventHandler(this, &MainGui::MainGui_Shown);
1 cycrow 915
			this->GroupDir->ResumeLayout(false);
916
			this->contextMenuStrip1->ResumeLayout(false);
917
			this->panel1->ResumeLayout(false);
918
			this->panel1->PerformLayout();
919
			this->GroupPackages->ResumeLayout(false);
920
			this->PanelDisplay->ResumeLayout(false);
121 cycrow 921
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->PictureDisplay))->EndInit();
1 cycrow 922
			this->panel2->ResumeLayout(false);
923
			this->panel2->PerformLayout();
924
			this->statusStrip1->ResumeLayout(false);
925
			this->statusStrip1->PerformLayout();
926
			this->ResumeLayout(false);
927
			this->PerformLayout();
928
 
929
		}
930
#pragma endregion
121 cycrow 931
private: System::Void MainGui_Load(System::Object^  sender, System::EventArgs^  e);
932
private: System::Void MainGui_Shown(System::Object^  sender, System::EventArgs^  e);
1 cycrow 933
private: System::Void ButRun_Click(System::Object^  sender, System::EventArgs^  e) {
934
			 this->LaunchGame();
935
		 }
936
private: System::Void uninstallToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
937
			 if ( m_pListItem )
938
			 {
939
				 ArrayList ^List = gcnew ArrayList();
940
				 List->Add(m_pListItem);
941
				 this->UninstallList(List);
942
			 }
943
		 }
944
private: System::Void ContextEnable_Click(System::Object^  sender, System::EventArgs^  e) {
945
			 if ( m_pListItem )
946
			 {
947
				 ArrayList ^List = gcnew ArrayList();
948
				 List->Add(m_pListItem);
949
				 this->DisableList(List);
950
			 }
951
		 }
952
private: System::Void ContextDisable_Click(System::Object^  sender, System::EventArgs^  e) {
953
			 if ( m_pListItem )
954
			 {
955
				 ArrayList ^List = gcnew ArrayList();
956
				 List->Add(m_pListItem);
957
				 this->DisableList(List);
958
			 }
959
		 }
960
private: System::Void ListPackages_DragOver(System::Object^  sender, System::Windows::Forms::DragEventArgs^  e);
961
private: System::Void ListPackages_DragDrop(System::Object^  sender, System::Windows::Forms::DragEventArgs^  e);
962
private: System::Void UninstallSelectedContext_Click(System::Object^  sender, System::EventArgs^  e) {
963
			 UninstallEvent(sender, e);
964
		 }
965
private: System::Void ContextName_Click(System::Object^  sender, System::EventArgs^  e) {
966
 
967
			CBaseFile *p = this->GetFileFromItem(m_pListItem);
968
			if ( p )
969
			{
970
				SpkExplorer::PackageInfo ^info = gcnew SpkExplorer::PackageInfo(p, m_pPackages->GetLanguage());
971
				info->ShowDialog(this);
972
			}
973
		 }
974
private: System::Void contextMenuStrip1_Opening(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
975
			 this->OpenContextMenu(sender, e);
976
		 }
977
private: System::Void ListPackages_MouseDoubleClick(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) {
978
			ListViewItem ^item = this->FindSelectedItem();
979
			if ( item )
980
			{
981
				CBaseFile *p = this->GetFileFromItem(item);
982
				if ( p )
983
				{
984
					SpkExplorer::PackageInfo ^info = gcnew SpkExplorer::PackageInfo(p, m_pPackages->GetLanguage());
985
					info->ShowDialog(this);
986
				}
987
			}
988
		 }
989
private: System::Void emailAuthorToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
990
			 this->RunFromToolItem(cli::safe_cast<ToolStripMenuItem ^>(sender));
991
		 }
992
private: System::Void visitForumPageToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
993
			 this->RunFromToolItem(cli::safe_cast<ToolStripMenuItem ^>(sender));
994
		 }
995
private: System::Void visitWebSiteToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
996
			 this->RunFromToolItem(cli::safe_cast<ToolStripMenuItem ^>(sender));
997
		 }
998
private: System::Void checkForUpdatesToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
999
			if ( m_pListItem )
1000
			{
1001
				CBaseFile *p = this->GetFileFromItem(m_pListItem);
1002
				if ( p )
1003
				{
1004
					CheckUpdate ^update = gcnew CheckUpdate(m_pPackages, this->imageList1);
1005
					update->OnePackage(p);
1006
					this->ClearSelectedItems();
1007
					if ( update->ShowDialog(this) == Windows::Forms::DialogResult::OK )
1008
					{
1009
						for ( int i = 0; i < update->GetInstallList()->Count; i++ )
1010
							this->InstallPackage(Convert::ToString(update->GetInstallList()[i]), false, false, true);
1011
						this->StartInstalling(false, true);
1012
					}
1013
				}
1014
			}
1015
		 }
1016
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
1017
			 this->InstallArchive();
1018
		 }
1019
private: System::Void backgroundWorker2_DoWork(System::Object^  sender, System::ComponentModel::DoWorkEventArgs^  e) {
1020
			m_pConverted = (CArchiveFile *)m_pPackages->CreateFromArchive(CyStringFromSystemString(m_sConvertFile), true);
1021
		 }
1022
private: System::Void backgroundWorker2_RunWorkerCompleted(System::Object^  sender, System::ComponentModel::RunWorkerCompletedEventArgs^  e) {
1023
				if ( m_pWait ) 
1024
				{
1025
					m_pWait->Close();
1026
					delete m_pWait;
1027
					m_pWait = nullptr;
1028
				}
1029
 
1030
				if ( !m_pConverted )
1031
					this->DisplayMessageBox(false, "Unable to open", "Unable to open archive file, " + m_sConvertFile, MessageBoxButtons::OK, MessageBoxIcon::Error);
1032
				else
1033
				{
1034
					bool errored = false;
1035
					int errorNum = m_pPackages->PrepareInstallPackage(m_pConverted, false, false, IC_ALL);
1036
					if ( errorNum != INSTALLCHECK_OK )
1037
					{
1038
						if ( errorNum == INSTALLCHECK_NOSHIP )
1039
						{
121 cycrow 1040
							this->DisplayMessageBox(false, "No Ships", "Ships are not supported for " + _US(m_pPackages->getGameName()), MessageBoxButtons::OK, MessageBoxIcon::Stop);
1 cycrow 1041
							errored = true;
1042
						}
1043
						else if ( m_pPackages->PrepareInstallPackage(m_pConverted, false, false, IC_MODIFIED) != INSTALLCHECK_OK )
1044
						{
1045
							this->DisplayMessageBox(false, "Installing", "Currently in Vanilla Mode, Package is not an Vanilla Package\n" + SystemStringFromCyString(m_pConverted->GetLanguageName(m_pPackages->GetLanguage())) + "\n\nSwitch to modified mode if you wish to install this package", MessageBoxButtons::OK, MessageBoxIcon::Question);
1046
							errored = true;
1047
						}
1048
					}
1049
 
1050
					if ( !errored )
1051
						this->StartInstallingArchive(false, true);
1052
				}
1053
		 }
86 cycrow 1054
private: System::Void ListPackages_DrawSubItem(System::Object^  sender, System::Windows::Forms::DrawListViewSubItemEventArgs^  e) {
1055
			 if ( System::String::Compare(e->SubItem->Text, "Yes") == 0 ) {
1056
				e->DrawDefault = false;
1057
				e->DrawBackground();
1058
 
1059
				Image ^img = this->imageList1->Images[this->imageList1->Images->IndexOfKey("tick.png")];
1060
				e->Graphics->DrawImage(img, e->SubItem->Bounds.Location);
1061
				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);
1062
			 }
1063
			 else 
1064
				e->DrawDefault = true;
1065
		 }
1 cycrow 1066
};
1067
}