private void CreateUnitGo(Unit _unit) { UnitSDS sds = _unit.sds as UnitSDS; GameObject go = GameObjectFactory.Instance.GetGameObject(sds.model, null); go.transform.SetParent(unitContainer, false); PublicTools.SetLayer(go, unitContainer.gameObject.layer); // if(_unit.isMine == battle.clientIsMine){ // // go.GetComponent<Renderer> ().material.SetColor ("_Color", Color.blue); // // }else{ // // go.GetComponent<Renderer> ().material.SetColor ("_Color", Color.yellow); // } HeroStateMachine2 hm = go.GetComponent <HeroStateMachine2> (); hm.Init(_unit, this); unitGoDic.Add(_unit.uid, hm); unitGoList.AddLast(_unit.uid); }
bool check_is_fist_runing() { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer || PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.plugin || PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.demo_pc) { return(false); } #if UNITY_EDITOR || UNITY_STANDALONE_WIN return(false); #elif UNITY_IOS #elif UNITY_ANDROID #endif string fname = PublicClass.filePath + "version.dat"; string version = PublicTools.read_version_from_file(fname); DebugLog.DebugLogInfo("--" + fname); if (version == null) { return(true); } DebugLog.DebugLogInfo("founded-versions--------------------------------" + version + "---" + PublicClass.get_assets_version()); if (PublicTools.version_is_larger(PublicClass.get_assets_version(), version)) { return(true); } else { // PublicClass.set_version(version); return(false); } }
/// <summary> /// 新增 /// </summary> /// <param name="model"></param> /// <returns></returns> public string Add(Musercoupon model) { MwxResult mwxResult = new MwxResult() { errcode = -1 }; try { DateTime dateTimeNow = System.DateTime.Now; model.isDelete = "0"; model.isEffective = "1"; model.great_time = dateTimeNow; model.modify_time = dateTimeNow; model.id = PublicTools.GetRandomNumberByTime(); if (new UserCouponService().Add(model)) { mwxResult.errcode = 0; mwxResult.errmsg = "操作成功!"; } else { mwxResult.errmsg = "操作失败!"; } } catch (Exception ex) { mwxResult.errmsg = "操作失败!"; } return(JsonHelper.GetJson <MwxResult>(mwxResult)); }
private static Dictionary <string, string> SendMessageString(WeChatSMsg MessageType, string users, string Title, string Content, string URL = null) { WeChatMessageBackupService.AddToSendList(users, Title, Content); WeChatHelper.PrepareCodes(); string Message = "{\"touser\":\"" + users + "\",\"msgtype\":\"" + MessageType.ToString() + "\",\"agentid\":" + XConfig.Current.WeChat.AgentId + ",\"" + MessageType.ToString() + "\":"; switch (MessageType) { case WeChatSMsg.text: Message = Message + $"{{\"content\":\"{Content}\r\n\r\nMST: {DateTime.Now.ToNormalString()}\"}}"; break; case WeChatSMsg.textcard: Message = Message + $"{{\"title\":\"{Title}\",\"description\":\"{Content}\",\"url\":\"{URL}\"}}"; break; case WeChatSMsg.file: Message = Message + $"{{\"media_id\":\"{Content}\"}}"; break; } Message = Message + "}"; L.I("WeChat Message Sent: " + Message); return(PublicTools.HTTPPost("https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" + WeChatHelper.AccessToken, Message)); }
/// <summary> /// 绘制验证码 /// </summary> /// <returns></returns> public ActionResult GetValidateCode() { byte[] data = null; string code = PublicTools.RandomCode(5); Session["verifiCode"] = code; //定义一个画板 MemoryStream ms = new MemoryStream(); using (Bitmap map = new Bitmap(100, 40)) { //画笔,在指定画板画板上画图 //g.Dispose(); using (Graphics g = Graphics.FromImage(map)) { g.Clear(Color.White); g.DrawString(code, new Font("黑体", 18.0F), Brushes.Blue, new Point(10, 8)); //绘制干扰线 PaintInterLine(g, 15, map.Width, map.Height); } map.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); } data = ms.GetBuffer(); return(File(data, "image/jpeg")); }
//备份文件夹中vsl文件 public void BackUpVsl(string path) { string time = PublicTools.getTime(); string backPath = path + "backup/"; if (!Directory.Exists(backPath)) { Directory.CreateDirectory(backPath); } try { DirectoryInfo dir = new DirectoryInfo(path); FileSystemInfo[] fileinfo = dir.GetFileSystemInfos(); //返回目录中所有文件和子目录 foreach (FileSystemInfo i in fileinfo) { if (i is FileInfo) { File.Move(i.FullName, backPath + time + "_" + i.Name); } } System.Diagnostics.Process.Start(path); } catch (Exception e) { Debug.Log(e.Message); Debug.Log(e.StackTrace); } }
/// <summary> /// 新增文章 /// </summary> /// <param name="model"></param> /// <returns></returns> public string AddNews(Mnews model, HttpPostedFileBase productimgurl = null, string path = "", int type = 1) { MwxResult mwxResult = new MwxResult() { errcode = -1 }; string savePath = string.Empty; //// 存图片 if (productimgurl != null) { string fileSave = FileOpert.UploadImg(productimgurl, path + "uploadFile\\" + System.DateTime.Now.ToString("yyyy") + "\\", out savePath); if (string.IsNullOrEmpty(fileSave)) { model.img = savePath.Replace(path, ""); } } try { if (string.IsNullOrEmpty(model.id)) { DateTime dateTimeNow = System.DateTime.Now; model.isDelete = "0"; model.isEffective = "1"; model.great_time = dateTimeNow; model.modify_time = dateTimeNow; model.type = type; model.id = PublicTools.GetRandomNumberByTime(); if (new NewsService().AddNews(model)) { mwxResult.errcode = 0; mwxResult.errmsg = "操作成功!"; } else { mwxResult.errmsg = "操作失败!"; } } else { if (new NewsService().UpdateNews(model)) { mwxResult.errcode = 0; mwxResult.errmsg = "操作成功!"; } else { mwxResult.errmsg = "操作失败!"; } } } catch (Exception ex) { mwxResult.errmsg = "操作失败!"; } return(JsonHelper.GetJson <MwxResult>(mwxResult)); }
/// <summary> /// 检查新增用户的合法性 /// </summary> /// <param name="madminuser"></param> /// <returns></returns> private string CheckSendUser(MsendGoodsUser model) { if (model == null) { return("操作失败:送货员不能为空!"); } if (string.IsNullOrEmpty(model.userName)) { return("操作失败:姓名不能为空!"); return(string.Empty); } if (string.IsNullOrEmpty(model.phone)) { return("操作失败:手机号码不能为空!"); } if (!PublicTools.IsPhon(model.phone)) { return("操作失败:请输入正确格式的手机号码!"); } //// 验证手机号码是否已经被使用 if (new SndGoodsUserService().GetSndGoodsUserPagCount(model.phone, string.Empty) > 0) { return("操作失败:该手机号码已被使用!"); } return(string.Empty); }
public void CloseBoneMarkers() { foreach (GameObject na in newBone) { Destroy(na); } Camera.main.transform.parent.position = PublicTools.vector2Vecotor(Oldcamera_Params.camera_parent_pos); Camera.main.transform.parent.rotation = Quaternion.Euler(PublicTools.vector2Vecotor(Oldcamera_Params.camera_parent_rot)); Camera.main.transform.position = PublicTools.vector2Vecotor(Oldcamera_Params.camera_pos); float z = Oldcamera_Params.camera_parent_rot.z; if (z < 90 && z > -90) { Interaction.instance.setParamValue2(); } else { Interaction.instance.setParamValue3(); } boneLeftUI.SetActive(false); oldLeftUI.SetActive(true); searchBtn.SetActive(true); oldRightUI.SetActive(true); xiaoren.SetActive(true); qiu.Clear(); if (tGO != null) { Destroy(tGO); } Destroy(dingzi); PublicClass.Transform_parent.gameObject.SetActive(true); }
private void btnSet_Click(object sender, EventArgs e) { try { if (!verifyInfo()) { return; } foreach (PdmColumn pColumn in pTable.Columns) { pColumn.NowSerial = 0; } string[] tablesets = PublicTools.TextReadToArr(txtSet.Text); if (!varifySet(txtSet.Text)) { return; } Global.ShowSysInfo("配置信息填写正确!"); } catch (Exception ex) { Global.ShowSysInfo(ex.Message); } }
/// <summary> /// 清理xml中不需要元素属性(和上一元素属性值相等的属性) /// </summary> /// <param name="xmlPath"></param> public void clearXml(string xmlPath) { if (!File.Exists(xmlPath)) { return; } XmlDocument xd = new XmlDocument(); xd.Load(xmlPath); XmlElement lastElement = null; XmlElement tempElement = null; string[] filter = new string[] { "nl", "pl", "isnew", "isClear" }; foreach (XmlElement ele in xd.SelectNodes("//DL")) { if (lastElement != null) { tempElement = PublicTools.DeepCopy(ele); RemoveTargetAttr(lastElement, ele, filter); lastElement = tempElement; } else { lastElement = ele; } } xd.Save(xmlPath); }
private static void Maintain() { while (true) { try { string _mid = Cryptography.RandomString(5, false); byte[] packet = PublicTools.EncodeMessage(_mid, "HeartBeat"); if (CoreSend(packet, _mid, out string reply)) { LW.D("HeartBeat Succeed! " + reply); } else { throw new Exception("CoreSend Error: Timeout"); } Thread.Sleep(5000); } catch (Exception ex) { if (ex is ThreadAbortException) { return; } LW.E("Heartbeat Error! " + ex.Message); socketclient.CloseAndDispose(); stream.CloseAndDispose(); Initialise(remoteEndpoint.Address, remoteEndpoint.Port); Thread.Sleep(5000); } } }
// Update is called once per frame void Update() { float percent = (Time.time - startTime) / flyTime; if (percent > 1) { callBack(); GameObject.Destroy(gameObject); } else { if (!show) { show = true; PublicTools.SetGameObjectVisible(gameObject, true); } Vector3 v = Vector3.Lerp(start, end, percent); v.y += curve.Evaluate(percent); transform.LookAt(v); transform.position = v; } }
//开始播放录屏 private void RecordStart() { if (tempRis != null) { tempRis.Clear(); } if (!File.Exists(PPTGlobal.PPTPath + pageNum + "/" + me.fileName)) { isNoRecord = true; return; } //读取录屏信息 RecordDoc rd = PublicTools.Deserialize <RecordDoc>(PPTGlobal.PPTPath + pageNum + "/" + me.fileName); //初始化摄像机位置 //CamParentPos emptyBox.transform.position = PublicTools.Str2Vector3(rd.initCamParentPos); emptyBox.transform.rotation = Quaternion.Euler(PublicTools.Str2Vector3(rd.initCamParentRot)); MainCam.transform.position = PublicTools.Str2Vector3(rd.initCamPos); MainCam.transform.rotation = Quaternion.Euler(PublicTools.Str2Vector3(rd.initCamRot)); tempRis = rd.ris; if (tempRis == null) { tempRis = new List <RecordItem>(); } Camera.main.fieldOfView = rd.fieldOfView != 0 ? rd.fieldOfView : 10; Debug.Log("records :" + tempRis.Count); recordUpdate = 0; recordPlay = true; isNoRecord = false; }
private static void Maintain() { while (!IsShutdownStarted) { try { string _mid = Cryptography.RandomString(5, false); byte[] packet = PublicTools.MakeDatabasePacket(_mid, "HeartBeat"); if (!CoreSend(packet, _mid, out string reply)) { throw new Exception("CoreSend Error: Timeout"); } Thread.Sleep(5000); } catch (Exception ex) { if (ex is ThreadAbortException || ex is NullReferenceException) { return; } ex.LogException(); socketClient.CloseAndDispose(); stream.CloseAndDispose(); Thread.Sleep(5000); Initialise(remoteEndpoint.Address, remoteEndpoint.Port); } } }
public void Shoot() { isAttacking = false; GameObject go = GameObjectFactory.Instance.GetGameObject("Assets/arts/prefab/missile.prefab", null); go.transform.SetParent(battleManager.unitContainer, false); PublicTools.SetLayer(go, battleManager.unitContainer.gameObject.layer); BallisticControl bc = go.GetComponent <BallisticControl>(); LinkedList <int> tmpDamageList = damageList; damageList = null; Action dele = delegate() { GameObject.Destroy(go); LinkedList <int> .Enumerator enumerator = tmpDamageList.GetEnumerator(); while (enumerator.MoveNext()) { battleManager.unitGoDic [enumerator.Current].damageTimes--; } }; Vector3 targetPos = battleManager.unitGoDic[tmpDamageList.First.Value].transform.localPosition; bc.Fly(transform.localPosition, targetPos, dele); }
protected override void Start() { base.Start(); m_camera = canvas.worldCamera; canvasRectSizeDelta = (canvas.rootCanvas.transform as RectTransform).sizeDelta; Vector2 pos0 = PublicTools.WorldPositionToCanvasPosition(m_camera, canvasRectSizeDelta, new Vector3(0, 0, 0)); Vector2 pos1 = PublicTools.WorldPositionToCanvasPosition(m_camera, canvasRectSizeDelta, new Vector3(1, 0, 0)); fix = Mathf.Abs(pos0.x - pos1.x); if (psr.renderMode == ParticleSystemRenderMode.Billboard) { Vector3 vvv = m_camera.ScreenToWorldPoint(new Vector3(0, 0, 0)); Vector3 vvv2 = m_camera.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, 0)); float screenSize = vvv2.x - vvv.x; minSize = screenSize * psr.minParticleSize; maxSize = screenSize * psr.maxParticleSize; } }
private void FixDownPos() { Vector2 v = PublicTools.MousePositionToCanvasPosition(canvas, downPos); if (!clickArea.Contains(v)) { if (v.x < clickArea.xMin) { v = new Vector3(clickArea.xMin, v.y); } else if (v.x > clickArea.xMax) { v = new Vector2(clickArea.xMax, v.y); } if (v.y < clickArea.yMin) { v = new Vector3(v.x, clickArea.yMin); } else if (v.y > clickArea.yMax) { v = new Vector2(v.x, clickArea.yMax); } downPos = PublicTools.CanvasPostionToMousePosition(canvas, v); } }
/// <summary> /// 加载问题 /// </summary> /// <param name="fileName">加载关联文件</param> /// <returns></returns> public bool loadVqa(string fileName) { string filePath = PPTGlobal.PPTPath + this.pageNum + "/" + fileName; if (!File.Exists(filePath)) { string tmpName = fileName.Replace("SL_", "").Replace("YL_", ""); filePath = PPTGlobal.PPTPath + this.pageNum + "/SL_" + tmpName; if (!File.Exists(filePath)) { filePath = PPTGlobal.PPTPath + this.pageNum + "/YL_" + tmpName; if (!File.Exists(filePath)) { filePath = PPTGlobal.PPTPath + this.pageNum + "/" + tmpName; } } } if (File.Exists(filePath)) { VqaRoot vqaRoot = PublicTools.Deserialize <VqaRoot>(filePath); currentVqa.vqa = vqaRoot.vqa; return(true); } Debug.Log("loadVqa not exists:" + filePath); return(false); }
public IActionResult UserManage(string mode, string from, string uid, string msg) { ViewData["where"] = ControllerName; if (ValidateSession()) { if (!CurrentUser.UserGroup.IsAdmin) { LW.E("Someone trying access illegal page!, Page: UserManage, user:"******", possible referer:" + Request.Headers["Referer"]); return(NotFound()); } ViewData["mode"] = mode; if (mode == "edit") { ViewData["from"] = from; string targetId = uid; string message = (string)PublicTools.DecodeObject(Encoding.UTF8.GetString(Convert.FromBase64String(msg ?? ""))); ViewData["registerMsg"] = message; return(DataBaseOperation.QuerySingleData(new DBQuery().WhereEqualTo("objectId", uid), out UserObject _user) == DBQueryStatus.ONE_RESULT ? View(_user) : NotFoundError(ServerAction.INTERNAL_ERROR, XConfig.Messages["NoUserFoundByGivenID"])); } else if (mode == "query") { return(View()); } else { throw new NotSupportedException("mode not supported!"); } } else { return(LoginFailed($"/Manage/UserManage?mode={mode}&from={from}&uid={uid}&msg={msg}")); } }
/// <summary> /// 写单页control xml结果 /// </summary> /// <param name="pageNum"></param> public void WriteResult(int pageNum) { string xmlpath = PPTGlobal.PPTPath + pageNum + "/control_" + pageNum + ".xml"; Debug.Log(xmlpath); if (File.Exists(xmlpath)) { Debug.Log("存在旧文件:" + xmlpath.Replace(".xml", "_" + PublicTools.getTime() + ".xml")); File.Move(xmlpath, xmlpath.Replace(".xml", "_" + PublicTools.getTime() + ".xml")); } PPTResourcePool.slideObjs[pageNum].BroadcastMessage("DoSort", SendMessageOptions.DontRequireReceiver); SlideDoc tmpDoc = PublicTools.DeepCopy(PPTResourcePool.slideDoc); List <Slide> tempslides = new List <Slide>(); foreach (Slide tempSlide in tmpDoc.slides) { if (tempSlide.pageNum == pageNum) { tempslides.Add(PublicTools.DeepCopy(tempSlide)); break; } } tmpDoc.slides = tempslides; PublicTools.SaveObject(xmlpath, tmpDoc); clearXml(xmlpath); //document.Save(xmlpath); }
void Update() { if (copy != null) { (copy.transform as RectTransform).anchoredPosition = PublicTools.MousePositionToCanvasPosition(core.canvas, Input.mousePosition); } }
private void MapUnitDownReal(MapUnit _mapUnit) { downPos = lastPos = PublicTools.MousePositionToCanvasPosition(canvas, Input.mousePosition); isDown = DownType.MAPUNIT; downMapUnit = _mapUnit; }
public static PublicTools GetInstance() { if (instance == null) { instance = new PublicTools(); } return(instance); }
/// <summary> /// 新增产品 /// </summary> /// <param name="mproduct"></param> /// <param name="productimgurl"></param> /// <param name="path"></param> /// <returns></returns> public string AddProduct(Mproduct mproduct, HttpPostedFileBase productimgurl, string path) { MwxResult mwxResult = new MwxResult() { errcode = -1 }; //// 实现步骤 //// 1.数据合法性验证 //// 2.图片入库 //// 3.数据落地 string savePath = string.Empty; mwxResult.errmsg = this.CheckedProduct(mproduct); if (productimgurl == null) { mwxResult.errmsg = "产品图片不能为空!"; return(JsonHelper.GetJson <MwxResult>(mwxResult)); } if (!string.IsNullOrEmpty(mwxResult.errmsg)) { return(JsonHelper.GetJson <MwxResult>(mwxResult)); } //// 存图片 string fileSave = FileOpert.UploadImg(productimgurl, path + "uploadFile\\" + System.DateTime.Now.ToString("yyyy") + "\\", out savePath); if (string.IsNullOrEmpty(fileSave)) { mproduct.productimgurl = savePath.Replace(path, ""); } else { //// 构建错误信息并返回 mwxResult.errmsg = fileSave; return(JsonHelper.GetJson <MwxResult>(mwxResult)); } mproduct.productid = PublicTools.GetRandomNumberByTime(); ///// 入库 bool addResult = new ProductService().AddProduct(mproduct); if (addResult) { mwxResult.errmsg = "新增成功!"; mwxResult.errcode = 0; CacheData.allRecommendPro = null; CacheData.allRecommendProList = null; } else { mwxResult.errmsg = "新增失败!"; } return(JsonHelper.GetJson <MwxResult>(mwxResult)); }
public void OnClick() { ChangeLabelCol(); //for (int i = 0; i < test.merEleList.Count; i++) //{ // test.merEleList[i].gameObject.GetComponent<Image>().color = new Color(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 85 / 255.0f); // //sgnTest.dic[sspTest.sspInfoList[i].mod_name].gameObject.SetActive(false); // //if (GameObject.Find(test.acuInfoList[i].sm_name) != null) // try // { // test.ToNormalState(GameObject.Find(test.acuInfoList[i].sm_name).GetComponentInChildren<MeshRenderer>().material); // } // catch // { // Debug.Log(GameObject.Find(test.acuInfoList[i].sm_name)); // } //} for (int i = 0; i < test.acuInfoList.Count; i++) { test.ToNormalState(GameObject.Find(test.acuInfoList[i].sm_name).GetComponentInChildren <MeshRenderer>().material); } for (int i = 0; i < GameObject.Find(merInfo.sm_name).transform.childCount; i++) { //Debug.Log(GameObject.Find(merInfo.sm_name).name); test.ToSelectState(GameObject.Find(merInfo.sm_name).transform.GetChild(i).GetComponentInChildren <MeshRenderer>().material); } if (test.showinfoBG.gameObject.activeInHierarchy) { test.showinfoBG.gameObject.SetActive(false); } // Debug.Log(chName); //Debug.Log(sspTest.muscleChName); //GameObject currentModel; test.acuChName.text = merInfo.sm_ch_name; test.acuCode.text = ""; test.acuDes.text = ""; //gameObject.GetComponent<Image>().color = new Color(33 / 255.0f, 167 / 255.0f, 212 / 255.0f, 85 / 255.0f); if (m_params != null) { SceneModels.instance.SetCameraPosition(SceneModels.instance.Get_init_models()[0].transform.parent.transform, PublicTools.vector2Vecotor(m_params.camera_pos), PublicTools.vector2Vecotor(m_params.camera_parent_pos), PublicTools.vector2Vecotor(m_params.camera_parent_rot)); } }
/// <summary> /// 创建录制文档 /// </summary> public void createRecordDoc() { rd = new RecordDoc(); rd.initCamPos = PublicTools.Vector32Str(Camera.main.transform.position); rd.initCamRot = PublicTools.Vector32Str(Camera.main.transform.rotation.eulerAngles); rd.initCamParentPos = PublicTools.Vector32Str(Camera.main.transform.parent.position); rd.initCamParentRot = PublicTools.Vector32Str(Camera.main.transform.parent.rotation.eulerAngles); rd.fieldOfView = Camera.main.fieldOfView; }
public static void Start() { GameObject go = Selection.activeGameObject; GameObject prefab = GameObject.Instantiate(go); LightmapData[] datas = LightmapSettings.lightmaps; Renderer[] renderers = go.GetComponentsInChildren <Renderer>(); foreach (Renderer renderer in renderers) { if (renderer.lightmapIndex != -1) { GameObject tg = PublicTools.FindChild(prefab, renderer.gameObject.name); LightmapGameObject ll = tg.AddComponent <LightmapGameObject>(); ll.lightmapIndex = renderer.lightmapIndex; ll.lightmapScaleOffset = renderer.lightmapScaleOffset; } } Scene scene = prefab.AddComponent <Scene>(); scene.farTextures = new Texture2D[datas.Length]; scene.nearTextures = new Texture2D[datas.Length]; for (int i = 0; i < datas.Length; i++) { scene.farTextures[i] = datas[i].lightmapFar; scene.nearTextures[i] = datas[i].lightmapNear; } scene.fieldOfView = Camera.main.fieldOfView; scene.ambientLight = RenderSettings.ambientLight; scene.ambientIntensity = RenderSettings.ambientIntensity; scene.fog = RenderSettings.fog; scene.fogColor = RenderSettings.fogColor; scene.fogStartDistance = RenderSettings.fogStartDistance; scene.fogEndDistance = RenderSettings.fogEndDistance; string path = "Assets/Arts/map/" + go.name + ".prefab"; PrefabUtility.CreatePrefab(path, prefab); GameObject.DestroyImmediate(prefab); AssetBundleTools.SetAssetBundleName(path, go.name); SuperDebug.Log("场景Prefab构造完成!"); }
public void OnClick() { for (int i = 0; i < test.sspEleList.Count; i++) { //test.sspEleList[i].gameObject.GetComponent<Image>().color = new Color(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 85 / 255.0f); test.dic[test.sspInfoList[i].mod_name].gameObject.SetActive(false); } ChangeLabelCol(); //if (test.lastLabel!=null) //{ // test.lastLabel.GetComponent<Image>().color = new Color(0 / 255.0f, 0 / 255.0f, 0 / 255.0f, 85 / 255.0f); //} //if (test.lastMuscle != null) //{ // test.lastMuscle.SetActive(false); //} Debug.Log(chName); //Debug.Log(test.muscleChName); //GameObject currentModel; test.ChName.text = chName; test.BiName.text = enName; test.Description.text = string.Format("<size=48><color=#00FFFF>起点</color></size>:\r\n{0}\r\n<size=48><color=#00FFFF>止点</color></size>:\r\n{1}", startDes, stopDes); //test.currentLabel = this.gameObject; //gameObject.GetComponent<Image>().color = new Color(33 / 255.0f, 167 / 255.0f, 212 / 255.0f, 85 / 255.0f); //test.lastLabel = test.currentLabel; //test.dic[modName].gameObject.SetActive(true); test.ShowMuscle(sspinfo); // test.dic[modName].BecomeTranslucent(); DebugLog.DebugLogInfo(chName); if (new Color(point.startCol.x, point.startCol.y, point.startCol.z, 1) != Color.black) { test.objPa.BroadcastMessage("ChangeChoseColor", new Color(point.startCol.x, point.startCol.y, point.startCol.z, 1)); } else { test.objPa.BroadcastMessage("ChangeChoseColor", Color.magenta); } if (new Color(point.stopCol.x, point.stopCol.y, point.stopCol.z, 1) != Color.black) { test.objPa.BroadcastMessage("ChangeResColor", new Color(point.stopCol.x, point.stopCol.y, point.stopCol.z, 1)); } else { test.objPa.BroadcastMessage("ChangeResColor", Color.magenta); } // Debug.Log(m_params); //Debug.Log( SceneModels.instance.Get_init_models()[0].transform.parent.transform); if (m_params != null) { SceneModels.instance.SetSignPosition(SceneModels.instance.Get_init_models()[0].transform.parent.transform, PublicTools.vector2Vecotor(m_params.camera_pos), PublicTools.vector2Vecotor(m_params.camera_parent_pos), PublicTools.vector2Vecotor(m_params.camera_parent_rot)); } }
private static int CommandUpdate(string TableName, string ObjectID, DataBaseIO output) { string sqlCommand_Update = $"UPDATE {TableName} " + $"SET {string.Join(",", (from q in output.Data select $"{q.Key} = '{PublicTools.EncodeString(q.Value)}' ").ToArray())}, updatedAt = '{DateTime.Now}' " + $"WHERE objectId = '{ObjectID}'"; SqlCommand command_Update = new SqlCommand(sqlCommand_Update, sqlConnection); return(command_Update.ExecuteNonQuery()); }