Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Microsoft.Win32;
- namespace Блокнот
- {
- class Textt
- {
- static public string allText;
- static public string findText;
- static public int allCount;
- static public int count = -1;
- static public int[] first = new int[100000];
- static string regKeyName = "Software\\NoCompany\\Блокнот";
- static public void WriteParam()
- {
- RegistryKey rk = null;
- try
- {
- rk = Registry.CurrentUser.CreateSubKey(regKeyName);
- if (rk == null) return;
- rk.SetValue("AllText", allText);
- }
- finally
- {
- if (rk != null) rk.Close();
- }
- }
- static public void ReadParam()
- {
- RegistryKey rk = null;
- try
- {
- rk = Registry.CurrentUser.OpenSubKey(regKeyName);
- if (rk != null)
- {
- allText = (string)rk.GetValue("AllText");
- }
- }
- finally
- {
- if (rk != null) rk.Close();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment