예제 #1
0
        /// <summary>
        /// add navigation nar item
        /// </summary>
        /// <param name="caption"></param>
        /// <param name="name"></param>
        /// <param name="type"></param>
        /// <param name="imageName"></param>
        private void AddNarBarItem(string caption, ShapeType type, string imageName)
        {
            ToolBoxNarBarItem item = new ToolBoxNarBarItem(type);

            item.Caption    = caption;
            item.Name       = caption.Replace(" ", "");
            item.SmallImage = Resource.GetImage(imageName);
            item.Hint       = caption;
            nbcToolBox.Items.Add(item);
            grpToolBox.ItemLinks.Add(item);
        }
예제 #2
0
 void nbcToolBox_DoubleClick(object sender, System.EventArgs e)
 {
     if (MessageControl.Current != null &&
         nbcToolBox.PressedLink != null)
     {
         ToolBoxNarBarItem item = nbcToolBox.PressedLink.Item as ToolBoxNarBarItem;
         if (item != null)
         {
             MessageControl.Current.AddLayer(item.ShapeType, ShapeAddMode.Menu);
         }
     }
     //MessageBox.Show(nbcToolBox.PressedLink.Item.Name);
 }