Example #1
0
        /// <summary>
        /// Set ScreenState and set enable property to evoControl.
        /// </summary>
        /// <param name="screenState">ScreenState that want to set.</param>
        protected void SetScreenState(eScreenState screenState)
        {
            this.m_ScreenStateEnum = screenState;
            txtNoOfMonth.Text      = "12";
            switch (m_ScreenStateEnum)
            {
            case eScreenState.View:
                tsbEdit.Enabled          = false;
                tsbCancel.Enabled        = false;
                tsbSave.Enabled          = false;
                evoGroupBox1.Enabled     = true;
                evoGBSelectMonth.Enabled = true;
                break;

            case eScreenState.Idle:
                tsbEdit.Enabled          = true;
                tsbCancel.Enabled        = false;
                tsbSave.Enabled          = false;
                evoGroupBox1.Enabled     = true;
                evoGBSelectMonth.Enabled = true;
                break;

            case eScreenState.Edit:
                tsbEdit.Enabled      = false;
                tsbCancel.Enabled    = true;
                tsbSave.Enabled      = true;
                evoGroupBox1.Enabled = false;
                //evoGBSelectMonth.Enabled = false;
                break;
            }
        }
Example #2
0
    public override void Initialize(object[] screenParams)
    {
        base.Initialize(screenParams);

        // TODO
        // perhaps start some kind of gentle space audio track

        m_State = eScreenState.Title;

        // passing this along will handle input blocking while the screen content is animating
        m_ContentRelay.OnAnimationEvent += ContentAnimationEvent;

        m_MainMenu.OnItemSelected += OnMenuItemSelected;
        m_MainMenu.PopulateMenu();
    }
Example #3
0
        /// <summary>
        /// Set ScreenState and enable Controls.
        /// </summary>
        /// <param name="screenState">ScreenState that want to add.</param>
        private void SetScreenState(eScreenState screenState)
        {
            m_ScreenStateEnum = screenState;

            ctxMenu.Items.Clear();

            tsbSaveAndNew.Enabled   = true;
            tsbSaveAndClose.Enabled = true;
            tsbCancelPO.Visible     = false;
            gbPOH.Enabled           = true;
            pnlPO.Enabled           = true;
            ctxMenu.Items.Add("Add");
            ctxMenu.Items[0].Click += ctxAdd_Click;
            shtView.OperationMode   = OperationMode.Normal;

            switch (m_ScreenStateEnum)
            {
            case eScreenState.View:
                tsbSaveAndNew.Enabled   = false;
                tsbSaveAndClose.Enabled = false;
                gbPOH.Enabled           = false;
                pnlPO.Enabled           = false;
                ctxMenu.Items.Clear();
                shtView.OperationMode = OperationMode.SingleSelect;
                break;

            case eScreenState.Edit:
                tsbCancelPO.Visible = true;
                if (shtView.Rows.Count > 0)
                {
                    ctxMenu.Items.Add("Delete");
                    ctxMenu.Items[1].Click += new EventHandler(ctxDelete_Click);
                }
                break;
            }
            if (m_ScreenStateEnum == eScreenState.Edit || m_ScreenStateEnum == eScreenState.Add)
            {
                for (int iColumn = 0; iColumn < iUnLockedColumn.Length; iColumn++)
                {
                    if (m_ScreenStateEnum == eScreenState.Edit && iColumn > 1 || m_ScreenStateEnum == eScreenState.Add)
                    {
                        shtView.Columns[iUnLockedColumn[iColumn]].Locked = false;
                    }
                    shtView.Columns[iUnLockedColumn[iColumn]].ForeColor = Color.Blue;
                }
            }
        }
Example #4
0
    // receive the event from the screen content animator and pass it on
    public void ContentAnimationEvent(UIScreenAnimEvent animEvent)
    {
        OnUIScreenAnimEvent(animEvent);

        switch (animEvent)
        {
        case UIScreenAnimEvent.Start:
            break;

        case UIScreenAnimEvent.End:
            if (m_State == eScreenState.Title)
            {
                m_State = eScreenState.Menu;
            }
            else
            {
                m_State = eScreenState.Title;
            }
            break;
        }
    }
Example #5
0
        private void SetScreenState(eScreenState screenState)
        {
            this.m_ScreenStateEnum = screenState;
            shtView.OperationMode  = OperationMode.Normal;
            ctxMenu.Items.Clear();

            switch (m_ScreenStateEnum)
            {
            case (eScreenState.Edit):
                tsbSaveAndClose.Enabled = true;
                btnSearch.Enabled       = dtpDemand.Enabled = txtCusCD.Enabled = btnSearchByCustomerCode.Enabled = false;
                ctxMenu.Items.Add("Add");
                ctxMenu.Items[0].Click += new EventHandler(AddContextMenu_Click);
                if (shtView.RowCount > 0)
                {
                    ctxMenu.Items.Add("Delete");
                    ctxMenu.Items[1].Click += new EventHandler(DeleteContextMenu_Click);
                }
                break;

            case (eScreenState.Add):
                btnSearch.Enabled = dtpDemand.Enabled = txtCusCD.Enabled = btnSearchByCustomerCode.Enabled = false;

                tsbSaveAndClose.Enabled = true;

                ctxMenu.Items.Add("Add");
                ctxMenu.Items[0].Click += new EventHandler(AddContextMenu_Click);
                break;

            case (eScreenState.View):
                shtView.RowCount        = 0;
                tsbSaveAndClose.Enabled = false;
                btnSearch.Enabled       = dtpDemand.Enabled = txtCusCD.Enabled = btnSearchByCustomerCode.Enabled = true;
                break;
            }
        }
 public StateChangedEventArgs(eScreenState i_PrevState, eScreenState i_CurrState)
 {
     m_PrevState    = i_PrevState;
     m_CurrentState = i_CurrState;
 }