示例#1
0
文件: HubControl.cs 项目: revilor/BAP
        public HubControl(Hub hub)
        {
            Hub = hub;
            Hub.PortTypeUpdated += RefreshUI;
            Hub.DataUpdated     += UpdateLabels;

            Editor = new HubEditor(Hub);

            InitializeComponent();
            InitControl();
        }
示例#2
0
        //modified by Tom Cook for MU function to add TrainProject project to class where need to loop thru all hubs and ports
        //public HubControl(Hub hub)
        public HubControl(Hub hub, TrainProject project)
        {
            Hub = hub;
            Hub.PortTypeUpdated += RefreshUI;
            Hub.DataUpdated     += UpdateLabels;

            //modified by Tom Cook, see above
            //Editor = new HubEditor(Hub);
            Editor = new HubEditor(Hub, project);

            //added by Tom Cook, see above
            Project = project;

            InitializeComponent();
            InitControl();
        }