private void lstVertexDesc_SelectedIndexChanged(object sender, EventArgs e) { propsVertexDescriptionItem itm = lstVertexDesc.SelectedItem as propsVertexDescriptionItem; if (itm != null) { if (Geometry.VertexDescription != null) { Geometry.VertexDescription.Updated -= Geometry_VertexDescription_Updated; } Geometry.VertexDescription = itm.Description; itm.Description.Updated += Geometry_VertexDescription_Updated; } }
private void UpdateVertexDescriptionList() { lstVertexDesc.Items.Clear(); foreach (clsProjectObject objItr in projectMain.ProjectObjects) { clsVertexDescription descItr = objItr as clsVertexDescription; if (descItr != null) { propsVertexDescriptionItem itmNew = new propsVertexDescriptionItem(descItr); lstVertexDesc.Items.Add(itmNew); if (Geometry.VertexDescription == descItr) { lstVertexDesc.SelectedItem = itmNew; } } } }