예제 #1
0
 /// <summary>
 /// Executes the FileOkCommand using the current FileName property. Marked as virtual so it can be overridden in
 /// DependencyOpenFileDialog. Not happy with this situation.
 /// </summary>
 protected virtual void ExecuteFileOkCommand()
 {
     if (FileOkCommand != null)
     {
         FileOkCommand.Execute(Dialog.FileName);
     }
 }
예제 #2
0
 /// <summary>
 /// Overridden from DependencyFileDialog. Provides support for the MultiSelect property. Smells fragile.
 /// </summary>
 protected override void ExecuteFileOkCommand()
 {
     if (MultiSelect)
     {
         FileOkCommand.Execute(Dialog.FileNames);
     }
     else
     {
         base.ExecuteFileOkCommand();
     }
 }
예제 #3
0
        public FileDialogServiceBase()
        {
            FileDialog = CreateFileDialog();
            FilesCore  = new List <FileInfoWrapper>();
#if !SILVERLIGHT
            FileOk += (d, e) => {
                if (FileOkCommand != null && FileOkCommand.CanExecute(e))
                {
                    FileOkCommand.Execute(e);
                }
            };
            HelpRequest += (d, e) => {
                if (HelpRequestCommand != null && HelpRequestCommand.CanExecute(e))
                {
                    HelpRequestCommand.Execute(e);
                }
            };
#endif
        }