public static ProjectAttribute Parse(Match m)
 {
   ProjectAttribute ret = new ProjectAttribute();
   ret.Name = m.Groups["Name"].Value;
   ret.AttributeType = m.Groups["Type"].Value.ToLower() == "quantity" || m.Groups["Type"].Value.ToLower() == "extensive" ? AttributeType.Extensive : AttributeType.Intensive;
   ret.Cnv = m.Groups["Cnv"].Value;
   ret.Parent = m.Groups["Parent"].Value;
   return ret;
 }
    protected void DoAddInterface()
    {
      if (m_AddSelector.ShowDialog() == DialogResult.Cancel) return;

      ProjectVectorItem item = null;
      if (m_AddSelector.radioAttribute.Checked)
      {
        item = new ProjectAttribute();
        item.Name = GetNextName("Att"); item.Valid = false;
      }
      else if (m_AddSelector.radioCalculation.Checked)
      {
        item = new ProjectCalculation();
        item.Name = GetNextName("Calc"); item.Valid = false;
      }
      else if (m_AddSelector.radioLabel.Checked)
      {
        item = new ProjectText();
        item.Name = GetNextName("Label");
      }
      else if (m_AddSelector.radioPageBreak.Checked)
      {
        item = new ProjectPage();
        item.Name = GetNextName("Page");
      }

      if (lstProjectVector.SelectedItems.Count == 0)
        lstProjectVector.Items.Add(item.LVI);
      else
        lstProjectVector.Items.Insert(lstProjectVector.SelectedIndices[0], item.LVI);

      lstProjectVector.SelectedItems.Clear();
      item.Changed += new EventHandler(item_Changed);
      item.LVI.Selected = true;
    }