private void InitializeSloServices() { foreach (NSTableColumn column in SloServicesTableView.TableColumns()) { SloServicesTableView.RemoveColumn(column); } SloServicesTableView.Delegate = new TableDelegate(); var listView = new ServiceEndpointDataSource { Entries = RelyingPartyDto.SingleLogoutServices }; var columnNames = new List <ColumnOptions> { new ColumnOptions { Id = "Name", DisplayName = "Name", DisplayOrder = 1, Width = 80 }, new ColumnOptions { Id = "Endpoint", DisplayName = "Endpoint", DisplayOrder = 4, Width = 150 }, new ColumnOptions { Id = "Binding", DisplayName = "Binding", DisplayOrder = 5, Width = 150 } }; var columns = ListViewHelper.ToNSTableColumns(columnNames); foreach (var column in columns) { SloServicesTableView.AddColumn(column); } SloServicesTableView.DataSource = listView; 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 OnRemoveSloServices(object sender, EventArgs e) { if (RelyingPartyDto.SingleLogoutServices != null && RelyingPartyDto.SingleLogoutServices.Count > 0) { if (SloServicesTableView.SelectedRows != null && SloServicesTableView.SelectedRows.Count > 0) { foreach (var row in SloServicesTableView.SelectedRows) { if (row > 0 && (int)row < RelyingPartyDto.SingleLogoutServices.Count) { RelyingPartyDto.SingleLogoutServices.RemoveAt((int)row); } } 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(); } } }
void ReleaseDesignerOutlets() { if (AssertTableView != null) { AssertTableView.Dispose(); AssertTableView = null; } if (AttributeTableView != null) { AttributeTableView.Dispose(); AttributeTableView = null; } if (BtnAddAssertServices != null) { BtnAddAssertServices.Dispose(); BtnAddAssertServices = null; } if (BtnAddAttributeService != null) { BtnAddAttributeService.Dispose(); BtnAddAttributeService = null; } if (BtnAddSignAlgo != null) { BtnAddSignAlgo.Dispose(); BtnAddSignAlgo = null; } if (BtnApply != null) { BtnApply.Dispose(); BtnApply = null; } if (BtnAddSloService != null) { BtnAddSloService.Dispose(); BtnAddSloService = null; } if (BtnRemoveSloService != null) { BtnRemoveSloService.Dispose(); BtnRemoveSloService = null; } if (BtnBrowseCertificate != null) { BtnBrowseCertificate.Dispose(); BtnBrowseCertificate = null; } if (BtnRemoveAssertService != null) { BtnRemoveAssertService.Dispose(); BtnRemoveAssertService = null; } if (BtnRemoveAttributeService != null) { BtnRemoveAttributeService.Dispose(); BtnRemoveAttributeService = null; } if (BtnRemoveSignAlgo != null) { BtnRemoveSignAlgo.Dispose(); BtnRemoveSignAlgo = null; } if (BtnViewCertificate != null) { BtnViewCertificate.Dispose(); BtnViewCertificate = null; } if (ChkSign != null) { ChkSign.Dispose(); ChkSign = null; } if (SignAlgorithmTableView != null) { SignAlgorithmTableView.Dispose(); SignAlgorithmTableView = null; } if (SloServicesTableView != null) { SloServicesTableView.Dispose(); SloServicesTableView = null; } if (TxtCertificate != null) { TxtCertificate.Dispose(); TxtCertificate = null; } if (TxtRpName != null) { TxtRpName.Dispose(); TxtRpName = null; } if (TxtUrl != null) { TxtUrl.Dispose(); TxtUrl = null; } }