Exemplo n.º 1
0
 public ToolBarConnector(CheckAction action, CheckToolItem 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);
 }
Exemplo n.º 2
0
        public override ToolItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
        {
            var tbb = new CheckToolItem(generator);

            tbb.ID      = ID;
            tbb.Checked = Checked;
            tbb.Enabled = 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);
        }
Exemplo n.º 3
0
		public override ToolItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
		{
			var tbb = new CheckToolItem(generator);
			tbb.ID = ID;
			tbb.Checked = Checked;
			tbb.Enabled = 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;
		}
Exemplo n.º 4
0
			public ToolBarConnector(CheckAction action, CheckToolItem 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);
			}