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
                };
                SignAlgorithmTableView.DataSource = datasource;
                SignAlgorithmTableView.ReloadData();
            }
        }
 public void OnSignatureAlgorithmUpdate(object sender, EventArgs e)
 {
     if (SignAlgorithmTableView.SelectedRows != null && (int)SignAlgorithmTableView.SelectedRows.Count > 0)
     {
         var row = (int)SignAlgorithmTableView.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
             };
             SignAlgorithmTableView.DataSource = datasource;
             SignAlgorithmTableView.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 };
				SignAlgorithmTableView.DataSource = datasource;
				SignAlgorithmTableView.ReloadData ();
			}
		}
		public void OnSignatureAlgorithmUpdate (object sender, EventArgs e)
		{
			if(SignAlgorithmTableView.SelectedRows != null && (int)SignAlgorithmTableView.SelectedRows.Count > 0)
			{
				var row = (int)SignAlgorithmTableView.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 };
					SignAlgorithmTableView.DataSource = datasource;
					SignAlgorithmTableView.ReloadData ();
				}
			}
		}