/// <summary> /// Removes destroyed KGFIGui2D objects from the itsGUIs list /// </summary> /// <param name="theSender"></param> /// <param name="theArgs"></param> private void OnUnregisterKGFIGui2D(object theSender, EventArgs theArgs) { KGFAccessor.KGFAccessorEventargs anEventArgs = theArgs as KGFAccessor.KGFAccessorEventargs; if (anEventArgs != null) { KGFIGui2D aGui2D = anEventArgs.GetObject() as KGFIGui2D; if (aGui2D != null && itsGUIs.Contains(aGui2D)) { itsGUIs.Remove(aGui2D); } } }
/// <summary> /// Add registering KGFIGui2D objets to the itsGUIs list /// </summary> /// <param name="theSender"></param> /// <param name="theArgs"></param> private void OnRegisterKGFIGui2D(object theSender, EventArgs theArgs) { KGFAccessor.KGFAccessorEventargs anEventArgs = theArgs as KGFAccessor.KGFAccessorEventargs; if (anEventArgs != null) { KGFIGui2D aGui2D = anEventArgs.GetObject() as KGFIGui2D; if (aGui2D != null) { itsGUIs.Add(aGui2D); itsGUIs.Sort(CompareKGFIGui2D); } } }
int CompareKGFIGui2D(KGFIGui2D theGui1,KGFIGui2D theGui2) { return theGui1.GetLayer().CompareTo(theGui2.GetLayer()); }
int CompareKGFIGui2D(KGFIGui2D theGui1, KGFIGui2D theGui2) { return(theGui1.GetLayer().CompareTo(theGui2.GetLayer())); }