void GetPosPoint() { MemberVO memberVO = new MemberVO(); memberVO.phone = "18258224036"; memberVO.gender = "0"; memberVO.memName = "buwenqing"; // memberVO.idx = "2016071800001"; memberVO.idx = DateTime.Now.ToString(); memberVO.birthday = "1987-05-24"; PointVO pointVO = new PointVO(); pointVO.yyyy = "2016"; pointVO.mm = "07"; pointVO.bgnRowNum = "0"; pointVO.endRowNum = "10"; PosPoint.getPosPoint(memberVO, pointVO); }
//string mobile = ""; //static string phone = ""; protected void Page_Load(object sender, EventArgs e) { string phone = ""; // phone= Request.QueryString["phone"]; if (HttpContext.Current.Request.Cookies["cookiePhone"] != null) { phone = HttpContext.Current.Request.Cookies["cookiePhone"].Value; } //if (HttpContext.Current.Response.Cookies["cookiePhone"] != null && !string.IsNullOrEmpty(HttpContext.Current.Response.Cookies["cookiePhone"].Value.Trim())) //{ // phone = HttpContext.Current.Response.Cookies["cookiePhone"].Value; //} if (string.IsNullOrEmpty(phone.Trim())) { if (HttpContext.Current.Session["ss"] != null && !string.IsNullOrEmpty(HttpContext.Current.Session["ss"].ToString())) { phone = HttpContext.Current.Session["ss"].ToString(); } } if (string.IsNullOrEmpty(phone.Trim())) { ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>cc();</script>"); return; } if (string.IsNullOrEmpty(phone)) { //if (!string.IsNullOrEmpty(mobile.Trim())) //{ // phone = mobile; // string url = "index.aspx?phone= " + strphone + ""; // System.Web.HttpContext.Current.Response.Redirect(url); //} //// Response.Write("<script language=javascript>window.location.reload( ); </script>" ); //else //{ // ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>if(!window.name){window.name = 'test'; window.location.href = 'index.aspx';}</script>"); //} ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>if(!window.name){window.name = 'test'; window.location.href = 'login.aspx';}</script>"); } else { txtName.InnerText = ""; PosExistMemberInfo posExistMemberInfo = new PosExistMemberInfo(); MemberVO memberVO = new MemberVO(); memberVO.phone = phone; MemberVOXML memberVOXML = new MemberVOXML(); string xml = posExistMemberInfo.getPosExistMemberInfo(memberVO); memberVOXML = (MemberVOXML)XMLToModel.XMLToModelT(xml, memberVOXML); //if (memberVOXML.Gender == "0") //{ // memberVOXML.Gender = "男"; //} //else if (memberVOXML.Gender == "1") //{ // memberVOXML.Gender = "女"; //} txtname1.Value = txtName.InnerText = memberVOXML.VIPName; txtbrith.Value = memberVOXML.Birthday; txtphone.Value = phone; // txtsex.Value = memberVOXML.Gender; txtVIP.InnerText = memberVOXML.CardTypeName; if (memberVOXML.CardTypeCode == "502") { imgVIP.Src = "/images/VIP-01.jpg"; } else if (memberVOXML.CardTypeCode == "503") { imgVIP.Src = "/images/VVIP-01.png"; } lblJF.InnerText = memberVOXML.SumJfTotal; if (string.IsNullOrEmpty(lblJF.InnerText.Trim())) { lblJF.InnerText = "0"; } QueryCertiByHyCard q = new QueryCertiByHyCard(); List <CardJson> list = q.getQueryCertiByHyCard(phone); if (!string.IsNullOrEmpty(list[0].CERTINO.ToString().Trim())) { lblYHQ.InnerText = list.Count.ToString(); } else { lblYHQ.InnerText = "0"; } rtInvite.DataSource = list; this.rtInvite.DataBind(); PointVO posPoint = new PointVO(); posPoint.yyyy = DateTime.Now.Year.ToString(); if (selYY.SelectedIndex != 0) { posPoint.mm = (selYY.SelectedIndex + 1).ToString("00"); } else { selYY.SelectedIndex = DateTime.Now.Month - 1; if (selYY.SelectedIndex == 0) { selYY.SelectedIndex = 12; } posPoint.mm = DateTime.Now.Month.ToString("00"); } posPoint.bgnRowNum = "1"; posPoint.endRowNum = "100"; memberVO.posCardNo = memberVOXML.CardFaceNo; string xmlPoints = PosPoint.getPosPoint(memberVO, posPoint); IList <PointVOXML> listPont = new List <PointVOXML>(); // listPont = XmlToEntityList(xmlPoints); listPont = PosPoint.xmlToList <PointVOXML>(xmlPoints); rtpContact.DataSource = listPont; this.rtpContact.DataBind(); } }
public static List<BoneCurves> Load(string file) { Debug.Log("loading"); List<BoneCurves> BClist = new List<BoneCurves>(); XmlDocument doc = new XmlDocument(); doc.Load(file); string curvetype = ""; XmlNode BoneData = doc.SelectSingleNode("AnimeName/BoneData"); foreach (XmlNode Bone in BoneData.ChildNodes) { int keyvalue = 0; BoneCurves BC = new BoneCurves { name = Bone.Attributes["Text"].Value }; //Debug.Log(Bone.Name); XmlNodeList childs = Bone.ChildNodes; for (int i = 0; i < childs.Count; i++) { switch (childs[i].Name) { case "RotateKey": curvetype = "RotateKey"; break; case "ScaleKey": curvetype = "Scalekey"; break; case "PosKey": curvetype = "PosKey"; break; case "Time": switch (curvetype) { case "RotateKey": RotPoint RP = new RotPoint(); RP.Frame = int.Parse(childs[i].Attributes["Value"].Value); XmlNode Rota = childs[i].ChildNodes[0]; RP.Value = new Quaternion(float.Parse(Rota.Attributes["x"].Value), float.Parse(Rota.Attributes["y"].Value), float.Parse(Rota.Attributes["z"].Value), float.Parse(Rota.Attributes["w"].Value)); RP.calctype = int.Parse(childs[i].ChildNodes[1].Attributes["Value"].Value); if (RP.calctype == 1) RP.PowVal = int.Parse(childs[i].ChildNodes[2].Attributes["Value"].Value); BC.RotCurve.Add(RP); break; case "ScaleKey": ScalePoint SP = new ScalePoint(); SP.Frame = int.Parse(childs[i].Attributes["Value"].Value); XmlNode Scale = childs[i].ChildNodes[0]; SP.Value = new Vector3(float.Parse(Scale.Attributes["x"].Value), float.Parse(Scale.Attributes["y"].Value), float.Parse(Scale.Attributes["z"].Value)); SP.calctype = int.Parse(childs[i].ChildNodes[1].Attributes["Value"].Value); if (SP.calctype == 1) SP.PowVal = int.Parse(childs[i].ChildNodes[2].Attributes["Value"].Value); BC.ScaleCurve.Add(SP); break; case "PosKey": PosPoint PP = new PosPoint(); PP.Frame = int.Parse(childs[i].Attributes["Value"].Value); XmlNode Pos = childs[i].ChildNodes[0]; PP.Value = new Vector3(float.Parse(Pos.Attributes["x"].Value), float.Parse(Pos.Attributes["y"].Value), float.Parse(Pos.Attributes["z"].Value)); PP.calctype = int.Parse(childs[i].ChildNodes[1].Attributes["Value"].Value); if (PP.calctype == 1) PP.PowVal = int.Parse(childs[i].ChildNodes[2].Attributes["Value"].Value); BC.PosCurve.Add(PP); break; } break; } } BClist.Add(BC); } return BClist; }
public static void Load(ref ScriptKeys sKeys, ref List<BoneCurves> rBC, string file) { Debug.Log("loading"); XmlDocument doc = new XmlDocument(); doc.Load(file); XmlNode AnimeName = doc.SelectSingleNode("AnimeName"); sKeys.AnimeName = AnimeName.Attributes["Name"].Value; sKeys.ID = int.Parse(AnimeName.Attributes["ID"].Value); foreach (XmlNode node in AnimeName.ChildNodes) { switch (node.Name) { case "Windom_TopScript": sKeys.TopScript = node.InnerText; break; case "Time": scriptKey key; key.Frame = int.Parse(node.Attributes["Value"].Value); key.script = node.FirstChild.InnerText; sKeys.SK.Add(key); break; case "BoneData": string curvetype = ""; XmlNode BoneData = node; foreach (XmlNode Bone in BoneData.ChildNodes) { BoneCurves BC = new BoneCurves { name = Bone.Attributes["Text"].Value }; //Debug.Log(Bone.Name); XmlNodeList childs = Bone.ChildNodes; for (int i = 0; i < childs.Count; i++) { switch (childs[i].Name) { case "RotateKey": curvetype = "RotateKey"; break; case "ScaleKey": curvetype = "Scalekey"; break; case "PosKey": curvetype = "PosKey"; break; case "Time": switch (curvetype) { case "RotateKey": RotPoint RP = new RotPoint(); RP.Frame = int.Parse(childs[i].Attributes["Value"].Value); XmlNode Rota = childs[i].ChildNodes[0]; RP.Value = new Quaternion(float.Parse(Rota.Attributes["x"].Value), float.Parse(Rota.Attributes["y"].Value), float.Parse(Rota.Attributes["z"].Value), float.Parse(Rota.Attributes["w"].Value)); RP.calctype = int.Parse(childs[i].ChildNodes[1].Attributes["Value"].Value); if (RP.calctype == 1) RP.PowVal = int.Parse(childs[i].ChildNodes[2].Attributes["Value"].Value); BC.RotCurve.Add(RP); break; case "ScaleKey": ScalePoint SP = new ScalePoint(); SP.Frame = int.Parse(childs[i].Attributes["Value"].Value); XmlNode Scale = childs[i].ChildNodes[0]; SP.Value = new Vector3(float.Parse(Scale.Attributes["x"].Value), float.Parse(Scale.Attributes["y"].Value), float.Parse(Scale.Attributes["z"].Value)); SP.calctype = int.Parse(childs[i].ChildNodes[1].Attributes["Value"].Value); if (SP.calctype == 1) SP.PowVal = int.Parse(childs[i].ChildNodes[2].Attributes["Value"].Value); BC.ScaleCurve.Add(SP); break; case "PosKey": PosPoint PP = new PosPoint(); PP.Frame = int.Parse(childs[i].Attributes["Value"].Value); XmlNode Pos = childs[i].ChildNodes[0]; PP.Value = new Vector3(float.Parse(Pos.Attributes["x"].Value), float.Parse(Pos.Attributes["y"].Value), float.Parse(Pos.Attributes["z"].Value)); PP.calctype = int.Parse(childs[i].ChildNodes[1].Attributes["Value"].Value); if (PP.calctype == 1) PP.PowVal = int.Parse(childs[i].ChildNodes[2].Attributes["Value"].Value); BC.PosCurve.Add(PP); break; } break; } } rBC.Add(BC); } break; } } }
void GUI_BoneMenu() { //content box GUI.Box(new Rect(10, Screen.height / 2 - 200, 275, 400), "Animation Editor"); //transform data GUI.Label(new Rect(30, Screen.height / 2 - 180, 50, 20), elist[editmode]); GUI.Label(new Rect(30, Screen.height / 2 - 160, 20, 20), " X"); PositionText.x = GUI.TextField(new Rect(50, Screen.height / 2 - 160, 50, 20), PositionText.x); GUI.Label(new Rect(100, Screen.height / 2 - 160, 20, 20), " Y"); PositionText.y = GUI.TextField(new Rect(120, Screen.height / 2 - 160, 50, 20), PositionText.y); GUI.Label(new Rect(170, Screen.height / 2 - 160, 20, 20), " Z"); PositionText.z = GUI.TextField(new Rect(190, Screen.height / 2 - 160, 50, 20), PositionText.z); editmode = GUI.SelectionGrid(new Rect(30, Screen.height / 2 - 130, 235, 20), editmode, elist, 3); if (editmode != editModeChange) { UpdateTransformValues(); UpdateCalcType(); } editModeChange = editmode; ApplyTransformValues(); try { if (selection == 1) { GUI.Box(new Rect(30, Screen.height / 2 - 100, 235, 205), RB.parts[selectedPiece].name + " Frames"); GUI_Framelist(); GUI.Label(new Rect(35, Screen.height / 2 + 115, 60, 20), "CalcType"); calctype = GUI.TextField(new Rect(95, Screen.height / 2 + 115, 50, 20), calctype); GUI.Label(new Rect(160, Screen.height / 2 + 115, 60, 20), "PowVal"); powval = GUI.TextField(new Rect(210, Screen.height / 2 + 115, 50, 20), powval); ApplyCalcType(); if (GUI.Button(new Rect(30, Screen.height / 2 + 140, 116, 20), "Add")) { bool hasFrames = false; for (int i = 0; i < RB.BC.Count; i++) { if (RB.BC[i].GO == RB.parts[selectedPiece]) { hasFrames = true; break; } } if (!hasFrames) { RB.BC.Add(new BoneCurves()); indexBC = RB.BC.Count - 1; RB.BC[indexBC].GO = RB.parts[selectedPiece]; RB.BC[indexBC].name = RB.parts[selectedPiece].name; Debug.Log("test"); } switch (elist[editmode]) { case "Position": if (RB.BC[indexBC].PosCurve.Count == 0) { PosPoint PP = new PosPoint(); PP.Frame = 0; PP.Value = Vector3.zero; PP.calctype = 0; PP.PowVal = 1; RB.BC[indexBC].PosCurve.Add(PP); } else { if (!isFrameOccupied(Mathf.RoundToInt(FrameSlider))) { int newFramePos = Mathf.RoundToInt(FrameSlider); int insertFrame = -1; for (int i = 0; i < RB.BC[indexBC].PosCurve.Count; i++) { if (RB.BC[indexBC].PosCurve[i].Frame > newFramePos && (insertFrame == -1 || RB.BC[indexBC].PosCurve[i].Frame < RB.BC[indexBC].PosCurve[insertFrame].Frame)) insertFrame = i; } if (insertFrame == -1) { PosPoint FPP = RB.BC[indexBC].PosCurve[RB.BC[indexBC].PosCurve.Count - 1]; FPP.Frame = newFramePos; RB.BC[indexBC].PosCurve.Add(FPP); } else { PosPoint FPP = RB.BC[indexBC].PosCurve[insertFrame - 1]; FPP.Frame = newFramePos; RB.BC[indexBC].PosCurve.Insert(insertFrame, FPP); } } } break; case "Rotation": if (RB.BC[indexBC].RotCurve.Count == 0) { RotPoint RP = new RotPoint(); RP.Frame = 0; RP.Value = Quaternion.identity; RP.calctype = 0; RP.PowVal = 1; RB.BC[indexBC].RotCurve.Add(RP); } else { if (!isFrameOccupied(Mathf.RoundToInt(FrameSlider))) { int newFramePos = Mathf.RoundToInt(FrameSlider); int insertFrame = -1; for (int i = 0; i < RB.BC[indexBC].RotCurve.Count; i++) { if (RB.BC[indexBC].RotCurve[i].Frame > newFramePos && (insertFrame == -1 || RB.BC[indexBC].RotCurve[i].Frame < RB.BC[indexBC].RotCurve[insertFrame].Frame)) insertFrame = i; } if (insertFrame == -1) { RotPoint FPP = RB.BC[indexBC].RotCurve[RB.BC[indexBC].RotCurve.Count - 1]; FPP.Frame = newFramePos; RB.BC[indexBC].RotCurve.Add(FPP); } else { RotPoint FPP = RB.BC[indexBC].RotCurve[insertFrame - 1]; FPP.Frame = newFramePos; RB.BC[indexBC].RotCurve.Insert(insertFrame, FPP); } } } break; case "Scale": if (RB.BC[indexBC].ScaleCurve.Count == 0) { ScalePoint SP = new ScalePoint(); SP.Frame = 0; SP.Value = Vector3.zero; SP.calctype = 0; SP.PowVal = 1; RB.BC[indexBC].ScaleCurve.Add(SP); } else { if (!isFrameOccupied(Mathf.RoundToInt(FrameSlider))) { int newFramePos = Mathf.RoundToInt(FrameSlider); int insertFrame = -1; for (int i = 0; i < RB.BC[indexBC].ScaleCurve.Count; i++) { if (RB.BC[indexBC].ScaleCurve[i].Frame > newFramePos && (insertFrame == -1 || RB.BC[indexBC].ScaleCurve[i].Frame < RB.BC[indexBC].ScaleCurve[insertFrame].Frame)) insertFrame = i; } if (insertFrame == -1) { ScalePoint FPP = RB.BC[indexBC].ScaleCurve[RB.BC[indexBC].ScaleCurve.Count - 1]; FPP.Frame = newFramePos; RB.BC[indexBC].ScaleCurve.Add(FPP); } else { ScalePoint FPP = RB.BC[indexBC].ScaleCurve[insertFrame - 1]; FPP.Frame = newFramePos; RB.BC[indexBC].ScaleCurve.Insert(insertFrame, FPP); } } } break; } } if (GUI.Button(new Rect(150, Screen.height / 2 + 140, 115, 20), "Remove")) { switch (elist[editmode]) { case "Position": RB.BC[indexBC].PosCurve.RemoveAt(selectedFrame); break; case "Rotation": RB.BC[indexBC].RotCurve.RemoveAt(selectedFrame); break; case "Scale": RB.BC[indexBC].ScaleCurve.RemoveAt(selectedFrame); break; } } if (selectedFrame != prevSelectedFrame) RB.AnimeFrameGo(frameNum); prevSelectedFrame = selectedFrame; UpdateTransformValues(); if (checkIfEmpty()) indexBC = 0; } else { GUI.Box(new Rect(30, Screen.height / 2 - 100, 235, 260), "Parts"); string[] Piecelist = listModels(); ScrollPositions[1] = GUI.BeginScrollView(new Rect(30, Screen.height / 2 - 75, 235, 235), ScrollPositions[1], new Rect(0, 0, 219, Piecelist.Length * 25)); try { selectedPiece = GUI.SelectionGrid(new Rect(0, 0, 219, (float)25 * (float)Piecelist.Length), selectedPiece, Piecelist, 1); } catch { } GUI.EndScrollView(); } } catch { } selection = GUI.SelectionGrid(new Rect(30, Screen.height / 2 + 165, 235, 20), selection, slist, 2); if (selection != prevselection) UpdateCalcType(); prevselection = selection; }
protected void Page_Load(object sender, EventArgs e) { // APIManage.GetPublicKey.GetSysPublicKey(); PosPoint.JsonToList(); }