You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0 KiB

1 year ago
  1. using CDPShared;
  2. using CircleSDK.Model;
  3. using Newtonsoft.Json;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. using System.Windows.Forms;
  13. namespace CircleViewer.Dialogs
  14. {
  15. public partial class CreateCircleDlg : Form
  16. {
  17. private CDPWorker _cdp;
  18. public CreateCircleDlg(CDPWorker cdp)
  19. {
  20. _cdp = cdp;
  21. InitializeComponent();
  22. }
  23. private async void bnCreateCircle_Click(object sender, EventArgs e)
  24. {
  25. var reply = await _cdp.API.CreateCircle(tbCircleName.Text, tbDescription.Text);
  26. if (reply == null)
  27. MessageBox.Show("Failed to create user group.", "Circle for Data Protection");
  28. else
  29. {
  30. MessageBox.Show($"User Group {tbCircleName.Text} created.", "Circle for Data Protection");
  31. Close();
  32. }
  33. }
  34. }
  35. }