/// <summary> /// Implementation of <see cref="IShowProperty.ChildSelected"/>, /// raises the <see cref="IShowProperty.StateChangedEvent"/> /// </summary> /// <param name="theSelectedChild">the now selected child property</param> public virtual void ChildSelected(IShowProperty theSelectedChild) { StateChangedArgs sca = new StateChangedArgs(StateChangedArgs.State.SubEntrySelected); sca.SelectedChild = theSelectedChild; PropertyEntryChangedState(sca); }
/// <summary> /// Static helper method to concatenate two arrays of <see cref="IShowProperty"/>. /// </summary> /// <param name="left"></param> /// <param name="right"></param> /// <returns></returns> public static IShowProperty[] Concat(IShowProperty[] left, IShowProperty[] right) { IShowProperty[] res = new IShowProperty[left.Length + right.Length]; Array.Copy(left, 0, res, 0, left.Length); Array.Copy(right, 0, res, left.Length, right.Length); return(res); }
/// <summary> /// Overrides <see cref="CADability.UserInterface.IShowPropertyImpl.OnSpecialKey (IShowProperty, KeyEventArgs)"/> /// </summary> /// <param name="sender"></param> /// <param name="args"></param> #endregion public void ShowOpen(IShowProperty toShow) { if (propertyPage != null) { propertyPage.OpenSubEntries(toShow as IPropertyEntry, true); } }
private void OnFocusChanged(IPropertyTreeView sender, IShowProperty NewFocus, IShowProperty OldFocus) { if (sender.FocusEntered(this, OldFocus, NewFocus)) { if (action != null) { action.RemoveThisAction(); } action = null; if (Frame.ActiveView == layoutView) { action = new ModifyLayoutPatch(this, layoutView); Frame.SetAction(action); } } else if (sender.FocusLeft(this, OldFocus, NewFocus)) { if (action != null) { action.RemoveThisAction(); } action = null; } if (sender.FocusLeft(visibleLayersSp, OldFocus, NewFocus)) { layoutView.Repaint(); } }
void OnFocusChanged(IPropertyTreeView sender, IShowProperty NewFocus, IShowProperty OldFocus) { //if (sender.FocusLeft(this, OldFocus, NewFocus)) //{ // if (orgDrive != null) // { // if (orgDrive != drive || orgTime != time || orgPosition != position) // { // if (orgDrive == drive && orgTime == time) // { // schedule.PositionChanged(drive, time, orgPosition, position); // } // else // { // schedule.Remove(orgDrive, orgTime); // schedule.AddPosition(drive, time, position); // } // } // } // else // { // schedule.AddPosition(drive, time, position); // } //} }
void OnFocusChanged(IPropertyTreeView sender, IShowProperty NewFocus, IShowProperty OldFocus) { if (subEntries != null) { steps.Clear(); // alle rauswerfen und neu aufbauen for (int i = 0; i < subEntries.Length; ++i) { PositionProperty pp = subEntries[i] as PositionProperty; if (pp != null) { if (pp.Drive == null) { continue; } SortedList <double, double> addTo; if (!steps.TryGetValue(pp.Drive, out addTo)) { addTo = new SortedList <double, double>(); steps[pp.Drive] = addTo; } addTo[pp.Time] = pp.Position; } } } }
private void OnFocusChanged(IPropertyTreeView sender, IShowProperty NewFocus, IShowProperty OldFocus) { // hier nur feuern wenn der Abstand verlassen wird, // displaymode wird bei jeder Änderung gefeurt if ((OldFocus == dxProperty && NewFocus != dyProperty) || (OldFocus == dyProperty && NewFocus != dxProperty)) { if (GridChangedEvent != null) { GridChangedEvent(this); } } }
private void OnFocusChanged(IPropertyTreeView sender, IShowProperty NewFocus, IShowProperty OldFocus) { // bei der Änderung der Richtungen soll erst beim Verlassen des Fokus // eine Neuberechnung stattfinden // propertyTreeView kann hier null sein, da der Focus auch beim // zusammenklappen des Eintrages verschwindet if (sender.FocusLeft(planeDirectionX, OldFocus, NewFocus)) { Plane pln = projection.DrawingPlane; try { projection.DrawingPlane = new Plane(pln.Location, dirX, pln.DirectionY); dirX = projection.DrawingPlane.DirectionX; dirY = projection.DrawingPlane.DirectionY; planeDirectionX.Refresh(); planeDirectionY.Refresh(); } catch (PlaneException) { // wenns nicht geht, dann halt nicht } frame.ActiveView.InvalidateAll(); } if (sender.FocusLeft(planeDirectionY, OldFocus, NewFocus)) { Plane pln = projection.DrawingPlane; try { projection.DrawingPlane = new Plane(pln.Location, pln.DirectionX, dirY); dirX = projection.DrawingPlane.DirectionX; dirY = projection.DrawingPlane.DirectionY; planeDirectionX.Refresh(); planeDirectionY.Refresh(); } catch (PlaneException) { // wenns nicht geht, dann halt nicht } frame.ActiveView.InvalidateAll(); } if (sender.FocusLeft(planeOrigin, OldFocus, NewFocus)) { frame.ActiveView.InvalidateAll(); } }
private void OnStateChanged(IShowProperty sender, StateChangedArgs args) { if (HotspotChangedEvent != null) { if (args.EventState == StateChangedArgs.State.Selected || args.EventState == StateChangedArgs.State.SubEntrySelected) { if (sender == locationProperty) { HotspotChangedEvent(locationProperty, HotspotChangeMode.Selected); } } else if (args.EventState == StateChangedArgs.State.UnSelected) { if (sender == locationProperty) { HotspotChangedEvent(locationProperty, HotspotChangeMode.Deselected); } } } }
void OnFocusChanged(IPropertyTreeView sender, IShowProperty NewFocus, IShowProperty OldFocus) { if (sender.FocusLeft(this, OldFocus, NewFocus)) { } else if (sender.FocusEntered(this, OldFocus, NewFocus)) { if (NewFocus == this) { if (Frame.ActiveView is AnimatedView) { AnimatedView av = Frame.ActiveView as AnimatedView; av.SetSelectedObjects(new GeoObjectList(list.ToArray())); } } else if (NewFocus is SimpleNameProperty) { if (Frame.ActiveView is AnimatedView) { AnimatedView av = Frame.ActiveView as AnimatedView; av.SetSelectedObject((NewFocus as SimpleNameProperty).AssociatedObject as IGeoObject); } } } else { // möglicherweise Änderung innerhalb der Child objects if (propertyTreeView.GetParent(NewFocus) == this) { if (NewFocus is SimpleNameProperty) { if (Frame.ActiveView is AnimatedView) { AnimatedView av = Frame.ActiveView as AnimatedView; av.SetSelectedObject((NewFocus as SimpleNameProperty).AssociatedObject as IGeoObject); } } } } }
/// <summary> /// Calls the Refresh method of several standard implementations of <see cref="IShowProperty"/>. /// </summary> /// <param name="sp"></param> public static void Update(IShowProperty sp) { // das würde besser in das IShowProperty interface gehören if (sp is GeoPointProperty) { (sp as GeoPointProperty).Refresh(); } else if (sp is GeoVectorProperty) { (sp as GeoVectorProperty).Refresh(); } else if (sp is LengthProperty) { (sp as LengthProperty).Refresh(); } else if (sp is AngleProperty) { (sp as AngleProperty).AngleChanged(); } if (sp is IShowPropertyImpl) { IShowPropertyImpl sp1 = (sp as IShowPropertyImpl); if (sp1.IsOpen) { for (int j = 0; j < sp1.SubEntriesCount; ++j) { Update(sp1.SubEntries[j]); } } } // wenn die nicht offen sind gibts hier Probleme // und überprüfen geht hier nicht // for (int i=0; i<sp.SubEntriesCount; ++i) // { // Update(sp.SubEntries[i]); // } }
private void OnFocusChanged(IPropertyTreeView sender, IShowProperty NewFocus, IShowProperty OldFocus) { }
public void ShowSelected(IShowProperty ToSelect) { propertyPage.SelectEntry(ToSelect as IPropertyEntry); }
public bool IsOpen(IShowProperty toTest) { return((toTest as IPropertyEntry).IsOpen); }
public IPropertyEntry GetParent(IShowProperty child) { return((child as IPropertyEntry).Parent as IPropertyEntry); }