Ejemplo n.º 1
0
        public void SetPositionInfo(UnitPoint unitpos)
        {
            PointF ptScreen     = m_canvas.ToScreen(unitpos);
            string screenPtInfo = string.Format(" screen:{0},{1},{2}", ptScreen.X, ptScreen.Y, m_canvas.Model.Zoom);

            m_mousePosLabel.Text = unitpos.PosAsString() + screenPtInfo;
            string s = string.Empty;

            if (m_data.SelectedCount == 1 || m_canvas.NewObject != null)
            {
                IDrawObject obj = m_data.GetFirstSelected();
                if (obj == null)
                {
                    obj = m_canvas.NewObject;
                }
                if (obj != null)
                {
                    s = obj.GetInfoAsString();
                }
            }
            if (m_toolHint.Length > 0)
            {
                s = m_toolHint;
            }
            if (s != m_drawInfoLabel.Text)
            {
                m_drawInfoLabel.Text = s;
            }
        }
Ejemplo n.º 2
0
        public void SetPositionInfo(UnitPoint unitpos)
        {
            m_mousePosLabel.Text = unitpos.PosAsString();
            string s = string.Empty;

            if (m_data.SelectedCount == 1 || m_canvas.NewObject != null)
            {
                IDrawObject obj = m_data.GetFirstSelected();
                if (obj == null)
                {
                    obj = m_canvas.NewObject;
                }
                if (obj != null)
                {
                    s = obj.GetInfoAsString();
                }
            }
            if (m_toolHint.Length > 0)
            {
                s = m_toolHint;
            }
            if (s != m_drawInfoLabel.Text)
            {
                m_drawInfoLabel.Text = s;
            }
        }
Ejemplo n.º 3
0
 public void SetPositionInfo(UnitPoint unitpos)
 {
     m_mousePosLabel.Text = unitpos.PosAsString();
     string s = string.Empty;
     if (m_data.SelectedCount == 1 || m_canvas.NewObject != null)
     {
         IDrawObject obj = m_data.GetFirstSelected();
         if (obj == null)
             obj = m_canvas.NewObject;
         if (obj != null)
             s = obj.GetInfoAsString();
     }
     if (m_toolHint.Length > 0)
         s = m_toolHint;
     if (s != m_drawInfoLabel.Text)
         m_drawInfoLabel.Text = s;
 }