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

            tbb.ID      = ID;
            tbb.Enabled = Enabled;
            if (ShowLabel || actionItem.ShowLabel || textAlign != ToolBarTextAlign.Right)
            {
                tbb.Text = ToolBarText;
            }
            //Console.WriteLine("Adding toolbar {0}", ToolBarText);
            if (Image != null)
            {
                tbb.Image = Image;
            }
            if (!string.IsNullOrEmpty(ToolBarItemStyle))
            {
                tbb.Style = ToolBarItemStyle;
            }
            new ToolBarConnector(this, tbb);
            return(tbb);
        }
Ejemplo n.º 3
0
		public override ToolItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
		{
			var tbb = new ButtonToolItem(generator);
			tbb.ID = ID;
			tbb.Enabled = Enabled;
			if (ShowLabel || actionItem.ShowLabel || textAlign != ToolBarTextAlign.Right) tbb.Text = ToolBarText;
			//Console.WriteLine("Adding toolbar {0}", ToolBarText);
			if (Image != null) tbb.Image = Image;
			if (!string.IsNullOrEmpty (ToolBarItemStyle))
				tbb.Style = ToolBarItemStyle;
			new ToolBarConnector(this, tbb);
			return tbb;
		}
Ejemplo n.º 4
0
			public ToolBarConnector(ButtonAction action, ButtonToolItem 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);
			}