Beruflich Dokumente
Kultur Dokumente
MyApp
Host
OS / Netzwerk…
3rd party code
Demo
Inherits
Add-In View Abstract Inherits Inherits Inherits Abstract
Base Class Add-In View IContract Host View Base Class
Remoting-Grenze
Discovery
AddIns MyApplication.exe
AddInSideAdapters Host.Views.dll
AddInViews PipelineSegments.store
Contracts
HostSideAdapters
Hosting
AppDomain- oder Prozess-Isolation
Kommunikation über .NET-Remoting
Add-In 3 Add-In 6
Demo
INativeHandleContract
IntPtr GetHandle();
FrameworkElementAdapters
FrameworkElement ContractToViewAdapter(INativeHandleContract hwnd);
INativeHandleContract ViewToContractAdapter(FrameworkElement root);
UI-Elemente übertragen
Add-In Samples
http://www.codeplex.com/clraddins
joerg.neumann@thinktecture.com
www.HeadWriteLine.BlogSpot.com
35
Windows Forms Add-In Proxy
Commands
ICommand IUICommand
Name Command
ParentCommand Text
ChildCommands ParentCommand
Enabled ChildCommands
Tooltip
Visible
Checked
HasState
BeginGroup
Index
DisplayStyle
Image
CommandType
ShortcutKeys
Command Services
ICommandContext
ICommandService
UICommandService
ShowSurface()
event SurfaceShown
ICommandService IUICommandService
GetMainMenu() GetMainMenu()
GetMainToolbar() GetMainToobar()
GetCommand() GetUICommand()
CreateCommand() CreateMenuItem()
CreateToolbarItem()
CreateSeparator()
GetIconArray()
GetImageArray()
Command-Contracts
IAddInCommandContract
InitializeCommands(ICommandContext)
NotifyCommandExecuted(ICommand)
WindowProxyBase GetSurface()
AddInHost WindowProxyPanel
AddInPath SetWindow()
AvailableAddIns TabInto()
LoadedAddIns
CommandContext
MainMenuStrip
MainToolStrip AddInManagerForm
WindowProxyPanel
AutoSurfaceBinding AddInPath
CreateCommands() AvailableAddIns
RegisterAddIn() LoadedAddIns
UnregisterAddIn() ActivatedAddIns
DeactivateAddIn() DeactivatedAddIns
ShowAddInManager() ShowActiv.Options
GetToolItem() AddInActiv.Type
CommandExecuted AddInSecurityLevel
SurfaceShown
Kommunikation
InitializeCommands(ICommandContext)
CreateCommand(ICommand)
Add-In Host
NotifyCommandExecuted(ICommand)
ShowSurface(WindowProxy)
Contract
Assembly
Application Add-In
Assembly Add-In
Assembly
Assembly V2