Beispiel #1
0
        private void IncomingFileRequest(FileDialogMessage msg)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Title = msg.Notification;
            ofd.ShowDialog();
            msg.Execute(ofd.FileName);
        }
        public void GetFilePath()
        {
            FileDialogMessage fdm = new FileDialogMessage(this, "Select a file to scan", (file) =>
            {
                if (File.Exists(file))
                {
                    this.FilePath = file;
                }
            });

            Messenger.Default.Send(fdm);
        }