Ejemplo n.º 1
0
        protected void AddControlStyle(ComponentController paComponentController)
        {
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSWidControlImagerUploader);
            paComponentController.AddElementType(ComponentController.ElementType.Control);
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_MaxFileSize, SC_MaxFileSize.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_MaxFileCount, SC_MaxFileCount.ToString());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ExtensionList, ctDEFExtensionList);

            paComponentController.AddMessageTemplate(ComponentController.ElementMessageTemplate.ma_ExceedMaxFileCount, SCMSG_ExceedMaxFileCount);
            paComponentController.AddMessageTemplate(ComponentController.ElementMessageTemplate.ma_NoFileSelected, SCMSG_NoFileSelected);
            paComponentController.AddMessageTemplate(ComponentController.ElementMessageTemplate.ma_InvalidFileType, SCMSG_InvalidFileType);
            paComponentController.AddMessageTemplate(ComponentController.ElementMessageTemplate.ma_FileTooLarge, SCMSG_FileTooLarge);
            paComponentController.AddMessageTemplate(ComponentController.ElementMessageTemplate.ma_UploadSuccessful, SCMSG_UploadSuccess);
            paComponentController.AddMessageTemplate(ComponentController.ElementMessageTemplate.ma_UploadFail, SCMSG_UploadFail);
            paComponentController.AddMessageTemplate(ComponentController.ElementMessageTemplate.ma_DeleteConfirmation, SCMSG_DeleteConfirmation);
            paComponentController.AddMessageTemplate(ComponentController.ElementMessageTemplate.ma_DeleteSuccessful, SCMSG_DeleteSuccess);
            paComponentController.AddMessageTemplate(ComponentController.ElementMessageTemplate.ma_DeleteFail, SCMSG_DeleteFail);
        }