StringArray.cs 1012 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using OpenCvSharp;
  2. using PaintDotNet.Base;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Windows.Forms;
  6. namespace PaintDotNet.Data.Param
  7. {
  8. public class StringArray : Args
  9. {
  10. public void numberParam_ValueChanged(object sender, EventArgs e)
  11. {
  12. if(sender is RadioButton)
  13. {
  14. if (((RadioButton)sender).Checked)
  15. this.value = (Enum)(((RadioButton)sender).Tag);
  16. }
  17. else if (sender is ComboBox)
  18. {
  19. this.value = (Enum)(((ComboBox)sender).SelectedValue);
  20. }
  21. }
  22. public StringArray(string key, string name, Dictionary<Enum, Object> keyValuePairs, Enum menum)
  23. {
  24. this.Key = key;
  25. this.Name = name;
  26. this.initialValue = keyValuePairs;
  27. this.Value = menum;
  28. this.Type = Dtryt.Array;
  29. }
  30. public StringArray()
  31. {
  32. this.Type = Dtryt.Array;
  33. }
  34. }
  35. }