コード例 #1
0
        private void btnHistory_Click(object sender, EventArgs e)
        {
            HistoryForm historyForm = new HistoryForm(currentNote);

            historyForm.FormClosed   += HistoryForm_FormClosed;
            historyForm.StartPosition = FormStartPosition.CenterParent;
            historyForm.ShowDialog();
        }
コード例 #2
0
        private void HistoryForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            HistoryForm historyForm = sender as HistoryForm;

            if (historyForm.history != null)
            {
                btnSave.PerformClick();
                currentNote.ContentText = historyForm.history.ContentText;
                currentNote.tags        = new List <string>();
                foreach (string tag in historyForm.history.Tags)
                {
                    currentNote.tags.Add(tag);
                }
                NoteClick(currentNote);
            }
        }