Exemple #1
0
        public CCheckBox()
        {
            cd = new ControlDescription(this);

            cd.TypeId = count;
            this.Name = "CCheckBox" + count;
            this.Text = this.Name;
            this.Size = this.DefaultSize;

            count++;
        }
Exemple #2
0
        public void SetControlDescription(ControlDescription cd)
        {
            this.Text   = cd.Text;
            this.Top    = cd.Top;
            this.Left   = cd.Left;
            this.Height = cd.Height;
            this.Width  = cd.Width;

            this.Font      = cd.CurrentFont;
            this.BackColor = cd.BackColor;
        }
Exemple #3
0
        /// <summary>
        /// Adds the control property.
        /// </summary>
        /// <param name="controlDescription">The control description.</param>
        /// <returns>The value function.</returns>
        private static Func <IWindow, Func <TControl, bool>, bool> AddValueProperty(ControlDescription controlDescription)
        {
            var windowArgument = Expression.Parameter(typeof(IWindow), "window");
            var actionFunc     = Expression.Parameter(typeof(Func <TControl, bool>), "actionFunc");

            return
                (Expression.Lambda <Func <IWindow, Func <TControl, bool>, bool> >(
                     Expression.Invoke(actionFunc, Expression.Convert(Expression.Constant(controlDescription.Value, controlDescription.PropertyType), typeof(TControl))),
                     windowArgument,
                     actionFunc)
                 .Compile());
        }
Exemple #4
0
 public void SetControlDescription()
 {
     cd = new ControlDescription(this);
 }
 public NavigationParameter(ControlDescription control, NavigationHelper navigation)
 {
     Control    = control;
     Navigation = navigation;
 }