/// <summary> /// Sets the properties of a control which are defined under "Actions:" in the .yaml file /// </summary> /// <param name="writer"></param> /// <param name="ctrl"></param> /// <param name="AActionHandler"></param> public virtual void SetControlActionProperties(TFormWriter writer, TControlDef ctrl, TActionHandler AActionHandler) { if (AActionHandler.actionImage.Length > 0) { /* Get the name of the image for the toolbar button * and put it into the resources. * The images must be in the directory specified by the ResourceDir command line parameter */ writer.SetControlProperty(ctrl, "Image", "((System.Drawing.Bitmap)resources" + ctrl.controlType + ".GetObject(\"" + ctrl.controlName + ".Glyph\"))"); writer.AddImageToResource(ctrl.controlName, AActionHandler.actionImage, "Bitmap"); } if ((AActionHandler.actionTooltip.Length > 0) && (ctrl.controlTypePrefix != "btn")) { writer.SetControlProperty(ctrl, "ToolTipText", "\"" + AActionHandler.actionTooltip + "\""); } }