Exemplo n.º 1
0
        /// <summary>
        /// Requested to edit this note.
        /// </summary>
        /// <param name="sender">Sender object</param>
        /// <param name="e">Event arguments</param>
        private void menuEditNote_Click(object sender, EventArgs e)
        {
            if (PluginsManager.EnabledPlugins != null)
            {
                for (int i = 0; i < PluginsManager.EnabledPlugins.Count; ++i)
                {
                    PluginsManager.EnabledPlugins[i].EditingNote(this.note.Filename);
                }
            }

            FrmNewNote frmnewnote = new FrmNewNote(this.notes, this.note, this.Location, this.Size, this.rtbNote.WordWrap);

            frmnewnote.Show();
            this.note.DestroyForm();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create a new note.
        /// </summary>
        /// <param name="contentclipboard">Set content with text from clipboard.</param>
        public void OpenNewNote(string title, string content)
        {
            const int TITLEMAXLENGTH = 255;

            if (title.Length > TITLEMAXLENGTH)
            {
                Log.Write(LogType.error, "New note title too long, limited to " + TITLEMAXLENGTH + " characters.");
                title = title.Remove(TITLEMAXLENGTH);
            }

            FrmNewNote frmnewnote = new FrmNewNote(this.notes, this.newnotedeltaX, this.newnotedeltaY, title, content);

            this.ChangeDeltaPositionNewNote();
            frmnewnote.Show();
            frmnewnote.Activate();
            this.frmneweditnoteopen = true;
        }