public ImageDecoratorEditorContextImpl(IProperties settings, ApplyDecoratorCallback applyDecoratorCallback, ImagePropertiesInfo imageProperties, IUndoUnitFactory undoHost, CommandManager commandManager) { _applyDecoratorCallback = applyDecoratorCallback; _settings = settings; _imageProperties = imageProperties; _undoHost = undoHost; _commandManager = commandManager; }
public ImageDecoratorEditorContextImpl(IProperties settings, ApplyDecoratorCallback applyDecoratorCallback, ImagePropertiesInfo imageProperties, IUndoUnitFactory undoHost, CommandManager commandManager) { _applyDecoratorCallback = applyDecoratorCallback; _settings = settings; _imageProperties = imageProperties; _undoHost = undoHost; _commandManager = commandManager; }
/// <summary> /// Displays the editor (if one exists) for an image decorator in a dialog. /// </summary> /// <param name="imageDecorator"></param> /// <param name="ImageInfo"></param> /// <param name="applyCallback"></param> /// <param name="owner"></param> internal static DialogResult ShowImageDecoratorEditorDialog(ImageDecorator imageDecorator, ImagePropertiesInfo ImageInfo, ApplyDecoratorCallback applyCallback, IUndoUnitFactory undoUnitFactory, object state, IImageTargetEditor targetEditor, CommandManager commandManager) { ImageDecoratorEditor editor = imageDecorator.CreateEditor(commandManager); if (editor != null) { IProperties settings = ImageInfo.ImageDecorators.GetImageDecoratorSettings(imageDecorator); editor.LoadEditor(new ImageDecoratorEditorContextImpl(settings, new ApplyDecoratorCallback(applyCallback), ImageInfo, undoUnitFactory, commandManager), state, targetEditor); using (ImageDecoratorEditorForm editorForm = new ImageDecoratorEditorForm()) { editorForm.ImageDecoratorEditor = editor; // for automation editorForm.Name = imageDecorator.Id + "EditorForm"; return editorForm.ShowDialog(); } } return DialogResult.Abort; }
/// <summary> /// Displays the editor (if one exists) for an image decorator in a dialog. /// </summary> /// <param name="imageDecorator"></param> /// <param name="ImageInfo"></param> /// <param name="applyCallback"></param> /// <param name="owner"></param> internal static DialogResult ShowImageDecoratorEditorDialog(ImageDecorator imageDecorator, ImagePropertiesInfo ImageInfo, ApplyDecoratorCallback applyCallback, IUndoUnitFactory undoUnitFactory, object state, IImageTargetEditor targetEditor, CommandManager commandManager) { ImageDecoratorEditor editor = imageDecorator.CreateEditor(commandManager); if (editor != null) { IProperties settings = ImageInfo.ImageDecorators.GetImageDecoratorSettings(imageDecorator); editor.LoadEditor(new ImageDecoratorEditorContextImpl(settings, new ApplyDecoratorCallback(applyCallback), ImageInfo, undoUnitFactory, commandManager), state, targetEditor); using (ImageDecoratorEditorForm editorForm = new ImageDecoratorEditorForm()) { editorForm.ImageDecoratorEditor = editor; // for automation editorForm.Name = imageDecorator.Id + "EditorForm"; return(editorForm.ShowDialog()); } } return(DialogResult.Abort); }