Skip to content

Commit

Permalink
Fixed some weird interactions, added prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ErisLoona committed Sep 3, 2023
1 parent 3354214 commit f826e3f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
16 changes: 16 additions & 0 deletions MainMenu.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 23 additions & 3 deletions MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public partial class MainMenu : Form

//Sorting Mode extras
public static string[] script = new string[200], itemRemember = new string[128];
public static int itemListControls = 0, hh = 0, mm = 0, ss = 0, rememberIndex = 0, scriptIndex = 0, websiteLoadDelay = 5000;
public static bool sessionActive = false, sessionPaused = false;
public static int itemListControls = 0, hh = 0, mm = 0, ss = 0, rememberIndex = 0, scriptIndex = 0, websiteLoadDelay = 5000, rememborLocationIndex;
public static bool sessionActive = false, sessionPaused = false, clearTrigger = false, rememborDecision;
Image timerButtonPlayIcon, timerButtonPauseIcon;
NumericUpDown[] stackCounter = new NumericUpDown[50];
Label[] stackLabel = new Label[50];
Expand Down Expand Up @@ -826,6 +826,20 @@ private void analyzeButton_Click(object sender, EventArgs e)
}
if (sessionActive == true && sessionPaused == false)
pauseSession();
if (clearTrigger == true)
{
rememborLocationIndex = locationBox.SelectedIndex;
clearSessionButton_Click(sender, e);
if (rememborDecision == true)
{
locationBox.SelectedIndex = rememborLocationIndex;
}
else
{
return;
}

}
analyzeButton.Enabled = false;
loadingBar.Visible = true;
loadingBar.Enabled = true;
Expand Down Expand Up @@ -861,6 +875,7 @@ public void startSession()
if (sessionActive == false)
{
timerReset();
infoLabel.Visible = false;
modeCheck.Enabled = false;
locationBox.Enabled = false;
sessionActive = true;
Expand Down Expand Up @@ -909,12 +924,15 @@ private void clearSessionButton_Click(object sender, EventArgs e)
sessionPaused = false;
swapPauseButtonIcon(false);
rememberIndex = 0;
clearTrigger = false;
rememborDecision = true;
GC.Collect();
}
else
{
if (temp == false && sessionActive == true)
pauseSession();
rememborDecision = false;
}
}

Expand Down Expand Up @@ -1001,6 +1019,8 @@ private void endSessionButton_Click(object sender, EventArgs e)
MessageBox.Show("Please set your ID first in the settings!", "ID not set", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
clearTrigger = true;
infoLabel.Visible = true;
playPauseButton.Enabled = false;
playPauseButton.Visible = false;
modeCheck.Enabled = true;
Expand Down Expand Up @@ -1055,7 +1075,7 @@ private void endSessionButton_Click(object sender, EventArgs e)
.TextEntry(script[0])
.KeyPress(VirtualKeyCode.TAB)
.KeyPress(VirtualKeyCode.RETURN);
Thread.Sleep(750);
Thread.Sleep(1200);
new InputSimulator().Keyboard.KeyPress(VirtualKeyCode.TAB)
.TextEntry(Convert.ToString(hours))
.KeyPress(VirtualKeyCode.TAB)
Expand Down
2 changes: 1 addition & 1 deletion MainMenu.resx
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@
<data name="playPauseButton.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
vgAADr4B6kKxwAAAD1RJREFUeF7t1rFxXEEMRMGLQCZNhaAQGApDYerUpz8eBs6hu+olsAZ2XgAAAAAA
vQAADr0BR/uQrQAAD1RJREFUeF7t1rFxXEEMRMGLQCZNhaAQGApDYerUpz8eBs6hu+olsAZ2XgAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Expand Down

0 comments on commit f826e3f

Please sign in to comment.