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

            ofd.Title = msg.Notification;
            ofd.ShowDialog();
            msg.Execute(ofd.FileName);
        }
示例#2
0
        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);
        }