protected override TemplateEditingVerb[] GetTemplateVerbs()
        {
            TemplateEditingVerb[] templateVerbs = new TemplateEditingVerb[_numberOfTemplateFrames];

            templateVerbs[_headerFooterTemplates] = new TemplateEditingVerb(
                SR.GetString(SR.TemplateFrame_HeaderFooterTemplates),
                _headerFooterTemplates,
                this);
            templateVerbs[_itemTemplates] = new TemplateEditingVerb(
                SR.GetString(SR.TemplateFrame_ItemTemplates),
                _itemTemplates,
                this);
            templateVerbs[_separatorTemplate] = new TemplateEditingVerb(
                SR.GetString(SR.TemplateFrame_SeparatorTemplate),
                _separatorTemplate,
                this);

            return(templateVerbs);
        }
Пример #2
0
        /// <summary>
        /// Gets array of Template editing verbs from cache
        /// </summary>
        /// <returns>TemplateEditingVerb array</returns>
        protected override TemplateEditingVerb[] GetCachedTemplateEditingVerbs()
        {
            if (templateVerbsDirty == true)
            {
                DisposeTemplateVerbs();

                templateVerbs    = new TemplateEditingVerb[6];
                templateVerbs[0] = new TemplateEditingVerb("Header Template", 0, this);
                templateVerbs[1] = new TemplateEditingVerb("Status Template", 1, this);
                templateVerbs[2] = new TemplateEditingVerb("Item Template", 2, this);
                templateVerbs[3] = new TemplateEditingVerb("AlternatingItem Template", 3, this);
                templateVerbs[4] = new TemplateEditingVerb("Separator Template", 4, this);
                templateVerbs[5] = new TemplateEditingVerb("Footer Template", 5, this);

                templateVerbsDirty = false;
            }

            return(templateVerbs);
        }
Пример #3
0
        protected override ITemplateEditingFrame CreateTemplateEditingFrame(TemplateEditingVerb verb)
        {
            ITemplateEditingService teService =
                (ITemplateEditingService)GetService(typeof(ITemplateEditingService));

            Debug.Assert(teService != null,
                         "How did we get this far without an ITemplateEditingService");

            String[] templateNames             = GetTemplateFrameNames(verb.Index);
            ITemplateEditingFrame editingFrame = teService.CreateFrame(
                this,
                TemplateDeviceFilter + " (" + TemplateStyle + ")",
                templateNames,
                WebCtrlStyle,
                null /* we don't have template styles */);

            editingFrame.InitialWidth = _templateWidth;
            return(editingFrame);
        }
Пример #4
0
        protected override ITemplateEditingFrame CreateTemplateEditingFrame(TemplateEditingVerb verb)
        {
            var teService = (ITemplateEditingService)this.GetService(typeof(ITemplateEditingService));

            Trace.Assert(teService != null, "How did we get this far without an ITemplateEditingService?");
            Trace.Assert(verb.Index == 0 || verb.Index == SeparatorTemplates);

            string[] templateNames  = null;
            Style[]  templateStyles = null;
            Style[]  outputTemplateStyles;

            switch (verb.Index)
            {
            case PaneTemplates:
                templateNames        = PaneTemplateNames;
                outputTemplateStyles = new Style[3];
                outputTemplateStyles[IdxLeftPaneTemplate]    = this.desktopPanes.LeftPaneStyle;
                outputTemplateStyles[IdxContentPaneTemplate] = this.desktopPanes.ControlStyle;
                outputTemplateStyles[IdxRightPaneTemplate]   = this.desktopPanes.RightPaneStyle;
                templateStyles = outputTemplateStyles;
                break;

            case SeparatorTemplates:
                templateNames        = SeparatorTemplateNames;
                outputTemplateStyles = new Style[2];
                outputTemplateStyles[IdxHorizontalSeparatorTemplate] = this.desktopPanes.HorizontalSeparatorStyle;
                outputTemplateStyles[IdxVerticalSeparatorTemplate]   = this.desktopPanes.VerticalSeparatorStyle;
                templateStyles = outputTemplateStyles;
                break;
            }

            if (teService != null)
            {
                var editingFrame = teService.CreateFrame(
                    this, verb.Text, templateNames, this.desktopPanes.ControlStyle, templateStyles);

                // editingFrame = teService.CreateFrame(this, verb.Text, templateNames);
                return(editingFrame);
            }

            return(null);
        }
Пример #5
0
        protected override TemplateEditingVerb[] GetTemplateVerbs()
        {
            TemplateEditingVerb[] templateVerbs = new TemplateEditingVerb[1];

            if (FormDeviceSpecific)
            {
                templateVerbs[0] = new TemplateEditingVerb(
                    SR.GetString(SR.TemplateFrame_HeaderFooterTemplates),
                    _headerFooterTemplates,
                    this);
            }
            else
            {
                templateVerbs[0] = new TemplateEditingVerb(
                    SR.GetString(SR.TemplateFrame_ContentTemplate),
                    _contentTemplate,
                    this);
            }

            return(templateVerbs);
        }
        /// <include file='doc\DataListDesigner.uex' path='docs/doc[@for="DataListDesigner.CreateTemplateEditingFrame"]/*' />
        protected override ITemplateEditingFrame CreateTemplateEditingFrame(TemplateEditingVerb verb)
        {
            ITemplateEditingService teService = (ITemplateEditingService)GetService(typeof(ITemplateEditingService));

            Debug.Assert(teService != null, "How did we get this far without an ITemplateEditingService");

            string[] templateNames  = null;
            Style[]  templateStyles = null;

            switch (verb.Index)
            {
            case HeaderFooterTemplates:
                templateNames  = HeaderFooterTemplateNames;
                templateStyles = new Style[] { dataList.HeaderStyle, dataList.FooterStyle };
                break;

            case ItemTemplates:
                templateNames  = ItemTemplateNames;
                templateStyles = new Style[] { dataList.ItemStyle, dataList.AlternatingItemStyle, dataList.SelectedItemStyle, dataList.EditItemStyle };
                break;

            case SeparatorTemplate:
                templateNames  = SeparatorTemplateNames;
                templateStyles = new Style[] { dataList.SeparatorStyle };
                break;

            default:
                Debug.Fail("Unknown Index value on TemplateEditingVerb");
                break;
            }

            ITemplateEditingFrame editingFrame =
                teService.CreateFrame(this, verb.Text, templateNames, dataList.ControlStyle, templateStyles);

            return(editingFrame);
        }
Пример #7
0
        /// <summary>
        /// Override the CreateTemplateEditingFrame method.
        /// This method takes a TemplateEditingVerb instance as an argument.
        /// TemplateEditingVerb is a designer verb (a class that derives from DesignerVerb)
        /// that enables the template editor to add a command to the control at design time.
        /// </summary>
        /// <param name="verb"></param>
        /// <returns></returns>
        protected override ITemplateEditingFrame CreateTemplateEditingFrame(TemplateEditingVerb verb)
        {
            ITemplateEditingService teService = (ITemplateEditingService)GetService(typeof(ITemplateEditingService));

            Trace.Assert(teService != null, "How did we get this far without an ITemplateEditingService?");
            Trace.Assert(verb.Index == 0 || verb.Index == SeparatorTemplates);

            string[] templateNames = null;
            System.Web.UI.WebControls.Style[] templateStyles = null;
            ITemplateEditingFrame             editingFrame;

            System.Web.UI.WebControls.Style[] outputTemplateStyles;

            switch (verb.Index)
            {
            case PaneTemplates:
                templateNames        = DesktopPanesDesigner.PaneTemplateNames;
                outputTemplateStyles = new Style[3];
                outputTemplateStyles[IDX_LEFT_PANE_TEMPLATE]    = desktopPanes.LeftPaneStyle;
                outputTemplateStyles[IDX_CONTENT_PANE_TEMPLATE] = desktopPanes.ControlStyle;
                outputTemplateStyles[IDX_RIGHT_PANE_TEMPLATE]   = desktopPanes.RightPaneStyle;
                templateStyles = outputTemplateStyles;
                break;

            case SeparatorTemplates:
                templateNames        = DesktopPanesDesigner.SeparatorTemplateNames;
                outputTemplateStyles = new Style[2];
                outputTemplateStyles[IDX_HORIZONTAL_SEPARATOR_TEMPLATE] = desktopPanes.HorizontalSeparatorStyle;
                outputTemplateStyles[IDX_VERTICAL_SEPARATOR_TEMPLATE]   = desktopPanes.VerticalSeparatorStyle;
                templateStyles = outputTemplateStyles;
                break;
            }
            editingFrame = teService.CreateFrame(this, verb.Text, templateNames, desktopPanes.ControlStyle, templateStyles);
            //editingFrame = teService.CreateFrame(this, verb.Text, templateNames);
            return(editingFrame);
        }
Пример #8
0
 protected override ITemplateEditingFrame CreateTemplateEditingFrame(
     TemplateEditingVerb verb)
 {
     throw new NotImplementedException();
 }
Пример #9
0
		protected override ITemplateEditingFrame CreateTemplateEditingFrame (
			TemplateEditingVerb verb)
		{
			throw new NotImplementedException ();
		}