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

C# DotNetBar.ButtonItem类代码示例

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

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



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

示例1: PanelExTitle

        public PanelExTitle()
        {
            m_ExpandChangeButton = new ButtonItem("close");
            m_ExpandChangeButton.Style = eDotNetBarStyle.Office2003;
            m_ExpandChangeButton.Image = BarFunctions.LoadBitmap("SystemImages.CollapseTitle.png");
            m_ExpandChangeButton.Displayed = true;
            m_ExpandChangeButton.Click += new EventHandler(m_ExpandChangeButton_Click);

            m_ItemContainer = new ItemContainer();
            m_ItemContainer.ContainerControl = this;
            m_ItemContainer.Style = eDotNetBarStyle.Office2003;
            m_ItemContainer.SubItems.Add(m_ExpandChangeButton);
            base.MarkupUsesStyleAlignment = true;
        }
开发者ID:,项目名称:,代码行数:14,代码来源:


示例2: HomeOperation

        //开始操作
        public void HomeOperation(ButtonItem button)
        {
            string action = button.Text;
            switch (action)
            {
                case "openmxd":
                    OpenMXD();
                    break;
                case "zoomin":
                    MapNavigation("zoomin");
                    break;
                case "点":
                    SpatialQuery(action);
                    break;
                case "attributequery":
                    AttributeQuery();
                    break;
                case "adddata":
                    AddData();
                    break;
                default:

                    break;
            }


        }
开发者ID:gistop,项目名称:aegis,代码行数:28,代码来源:Home.cs


示例3: defaultToolMenu

        private void defaultToolMenu()
        {
            //ButtonItem toolbarItem0 = new ButtonItem("redept", "切换科室");

            //toolbarItem0.ImageFixedSize = new Size(30, 30);
            //toolbarItem0.Image = Image.FromFile(@"images\1.png");
            //toolbarItem0.ImagePosition = eImagePosition.Top;
            ButtonItem toolbarItem1 = new ButtonItem("relogin", "切换用户");
            toolbarItem1.ImageFixedSize = new Size(30, 30);
            toolbarItem1.Image = Image.FromFile(AppGlobal.AppRootPath + @"images\2.png");
            toolbarItem1.ImagePosition = eImagePosition.Top;
            ButtonItem toolbarItem2 = new ButtonItem("changepassword", "修改密码");
            toolbarItem2.ImageFixedSize = new Size(30, 30);
            toolbarItem2.Image = Image.FromFile(AppGlobal.AppRootPath + @"images\3.png");
            toolbarItem2.ImagePosition = eImagePosition.Top;
            ButtonItem toolbarItem3 = new ButtonItem("welcome", "系统首页");
            toolbarItem3.BeginGroup = true;
            toolbarItem3.ImageFixedSize = new Size(30, 30);
            toolbarItem3.Image = Image.FromFile(AppGlobal.AppRootPath + @"images\1.png");
            toolbarItem3.ImagePosition = eImagePosition.Top;

            ButtonItem toolbarItem4 = new ButtonItem("close", "最小化系统");
            toolbarItem4.ImageFixedSize = new Size(30, 30);
            toolbarItem4.Image = Image.FromFile(AppGlobal.AppRootPath + @"images\4.png");
            toolbarItem4.ImagePosition = eImagePosition.Top;
            toolbarItem4.BeginGroup = true;

            this.barMainToolBar.Items.AddRange(new BaseItem[] { toolbarItem3, 
                //toolbarItem0, 
                toolbarItem1, toolbarItem2, toolbarItem4 });
        }
开发者ID:keep01,项目名称:efwplus_winformframe,代码行数:31,代码来源:FrmMain.cs


示例4: GetTextRectangle

 protected override Rectangle GetTextRectangle(ButtonItem button, ItemPaintArgs pa, eTextFormat stringFormat, CompositeImage image)
 {
     Rectangle r = base.GetTextRectangle(button, pa, stringFormat, image);
     if (image == null && string.IsNullOrEmpty(button.Symbol))
         r.Inflate(-3, 0);
     return r;
 }
开发者ID:,项目名称:,代码行数:7,代码来源:


示例5: CreateButtonPainter

        public static ButtonItemPainter CreateButtonPainter(ButtonItem button)
        {
            if (button is RibbonTabItem)
            {
                return CreateRibbonTabItemPainter((RibbonTabItem)button);
            }
            if (button is RibbonOverflowButtonItem)
            {
                ButtonItemPainter p = CreateRibbonOverflowButtonPainter((RibbonOverflowButtonItem)button);
                if (p != null)
                    return p;
            }

            eDotNetBarStyle buttonEffectiveStyle = button.EffectiveStyle;
            if (buttonEffectiveStyle == eDotNetBarStyle.Office2010 && button.ContainerState == eContainerState.NavigationPane)
            {
                return _Office2010NavPaneButtonPainter;
            }
            
            if (buttonEffectiveStyle == eDotNetBarStyle.Office2010 && button is ApplicationButton)
                return Office2010ApplicationButtonPainter;
            else if (button is DevComponents.DotNetBar.Metro.MetroAppButton || button is ApplicationButton && buttonEffectiveStyle == eDotNetBarStyle.Metro)
                return MetroAppButtonPainter;

            if (BarFunctions.IsOffice2007Style(buttonEffectiveStyle))
            {
                if (buttonEffectiveStyle == eDotNetBarStyle.Metro)
                    return m_MetroButtonPainter;
                if (button.ContainerControl is RibbonBar)
                    return m_Office2007Painter;
                return m_Office2007Painter;
            }
            return m_Office2003Painter;
        }
开发者ID:,项目名称:,代码行数:34,代码来源:


示例6: CreateChildMenus

        private RibbonBar CreateChildMenus(MenuInfo subMenuInfo)
        {
            ButtonItem buttonItem = new DevComponents.DotNetBar.ButtonItem();
            buttonItem.Name = subMenuInfo.MenuID;
            buttonItem.Text = subMenuInfo.MenuName;
            buttonItem.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
            //buttonItem.Image = ((System.Drawing.Image)(resourceManager.GetObject("buttonItem1.Image")));
            //buttonItem.Image = ((System.Drawing.Image)(resourceManager.GetObject("OpenExistingPlace")));
            buttonItem.Image = imageList.Images["OpenExistingPlace"];
            buttonItem.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
            buttonItem.RibbonWordWrap = false;
            buttonItem.Visible = true;

            DevComponents.DotNetBar.RibbonBar ribbonBar = new DevComponents.DotNetBar.RibbonBar();

            ribbonBar.AutoOverflowEnabled = true;
            ribbonBar.BackgroundMouseOverStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            ribbonBar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            ribbonBar.ContainerControlProcessDialogKey = true;
            ribbonBar.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
            buttonItem});
            ribbonBar.Location = new System.Drawing.Point(3, 0);
            ribbonBar.Name = System.Guid.NewGuid().ToString();
            ribbonBar.Size = new System.Drawing.Size(337, 82);
            ribbonBar.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
            ribbonBar.TabIndex = 0;
            //ribbonBar.Text = subMenuInfo.MenuName;
            ribbonBar.TitleStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            ribbonBar.TitleStyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
            ribbonBar.Visible = true;

            return ribbonBar;
        }
开发者ID:EinsteinOrg,项目名称:einstein,代码行数:33,代码来源:Navigations.cs


示例7: PaintButtonBackground

        public override void PaintButtonBackground(ButtonItem button, ItemPaintArgs pa, CompositeImage image)
		{
            bool isOnMenu = IsOnMenu(button, pa);
			if(isOnMenu)
				base.PaintButtonBackground(button,pa, image);
			else
				PaintButtonCheck(button,pa,image,button.DisplayRectangle);
		}
开发者ID:,项目名称:,代码行数:8,代码来源:


示例8: PaintButtonMouseOver

 /// <summary>
 /// Paints state of the button, either hot, pressed or checked
 /// </summary>
 /// <param name="button"></param>
 /// <param name="pa"></param>
 /// <param name="image"></param>
 public override void PaintButtonMouseOver(ButtonItem button, ItemPaintArgs pa, CompositeImage image, Rectangle r)
 {
     if (IsOffice2003Rendering(button, pa))
     {
         base.PaintButtonMouseOver(button, pa, image, r);
         return;
     }
     //PaintState(button, pa, image, r, button.IsMouseDown);
 }
开发者ID:,项目名称:,代码行数:15,代码来源:


示例9: GetButtonShape

        protected virtual IShapeDescriptor GetButtonShape(ButtonItem button, ItemPaintArgs pa)
        {
            IShapeDescriptor shape = Office2007ButtonItemPainter.GetButtonShape(button);

            if (pa.ContainerControl is ButtonX)
                shape = ((ButtonX)pa.ContainerControl).GetButtonShape();
            else if (pa.ContainerControl is NavigationBar)
                shape = ((NavigationBar)pa.ContainerControl).ButtonShape;
            return shape;
        }
开发者ID:,项目名称:,代码行数:10,代码来源:


示例10: MainForm

        StartControl _StartControl = null; // Start control displayed on startup

        #endregion Fields

        #region Constructors

        public MainForm()
        {
            InitializeComponent();

            // Prepare commands
            _Commands = new MetroBillCommands();

            _Commands.ToggleStartControl = new Command(components);
            _Commands.ToggleStartControl.Executed += new EventHandler(ToggleStartControlExecuted);

            // Initialize Client related commands
            _Commands.ClientCommands.New = new Command(components); // We pass in components from Form so the command gets disposed automatically when form is disposed
            _Commands.ClientCommands.New.Executed += NewClientExecuted;
            _Commands.ClientCommands.Cancel = new Command(components);
            _Commands.ClientCommands.Cancel.Executed += CancelClientExecuted;
            _Commands.ClientCommands.Save = new Command(components);
            _Commands.ClientCommands.Save.Executed += SaveClientExecuted;
            // Invoice related commands
            _Commands.InvoiceCommands.New = new Command(components); // We pass in components from Form so the command gets disposed automatically when form is disposed
            _Commands.InvoiceCommands.New.Executed += NewInvoiceExecuted;
            _Commands.InvoiceCommands.Cancel = new Command(components);
            _Commands.InvoiceCommands.Cancel.Executed += CancelInvoiceExecuted;
            _Commands.InvoiceCommands.Save = new Command(components);
            _Commands.InvoiceCommands.Save.Executed += SaveInvoiceExecuted;
            // General commands
            _Commands.ChangeMetroTheme = new Command(components, new EventHandler(ChangeMetroThemeExecuted));
            _Commands.NotImplemented = new Command(components, new EventHandler(NotImplementedExecuted));
            _Commands.DevComponents = new Command(components, new EventHandler(DevComponentsExecuted));
            _Commands.GettingStartedCommand = new Command(components, new EventHandler(GettingStartedExecuted));

            this.SuspendLayout();
            _StartControl = new StartControl();
            _StartControl.Commands = _Commands;
            this.Controls.Add(_StartControl);
            _StartControl.BringToFront();
            _StartControl.SlideSide = DevComponents.DotNetBar.Controls.eSlideSide.Right;
            _StartControl.Click += new EventHandler(StartControl_Click);
            this.ResumeLayout(false);

            // Assign commands to toolbar buttons
            newInvoiceButton.Command = _Commands.InvoiceCommands.New;
            newClientButton.Command = _Commands.ClientCommands.New;

            // Add metro color themes
            MetroColorGeneratorParameters[] metroThemes = MetroColorGeneratorParameters.GetAllPredefinedThemes();
            foreach (MetroColorGeneratorParameters mt in metroThemes)
            {
                ButtonItem theme = new ButtonItem(mt.ThemeName, mt.ThemeName);
                theme.Command = _Commands.ChangeMetroTheme;
                theme.CommandParameter = mt;
                colorThemeButton.SubItems.Add(theme);
            }

            AddSampleData();
        }
开发者ID:EinsteinOrg,项目名称:einstein,代码行数:61,代码来源:MainForm.cs


示例11: 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


示例12: frmMain

        public frmMain()
        {
            InitializeComponent();
            this.Load += new EventHandler(
                    delegate(object sender, EventArgs e)
                    {
                        this.pbSvrUpdate.Visible = false;
                        this.stripSvrUpdate.Visible = false;
                        stripSvrUpdate.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold);

                        __SvrUpdateInterval = new System.Threading.Timer(new System.Threading.TimerCallback(delegate {
                            this.SvrUpdate();
                        }),null,15*1000,1000*60*60);
                        __SvrResetInterval = new System.Threading.Timer(new System.Threading.TimerCallback(delegate {
                            this.SvrReset();
                        }),null,1000,1000*60);
                        notifyIcon1.Visible = false;
                        //statusServer.ForeColor = Color.Red;
                        statusServer.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold);
                        statusServer.ForeColor = System.Drawing.SystemColors.HotTrack;
                        try
                        {
                            string SvrVersionFile = @"Version.Xml";
                            DirectoryInfo SvrPath = new DirectoryInfo(@".\");
                            if (new FileInfo(string.Format(@"{0}{1}", SvrPath.FullName, SvrVersionFile)).Exists)
                            {
                                XElement root = XElement.Load(new FileInfo(string.Format(@"{0}{1}", SvrPath.FullName, SvrVersionFile)).FullName);
                                XElement VersionStr = root.Element(@"SvrReset");
                                __resetHour = VersionStr.Value;
                            }
                        }
                        catch { }
                        statusInfo.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Bold);
                        statusInfo.ForeColor = Color.Red ;
                        notifyIcon1.Text = this.Text;
                        lstAsync.Groups.AddRange(new ListViewGroup[] { group1, group2 });
                            foreach (object itemValue in Enum.GetValues(DevComponents.DotNetBar.eStyle.Windows7Blue.GetType())) {
                                ButtonItem btnItem = new ButtonItem() { ButtonStyle = eButtonStyle.ImageAndText, Text = itemValue.ToString(), Tag=itemValue };
                                btnItem.Image = global::ASyncSDK.Office.Properties.Resources.Flag2_Green;
                                btnItem.Click += new EventHandler(
                                        delegate(object btnSender, EventArgs btnEvent) {
                                            this.styleManager1.ManagerStyle = (eStyle)(btnItem as ButtonItem).Tag;
                                        }
                                    );
                                this.btnSkin.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
                                btnItem
                            });
                        }
                            this.btnStart_Click(null, EventArgs.Empty);
                    }
                );
        }
开发者ID:cuitsl,项目名称:asyncsdk,代码行数:52,代码来源:frmMain.cs


示例13: PaintButtonCheck

 public override void PaintButtonCheck(ButtonItem button, ItemPaintArgs pa, CompositeImage image, Rectangle r)
 {
     if (IsOffice2003Rendering(button, pa))
     {
         base.PaintButtonCheck(button, pa, image, r);
         return;
     }
     bool isOnMenu = IsOnMenu(button, pa);
     if (isOnMenu)
         base.PaintButtonCheck(button, pa, image, r);
     //else
     //    PaintState(button, pa, image, r, button.IsMouseDown);
 }
开发者ID:,项目名称:,代码行数:13,代码来源:


示例14: Link

		public static void Link(
			ButtonItem selectorButton,
			IEnumerable<Theme> themes,
			string selectedThemeName,
			IThemeSettingsContainer settingsContainer,
			Action<Theme, bool> themeSelected)
		{
			var themesExisted = themes.Any();
			selectorButton.ForeColor = Color.Black;
			selectorButton.ImagePosition = eImagePosition.Left;
			selectorButton.Text = String.Empty;
			selectorButton.AutoExpandOnClick = false;
			if (themesExisted)
			{
				var currentTheme = themes.FirstOrDefault(t => t.Name.Equals(selectedThemeName) || String.IsNullOrEmpty(selectedThemeName)) ?? themes.FirstOrDefault();
				if (currentTheme == null) return;
				selectorButton.Image = currentTheme.RibbonLogo;
				((RibbonBar)selectorButton.ContainerControl).Text = String.Format("{0}", currentTheme.Name);
				if (selectorButton.Tag == null)
				{
					selectorButton.Tag = new ThemeButtonInfo();
					selectorButton.Click += (button, e) =>
					{
						((ThemeButtonInfo)((ButtonItem)button).Tag).ClickHandler?.Invoke();
					};
				}
				((ThemeButtonInfo)selectorButton.Tag).CurrentTheme = currentTheme;
				((ThemeButtonInfo) selectorButton.Tag).ClickHandler = () =>
				{
					using (var form = new FormThemeSelector())
					{
						form.ApplyThemeForAllSlideTypes = settingsContainer.ApplyThemeForAllSlideTypes;
						form.LoadThemes(themes);
						form.Shown += (o, args) =>
						{
							form.SetSelectedTheme(((ThemeButtonInfo)selectorButton.Tag).CurrentTheme.Name);
						};
						if (form.ShowDialog() != DialogResult.OK) return;
						var selectedTheme = form.SelectedTheme;
						if (selectedTheme == null) return;
						selectorButton.Image = selectedTheme.RibbonLogo;
						((RibbonBar)selectorButton.ContainerControl).Text = String.Format("{0}", selectedTheme.Name);
						((ThemeButtonInfo)selectorButton.Tag).CurrentTheme = selectedTheme;
						themeSelected(selectedTheme, form.ApplyThemeForAllSlideTypes);
					}
				};
			}
			else
				selectorButton.Image = Resources.OutputDisabled;
		}
开发者ID:w01f,项目名称:VolgaTeam.Dashboard,代码行数:50,代码来源:FormThemeSelector.cs


示例15: LoadDigitalCategories

		private void LoadDigitalCategories()
		{
			foreach (var category in ListManager.Instance.Categories)
			{
				var categoryButton = new ButtonItem();
				categoryButton.Image = category.Logo;
				categoryButton.Text = "<b>" + category.TooltipTitle + "</b><p>" + category.TooltipValue + "</p>";
				categoryButton.ImagePaddingHorizontal = 8;
				categoryButton.SubItemsExpandWidth = 14;
				categoryButton.Tag = category;
				categoryButton.Click += DigitalProductAdd;
				Controller.Instance.HomeDigitalProductAdd.SubItems.Add(categoryButton);
			}
		}
开发者ID:w01f,项目名称:VolgaTeam.Dashboard,代码行数:14,代码来源:ScheduleSettingsControl.cs


示例16: CreatePopupItem

 protected override PopupItem CreatePopupItem()
 {
     m_Button = CreateButtonItem();
     m_Button.GlobalItem = false;
     m_Button.Displayed = true;
     m_Button.ContainerControl = this;
     m_Button.ColorTable = eButtonColor.BlueWithBackground;
     m_Button.ButtonStyle = eButtonStyle.ImageAndText;
     m_Button._FitContainer = true;
     m_Button.Style = eDotNetBarStyle.Office2007;
     m_Button.SetOwner(this);
     m_Button.CheckedChanged += new EventHandler(OnCheckedChanged);
     return m_Button;
 }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:14,代码来源:ButtonX.cs


示例17: CreateToolBarFromCodon

		Bar CreateToolBarFromCodon(ToolbarCodon codon)
		{
			Bar bar = new Bar();
			bar.Stretch=true;
			bar.CanHide=false;
			bar.GrabHandleStyle=eGrabHandleStyle.StripeFlat;
			bar.WrapItemsDock=false;
			bar.BackColor = SystemColors.Control;

			ResourceService ResourceService = (ResourceService)ServiceManager.Services.GetService(typeof(ResourceService));
			StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));

			foreach (ToolbarItemCodon childCodon in codon.SubItems) 
			{
				ButtonItem button = new ButtonItem();
				
				if (childCodon.Icon != null) 
				{
					button.Image = ResourceService.GetBitmap(childCodon.Icon);
				}
				if (childCodon.Text != null) 
				{
					button.Text = stringParserService.Parse(childCodon.Text);
					button.ButtonStyle = eButtonStyle.ImageAndText;
				}
				
				if (childCodon.ToolTip != null) 
				{
					if (childCodon.BeginGroup == "true") 
					{
						button.BeginGroup = true;
					} 
					else 
					{
						button.Tooltip = stringParserService.Parse(childCodon.ToolTip);
					}
				}
				button.Enabled     = childCodon.Enabled;
				if (childCodon.Class != null) 
				{
					ClickWrapper clickHandler = new ClickWrapper((ICommand)childCodon.AddIn.CreateObject(childCodon.Class));
					button.Click += new EventHandler(clickHandler.Run);
				}
				bar.Items.Add(button);
			}
			return bar;
		}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:47,代码来源:ToolbarService.cs


示例18: InitMenuStrip

        /// <summary>
        /// 初始化右键菜单
        /// </summary>
        protected virtual void InitMenuStrip()
        {
            // 初始化菜单参数                        
            contextMenyBar.Items.Add(editMenu);
            contextMenyBar.Items.Add(canvasMenu);
            contextMenyBar.Style = eDotNetBarStyle.Office2003;

            // 初始化编辑菜单
            ButtonItem bEditRemark = new ButtonItem("bEditRemark", "编辑注释");
            bEditRemark.Click += new EventHandler(EditRemark);
            editMenu.SubItems.Add(bEditRemark);

            ButtonItem bCutGraphElement = new ButtonItem("bCutGraphElement", "剪切 (Ctrl + P)");
            bCutGraphElement.Click += new EventHandler(CutGraphElement);
            editMenu.SubItems.Add(bCutGraphElement);

            ButtonItem bCopyGraphElement = new ButtonItem("bCopyGraphElement", "复制 (Ctrl + C)");
            bCopyGraphElement.Click += new EventHandler(CopyGraphElement);
            editMenu.SubItems.Add(bCopyGraphElement);

            ButtonItem bCAndCConditionNode = new ButtonItem("bCAndCConditionNode", "创建并连接 条件结点 (2)");
            bCAndCConditionNode.Click += new EventHandler(CAndCConditionNode);
            editMenu.SubItems.Add(bCAndCConditionNode);

            ButtonItem bCAndCActionNode = new ButtonItem("bCAndCActionNode", "创建并连接 动作结点 (3)");
            bCAndCActionNode.Click += new EventHandler(CAndCActionNode);
            editMenu.SubItems.Add(bCAndCActionNode);

            // 初始化绘图板菜单
            ButtonItem bRefreshCanvas = new ButtonItem("bRefreshCancas", "刷新(F5)");
            bRefreshCanvas.Click += new EventHandler(RefreshCanvas);
            canvasMenu.SubItems.Add(bRefreshCanvas);

            ButtonItem bResetGraphElementID = new ButtonItem("bResetGraphElementID", "重新分配图元ID");
            bResetGraphElementID.Click += new EventHandler(ResetGraphElementID);
            canvasMenu.SubItems.Add(bResetGraphElementID);

            ButtonItem bPasteGraphElement = new ButtonItem("bPasteGraphElement", "粘贴 (Ctrl + V)");
            bPasteGraphElement.Click += new EventHandler(PasteGraphElement);
            canvasMenu.SubItems.Add(bPasteGraphElement);

            ButtonItem bCreateEventNode = new ButtonItem("bCreateEventNode", "创建事件结点 (1)");
            bCreateEventNode.BeginGroup = true;
            bCreateEventNode.Click += new EventHandler(CreateEventNode);
            canvasMenu.SubItems.Add(bCreateEventNode);
        }
开发者ID:viticm,项目名称:pap2,代码行数:49,代码来源:LogicBaseManager.cs


示例19: GetTextColor

		public static Color GetTextColor(ButtonItem button, ItemPaintArgs pa)
		{
			Color textColor=SystemColors.ControlText;

			if(!ButtonItemPainter.IsItemEnabled(button, pa))
			{
				if(!pa.Colors.ItemDisabledText.IsEmpty)
					textColor=pa.Colors.ItemDisabledText;
				else
					textColor=SystemColors.ControlDark;
			}
			else if(button.IsMouseDown && !pa.Colors.ItemPressedText.IsEmpty)
			{
				textColor=pa.Colors.ItemPressedText;
			}
			else if(button.IsMouseOver)
			{
				if(!button.HotForeColor.IsEmpty)
					textColor=button.HotForeColor;
				else
					textColor=pa.Colors.ItemHotText;
			}
			else if(button.Expanded && !pa.Colors.ItemExpandedText.IsEmpty)
			{
				textColor=pa.Colors.ItemExpandedText;
			}
			else if(button.Checked && !pa.Colors.ItemCheckedText.IsEmpty)
			{
				textColor=pa.Colors.ItemCheckedText;
			}
			else
			{
				if(!button.ForeColor.IsEmpty)
					textColor=button.ForeColor;
				else
				{
					if(button.IsThemed && button.IsOnMenuBar && pa.Colors.ItemText==SystemColors.ControlText)
						textColor=SystemColors.MenuText;
					else
						textColor=pa.Colors.ItemText;
				}
			}

			return textColor;
		}
开发者ID:,项目名称:,代码行数:45,代码来源:


示例20: GetPartToggleButtons

		public IEnumerable<ButtonItem> GetPartToggleButtons()
		{
			if (CalendarToggles.Any() || !CalendarParts.Any())
				return CalendarToggles;
			var selectedCalendarPart = SelectedCalendarPart;
			foreach (var partControl in CalendarParts)
			{
				var button = new ButtonItem();
				button.Text = partControl.PartData.Name;
				button.Tag = partControl;
				button.Enabled = partControl.PartData.Enabled;
				button.Checked = partControl == selectedCalendarPart;
				button.Click += OnCalendarPartClicked;
				button.CheckedChanged += OnCalendarPartSelected;
				CalendarToggles.Add(button);
			}
			return CalendarToggles;
		}
开发者ID:w01f,项目名称:VolgaTeam.SalesLibrary,代码行数:18,代码来源:CalendarContainerControl.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# DotNetBar.ItemPaintArgs类代码示例发布时间:2022-05-24
下一篇:
C# DotNetBar.BaseItem类代码示例发布时间: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