Пример #1
0
 private void DropImage(object sender, DragEventArgs e)
 {
     if (e.Data.GetDataPresent(DataFormats.FileDrop))
     {
         string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
         viewModel.OpenImage(files[0]);
     }
 }
Пример #2
0
        public void Execute(object param)
        {
            //OpenFileDialog openFileDialog = new OpenFileDialog { Filter = Resources.filter };
            DownloadDialogWindow dialog = new DownloadDialogWindow();

            if (dialog.OpenDialog() == true)
            {
                _viewModel.OpenImage(dialog.FileName);
            }
            dialog.Close();
        }
Пример #3
0
        public void Execute(object param)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog {
                Filter = Resources.filter
            };

            if (openFileDialog.ShowDialog() == true)
            {
                _viewModel.OpenImage(openFileDialog.FileName);
            }
        }