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

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

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos,
                typeof(MapDataCollectionContext),
                typeof(MapDataCollectionProperties));

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos,
                typeof(MapPointDataContext),
                typeof(MapPointDataProperties));

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos,
                typeof(MapLineDataContext),
                typeof(MapLineDataProperties));

            PluginTestHelper.AssertPropertyInfoDefined(
                propertyInfos,
                typeof(MapPolygonDataContext),
                typeof(MapPolygonDataProperties));
        }
示例#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();
        }
 public void SetUp()
 {
     info = MapPropertyInfoFactory.Create().Single(pi => pi.PropertyObjectType == typeof(MapLineDataProperties));
 }