Example #1
0
        private void mToolStripButton_Click(object sender, EventArgs e)
        {
            if (m_Selection == null)
            {
                m_Selection = SDKViewer.GroupManager.CreateEmptyGroup();
            }
            else
            {
                m_Selection.Clear();
            }

            m_RichTextBox.Clear();

            string searchtext = mToolStripTextBox.Text;
            var    branches   = SDKViewer.ProjectManager.CurrentProject.BranchManager.GetBranchesByNameFragmentAndKind(searchtext, VRBranchKind.Cad);

            foreach (IVRBranch branch in branches)
            {
                m_RichTextBox.Text += branch.Name;
                m_RichTextBox.Text += "\r\n";
                m_Selection.Add(branch);
            }

            m_Selection.Highlight(Color.FromArgb(255, 32, 255, 255));
            m_Selection.JumpTo();
        }
Example #2
0
        private void Search()
        {
            // Lookup the branches matching the name the user placed in the search text area.
            var branches = SDKViewer.ProjectManager.CurrentProject.BranchManager.GetBranchesByExactNamesAndKind(new string[] { textBox1.Text }, VRBranchKind.Cad);

            // Clear the previous result from the group.
            pGroup.Clear();
            // Iterate all the results, and add the elements to the group.
            foreach (IVRBranch b in branches)
            {
                pGroup.Add(b);
            }
            // APply the color to the group of elements.
            var c = Color.FromArgb(TrckBarTransparancy.Value, BtnColor.BackColor.R, BtnColor.BackColor.G, BtnColor.BackColor.B); // Very transparent green.

            pGroup.ApplyColor(c);
            // Jump the camara to the group.
            pGroup.JumpTo();
        }