public void TestCreateGraph() { graph = new MemoryStorageGraph(); var factoryset = new FactorySet <IContainer>(); factoryset .Factories .Add( PolylineContainer.CreateFactory( new FactorySet <PolylineData>( PolylineData.FactoryInstance ), new ViewerSet <PolylineData>() ) ); file = new EditorFile(graph, factoryset); obj1 = graph.CreateObject(); obj2 = graph.CreateObject(); }
void InitContainers() { var controllers_factoryset = new FactorySet <ITrackController>( SheetMusicEditor.CreateFactory() ); var controllers_viewerset = new ViewerSet <ITrackController>( SheetMusicEditorView.Viewer.Instance ); var tracks_factoryset = new FactorySet <ITrack>( MusicTrackFactory.Instance ); var tracks_viewerset = new ViewerSet <ITrack>(); containerfactoryset.Factories.Add( TrackControllerContainer.CreateFactory( tracks_factoryset, tracks_viewerset, controllers_factoryset, controllers_viewerset ) ); containerfactoryset.Factories.Add( PolylineContainer.CreateFactory( new FactorySet <PolylineData>( PolylineData.FactoryInstance ), new ViewerSet <PolylineData>( ) ) ); containerfactoryset.Factories.Add( FunctionContainer.CreateFactory( new FunctionCodeTools( SquareFunction.FactoryClass.Instance, PolylineFunction.FactoryClass.Instance, PolynomialFunction.FactoryClass.Instance, PulseWidthModulatedFunction.FactoryClass.Instance, LocalPerspectiveFunction.FactoryClass.Instance, GlobalPerspectiveFunction.FactoryClass.Instance ), new FactorySet <FunctionSource>( FunctionSource.FactoryInstance ), new ViewerSet <FunctionSource>( ) ) ); containerfactoryset.Factories.Add( ScreenContainer.CreateFactory( new FactorySet <IScreen>( TrackControllerScreen.FactoryInstance ), new ViewerSet <IScreen>( TrackControllerScreenView.Viewer.Instance ) ) ); }