Ejemplo n.º 1
0
        public static void Handle(VM.HandleCommand cmdHandler, VM.HandleExternalMovie movieHandler, ActionContext context, string url, string target)
        {
            logger.Debug($"[URL] URL: {url} Target: {target}");

            if (url.StartsWith("FSCommand:"))
            {
                var command = url.Replace("FSCommand:", "");

                cmdHandler(context, command, target);
            }
            else
            {
                //DO STUFF
                var targetObject = context.Scope.Variables[target].ToObject();

                if (!(targetObject.Item is SpriteItem))
                {
                    logger.Error("[URL] Target must be a sprite!");
                }

                var targetSprite = targetObject.Item as SpriteItem;
                var aptFile      = movieHandler(url);
                var oldName      = targetSprite.Name;

                targetSprite.Create(aptFile.Movie, targetSprite.Context, targetSprite.Parent);
                targetSprite.Name = oldName;
            }
        }
Ejemplo n.º 2
0
        public static void Handle(VM.HandleCommand handler, ActionContext context, string url, string target)
        {
            Debug.WriteLine("[URL] URL: " + url + " Target: " + target);

            if (url.StartsWith("FSCommand:"))
            {
                var command = url.Replace("FSCommand:", "");

                handler(context, command);
            }
        }
Ejemplo n.º 3
0
        public static void Handle(VM.HandleCommand handler, ActionContext context, string url, string target)
        {
            logger.Debug($"[URL] URL: {url} Target: {target}");

            if (url.StartsWith("FSCommand:"))
            {
                var command = url.Replace("FSCommand:", "");

                handler(context, command, target);
            }
        }