Beispiel #1
0
        public void HandleState(object sender, string oldState, string uiEvent, string newState, Dictionary <string, object> data, BaseContext baseContext)
        {
            //if(uiEvent.Equals(UIEvent.ADD))
            //{
            //    ConfigFactory config = baseContext.Config;
            //    IAction addAction = config.GetInstance("del_action") as IAction;
            //    addAction.Enabled = false;
            //}


            XBroadcastAction action = sender as XBroadcastAction;

            switch (newState)
            {
            case UIState.EDIT:
                action.Visible = true;
                action.Enabled = true;
                break;

            case UIState.VIEW:
                action.Visible = true;
                action.Enabled = false;
                break;

            default:
                action.Visible = false;
                break;
            }
        }
Beispiel #2
0
        public void HandleState(object sender, string oldState, string uiEvent, string newState, Dictionary <string, object> data, BaseContext baseContext)
        {
            XBroadcastAction action = sender as XBroadcastAction;

            switch (uiEvent)
            {
            case UIEvent.ADD:
            case Utils.SELECTROWONLYNEW:
            case Utils.SELECTROWONLYSAVED:
            case Utils.SELECTROWITEM:
                action.Visible = true;
                action.Enabled = true;
                break;

            case UIEvent.DELETE:
            case UIEvent.SAVE:
            case UIEvent.PRINT:
            case Utils.TOADD:
            case Utils.TOSAVE:
            case Utils.SAVESUCESS:
            case Utils.PRINTSUCESS:
                break;

            default:
                action.Visible = true;
                action.Enabled = false;
                break;
            }
        }
        public void HandleState(object sender, string oldState, string uiEvent, string newState, Dictionary <string, object> data, BaseContext baseContext)
        {
            XBroadcastAction action = sender as XBroadcastAction;

            switch (uiEvent)
            {
            case UIEvent.SAVE:
            case CiDictCodeConst.SD_SU_RPT_OPEN:
                action.Visible = true;
                action.Enabled = true;
                break;

            case "unity":
                action.Visible = true;
                action.Enabled = false;
                break;

            case "complete":
            case "conscom":
            case "print":
                break;

            default:
                action.Visible = true;
                action.Enabled = false;
                break;
            }
        }
Beispiel #4
0
        private void GetActionView()
        {
            List <XBaseControl> xBaseCtrlList = this.Context.Config.GetViews();

            foreach (XBaseControl xBaseCtrl in xBaseCtrlList)
            {
                XBroadcastAction action = new XBroadcastAction();
                menuActionList.Add(action);
            }
        }
Beispiel #5
0
        public void HandleState(object sender, string oldState, string uiEvent, string newState, Dictionary <string, object> data, BaseContext baseContext)
        {
            XBroadcastAction action = sender as XBroadcastAction;

            switch (uiEvent)
            {
            //case CiDictCodeConst.SD_SU_OPEN:
            //    action.Enabled = true;
            //    break;
            default:
                action.Enabled = true;
                break;
            }
        }
Beispiel #6
0
        public override void HandleState(object sender, DictionaryEventArgs e)
        {
            if (sender is XBroadcastAction)
            {
                XBroadcastAction xBroadCastAction = sender as XBroadcastAction;
                LoadAssiFrameByShortCut(xBroadCastAction.UiEvent);
            }
            string eventCode = AssToolEx.EventCodeOfEventArgs(e);

            switch (eventCode)
            {
            case EventCodeType.EVENT_ASSI_SHOW_ORDERTEMPLATE_OR_EDIT:
                bool isShow = (bool)BaseEmsView.BaseEmsInfoContext["IsShowOphelperWhenOrOpen"];
                if (isShow)
                {
                    this.switchToPithy();
                }
                break;
            }
        }
        public void HandleState(object sender, string oldState, string uiEvent, string newState, Dictionary <string, object> data, BaseContext baseContext)
        {
            XBroadcastAction action = sender as XBroadcastAction;

            switch (newState)
            {
            case UIState.INIT:
                action.Visible = true;
                action.Enabled = false;
                break;

            case UIState.ROW_SELECTED:
                action.Visible = true;
                action.Enabled = true;
                break;

            default:
                action.Visible = false;
                break;
            }
        }