Пример #1
0
        public static ClassificationDisplayRule FromXML(String serializedString)
        {
            ClassificationDisplayRule rule = new ClassificationDisplayRule();
            Match m = regex.Match(serializedString);
            if (m.Success)
            {
                rule.StateName = m.Groups[1].Value;
                rule.Classification = m.Groups[2].Value;
                rule.IconName = m.Groups[3].Value;
            }
            else
            {
               // throw new Exception(String.Format("Invalid XML string in {0}: {1}", dataType, xml));
            }

            return rule;
        }
Пример #2
0
 private DataGridViewRow CreateRow(ClassificationDisplayRule r)
 {
     DataGridViewRow row = new DataGridViewRow();
     row.CreateCells(dataGridView1, r.StateName, r.Classification, r.IconName, GetImage(r.IconName), "Edit...", "Delete");
     return row;
 }