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


C# Alert类代码示例

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


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

示例1: CreateAlerts

        /// <summary>
        /// Creates the alert.
        /// </summary>
        /// <returns>Object of Alert</returns>
        public static Alert CreateAlerts(string alertType)
        {
            if (string.IsNullOrEmpty(alertType))
            {
                return null;
            }

            Alert alertDetail = new Alert();

            alertDetail.Message = new Message();
            if (alertType.Equals(Folio, StringComparison.OrdinalIgnoreCase))
            {
                CreateFolioAlert(alertDetail);
            }
            else if (alertType.Equals(NotCheckedIn, StringComparison.OrdinalIgnoreCase))
            {
                CreateNotCheckedInAlert(alertDetail);
            }
            else if (alertType.Equals(AuthorizationAlert, StringComparison.OrdinalIgnoreCase))
            {
                CreateAuthorizationAlert(alertDetail);
            }
            else if (alertType.Equals(PortManning, StringComparison.OrdinalIgnoreCase))
            {
                CreatePortManningAlert(alertDetail);
            }

            alertDetail.AddedDateTime = workstation.CurrentDateTime;
            return alertDetail;
        }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:34,代码来源:AlertService.cs

示例2: btnHello_Click

 protected void btnHello_Click(object sender, EventArgs e)
 {
     Alert alert = new Alert();
     alert.Message = "你好 FineUI!";
     alert.Icon = Icon.Book;
     alert.Show();
 }
开发者ID:jinwmmail,项目名称:RDFNew,代码行数:7,代码来源:alert.aspx.cs

示例3: AlertPage

        public AlertPage()
        {
            // Set Page Navigation
            Title = "Alert!";

            alert = new Alert ();

            // Create Screen Elements
            var button = new Button {
                Text = "Send Test Alert",
                TextColor = Color.White,
                BackgroundColor = Color.Red,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                MinimumHeightRequest = 100

            };
            button.Clicked += (sender, e) => { fakeAlert(); };

            // Create Screen Content
            Content = new ContentView {
                Content = new StackLayout {
                    Children = {
                        button
                    }
                }
            };
        }
开发者ID:PaceCreativeLabs,项目名称:PaceSafety-App,代码行数:27,代码来源:AlertPage.cs

示例4: Init

 private void Init()
 {
     account = _userSession.CurrentUser;
     alert = new Alert();
     alert.AccountID = account.AccountID;
     alert.CreateDate = DateTime.Now;
 }
开发者ID:lengocluyen,项目名称:pescode,代码行数:7,代码来源:AlertService.cs

示例5: Select_Record

 protected void Select_Record(object sender, EventArgs e)
 {
     Alert = Alert.Select(Convert.ToInt32(GridView1.SelectedValue));
     Alert_ID_TextBox.Text = Convert.ToString(Alert.Alert_ID);
     Alert_Message_TextBox.Text = Convert.ToString(Alert.Alert_Message);
     Alert_Type_TextBox.Text = Convert.ToString(Alert.Alert_Type);
     //Alert_Desc_RadioBtn.Checked = ?
 }
开发者ID:ManigandanS,项目名称:Disaster-Management-Communication-System,代码行数:8,代码来源:Alert_History.aspx.cs

示例6: INSERT

 protected void INSERT(object sender, EventArgs e)
 {
     //NOOOO Alert.Alert_ID = Convert.ToInt32(Alert_ID_TextBox.Text);
     Alert.Alert_Message = Alert_Message_TextBox.Text;
     Alert.Alert_Type = Alert_Type_TextBox.Text;
     //Alert_Desc_RadioBtn.Checked = ?
     Alert = Alert.Insert(Alert);
 }
开发者ID:ManigandanS,项目名称:Disaster-Management-Communication-System,代码行数:8,代码来源:Alert_History.aspx.cs

示例7: IdentifierWithValidNameIsValid

        public void IdentifierWithValidNameIsValid()
        {
            var alert = new Alert();
            alert.Identifier = "43b080713727";

            var identifierValidator = new IdentifierValidator(alert);
            Assert.True(identifierValidator.IsValid);
        }
开发者ID:darbio,项目名称:cap-net,代码行数:8,代码来源:IdentifierValidatorTests.cs

示例8: Equals

 public override bool Equals(Alert other)
 {
     if (other is MissingIqnAlert)
     {
         return Host.opaque_ref == ((MissingIqnAlert)other).Host.opaque_ref;
     }
     return base.Equals(other);
 }
开发者ID:ReSalles,项目名称:xenadmin,代码行数:8,代码来源:MissingIqnAlert.cs

示例9: AlertWithScopeWellDefinedIsValid

        public void AlertWithScopeWellDefinedIsValid()
        {
            var alert = new Alert();
            alert.Scope = Scope.Public;

            var scopeRequiredValidator = new ScopeRequiredValidator(alert);
            Assert.True(scopeRequiredValidator.IsValid);
        }
开发者ID:darbio,项目名称:cap-net,代码行数:8,代码来源:ScopeRequiredValidatorTests.cs

示例10: Equals

 public override bool Equals(Alert other)
 {
     if (other is DuplicateIqnAlert)
     {
         return Host.opaque_ref == ((DuplicateIqnAlert)other).Host.opaque_ref;
     }
     return base.Equals(other);
 }
开发者ID:ReSalles,项目名称:xenadmin,代码行数:8,代码来源:DuplicateIqnAlert.cs

示例11: AlertWithIdentifierNullIsInvalid

        public void AlertWithIdentifierNullIsInvalid()
        {
            var alert = new Alert();
            alert.Identifier = null;

            var identifierRequiredValidator = new IdentifierRequiredValidator(alert);
            Assert.False(identifierRequiredValidator.IsValid);
        }
开发者ID:darbio,项目名称:cap-net,代码行数:8,代码来源:IdentifierRequiredValidatorTests.cs

示例12: AlertWithStatusWellDefinedIsValid

        public void AlertWithStatusWellDefinedIsValid()
        {
            var alert = new Alert();
            alert.Status = Status.Draft;

            var statusRequiredValidator = new StatusRequiredValidator(alert);
            Assert.True(statusRequiredValidator.IsValid);
        }
开发者ID:darbio,项目名称:cap-net,代码行数:8,代码来源:StatusRequiredValidatorTests.cs

示例13: AlertWithMessageTypeWellDefinedIsValid

        public void AlertWithMessageTypeWellDefinedIsValid()
        {
            var alert = new Alert();
            alert.MessageType = MessageType.Ack;

            var messageTypeRequiredValidator = new MessageTypeRequiredValidator(alert);
            Assert.True(messageTypeRequiredValidator.IsValid);
        }
开发者ID:darbio,项目名称:cap-net,代码行数:8,代码来源:MessageTypeRequiredValidatorTests.cs

示例14: AlertWithEmptyAddressesAndScopePrivateIsInvalid

        public void AlertWithEmptyAddressesAndScopePrivateIsInvalid()
        {
            var alert = new Alert();
            alert.Scope = Scope.Private;

            var addressesRequiredWhenScopeValidator = new AddressesRequiredWhenScopePrivateValidator(alert);
            Assert.False(addressesRequiredWhenScopeValidator.IsValid);
        }
开发者ID:darbio,项目名称:cap-net,代码行数:8,代码来源:AddressesRequiredWhenScopeIsPrivateValidatorTests.cs

示例15: AlertWithIdentifierNotNullIsValid

        public void AlertWithIdentifierNotNullIsValid()
        {
            var alert = new Alert();
            alert.Identifier = "43b080713727";

            var identifierRequiredValidator = new IdentifierRequiredValidator(alert);
            Assert.True(identifierRequiredValidator.IsValid);
        }
开发者ID:darbio,项目名称:cap-net,代码行数:8,代码来源:IdentifierRequiredValidatorTests.cs


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