示例#1
0
        protected void docuView_CustomAction(object sender, CustomActionEventArgs e)
        {
            // If file type/format, is not allowed
            if ((sender.ToString() == "OnlyPDF_DOCX"))
            {
                // Display an ERROR msg of ONLY Opening allowed Allowed Files
                DocuViewareMessage docMsg = new DocuViewareMessage
                                                ("Only PDF & DOCX file formsts supported.", "#ff5656", 2500, 300, 300,
                                                false, "130%", "normal", "#ffffff", "none", "none", "48px",
                                                DocuViewareMessageIcon.Error);

                // EXCEP - CustomActionEventArgs is null
                e.message = docMsg;
            }
        }
示例#2
0
        /// <summary>
        /// Get the DocuViewareMessage for specified text message and icon type
        /// </summary>
        /// <param name="text"></param>
        /// <param name="iconType"></param>
        /// <returns></returns>
        private static DocuViewareMessage GetMessage(string text, DocuViewareMessageIcon iconType)
        {
            DocuViewareMessage msg = new DocuViewareMessage(text, icon: iconType);

            return(msg);
        }