private void InitializeNuiViz(EventType eventType, EventTypePluginData data) { DebugHelper.AssertUIThread(); Debug.Assert(data != null); if ((this.plugins != null) && (data.context == null)) { bool okay = false; viz.Context context = new viz.Context(); if (context.HasInitialized()) { data.imageContext = new viz.D3DImageContext(); data.context = context; foreach (IImageVisualPlugin imagePlugin in this.plugins.OfType <IImageVisualPlugin>()) { imagePlugin.InitializeRender(eventType, context); } okay = true; } else { context.Dispose(); } if (!okay) { if (this.loggingService != null) { this.loggingService.LogLine(Strings.Error_LimitedGraphics); } if (this.notificationService != null) { Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() => { this.notificationService.ShowMessageBox(Strings.Error_LimitedGraphics); })); } } } }