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; } } } }
/// <summary> /// Overrides <see cref="IShowPropertyImpl.Removed"/> /// </summary> /// <param name="propertyTreeView">the IPropertyTreeView from which it was removed</param> public override void Removed(IPropertyTreeView propertyTreeView) { for (int i = 0; i < layout.Patches.Length; ++i) { LayoutPatch lp = layout.Patches[i]; lp.Disconnect(project); } //propertyTreeView.FocusChangedEvent -= new FocusChangedDelegate(OnFocusChanged); base.Removed(propertyTreeView); }
/// <summary> /// Overrides <see cref="CADability.UserInterface.IShowPropertyImpl.Removed (IPropertyTreeView)"/> /// </summary> /// <param name="propertyTreeView"></param> public override void Removed(IPropertyTreeView propertyTreeView) { positionProp.GetGeoPointEvent -= new GeoPointProperty.GetGeoPointDelegate(OnGetLocation); positionProp.SetGeoPointEvent -= new GeoPointProperty.SetGeoPointDelegate(OnSetLocation); positionProp.ModifyWithMouseEvent -= new ModifyWithMouseDelegate(OnPositionModifyWithMouse); blockRef.UserData.UserDataAddedEvent -= new UserData.UserDataAddedDelegate(OnUserDataAdded); blockRef.UserData.UserDataRemovedEvent -= new UserData.UserDataRemovedDelegate(OnUserDataAdded); base.Removed(propertyTreeView); }
/// <summary> /// Implementation of <see cref="IShowProperty.Removed"/>, /// raises the <see cref="IShowProperty.StateChangedEvent"/> /// </summary> /// <param name="propertyTreeView">removed from this <see cref="IPropertyTreeView"/></param> public virtual void Removed(IPropertyTreeView propertyTreeView) { if (StateChangedEvent != null) { StateChangedEvent(this, new StateChangedArgs(StateChangedArgs.State.Removed)); } if (toolTipInhibited) { // fals es vergessen wurde toolTipInhibited = false; } propertyPage = null; }
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); } } }
/// <summary> /// Attach the view to this presenter and begin populating the view. /// </summary> /// <param name="model">The simulation model</param> /// <param name="view">The view used for display</param> /// <param name="explorerPresenter">The presenter for this object</param> public void Attach(object model, object view, ExplorerPresenter explorerPresenter) { this.model = model as Model; this.treeview = view as IPropertyTreeView; this.TreeWidth = explorerPresenter.TreeWidth; //set the width of the PropertyTreeView to the same as the Explorer Tree. this.treeview.SelectedNodeChanged += this.OnNodeSelected; this.explorerPresenter = explorerPresenter; //Fill in the nodes in the tree view this.RefreshTreeView(); //Initialise the Right Hand View this.tablePresenter = new PropertyTablePresenter(); this.ShowRightHandView(); }
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(); } }
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> /// Implementation of <see cref="IShowProperty.Added"/>. /// Momorizes the given <see cref="IPropertyTreeView"/>, raises the <see cref="IShowProperty.StateChangedEvent"/> /// </summary> /// <param name="propertyTreeView"></param> public virtual void Added(IPropertyTreeView propertyTreeView) { PropertyEntryChangedState(new StateChangedArgs(StateChangedArgs.State.Added)); }
/* So ist die Lösung um interface methoden nicht public machen zu müssen * ist aber viel Schreibartbeit */ void IShowProperty.Added(IPropertyTreeView propertyTreeView) { Added(propertyTreeView); }
public override void Removed(IPropertyTreeView propertyTreeView) { base.Removed(propertyTreeView); subEntries = null; frame = null; }
private void OnFocusChanged(IPropertyTreeView sender, IShowProperty NewFocus, IShowProperty OldFocus) { }