public TransformViewState(TransformOptions opts) { views = new Dictionary <ViewVersion, TransformViewOptions> { [ViewVersion.Round] = new RoundOptions(opts) }; CurrentType = DEFAULT_TYPE; }
public View(string name, bool bigEndian = true) : base(name, "View", bigEndian) { _version = ViewVersion.GH1; _views = new List <string>(); _bones = new List <string>(); _transform = null; _meshes = new List <string>(); }
public void SwitchType(ViewVersion type) { var newView = views[type]; if (newView == null) { throw new ArgumentException(String.Format("Transformation {0} isn't implemented!", type)); } CurrentType = type; }
private static bool IsVersionValid(ViewVersion version) { switch (version) { case ViewVersion.GH1: // PS2 - GH1 return(true); default: return(false); } }
public static RedirectToRouteResult RedirectToVersion(this Controller controller, string actionName, string controllerName) { if (controller == null) { throw new ArgumentNullException("controller"); } ViewVersion viewVersion = controller.HttpContext.Request.IsMobile() ? ViewVersion.Mobile : ViewVersion.Full; RouteValueDictionary routeValues = viewVersion == ViewVersion.Mobile ? new RouteValueDictionary(new { version = ViewVersion.Mobile }) : null; RouteValueDictionary routeValues1 = controller.RouteData == null ? MergeRouteValues(actionName, controllerName, null, routeValues, true) : MergeRouteValues(actionName, controllerName, controller.RouteData.Values, routeValues, true); return(new RedirectToRouteResult(routeValues1)); }
private static bool DetermineEndianess(byte[] head, out ViewVersion version, out bool valid) { bool bigEndian = false; version = (ViewVersion)BitConverter.ToInt32(head, 0); valid = IsVersionValid(version); checkVersion: if (!valid && !bigEndian) { bigEndian = !bigEndian; Array.Reverse(head); version = (ViewVersion)BitConverter.ToInt32(head, 0); valid = IsVersionValid(version); goto checkVersion; } return(bigEndian); }
public void SwitchView(ViewVersion type) { View.SwitchType(type); ViewChanged(); }
public BoxItem(ViewVersion type, string name) { Type = type; Name = name; }