public void OnAddSloServices(object sender, EventArgs e)
        {
            NSApplication.SharedApplication.StopModal();
            var form = new AddNewServiceEndpointController();

            NSApplication.SharedApplication.RunModalForWindow(form.Window);
            if (form.ServiceEndpointDto != null)
            {
                RelyingPartyDto.SingleLogoutServices.Add(form.ServiceEndpointDto);
                var datasource = new ServiceEndpointDataSource {
                    Entries = RelyingPartyDto.SingleLogoutServices
                };
                SloServicesTableView.DataSource = datasource;
                SloServicesTableView.ReloadData();
            }
        }
 public void OnSloUpdate(object sender, EventArgs e)
 {
     if (SloServicesTableView.SelectedRows != null && (int)SloServicesTableView.SelectedRows.Count > 0)
     {
         var row = (int)SloServicesTableView.SelectedRows.FirstIndex;
         var dto = RelyingPartyDto.SingleLogoutServices [row];
         NSApplication.SharedApplication.StopModal();
         var form = new AddNewServiceEndpointController()
         {
             ServiceEndpointDto = dto
         };
         NSApplication.SharedApplication.RunModalForWindow(form.Window);
         if (form.IsUpdated != null)
         {
             RelyingPartyDto.SingleLogoutServices.RemoveAt(row);
             RelyingPartyDto.SingleLogoutServices.Add(form.ServiceEndpointDto);
             var datasource = new ServiceEndpointDataSource {
                 Entries = RelyingPartyDto.SingleLogoutServices
             };
             SloServicesTableView.DataSource = datasource;
             SloServicesTableView.ReloadData();
         }
     }
 }
		public void OnAddSloServices (object sender, EventArgs e)
		{
			NSApplication.SharedApplication.StopModal ();
			var form = new AddNewServiceEndpointController ();
			NSApplication.SharedApplication.RunModalForWindow (form.Window);
			if (form.ServiceEndpointDto != null) {
				RelyingPartyDto.SingleLogoutServices.Add (form.ServiceEndpointDto);
				var datasource = new ServiceEndpointDataSource { Entries = RelyingPartyDto.SingleLogoutServices };
				SloServicesTableView.DataSource = datasource;
				SloServicesTableView.ReloadData ();
			}
		}
		public void OnSloUpdate (object sender, EventArgs e)
		{
			if (SloServicesTableView.SelectedRows != null && (int)SloServicesTableView.SelectedRows.Count > 0) {
				var row = (int)SloServicesTableView.SelectedRows.FirstIndex;
				var dto = RelyingPartyDto.SingleLogoutServices [row];
				NSApplication.SharedApplication.StopModal ();
				var form = new AddNewServiceEndpointController (){ServiceEndpointDto = dto };
				NSApplication.SharedApplication.RunModalForWindow (form.Window);
				if (form.IsUpdated != null) {
					RelyingPartyDto.SingleLogoutServices.RemoveAt (row);
					RelyingPartyDto.SingleLogoutServices.Add (form.ServiceEndpointDto);
					var datasource = new ServiceEndpointDataSource { Entries = RelyingPartyDto.SingleLogoutServices };
					SloServicesTableView.DataSource = datasource;
					SloServicesTableView.ReloadData ();
				}
			}
		}