Ejemplo n.º 1
0
 protected ToolItem(Command command, Generator generator, Type type, bool initialize = true)
     : base(generator, type, initialize)
 {
     ID      = command.ID;
     Text    = command.ToolBarText;
     ToolTip = command.ToolTip;
     Image   = command.Image;
     Click  += (sender, e) => command.OnExecuted(e);
     Enabled = command.Enabled;
     command.EnabledChanged += (sender, e) => Enabled = command.Enabled;
     Order = -1;
 }
Ejemplo n.º 2
0
Archivo: ToolItem.cs Proyecto: Exe0/Eto
		protected ToolItem(Command command, Generator generator, Type type, bool initialize = true)
			: base(generator, type, initialize)
		{
			ID = command.ID;
			Text = command.ToolBarText;
			ToolTip = command.ToolTip;
			Image = command.Image;
			Click += (sender, e) => command.OnExecuted(e);
			Enabled = command.Enabled;
			command.EnabledChanged += (sender, e) => Enabled = command.Enabled;
			Order = -1;
		}
Ejemplo n.º 3
0
 protected MenuItem(Command command, Generator generator, Type type, bool initialize = true)
     : base(generator, type, initialize)
 {
     ID        = command.ID;
     Text      = command.MenuText;
     ToolTip   = command.ToolTip;
     Shortcut  = command.Shortcut;
     Click    += (sender, e) => command.OnExecuted(e);
     Validate += (sender, e) => Enabled = command.Enabled;
     Enabled   = command.Enabled;
     command.EnabledChanged += (sender, e) => Enabled = command.Enabled;
     if (initialize)
     {
         Handler.CreateFromCommand(command);
     }
 }
Ejemplo n.º 4
-1
		protected MenuItem(Command command, Generator generator, Type type, bool initialize = true)
			: base(generator, type, initialize)
		{
			ID = command.ID;
			Text = command.MenuText;
			ToolTip = command.ToolTip;
			Shortcut = command.Shortcut;
			Click += (sender, e) => command.OnExecuted(e);
			Validate += (sender, e) => Enabled = command.Enabled;
			Enabled = command.Enabled;
			command.EnabledChanged += (sender, e) => Enabled = command.Enabled;
			if (initialize)
				Handler.CreateFromCommand(command);
		}