Пример #1
0
        ///<summary>
        ///Ajoute les boutons associés aux vues
        ///</smmary>
        public void CreateToolButtons()
        {
            ICommand command;
               		ToolbarButton button;

               		//Ajout des boutons de création des vues
               		foreach (string ident in views) {
               			string cmdId = string.Format("New_{0}",  ident);
               			command = CommandManager.GetCommand(cmdId);
               			if (command != null) {
               		button = new ToolbarButton(command);
               		commandReceiver.AddToolItem(button);
               	}
             }

            //Séparateur
            commandReceiver.AddToolItem(new ToolbarSeparator());

             //Ajout du bouton de sauvegarde de la vue
            command = CommandManager.GetCommand("SaveCurrentView");
               		button = new ToolbarButton(command);
               		button.Clicked += new EventHandler(OnSaveCurrentViewClicked);
               		commandReceiver.AddToolItem(button);
        }
Пример #2
0
 public ApplySearchCommand(CommandReceiver commandReceiver)
     : base("ApplySearch", "Appliquer", Stock.ApplyIcon, "", "Rechercher dans tous les documents")
 {
     this.commandReceiver  = commandReceiver;
     _ToolbarButton = new ToolbarButton(this);
 }