PKHeX.MemoryAmie.getMemoryString C# (CSharp) Method

getMemoryString() private method

private getMemoryString ( ComboBox m, ComboBox arg, ComboBox q, ComboBox f, string tr ) : string
m ComboBox
arg ComboBox
q ComboBox
f ComboBox
tr string
return string
        private string getMemoryString(ComboBox m, ComboBox arg, ComboBox q, ComboBox f, string tr)
        {
            string result = "";
            string nn = m_parent.TB_Nickname.Text;
            string a = ((Util.cbItem)(arg.SelectedItem) == null) ? arg.Text ?? "ERROR" : ((Util.cbItem)(arg.SelectedItem)).Text;
            int mem = Util.getIndex(m);

            bool enabled = false;
            if (mem == 0)
                result = Form1.memories[38];
            else
            {
                result = String.Format(Form1.memories[mem + 38], nn, tr, a, f.Text, q.Text);
                enabled = true;
            }

            // Show labels if the memory allows for them.
            if (q == CB_CTQual)
                L_CT_Quality.Visible = L_CT_Feeling.Visible = enabled;
            else
                L_OT_Quality.Visible = L_OT_Feeling.Visible = enabled;

            // Show Quality and Feeling.
            q.Visible = q.Enabled = f.Visible = f.Enabled = enabled;

            return result;
        }