Пример #1
0
        public void Execute(object parameter)
        {
            RadOpenFileDialog openFileDialog = new RadOpenFileDialog();

            openFileDialog.Multiselect       = true;
            openFileDialog.IsDragDropEnabled = true;

            openFileDialog.ShowDialog();

            if (openFileDialog.DialogResult == true)
            {
                var result = openFileDialog.FileNames;
                PersonLightMessage message = new PersonLightMessage();
                message.Person = parameter as Person;
                foreach (var item in result)
                {
                    FileInfo fileInfo = new FileInfo(item);
                    message.FileNameDocs.Add(new FileNameDoc()
                    {
                        Name = fileInfo.Name, Path = fileInfo.DirectoryName
                    });
                }
                Messenger.Default.Send <PersonLightMessage>(message, "AddFile");
            }
        }
Пример #2
0
        public void Execute(object parameter)
        {
            PersonLightMessage message = new PersonLightMessage();

            message.Person       = parameter as Person;
            message.FileNameDocs = new List <FileNameDoc>();

            Messenger.Default.Send <PersonLightMessage>(message, "ClearFile");
        }