예제 #1
0
        private void AddPanel(Screen screen)
        {
            switch (screen)
            {
                case Screen.Product:
                    if (_UC_PRODUCT == null) _UC_PRODUCT = new UcDataProduct();
                    _USER_CONTROL = _UC_PRODUCT;
                    break;
                case Screen.Claim:
                    if (_UC_CLAIM == null) _UC_CLAIM = new UcClaim();
                    _USER_CONTROL = _UC_CLAIM;
                    break;
                case Screen.StockMonitor:
                    if (_UC_STOCK_MONITOR == null) _UC_STOCK_MONITOR = new UcStockMonitor();
                    _USER_CONTROL = _UC_STOCK_MONITOR;
                    break;
                case Screen.Report:
                    if (_UC_REPORT == null) _UC_REPORT = new UcReport();
                    _USER_CONTROL = _UC_REPORT;
                    break;
                case Screen.Member:
                    if (_UC_MEMBER == null) _UC_MEMBER = new UcMember();
                    _USER_CONTROL = _UC_MEMBER;
                    break;
            }

            if (!pnlMain.Contains(_USER_CONTROL))
            {
                pnlMain.Controls.Clear();
                _USER_CONTROL.Dock = DockStyle.Fill;
                pnlMain.Controls.Add(_USER_CONTROL);
            }
        }
예제 #2
0
        private void AddPanel(Screen screen)
        {
            switch (screen)
            {
            case Screen.Product:
                if (_UC_PRODUCT == null)
                {
                    _UC_PRODUCT = new UcDataProduct();
                }
                _USER_CONTROL = _UC_PRODUCT;
                break;

            case Screen.Claim:
                if (_UC_CLAIM == null)
                {
                    _UC_CLAIM = new UcClaim();
                }
                _USER_CONTROL = _UC_CLAIM;
                break;

            case Screen.StockMonitor:
                if (_UC_STOCK_MONITOR == null)
                {
                    _UC_STOCK_MONITOR = new UcStockMonitor();
                }
                _USER_CONTROL = _UC_STOCK_MONITOR;
                break;

            case Screen.Report:
                if (_UC_REPORT == null)
                {
                    _UC_REPORT = new UcReport();
                }
                _USER_CONTROL = _UC_REPORT;
                break;

            case Screen.Member:
                if (_UC_MEMBER == null)
                {
                    _UC_MEMBER = new UcMember();
                }
                _USER_CONTROL = _UC_MEMBER;
                break;
            }

            if (!pnlMain.Contains(_USER_CONTROL))
            {
                pnlMain.Controls.Clear();
                _USER_CONTROL.Dock = DockStyle.Fill;
                pnlMain.Controls.Add(_USER_CONTROL);
            }
        }