public override void UpdatePage(ObjectPropertiesPageEventArgs e) { var spheres = SpheresController.GetSpheres(e.Objects).ToList(); if (spheres.Count != 0) { _control.SetData(spheres); } }
public override void InitializeControls() { if (_data.Count == 0) { return; } if (_data.Count == 1 | SpheresController.AreSpheresRadiiEqual(_data)) { tB_Radius.Text = _data[0].Radius.ToString(CultureInfo.CurrentCulture); tB_Volume.Text = _data[0].Volume.ToString(CultureInfo.CurrentCulture); return; } tB_Radius.Text = ""; }
public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e) { if (e.ObjectCount == 0) { return(false); } var spheres = SpheresController.GetSpheres(e.Objects).ToList(); if (spheres.Count == 0) { return(false); } _control.SetData(spheres); return(true); }