示例#1
0
 void ApplyToViewEmailTemplate()
 {
     if (View.FindItem("Content") != null)
     {
         _HtmlEditor = View.FindItem("Content") as ASPxHtmlPropertyEditor;
         if (_HtmlEditor != null)
         {
             _HtmlEditor.ControlCreated += htmlEditor_ControlCreated;
         }
     }
 }
示例#2
0
        void htmlEditor_ControlCreated(object sender, EventArgs e)
        {
            ASPxHtmlPropertyEditor htmlEditor = sender as ASPxHtmlPropertyEditor;

            if (htmlEditor.Editor != null)
            {
                if (htmlEditor.Editor.Settings != null)
                {
                    htmlEditor.Editor.Settings.AllowHtmlView = false;
                    htmlEditor.Editor.Settings.AllowPreview  = false;
                }
            }
        }
示例#3
0
 void ApplyToViewHotelInfomation()
 {
     if (View.FindItem("Userful") != null)
     {
         _HtmlEditor = View.FindItem("Userful") as ASPxHtmlPropertyEditor;
         if (_HtmlEditor != null)
         {
             _HtmlEditor.ControlCreated += htmlEditor_ControlCreated;
         }
     }
     if (View.FindItem("BookingPolicy") != null)
     {
         _HtmlEditor = View.FindItem("BookingPolicy") as ASPxHtmlPropertyEditor;
         if (_HtmlEditor != null)
         {
             _HtmlEditor.ControlCreated += htmlEditor_ControlCreated;
         }
     }
     if (View.FindItem("CheckInPolicy") != null)
     {
         _HtmlEditor = View.FindItem("CheckInPolicy") as ASPxHtmlPropertyEditor;
         if (_HtmlEditor != null)
         {
             _HtmlEditor.ControlCreated += htmlEditor_ControlCreated;
         }
     }
     if (View.FindItem("CheckOutPolicy") != null)
     {
         _HtmlEditor = View.FindItem("CheckOutPolicy") as ASPxHtmlPropertyEditor;
         if (_HtmlEditor != null)
         {
             _HtmlEditor.ControlCreated += htmlEditor_ControlCreated;
         }
     }
     if (View.FindItem("CancelPolicy") != null)
     {
         _HtmlEditor = View.FindItem("CancelPolicy") as ASPxHtmlPropertyEditor;
         if (_HtmlEditor != null)
         {
             _HtmlEditor.ControlCreated += htmlEditor_ControlCreated;
         }
     }
     if (View.FindItem("ChildAndExtraBedPolicy") != null)
     {
         _HtmlEditor = View.FindItem("ChildAndExtraBedPolicy") as ASPxHtmlPropertyEditor;
         if (_HtmlEditor != null)
         {
             _HtmlEditor.ControlCreated += htmlEditor_ControlCreated;
         }
     }
 }
示例#4
0
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            // Access and customize the target View control.
            _HtmlEditor = null;

            if (View.Id == "HotelInfomation_DetailView")
            {
                ApplyToViewHotelInfomation();
            }
            else if (View.Id == "EmailTemplate_DetailView")
            {
                ApplyToViewEmailTemplate();
            }
        }