Exemplo n.º 1
0
        public override SpreadsheetCommand CreateCommand(SpreadsheetCommandId id)
        {
            //if (id == SpreadsheetCommandId.MailMergePreview)
            //{
            //    return new MailMergePreviewCommandEx(Control);
            //}

            if (id == SpreadsheetCommandId.MailMergeAddDataSource)
            {
                return(new MailMergeAddDataSourceCommandEx(Control));
            }
            if (id == SpreadsheetCommandId.FileSave)
            {
                if (lastCommand == id)
                {
                    return(null);
                }
                lastCommand = id;
                return(new SaveCommand(Control));
            }
            lastCommand = id;
            SpreadsheetCommand command = base.CreateCommand(id);

            return(command);
        }
 public override SpreadsheetCommand CreateCommand(SpreadsheetCommandId id)
 {
     if (id == SpreadsheetCommandId.FormatClearContents || id == SpreadsheetCommandId.FormatClearContentsContextMenuItem)
     {
         return(new CustomFormatClearContentsCommand(Control));
     }
     return(base.CreateCommand(id));
 }
Exemplo n.º 3
0
        public override SpreadsheetCommand CreateCommand(SpreadsheetCommandId id)
        {
            if (id == SpreadsheetCommandId.DataToolsCircleInvalidData)
            {
                return(new CustomCircleInvalidDataCommand(Control));
            }

            return(base.CreateCommand(id));
        }