private void edit_code_button_Click(object sender, EventArgs e)
        {
            var form = new CodeInsertForm();
            form.Code = SelectedContent.Properties["code"];
            var result = form.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                SelectedContent.Properties["code"] = form.Code;
                SelectedContent.Properties.Remove("html");
                OnContentEdited();
            }
        }
예제 #2
0
        private void edit_code_button_Click(object sender, EventArgs e)
        {
            var form = new CodeInsertForm();

            form.Code = SelectedContent.Properties["code"];
            var result = form.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                SelectedContent.Properties["code"] = form.Code;
                SelectedContent.Properties.Remove("html");
                OnContentEdited();
            }
        }
예제 #3
0
        public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent newContent)
        {
            var form   = new CodeInsertForm();
            var result = form.ShowDialog(dialogOwner);

            if (result == DialogResult.OK)
            {
                if (form.Code.Trim().Length == 0)
                {
                    return(DialogResult.Cancel);
                }

                newContent.Properties["code"] = form.Code;
            }

            return(result);
        }
예제 #4
0
        public override DialogResult CreateContent(IWin32Window dialogOwner, ISmartContent newContent)
        {
            var form = new CodeInsertForm();
            var result = form.ShowDialog(dialogOwner);
            if (result == DialogResult.OK) 
            {
                if (form.Code.Trim().Length == 0)
                    return DialogResult.Cancel;

                newContent.Properties["code"] = form.Code;
            }

            return result;
        }