private void buttonAddNewShortcut_Click(object sender, EventArgs e) { //local //String textFile = "C:\\csharp\\3doubleComma.txt"; string delimitter = ",,,"; string shortkey = textBox2.Text; string textToCompress = textBox3.Text; string completeLine = shortkey + delimitter + textToCompress; using (System.IO.StreamWriter file = new System.IO.StreamWriter(FileNameToPath, true)) { //file.WriteLine(completeLine); file.WriteLine("\r\n" + completeLine); } KeyHandler.ReadSettings2(); }
private void buttonSaveList_Click(object sender, EventArgs e) { string[] lines = textBoxCurrentHotstringList.Text.Split('\n'); File.WriteAllLines(FileNameToPath, lines); KeyHandler.ReadSettings2(); }