private void btnCheckAlerts_Click(object sender, EventArgs e) { try { MyAlertsServiceClient myAlertService = new MyAlertsServiceClient("AlertsCardSpace"); DataContracts.Alert[] myAlerts = myAlertService.GetMyAlerts(); lbMyAlerts.Items.Clear(); webAlert.DocumentText = ""; foreach (DataContracts.Alert alert in myAlerts) { lbMyAlerts.Items.Add(alert); lbMyAlerts.DisplayMember = "Title"; } } catch (UserCancellationException uce) { System.Windows.Forms.MessageBox.Show("User Cancelled Out of the CardSpace UI."); } catch (UntrustedRecipientException ure) { } catch (ServiceNotStartedException snse) { } catch (CardSpaceException cse) { } catch (Exception e1) { } }
private void MessageCenter_Load(object sender, EventArgs e) { AlertServiceClient alertService = new AlertServiceClient(); DataContracts.Alert[] systemAlerts = alertService.GetAlerts(); foreach (DataContracts.Alert alert in systemAlerts) { lbAlerts.Items.Add(alert); lbAlerts.DisplayMember = "Title"; } try { MyAlertsServiceClient myAlertService = new MyAlertsServiceClient("AlertsCardSpace"); DataContracts.Alert[] myAlerts = myAlertService.GetMyAlerts(); foreach (DataContracts.Alert alert in myAlerts) { lbMyAlerts.Items.Add(alert); lbMyAlerts.DisplayMember = "Title"; } } catch (UserCancellationException uce) { System.Windows.Forms.MessageBox.Show("User Cancelled Out of the CardSpace UI."); } catch (UntrustedRecipientException ure) { } catch (ServiceNotStartedException snse) { } catch (CardSpaceException cse) { } catch (Exception e1) { } }
private void MessageCenter_Load(object sender, EventArgs e) { AlertServiceClient alertService = new AlertServiceClient(); DataContracts.Alert[] systemAlerts = alertService.GetAlerts(); foreach (DataContracts.Alert alert in systemAlerts) { lbAlerts.Items.Add(alert); lbAlerts.DisplayMember = "Title"; } MyAlertsServiceClient myAlertService = new MyAlertsServiceClient(); DataContracts.Alert[] myAlerts = myAlertService.GetMyAlerts(); foreach (DataContracts.Alert alert in myAlerts) { lbMyAlerts.Items.Add(alert); lbMyAlerts.DisplayMember = "Title"; } }