Esempio n. 1
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            string       notes   = txtNotes.Text;
            NotesStorage storage = new NotesStorage();

            storage.SaveNote(notes, @"C:\Users\WindowsPC\Documents\notes.txt");
            lstAllNotes.Items.Add(notes);
            txtNotes.Text = "";
        }
Esempio n. 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            NotesStorage  notesStorage = new NotesStorage();
            List <string> allLines     = notesStorage.GetNote(@"C:\Users\WindowsPC\Documents\notes.txt");

            foreach (string singleLine in allLines)
            {
                lstAllNotes.Items.Add(singleLine);
            }
        }