Exemple #1
0
        public void RefreshPropList(JWCControl ctrl)
        {
            _PropPanel.Children.Clear();
            Type tp = ctrl.GetType();
            bool cl = false;

            foreach (PropertyInfo pi in tp.GetProperties())
            {
                if (Attribute.IsDefined(pi, typeof(PropDiscribeAttribute)))
                {
                    PropDiscribeAttribute pat = pi.GetCustomAttributes(typeof(PropDiscribeAttribute), true)[0] as PropDiscribeAttribute;
                    APropItem             itm = PropItemFactory.GetPropItem(pat, ctrl, pi);
                    var  showitm = itm.GetControl();
                    Grid grd     = new Grid();
                    grd.Background = cl ? color1 : color2;
                    cl             = !cl;
                    grd.Children.Add(showitm);
                    _PropPanel.Children.Add(grd);
                    itm.TimeToShowHelpString += itm_TimeToShowHelpString;
                    if (pi.Name == "Name")
                    {
                        itm.OnPropValueChanged += itm_OnPropValueChanged;
                    }
                    else if (pi.Name == "Size")
                    {
                        this.SetSizeFun = itm.SetPropShowValue;
                    }
                    else if (pi.Name == "Margin")
                    {
                        this.SetMarginFun = itm.SetPropShowValue;
                    }
                }
            }
        }
Exemple #2
0
        public void PasteSelecting()
        {
            if (_ClipBoard == null)
            {
                return;
            }
            JWCControl jc = (JWCControl)Activator.CreateInstance(_ClipBoard.GetType());

            jc.InputProperty(_ClipBoard.OutputProperty());
            jc.IsEditMode = true;
            double    left = jc.Margin.Left + 20;
            double    top  = jc.Margin.Top + 20;
            Thickness th   = new Thickness((int)left, (int)top, 0, 0);

            jc.Margin = th;
            AddControl(jc);
            jc.GetFocus();
        }
Exemple #3
0
        private string GetJWCCFullName(JWCControl ctrl)
        {
            Type tp = ctrl.GetType();

            return(tp.FullName);
        }