/// ----------------------------------------------------------------------------- /// <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; }
/// ----------------------------------------------------------------------------- /// <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); }
/// ----------------------------------------------------------------------------- /// <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); }
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; }
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); } } }
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; }