示例#1
0
        private void SaveNotes()
        {
            if (!Properties.Settings.Default.SaveNotesAutomatically)
            {
                return;
            }

            save.CheckDirectory();
            string text    = string.Empty;
            string newLine = "\r\n";

            //save the notes
            for (int i = 0; i < NotesOrganizer.area.Count; i++)
            {
                Panel pane = NotesOrganizer.area[i];
                foreach (Control c in pane.Controls)
                {
                    if (c is TextBox)
                    {
                        TextBox note = (TextBox)c;
                        if (!string.IsNullOrWhiteSpace(note.Text))
                        {
                            text += note.Text + " \\<:" + note.Font.Bold + ":>/" + newLine;
                        }
                    }
                }
            }
            save.Update(text);
        }