public ScadaLabelsManager( IVRViewerSdk viewer, string name )
 {
     _labels = viewer.CreateLabelGroup( name );
     _labels.Scale = ( float )0.8;
     _labels.MaximumDistance = ( float )12;
     _labels.Transparency = ( float )0.4;
 }
Ejemplo n.º 2
0
 void DisposeLabelGroup()
 {
     m_ToolStripItem.Checked = false;
     m_LabelGroup.Clear();
     m_LabelGroup.Dispose();
     m_LabelGroup = null;
 }
Ejemplo n.º 3
0
        void CreateLabelGroup()
        {
            m_ToolStripItem.Checked      = true;
            m_LabelGroup                 = null;
            m_LabelGroup                 = pviewer.CreateLabelGroup("ShowLabels");
            m_LabelGroup.MaximumDistance = 10.0f;

            m_LabelGroup.Color = Color.DeepPink;
        }
Ejemplo n.º 4
0
        protected override void OnClosing(CancelEventArgs e)
        {
            // Remove the listener from our context menu items.
            m_ItemCreate.Click  -= new EventHandler(m_ItemCreate_Click);
            m_ItemDestroy.Click -= new EventHandler(m_ItemDestroy_Click);

            // Remove the menu item "Example 7" from the 3D Context Menu.
            SDKViewer.UI.ContextMenu3D.Items.Remove(m_Item);


            m_Labels.Clear(); // clear the dictionary, no need for it anymore.
            // Remove all the labels from the 3D engine by clearing labelgroups and Delete the label group from the 3D engine.
            m_LabelGroup.Clear();
            m_LabelGroup.Dispose();
            m_LabelGroup = null;

            // Remove the reference to the menu items objects.
            m_Item        = null;
            m_ItemCreate  = null;
            m_ItemDestroy = null;
            base.OnClosing(e);
        }