Exemplo n.º 1
0
        private void OnRunTextEditor(object sender, EventArgs e)
        {
            IStringBasedEditorDialog ed = new TextEditorDialog(ctrl.Text, ctrl.Name);

            if (ed.ShowDialog() == DialogResult.OK)
            {
                ctrl.Text = ed.TextValue;
                this.SetProperty("Name", ed.TextValue);
            }
        }
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            string s = String.Empty;;

            if (value != null)
            {
                s = value.ToString();
            }
            IStringBasedEditorDialog ed = new TextEditorDialog(s, expressionEditor);

            return(ed.ShowDialog() == DialogResult.OK ? ed.TextValue : s);
        }
Exemplo n.º 3
0
        public override void OnDoubleClick()
        {
            TextEditorDialog ted = new TextEditorDialog();

            ted.Text      = (designService.SelectedControl as TextBlockView).TextBlock.Text;
            ted.Response += delegate(object oo, ResponseArgs argss) {
                if (argss.ResponseId == ResponseType.Ok)
                {
                    (designService.SelectedControl as TextBlockView).TextBlock.Text = ted.Text;
                    ted.Destroy();
                }
                else
                {
                    ted.Destroy();
                }
            };
            ted.Show();
        }
 private void _reasonContainer_MarkupLinkClick(object sender, DevComponents.DotNetBar.Layout.MarkupLinkClickEventArgs e)
 {
     if (sender is LayoutControlItem layoutControlItem)
     {
         if (layoutControlItem.Control is RichTextBox richTextBox)
         {
             using (var dialog = new TextEditorDialog
             {
                 Multiline = true,
                 Text = richTextBox.Text,
                 ReadOnly = richTextBox.ReadOnly
             })
             {
                 if (dialog.ShowDialog(Form.ActiveForm) == DialogResult.OK)
                 {
                     richTextBox.Text = dialog.Text;
                 }
             }
         }
     }
 }
        private void _layoutDescription_MarkupLinkClick(object sender, DevComponents.DotNetBar.Layout.MarkupLinkClickEventArgs e)
        {
            try
            {
                //_spellAsYouType.CheckAsYouType = false;

                using (var dialog = new TextEditorDialog
                {
                    Text = _description.Text,
                    Multiline = true,
                    ReadOnly = _description.ReadOnly
                })
                {
                    if (dialog.ShowDialog(Form.ActiveForm) == DialogResult.OK)
                    {
                        _description.Text = dialog.Text;
                    }
                }
            }
            finally
            {
                //_spellAsYouType.CheckAsYouType = true;
            }
        }
Exemplo n.º 6
0
		private void OnRunTextEditor (object sender,EventArgs e)
		{
			IStringBasedEditorDialog ed = new TextEditorDialog (ctrl.Text,ctrl.Name);
			if (ed.ShowDialog() == DialogResult.OK) {
				ctrl.Text = ed.TextValue;
				this.SetProperty ("Name",ed.TextValue);
			}
		}