MainWindow.xaml.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Navigation;
  13. using System.Windows.Shapes;
  14. using System.Collections;
  15. namespace GameEditor
  16. {
  17. /// <summary>
  18. /// MainWindow.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class MainWindow : Window
  21. {
  22. private Hashtable treeViewNodes = new Hashtable();
  23. public MainWindow()
  24. {
  25. InitializeComponent();
  26. }
  27. private void behaviorTreeView_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
  28. {
  29. var item = e.Source as TreeViewItem;
  30. if (item == null)
  31. {
  32. return;
  33. }
  34. item.ContextMenu.IsOpen = true;
  35. e.Handled = true;
  36. }
  37. private void NewCanExecute(object sender, CanExecuteRoutedEventArgs e)
  38. {
  39. e.CanExecute = true;
  40. }
  41. private void OnNewNode(object sender, ExecutedRoutedEventArgs e)
  42. {
  43. }
  44. private void DeleteCanExecute(object sender, CanExecuteRoutedEventArgs e)
  45. {
  46. e.CanExecute = true;
  47. }
  48. private void OnDeleteNode(object sender, ExecutedRoutedEventArgs e)
  49. {
  50. }
  51. }
  52. }