private void okButton_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(this.Label))
            {
                var newEntry = new Core.Entry(this.Label);

                newEntry.Content = this.Content;
                ModelLoader.CurrentModel.Entries.Add(newEntry);
                this.CreatedEntry = newEntry;
                ModelLoader.SaveModel();

                if (!string.IsNullOrEmpty(this.keyTextBox.Text))
                {
                    Clipboard.Clear();
                    Clipboard.SetText(this.keyTextBox.Text);
                }

                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show("Please enter a label!");

                this.DialogResult = DialogResult.None;
            }
        }
        public RenameDialog(Core.Entry entry)
        {
            InitializeComponent();

            this.Text = string.Format("Rename \"{0}\"", entry.Label);

            this.entry         = entry;
            this.textBox1.Text = entry.Label;
            this.textBox1.SelectAll();
        }
        public EditContentDialog(Core.Entry entry)
        {
            InitializeComponent();

            this.entry = entry;

            this.richTextBox1.Text = entry.Content;
            this.richTextBox1.Select(this.richTextBox1.TextLength, 0);
            this.richTextBox1.Focus();

            this.Text = string.Format("Edit content of \"{0}\"", entry.Label);
        }
        private void okButton_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(this.Label))
            {
                var newEntry = new Core.Entry(this.Label);

                newEntry.Content = this.Content;

                ModelLoader.CurrentModel.Entries.Add(newEntry);
                ModelLoader.SaveModel();

                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show("Invalid input!");

                this.DialogResult = DialogResult.None;
            }
        }