/// <summary> /// Loads the form control data. /// </summary> private void InitializeControl() { if (FormObject != null) { // Icon CSS class txtCssClass.Text = FormObject.GetStringValue(IconCssFieldName, null); txtCssClass.ToolTip = GetString("fontIconCss.tooltip"); // Load file uploader fileUploader.Category = Category; fileUploader.ObjectType = FormObject.TypeInfo.ObjectType; fileUploader.ObjectID = FormObject.Generalized.ObjectID; if (FormObject.Generalized.ObjectSiteID > 0) { fileUploader.SiteID = FormObject.Generalized.ObjectSiteID; } // Identify the currently selected icon type iconType = IconTypeEnum.Metafile; if (!string.IsNullOrEmpty(txtCssClass.Text)) { iconType = IconTypeEnum.CssClass; } lstOptions.SelectedValue = iconType.ToStringRepresentation(); } InitializeUploadControl(); }
public RubberStamp( Page page, RectangleF box, string text, IconTypeEnum iconType ) : base(page, PdfName.Stamp, box, text) { IconType = iconType; }
public RubberStamp( Page page, RectangleF box, IconTypeEnum iconType ) : base(page.Document, PdfName.Stamp, box, page) { IconType = iconType; }
public RubberStamp( Page page, RectangleF box, IconTypeEnum iconType ) : base( page.Document, PdfName.Stamp, box, page ) { IconType = iconType; }
/// <summary> /// Handles the Load event of the Page control. /// </summary> protected void Page_Load(object sender, EventArgs e) { lstOptions.SelectedIndexChanged += lstOptions_SelectedIndexChanged; if (Form != null) { Form.OnBeforeSave += Form_OnBeforeSave; Form.OnAfterSave += Form_OnAfterSave; if (!RequestHelper.IsPostBack()) { InitializeControl(); } iconType = lstOptions.SelectedValue.ToEnum <IconTypeEnum>(); } CheckFieldEmptiness = false; }
/// <summary> /// Loads the form control data. /// </summary> private void InitializeControl() { if (DocumentType == null) { return; } // First load initialization if (!RequestHelper.IsPostBack()) { // Icon CSS class txtCssClass.ToolTip = GetString("fontIconCss.tooltip"); // Identify the currently selected icon type iconType = IconTypeEnum.Files; if (!string.IsNullOrEmpty(txtCssClass.Text)) { iconType = IconTypeEnum.CssClass; } lstOptions.SelectedValue = iconType.ToStringRepresentation(); } // This control can be used only under existing document type if (SystemContext.DevelopmentMode) { // Allow 'gif' images in development mode dfuSmall.AllowedExtensions = "gif;png"; dfuLarge.AllowedExtensions = "gif;png"; } // Hide direct file uploader for external storage if (StorageHelper.IsExternalStorage("~/App_Themes/Default/Images/DocumentTypeIcons")) { dfuLarge.Visible = false; dfuSmall.Visible = false; } // Register refresh script ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "RefreshIcons", ScriptHelper.GetScript("function RefreshIcons() {" + ControlsHelper.GetPostBackEventReference(this, "update") + "}")); }
/// <summary> /// Page_Load event handler /// </summary> protected void Page_Load(object sender, EventArgs e) { // Hide the control if it shouldn't be processed or required document type data are not available if (StopProcessing || (DocumentType == null)) { pnlIcons.Visible = false; lblControlHidden.Visible = true; return; } lstOptions.SelectedIndexChanged += lstOptions_SelectedIndexChanged; if (Form != null) { InitializeControl(); iconType = lstOptions.SelectedValue.ToEnum <IconTypeEnum>(); } CheckFieldEmptiness = false; }
/// <summary> /// Loads the form control data. /// </summary> private void InitializeControl() { if ((DocumentType == null) || (FormObject == null)) { return; } // First load initialization if (!RequestHelper.IsPostBack()) { // Icon CSS class txtCssClass.ToolTip = GetString("fontIconCss.tooltip"); // Identify the currently selected icon type iconType = IconTypeEnum.Files; if (!string.IsNullOrEmpty(txtCssClass.Text)) { iconType = IconTypeEnum.CssClass; } lstOptions.SelectedValue = iconType.ToStringRepresentation(); } // This control can be used only under existing document type if (SystemContext.DevelopmentMode) { // Allow 'gif' images in development mode dfuSmall.AllowedExtensions = "gif;png"; dfuLarge.AllowedExtensions = "gif;png"; } // Hide direct file uploader for external storage if (StorageHelper.IsExternalStorage("~/App_Themes/Default/Images/DocumentTypeIcons")) { dfuLarge.Visible = false; dfuSmall.Visible = false; } // Register refresh script ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "RefreshIcons", ScriptHelper.GetScript("function RefreshIcons() {" + ControlsHelper.GetPostBackEventReference(this, "update") + "}")); }
/// <summary> /// Page_Load event handler /// </summary> protected void Page_Load(object sender, EventArgs e) { // Hide the control if it shouldn't be processed or required document type data are not available if (StopProcessing || (DocumentType == null) || (FormObject == null)) { pnlIcons.Visible = false; lblControlHidden.Visible = true; return; } lstOptions.SelectedIndexChanged += lstOptions_SelectedIndexChanged; if (Form != null) { InitializeControl(); iconType = lstOptions.SelectedValue.ToEnum<IconTypeEnum>(); } CheckFieldEmptiness = false; }
public override void Deserialize(ref ReadOnlySpan <byte> buffer) { base.Deserialize(ref buffer); Icon = (IconTypeEnum)BinSerialize.ReadPackedUnsignedInteger(ref buffer); }
/// <summary> /// Handles the SelectedIndexChanged event of the lstOptions control. /// </summary> private void lstOptions_SelectedIndexChanged(object sender, EventArgs e) { iconType = lstOptions.SelectedValue.ToEnum <IconTypeEnum>(); }
/// <summary> /// Handles the Load event of the Page control. /// </summary> protected void Page_Load(object sender, EventArgs e) { lstOptions.SelectedIndexChanged += lstOptions_SelectedIndexChanged; if (Form != null) { Form.OnBeforeSave += Form_OnBeforeSave; Form.OnAfterSave += Form_OnAfterSave; if (!RequestHelper.IsPostBack()) { InitializeControl(); } iconType = lstOptions.SelectedValue.ToEnum<IconTypeEnum>(); } CheckFieldEmptiness = false; }
/// <summary> /// Handles the SelectedIndexChanged event of the lstOptions control. /// </summary> private void lstOptions_SelectedIndexChanged(object sender, EventArgs e) { iconType = EnumStringRepresentationExtensions.ToEnum <IconTypeEnum>(lstOptions.SelectedValue); }
/// <summary> /// Handles the SelectedIndexChanged event of the lstOptions control. /// </summary> private void lstOptions_SelectedIndexChanged(object sender, EventArgs e) { iconType = lstOptions.SelectedValue.ToEnum<IconTypeEnum>(); }
/** * <summary>Gets the code corresponding to the given value.</summary> */ private static PdfName ToCode( IconTypeEnum value ) { return(IconTypeEnumCodes[value]); }
/** <summary>Gets the code corresponding to the given value.</summary> */ private static PdfName ToCode( IconTypeEnum value ) { return IconTypeEnumCodes[value]; }