예제 #1
0
 public static ProjectPage Parse(Match m)
 {
   ProjectPage ret = new ProjectPage();
   ret.Name = m.Groups["Name"].Value;
   return ret;
 }
예제 #2
0
    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;
    }