Esempio n. 1
0
        void Open_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            if (OpenVMCommand != null && OpenVMCommand.CanExecute(null))
            {
                FileDialog fd = new FileDialog
                {
                    Owner = AssociatedObject
                };

                if (fd.ShowDialog() == true)
                {
                    if (fd.FileInfo != null)
                    {
                        OpenVMCommand.Execute(fd.FileInfo.FullName);
                    }
                }
            }
        }
Esempio n. 2
0
 private void Open_CanExecute(object sender, CanExecuteRoutedEventArgs e)
 {
     e.CanExecute = OpenVMCommand != null && OpenVMCommand.CanExecute(null);
 }