Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <DanTheMan827@users.noreply.github.com>2017-11-10 22:07:52 +0300
committerDaniel <DanTheMan827@users.noreply.github.com>2017-11-10 22:07:52 +0300
commit9362198698e0416d130ebd2ddea95abda558a7f3 (patch)
tree7f2cf9c2dafa56a64314f23f25aa865dd94da28a /MainForm.cs
parentf95dfc0e02610fecb5981120d121ab7b4626a8ac (diff)
Export-only mode when shift is held while clicking the sync button
Diffstat (limited to 'MainForm.cs')
-rw-r--r--MainForm.cs24
1 files changed, 18 insertions, 6 deletions
diff --git a/MainForm.cs b/MainForm.cs
index cd145361..861fa188 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -866,6 +866,7 @@ namespace com.clusterrr.hakchi_gui
private void buttonStart_Click(object sender, EventArgs e)
{
+ bool exportGames = (Control.ModifierKeys == Keys.Shift);
SaveConfig();
var stats = RecalculateSelectedGames();
@@ -874,11 +875,14 @@ namespace com.clusterrr.hakchi_gui
MessageBox.Show(Resources.SelectAtLeast, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
- var kernel = RequirePatchedKernel();
- if (kernel == DialogResult.No) return;
- if (kernel == DialogResult.Yes) // Message for new user
- MessageBox.Show(Resources.DoneYouCanUpload + "\r\n" + Resources.PressOkToContinue, Resources.Congratulations, MessageBoxButtons.OK, MessageBoxIcon.Information);
- if (UploadGames())
+ if (!exportGames)
+ {
+ var kernel = RequirePatchedKernel();
+ if (kernel == DialogResult.No) return;
+ if (kernel == DialogResult.Yes) // Message for new user
+ MessageBox.Show(Resources.DoneYouCanUpload + "\r\n" + Resources.PressOkToContinue, Resources.Congratulations, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+ if (UploadGames(exportGames))
{
MessageBox.Show(Resources.Done, Resources.Wow, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
@@ -1006,14 +1010,22 @@ namespace com.clusterrr.hakchi_gui
return workerForm.DialogResult == DialogResult.OK;
}
- bool UploadGames()
+ bool UploadGames(bool exportGames = false)
{
+ if (exportGames && exportFolderDialog.ShowDialog() != DialogResult.OK)
+ return false;
+
var workerForm = new WorkerForm(this);
workerForm.Text = Resources.UploadingGames;
workerForm.Task = WorkerForm.Tasks.UploadGames;
workerForm.Mod = "mod_hakchi";
workerForm.Config = ConfigIni.GetConfigDictionary();
workerForm.Games = new NesMenuCollection();
+ workerForm.exportGames = exportGames;
+
+ if (exportGames)
+ workerForm.exportDirectory = exportFolderDialog.SelectedPath;
+
bool needOriginal = false;
foreach (ListViewItem game in listViewGames.CheckedItems)
{