Esempio n. 1
0
        private void RenderStyles(TileRenderContext ctx)
        {
            if (style_attributes == null)
            {
                ScanAssembly(Assembly.GetExecutingAssembly());
            }

            if (style_templates == null)
            {
                GetFontSettings();

                style_templates = new ArrayList();
                foreach (TileStyleAttribute attr in style_attributes)
                {
                    Template t = new Template(attr.Resource);
                    t["FontFamily"] = preferred_font_family;
                    t["FontSize"]   = preferred_font_size.ToString();
                    style_templates.Add(t);
                }
            }

            foreach (Template t in style_templates)
            {
                ctx.Write(t.ToString());
            }
        }
Esempio n. 2
0
		public override void Render (TileRenderContext ctx)
		{
			if (!populated) {
				PopulateTemplate ();
				populated = true;
			}
			
			ctx.Write (Template.ToString ());
		}
Esempio n. 3
0
        public override void Render(TileRenderContext ctx)
        {
            if (!populated)
            {
                PopulateTemplate();
                populated = true;
            }

            ctx.Write(Template.ToString());
        }
        private void RenderTiles(TileRenderContext ctx)
        {
            int i  = FirstDisplayed;
            int i1 = LastDisplayed;

            while (i <= i1 && i < NumResults)
            {
                HitTilePair pair = (HitTilePair)hits [i];
                ctx.Tile(pair.Tile);
                ++i;
            }
        }
        public override void Render(TileRenderContext ctx)
        {
            if (head_template == null)
            {
                head_template = new Template("template-head.html");
                PopulateTemplate(head_template);
            }

            ctx.Write(head_template.ToString());

            RenderTiles(ctx);

            if (foot_template == null)
            {
                foot_template = new Template("template-foot.html");
                PopulateTemplate(foot_template);
            }
            ctx.Write(foot_template.ToString());
        }
Esempio n. 6
0
        override public void Render(TileRenderContext ctx)
        {
            if (errorString != null)
            {
                ctx.Write(errorString);
                if (offerDaemonRestart)
                {
                    ctx.Write("<hr noshade>");
                    ctx.Link("Click to start the Beagle daemon...", new TileActionHandler(StartDaemon));
                    offerDaemonRestart = false;
                }
                errorString = null;
                return;
            }

            if (hit_collection != null)
            {
                ctx.Tile(hit_collection);
            }
        }
Esempio n. 7
0
		private void RenderStyles (TileRenderContext ctx)
		{
			if (style_attributes == null) 
				ScanAssembly (Assembly.GetExecutingAssembly ());

			if (style_templates == null) {
				GetFontSettings ();

				style_templates = new ArrayList ();
				foreach (TileStyleAttribute attr in style_attributes) {
					Template t = new Template (attr.Resource);
					t["FontFamily"] = preferred_font_family;
					t["FontSize"] = preferred_font_size.ToString ();
					style_templates.Add (t);
				}
			}
			
			foreach (Template t in style_templates) {
				ctx.Write (t.ToString ());
			}
		}
Esempio n. 8
0
		override public void Render (TileRenderContext ctx)
		{
			if (errorString != null) {
				ctx.Write (errorString);
				if (offerDaemonRestart) {
					ctx.Write ("<hr noshade>");
					ctx.Link ("Click to start the Beagle daemon...", new TileActionHandler (StartDaemon));
					offerDaemonRestart = false;
				}
				errorString = null;
				return;
			}

			if (hit_collection != null)
				ctx.Tile (hit_collection);
		}
		public override void Render (TileRenderContext ctx)
		{
			if (head_template == null) {
				head_template = new Template ("template-head.html");
				PopulateTemplate (head_template);
			}
			
			ctx.Write (head_template.ToString ());

			RenderTiles (ctx);
			
			if (foot_template == null) {
				foot_template = new Template ("template-foot.html");
				PopulateTemplate (foot_template);
			}
			ctx.Write (foot_template.ToString ());
		}
Esempio n. 10
0
		private void RenderTiles (TileRenderContext ctx)
		{
			int i = FirstDisplayed;
			int i1 = LastDisplayed;

			while (i <= i1 && i < NumResults) {
				HitTilePair pair = (HitTilePair) hits [i];
				ctx.Tile (pair.Tile);
				++i;
			}
		}
Esempio n. 11
0
        ////////////////////////

        abstract public void Render(TileRenderContext ctx);
Esempio n. 12
0
		////////////////////////

		abstract public void Render (TileRenderContext ctx);