Example #1
0
 protected virtual void OnLoadingDialogContent(object sender, LoadingDialogContentEventArgs eventArgs)
 {
     if (LoadingDialogContent != null)
     {
         LoadingDialogContent(sender, eventArgs);
     }
 }
Example #2
0
        /// <summary>
        /// 加载对话框的模板
        /// </summary>
        /// <returns></returns>
        protected virtual Control LoadDialogTemplate()
        {
            DialogTemplateAttribute templateAttr = AttributeHelper.GetCustomAttribute <DialogTemplateAttribute>(this.GetType());

            string pageHtml = string.Empty;

            if (templateAttr != null && string.IsNullOrEmpty(templateAttr.ResourcePath) == false)
            {
                pageHtml = ResourceHelper.LoadStringFromResource(Assembly.GetExecutingAssembly(), templateAttr.ResourcePath);
            }
            else
            {
                Assembly assembly = Assembly.GetExecutingAssembly();

                if (templateAttr != null && string.IsNullOrEmpty(templateAttr.AssemblyName) == false)
                {
                    assembly = Assembly.Load(templateAttr.AssemblyName);
                }

                pageHtml = ResourceHelper.LoadStringFromResource(assembly,
                                                                 "MCS.Web.WebControls.Script.Resources.standardDialogControlTemplate.htm");
            }

            DialogContentAttribute contentAttr = AttributeHelper.GetCustomAttribute <DialogContentAttribute>(this.GetType());

            if (contentAttr != null && string.IsNullOrEmpty(contentAttr.ResourcePath) == false)
            {
                Assembly assembly = Assembly.GetExecutingAssembly();

                if (string.IsNullOrEmpty(contentAttr.AssemblyName) == false)
                {
                    assembly = Assembly.Load(contentAttr.AssemblyName);
                }

                LoadingDialogContentEventArgs eventArgs = new LoadingDialogContentEventArgs();

                OnLoadingDialogContent(this, eventArgs);

                string html = eventArgs.Content;

                if (html.IsNullOrEmpty())
                {
                    html = ResourceHelper.LoadStringFromResource(assembly, contentAttr.ResourcePath);
                }

                pageHtml = pageHtml.Replace("<!--dialogContent-->", html);
            }

            pageHtml = ReplaceDialogTemplateString(pageHtml);

            return(Page.ParseControl(pageHtml));
        }
Example #3
0
		protected void ctlUpload_LoadingDialogContent(object sender, LoadingDialogContentEventArgs e)
		{
			e.Content = WebXmlDocumentCache.GetDocument("~/inc/RoleUploadTemplate.htm") + this.GetScript(this.ctlUpload.Tag);
		}
		protected void ctlUpload_LoadingDialogContent(object sender, LoadingDialogContentEventArgs e)
		{
			e.Content = WebXmlDocumentCache.GetDocument("~/inc/RootOUUploadTemplate.htm");
		}
		protected void uploadProgress_LoadingDialogContent(object sender, LoadingDialogContentEventArgs eventArgs)
		{
			eventArgs.Content = ResourceHelper.LoadStringFromResource(Assembly.GetExecutingAssembly(),
				"MCS.Library.SOA.Web.WebControls.Test.UploadProgressControl.customUploadProgressControlTemplate.htm");
		}
Example #6
0
		protected void calcProgress_LoadingDialogContent(object sender, LoadingDialogContentEventArgs e)
		{

		}