本文整理汇总了C#中Alert类的典型用法代码示例。如果您正苦于以下问题:C# Alert类的具体用法?C# Alert怎么用?C# Alert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Alert类属于命名空间,在下文中一共展示了Alert类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: btnHello2_Click
protected void btnHello2_Click(object sender, EventArgs e)
{
Alert alert = new Alert();
alert.Message = "你好 FineUI!";
alert.IconUrl = "~/images/success.png";
alert.Target = Target.Top;
alert.Show();
}
开发者ID:jinwmmail,项目名称:RDFNew,代码行数:8,代码来源:alert.aspx.cs
示例17: AlertWithoutSentIsInvalid
public void AlertWithoutSentIsInvalid()
{
var alert = new Alert();
alert.Sent = null;
var sentRequiredValidator = new SentRequiredValidator(alert);
Assert.False(sentRequiredValidator.IsValid);
}
开发者ID:darbio,项目名称:cap-net,代码行数:8,代码来源:SentRequiredValidatorTests.cs
示例18: AlertDetailForm
public AlertDetailForm(Alert alert)
{
InitializeComponent();
DetailDataGrid.DataSource = alert.table;
DetailDataGrid.AutoResizeColumns();
DetailTextBox.Text = alert.rule.ToString();
alertRef = alert;
}
开发者ID:RichiePhoebix,项目名称:SSASActivityMonitor,代码行数:8,代码来源:AlertDetailForm.cs
示例19: SenderWithNullNameIsInvalid
public void SenderWithNullNameIsInvalid()
{
var alert = new Alert();
alert.Sender = null;
var senderValidator = new SenderRequiredValidator(alert);
Assert.False(senderValidator.IsValid);
Assert.Equal(typeof(SenderRequiredError), senderValidator.Errors.ElementAt(0).GetType());
}
开发者ID:darbio,项目名称:cap-net,代码行数:9,代码来源:SenderRequiredValidatorTests.cs
示例20: GenerateAlert
public static Alert GenerateAlert(NotificationType Type, string Message)
{
Alert Alert = new Alert();
Alert.Type = GetNotificationType(Type);
Alert.Message = Message;
return Alert;
}
开发者ID:marquesdasilva,项目名称:UserManager_v02,代码行数:9,代码来源:AlertsHelper.cs
注:本文中的Alert类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论