Guest User

Untitled

a guest
Sep 25th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.Win32;
  7. namespace Блокнот
  8. {
  9. class Textt
  10. {
  11. static public string allText;
  12. static public string findText;
  13. static public int allCount;
  14. static public int count = -1;
  15. static public int[] first = new int[100000];
  16. static string regKeyName = "Software\\NoCompany\\Блокнот";
  17. static public void WriteParam()
  18. {
  19. RegistryKey rk = null;
  20. try
  21. {
  22. rk = Registry.CurrentUser.CreateSubKey(regKeyName);
  23. if (rk == null) return;
  24. rk.SetValue("AllText", allText);
  25. }
  26. finally
  27. {
  28. if (rk != null) rk.Close();
  29. }
  30. }
  31. static public void ReadParam()
  32. {
  33. RegistryKey rk = null;
  34. try
  35. {
  36. rk = Registry.CurrentUser.OpenSubKey(regKeyName);
  37. if (rk != null)
  38. {
  39. allText = (string)rk.GetValue("AllText");
  40. }
  41. }
  42. finally
  43. {
  44. if (rk != null) rk.Close();
  45. }
  46. }
  47. }
  48. }
Add Comment
Please, Sign In to add comment