private void PastOnTreeFolderHandler(object sender, System.Windows.RoutedEventArgs e) { if (mNodeManipulationsSource == null || mCurrentFolderNodePastOperations == eFolderNodePastOperations.None) { Reporter.ToUser(eUserMsgKeys.StaticWarnMessage, "Please select Copy/Cut operation first."); return; } //make sure the source item and dest folder are from same item type if (this.NodeObjectType() != ((TreeViewItemGenericBase)mNodeManipulationsSource).NodeObjectType()) { //TODO: Fix with New Reporter (on GingerWPF) MessageBox.Show("The source item type do not match to the destination folder type", "Not Same Item Type", MessageBoxButton.OK, MessageBoxImage.Warning, MessageBoxResult.OK); return; } switch (mCurrentFolderNodePastOperations) { case eFolderNodePastOperations.Copy: PasteCopiedTreeItem(mNodeManipulationsSource.NodeObject(), this); break; case eFolderNodePastOperations.CopyItems: PasteCopiedTreeItems(); break; case eFolderNodePastOperations.Cut: PasteCutTreeItem(mNodeManipulationsSource.NodeObject(), this); break; case eFolderNodePastOperations.CutItems: PasteCutTreeItems(); break; default: //TODO: Fix with New Reporter (on GingerWPF) MessageBox.Show("Please select Copy/Cut operation first.", "Copy/Cut Operation", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK); break; } mCurrentFolderNodePastOperations = eFolderNodePastOperations.None; }
private void PastOnTreeFolderHandler(object sender, System.Windows.RoutedEventArgs e) { if (mNodeManipulationsSource == null || mCurrentFolderNodePastOperations == eFolderNodePastOperations.None) { Reporter.ToUser(eUserMsgKeys.StaticWarnMessage, "Please select Copy/Cut operation first."); return; } //make sure the source item and dest folder are from same item type if (this.NodeObjectType() != ((TreeViewItemGenericBase)mNodeManipulationsSource).NodeObjectType()) { Reporter.ToUser(eUserMsgKeys.DifferentItemType); return; } switch (mCurrentFolderNodePastOperations) { case eFolderNodePastOperations.Copy: PasteCopiedTreeItem(mNodeManipulationsSource.NodeObject(), this); break; case eFolderNodePastOperations.CopyItems: PasteCopiedTreeItems(); break; case eFolderNodePastOperations.Cut: PasteCutTreeItem(mNodeManipulationsSource.NodeObject(), this); break; case eFolderNodePastOperations.CutItems: PasteCutTreeItems(); break; default: Reporter.ToUser(eUserMsgKeys.CopyCutOperation); break; } mCurrentFolderNodePastOperations = eFolderNodePastOperations.None; }
private void CutTreeFolderItemsHandler(object sender, System.Windows.RoutedEventArgs e) { mCurrentFolderNodePastOperations = eFolderNodePastOperations.CutItems; mNodeManipulationsSource = (ITreeViewItem)this; }
private void CutTreeItemHandler(object sender, RoutedEventArgs e) { mCurrentFolderNodePastOperations = eFolderNodePastOperations.Cut; mNodeManipulationsSource = (ITreeViewItem)this; }