Пример #1
0
        /// <summary>
        /// Cleanup frmNote resources.
        /// The note is made not visible to user and form isn't required anymore.
        /// </summary>
        public void DestroyForm()
        {
            if (this.frmnote != null)
            {
                this.frmnote.Close();
            }

            this.frmnote = null;
            if (PluginsManager.EnabledPlugins != null)
            {
                for (int i = 0; i < PluginsManager.EnabledPlugins.Count; i++)
                {
                    PluginsManager.EnabledPlugins[i].HidingNote(this.tempcontent, this.title);
                }
            }

            GC.Collect();
        }
Пример #2
0
        /// <summary>
        /// Create a new frmNote with this note.
        /// Visible is set to true.
        /// </summary>
        public void CreateForm()
        {
            if (this.frmnote != null)
            {
                this.frmnote.Show();
                return;
            }

            this.frmnote = new FrmNote(this.notes, this);
            this.visible = true;
            this.frmnote.Show();
            if (PluginsManager.EnabledPlugins != null)
            {
                for (int i = 0; i < PluginsManager.EnabledPlugins.Count; i++)
                {
                    PluginsManager.EnabledPlugins[i].ShowingNote(this.tempcontent, this.title);
                }
            }
        }