public static void setValueLambdaHtml(AnyUiUIElement el, object o) { var dc = (el.DisplayData as AnyUiDisplayDataHtml)?._context; if (dc != null) { var sessionNumber = dc._bi.sessionNumber; var found = findSession(sessionNumber); if (found != null) { lock (dc.htmlDotnetLock) { while (found.htmlDotnetEventIn) { ; } found.htmlEventInputs.Clear(); found.htmlDotnetEventType = "setValueLambda"; found.htmlDotnetEventInputs.Add(el); found.htmlDotnetEventInputs.Add(o); found.htmlDotnetEventIn = true; } } } }
public static void specialActionContextMenuHtml(AnyUiUIElement el, AnyUiSpecialActionContextMenu cntlcm) { var dc = (el.DisplayData as AnyUiDisplayDataHtml)?._context; if (dc != null) { var sessionNumber = dc._bi.sessionNumber; var found = findSession(sessionNumber); if (found != null) { lock (dc.htmlDotnetLock) { while (found.htmlDotnetEventIn) { ; } found.htmlEventInputs.Clear(); found.htmlDotnetEventType = "contextMenu"; found.htmlDotnetEventInputs.Add(el); found.htmlDotnetEventInputs.Add(cntlcm); found.htmlDotnetEventIn = true; } } } }
public static void SetColumnSpan(AnyUiUIElement el, int value) { if (el != null) { el.GridColumnSpan = value; } }
public static void SetRow(AnyUiUIElement el, int value) { if (el != null) { el.GridRow = value; } }
/// <summary> /// Allows setting the name for a control. /// </summary> /// <param name="cntl"></param> /// <param name="name"></param> /// <returns></returns> public static AnyUiUIElement NameControl( AnyUiUIElement cntl, string name) { // access if (cntl == null) { return(null); } // set cntl.Name = name; return(cntl); }
public static void specialActionContextMenuHtml(AnyUiUIElement el, AnyUiSpecialActionContextMenu cntlcm) { lock (htmlDotnetLock) { while (htmlDotnetEventIn) { ; } htmlDotnetEventType = "contextMenu"; htmlDotnetEventInputs.Add(el); htmlDotnetEventInputs.Add(cntlcm); htmlDotnetEventIn = true; } }
public static void setValueLambdaHtml(AnyUiUIElement el, object o) { lock (htmlDotnetLock) { while (htmlDotnetEventIn) { ; } htmlDotnetEventType = "setValueLambda"; htmlDotnetEventInputs.Add(el); htmlDotnetEventInputs.Add(o); htmlDotnetEventIn = true; } }
/// <summary> /// This function attaches the above lambdas accordingly to a given user control. /// It is to be used, when an abstract AnyUi... is being created and the according WPF element /// will be activated later. /// Note: use of this is for legacy reasons; basically the class members can be used directly /// </summary> /// <param name="cntl">User control (passed thru)</param> /// <param name="setValue">Lambda called, whenever the value is changed</param> /// <param name="takeOverLambda">Lamnda called at the end of a modification</param> /// <returns>Passes thru the user control</returns> public static AnyUiUIElement RegisterControl( AnyUiUIElement cntl, Func <object, AnyUiLambdaActionBase> setValue, AnyUiLambdaActionBase takeOverLambda = null) { // access if (cntl == null) { return(null); } // crude test cntl.setValueLambda = setValue; cntl.takeOverLambda = takeOverLambda; return(cntl); }
/// <summary> /// Tries to revert changes in some controls. /// </summary> /// <returns>True, if changes were applied</returns> public virtual bool CallUndoChanges(AnyUiUIElement root) { return(false); }