예제 #1
0
        /// <summary>
        /// 加载对话框的模板
        /// </summary>
        /// <returns></returns>
        protected virtual Control LoadDialogTemplate()
        {
            DialogContentAttribute contentAttr = AttributeHelper.GetCustomAttribute <DialogContentAttribute>(this.GetType());

            var contentHtml = "";

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

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

                LoadingDialogContentEventArgs e = new LoadingDialogContentEventArgs();

                OnLoadingDialogContent(this, e);

                contentHtml = e.Content;

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

            contentHtml = ReplaceDialogTemplateString(contentHtml);

            return(Page.ParseControl(contentHtml));
        }
예제 #2
0
 protected virtual void OnLoadingDialogContent(object sender, LoadingDialogContentEventArgs e)
 {
     if (LoadingDialogContent != null)
     {
         LoadingDialogContent(sender, e);
     }
 }
예제 #3
0
 protected override void OnLoadingDialogContent(object sender, LoadingDialogContentEventArgs e)
 {
     base.OnLoadingDialogContent(sender, e);
 }
예제 #4
0
 protected override void OnLoadingDialogContent(object sender, LoadingDialogContentEventArgs e)
 {
     base.OnLoadingDialogContent(sender, e);
 }
예제 #5
0
        /// <summary>
        /// 加载对话框的模板
        /// </summary>
        /// <returns></returns>
        protected virtual Control LoadDialogTemplate()
        {
            DialogContentAttribute contentAttr = AttributeHelper.GetCustomAttribute<DialogContentAttribute>(this.GetType());

            var contentHtml = "";

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

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

                LoadingDialogContentEventArgs e = new LoadingDialogContentEventArgs();

                OnLoadingDialogContent(this, e);

                contentHtml = e.Content;

                if (contentHtml.IsNullOrEmpty())
                    contentHtml = ResourceHelper.LoadStringFromResource(assembly, contentAttr.ResourcePath);

            }

            contentHtml = ReplaceDialogTemplateString(contentHtml);

            return Page.ParseControl(contentHtml);
        }
예제 #6
0
 protected virtual void OnLoadingDialogContent(object sender, LoadingDialogContentEventArgs e)
 {
     if (LoadingDialogContent != null)
         LoadingDialogContent(sender, e);
 }