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:
|
196 |
cycrow |
50 |
MainGui(CPackages *p, Utils::WStringList *list, Utils::WStringList *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
|
133 |
cycrow |
71 |
m_lAvailablePackages = NULL;
|
1 |
cycrow |
72 |
m_pPackages = p;
|
|
|
73 |
m_pDirList = list;
|
|
|
74 |
m_pRemovedDirList = removed;
|
|
|
75 |
m_pUpdateList = NULL;
|
|
|
76 |
m_pListItem = nullptr;
|
197 |
cycrow |
77 |
m_pFileErrors = new Utils::WStringList;
|
1 |
cycrow |
78 |
m_bDirLocked = false;
|
|
|
79 |
|
|
|
80 |
// default values
|
|
|
81 |
m_iBackgroundTask = MGUI_BACKGROUND_NONE;
|
|
|
82 |
m_bSortingAsc = true;
|
|
|
83 |
m_iSortingColumn = SORT_NAME;
|
|
|
84 |
m_bExperimental = m_bCheat = m_bModSelectorDetails = m_bShips = m_bDownloadable = m_bSigned = false;
|
|
|
85 |
m_bAutoUpdate = true;
|
|
|
86 |
m_bRunningBackground = false;
|
|
|
87 |
m_bDisplayDialog = false;
|
|
|
88 |
m_bDisplayMessage = false;
|
|
|
89 |
|
|
|
90 |
m_sGameArgs = "-noabout";
|
|
|
91 |
m_pLauncherFlags = new SGameLauncherFlags;
|
|
|
92 |
m_pLauncherFlags->iIgnoreJoy = 0;
|
|
|
93 |
m_pLauncherFlags->bNoAbout = true;
|
|
|
94 |
|
|
|
95 |
m_iSizeX = -1;
|
|
|
96 |
m_iSizeY = -1;
|
|
|
97 |
|
|
|
98 |
this->Text = GetProgramName(m_bAdvanced) + " " + GetVersionString();
|
|
|
99 |
|
|
|
100 |
// update the gui
|
|
|
101 |
this->UpdateControls();
|
|
|
102 |
|
|
|
103 |
// update the display
|
197 |
cycrow |
104 |
this->UpdateDirList(L"");
|
1 |
cycrow |
105 |
this->UpdatePackages();
|
|
|
106 |
|
|
|
107 |
// setup the events
|
|
|
108 |
this->SetupEventHandlers();
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
void DisplayLocked(bool inthread);
|
|
|
112 |
void CheckProtectedDir();
|
126 |
cycrow |
113 |
void OpenModSelecter();
|
1 |
cycrow |
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 |
}
|
126 |
cycrow |
155 |
void SetSaveGameManager(int i);
|
1 |
cycrow |
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
|
196 |
cycrow |
184 |
void UpdateDirList(const Utils::WString ¤t);
|
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();
|
197 |
cycrow |
205 |
void ChangeDirectory(const Utils::WString &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 |
|
133 |
cycrow |
236 |
void FindPackages();
|
1 |
cycrow |
237 |
void FindPackagesOnline();
|
|
|
238 |
void ViewFileLog();
|
|
|
239 |
void EditGlobalsDialog();
|
88 |
cycrow |
240 |
void EditWaresDialog();
|
89 |
cycrow |
241 |
void CommandSlotsDialog();
|
1 |
cycrow |
242 |
void FakePatchControlDialog();
|
|
|
243 |
void ExportPackageList();
|
|
|
244 |
void VerifyInstalledFiles();
|
|
|
245 |
CPackages *GetPackageControl() { return m_pPackages; }
|
|
|
246 |
|
|
|
247 |
protected:
|
|
|
248 |
/// <summary>
|
|
|
249 |
/// Clean up any resources being used.
|
|
|
250 |
/// </summary>
|
|
|
251 |
~MainGui()
|
|
|
252 |
{
|
|
|
253 |
if (components)
|
|
|
254 |
{
|
|
|
255 |
delete components;
|
|
|
256 |
}
|
|
|
257 |
delete m_pFileErrors;
|
|
|
258 |
delete m_pLauncherFlags;
|
104 |
cycrow |
259 |
|
133 |
cycrow |
260 |
if (m_lAvailablePackages)
|
|
|
261 |
{
|
166 |
cycrow |
262 |
m_lAvailablePackages->clear();
|
133 |
cycrow |
263 |
delete m_lAvailablePackages;
|
|
|
264 |
}
|
|
|
265 |
|
104 |
cycrow |
266 |
CLanguages::Release();
|
1 |
cycrow |
267 |
}
|
|
|
268 |
|
|
|
269 |
private:
|
|
|
270 |
// Events
|
|
|
271 |
void ClosedEvent(System::Object ^Sender, System::EventArgs ^E) { this->Close(); }
|
|
|
272 |
void PackageListSelected(System::Object ^Sender, System::EventArgs ^E);
|
|
|
273 |
void PackageListSort(System::Object ^Sender, ColumnClickEventArgs ^E);
|
|
|
274 |
void UninstallEvent(System::Object ^Sender, System::EventArgs ^E);
|
|
|
275 |
void DisableEvent(System::Object ^Sender, System::EventArgs ^E);
|
|
|
276 |
void ChangeDirectoryEvent(System::Object ^Sender, System::EventArgs ^E);
|
|
|
277 |
void Background_DoWork(System::Object ^Sender, DoWorkEventArgs ^E);
|
|
|
278 |
void Background_Progress(System::Object ^Sender, ProgressChangedEventArgs ^E);
|
|
|
279 |
void Background_Finished(System::Object ^Sender, RunWorkerCompletedEventArgs ^E) { this->Background_Finished(); }
|
|
|
280 |
void Background_Finished();
|
|
|
281 |
void CloseEvent(System::Object ^Sender, FormClosingEventArgs ^E);
|
|
|
282 |
void Updater_Finished(System::Object ^Sender, RunWorkerCompletedEventArgs ^E);
|
|
|
283 |
void Updater_DoWork(System::Object ^Sender, DoWorkEventArgs ^E);
|
|
|
284 |
void TimerEvent_CheckFile(System::Object ^Sender, System::EventArgs ^E);
|
|
|
285 |
void RunItem(System::Object ^sender, System::EventArgs ^e);
|
|
|
286 |
|
|
|
287 |
ListViewItem ^FindSelectedItem();
|
|
|
288 |
CBaseFile *GetFileFromItem(ListViewItem ^item);
|
|
|
289 |
|
|
|
290 |
System::Void OpenContextMenu(System::Object ^Sender, CancelEventArgs ^E);
|
|
|
291 |
void _DisplayPackages(CBaseFile *currentParent, ListViewGroup ^addGroup);
|
|
|
292 |
|
|
|
293 |
void UpdateRunButton();
|
|
|
294 |
bool EnablePackage(CBaseFile *p);
|
|
|
295 |
bool StartInstallingArchive(bool builtin, bool background) { return StartInstalling(builtin, background, true); }
|
|
|
296 |
bool StartInstalling(bool builtin, bool background) { return StartInstalling(builtin, background, false); }
|
|
|
297 |
bool StartInstalling(bool builtin, bool background, bool archive);
|
|
|
298 |
void DoInstall(bool builtin, bool frombackground);
|
|
|
299 |
void DoUninstall();
|
|
|
300 |
void DoDisable();
|
|
|
301 |
CBaseFile *FindPackageFromList(ListViewItem ^item);
|
|
|
302 |
|
|
|
303 |
bool StartBackground(int type);
|
|
|
304 |
bool StartBackground(int type, System::String ^info);
|
|
|
305 |
void LaunchGame();
|
|
|
306 |
System::Windows::Forms::DialogResult DisplayMessageBox(bool inthread, System::String ^title, System::String ^text, MessageBoxButtons buttons, MessageBoxIcon icon);
|
|
|
307 |
|
|
|
308 |
void DisableList(ArrayList ^List);
|
|
|
309 |
void UninstallList(ArrayList ^List);
|
|
|
310 |
|
|
|
311 |
void RunFromToolItem(ToolStripMenuItem ^item);
|
|
|
312 |
|
|
|
313 |
MenuBar ^m_pMenuBar;
|
|
|
314 |
CPackages *m_pPackages;
|
196 |
cycrow |
315 |
Utils::WStringList *m_pDirList;
|
|
|
316 |
Utils::WStringList *m_pRemovedDirList;
|
197 |
cycrow |
317 |
Utils::WStringList *m_pUpdateList;
|
|
|
318 |
Utils::WStringList *m_pFileErrors;
|
1 |
cycrow |
319 |
int m_iBackgroundTask;
|
|
|
320 |
int m_iSortingColumn;
|
|
|
321 |
bool m_bSortingAsc;
|
|
|
322 |
|
|
|
323 |
bool m_bSigned;
|
|
|
324 |
bool m_bShips;
|
|
|
325 |
bool m_bExperimental;
|
|
|
326 |
bool m_bCheat;
|
|
|
327 |
bool m_bDownloadable;
|
|
|
328 |
bool m_bModSelectorDetails;
|
|
|
329 |
bool m_bAutoUpdate;
|
|
|
330 |
bool m_bRunningBackground;
|
|
|
331 |
bool m_bAdvanced;
|
|
|
332 |
bool m_bDirLocked;
|
|
|
333 |
|
|
|
334 |
System::String ^m_sBackgroundInfo;
|
|
|
335 |
System::String ^m_sDownload;
|
|
|
336 |
System::String ^m_sRun;
|
|
|
337 |
System::String ^m_sGameArgs;
|
|
|
338 |
|
|
|
339 |
PackageInstalled ^m_pPi;
|
|
|
340 |
bool m_bDisplayDialog;
|
|
|
341 |
bool m_bDisplayMessage;
|
|
|
342 |
System::String ^m_sMessageTitle;
|
|
|
343 |
System::String ^m_sMessageText;
|
|
|
344 |
MessageBoxIcon m_messageIcon;
|
|
|
345 |
MessageBoxButtons m_messageButtons;
|
|
|
346 |
|
|
|
347 |
int m_iSizeX;
|
|
|
348 |
int m_iSizeY;
|
|
|
349 |
|
|
|
350 |
SGameLauncherFlags *m_pLauncherFlags;
|
|
|
351 |
|
|
|
352 |
ArrayList ^m_lTips;
|
|
|
353 |
ListViewItem ^m_pListItem;
|
|
|
354 |
|
|
|
355 |
int m_iSaveGameManager;
|
|
|
356 |
String ^m_sConvertFile;
|
|
|
357 |
Creator::Waiting ^m_pWait;
|
|
|
358 |
CArchiveFile *m_pConverted;
|
133 |
cycrow |
359 |
CLinkList<CBaseFile> *m_lAvailablePackages;
|
1 |
cycrow |
360 |
|
|
|
361 |
private:
|
|
|
362 |
private:
|
|
|
363 |
private: System::Windows::Forms::GroupBox^ GroupDir;
|
|
|
364 |
private: System::Windows::Forms::ComboBox^ ComboDir;
|
|
|
365 |
private: System::Windows::Forms::ListView^ ListPackages;
|
|
|
366 |
private: System::Windows::Forms::ColumnHeader^ columnHeader1;
|
|
|
367 |
private: System::Windows::Forms::ColumnHeader^ columnHeader2;
|
|
|
368 |
private: System::Windows::Forms::ColumnHeader^ columnHeader3;
|
|
|
369 |
private: System::Windows::Forms::ColumnHeader^ columnHeader4;
|
|
|
370 |
private: System::Windows::Forms::ColumnHeader^ columnHeader5;
|
|
|
371 |
private: System::Windows::Forms::Panel^ panel1;
|
|
|
372 |
private: System::Windows::Forms::Button^ ButClose;
|
|
|
373 |
private: System::Windows::Forms::GroupBox^ GroupPackages;
|
|
|
374 |
private: System::Windows::Forms::ProgressBar^ ProgressBar;
|
|
|
375 |
private: System::Windows::Forms::Panel^ panel2;
|
|
|
376 |
private: System::Windows::Forms::Button^ ButUninstall;
|
|
|
377 |
private: System::Windows::Forms::Button^ ButDisable;
|
|
|
378 |
private: System::Windows::Forms::Button^ ButInstall;
|
|
|
379 |
private: System::ComponentModel::BackgroundWorker^ backgroundWorker1;
|
|
|
380 |
private: System::Windows::Forms::RichTextBox^ TextDesc;
|
|
|
381 |
private: System::Windows::Forms::Panel^ PanelDisplay;
|
|
|
382 |
private: System::Windows::Forms::PictureBox^ PictureDisplay;
|
|
|
383 |
private: System::ComponentModel::BackgroundWorker^ backgroundUpdater;
|
|
|
384 |
private: System::Windows::Forms::Button^ ButRun;
|
|
|
385 |
private: System::Windows::Forms::StatusStrip^ statusStrip1;
|
|
|
386 |
private: System::Windows::Forms::ToolStripStatusLabel^ LabelStatus;
|
|
|
387 |
private: System::Windows::Forms::ContextMenuStrip^ contextMenuStrip1;
|
|
|
388 |
private: System::Windows::Forms::ToolStripMenuItem^ uninstallToolStripMenuItem;
|
|
|
389 |
private: System::Windows::Forms::ToolStripSeparator^ ContextSeperator;
|
|
|
390 |
private: System::Windows::Forms::ToolStripMenuItem^ ContextEnable;
|
|
|
391 |
private: System::Windows::Forms::ToolStripMenuItem^ ContextDisable;
|
|
|
392 |
private: System::Windows::Forms::ToolStripMenuItem^ ContextName;
|
|
|
393 |
private: System::Windows::Forms::ToolStripSeparator^ toolStripSeparator3;
|
|
|
394 |
private: System::Windows::Forms::ImageList^ imageList1;
|
|
|
395 |
private: System::Windows::Forms::ToolStripMenuItem^ UninstallSelectedContext;
|
|
|
396 |
private: System::Windows::Forms::ColumnHeader^ columnHeader6;
|
|
|
397 |
private: System::Windows::Forms::ToolStripMenuItem^ viewReadmeToolStripMenuItem;
|
|
|
398 |
private: System::Windows::Forms::ToolStripMenuItem^ extrasToolStripMenuItem;
|
|
|
399 |
private: System::Windows::Forms::ImageList^ imageList2;
|
|
|
400 |
private: System::Windows::Forms::ImageList^ imageList3;
|
|
|
401 |
private: System::Windows::Forms::ToolStripSeparator^ ContextSeperator2;
|
|
|
402 |
private: System::Windows::Forms::ToolStripMenuItem^ emailAuthorToolStripMenuItem;
|
|
|
403 |
private: System::Windows::Forms::ToolStripMenuItem^ visitForumPageToolStripMenuItem;
|
|
|
404 |
private: System::Windows::Forms::ToolStripMenuItem^ visitWebSiteToolStripMenuItem;
|
|
|
405 |
private: System::Windows::Forms::ToolStripSeparator^ toolStripSeparator2;
|
|
|
406 |
private: System::Windows::Forms::ToolStripMenuItem^ checkForUpdatesToolStripMenuItem;
|
|
|
407 |
private: System::Windows::Forms::Button^ button1;
|
|
|
408 |
private: System::ComponentModel::BackgroundWorker^ backgroundWorker2;
|
126 |
cycrow |
409 |
private: System::Windows::Forms::ToolStripMenuItem^ viewModSelectedToolStripMenuItem;
|
1 |
cycrow |
410 |
|
|
|
411 |
private: System::ComponentModel::IContainer^ components;
|
|
|
412 |
/// <summary>
|
|
|
413 |
/// Required designer variable.
|
|
|
414 |
/// </summary>
|
|
|
415 |
|
|
|
416 |
|
|
|
417 |
#pragma region Windows Form Designer generated code
|
|
|
418 |
/// <summary>
|
|
|
419 |
/// Required method for Designer support - do not modify
|
|
|
420 |
/// the contents of this method with the code editor.
|
|
|
421 |
/// </summary>
|
|
|
422 |
void InitializeComponent(void)
|
|
|
423 |
{
|
|
|
424 |
this->components = (gcnew System::ComponentModel::Container());
|
|
|
425 |
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(MainGui::typeid));
|
|
|
426 |
this->GroupDir = (gcnew System::Windows::Forms::GroupBox());
|
|
|
427 |
this->ComboDir = (gcnew System::Windows::Forms::ComboBox());
|
|
|
428 |
this->ListPackages = (gcnew System::Windows::Forms::ListView());
|
|
|
429 |
this->columnHeader1 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
430 |
this->columnHeader2 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
431 |
this->columnHeader3 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
432 |
this->columnHeader4 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
433 |
this->columnHeader6 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
434 |
this->columnHeader5 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
435 |
this->contextMenuStrip1 = (gcnew System::Windows::Forms::ContextMenuStrip(this->components));
|
|
|
436 |
this->ContextName = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
437 |
this->toolStripSeparator3 = (gcnew System::Windows::Forms::ToolStripSeparator());
|
|
|
438 |
this->uninstallToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
439 |
this->UninstallSelectedContext = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
440 |
this->ContextEnable = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
441 |
this->ContextDisable = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
442 |
this->ContextSeperator = (gcnew System::Windows::Forms::ToolStripSeparator());
|
|
|
443 |
this->viewReadmeToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
444 |
this->extrasToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
445 |
this->ContextSeperator2 = (gcnew System::Windows::Forms::ToolStripSeparator());
|
|
|
446 |
this->emailAuthorToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
447 |
this->visitForumPageToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
448 |
this->visitWebSiteToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
449 |
this->toolStripSeparator2 = (gcnew System::Windows::Forms::ToolStripSeparator());
|
|
|
450 |
this->checkForUpdatesToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
|
|
451 |
this->panel1 = (gcnew System::Windows::Forms::Panel());
|
|
|
452 |
this->ProgressBar = (gcnew System::Windows::Forms::ProgressBar());
|
|
|
453 |
this->ButRun = (gcnew System::Windows::Forms::Button());
|
|
|
454 |
this->ButClose = (gcnew System::Windows::Forms::Button());
|
|
|
455 |
this->GroupPackages = (gcnew System::Windows::Forms::GroupBox());
|
|
|
456 |
this->PanelDisplay = (gcnew System::Windows::Forms::Panel());
|
|
|
457 |
this->TextDesc = (gcnew System::Windows::Forms::RichTextBox());
|
|
|
458 |
this->PictureDisplay = (gcnew System::Windows::Forms::PictureBox());
|
|
|
459 |
this->panel2 = (gcnew System::Windows::Forms::Panel());
|
|
|
460 |
this->button1 = (gcnew System::Windows::Forms::Button());
|
|
|
461 |
this->ButUninstall = (gcnew System::Windows::Forms::Button());
|
|
|
462 |
this->ButDisable = (gcnew System::Windows::Forms::Button());
|
|
|
463 |
this->ButInstall = (gcnew System::Windows::Forms::Button());
|
|
|
464 |
this->backgroundWorker1 = (gcnew System::ComponentModel::BackgroundWorker());
|
|
|
465 |
this->backgroundUpdater = (gcnew System::ComponentModel::BackgroundWorker());
|
|
|
466 |
this->statusStrip1 = (gcnew System::Windows::Forms::StatusStrip());
|
|
|
467 |
this->LabelStatus = (gcnew System::Windows::Forms::ToolStripStatusLabel());
|
|
|
468 |
this->imageList1 = (gcnew System::Windows::Forms::ImageList(this->components));
|
|
|
469 |
this->imageList2 = (gcnew System::Windows::Forms::ImageList(this->components));
|
|
|
470 |
this->imageList3 = (gcnew System::Windows::Forms::ImageList(this->components));
|
|
|
471 |
this->backgroundWorker2 = (gcnew System::ComponentModel::BackgroundWorker());
|
126 |
cycrow |
472 |
this->viewModSelectedToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
|
1 |
cycrow |
473 |
this->GroupDir->SuspendLayout();
|
|
|
474 |
this->contextMenuStrip1->SuspendLayout();
|
|
|
475 |
this->panel1->SuspendLayout();
|
|
|
476 |
this->GroupPackages->SuspendLayout();
|
|
|
477 |
this->PanelDisplay->SuspendLayout();
|
121 |
cycrow |
478 |
(cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->PictureDisplay))->BeginInit();
|
1 |
cycrow |
479 |
this->panel2->SuspendLayout();
|
|
|
480 |
this->statusStrip1->SuspendLayout();
|
|
|
481 |
this->SuspendLayout();
|
|
|
482 |
//
|
|
|
483 |
// GroupDir
|
|
|
484 |
//
|
|
|
485 |
this->GroupDir->Controls->Add(this->ComboDir);
|
|
|
486 |
this->GroupDir->Dock = System::Windows::Forms::DockStyle::Top;
|
|
|
487 |
this->GroupDir->Location = System::Drawing::Point(0, 0);
|
121 |
cycrow |
488 |
this->GroupDir->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
489 |
this->GroupDir->Name = L"GroupDir";
|
121 |
cycrow |
490 |
this->GroupDir->Padding = System::Windows::Forms::Padding(7, 6, 7, 6);
|
|
|
491 |
this->GroupDir->Size = System::Drawing::Size(835, 64);
|
1 |
cycrow |
492 |
this->GroupDir->TabIndex = 0;
|
|
|
493 |
this->GroupDir->TabStop = false;
|
|
|
494 |
this->GroupDir->Text = L"Current Directory";
|
|
|
495 |
//
|
|
|
496 |
// ComboDir
|
|
|
497 |
//
|
|
|
498 |
this->ComboDir->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
499 |
this->ComboDir->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
|
|
|
500 |
this->ComboDir->FormattingEnabled = true;
|
121 |
cycrow |
501 |
this->ComboDir->Location = System::Drawing::Point(7, 21);
|
|
|
502 |
this->ComboDir->Margin = System::Windows::Forms::Padding(13, 12, 13, 12);
|
1 |
cycrow |
503 |
this->ComboDir->Name = L"ComboDir";
|
121 |
cycrow |
504 |
this->ComboDir->Size = System::Drawing::Size(821, 24);
|
1 |
cycrow |
505 |
this->ComboDir->TabIndex = 0;
|
|
|
506 |
//
|
|
|
507 |
// ListPackages
|
|
|
508 |
//
|
|
|
509 |
this->ListPackages->AllowDrop = true;
|
121 |
cycrow |
510 |
this->ListPackages->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^ >(6) {
|
|
|
511 |
this->columnHeader1,
|
|
|
512 |
this->columnHeader2, this->columnHeader3, this->columnHeader4, this->columnHeader6, this->columnHeader5
|
|
|
513 |
});
|
1 |
cycrow |
514 |
this->ListPackages->ContextMenuStrip = this->contextMenuStrip1;
|
|
|
515 |
this->ListPackages->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
516 |
this->ListPackages->FullRowSelect = true;
|
|
|
517 |
this->ListPackages->HideSelection = false;
|
121 |
cycrow |
518 |
this->ListPackages->Location = System::Drawing::Point(4, 19);
|
|
|
519 |
this->ListPackages->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
520 |
this->ListPackages->Name = L"ListPackages";
|
|
|
521 |
this->ListPackages->ShowItemToolTips = true;
|
126 |
cycrow |
522 |
this->ListPackages->Size = System::Drawing::Size(827, 480);
|
1 |
cycrow |
523 |
this->ListPackages->TabIndex = 0;
|
|
|
524 |
this->ListPackages->UseCompatibleStateImageBehavior = false;
|
|
|
525 |
this->ListPackages->View = System::Windows::Forms::View::Details;
|
121 |
cycrow |
526 |
this->ListPackages->DrawSubItem += gcnew System::Windows::Forms::DrawListViewSubItemEventHandler(this, &MainGui::ListPackages_DrawSubItem);
|
1 |
cycrow |
527 |
this->ListPackages->DragDrop += gcnew System::Windows::Forms::DragEventHandler(this, &MainGui::ListPackages_DragDrop);
|
|
|
528 |
this->ListPackages->DragOver += gcnew System::Windows::Forms::DragEventHandler(this, &MainGui::ListPackages_DragOver);
|
121 |
cycrow |
529 |
this->ListPackages->MouseDoubleClick += gcnew System::Windows::Forms::MouseEventHandler(this, &MainGui::ListPackages_MouseDoubleClick);
|
1 |
cycrow |
530 |
//
|
|
|
531 |
// columnHeader1
|
|
|
532 |
//
|
|
|
533 |
this->columnHeader1->Text = L"Package";
|
|
|
534 |
//
|
|
|
535 |
// columnHeader2
|
|
|
536 |
//
|
|
|
537 |
this->columnHeader2->Text = L"Author";
|
|
|
538 |
//
|
|
|
539 |
// columnHeader3
|
|
|
540 |
//
|
|
|
541 |
this->columnHeader3->Text = L"Version";
|
|
|
542 |
this->columnHeader3->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
|
|
|
543 |
//
|
|
|
544 |
// columnHeader4
|
|
|
545 |
//
|
|
|
546 |
this->columnHeader4->Text = L"Updated";
|
|
|
547 |
//
|
|
|
548 |
// columnHeader6
|
|
|
549 |
//
|
|
|
550 |
this->columnHeader6->DisplayIndex = 5;
|
|
|
551 |
this->columnHeader6->Text = L"Type";
|
|
|
552 |
//
|
|
|
553 |
// columnHeader5
|
|
|
554 |
//
|
|
|
555 |
this->columnHeader5->DisplayIndex = 4;
|
|
|
556 |
this->columnHeader5->Text = L"Enabled";
|
|
|
557 |
this->columnHeader5->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
|
|
|
558 |
//
|
|
|
559 |
// contextMenuStrip1
|
|
|
560 |
//
|
|
|
561 |
this->contextMenuStrip1->ImageScalingSize = System::Drawing::Size(24, 24);
|
126 |
cycrow |
562 |
this->contextMenuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(16) {
|
121 |
cycrow |
563 |
this->ContextName,
|
126 |
cycrow |
564 |
this->toolStripSeparator3, this->uninstallToolStripMenuItem, this->UninstallSelectedContext, this->ContextEnable, this->viewModSelectedToolStripMenuItem,
|
|
|
565 |
this->ContextDisable, this->ContextSeperator, this->viewReadmeToolStripMenuItem, this->extrasToolStripMenuItem, this->ContextSeperator2,
|
|
|
566 |
this->emailAuthorToolStripMenuItem, this->visitForumPageToolStripMenuItem, this->visitWebSiteToolStripMenuItem, this->toolStripSeparator2,
|
|
|
567 |
this->checkForUpdatesToolStripMenuItem
|
121 |
cycrow |
568 |
});
|
1 |
cycrow |
569 |
this->contextMenuStrip1->Name = L"contextMenuStrip1";
|
126 |
cycrow |
570 |
this->contextMenuStrip1->Size = System::Drawing::Size(253, 656);
|
1 |
cycrow |
571 |
this->contextMenuStrip1->Opening += gcnew System::ComponentModel::CancelEventHandler(this, &MainGui::contextMenuStrip1_Opening);
|
|
|
572 |
//
|
|
|
573 |
// ContextName
|
|
|
574 |
//
|
121 |
cycrow |
575 |
this->ContextName->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ContextName.Image")));
|
1 |
cycrow |
576 |
this->ContextName->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
577 |
this->ContextName->Name = L"ContextName";
|
126 |
cycrow |
578 |
this->ContextName->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
579 |
this->ContextName->Text = L"Name";
|
|
|
580 |
this->ContextName->Click += gcnew System::EventHandler(this, &MainGui::ContextName_Click);
|
|
|
581 |
//
|
|
|
582 |
// toolStripSeparator3
|
|
|
583 |
//
|
|
|
584 |
this->toolStripSeparator3->Name = L"toolStripSeparator3";
|
126 |
cycrow |
585 |
this->toolStripSeparator3->Size = System::Drawing::Size(249, 6);
|
1 |
cycrow |
586 |
//
|
|
|
587 |
// uninstallToolStripMenuItem
|
|
|
588 |
//
|
121 |
cycrow |
589 |
this->uninstallToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"uninstallToolStripMenuItem.Image")));
|
1 |
cycrow |
590 |
this->uninstallToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
591 |
this->uninstallToolStripMenuItem->Name = L"uninstallToolStripMenuItem";
|
126 |
cycrow |
592 |
this->uninstallToolStripMenuItem->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
593 |
this->uninstallToolStripMenuItem->Text = L"Uninstall";
|
|
|
594 |
this->uninstallToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::uninstallToolStripMenuItem_Click);
|
|
|
595 |
//
|
|
|
596 |
// UninstallSelectedContext
|
|
|
597 |
//
|
121 |
cycrow |
598 |
this->UninstallSelectedContext->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"UninstallSelectedContext.Image")));
|
1 |
cycrow |
599 |
this->UninstallSelectedContext->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
600 |
this->UninstallSelectedContext->Name = L"UninstallSelectedContext";
|
126 |
cycrow |
601 |
this->UninstallSelectedContext->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
602 |
this->UninstallSelectedContext->Text = L"Uninstall Selected";
|
|
|
603 |
this->UninstallSelectedContext->Click += gcnew System::EventHandler(this, &MainGui::UninstallSelectedContext_Click);
|
|
|
604 |
//
|
|
|
605 |
// ContextEnable
|
|
|
606 |
//
|
121 |
cycrow |
607 |
this->ContextEnable->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ContextEnable.Image")));
|
1 |
cycrow |
608 |
this->ContextEnable->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
609 |
this->ContextEnable->Name = L"ContextEnable";
|
126 |
cycrow |
610 |
this->ContextEnable->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
611 |
this->ContextEnable->Text = L"Enable";
|
|
|
612 |
this->ContextEnable->Click += gcnew System::EventHandler(this, &MainGui::ContextEnable_Click);
|
|
|
613 |
//
|
|
|
614 |
// ContextDisable
|
|
|
615 |
//
|
121 |
cycrow |
616 |
this->ContextDisable->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ContextDisable.Image")));
|
1 |
cycrow |
617 |
this->ContextDisable->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
618 |
this->ContextDisable->Name = L"ContextDisable";
|
126 |
cycrow |
619 |
this->ContextDisable->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
620 |
this->ContextDisable->Text = L"Disable";
|
|
|
621 |
this->ContextDisable->Click += gcnew System::EventHandler(this, &MainGui::ContextDisable_Click);
|
|
|
622 |
//
|
|
|
623 |
// ContextSeperator
|
|
|
624 |
//
|
|
|
625 |
this->ContextSeperator->Name = L"ContextSeperator";
|
126 |
cycrow |
626 |
this->ContextSeperator->Size = System::Drawing::Size(249, 6);
|
1 |
cycrow |
627 |
//
|
|
|
628 |
// viewReadmeToolStripMenuItem
|
|
|
629 |
//
|
121 |
cycrow |
630 |
this->viewReadmeToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"viewReadmeToolStripMenuItem.Image")));
|
1 |
cycrow |
631 |
this->viewReadmeToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
632 |
this->viewReadmeToolStripMenuItem->Name = L"viewReadmeToolStripMenuItem";
|
126 |
cycrow |
633 |
this->viewReadmeToolStripMenuItem->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
634 |
this->viewReadmeToolStripMenuItem->Text = L"View Readme";
|
|
|
635 |
//
|
|
|
636 |
// extrasToolStripMenuItem
|
|
|
637 |
//
|
121 |
cycrow |
638 |
this->extrasToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"extrasToolStripMenuItem.Image")));
|
1 |
cycrow |
639 |
this->extrasToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
640 |
this->extrasToolStripMenuItem->Name = L"extrasToolStripMenuItem";
|
126 |
cycrow |
641 |
this->extrasToolStripMenuItem->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
642 |
this->extrasToolStripMenuItem->Text = L"Extras";
|
|
|
643 |
//
|
|
|
644 |
// ContextSeperator2
|
|
|
645 |
//
|
|
|
646 |
this->ContextSeperator2->Name = L"ContextSeperator2";
|
126 |
cycrow |
647 |
this->ContextSeperator2->Size = System::Drawing::Size(249, 6);
|
1 |
cycrow |
648 |
//
|
|
|
649 |
// emailAuthorToolStripMenuItem
|
|
|
650 |
//
|
121 |
cycrow |
651 |
this->emailAuthorToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"emailAuthorToolStripMenuItem.Image")));
|
1 |
cycrow |
652 |
this->emailAuthorToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
653 |
this->emailAuthorToolStripMenuItem->Name = L"emailAuthorToolStripMenuItem";
|
126 |
cycrow |
654 |
this->emailAuthorToolStripMenuItem->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
655 |
this->emailAuthorToolStripMenuItem->Text = L"Email Author";
|
|
|
656 |
this->emailAuthorToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::emailAuthorToolStripMenuItem_Click);
|
|
|
657 |
//
|
|
|
658 |
// visitForumPageToolStripMenuItem
|
|
|
659 |
//
|
121 |
cycrow |
660 |
this->visitForumPageToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"visitForumPageToolStripMenuItem.Image")));
|
1 |
cycrow |
661 |
this->visitForumPageToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
662 |
this->visitForumPageToolStripMenuItem->Name = L"visitForumPageToolStripMenuItem";
|
126 |
cycrow |
663 |
this->visitForumPageToolStripMenuItem->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
664 |
this->visitForumPageToolStripMenuItem->Text = L"Visit Forum Page";
|
|
|
665 |
this->visitForumPageToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::visitForumPageToolStripMenuItem_Click);
|
|
|
666 |
//
|
|
|
667 |
// visitWebSiteToolStripMenuItem
|
|
|
668 |
//
|
121 |
cycrow |
669 |
this->visitWebSiteToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"visitWebSiteToolStripMenuItem.Image")));
|
1 |
cycrow |
670 |
this->visitWebSiteToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
671 |
this->visitWebSiteToolStripMenuItem->Name = L"visitWebSiteToolStripMenuItem";
|
126 |
cycrow |
672 |
this->visitWebSiteToolStripMenuItem->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
673 |
this->visitWebSiteToolStripMenuItem->Text = L"Visit Web Site";
|
|
|
674 |
this->visitWebSiteToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::visitWebSiteToolStripMenuItem_Click);
|
|
|
675 |
//
|
|
|
676 |
// toolStripSeparator2
|
|
|
677 |
//
|
|
|
678 |
this->toolStripSeparator2->Name = L"toolStripSeparator2";
|
126 |
cycrow |
679 |
this->toolStripSeparator2->Size = System::Drawing::Size(249, 6);
|
1 |
cycrow |
680 |
//
|
|
|
681 |
// checkForUpdatesToolStripMenuItem
|
|
|
682 |
//
|
121 |
cycrow |
683 |
this->checkForUpdatesToolStripMenuItem->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"checkForUpdatesToolStripMenuItem.Image")));
|
1 |
cycrow |
684 |
this->checkForUpdatesToolStripMenuItem->ImageScaling = System::Windows::Forms::ToolStripItemImageScaling::None;
|
|
|
685 |
this->checkForUpdatesToolStripMenuItem->Name = L"checkForUpdatesToolStripMenuItem";
|
126 |
cycrow |
686 |
this->checkForUpdatesToolStripMenuItem->Size = System::Drawing::Size(252, 50);
|
1 |
cycrow |
687 |
this->checkForUpdatesToolStripMenuItem->Text = L"Check For Updates";
|
|
|
688 |
this->checkForUpdatesToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::checkForUpdatesToolStripMenuItem_Click);
|
|
|
689 |
//
|
|
|
690 |
// panel1
|
|
|
691 |
//
|
|
|
692 |
this->panel1->AllowDrop = true;
|
|
|
693 |
this->panel1->Controls->Add(this->ProgressBar);
|
|
|
694 |
this->panel1->Controls->Add(this->ButRun);
|
|
|
695 |
this->panel1->Controls->Add(this->ButClose);
|
|
|
696 |
this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;
|
126 |
cycrow |
697 |
this->panel1->Location = System::Drawing::Point(0, 683);
|
121 |
cycrow |
698 |
this->panel1->Margin = System::Windows::Forms::Padding(7, 12, 7, 12);
|
1 |
cycrow |
699 |
this->panel1->Name = L"panel1";
|
121 |
cycrow |
700 |
this->panel1->Size = System::Drawing::Size(835, 46);
|
1 |
cycrow |
701 |
this->panel1->TabIndex = 2;
|
|
|
702 |
//
|
|
|
703 |
// ProgressBar
|
|
|
704 |
//
|
|
|
705 |
this->ProgressBar->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
706 |
this->ProgressBar->Location = System::Drawing::Point(0, 0);
|
121 |
cycrow |
707 |
this->ProgressBar->Margin = System::Windows::Forms::Padding(13, 12, 13, 12);
|
1 |
cycrow |
708 |
this->ProgressBar->MarqueeAnimationSpeed = 5;
|
|
|
709 |
this->ProgressBar->Name = L"ProgressBar";
|
121 |
cycrow |
710 |
this->ProgressBar->Size = System::Drawing::Size(576, 46);
|
1 |
cycrow |
711 |
this->ProgressBar->Style = System::Windows::Forms::ProgressBarStyle::Marquee;
|
|
|
712 |
this->ProgressBar->TabIndex = 1;
|
|
|
713 |
this->ProgressBar->Visible = false;
|
|
|
714 |
//
|
|
|
715 |
// ButRun
|
|
|
716 |
//
|
|
|
717 |
this->ButRun->AutoSize = true;
|
|
|
718 |
this->ButRun->Dock = System::Windows::Forms::DockStyle::Right;
|
121 |
cycrow |
719 |
this->ButRun->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ButRun.Image")));
|
|
|
720 |
this->ButRun->Location = System::Drawing::Point(576, 0);
|
|
|
721 |
this->ButRun->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
722 |
this->ButRun->Name = L"ButRun";
|
121 |
cycrow |
723 |
this->ButRun->Size = System::Drawing::Size(159, 46);
|
1 |
cycrow |
724 |
this->ButRun->TabIndex = 2;
|
|
|
725 |
this->ButRun->Text = L"Run Game";
|
|
|
726 |
this->ButRun->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
|
|
|
727 |
this->ButRun->UseVisualStyleBackColor = true;
|
|
|
728 |
this->ButRun->Click += gcnew System::EventHandler(this, &MainGui::ButRun_Click);
|
|
|
729 |
//
|
|
|
730 |
// ButClose
|
|
|
731 |
//
|
|
|
732 |
this->ButClose->Dock = System::Windows::Forms::DockStyle::Right;
|
121 |
cycrow |
733 |
this->ButClose->Location = System::Drawing::Point(735, 0);
|
|
|
734 |
this->ButClose->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
735 |
this->ButClose->Name = L"ButClose";
|
121 |
cycrow |
736 |
this->ButClose->Size = System::Drawing::Size(100, 46);
|
1 |
cycrow |
737 |
this->ButClose->TabIndex = 0;
|
|
|
738 |
this->ButClose->Text = L"Close";
|
|
|
739 |
this->ButClose->UseVisualStyleBackColor = true;
|
|
|
740 |
//
|
|
|
741 |
// GroupPackages
|
|
|
742 |
//
|
|
|
743 |
this->GroupPackages->Controls->Add(this->ListPackages);
|
|
|
744 |
this->GroupPackages->Controls->Add(this->PanelDisplay);
|
|
|
745 |
this->GroupPackages->Controls->Add(this->panel2);
|
|
|
746 |
this->GroupPackages->Dock = System::Windows::Forms::DockStyle::Fill;
|
121 |
cycrow |
747 |
this->GroupPackages->Location = System::Drawing::Point(0, 64);
|
|
|
748 |
this->GroupPackages->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
749 |
this->GroupPackages->Name = L"GroupPackages";
|
121 |
cycrow |
750 |
this->GroupPackages->Padding = System::Windows::Forms::Padding(4);
|
126 |
cycrow |
751 |
this->GroupPackages->Size = System::Drawing::Size(835, 619);
|
1 |
cycrow |
752 |
this->GroupPackages->TabIndex = 3;
|
|
|
753 |
this->GroupPackages->TabStop = false;
|
|
|
754 |
this->GroupPackages->Text = L"Installed Packages";
|
|
|
755 |
//
|
|
|
756 |
// PanelDisplay
|
|
|
757 |
//
|
|
|
758 |
this->PanelDisplay->AllowDrop = true;
|
|
|
759 |
this->PanelDisplay->Controls->Add(this->TextDesc);
|
|
|
760 |
this->PanelDisplay->Controls->Add(this->PictureDisplay);
|
|
|
761 |
this->PanelDisplay->Dock = System::Windows::Forms::DockStyle::Bottom;
|
126 |
cycrow |
762 |
this->PanelDisplay->Location = System::Drawing::Point(4, 499);
|
121 |
cycrow |
763 |
this->PanelDisplay->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
764 |
this->PanelDisplay->Name = L"PanelDisplay";
|
121 |
cycrow |
765 |
this->PanelDisplay->Size = System::Drawing::Size(827, 84);
|
1 |
cycrow |
766 |
this->PanelDisplay->TabIndex = 2;
|
|
|
767 |
//
|
|
|
768 |
// TextDesc
|
|
|
769 |
//
|
|
|
770 |
this->TextDesc->Dock = System::Windows::Forms::DockStyle::Fill;
|
121 |
cycrow |
771 |
this->TextDesc->Location = System::Drawing::Point(96, 0);
|
|
|
772 |
this->TextDesc->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
773 |
this->TextDesc->Name = L"TextDesc";
|
|
|
774 |
this->TextDesc->ReadOnly = true;
|
121 |
cycrow |
775 |
this->TextDesc->Size = System::Drawing::Size(731, 84);
|
1 |
cycrow |
776 |
this->TextDesc->TabIndex = 1;
|
|
|
777 |
this->TextDesc->Text = L"";
|
|
|
778 |
//
|
|
|
779 |
// PictureDisplay
|
|
|
780 |
//
|
|
|
781 |
this->PictureDisplay->Dock = System::Windows::Forms::DockStyle::Left;
|
121 |
cycrow |
782 |
this->PictureDisplay->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"PictureDisplay.Image")));
|
1 |
cycrow |
783 |
this->PictureDisplay->Location = System::Drawing::Point(0, 0);
|
121 |
cycrow |
784 |
this->PictureDisplay->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
785 |
this->PictureDisplay->Name = L"PictureDisplay";
|
121 |
cycrow |
786 |
this->PictureDisplay->Size = System::Drawing::Size(96, 84);
|
1 |
cycrow |
787 |
this->PictureDisplay->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
|
|
|
788 |
this->PictureDisplay->TabIndex = 2;
|
|
|
789 |
this->PictureDisplay->TabStop = false;
|
|
|
790 |
//
|
|
|
791 |
// panel2
|
|
|
792 |
//
|
|
|
793 |
this->panel2->AllowDrop = true;
|
|
|
794 |
this->panel2->Controls->Add(this->button1);
|
|
|
795 |
this->panel2->Controls->Add(this->ButUninstall);
|
|
|
796 |
this->panel2->Controls->Add(this->ButDisable);
|
|
|
797 |
this->panel2->Controls->Add(this->ButInstall);
|
|
|
798 |
this->panel2->Dock = System::Windows::Forms::DockStyle::Bottom;
|
126 |
cycrow |
799 |
this->panel2->Location = System::Drawing::Point(4, 583);
|
121 |
cycrow |
800 |
this->panel2->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
801 |
this->panel2->Name = L"panel2";
|
121 |
cycrow |
802 |
this->panel2->Size = System::Drawing::Size(827, 32);
|
1 |
cycrow |
803 |
this->panel2->TabIndex = 0;
|
|
|
804 |
//
|
|
|
805 |
// button1
|
|
|
806 |
//
|
|
|
807 |
this->button1->Dock = System::Windows::Forms::DockStyle::Left;
|
121 |
cycrow |
808 |
this->button1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"button1.Image")));
|
|
|
809 |
this->button1->Location = System::Drawing::Point(172, 0);
|
|
|
810 |
this->button1->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
811 |
this->button1->Name = L"button1";
|
121 |
cycrow |
812 |
this->button1->Size = System::Drawing::Size(161, 32);
|
1 |
cycrow |
813 |
this->button1->TabIndex = 3;
|
|
|
814 |
this->button1->Text = L"Install Archive";
|
|
|
815 |
this->button1->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
|
|
|
816 |
this->button1->UseVisualStyleBackColor = true;
|
|
|
817 |
this->button1->Click += gcnew System::EventHandler(this, &MainGui::button1_Click);
|
|
|
818 |
//
|
|
|
819 |
// ButUninstall
|
|
|
820 |
//
|
|
|
821 |
this->ButUninstall->AutoSize = true;
|
|
|
822 |
this->ButUninstall->Dock = System::Windows::Forms::DockStyle::Right;
|
121 |
cycrow |
823 |
this->ButUninstall->Location = System::Drawing::Point(476, 0);
|
|
|
824 |
this->ButUninstall->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
825 |
this->ButUninstall->Name = L"ButUninstall";
|
121 |
cycrow |
826 |
this->ButUninstall->Size = System::Drawing::Size(163, 32);
|
1 |
cycrow |
827 |
this->ButUninstall->TabIndex = 2;
|
|
|
828 |
this->ButUninstall->Text = L"Uninstall";
|
|
|
829 |
this->ButUninstall->UseVisualStyleBackColor = true;
|
|
|
830 |
//
|
|
|
831 |
// ButDisable
|
|
|
832 |
//
|
|
|
833 |
this->ButDisable->AutoSize = true;
|
|
|
834 |
this->ButDisable->Dock = System::Windows::Forms::DockStyle::Right;
|
121 |
cycrow |
835 |
this->ButDisable->Location = System::Drawing::Point(639, 0);
|
|
|
836 |
this->ButDisable->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
837 |
this->ButDisable->Name = L"ButDisable";
|
121 |
cycrow |
838 |
this->ButDisable->Size = System::Drawing::Size(188, 32);
|
1 |
cycrow |
839 |
this->ButDisable->TabIndex = 1;
|
|
|
840 |
this->ButDisable->Text = L"Disable";
|
|
|
841 |
this->ButDisable->UseVisualStyleBackColor = true;
|
|
|
842 |
//
|
|
|
843 |
// ButInstall
|
|
|
844 |
//
|
|
|
845 |
this->ButInstall->AutoSize = true;
|
|
|
846 |
this->ButInstall->Dock = System::Windows::Forms::DockStyle::Left;
|
121 |
cycrow |
847 |
this->ButInstall->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"ButInstall.Image")));
|
1 |
cycrow |
848 |
this->ButInstall->Location = System::Drawing::Point(0, 0);
|
121 |
cycrow |
849 |
this->ButInstall->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
850 |
this->ButInstall->Name = L"ButInstall";
|
121 |
cycrow |
851 |
this->ButInstall->Size = System::Drawing::Size(172, 32);
|
1 |
cycrow |
852 |
this->ButInstall->TabIndex = 0;
|
|
|
853 |
this->ButInstall->Text = L"Install Package";
|
|
|
854 |
this->ButInstall->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
|
|
|
855 |
this->ButInstall->UseVisualStyleBackColor = true;
|
|
|
856 |
//
|
|
|
857 |
// statusStrip1
|
|
|
858 |
//
|
121 |
cycrow |
859 |
this->statusStrip1->ImageScalingSize = System::Drawing::Size(20, 20);
|
|
|
860 |
this->statusStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) { this->LabelStatus });
|
126 |
cycrow |
861 |
this->statusStrip1->Location = System::Drawing::Point(0, 729);
|
1 |
cycrow |
862 |
this->statusStrip1->Name = L"statusStrip1";
|
121 |
cycrow |
863 |
this->statusStrip1->Padding = System::Windows::Forms::Padding(1, 0, 19, 0);
|
126 |
cycrow |
864 |
this->statusStrip1->Size = System::Drawing::Size(835, 22);
|
1 |
cycrow |
865 |
this->statusStrip1->TabIndex = 5;
|
|
|
866 |
this->statusStrip1->Text = L"statusStrip1";
|
|
|
867 |
//
|
|
|
868 |
// LabelStatus
|
|
|
869 |
//
|
|
|
870 |
this->LabelStatus->Name = L"LabelStatus";
|
126 |
cycrow |
871 |
this->LabelStatus->Size = System::Drawing::Size(0, 17);
|
1 |
cycrow |
872 |
//
|
|
|
873 |
// imageList1
|
|
|
874 |
//
|
121 |
cycrow |
875 |
this->imageList1->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^>(resources->GetObject(L"imageList1.ImageStream")));
|
1 |
cycrow |
876 |
this->imageList1->TransparentColor = System::Drawing::Color::Transparent;
|
|
|
877 |
this->imageList1->Images->SetKeyName(0, L"ship.png");
|
|
|
878 |
this->imageList1->Images->SetKeyName(1, L"package.png");
|
|
|
879 |
this->imageList1->Images->SetKeyName(2, L"fake.png");
|
|
|
880 |
this->imageList1->Images->SetKeyName(3, L"library.png");
|
|
|
881 |
this->imageList1->Images->SetKeyName(4, L"archive.png");
|
86 |
cycrow |
882 |
this->imageList1->Images->SetKeyName(5, L"tick.png");
|
|
|
883 |
this->imageList1->Images->SetKeyName(6, L"no.png");
|
1 |
cycrow |
884 |
//
|
|
|
885 |
// imageList2
|
|
|
886 |
//
|
121 |
cycrow |
887 |
this->imageList2->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^>(resources->GetObject(L"imageList2.ImageStream")));
|
1 |
cycrow |
888 |
this->imageList2->TransparentColor = System::Drawing::Color::Transparent;
|
|
|
889 |
this->imageList2->Images->SetKeyName(0, L"application");
|
|
|
890 |
this->imageList2->Images->SetKeyName(1, L"exe");
|
|
|
891 |
this->imageList2->Images->SetKeyName(2, L"doc");
|
|
|
892 |
this->imageList2->Images->SetKeyName(3, L"pdf");
|
|
|
893 |
this->imageList2->Images->SetKeyName(4, L"xls");
|
|
|
894 |
this->imageList2->Images->SetKeyName(5, L"xlsx");
|
|
|
895 |
//
|
|
|
896 |
// imageList3
|
|
|
897 |
//
|
|
|
898 |
this->imageList3->ColorDepth = System::Windows::Forms::ColorDepth::Depth8Bit;
|
|
|
899 |
this->imageList3->ImageSize = System::Drawing::Size(16, 16);
|
|
|
900 |
this->imageList3->TransparentColor = System::Drawing::Color::Transparent;
|
|
|
901 |
//
|
|
|
902 |
// backgroundWorker2
|
|
|
903 |
//
|
|
|
904 |
this->backgroundWorker2->WorkerReportsProgress = true;
|
|
|
905 |
this->backgroundWorker2->WorkerSupportsCancellation = true;
|
|
|
906 |
this->backgroundWorker2->DoWork += gcnew System::ComponentModel::DoWorkEventHandler(this, &MainGui::backgroundWorker2_DoWork);
|
|
|
907 |
this->backgroundWorker2->RunWorkerCompleted += gcnew System::ComponentModel::RunWorkerCompletedEventHandler(this, &MainGui::backgroundWorker2_RunWorkerCompleted);
|
|
|
908 |
//
|
126 |
cycrow |
909 |
// viewModSelectedToolStripMenuItem
|
|
|
910 |
//
|
|
|
911 |
this->viewModSelectedToolStripMenuItem->Name = L"viewModSelectedToolStripMenuItem";
|
|
|
912 |
this->viewModSelectedToolStripMenuItem->Size = System::Drawing::Size(252, 50);
|
|
|
913 |
this->viewModSelectedToolStripMenuItem->Text = L"View Mod Selecter";
|
|
|
914 |
this->viewModSelectedToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainGui::viewModSelectedToolStripMenuItem_Click);
|
|
|
915 |
//
|
1 |
cycrow |
916 |
// MainGui
|
|
|
917 |
//
|
|
|
918 |
this->AllowDrop = true;
|
121 |
cycrow |
919 |
this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
|
1 |
cycrow |
920 |
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
121 |
cycrow |
921 |
this->ClientSize = System::Drawing::Size(835, 751);
|
1 |
cycrow |
922 |
this->Controls->Add(this->GroupPackages);
|
|
|
923 |
this->Controls->Add(this->panel1);
|
|
|
924 |
this->Controls->Add(this->GroupDir);
|
|
|
925 |
this->Controls->Add(this->statusStrip1);
|
121 |
cycrow |
926 |
this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));
|
|
|
927 |
this->Margin = System::Windows::Forms::Padding(4);
|
1 |
cycrow |
928 |
this->Name = L"MainGui";
|
|
|
929 |
this->StartPosition = System::Windows::Forms::FormStartPosition::Manual;
|
|
|
930 |
this->Text = L"X-Universe Plugin Manager Lite";
|
|
|
931 |
this->Load += gcnew System::EventHandler(this, &MainGui::MainGui_Load);
|
121 |
cycrow |
932 |
this->Shown += gcnew System::EventHandler(this, &MainGui::MainGui_Shown);
|
1 |
cycrow |
933 |
this->GroupDir->ResumeLayout(false);
|
|
|
934 |
this->contextMenuStrip1->ResumeLayout(false);
|
|
|
935 |
this->panel1->ResumeLayout(false);
|
|
|
936 |
this->panel1->PerformLayout();
|
|
|
937 |
this->GroupPackages->ResumeLayout(false);
|
|
|
938 |
this->PanelDisplay->ResumeLayout(false);
|
121 |
cycrow |
939 |
(cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->PictureDisplay))->EndInit();
|
1 |
cycrow |
940 |
this->panel2->ResumeLayout(false);
|
|
|
941 |
this->panel2->PerformLayout();
|
|
|
942 |
this->statusStrip1->ResumeLayout(false);
|
|
|
943 |
this->statusStrip1->PerformLayout();
|
|
|
944 |
this->ResumeLayout(false);
|
|
|
945 |
this->PerformLayout();
|
|
|
946 |
|
|
|
947 |
}
|
|
|
948 |
#pragma endregion
|
121 |
cycrow |
949 |
private: System::Void MainGui_Load(System::Object^ sender, System::EventArgs^ e);
|
|
|
950 |
private: System::Void MainGui_Shown(System::Object^ sender, System::EventArgs^ e);
|
1 |
cycrow |
951 |
private: System::Void ButRun_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
952 |
this->LaunchGame();
|
|
|
953 |
}
|
|
|
954 |
private: System::Void uninstallToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
955 |
if ( m_pListItem )
|
|
|
956 |
{
|
|
|
957 |
ArrayList ^List = gcnew ArrayList();
|
|
|
958 |
List->Add(m_pListItem);
|
|
|
959 |
this->UninstallList(List);
|
|
|
960 |
}
|
|
|
961 |
}
|
|
|
962 |
private: System::Void ContextEnable_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
963 |
if ( m_pListItem )
|
|
|
964 |
{
|
|
|
965 |
ArrayList ^List = gcnew ArrayList();
|
|
|
966 |
List->Add(m_pListItem);
|
|
|
967 |
this->DisableList(List);
|
|
|
968 |
}
|
|
|
969 |
}
|
|
|
970 |
private: System::Void ContextDisable_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
971 |
if ( m_pListItem )
|
|
|
972 |
{
|
|
|
973 |
ArrayList ^List = gcnew ArrayList();
|
|
|
974 |
List->Add(m_pListItem);
|
|
|
975 |
this->DisableList(List);
|
|
|
976 |
}
|
|
|
977 |
}
|
|
|
978 |
private: System::Void ListPackages_DragOver(System::Object^ sender, System::Windows::Forms::DragEventArgs^ e);
|
|
|
979 |
private: System::Void ListPackages_DragDrop(System::Object^ sender, System::Windows::Forms::DragEventArgs^ e);
|
|
|
980 |
private: System::Void UninstallSelectedContext_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
981 |
UninstallEvent(sender, e);
|
|
|
982 |
}
|
|
|
983 |
private: System::Void ContextName_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
984 |
|
|
|
985 |
CBaseFile *p = this->GetFileFromItem(m_pListItem);
|
|
|
986 |
if ( p )
|
|
|
987 |
{
|
|
|
988 |
SpkExplorer::PackageInfo ^info = gcnew SpkExplorer::PackageInfo(p, m_pPackages->GetLanguage());
|
|
|
989 |
info->ShowDialog(this);
|
|
|
990 |
}
|
|
|
991 |
}
|
|
|
992 |
private: System::Void contextMenuStrip1_Opening(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) {
|
|
|
993 |
this->OpenContextMenu(sender, e);
|
|
|
994 |
}
|
|
|
995 |
private: System::Void ListPackages_MouseDoubleClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
|
|
|
996 |
ListViewItem ^item = this->FindSelectedItem();
|
|
|
997 |
if ( item )
|
|
|
998 |
{
|
|
|
999 |
CBaseFile *p = this->GetFileFromItem(item);
|
|
|
1000 |
if ( p )
|
|
|
1001 |
{
|
|
|
1002 |
SpkExplorer::PackageInfo ^info = gcnew SpkExplorer::PackageInfo(p, m_pPackages->GetLanguage());
|
|
|
1003 |
info->ShowDialog(this);
|
|
|
1004 |
}
|
|
|
1005 |
}
|
|
|
1006 |
}
|
|
|
1007 |
private: System::Void emailAuthorToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
1008 |
this->RunFromToolItem(cli::safe_cast<ToolStripMenuItem ^>(sender));
|
|
|
1009 |
}
|
|
|
1010 |
private: System::Void visitForumPageToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
1011 |
this->RunFromToolItem(cli::safe_cast<ToolStripMenuItem ^>(sender));
|
|
|
1012 |
}
|
|
|
1013 |
private: System::Void visitWebSiteToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
1014 |
this->RunFromToolItem(cli::safe_cast<ToolStripMenuItem ^>(sender));
|
|
|
1015 |
}
|
|
|
1016 |
private: System::Void checkForUpdatesToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
1017 |
if ( m_pListItem )
|
|
|
1018 |
{
|
|
|
1019 |
CBaseFile *p = this->GetFileFromItem(m_pListItem);
|
|
|
1020 |
if ( p )
|
|
|
1021 |
{
|
|
|
1022 |
CheckUpdate ^update = gcnew CheckUpdate(m_pPackages, this->imageList1);
|
|
|
1023 |
update->OnePackage(p);
|
|
|
1024 |
this->ClearSelectedItems();
|
|
|
1025 |
if ( update->ShowDialog(this) == Windows::Forms::DialogResult::OK )
|
|
|
1026 |
{
|
|
|
1027 |
for ( int i = 0; i < update->GetInstallList()->Count; i++ )
|
|
|
1028 |
this->InstallPackage(Convert::ToString(update->GetInstallList()[i]), false, false, true);
|
|
|
1029 |
this->StartInstalling(false, true);
|
|
|
1030 |
}
|
|
|
1031 |
}
|
|
|
1032 |
}
|
|
|
1033 |
}
|
|
|
1034 |
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
1035 |
this->InstallArchive();
|
|
|
1036 |
}
|
|
|
1037 |
private: System::Void backgroundWorker2_DoWork(System::Object^ sender, System::ComponentModel::DoWorkEventArgs^ e) {
|
224 |
cycrow |
1038 |
m_pConverted = (CArchiveFile *)m_pPackages->createFromArchive(_WS(m_sConvertFile), true);
|
1 |
cycrow |
1039 |
}
|
|
|
1040 |
private: System::Void backgroundWorker2_RunWorkerCompleted(System::Object^ sender, System::ComponentModel::RunWorkerCompletedEventArgs^ e) {
|
|
|
1041 |
if ( m_pWait )
|
|
|
1042 |
{
|
|
|
1043 |
m_pWait->Close();
|
|
|
1044 |
delete m_pWait;
|
|
|
1045 |
m_pWait = nullptr;
|
|
|
1046 |
}
|
|
|
1047 |
|
|
|
1048 |
if ( !m_pConverted )
|
|
|
1049 |
this->DisplayMessageBox(false, "Unable to open", "Unable to open archive file, " + m_sConvertFile, MessageBoxButtons::OK, MessageBoxIcon::Error);
|
|
|
1050 |
else
|
|
|
1051 |
{
|
|
|
1052 |
bool errored = false;
|
|
|
1053 |
int errorNum = m_pPackages->PrepareInstallPackage(m_pConverted, false, false, IC_ALL);
|
|
|
1054 |
if ( errorNum != INSTALLCHECK_OK )
|
|
|
1055 |
{
|
|
|
1056 |
if ( errorNum == INSTALLCHECK_NOSHIP )
|
|
|
1057 |
{
|
121 |
cycrow |
1058 |
this->DisplayMessageBox(false, "No Ships", "Ships are not supported for " + _US(m_pPackages->getGameName()), MessageBoxButtons::OK, MessageBoxIcon::Stop);
|
1 |
cycrow |
1059 |
errored = true;
|
|
|
1060 |
}
|
|
|
1061 |
else if ( m_pPackages->PrepareInstallPackage(m_pConverted, false, false, IC_MODIFIED) != INSTALLCHECK_OK )
|
|
|
1062 |
{
|
171 |
cycrow |
1063 |
this->DisplayMessageBox(false, "Installing", "Currently in Vanilla Mode, Package is not an Vanilla Package\n" + _US(m_pConverted->name(m_pPackages->GetLanguage())) + "\n\nSwitch to modified mode if you wish to install this package", MessageBoxButtons::OK, MessageBoxIcon::Question);
|
1 |
cycrow |
1064 |
errored = true;
|
|
|
1065 |
}
|
|
|
1066 |
}
|
|
|
1067 |
|
|
|
1068 |
if ( !errored )
|
|
|
1069 |
this->StartInstallingArchive(false, true);
|
|
|
1070 |
}
|
|
|
1071 |
}
|
86 |
cycrow |
1072 |
private: System::Void ListPackages_DrawSubItem(System::Object^ sender, System::Windows::Forms::DrawListViewSubItemEventArgs^ e) {
|
|
|
1073 |
if ( System::String::Compare(e->SubItem->Text, "Yes") == 0 ) {
|
|
|
1074 |
e->DrawDefault = false;
|
|
|
1075 |
e->DrawBackground();
|
|
|
1076 |
|
|
|
1077 |
Image ^img = this->imageList1->Images[this->imageList1->Images->IndexOfKey("tick.png")];
|
|
|
1078 |
e->Graphics->DrawImage(img, e->SubItem->Bounds.Location);
|
|
|
1079 |
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);
|
|
|
1080 |
}
|
|
|
1081 |
else
|
|
|
1082 |
e->DrawDefault = true;
|
|
|
1083 |
}
|
126 |
cycrow |
1084 |
private: System::Void viewModSelectedToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e);
|
|
|
1085 |
|
1 |
cycrow |
1086 |
};
|
|
|
1087 |
}
|