本文整理匯總了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);
}