当前位置: 首页>>代码示例>>C#>>正文


C# AlertType类代码示例

本文整理汇总了C#中AlertType的典型用法代码示例。如果您正苦于以下问题:C# AlertType类的具体用法?C# AlertType怎么用?C# AlertType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AlertType类属于命名空间,在下文中一共展示了AlertType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SettingManager

 private SettingManager() {
     this.alertType = AlertType.LatestOnly;
     this.alertAfterDate = DateTime.MinValue;
     this.svnUserName = "";
     this.svnPassword = "";
     this.listOfTrackingTarget = new List<TrackingTargetEntity>();
 }
开发者ID:kobluewater,项目名称:SVNAlert,代码行数:7,代码来源:SettingManager.cs

示例2: AlertMsg

 public AlertMsg(AlertType alertType, string title, string body)
     : base(typeof(AlertViewModel))
 {
     AlertType = alertType;
     Title = title;
     Body = body;
 }
开发者ID:flq,项目名称:Thawmadoce,代码行数:7,代码来源:Alerting.cs

示例3: Alert

 public Alert(AlertType type, AlertDirection direction, int? trigger, string queue)
 {
     Type = type;
     Direction = direction;
     Trigger = trigger;
     Queue = queue;
 }
开发者ID:sunloverz,项目名称:iron_dotnet,代码行数:7,代码来源:Alert.cs

示例4: Set

        public static SetAlert Set(string message, string strongMessage, AlertType typeOfAlert)
        {
            SetAlert alert = new SetAlert();

            alert.Message = message;
            alert.StrongMessage = strongMessage;

            switch (typeOfAlert)
            {
                case AlertType.Success:
                    alert.TypeOfAlert = "alert-success";
                    break;

                case AlertType.Danger:
                    alert.TypeOfAlert = "alert-danger";
                    break;

                case AlertType.Info:
                    alert.TypeOfAlert = "alert-info";
                    break;

                case AlertType.Warning:
                    alert.TypeOfAlert = "alert-warning";
                    break;
            }

            return alert;
        }
开发者ID:mknizewski,项目名称:SAP,代码行数:28,代码来源:SetAlert.cs

示例5: ShowAlert

        public void ShowAlert(AlertType type, string message)
        {
            HtmlGenericControl h4AlertHeading = (HtmlGenericControl)(this.Master).FindControl("h4AlertHeading");
            Label lblErrorMessage = (Label)(this.Master).FindControl("lblErrorMessage");
            Panel pnlAlert = (Panel)(this.Master).FindControl("pnlAlert");

            h4AlertHeading.Visible = false;
            lblErrorMessage.Text = message;
            switch (type)
            {
                case AlertType.Error:
                    pnlAlert.CssClass = BootstrapStyleConstant.AlertError;
                    break;
                case AlertType.Information:
                    pnlAlert.CssClass = BootstrapStyleConstant.AlertInfo;
                    break;
                case AlertType.Success:
                    pnlAlert.CssClass = BootstrapStyleConstant.AlertSuccess;
                    break;
                default:
                    pnlAlert.CssClass = BootstrapStyleConstant.AlertWarning;
                    break;
            }

            pnlAlert.Visible = true;
        }
开发者ID:Artnman,项目名称:Cloud,代码行数:26,代码来源:BasePageBackEnd.cs

示例6: CreateSingle

        /// <summary>
        /// Creates a list of AlertModels with a single item.
        /// </summary>
        /// <param name="type">The alert type.</param>
        /// <param name="message">The message.</param>
        /// <returns>A single item list of an AlertModel.</returns>
        public static List<AlertModel> CreateSingle(AlertType type, string message)
        {
            Guard.NotNull(() => type);
            Guard.NotNullOrEmpty(() => message);

            return new List<AlertModel> { new AlertModel(type, message) };
        }
开发者ID:mainthread-technology,项目名称:grand-maps-for-muzei-service,代码行数:13,代码来源:AlertModel.cs

示例7: Add

 public void Add(String message, AlertType alerttype)
 {
     if (frm != null)
     {
         frm.AddAlert(message, alerttype, scriptname);
     }                
 }
开发者ID:johnjohnsp1,项目名称:PoshSecFramework,代码行数:7,代码来源:psmethods.cs

示例8: GetAlerts

        public static MvcHtmlString GetAlerts(this HtmlHelper helper, AlertType alertType, AlertLocation alertLocation)
        {
            var alertData = helper.ViewContext.TempData.InitializeAlertData();

            List<string> messages = alertData[alertLocation][alertType];
            if (messages.Count > 0)
            {
                var outerBuilder = new TagBuilder("div");
                outerBuilder.AddCssClass("container-fluid");
                foreach (var message in messages)
                {
                    var builder = new TagBuilder("div");
                    builder.AddCssClass("alert");
                    builder.AddCssClass("in");
                    builder.AddCssClass("fade");
                    builder.AddCssClass(alertType.GetDescription());

                    builder.SetInnerText(message);

                    var closeButton = new TagBuilder("a");
                    closeButton.AddCssClass("close");
                    closeButton.MergeAttribute("data-dismiss", "alert");
                    closeButton.MergeAttribute("href", "#");
                    closeButton.InnerHtml += "&times;";

                    builder.InnerHtml += closeButton.ToString(TagRenderMode.Normal);

                    outerBuilder.InnerHtml += builder.ToString(TagRenderMode.Normal);
                }
                return outerBuilder.ToString(TagRenderMode.Normal).ToMvcHtmlString();
            }

            return string.Empty.ToMvcHtmlString();
        }
开发者ID:vcardins,项目名称:CoolApp,代码行数:34,代码来源:HtmlExtensions.Alerts.cs

示例9: AlertModel

        /// <summary>
        /// Initializes a new instance of the <see cref="AlertModel" /> class.
        /// </summary>
        /// <param name="type">The type of the alert.</param>
        /// <param name="message">The message.</param>
        public AlertModel(AlertType type, string message)
        {
            Guard.NotNull(() => type);
            Guard.NotNullOrEmpty(() => message);

            this.Type = type;
            this.Message = message;
        }
开发者ID:mainthread-technology,项目名称:grand-maps-for-muzei-service,代码行数:13,代码来源:AlertModel.cs

示例10: Alert

 /// <summary>
 /// Create an alert box of the specified type
 /// </summary>
 /// <param name="html">The current HtmlHelper instance</param>
 /// <param name="message">The message to show</param>
 /// <param name="alertType">The type of alert to show.</param>
 public static MvcHtmlString Alert(this HtmlHelper html, string message, AlertType alertType)
 {
     var div = new TagBuilder("div");
     div.AddCssClass("alert-box");
     div.AddCssClass(alertType.GetStringValue());
     div.InnerHtml = message;
     div.InnerHtml += "<a href=\"#\" class=\"close\">&times;</a>";
     return new MvcHtmlString(div.ToString(TagRenderMode.Normal));
 }
开发者ID:danielvanhouten,项目名称:MVC-3-Extensions-for-Zurb-Foundation,代码行数:15,代码来源:AlertBoxExtensions.cs

示例11: AddMessage

        private static void AddMessage(TempDataDictionary tempData, AlertType type, string message,
            AlertLocation location)
        {
            var alertData = tempData.InitializeAlertData();

            alertData[location][type].Add(message);

            tempData["AlertData"] = alertData;
        }
开发者ID:havearun,项目名称:ScaffR-Generated,代码行数:9,代码来源:TempDataExtensions.Alerts.cs

示例12: AddAlert

        /// <summary>
        ///     Adds an alert of the specified type with the specified message
        /// </summary>
        /// <param name="controller">
        ///     The <see cref="Controller"/> to use to add the alert
        /// </param>
        /// <param name="type">
        ///     The <see cref="AlertType"/> for the alert
        /// </param>
        /// <param name="message">
        ///     The message for the alert
        /// </param>
        public static void AddAlert(
            this Controller controller, AlertType type, string message)
        {
            List<AlertMessage> alerts = controller.TempData[ALERT_MESSAGE_KEY] as List<AlertMessage> ??
                new List<AlertMessage>();

            alerts.Add(new AlertMessage() { Type = type, Message = message});
            controller.TempData["AlertMessages"] = alerts;
        }
开发者ID:kylezimmerman,项目名称:prog3050,代码行数:21,代码来源:AlertHelper.cs

示例13: MessageBoxForm

			public MessageBoxForm (IWin32Window owner, string text, string caption,
					       MessageBoxButtons buttons, MessageBoxIcon icon,
					       bool displayHelpButton)
			{
				show_help = displayHelpButton;

				switch (icon) {
					case MessageBoxIcon.None: {
						icon_image = null;
						alert_type = AlertType.Default;
						break;
					}

					case MessageBoxIcon.Error: {		// Same as MessageBoxIcon.Hand and MessageBoxIcon.Stop
						icon_image = SystemIcons.Error;
						alert_type = AlertType.Error;
						break;
					}

					case MessageBoxIcon.Question: {
 						icon_image = SystemIcons.Question;
						alert_type = AlertType.Question;
						break;
					}

					case MessageBoxIcon.Asterisk: {		// Same as MessageBoxIcon.Information
						icon_image = SystemIcons.Information;
						alert_type = AlertType.Information;
						break;
					}

					case MessageBoxIcon.Warning: {		// Same as MessageBoxIcon.Exclamation:
						icon_image = SystemIcons.Warning;
						alert_type = AlertType.Warning;
						break;
					}
				}

				msgbox_text = text;
				msgbox_buttons = buttons;
				msgbox_default = MessageBoxDefaultButton.Button1;

				if (owner != null) {
					Owner = Control.FromHandle(owner.Handle).FindForm();
				} else {
					if (Application.MWFThread.Current.Context != null) {
						Owner = Application.MWFThread.Current.Context.MainForm;
					}
				}
				this.Text = caption;
				this.ControlBox = true;
				this.MinimizeBox = false;
				this.MaximizeBox = false;
				this.ShowInTaskbar = (Owner == null);
				this.FormBorderStyle = FormBorderStyle.FixedDialog;
			}
开发者ID:ngraziano,项目名称:mono,代码行数:56,代码来源:MessageBox.cs

示例14: Alarm

 public Alarm(string name, AlertType alertType, bool playSound, bool focusClient, bool pauseBot, bool disconnect)
 {
     this._name = name;
     this._alertType = alertType;
     this._playSound = playSound;
     this._focusClient = focusClient;
     this._pauseBot = pauseBot;
     this._disconnect = disconnect;
     this._buttonVisibility = Visibility.Hidden;
 }
开发者ID:PimentelM,项目名称:extibiabot,代码行数:10,代码来源:Alarm.cs

示例15: HighlightModel

        /// <summary>
        /// Initializes a new instance of the <see cref="HighlightModel" /> class.
        /// </summary>
        /// <param name="style">The row style.</param>
        /// <param name="partition">The items partition.</param>
        /// <param name="row">The items row key.</param>
        public HighlightModel(AlertType style, string partition, string row)
        {
            Guard.NotNull(() => style);
            Guard.NotNullOrEmpty(() => row);
            Guard.NotNullOrEmpty(() => partition);

            this.Style = style;
            this.Partition = partition;
            this.Row = row;
        }
开发者ID:mainthread-technology,项目名称:grand-maps-for-muzei-service,代码行数:16,代码来源:HighlightModel.cs


注:本文中的AlertType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。