Пример #1
0
 public ToolBarConnector(CheckAction action, CheckToolBarButton toolBarButton)
 {
     this.toolBarButton        = toolBarButton;
     this.toolBarButton.Click += toolBarButton_Click;
     this.action = action;
     this.action.EnabledChanged += new EventHandler <EventArgs>(action_EnabledChanged).MakeWeak(e => this.action.EnabledChanged -= e);
     this.action.CheckedChanged += new EventHandler <EventArgs>(action_CheckedChanged).MakeWeak(e => this.action.CheckedChanged -= e);
 }
Пример #2
0
 public override ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar)
 {
     CheckToolBarButton tbb = new CheckToolBarButton(toolBar.Generator);
     tbb.ID = this.ID;
     tbb.Checked = Checked;
     tbb.Enabled = this.Enabled;
     if (ShowLabel || actionItem.ShowLabel || toolBar.TextAlign != ToolBarTextAlign.Right) tbb.Text = ToolBarText;
     if (Icon != null) tbb.Icon = Icon;
     new ToolBarConnector(this, tbb);
     return tbb;
 }
Пример #3
0
        public override ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar)
        {
            CheckToolBarButton tbb = new CheckToolBarButton(toolBar.Generator);

            tbb.ID      = this.ID;
            tbb.Checked = Checked;
            tbb.Enabled = this.Enabled;
            if (ShowLabel || actionItem.ShowLabel || toolBar.TextAlign != ToolBarTextAlign.Right)
            {
                tbb.Text = ToolBarText;
            }
            if (Icon != null)
            {
                tbb.Icon = Icon;
            }
            if (!string.IsNullOrEmpty(ToolBarItemStyle))
            {
                tbb.Style = ToolBarItemStyle;
            }
            new ToolBarConnector(this, tbb);
            return(tbb);
        }
Пример #4
0
			public ToolBarConnector(CheckAction action, CheckToolBarButton toolBarButton)
			{
				this.toolBarButton = toolBarButton;
				this.toolBarButton.Click += toolBarButton_Click;
				this.action = action;
				this.action.EnabledChanged += new EventHandler<EventArgs>(action_EnabledChanged).MakeWeak(e => this.action.EnabledChanged -= e);
				this.action.CheckedChanged += new EventHandler<EventArgs>(action_CheckedChanged).MakeWeak(e => this.action.CheckedChanged -= e);
			}
Пример #5
0
		public override ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
		{
			CheckToolBarButton tbb = new CheckToolBarButton(generator);
			tbb.ID = this.ID;
			tbb.Checked = Checked;
			tbb.Enabled = this.Enabled;
			if (ShowLabel || actionItem.ShowLabel || textAlign != ToolBarTextAlign.Right) tbb.Text = ToolBarText;
			if (Image != null) tbb.Image = Image;
			if (!string.IsNullOrEmpty (ToolBarItemStyle))
				tbb.Style = ToolBarItemStyle;
			new ToolBarConnector(this, tbb);
			return tbb;
		}