Example #1
0
        public virtual void Deserialize(XElement node)
        {
            var sX = node.Attribute("x")?.Value;
            var sY = node.Attribute("y")?.Value;

            var x = 0.0;
            var y = 0.0;

            double.TryParse(sX, out x);
            double.TryParse(sY, out y);

            SetPosition(x, y);

            var controllerNode = node.Element("controller");

            if (controllerNode != null)
            {
                InnerController.Deserialize(controllerNode);
            }


            var optionsNode = node.Element("options");

            if (optionsNode != null)
            {
                DeserializeOptions(optionsNode);
            }
        }
Example #2
0
 private void OnTriggerStay2D(Collider2D col)
 {
     // Controller detect
     if (col.gameObject.layer == 11)
     {
         //canMove = !Input.GetKey(inputKey[(int)GameSetting.PlayerInput.Interact]);
         InnerController controller = col.GetComponent <InnerController>();
         if (Input.GetKey(inputKey[(int)GameSetting.PlayerInput.Interact]))
         {
             canMove = false;
             if (controller.usingPlayer == null)
             {
                 //beforeUsingPos = transform.localPosition;
                 controller.usingPlayer = this;
             }
             controller.Use();
             transform.position = col.transform.position;
         }
         if (Input.GetKeyUp(inputKey[(int)GameSetting.PlayerInput.Interact]))
         {
             if (controller != null)
             {
                 controller.usingPlayer = null;
             }
             controller.StopUse();
             canMove = true;
         }
     }
 }
        public virtual ActionResult Index([ModelBinder(typeof(FormModelBinder))] FormModel form)
        {
            Assert.ArgumentNotNull(form, "form");
            if (this.FormManager == null)
            {
                return(null);
            }
            string returnUrl = System.Web.HttpContext.Current.Request["returnUrl"];

            if (string.IsNullOrEmpty(returnUrl))
            {
                returnUrl = HttpUtility.ParseQueryString(System.Web.HttpContext.Current.Request.UrlReferrer.Query)["returnUrl"];
            }
            if (!string.IsNullOrEmpty(returnUrl))
            {
                return(base.RedirectToRoute(MvcSettings.SitecoreRouteName, new
                {
                    pathInfo = returnUrl.TrimStart(new char[]
                    {
                        '/'
                    })
                }));
            }
            return(InnerController.Index(form));
        }
Example #4
0
 /// <inheritdoc/>
 public string Serialize(ITestCase testCase)
 => InnerController.Serialize(testCase);
Example #5
0
 /// <inheritdoc/>
 public virtual void RunTests(IEnumerable <ITestCase> testMethods, IMessageSink messageSink, ITestFrameworkExecutionOptions executionOptions)
 {
     InnerController.RunTests(testMethods, messageSink, executionOptions);
 }
Example #6
0
 /// <inheritdoc/>
 public virtual void RunAll(IMessageSink messageSink, ITestFrameworkDiscoveryOptions discoveryOptions, ITestFrameworkExecutionOptions executionOptions)
 {
     InnerController.RunAll(messageSink, discoveryOptions, executionOptions);
 }
Example #7
0
 /// <inheritdoc/>
 public virtual void Find(string typeName, bool includeSourceInformation, IMessageSink messageSink, ITestFrameworkDiscoveryOptions discoveryOptions)
 {
     InnerController.Find(typeName, includeSourceInformation, messageSink, discoveryOptions);
 }
Example #8
0
 /// <inheritdoc/>
 public ITestCase Deserialize(string value)
 => InnerController.Deserialize(value);
Example #9
0
 /// <inheritdoc/>
 public ITestCase Deserialize(string value)
 {
     return(InnerController.Deserialize(value));
 }
Example #10
0
 /// <inheritdoc/>
 public string Serialize(ITestCase testCase)
 {
     return(InnerController.Serialize(testCase));
 }
Example #11
0
 /// <inheritdoc/>
 public virtual void Find(string typeName, bool includeSourceInformation, IMessageSink messageSink)
 {
     InnerController.Find(typeName, includeSourceInformation, messageSink);
 }
Example #12
0
 /// <inheritdoc/>
 public virtual void Find(bool includeSourceInformation, IMessageSink messageSink)
 {
     InnerController.Find(includeSourceInformation, messageSink);
 }
Example #13
0
 /// <inheritdoc/>
 public virtual void Find(bool includeSourceInformation, IMessageSink messageSink, ITestFrameworkOptions options)
 {
     InnerController.Find(includeSourceInformation, messageSink, options);
 }
 public override ActionResult Index()
 {
     return(InnerController.Index());
 }