/// <summary> /// Registers external data provider (IRegisterDataProvider) /// </summary> /// <param name="dataProvider">data provider</param> public void RegisterDataProvider(IGraphDataProvider dataProvider) { if (dataProvider == null) { throw new InvalidArgumentException("parameter is null"); } dataProvider.OnReceiveData += DataProvider_OnReceiveData; // Subcribe to pre loaded data if (dataProvider is IGraphDataArrayProvider) { ((IGraphDataArrayProvider)dataProvider).OnGraphDataArrayReceived += DataService_OnGraphDataArrayReceived; } }
private void GetGraphData(IGraphDataProvider oGraphDataProvider) { wbWebBrowser.GoHome(); String sGraphData; if ( !oGraphDataProvider.TryGetGraphData(out sGraphData) ) { return; } using ( StreamWriter oStreamWriter = new StreamWriter(TempXmlFileName) ) { oStreamWriter.Write(sGraphData); } wbWebBrowser.Navigate(TempXmlFileName); }
private void GetGraphData(IGraphDataProvider oGraphDataProvider) { wbWebBrowser.GoHome(); String sGraphData; if (!oGraphDataProvider.TryGetGraphData(out sGraphData)) { return; } using (StreamWriter oStreamWriter = new StreamWriter(TempXmlFileName)) { oStreamWriter.Write(sGraphData); } wbWebBrowser.Navigate(TempXmlFileName); }
public void RegisterDataProvider(IGraphDataProvider dataProvider) { }
public void RegisterDataProvider(IGraphDataProvider dataProvider) { this.dataService.RegisterDataProvider(dataProvider); }
public void RegisterDataProvider(IGraphDataProvider dataProvider) { this.graphControlWinForms.RegisterDataProvider(dataProvider); }
//************************************************************************* // Method: ImportFromGraphDataProvider() // /// <summary> /// Imports a graph from an IGraphDataProvider implementation. /// </summary> //************************************************************************* public void ImportFromGraphDataProvider( IGraphDataProvider graphDataProvider ) { Debug.Assert(graphDataProvider != null); AssertValid(); if ( !this.ExcelApplicationIsReady(true) ) { return; } ShowWaitCursor = true; try { String sGraphDataAsGraphML; if (!graphDataProvider.TryGetGraphData(out sGraphDataAsGraphML) ) { return; } IGraph oGraph = ( new GraphMLGraphAdapter() ).LoadGraphFromString( sGraphDataAsGraphML); ImportGraph(oGraph, ( String[] )oGraph.GetRequiredValue( ReservedMetadataKeys.AllEdgeMetadataKeys, typeof( String[] ) ), ( String[] )oGraph.GetRequiredValue( ReservedMetadataKeys.AllVertexMetadataKeys, typeof( String[] ) ) ); } catch (Exception oException) { ErrorUtil.OnException(oException); } finally { ShowWaitCursor = false; } }