예제 #1
0
        public Control Wrap(ISessionDto obj)
        {
            var dto     = obj as MasterDto;
            var control = new ModbusControl
            {
                Text = dto.Name,
                Dock = DockStyle.Fill,
            };

            control.ToUI(dto);
            return(control);
        }
예제 #2
0
        private void AddSession(SessionSettings session)
        {
            var tabPage = new TabPage
            {
                Text = session.Name
            };
            var ModbusControl = new ModbusControl
            {
                Dock = DockStyle.Fill
            };

            tabPage.Controls.Add(ModbusControl);
            tabControl.TabPages.Add(tabPage);
            ModbusControl.ToUI(session);
            tabControl.SelectedTab = tabPage;
        }