コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OrthogonalListGraph" /> class.
        /// </summary>
        /// <param name="topologyManager">The topology manager.</param>
        public OrthogonalListGraph(ITopologyManager topologyManager)
        {
            _topologyManager = topologyManager;

            _vertexList = new List <Vertex>();
            _edgeList   = new List <Edge>();

            _factory = new VertexEdgeFactory();

            this.Update();
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OrthogonalListGraph" /> class.
        /// </summary>
        /// <param name="topologyManager">The topology manager.</param>
        public OrthogonalListGraph(ITopologyManager topologyManager)
        {
            _topologyManager = topologyManager;

            _vertexList = new List<Vertex>();
            _edgeList = new List<Edge>();

            _factory = new VertexEdgeFactory();

            this.Update();
        }
コード例 #3
0
        public Control(IKeyTableFactory tableFactory, IAsynchQueueFactory queueFactory, IPrimFactory primFactory, IModel model, IConfigSource config)
            : base(tableFactory, queueFactory)
        {
            ControlConfig = config.Configs[CONTROL_CONFIG];
            IConfig commonConfig = config.Configs["Common"];

            if (ControlConfig == null)
            {
                ControlConfig = config.Configs[0];
            }
            if (commonConfig == null)
            {
                commonConfig = config.Configs[0];
            }

            _toggleGlow           = ControlConfig.GetDouble("ToggleGlow", .15);
            _fade                 = ControlConfig.GetDouble("Fade", .8);
            _defaultRecordingName = ControlConfig.Get("DefaultSequenceName", "Sequence");
            _defaultTopologyName  = ControlConfig.Get("DefaultTopologyName", "Topology");
            _multiNumber          = ControlConfig.GetInt("MultiSendNumber", 10);
            _multiSendDelay       = ControlConfig.GetInt("MultiSendDelay", 750);
            _wait                 = commonConfig.GetInt("Wait", 50);

            _factory = primFactory;

            _record      = MakeRecord(ControlConfig, tableFactory, queueFactory, primFactory);
            _topology    = MakeTopology(ControlConfig);
            _permissions = MakePermissions(tableFactory, config);
            _state       = MakeState(tableFactory, config);
            _model       = Record.Make <IModel>(model, false);

            string tableName  = ControlConfig.Get(TABLE_KEY, null);
            int    tableCount = ControlConfig.GetInt(TABLE_COUNT, 1);

            _tables = new List <RoutingTable>();
            if (tableName != null && tableCount > 1)
            {
                for (int i = 1; i <= tableCount; i++)
                {
                    _tables.Add(new RoutingTable(Factory.MakeButton(tableName + i, Permissions), this, Factory));
                }
            }
            else if (tableName != null)
            {
                _tables.Add(new RoutingTable(Factory.MakeButton(tableName, Permissions), this, Factory));
            }
            _tables.Add(new RoutingTable(Factory.MakeButton(ControlConfig.Get(TABLE_HUD_KEY, "TableDisplayHUD"), Permissions), this, Factory));

            Logger.Info("Control started.");
        }