Beispiel #1
0
        private void btnCellAdd_Click(object sender, EventArgs e)
        {
            ICell cell = CellsFactory.Instance.CreateCell();

            cell.OnCellOutputUpdate += (OnCellOutputUpdateEvent);

            if (cell != null)
            {
                CellsManager.Instance.Cells.Add(cell);

                CellDisplay cellDis = new CellDisplay();
                cellDis.CellName = cell.CellName;
                cellDis.CellGuid = cell.CellID;
                cellDis.Dock     = DockStyle.Top;
                cellDis.CellConfigUIVisibleEvent   += new CellConfigUIVisibleEventHandler(OnCellConfigUIVisibleEvent);
                cellDis.CellOutputUIVisibleEvent   += new CellOutputUIVisibleEventHandler(OnCellOutputUIVisibleEvent);
                cellDis.CellDisplayChangeNameEvent += new CellDisplayChangeNameEventHandler(OnCellDisplayChangeNameEvent);
                cellDis.DelCellDisplayEvent        += new DelCellDisplayEventHandler(OnDelCellDisplayEvent);

                pnlCell.Controls.Add(cellDis);
            }
        }
Beispiel #2
0
        public ICell CreateCell(XmlNode node)
        {
            ICell cell = CellsFactory.Instance.CreateCell(node);

            cell.OnCellOutputUpdate += (OnCellOutputUpdateEvent);

            if (cell != null)
            {
                CellsManager.Instance.Cells.Add(cell);

                CellDisplay cellDis = new CellDisplay();
                cellDis.CellName = cell.CellName;
                cellDis.CellGuid = cell.CellID;
                cellDis.Dock     = DockStyle.Top;
                cellDis.CellConfigUIVisibleEvent   += new CellConfigUIVisibleEventHandler(OnCellConfigUIVisibleEvent);
                cellDis.CellOutputUIVisibleEvent   += new CellOutputUIVisibleEventHandler(OnCellOutputUIVisibleEvent);
                cellDis.CellDisplayChangeNameEvent += new CellDisplayChangeNameEventHandler(OnCellDisplayChangeNameEvent);
                cellDis.DelCellDisplayEvent        += new DelCellDisplayEventHandler(OnDelCellDisplayEvent);

                pnlCell.Controls.Add(cellDis);
            }

            return(cell);
        }