コード例 #1
0
        public ToolStripView CreateToolStrip(ToolStripCodon toolStripCodon)
        {
            if (toolStripCodon == null)
            {
                throw new ArgumentException("CreateToolStrip Error");
            }
            ToolStripView toolStripDoozer = new ToolStripView(toolStripCodon);

            this.Controls.Add(toolStripDoozer);
            return(toolStripDoozer);
        }
コード例 #2
0
 public ToolStripView(ToolStripCodon codon)
 {
     this.Renderer = UIHelper.ToolStripRenders.ControlToControlLight;
     Codon         = codon;
     codon.View    = this;
     if (codon != null && codon.Items != null)
     {
         foreach (IToolStripItemCodon toolStripItem in codon.Items)
         {
             System.Windows.Forms.ToolStripItem item =
                 toolStripItem.View as System.Windows.Forms.ToolStripItem;
             Debug.Assert(item != null, "item 为 null");
             if (item != null)
             {
                 this.Items.Add(item);
             }
         }
     }
 }