protected virtual bool TryCreateEditor( CreateEditorCallback createEditor, out IEditor editor) { if (createEditor is null) { editor = null; return(false); } try { editor = createEditor(); } catch (Exception ex) { if (ExceptionHandler is null) { throw ex; } ExceptionHandler.ShowException(ex); editor = null; return(false); } return(true); }
public void AddAssociation( Image fileIcon, string fileType, string description, Image previewImage, CreateEditorCallback createEditorCallback) { CreateEditorForm.AddAssociation( fileIcon, fileType, description, previewImage, createEditorCallback); }
public void AddAssociation( Image fileIcon, string fileType, string description, Image previewImage, CreateEditorCallback createEditorCallback) { var entry = new NewFileIconAssociation() { FileIcon = fileIcon, FileType = fileType, Description = description, PreviewImage = previewImage, CreateEditorCallback = createEditorCallback, }; AddAssociation(entry); }
public EditorList(int minIndex, int maxIndex, CreateEditorCallback createEditor, LoadEditorCallback loadEditor) { mMinIndex = minIndex; mMaxIndex = maxIndex; mCreateEditor = createEditor; mLoadEditor = loadEditor; mFirstVisibleIndex = 0; IsReloading = false; mReadOnly = false; mResizeInProgress = false; mSizeAdaptationPending = false; mEditorsSyncRoot = new object(); mEditors = new List <T>(); InitializeComponent(); }
public void NewFile(CreateEditorCallback createEditor) { if (createEditor is null) { throw new ArgumentNullException(nameof(createEditor)); } if (!TryCreateEditor(createEditor, out var editor)) { return; } if (editor is null) { return; } OnEditorCreated(new EditorEventArgs(editor)); }
public MixByteCollectionEditorList(int maxWordCount, CreateEditorCallback createEditor, LoadEditorCallback loadEditor) : base(0, maxWordCount - 1, createEditor, loadEditor) { }
public WordEditorList(int minIndex, int maxIndex, CreateEditorCallback createEditor, LoadEditorCallback loadEditor) : base(minIndex, maxIndex, createEditor, loadEditor) { }