public void MasterLayer_OnMouseDown(object sender, PInputEventArgs e) { if (e.PickedNode.Tag.GetType().ToString().Contains("SectorSprite")) { setOriginalText(pSelectedNode); SectorSprite tmp2 = (SectorSprite)e.PickedNode.Tag; PText pnameNew = tmp2.getText(); pnameNew.TextBrush = Brushes.Red; } pSelectedNode = e.PickedNode; }
public void setOriginalText(PNode pickedNode) { if (pSelectedNode != null) { if (pickedNode.Tag.GetType().ToString().Contains("SectorSprite")) { SectorSprite tmp = (SectorSprite)pSelectedNode.Tag; PText pname = tmp.getText(); pname.TextBrush = Brushes.White; } } }
public void pg_PropertyValueChanged(Object sender, PropertyValueChangedEventArgs e) { String propertyName = e.ChangedItem.PropertyDescriptor.Name; try { if (pSelectedNode.Tag.GetType().ToString().Contains("SectorSprite")) { SectorSprite tmp = (SectorSprite)pSelectedNode.Tag; tmp.updateChangedInfo(propertyName, e.ChangedItem.Value.ToString()); } } catch (Exception) { updateChangedInfo(propertyName, e.ChangedItem.Value); } }