コード例 #1
0
ファイル: jewelbuilder.cs プロジェクト: modulexcite/IL2JS
 /// <summary>
 /// Constructor for a Jewel
 /// </summary>
 /// <param name="dataUrlBase">The XML data URL</param>
 /// <param name="version">The version of the XML data</param>
 /// <param name="lcid">The language code</param>
 /// <param name="options">The JewelBuildOptions for this Jewel. <see cref="JewelBuildOptions"/></param>
 /// <param name="elmPlaceholder">The ID for the DOMElement that will enclose this Jewel</param>
 /// <param name="rootBuildClient">The object using this builder</param>
 public JewelBuilder(JewelBuildOptions options,
                     HtmlElement elmPlaceholder,
                     IRootBuildClient rootBuildClient)
     : base(options, elmPlaceholder, rootBuildClient)
 {
     if (CUIUtility.IsNullOrUndefined(elmPlaceholder))
         throw new ArgumentNullException("Jewel placeholder DOM element is null or undefined.");
 }
コード例 #2
0
ファイル: toolbar.cs プロジェクト: modulexcite/IL2JS
        internal void AttachAndBuildJewelFromData(object jewelData)
        {
            if (!_hasJewel)
            {
                return;
            }

            _elmJewelPlaceholder.Style.Display = "block";

            JewelBuildContext jbc = new JewelBuildContext();
            jbc.JewelId = DataNodeWrapper.GetAttribute(jewelData, "Id");

            // Build Jewel
            JewelBuildOptions options = new JewelBuildOptions();
            options.TrimmedIds = _builder.Options.TrimmedIds;
            JewelBuilder builder = new JewelBuilder(options,
                 _elmJewelPlaceholder,
                 _builder.BuildClient);

            builder.BuildJewelFromData(jewelData, jbc);

            this.Jewel = builder.Jewel;
        }
コード例 #3
0
ファイル: ribbon.cs プロジェクト: modulexcite/IL2JS
        internal void BuildAndSetJewel(string jewelId, bool attachToDOM, DataSource ds)
        {
            _elmJewelPlaceholder.Style.Display = "block";

            // Build Jewel
            JewelBuildOptions options = new JewelBuildOptions();
            options.AttachToDOM = attachToDOM;
            options.TrimmedIds = RibbonBuilder.Options.TrimmedIds;
            JewelBuilder builder = new JewelBuilder(options,
                                                    _elmJewelPlaceholder,
                                                    RibbonBuilder.BuildClient);
            builder.DataSource = ds;
            if (!builder.BuildJewel(jewelId))
                throw new InvalidOperationException("Jewel could not be built");

            Jewel = builder.Jewel;
        }