Beispiel #1
0
 public void OnSendAction(ViewActionType actionType, CustomObject data)
 {
     foreach (var uiComponentView in _components)
     {
         uiComponentView?.SendAction(actionType, data);
     }
 }
Beispiel #2
0
 public override void SendAction(ViewActionType actionType, CustomObject data)
 {
     switch (actionType)
     {
     case ViewActionType.LevelWin:
         StartCoroutine(ShowLevelWindCoroutine());
         break;
     }
 }
Beispiel #3
0
 public override void SendAction(ViewActionType actionType, CustomObject data)
 {
     switch (actionType)
     {
     case ViewActionType.LevelNumUpdate:
         _levelText.text = string.Format(_levelTemplate, data.GetValue <int>());
         break;
     }
 }
Beispiel #4
0
        public ViewAction AddToView(UXAction action, ViewNode viewNode, ViewActionType viewActionType, MappedProperty mappedProperty)
        {
            ViewNode readViewNode = ViewNodeDao.FindById(viewNode.Id);
            UXAction readAction   = UXActionDao.FindById(action.Id);

            NHibernateUtil.Initialize(readAction);
            NHibernateUtil.Initialize(readAction.Dialog);
            NHibernateUtil.Initialize(readAction.ServiceMethod);
            NHibernateUtil.Initialize(readAction.CustomDialog);
            NHibernateUtil.Initialize(readViewNode.View);

            IList <ViewAction> viewActions = ViewActionDao.FindAllByViewNodeId(viewNode.Id);

            int nextSequence = 1;

            if (viewActions != null && viewActions.Count > 0)
            {
                // Get the maxsequence
                nextSequence = viewActions.Max(vAction => vAction.Sequence);

                // Add one so we get a unique sequence.
                nextSequence++;
            }

            // Create the new Viewaction
            ViewAction viewAction = new ViewAction();

            viewAction.ViewNode = readViewNode;
            viewAction.Action   = readAction;
            viewAction.Sequence = nextSequence;
            viewAction.Type     = viewActionType;
            viewAction.DrilldownFieldMappedProperty = ((viewActionType == ViewActionType.Drilldown) || (viewActionType == ViewActionType.JumpTo)) ? mappedProperty : null;

            viewAction = ViewActionDao.Save(viewAction);

            NHibernateUtil.Initialize(viewAction.ViewNode);
            NHibernateUtil.Initialize(viewAction.ViewNode.ViewActions);
            NHibernateUtil.Initialize(viewAction.Action);
            NHibernateUtil.Initialize(viewAction.DrilldownFieldMappedProperty);

            return(viewAction);
        }
Beispiel #5
0
 public UIViewActionArgs(ViewActionType actionType)
 {
     ActionType = actionType;
     Data       = CustomObject.Empty;
 }
Beispiel #6
0
 public UIViewActionArgs(ViewActionType actionType, CustomObject customObject)
 {
     ActionType = actionType;
     Data       = customObject;
 }
Beispiel #7
0
 public abstract void SendAction(ViewActionType actionType, CustomObject data);