public RichEditCommand CreateCommand(RichEditCommandId id)
        {
            if (id == RichEditCommandId.FileSaveAs)
                return new CustomSaveDocumentAsCommand(control);

            return service.CreateCommand(id);
        }
 public void Initialize(RichEditControl initControl, RichEditCommandId initId)
 {
     UnsubscribeControlEvents();
     control   = initControl;
     commandId = initId;
     SubscribeControlEvents();
 }
Exemplo n.º 3
0
 RichEditCommand IRichEditCommandFactoryService.CreateCommand(RichEditCommandId id)
 {
     if (id.Equals(RichEditCommandId.InsertColumnBreak) || id.Equals(RichEditCommandId.InsertLineBreak) || id.Equals(RichEditCommandId.InsertPageBreak))
     {
         return(service.CreateCommand(RichEditCommandId.InsertParagraph));
     }
     return(service.CreateCommand(id));
 }
 public RichEditCommand CreateCommand(RichEditCommandId id)
 {
     if (id == RichEditCommandId.FileSave)
     {
         return(new CustomSaveDocumentCommand(control));
     }
     return(service.CreateCommand(id));
 }
        public RichEditCommand CreateCommand(RichEditCommandId id)
        {
            if (id == RichEditCommandId.CopySelection && ((Form1)Application.OpenForms[0]).UseCustomCopy)
            {
                return(new CustomCopySelectionCommand(control));
            }
            if (id == RichEditCommandId.PasteSelection && ((Form1)Application.OpenForms[0]).UseCustomPaste)
            {
                return(new CustomPasteSelectionCommand(control));
            }

            return(service.CreateCommand(id));
        }
Exemplo n.º 6
0
 public RichEditCommand CreateCommand(RichEditCommandId id)
 {
     if (id == RichEditCommandId.FileSaveAs)
     {
         return(new CustomSaveDocumentAsCommand(control, Language, Extension));
     }
     if (id == RichEditCommandId.FileOpen)
     {
         return(new CustomOpendocumentcommand(control, Language, Extension));
     }
     if (id == RichEditCommandId.FileSave)
     {
         return(new CustomSaveDocumentcommand(control, Language, Extension));
     }
     return(service.CreateCommand(id));
 }
        public RichEditCommand CreateCommand(RichEditCommandId id)
        {
            if (id == RichEditCommandId.FileSave)
            {
                return(new CustomSaveDocumentCommand(_control, _journalTask, _journalPageDTORetriever));
            }

            if (id == RichEditCommandId.PasteSelection)
            {
                return(new CustomPasteSelectionCommand(_control));
            }

            if (id == RichEditCommandId.InsertTable)
            {
                return(new CustomInsertTableCommand(_control));
            }

            if (id == RichEditCommandId.CopySelection)
            {
                return(new CustomCopySelectionCommand(_control, _clipboardTask));
            }

            return(_service.CreateCommand(id));
        }
Exemplo n.º 8
0
 RichEditCommand IRichEditCommandFactoryService.CreateCommand(RichEditCommandId id) {
     if (id.Equals(RichEditCommandId.InsertColumnBreak) || id.Equals(RichEditCommandId.InsertLineBreak) || id.Equals(RichEditCommandId.InsertPageBreak))
         return _service.CreateCommand(RichEditCommandId.InsertParagraph);
     return _service.CreateCommand(id);
 }
Exemplo n.º 9
0
        public RichEditCommand CreateCommand(RichEditCommandId id)
        {
            if (id == RichEditCommandId.FileSave)
                return new XSaveDocumentCommand(richEditControl, onSave);

            return service.CreateCommand(id);
        }
Exemplo n.º 10
0
 public virtual RichEditCommand CreateCommand(RichEditCommandId commandId);