Beispiel #1
0
        public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService svc = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;

            if (svc != null)
            {
                frmScript form = new frmScript();
                form.Script = value as string;
                svc.ShowDialog(form);
                value = form.Script;
            }

            return value;
        }
Beispiel #2
0
        private void pnlRenderer_DoubleClick(object sender, EventArgs e)
        {
            if (selectedObject != null)
            {
                var form = new frmScript();
                form.Script = selectedObject.Script;
                form.Width = (int)Math.Round(pnlRenderer.Width * 0.8, 0);
                form.Height = (int)Math.Round(pnlRenderer.Height * 0.8, 0);
                form.ShowDialog();

                selectedObject.Script = form.Script;
            }
        }