Id() public méthode

public Id ( ) : string
Résultat string
        private void EstimatorTagForm_Load(object sender, EventArgs e)
        {
            if (this.m_type == EstimatorTag.tag_type.item_tag)
            {
                this.m_list.MultiSelect = false;
            }

            this.Text     = m_str_title;
            m_prompt.Text = m_str_prompt;

            EstimatorPlugIn plugin = RMA.Rhino.RhUtil.GetPlugInInstance() as EstimatorPlugIn;

            for (int i = 0; i < plugin.m_tag_table.TagCount(); i++)
            {
                EstimatorTag tag = plugin.m_tag_table[i];
                if (tag.Type() == m_type)
                {
                    ListViewItem item = new ListViewItem(tag.Id());
                    item.SubItems.Add(tag.Description());
                    item.Tag = i;
                    m_list.Items.Add(item);
                }
            }

            m_list.Columns.Add("Tag");
            m_list.Columns.Add("Description");

            foreach (ColumnHeader ch in m_list.Columns)
            {
                ch.Width = -2;
            }
        }
 public int AddTag(EstimatorTag tag)
 {
     if (tag.IsValid())
       {
     int index = FindTag(tag.Id());
     if (index < 0)
     {
       m_a.Add(tag);
       return m_a.Count - 1;
     }
       }
       return -1;
 }
Exemple #3
0
 public int AddTag(EstimatorTag tag)
 {
     if (tag.IsValid())
     {
         int index = FindTag(tag.Id());
         if (index < 0)
         {
             m_a.Add(tag);
             return(m_a.Count - 1);
         }
     }
     return(-1);
 }