本文整理汇总了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;
}
示例2: btnHello_Click
protected void btnHello_Click(object sender, EventArgs e)
{
Alert alert = new Alert();
alert.Message = "你好 FineUI!";
alert.Icon = Icon.Book;
alert.Show();
}
示例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
}
}
};
}
示例4: Init
private void Init()
{
account = _userSession.CurrentUser;
alert = new Alert();
alert.AccountID = account.AccountID;
alert.CreateDate = DateTime.Now;
}
示例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 = ?
}
示例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);
}
示例7: IdentifierWithValidNameIsValid
public void IdentifierWithValidNameIsValid()
{
var alert = new Alert();
alert.Identifier = "43b080713727";
var identifierValidator = new IdentifierValidator(alert);
Assert.True(identifierValidator.IsValid);
}
示例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);
}
示例9: AlertWithScopeWellDefinedIsValid
public void AlertWithScopeWellDefinedIsValid()
{
var alert = new Alert();
alert.Scope = Scope.Public;
var scopeRequiredValidator = new ScopeRequiredValidator(alert);
Assert.True(scopeRequiredValidator.IsValid);
}
示例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);
}
示例11: AlertWithIdentifierNullIsInvalid
public void AlertWithIdentifierNullIsInvalid()
{
var alert = new Alert();
alert.Identifier = null;
var identifierRequiredValidator = new IdentifierRequiredValidator(alert);
Assert.False(identifierRequiredValidator.IsValid);
}
示例12: AlertWithStatusWellDefinedIsValid
public void AlertWithStatusWellDefinedIsValid()
{
var alert = new Alert();
alert.Status = Status.Draft;
var statusRequiredValidator = new StatusRequiredValidator(alert);
Assert.True(statusRequiredValidator.IsValid);
}
示例13: AlertWithMessageTypeWellDefinedIsValid
public void AlertWithMessageTypeWellDefinedIsValid()
{
var alert = new Alert();
alert.MessageType = MessageType.Ack;
var messageTypeRequiredValidator = new MessageTypeRequiredValidator(alert);
Assert.True(messageTypeRequiredValidator.IsValid);
}
示例14: AlertWithEmptyAddressesAndScopePrivateIsInvalid
public void AlertWithEmptyAddressesAndScopePrivateIsInvalid()
{
var alert = new Alert();
alert.Scope = Scope.Private;
var addressesRequiredWhenScopeValidator = new AddressesRequiredWhenScopePrivateValidator(alert);
Assert.False(addressesRequiredWhenScopeValidator.IsValid);
}
示例15: AlertWithIdentifierNotNullIsValid
public void AlertWithIdentifierNotNullIsValid()
{
var alert = new Alert();
alert.Identifier = "43b080713727";
var identifierRequiredValidator = new IdentifierRequiredValidator(alert);
Assert.True(identifierRequiredValidator.IsValid);
}