Пример #1
0
        /// <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();
        }
Пример #2
0
 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
     };
 }
Пример #3
0
 private void buttonPrint_Click(object sender, EventArgs e)
 {
     PrintPreviewCommand Command = new PrintPreviewCommand(richEditControlResult);
     Command.Execute();
 }
Пример #4
0
        private void buttonPrint_Click(object sender, EventArgs e)
        {
            PrintPreviewCommand Command = new PrintPreviewCommand(richEditControlResult);

            Command.Execute();
        }