コード例 #1
0
 private Accessibility Process(IHtmlHelper helper, MoldsterHtmlContainer parent, string id, string cont)
 {
     parent.Control.Children.Add(new ControlDTO
     {
         Identifier  = id?.ToLower(),
         ControlType = cont
     });
     return(helper.GetAccessibility(id));
 }
コード例 #2
0
        //static IMoldsterGeneralHelper Provider { get { return Shell.ScopedInjector.GetRequiredService<IMoldsterGeneralHelper>(); } }

        /// <summary>
        /// <p>writes the opening tag name and the closing tag name on the end bracket</p>
        /// <p>the tag should be closed using <see cref="CloseContainer(IHtmlHelper, string)"/></p>
        /// </summary>
        /// <summary>
        ///
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="helper"></param>
        /// <param name="tagName">html tag name</param>
        /// <param name="identifier"></param>
        /// <param name="container">an instance of <see cref="FMSHtmlContainer"/></param>
        /// <param name="attributes"></param>
        /// <returns>identifier accessibility <see cref="Accessibility.Read"/></returns>
        public static bool MakeContainer(this IHtmlHelper helper, string tagName, string identifier, out MoldsterHtmlContainer container, object attributes = null)
        {
            bool access = helper.GetAccessibility(identifier).Read;

            if (access)
            {
                container = new MoldsterHtmlContainer(helper, tagName, identifier, attributes);
            }
            else
            {
                container = new MoldsterHtmlContainer(helper, identifier, true);
            }

            helper.AddToViewControls(container.Control);

            return(access);
        }
コード例 #3
0
        public CellWriter CalendarCell <T, TValue>(IHtmlHelper <T> helper, Expression <Func <T, TValue> > exp, MoldsterHtmlContainer parent, CalendarTypes rangeType, Calendars cals, DateRange range, bool required, object cellAttributes, object inputAttr, string classes)
        {
            var wt = base.CalendarCell(helper, exp, rangeType, cals, range, required, cellAttributes, inputAttr, classes);

            wt.Accessibility = proc.ProcessCell(helper, exp, InputControls.CalendarTextBox, parent);
            return(wt);
        }
コード例 #4
0
        public Accessibility ProcessCell <T, TValue>(IHtmlHelper <T> helper, Expression <Func <T, TValue> > exp, string cont, MoldsterHtmlContainer parent = null)
        {
            string id = RazorUtils.GetIdentifier(exp);

            return(ProcessCell(helper, id, cont, parent));
        }
コード例 #5
0
 public Accessibility ProcessCell(IHtmlHelper helper, string textId, InputControls cont, MoldsterHtmlContainer parent = null)
 {
     return(ProcessCell(helper, textId, cont.ToString(), parent));
 }
コード例 #6
0
        public Accessibility ProcessCell(IHtmlHelper helper, string textId, string cont, MoldsterHtmlContainer parent = null)
        {
            string id = textId;

            if (parent != null)
            {
                id = parent.Control.Identifier.ToLower() + "__" + id;
                return(Process(helper, parent, id, "TableCell_" + cont));
            }
            else
            {
                id = "cell__" + id;
                return(Process(helper, id, "TableCell_" + cont));
            }
        }