示例#1
0
        public void refreshTargets()
        {
            menu_target.DropDownItems.Clear();

            menu_target.DropDownItems.Add(new ToolStripMenuItem("Add target...",null,menu_target_add_Click,"menu_target_add"));
            menu_target.DropDownItems.Add(new ToolStripSeparator());

            foreach (nodeTarget nt in targets)
            {
                targetItem ti = new targetItem(nt);
                menu_target.DropDownItems.Add(ti);
                ti.Click += new EventHandler(targetItem_Click);
                ti.DoubleClick += new EventHandler(ti_DoubleClick);
                ti.Checked = ti.getNodeTarget().Equals(currentTarget);
                targetItemDelete tidel = new targetItemDelete(ti);
                tidel.Click += new EventHandler(tidel_Click);
                ti.DropDownItems.Add(tidel);
            }
        }
示例#2
0
 public targetItemDelete(targetItem ti)
 {
     this.ti = ti;
 }