예제 #1
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// GetModuleMessageControl gets an existing Message Control and sets its properties
        /// </summary>
        /// <param name="heading">The Message Heading</param>
        /// <param name="message">The Message Text</param>
        /// <param name="iconImage">The Message Icon</param>
        /// <param name="moduleMessageType">The type of message</param>
        /// <history>
        /// 	[cnurse]	12/04/2007  documented
        /// </history>
        /// -----------------------------------------------------------------------------
        public static ModuleMessage GetModuleMessageControl(string heading, string message, ModuleMessage.ModuleMessageType moduleMessageType, string iconImage)
        {

            //Use this to get a module message control
            //with a standard DotNetNuke icon
            var s = new Skin();
            var moduleMessage = (ModuleMessage)s.LoadControl("~/admin/skins/ModuleMessage.ascx");
            moduleMessage.Heading = heading;
            moduleMessage.Text = message;
            moduleMessage.IconImage = iconImage;
            moduleMessage.IconType = moduleMessageType;
            return moduleMessage;
        }
예제 #2
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// AddPageMessage adds a Page Message control to the Skin
 /// </summary>
 /// <param name="heading">The Message Heading</param>
 /// <param name="iconSrc">The Icon to diplay</param>
 /// <param name="message">The Message Text</param>
 /// <param name="skin">The skin</param>
 /// <history>
 /// 	[cnurse]	12/04/2007  documented
 /// </history>
 /// -----------------------------------------------------------------------------
 public static void AddPageMessage(Skin skin, string heading, string message, string iconSrc)
 {
     AddPageMessage(skin, heading, message, ModuleMessage.ModuleMessageType.GreenSuccess, iconSrc);
 }
예제 #3
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// AddPageMessage adds a Page Message control to the Skin
 /// </summary>
 /// <param name="heading">The Message Heading</param>
 /// <param name="message">The Message Text</param>
 /// <param name="skin">The skin</param>
 /// <param name="moduleMessageType">The type of the message</param>
 /// <history>
 /// 	[cnurse]	12/04/2007  documented
 /// </history>
 /// -----------------------------------------------------------------------------
 public static void AddPageMessage(Skin skin, string heading, string message, ModuleMessage.ModuleMessageType moduleMessageType)
 {
     AddPageMessage(skin, heading, message, moduleMessageType, Null.NullString);
 }
예제 #4
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// AddPageMessage adds a Page Message control to the Skin
 /// </summary>
 /// <param name="heading">The Message Heading</param>
 /// <param name="message">The Message Text</param>
 /// <param name="skin">The skin</param>
 /// <param name="moduleMessageType">The type of the message</param>
 /// <history>
 ///     [cnurse]	12/04/2007  documented
 /// </history>
 /// -----------------------------------------------------------------------------
 public static void AddPageMessage(Skin skin, string heading, string message, ModuleMessage.ModuleMessageType moduleMessageType)
 {
     AddPageMessage(skin, heading, message, moduleMessageType, Null.NullString);
 }
예제 #5
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// AddPageMessage adds a Page Message control to the Skin
 /// </summary>
 /// <param name="heading">The Message Heading</param>
 /// <param name="iconSrc">The Icon to diplay</param>
 /// <param name="message">The Message Text</param>
 /// <param name="skin">The skin</param>
 /// <history>
 ///     [cnurse]	12/04/2007  documented
 /// </history>
 /// -----------------------------------------------------------------------------
 public static void AddPageMessage(Skin skin, string heading, string message, string iconSrc)
 {
     AddPageMessage(skin, heading, message, ModuleMessage.ModuleMessageType.GreenSuccess, iconSrc);
 }
예제 #6
0
        public static ModuleMessage GetModuleMessageControl( string Heading, string Message, string IconImage )
        {
            //Use this to get a module message control
            //with a custom image for an icon
            ModuleMessage objModuleMessage;
            Skin s = new Skin();
            objModuleMessage = (ModuleMessage)s.LoadControl( "~/admin/skins/ModuleMessage.ascx" );
            objModuleMessage.Heading = Heading;
            objModuleMessage.Text = Message;

            objModuleMessage.IconImage = IconImage;
            return objModuleMessage;
        }
예제 #7
0
 public static void AddPageMessage( Skin objSkin, string Heading, string Message, string IconSrc )
 {
     if (!String.IsNullOrEmpty(Message))
     {
         Control ContentPane = objSkin.FindControl(Globals.glbDefaultPane);
         if (ContentPane != null)
         {
             ModuleMessage objModuleMessage;
             objModuleMessage = GetModuleMessageControl(Heading, Message, IconSrc);
             ContentPane.Controls.AddAt(0, objModuleMessage);
         }
     }
 }
예제 #8
0
 public static ModuleMessage GetModuleMessageControl( string Heading, string Message, ModuleMessageType objModuleMessageType )
 {
     //Use this to get a module message control with a standard DotNetNuke icon
     Skin skin = new Skin();
     ModuleMessage moduleMessage = ( (ModuleMessage)skin.LoadControl( "~/Admin/Skins/ModuleMessage.ascx" ) );
     moduleMessage.Heading = Heading;
     moduleMessage.Text = Message;
     moduleMessage.IconType = objModuleMessageType;
     return moduleMessage;
 }