コード例 #1
0
        private void SetScreenMode(eScreenMode mode)
        {
            m_eScreenMode = mode;
            switch (mode)
            {
            case eScreenMode.Idle:
                CtrlUtil.ClearControlData(this.Controls);
                CtrlUtil.EnabledControl(false, this.Controls);
                CtrlUtil.EnabledControl(true, chkItemFlag, txtRemark, btnSourceOrder, btnRun);
                CtrlUtil.VisibleControl(false, picWaiting);
                this.ClearSpread(shtViewHeader, shtViewDetail);
                SetDefaultControl();
                InitialSpread();
                break;

            case eScreenMode.View:
                CtrlUtil.EnabledControl(false, this.Controls);
                CtrlUtil.EnabledControl(true, chkItemFlag, txtRemark, btnSourceOrder, btnRun);
                CtrlUtil.VisibleControl(false, picWaiting);
                CtrlUtil.EnabledControl(chkItemFlag.Checked, txtItemCodeFrom, txtItemCodeTo, btnSearchItemFrom, btnSearchItemTo);

                //if (shtViewHeader.Columns.Count > 0)
                //{
                //    SpreadVisibleColumn(false, shtViewHeader, (int)eHeader.ItemCLS,
                //                                              (int)eHeader.OrderProcessCLS,
                //                                              (int)eHeader.InvUMCLS,
                //                                              (int)eHeader.OrderUMCLS,
                //                                              (int)eHeader.MaxCapacity,
                //                                              (int)eHeader.InventoryQty
                //        );
                //}
                //if (shtViewDetail.Columns.Count > 0)
                //{
                //    SpreadVisibleColumn(false, shtViewDetail, (int)eDetail.ItemCD, (int)eDetail.OrderLocCD, (int)eDetail.RecordNo);
                //}
                break;

            case eScreenMode.Simulate:
                CtrlUtil.EnabledControl(false, this.Controls);
                break;
            }
        }