public static Settings LoadSettings()
        {
            string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MidiPianoRico");
            if (!Directory.Exists(path))
                Directory.CreateDirectory(path);
            path += "/settings.txt";

            if (File.Exists(path))
            {
                List<string> lines = new List<string>();
                using (StreamReader streamReader = new StreamReader(path))
                {
                    string line = "";
                    while ((line = streamReader.ReadLine()) != null)
                        lines.Add(line);
                }
                return new Settings(lines);
            }
            else
            {
                Settings settings = new Settings();
                SaveSettings(settings);
                return settings;
            }
        }
 public Home()
 {
     Text = "MidiPianoRico";
     hUIKeyboardHandler = new HUIKeyboardHandler(this, 1);
     settings = FileHandler.LoadSettings();
     SetSize();
     AddControls();
 }
        public static void SaveSettings(Settings settings)
        {
            string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MidiPianoRico/settings.txt");
            using (StreamWriter streamWriter = new StreamWriter(path))
            {
                foreach (string line in settings.ToLines())
                {
                    streamWriter.WriteLine(line);
                }
            }

        }