コード例 #1
0
        private void lastTree1_AfterCheck(object sender, TreeViewEventArgs e)
        {
            TreeNode node = e.Node;

            if (node.Nodes.Count == 0)
            {
                ButtonControlExEventArgs args = new ButtonControlExEventArgs {
                    Name     = node.Text,
                    Key      = node.Name,
                    Style    = ButtonClickStyle.System,
                    Icon     = this.imageList1.Images[node.ImageKey],
                    IconName = node.ImageKey
                };
                if (e.Node.Checked)
                {
                    if (this.AddButtonOperate != null)
                    {
                        this.AddButtonOperate(this, args);
                    }
                }
                else if (this.DelteButtonOperate != null)
                {
                    this.DelteButtonOperate(this, args);
                }
            }
        }
コード例 #2
0
 private void AddIcon_Click(object sender, EventArgs e)
 {
     if ((this.AddButtonOperate != null) && (this.imea != IconManagerEventArgs.IconType.None))
     {
         ButtonControlExEventArgs args = new ButtonControlExEventArgs {
             Name = this.txt_softExeName.Text,
             Key  = this.txt_selectExePath.Text
         };
         if ((this.imea == IconManagerEventArgs.IconType.Directory) || (this.imea == IconManagerEventArgs.IconType.File))
         {
             args.Style = ButtonClickStyle.Exe;
         }
         if (this.imea == IconManagerEventArgs.IconType.Url)
         {
             args.Style = ButtonClickStyle.URL;
         }
         args.Icon     = this.pic_softIcon.Image;
         args.IconName = "";
         this.AddButtonOperate(this, args);
     }
 }