Ejemplo n.º 1
0
 public void OnActiveDocumentCheck(object sender, ActiveDocumentEventArgs e)
 {
     if (e.IsActiveDocument == false)
     {
         DisplayNoActiveDocumentMessage(true);
     }
 }
 private void documentContainer_ActiveDocumentChanged(object sender, ActiveDocumentEventArgs e)
 {
     if (documentContainer.Documents.Length == 0)
     {
         documentContainer.Visible    = false;
         noResultsBorderPanel.Visible = true;
     }
     else
     {
         documentContainer.Visible    = true;
         noResultsBorderPanel.Visible = false;
     }
 }
Ejemplo n.º 3
0
        private void documentContainer1_ActiveDocumentChanged(object sender, ActiveDocumentEventArgs e)
        {
            //Try to parse the tag as an integer.
            try
            {
                int.Parse(documentContainer1.ActiveDocument.Tag.ToString());
            }
            //Return if we catch an error
            catch
            {
                return;
            }

            //Set our changing status
            ChangingTab = true;

            //Get our index item
            HaloMap.TagItem tabbedTag = Map.IndexItems[int.Parse(documentContainer1.ActiveDocument.Tag.ToString())];

            //Loop through all treenodes
            for (int i = 0; i < tvMetaTree.Nodes.Count; i++)
            {
                //If it's class is that of this tag
                if (tvMetaTree.Nodes[i].Tag.ToString() == tabbedTag.Class)
                {
                    //Loop through all child nodes
                    for (int z = 0; z < tvMetaTree.Nodes[i].Nodes.Count; z++)
                    {
                        //If it's name is that of this tag
                        if (tvMetaTree.Nodes[i].Nodes[z].Text == tabbedTag.Name)
                        {
                            //Select that tag
                            tvMetaTree.SelectedNode = tvMetaTree.Nodes[i].Nodes[z];
                            //Break out of this loop of code
                            break;
                        }
                    }
                    //Break out of this block of code
                    break;
                }
            }

            //Set our changing status
            ChangingTab = false;
        }
Ejemplo n.º 4
0
 private void OnDocumentContainerActiveDocumentChanged(object sender, ActiveDocumentEventArgs e)
 {
     this.propertyGrid.SelectedObjects = null;
 }