Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. public class UIRegistryManager : BaseRegistryManager
  2. {
  3. private static UIRegistryManager instance;
  4.  
  5. private readonly string themeRegistrySubKeyName = "theme";
  6.  
  7. private readonly string shouldOpenDropDownOnHoverRegistrySubKeyName = "shouldOpenDropDrownOnHover";
  8.  
  9. private readonly string titlePromptDialogRegistrySubKeyName = "titlePromptDialog";
  10.  
  11. public UIRegistryManager(string mainRegistrySubKey)
  12. {
  13. this.MainRegistrySubKey = mainRegistrySubKey;
  14. }
  15.  
  16. public static UIRegistryManager Instance
  17. {
  18. get
  19. {
  20. if (instance == null)
  21. {
  22. string mainRegistrySubKey = ConfigurationManager.AppSettings["mainUIRegistrySubKey"];
  23. instance = new UIRegistryManager(mainRegistrySubKey);
  24. }
  25. return instance;
  26. }
  27. }
  28.  
  29. public void WriteCurrentTheme(string theme)
  30. {
  31. this.Write(this.GenerateMergedKey(this.themeRegistrySubKeyName), theme);
  32. }
  33.  
  34. public void WriteTitleTitlePromtDialog(string title)
  35. {
  36. this.Write(this.GenerateMergedKey(this.titlePromptDialogRegistrySubKeyName, this.titleTitlePromptDialogIsCanceledRegistrySubKeyName), title);
  37. }
  38.  
  39. public bool ReadIsCheckboxDialogSubmitted()
  40. {
  41. return this.ReadBool(this.GenerateMergedKey(this.checkboxPromptDialogIsSubmittedRegistrySubKeyName));
  42. }
  43.  
  44. public string ReadTheme()
  45. {
  46. return this.ReadStr(this.GenerateMergedKey(this.themeRegistrySubKeyName));
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement