Exemplo n.º 1
0
        private string GetAttribute(string line, string attr)
        {
            string        retVal = null;
            List <string> parts  = InputParser.ParseCoachLine(line);
            int           i      = Array.IndexOf(mKeyParts, attr);

            if (i > -1 && i < parts.Count)
            {
                retVal = parts[i];
            }

            return(retVal);
        }
Exemplo n.º 2
0
        private void SetCoachData(string current)
        {
            string        val   = "";
            List <string> parts = InputParser.ParseCoachLine(current);

            foreach (string attribute in mKeyParts)
            {
                val = GetAttribute(current, attribute);
                if (val != null)
                {
                    SetControlValue(attribute, val);
                }
            }
            // disable perm fields that are not present in key
            Info1.Enabled = Array.IndexOf(mKeyParts, "Info1") > -1;
            Info2.Enabled = Array.IndexOf(mKeyParts, "Info2") > -1;
        }