Exemple #1
0
 public void DeInitializeRepositoryTreeViews()
 {
     // Foreach control in ProjectManagerRepositoryTreePanel, see if we need to bringToFront
     foreach (Control control in mainForm.ProjectManagerRepositoryTreePanel.Controls)
     {
         if (control is MogControl_BaseTreeView)
         {
             MogControl_BaseTreeView view = (MogControl_BaseTreeView)control;
             view.DeInitialize();
         }
     }
 }
Exemple #2
0
        internal void Expand()
        {
            MogControl_BaseTreeView treeView = GetRepositoryTreeView();

            if (treeView != null)
            {
                if (treeView.SelectedNode != null)
                {
                    treeView.SelectedNode.ExpandAll();
                }
                else
                {
                    MOG_Prompt.PromptResponse("Expand", "Expand requires a selected node!");
                }
            }
        }
Exemple #3
0
        internal void Collapse()
        {
            MogControl_BaseTreeView treeView = GetRepositoryTreeView();

            if (treeView != null)
            {
                if (treeView.SelectedNode != null)
                {
                    treeView.SelectedNode.Collapse();
                }
                else
                {
                    MOG_Prompt.PromptResponse("Collapse", "Collapse requires a selected node!");
                }
            }
        }
Exemple #4
0
        public void SelectProjectTree(object treeToSelect)
        {
            if (treeToSelect is MogControl_BaseTreeView)
            {
                MogControl_BaseTreeView view = (MogControl_BaseTreeView)treeToSelect;
                if (!view.IsInitialized && MOG_ControllerProject.GetProject() != null)
                {
                    view.Initialize();
                    // If our label edit is not initialized, initialize it...
                    if (!view.IsLabelEditInitialized)
                    {
                        view.InitializeLabelEdit();
                    }

                    // If we are the classification view, do our dragDrop
                    if (view is MogControl_FullTreeView && !view.IsDragDropInitialized)
                    {
                        view.InitializeDragDrop();
                    }
                }
                view.BringToFront();
            }
        }
Exemple #5
0
        public void InitializeRepositoryTreeViews()
        {
            MogControl_BaseTreeView tree = GetRepositoryTreeView();

            tree.Initialize();
        }
Exemple #6
0
 private void FindAndUpdateNodeLockStatus(string nodeKey, MOG_Filename assetName, MogControl_BaseTreeView tree)
 {
     // Attempt to find this node in our tree
     TreeNode[] foundNodes = tree.Nodes.Find(nodeKey, true);
     if (foundNodes != null && foundNodes.Length > 0)
     {
         foreach (TreeNode node in foundNodes)
         {
             Mog_BaseTag tag = node.Tag as Mog_BaseTag;
             if (tag != null)
             {
                 // Is this a sync target node
                 if (tag.AttachedSyncTargetInfo != null)
                 {
                     // Update this assets status
                     string assetRepositoryName = tag.FullFilename + "\\Files.Imported\\" + tag.AttachedSyncTargetInfo.FilenameOnly;
                     node.ImageIndex         = MogUtil_AssetIcons.GetBinaryLockedOrUnlockedIcon(assetName.GetAssetFullName(), assetRepositoryName);
                     node.SelectedImageIndex = node.ImageIndex;
                 }
                 else
                 {
                     // Update this assets status
                     node.ImageIndex         = MogUtil_AssetIcons.GetAssetIconIndex(assetName.GetAssetFullName());
                     node.SelectedImageIndex = node.ImageIndex;
                 }
             }
         }
     }
 }