Exemplo n.º 1
0
 public override void execute(AnomalousMvcContext context)
 {
     if (LinkName != null)
     {
         NavigationModel navModel = context.getModel <NavigationModel>(NavigationModelName);
         if (navModel != null)
         {
             NavigationLink namedAction = navModel.getNamed(LinkName);
             if (namedAction != null)
             {
                 context.queueRunAction(namedAction.Action);
             }
             else
             {
                 Log.Warning("Cannot find named navigation link '{0}' in navigation model. Has it been setup properly?", LinkName, NavigationModelName);
             }
         }
         else
         {
             Log.Warning("Cannot find navigation model '{0}'. Has it been setup properly?", NavigationModelName);
         }
     }
     else
     {
         Log.Warning("Link name is null. Cannot navigate.");
     }
 }
        public override void execute(AnomalousMvcContext context)
        {
            NavigationModel navModel = context.getModel <NavigationModel>(NavigationModelName);

            if (navModel != null)
            {
                NavigationLink previousAction = navModel.getPrevious();
                if (previousAction != null)
                {
                    context.queueRunAction(previousAction.Action);
                }
            }
            else
            {
                Log.Warning("Cannot find navigation model '{0}'. Has it been setup properly?", NavigationModelName);
            }
        }
Exemplo n.º 3
0
        public override void execute(AnomalousMvcContext context)
        {
            NavigationModel navModel = context.getModel <NavigationModel>(NavigationModelName);

            if (navModel != null)
            {
                NavigationLink namedAction = navModel.getAt(Index);
                if (namedAction != null)
                {
                    context.queueRunAction(namedAction.Action);
                }
                else
                {
                    Log.Warning("Cannot find navigation link at index '{0}' in navigation model '{1}'. Has it been setup properly?", Index, NavigationModelName);
                }
            }
            else
            {
                Log.Warning("Cannot find navigation model '{0}'. Has it been setup properly?", NavigationModelName);
            }
        }
        public override void execute(AnomalousMvcContext context)
        {
            NavigationModel navModel = context.getModel <NavigationModel>(NavigationModelName);

            if (navModel != null)
            {
                NavigationLink namedAction = navModel.getLast();
                if (namedAction != null)
                {
                    context.queueRunAction(namedAction.Action);
                }
                else
                {
                    Log.Warning("Cannot find a last element for navigation model '{0}', which means its empty. Has it been setup properly?", NavigationModelName);
                }
            }
            else
            {
                Log.Warning("Cannot find navigation model '{0}'. Has it been setup properly?", NavigationModelName);
            }
        }
Exemplo n.º 5
0
 public void insertNavigationLink(int index, NavigationLink item)
 {
     links.Insert(index, item);
     refreshLinkDefinitions();
 }
Exemplo n.º 6
0
 public void removeNavigationLink(NavigationLink link)
 {
     links.Remove(link);
     removeLinkDefinition(link);
 }
Exemplo n.º 7
0
 public void addNavigationLink(NavigationLink link)
 {
     links.Add(link);
     addLinkDefinition(link);
 }