NTRDebuggerTool.Forms.MainForm.LoadButton_Click C# (CSharp) Method

LoadButton_Click() private method

private LoadButton_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void LoadButton_Click(object sender, EventArgs e)
        {
            String[] parts_ = Processes.Text.Split('|');
            if (parts_.Length < 2) return;
            String game = Config.ConfigFileDirectory + Path.DirectorySeparatorChar + parts_[1] + @".xml";
            SaveManager sm = SaveManager.LoadFromXml(game);
            if (sm.titleId != parts_[1])
            {
                MessageBox.Show(@"Filename/TitleID Mismatch.");
            }
            else
            {
                foreach (SaveCode code in sm.codes)
                {
                    if (!IsInValues(code.address))
                    {
                        int RowIndex = ValuesGrid.Rows.Add();
                        ValuesGrid[0, RowIndex].Value = null;
                        ValuesGrid[3, RowIndex].Value = DataTypeExactTool.GetKey(code.type);
                        ValuesGrid[1, RowIndex].Value = code.address;

                        // Read the memory
                        RefreshMemory(RowIndex);
                    }
                }
                foreach (GateShark code in sm.gscodes)
                {
                    if (!IsInValues(code.ToString()))
                    {
                        int RowIndex = ValuesGrid.Rows.Add();
                        ValuesGrid[0, RowIndex].Value = null;
                        ValuesGrid[3, RowIndex].Value = DataTypeExact.Raw;
                        ValuesGrid[1, RowIndex].Value = code;
                    }
                }
            }
        }