• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# DotNetBar.BaseItem类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DevComponents.DotNetBar.BaseItem的典型用法代码示例。如果您正苦于以下问题:C# BaseItem类的具体用法?C# BaseItem怎么用?C# BaseItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BaseItem类属于DevComponents.DotNetBar命名空间,在下文中一共展示了BaseItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CopyToItem

		protected override void CopyToItem(BaseItem copy)
		{
			ControlContainerItem objCopy=copy as ControlContainerItem;
			base.CopyToItem(objCopy);
			objCopy.ContainerLoadControl=this.ContainerLoadControl;
			objCopy.InitControl();
		}
开发者ID:,项目名称:,代码行数:7,代码来源:


示例2: RecalcSize

		/// <summary>
		/// Recalcualtes the size of the container. Assumes that DisplayRectangle.Location is set to the upper left location of this container.
		/// </summary>
		public override void RecalcSize()
		{
			if(this.SuspendLayout)
				return;

			if(this.SubItems.Count==0)
			{
				if(this.DesignMode && !this.SystemContainer)
				{
					m_Rect.Size=m_EmptyDesignTimeSize;
					if(m_LayoutOrientation==eOrientation.Horizontal)
						m_Rect.Width+=12;
					else
						m_Rect.Height+=12;
				}
				else
				{
					m_Rect=Rectangle.Empty;
				}
				return;
			}
			
			IContentLayout layout=this.GetContentLayout();
			BlockLayoutManager blockLayout=this.GetBlockLayoutManager();
			BaseItem[] elements=new BaseItem[this.SubItems.Count];
			this.SubItems.CopyTo(elements,0);
			if(m_Rect.Width==0)
				m_Rect.Width=16;
			if(m_Rect.Height==0)
				m_Rect.Height=16;
			m_Rect=layout.Layout(m_Rect,elements,blockLayout);
			base.RecalcSize();
		}
开发者ID:,项目名称:,代码行数:36,代码来源:


示例3: CreateItemContainer

		public static ItemContainer CreateItemContainer(IDesignerServices designer, BaseItem parent, eOrientation containerOrientation)
		{
			IDesignerHost dh=designer.GetService(typeof(IDesignerHost)) as IDesignerHost;
			IComponentChangeService cc=designer.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
			
			if(dh==null || parent==null || cc==null)
				return null;

			ItemContainer c=null;

			DesignerTransaction trans=dh.CreateTransaction("New DotNetBar Item Container");
			try
			{
				c=dh.CreateComponent(typeof(ItemContainer)) as ItemContainer;
				TypeDescriptor.GetProperties(c)["LayoutOrientation"].SetValue(c,containerOrientation);
				cc.OnComponentChanging(parent,TypeDescriptor.GetProperties(c)["SubItems"]);
				parent.SubItems.Add(c);
				cc.OnComponentChanged(parent,TypeDescriptor.GetProperties(c)["SubItems"],null,null);
			}
			finally
			{
				if(!trans.Canceled)
					trans.Commit();
			}

			return c;
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:27,代码来源:DesignerSupport.cs


示例4: Add

		public int Add(BaseItem item)
		{
			item.SetOwner(m_Owner);
			item.Visible=false;
			item.Displayed=false;
			return List.Add(item);
		}
开发者ID:,项目名称:,代码行数:7,代码来源:


示例5: CopyToItem

		protected override void CopyToItem(BaseItem copy)
		{
            ColorItem ci = copy as ColorItem;
			base.CopyToItem(ci);
            ci.DesiredSize = this.DesiredSize;
            ci.Color = this.Color;
            ci.Border = this.Border;
		}
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:8,代码来源:ColorItem.cs


示例6: RecordSetting

        public override void RecordSetting(BaseItem item)
        {
            if (this.SettingsRecorded)
                return;
            
            ItemContainer cont = item as ItemContainer;
            m_MultiLine = cont.MultiLine;
            m_LayoutOrientation = cont.LayoutOrientation;

            base.RecordSetting(item);
        }
开发者ID:,项目名称:,代码行数:11,代码来源:


示例7: BaseItemController

 /// <summary>
 /// Initializes a new instance of the BaseItemController class.
 /// </summary>
 /// <param name="item"></param>
 /// <param name="parentControl"></param>
 public BaseItemController(BaseItem item, Control parentControl)
 {
     _Item = item;
     _ParentControl = parentControl;
     _ParentControl.MouseDown += new MouseEventHandler(ParentControlMouseDown);
     _ParentControl.MouseEnter += new EventHandler(ParentControlMouseEnter);
     _ParentControl.MouseMove += new MouseEventHandler(ParentControlMouseMove);
     _ParentControl.MouseUp += new MouseEventHandler(ParentControlMouseUp);
     _ParentControl.MouseLeave += new EventHandler(ParentControlMouseLeave);
     _ParentControl.Paint += new PaintEventHandler(ParentControlPaint);
     _Item.ContainerControl = _ParentControl;
 }
开发者ID:,项目名称:,代码行数:17,代码来源:


示例8: AddSubMenu

 /// <summary>
 /// 加载子菜单
 /// </summary>
 /// <param name="menuId">父菜单Id</param>
 /// <param name="patientItem">父菜单控件</param>
 /// <param name="menuData">菜单数据</param>
 private void AddSubMenu(int menuId, BaseItem patientItem, List<BaseMenu> allmenus)
 {
     List<BaseMenu> mainMenu = allmenus.FindAll(x => x.PMenuId == menuId).OrderBy(x => x.SortId).ToList();
     foreach (BaseMenu menu in mainMenu)
     {
         AddToolMenu(menu);
         BaseItem bottonItem = new ButtonItem(menu.MenuId.ToString(), menu.Name);
         bottonItem.Tag = menu;
         AddSubMenu(menu.MenuId, bottonItem, allmenus);
         patientItem.SubItems.Add(bottonItem);
     }
 }
开发者ID:keep01,项目名称:efwplus_winformframe,代码行数:18,代码来源:FrmMain.cs


示例9: OnItemAdded

		protected internal override void OnItemAdded(BaseItem objItem)
		{
			base.OnItemAdded(objItem);
			ImageItem objImageItem=objItem as ImageItem;
			if(objImageItem!=null)
			{
                Size newSize = m_SubItemsImageSize;
				if(objImageItem.ImageSize.Width>m_SubItemsImageSize.Width)
                    newSize.Width = objImageItem.ImageSize.Width;
				if(objImageItem.ImageSize.Height>m_SubItemsImageSize.Height)
                    newSize.Height = objImageItem.ImageSize.Height;
                this.SubItemsImageSize = newSize;
			}
		}
开发者ID:,项目名称:,代码行数:14,代码来源:


示例10: AddCopy

		public void AddCopy(BaseItem objItem)
		{
			if(objItem==null)
				throw new System.ArgumentNullException("Item must be valid value");
			if(objItem.Name==null || objItem.Name=="")
			{
				// Auto assign item name
				objItem.Name="item_"+objItem.Id.ToString();
			}
			if(m_Items.ContainsKey(objItem.Name))
				throw new System.InvalidOperationException("Item with this name already exists");
			BaseItem objCopy=objItem.Copy();
			objCopy.SetOwner(m_Owner);
			objCopy.GlobalItem=true;
			m_Items.Add(objCopy.Name,objCopy);
		}
开发者ID:,项目名称:,代码行数:16,代码来源:


示例11: _Add

		internal int _Add(BaseItem item)
		{
			m_IgnoreEvents=true;
			m_AllowParentRemove=false;
			int i=0;
			try
			{
				i=List.Add(item);
			}
			finally
			{
				m_IgnoreEvents=false;
				m_AllowParentRemove=true;
			}
			return i;
		}
开发者ID:,项目名称:,代码行数:16,代码来源:


示例12: Paint

 public void Paint(BaseItem container, ItemPaintArgs p)
 {
     foreach (BaseItem item in container.SubItems)
     {
         if (item.Visible && item.Displayed)
         {
             if (p.ClipRectangle.IsEmpty || p.ClipRectangle.IntersectsWith(item.DisplayRectangle))
             {
                 Region oldClip = p.Graphics.Clip; //.Clone() as Region;
                 p.Graphics.SetClip(item.DisplayRectangle, CombineMode.Intersect);
                 item.Paint(p);
                 p.Graphics.Clip = oldClip;
                 if (oldClip != null)
                     oldClip.Dispose();
             }
         }
     }
 }
开发者ID:,项目名称:,代码行数:18,代码来源:


示例13: Remove

		public void Remove(BaseItem objItemToRemove)
		{
			if(m_Items.ContainsKey(objItemToRemove.Name))
			{
				m_Items.Remove(objItemToRemove.Name);
				objItemToRemove.SetOwner(null);
				((IOwner)m_Owner).RemoveShortcutsFromItem(objItemToRemove);
				//objItemToRemove.GlobalItem=false;
				return;
			}
			
			string sItemName=objItemToRemove.Name;
			foreach(DictionaryEntry o in m_Items)
			{
				BaseItem objItem=o.Value as BaseItem;
				// Name out of sync case
				if(objItem==objItemToRemove)
				{
					m_Items.RemoveAt(m_Items.IndexOfValue(objItem));
					objItemToRemove.SetOwner(null);
					((IOwner)m_Owner).RemoveShortcutsFromItem(objItemToRemove);
                    return;
				}
				if(objItem.SubItems.Count>0)
				{
					if(RemoveItem(sItemName,objItem))
					{
						//objItemToRemove.GlobalItem=false;
						return;
					}
				}
			}

			// This will throw exception...
			m_Items.Remove(objItemToRemove.Name);
			objItemToRemove.SetOwner(null);
		}
开发者ID:,项目名称:,代码行数:37,代码来源:


示例14: GetContainerControl

 private Control GetContainerControl(BaseItem item)
 {
     object container = item.ContainerControl;
     if (container is BaseItem)
         container = ((BaseItem)container).ContainerControl;
     return container as Control;
 }
开发者ID:,项目名称:,代码行数:7,代码来源:


示例15: CollapseRecursively

 private void CollapseRecursively(BaseItem item)
 {
     foreach (BaseItem sub in item.SubItems)
     {
         sub.Expanded = false;
         CollapseRecursively(sub);
     }
 }
开发者ID:,项目名称:,代码行数:8,代码来源:


示例16: AnyVisibleSubItems

 private bool AnyVisibleSubItems(BaseItem item)
 {
     if (!item.ShowSubItems) return false;
     foreach (BaseItem t in item.SubItems)
     {
         if (t.Visible) return true;
     }
     return false;
 }
开发者ID:,项目名称:,代码行数:9,代码来源:


示例17: GetExpandedItemRecursevly

 private BaseItem GetExpandedItemRecursevly(BaseItem item)
 {
     foreach (BaseItem sub in item.SubItems)
     {
         if (sub.Expanded)
         {
             BaseItem inner = GetExpandedItemRecursevly(sub);
             if (inner != null) return inner;
             return sub;
         }
     }
     return null;
 }
开发者ID:,项目名称:,代码行数:13,代码来源:


示例18: SetContainerRecursevly

 private void SetContainerRecursevly(BaseItem item, object newContainer)
 {
     foreach (BaseItem c in item.SubItems)
     {
         c.ContainerControl = newContainer;
         SetContainerRecursevly(c, newContainer);
     }
 }
开发者ID:,项目名称:,代码行数:8,代码来源:


示例19: OnSubItemExpandChange

 protected internal override void OnSubItemExpandChange(BaseItem item)
 {
     NeedRecalcSize = true;
     if (this.Expanded)
     {
         if (_CurrentStoryline == null || _CurrentStoryline.IsDisposed)
         {
             WaitForCurrentAnimationToComplete();
             RunExpandItemAnimation();
         }
         else
             this.Invalidate();
     }
     HotSubItemInfoIndex = -1;
     base.OnSubItemExpandChange(item);
 }
开发者ID:,项目名称:,代码行数:16,代码来源:


示例20: while

        bool IMessageHandlerClient.OnMouseDown(IntPtr hWnd, IntPtr wParam, IntPtr lParam)
        {
            if (m_RegisteredPopups.Count == 0)
                return false;

            BaseItem[] popups = new BaseItem[m_RegisteredPopups.Count];
            m_RegisteredPopups.CopyTo(popups);
            for (int i = popups.Length - 1; i >= 0; i--)
            {
                PopupItem objPopup = popups[i] as PopupItem;
                bool bChildHandle = objPopup.IsAnyOnHandle(hWnd);

                if (!bChildHandle)
                {
                    System.Windows.Forms.Control cTmp = System.Windows.Forms.Control.FromChildHandle(hWnd);
                    if (cTmp != null)
                    {
                        if (cTmp is MenuPanel)
                        {
                            bChildHandle = true;
                        }
                        else
                        {
                            while (cTmp.Parent != null)
                            {
                                cTmp = cTmp.Parent;
                                if (cTmp.GetType().FullName.IndexOf("DropDownHolder") >= 0 || cTmp is MenuPanel || cTmp is PopupContainerControl)
                                {
                                    bChildHandle = true;
                                    break;
                                }
                            }
                        }
                        if (!bChildHandle)
                            bChildHandle = objPopup.IsAnyOnHandle(cTmp.Handle);
                    }
                    else
                    {
                        string s = NativeFunctions.GetClassName(hWnd);
                        s = s.ToLower();
                        if (s.IndexOf("combolbox") >= 0)
                            bChildHandle = true;
                    }
                }

                if (!bChildHandle)
                {
                    Control popupContainer = objPopup.PopupControl;
                    if (popupContainer != null)
                        while (popupContainer.Parent != null) popupContainer = popupContainer.Parent;
                    if (popupContainer != null && popupContainer.Bounds.Contains(Control.MousePosition))
                        bChildHandle = true;
                }

                if (bChildHandle)
                    break;

                if (objPopup.Displayed)
                {
                    // Do not close if mouse is inside the popup parent button
                    Point p = this.PointToClient(MousePosition);
                    if (objPopup.DisplayRectangle.Contains(p))
                        break;
                }

                if (this.GetDesignMode())
                {
                    this.GetDelayClose().DelayClose(objPopup);
                }
                else
                    objPopup.ClosePopup();

                if (m_RegisteredPopups.Count == 0)
                    break;
            }
            if (m_RegisteredPopups.Count == 0)
                this.MenuFocus = false;
            return false;
        }
开发者ID:,项目名称:,代码行数:79,代码来源:



注:本文中的DevComponents.DotNetBar.BaseItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DotNetBar.ButtonItem类代码示例发布时间:2022-05-24
下一篇:
C# AdvTree.Node类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap