예제 #1
0
        public NewTreeWindow(TreeViewModel newTree)
        {
            InitializeComponent();

            NewTreeViewModel newTreeViewModel = new NewTreeViewModel();
            newTreeViewModel.Tree = newTree;
            this.DataContext = newTreeViewModel;
            this.RegisterMessages();

            PlantingProcessViewControl.AnimationCompleted += new EventHandler(OnPlantingProcessAnimationCompleted);
        }
예제 #2
0
 /// <summary>
 /// Provides a deterministic way to create the NewTreeViewModel property.
 /// </summary>
 public static void CreateNewTreeViewModel()
 {
     if (_newTreeViewModel == null)
     {
         _newTreeViewModel = new NewTreeViewModel();
     }
 }
예제 #3
0
 /// <summary>
 /// Provides a deterministic way to delete the NewTreeViewModel property.
 /// </summary>
 public static void ClearNewTreeViewModel()
 {
     _newTreeViewModel.Cleanup();
     _newTreeViewModel = null;
 }