Inheritance: System.Windows.Forms.Control
        public void ToolChanged()
        {
            _currentPrimitive = null;
            RemoveAllProperties();

            PropertyControlBase propertyControl = null;

            switch (_selectedTool)
            {
            case TpTool.FreeLine:
                propertyControl = new FreeLinePropertyControl();
                break;

            case TpTool.Line:
                propertyControl = new LinePropertyControl();
                break;

            case TpTool.TextBox:
                propertyControl = new DecoratedTextBoxPropertyControl();
                break;

            case TpTool.Box:
                propertyControl = new BoxPropertyControl();
                break;
            }

            AddProperties(propertyControl);
            UpdatePropertiesView();
            Focus();
        }
 public void AddProperties(PropertyControlBase pb)
 {
     if (pb == null)
     {
         return;
     }
     Controls.Add(pb);
     UpdatePropertyControlPosition();
     pb.BringToFront();
 }
        public void UpdateCurrentTool()
        {
            RemoveAllProperties();
            if (!SelectionExists)
            {
                return;
            }


            PropertyControlBase property = SelectedPrimitive.GeneratePropertyControl();

            if (property == null)
            {
                return;
            }

            property.PropertyChanged += PropertyControlValueChanged;
            property.AttachTo(SelectedPrimitive);
            AddProperties(property);
            UpdatePropertiesView();
        }
		public void AddProperties(PropertyControlBase pb)
		{
			if (pb == null)
				return;
			Controls.Add(pb);
			UpdatePropertyControlPosition();
			pb.BringToFront();
		}