Beispiel #1
0
        public void Create_Always_ReturnsPropertyInfos()
        {
            // Call
            PropertyInfo[] propertyInfos = ChartPropertyInfoFactory.Create().ToArray();

            // Assert
            Assert.AreEqual(6, propertyInfos.Length);

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos, typeof(ChartDataCollection),
                typeof(ChartDataCollectionProperties));

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos, typeof(ChartLineData),
                typeof(ChartLineDataProperties));

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos, typeof(ChartAreaData),
                typeof(ChartAreaDataProperties));

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos, typeof(ChartMultipleAreaData),
                typeof(ChartMultipleAreaDataProperties));

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos, typeof(ChartMultipleLineData),
                typeof(ChartMultipleLineDataProperties));

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos, typeof(ChartPointData),
                typeof(ChartPointDataProperties));
        }
Beispiel #2
0
        private void InitializeWindows()
        {
            InitializeMainWindow();

            ViewHost                    = mainWindow.ViewHost;
            ViewHost.ViewClosed        += OnViewClosed;
            ViewHost.ActiveViewChanged += OnActiveViewChanged;

            DocumentViewController = new DocumentViewController(ViewHost, Plugins.SelectMany(p => p.GetViewInfos()), mainWindow);

            PropertyResolver = new PropertyResolver(Plugins.SelectMany(p => p.GetPropertyInfos())
                                                    .Concat(ChartPropertyInfoFactory.Create())
                                                    .Concat(MapPropertyInfoFactory.Create()));
            applicationFeatureCommands = new ApplicationFeatureCommandHandler(PropertyResolver, mainWindow);

            mainWindow.InitializeToolWindows();

            foreach (StateInfo stateInfo in Plugins.SelectMany(pluginGui => pluginGui.GetStateInfos()))
            {
                stateInfoLookup[mainWindow.AddStateButton(stateInfo.Name, stateInfo.Symbol, stateInfo.FontFamily, stateInfo.GetRootData)] = stateInfo;
            }

            mainWindow.SubscribeToGui();
        }