private void Connect(object a) { if (ipAddressTextBox.Text.ToUpper() == "DEBUG") //For debugging PP without a connection to xbox { EnableControl(mainGroupBox, true); EnableControl(pluginPanel, true); return; //Bypass needing to connect to xbox for debugging purposes. } try { if (!Regex.IsMatch(ipAddressTextBox.Text, @"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b")) //Checks if valid IP { MessageBox.Show(" IP Address is not valid!"); return; } Save(); //Moved to own function _rtm = new RealTimeMemory(ipAddressTextBox.Text, 0, 0); //initialize real time memory _rtm.ReportProgress += UpdateProgressbar; if (!_rtm.Connect()) { throw new Exception("Connection Failed!"); } EnableControl(mainGroupBox, true); SetToolStripLabel("Connected!"); //#CODE FOR SAVING IP IN REGISTRY# //Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\XenonSDK", "DefaultIP", // ipAddress.ToString(CultureInfo.InvariantCulture)); //Store IP in registry ShowMessageBox("Connected!", "Peek Poker", MessageBoxButtons.OK, MessageBoxIcon.Information); SetTextBoxText(connectButton, "Re-Connect"); EnableControl(pluginPanel, true); } catch (Exception ex) { ShowMessageBox(ex.Message, String.Format("Peek Poker"), MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public PeekNPoke(RealTimeMemory rtm) { InitializeComponent(); _rtm = rtm; ChangeNumericMaxMin(); }
public Dump(RealTimeMemory rtm) { InitializeComponent(); _rtm = rtm; }
public Search(RealTimeMemory rtm) { InitializeComponent(); _rtm = rtm; resultGrid.DataSource = _searchLimitedResult; }