void ReleaseDesignerOutlets()
        {
            if (ConnectionIcon != null)
            {
                ConnectionIcon.Dispose();
                ConnectionIcon = null;
            }

            if (DropFilesHereText != null)
            {
                DropFilesHereText.Dispose();
                DropFilesHereText = null;
            }

            if (ItemColorWell != null)
            {
                ItemColorWell.Dispose();
                ItemColorWell = null;
            }

            if (MenuLayoutController != null)
            {
                MenuLayoutController.Dispose();
                MenuLayoutController = null;
            }

            if (MenuTreeScrollView != null)
            {
                MenuTreeScrollView.Dispose();
                MenuTreeScrollView = null;
            }

            if (NewFolderButton != null)
            {
                NewFolderButton.Dispose();
                NewFolderButton = null;
            }

            if (PowerStateIcon != null)
            {
                PowerStateIcon.Dispose();
                PowerStateIcon = null;
            }

            if (MenuDifferencesIcon != null)
            {
                MenuDifferencesIcon.Dispose();
                MenuDifferencesIcon = null;
            }

            if (RemoveItemButton != null)
            {
                RemoveItemButton.Dispose();
                RemoveItemButton = null;
            }
        }
Ejemplo n.º 2
0
 private void HandleDataContextChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (e.PropertyName == INTV.Shared.View.IFakeDependencyObjectHelpers.DataContextPropertyName)
     {
         var viewModel = View.DataContext as INTV.LtoFlash.ViewModel.MenuLayoutViewModel;
         ViewModel = viewModel;
         viewModel.PropertyChanged         += HandleMenuLayoutPropertyChanged;
         LtoFlashViewModel.PropertyChanged += HandleLtoFlashPropertyChanged;
         HandleMenuLayoutPropertyChanged(viewModel, new System.ComponentModel.PropertyChangedEventArgs(FolderViewModel.StatusPropertyName));
         var selectsInsertedObjects = MenuLayoutController.SelectsInsertedObjects;
         MenuLayoutController.SelectsInsertedObjects = false;
         MenuLayoutController.SetContent(viewModel.Root);
         MenuLayoutController.SelectsInsertedObjects = selectsInsertedObjects;
         var outlineView = View.FindChild <NSOutlineView>();
         outlineView.ExpandItem(outlineView.ItemAtRow(0));
         HandleMenuLayoutPropertyChanged(viewModel, new System.ComponentModel.PropertyChangedEventArgs(MenuLayoutViewModel.FolderCountPropertyName));
     }
 }