/// <summary> /// Initializes a new instance of the <see cref="PicturesViewModel"/> class. /// </summary> /// <param name="printHelper">The print helper.</param> /// <exception cref="System.ArgumentNullException"> /// printHelper /// or /// scannerHelper /// </exception> public PicturesViewModel([NotNull] PrintHelper printHelper) { if (printHelper == null) { throw new ArgumentNullException("printHelper"); } _printHelper = printHelper; _pictures.CollectionChanged += (sender, args) => PrintPreviewCommand.RaiseCanExecuteChanged(); }
public FileCommand(NewCommand newCommand, OpenCommand openCommand, SaveCommand saveCommand, SaveAsCommand saveAsCommand, PrintCommand printCommand, PrintPreviewCommand printPreviewCommand, ExitCommand exitCommand) : base(MenuStrings.fileToolStripMenuItem_Text) { ChildrenCommands = new List <IToolbarCommand> { newCommand, openCommand, null, saveCommand, saveAsCommand, null, printCommand, printPreviewCommand, null, exitCommand }; }
private void buttonPrint_Click(object sender, EventArgs e) { PrintPreviewCommand Command = new PrintPreviewCommand(richEditControlResult); Command.Execute(); }