WebCast: Managed Smart Tags mit VSTO Jens Häupel.NET Technologieberater Microsoft Deutschland GmbH...

Post on 05-Apr-2015

103 views 0 download

Transcript of WebCast: Managed Smart Tags mit VSTO Jens Häupel.NET Technologieberater Microsoft Deutschland GmbH...

WebCast: Managed Smart Tags mit VSTO

Jens Häupel.NET TechnologieberaterMicrosoft Deutschland GmbHhttp://blogs.msdn.com/jensha

Agenda Was sind Smart Tags überhaupt? Com Interfaces Abstraction in VSTO 2.0 Demo Deployment

Was sind Smart Tags überhaupt?Bereitstellung von Aktionen für „losen“

Text Setzt Daten in KontextMS Word Task Pane

Option1

Option1

Child

Child

ChildChild

Label

LabelDie Anfrage SRX0815300 von Microsoft wurde noch nicht beantwortet

Wo?Finde Kunde

Finde Anfrage

Aktion?

SmartTags in Word

SmartTags in Word

COM Interfaces

Abstraktion in VSTO 2.0

Sehr einfaches und intuitives InterfaceKaspelt die COM-Interfaces ISMartTagAction

bzw. ISmartTagRecognizerFür spezifische Dokumente

Aggressivere Erkennungsmechanismen möglich

Für Dokumente einer bestimmten Vorlage Allgemeinere Erkennung, Gruppierung

Klassen in VSTO 2.0

SmartTags {Collection}Document bzw. Workbook Object

Smart Tag mit VSTO 2.0Smart Tag mit VSTO 2.0

Deployment Manifest-basiert Application Manifest im Dokument enthalten Default nach Erstellung in Visual Studio

Dokument und Assembly im gleichen Ordner (lokal)

Szenarien: Dokument und Assembly lokalDokument lokal + Assembly vom ServerDokument und Assembly vom Server

Wenn Assembly zentral (Server), dann Pfad anpassen

Deployment mit zentraler ASM Assembly Path per Code anpassen Zugriff über ServerDocument-Klasse

Pfad anpassen

Dim sd As ServerDocument = NothingTry sd = New ServerDocument("<full document path>") sd.AppManifest.Dependency.AssemblyPath = "<full assembly path>" sd.Save()Catch ex As System.Exception '...Finally If Not sd Is Nothing Then sd.Close() End IfEnd Try

Zusammenfassung Kontext und Aktionen über losen Text Information Bridge Framework Informationen an Ort und Stelle Seht einfache und intuitive Umsetzung Gewohnte Tools und Sprachen Managed Code