4 namespace Search
.Tiles
{
6 public class PresentationActivator
: TileActivator
{
8 public PresentationActivator () : base ()
10 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.sun.xml.impress.template"));
11 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.sun.xml.impress"));
12 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.ms-powerpoint"));
15 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.oasis.opendocument.presentation"));
16 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.oasis.opendocument.presentation.template"));
19 public override Tile
BuildTile (Beagle
.Hit hit
, Beagle
.Query query
)
21 return new Presentation (hit
, query
);
25 public class Presentation
: TileFile
{
27 public Presentation (Beagle
.Hit hit
, Beagle
.Query query
) : base (hit
, query
)
29 Group
= TileGroup
.Documents
;
31 if (Hit
["fixme:slide-count"] != null) {
32 int count
= Int32
.Parse (Hit
["fixme:slide-count"]);
33 Description
= String
.Format (Catalog
.GetPluralString ("{0} slide", "{0} slides", count
), count
);