Ejemplo n.º 1
0
        private void start()
        {
            resetIndicators();

            // if we find an offsets file from a previous run (hopefully sucessful...) ask the user whether we should use it
            if (File.Exists("offsets.json"))
            {
                if (!haveShownCustomOffsetsPopup)
                {
                    DialogResult dialogResult = MessageBox.Show("A custom offset file has been detected (likely generated from a previous run). Would you like to use the custom offsets?", "Use Custom Offsets?", MessageBoxButtons.YesNoCancel);
                    if (dialogResult == DialogResult.Cancel)
                    {
                        return;
                    }
                    else if (dialogResult == DialogResult.Yes)
                    {
                        useCustomOffset.Checked = true;
                    }
                    haveShownCustomOffsetsPopup = true;
                }
            }
            Task.Run(() => MemoryChanger.run(namesLookupFile, teamsLookupFile, false, useCustomOffset.Checked));
            toolStripButtonWriteF1.Enabled       = false;
            writeToF1ToolStripMenuItem.Enabled   = false;
            undoChangesToolStripMenuItem.Enabled = false;
            toolStripButtonUndo.Enabled          = false;
            toolStripProgressBar1.Style          = ProgressBarStyle.Marquee;
        }
Ejemplo n.º 2
0
 private void findOffsetsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Task.Run(() => MemoryChanger.findOffsets());
     useCustomOffset.Checked     = true;
     haveShownCustomOffsetsPopup = true;
     toolStripProgressBar1.Style = ProgressBarStyle.Marquee;
 }
Ejemplo n.º 3
0
 private void stop()
 {
     MemoryChanger.Stop();
     toolStripButtonWriteF1.Enabled     = true;
     writeToF1ToolStripMenuItem.Enabled = true;
     toolStripProgressBar1.Style        = ProgressBarStyle.Blocks;
 }
Ejemplo n.º 4
0
		private void start() {
			resetIndicators();
			Task.Run(() => MemoryChanger.run(namesLookupFile, teamsLookupFile));
			toolStripButtonWriteF1.Enabled = false;
			writeToF1ToolStripMenuItem.Enabled = false;
			undoChangesToolStripMenuItem.Enabled = false;
			toolStripButtonUndo.Enabled = false;
			toolStripProgressBar1.Style = ProgressBarStyle.Marquee;
		}
Ejemplo n.º 5
0
		private void undo() {
			if (MessageBox.Show("Undo is an experimental feature and may not correctly undo all changes you have made. Always restart the game to be sure", "Experimental Feature!", MessageBoxButtons.YesNo) == DialogResult.No) {
				return;
			}
			resetIndicators();
			Task.Run(() => MemoryChanger.run(namesLookupFile, teamsLookupFile, true));
			toolStripButtonWriteF1.Enabled = false;
			writeToF1ToolStripMenuItem.Enabled = false;
			undoChangesToolStripMenuItem.Enabled = false;
			toolStripButtonUndo.Enabled = false;
			toolStripProgressBar1.Style = ProgressBarStyle.Marquee;
		}