Пример #1
0
        protected override void UpdatePreview(TextBox previewBox, object ruleObject)
        {
            RuleSet ruleSet = ruleObject as RuleSet;

            NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero);
            previewBox.Lines = DesignerHelpers.GetRuleSetPreview(ruleSet).Split('\n');
            NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
            previewBox.Invalidate();
        }
Пример #2
0
        protected override void UpdatePreview(TextBox previewBox, object ruleObject)
        {
            RuleSet ruleSet = ruleObject as RuleSet;

            System.Workflow.Activities.Common.NativeMethods.SendMessage(previewBox.Handle, 11, IntPtr.Zero, IntPtr.Zero);
            previewBox.Lines = DesignerHelpers.GetRuleSetPreview(ruleSet).Split(new char[] { '\n' });
            System.Workflow.Activities.Common.NativeMethods.SendMessage(previewBox.Handle, 11, new IntPtr(1), IntPtr.Zero);
            previewBox.Invalidate();
        }
Пример #3
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            RuleSet ruleSet = value as RuleSet;

            if ((destinationType == typeof(string)) && (ruleSet != null))
            {
                return(DesignerHelpers.GetRuleSetPreview(ruleSet));
            }
            return(base.ConvertTo(context, culture, value, destinationType));
        }