/// <summary> /// Lanza el evento <see cref="SelectedPathChangedEvent"/> /// </summary> private void RaiseSelectedPathEvent() { FtpFileNodeViewModel objFile = ViewModelData?.GetSelectedFile(); if (objFile?.IsFolder ?? false) { SelectedPath = objFile.File; RaiseEvent(new RoutedEventArgs(SelectedPathChangedEvent)); } }
private void trvExplorer_Drop(object sender, DragEventArgs e) { FtpFileNodeViewModel objNodeSource = objDragDropController.GetDragDropFileNode(e.Data) as FtpFileNodeViewModel; if (objNodeSource != null) { TreeViewItem trvNode = new Libraries.MVVM.Tools.ToolsWpf().FindAncestor <TreeViewItem>((DependencyObject)e.OriginalSource); if (trvNode != null) { FtpFileNodeViewModel objNodeTarget = trvNode.Header as FtpFileNodeViewModel; if (objNodeSource != null && objNodeTarget != null) { ViewModelData.Copy(objNodeSource, objNodeTarget, (e.KeyStates & DragDropKeyStates.ControlKey) == DragDropKeyStates.ControlKey); } } } }