private void InitializeSignatureAlgorithm() { //_signatureAlgorithmView = new NSTableView (); foreach (NSTableColumn column in SignAlgoTableView.TableColumns()) { SignAlgoTableView.RemoveColumn(column); } SignAlgoTableView.Delegate = new TableDelegate(); //this.LstSignatureAlgorithm.AddSubview (_signatureAlgorithmView); var listView = new SignatureAlgorithmDataSource { Entries = RelyingPartyDto.SignatureAlgorithms }; var columnNames = new List <ColumnOptions> { new ColumnOptions { Id = "MaxKeySize", DisplayName = "Max Key Size", DisplayOrder = 1, Width = 80 }, new ColumnOptions { Id = "MinKeySize", DisplayName = "Min Key Size", DisplayOrder = 2, Width = 80 }, new ColumnOptions { Id = "Priority", DisplayName = "Priority", DisplayOrder = 3, Width = 80 } }; var columns = ListViewHelper.ToNSTableColumns(columnNames); foreach (var column in columns) { SignAlgoTableView.AddColumn(column); } SignAlgoTableView.DataSource = listView; SignAlgoTableView.ReloadData(); }
public void OnRemoveSignatureAlgorithm(object sender, EventArgs e) { if (SignAlgoTableView.SelectedRows != null && SignAlgoTableView.SelectedRows.Count > 0) { foreach (var row in SignAlgoTableView.SelectedRows) { RelyingPartyDto.SignatureAlgorithms.RemoveAt((int)row); } var datasource = new SignatureAlgorithmDataSource { Entries = RelyingPartyDto.SignatureAlgorithms }; SignAlgoTableView.DataSource = datasource; SignAlgoTableView.ReloadData(); } }
public void OnAddSignatureAlgorithm(object sender, EventArgs e) { NSApplication.SharedApplication.StopModal(); var form = new AddNewSignatureAlgorithmController(); NSApplication.SharedApplication.RunModalForWindow(form.Window); if (form.SignatureAlgorithmDto != null) { RelyingPartyDto.SignatureAlgorithms.Add(form.SignatureAlgorithmDto); var datasource = new SignatureAlgorithmDataSource { Entries = RelyingPartyDto.SignatureAlgorithms }; SignAlgoTableView.DataSource = datasource; SignAlgoTableView.ReloadData(); } }
public void OnSignatureAlgorithmUpdate(object sender, EventArgs e) { if (SignAlgoTableView.SelectedRows != null && (int)SignAlgoTableView.SelectedRows.Count > -1) { var row = (int)SignAlgoTableView.SelectedRows.FirstIndex; var dto = RelyingPartyDto.SignatureAlgorithms [row]; NSApplication.SharedApplication.StopModal(); var form = new AddNewSignatureAlgorithmController() { SignatureAlgorithmDto = dto }; NSApplication.SharedApplication.RunModalForWindow(form.Window); if (form.IsUpdated != null) { RelyingPartyDto.SignatureAlgorithms.RemoveAt(row); RelyingPartyDto.SignatureAlgorithms.Add(form.SignatureAlgorithmDto); var datasource = new SignatureAlgorithmDataSource { Entries = RelyingPartyDto.SignatureAlgorithms }; SignAlgoTableView.DataSource = datasource; SignAlgoTableView.ReloadData(); } } }
void ReleaseDesignerOutlets() { if (BtnAddAssertServices != null) { BtnAddAssertServices.Dispose(); BtnAddAssertServices = null; } if (BtnAddAttributeServices != null) { BtnAddAttributeServices.Dispose(); BtnAddAttributeServices = null; } if (BtnAddSignatureAlgorithm != null) { BtnAddSignatureAlgorithm.Dispose(); BtnAddSignatureAlgorithm = null; } if (BtnAddSlo != null) { BtnAddSlo.Dispose(); BtnAddSlo = null; } if (AssertionTableView != null) { AssertionTableView.Dispose(); AssertionTableView = null; } if (AttributeTableView != null) { AttributeTableView.Dispose(); AttributeTableView = null; } if (BtnBrowseCertificate != null) { BtnBrowseCertificate.Dispose(); BtnBrowseCertificate = null; } if (SloTableView != null) { SloTableView.Dispose(); SloTableView = null; } if (BtnClose != null) { BtnClose.Dispose(); BtnClose = null; } if (BtnRemoveAssertServices != null) { BtnRemoveAssertServices.Dispose(); BtnRemoveAssertServices = null; } if (BtnRemoveAttributeServices != null) { BtnRemoveAttributeServices.Dispose(); BtnRemoveAttributeServices = null; } if (BtnRemoveSignatureAlgorithm != null) { BtnRemoveSignatureAlgorithm.Dispose(); BtnRemoveSignatureAlgorithm = null; } if (BtnRemoveSlo != null) { BtnRemoveSlo.Dispose(); BtnRemoveSlo = null; } if (BtnSave != null) { BtnSave.Dispose(); BtnSave = null; } if (CbSignAuthRequest != null) { CbSignAuthRequest.Dispose(); CbSignAuthRequest = null; } if (SignAlgoTableView != null) { SignAlgoTableView.Dispose(); SignAlgoTableView = null; } if (TxtCertificate != null) { TxtCertificate.Dispose(); TxtCertificate = null; } if (TxtName != null) { TxtName.Dispose(); TxtName = null; } if (TxtUrl != null) { TxtUrl.Dispose(); TxtUrl = null; } }