//接收Tcp数据 public void ReceiveDataTcp(handle h, User user) { while (isExit == false) { string receiveString = null; try { receiveString = br.ReadString(); h(receiveString, user); } catch { //异常处理 break; } string[] spilt = receiveString.Split(':'); switch (spilt[0]) { case "CALLBACK": ClientDataHandle.Default("CALLBACK:" + spilt[1] + "\n"); break; default: ClientDataHandle.Default(spilt[1] + "\n"); break; } } }
public void HideRotationHandlesExcept(handle certainHandle) { foreach (Transform handle in RotationHandles) { if (certainHandle == null || handle != certainHandle.transform) { handle.gameObject.SetActive(false); if (handle.gameObject == RotateX) { TouchElements.Instance.RotateX.gameObject.SetActive(false); } else if (handle.gameObject == RotateY) { TouchElements.Instance.RotateY.gameObject.SetActive(false); } else if (handle.gameObject == RotateZ) { TouchElements.Instance.RotateZ.gameObject.SetActive(false); } } } if (certainHandle == null || RotateAndTranslate != certainHandle.gameObject) { RotateAndTranslate.gameObject.SetActive(false); } WorldLocalToggle.Instance.Hide(); }
public override void Awake() { base.Awake(); if (masterObj == null) { masterObj = transform.parent; } masterObjParent = masterObj.parent; if (ID == 0) { if (GetComponent <Renderer>() == null) { mat = matTarg.GetComponent <Renderer>().material; } else { mat = GetComponent <Renderer>().material; } } handle[] temp = transform.parent.GetComponentsInChildren <handle>(); for (int i = 0; i < temp.Length; i++) { if (temp[i] != this) { otherHandle = temp[i]; } } if (ID == 0) { createHandleFeedback(); } }
private void smurfWindow_click(object sender, RoutedEventArgs e) { hideAll(); FrameworkElement ownerGui = ((FrameworkElement)sender); handle obj = ownerGui.DataContext as handle; ShowWindow(obj.process.MainWindowHandle, SW_SHOW); }
public void addWindow(Process exe, string smurfName) { IntPtr windowHandle = new WindowInteropHelper(this).Handle; SetParent(exe.MainWindowHandle, windowHandle); MoveWindow(exe.MainWindowHandle, 120, 40, 200, 200, true); SetWindowLong(exe.MainWindowHandle, -16, 0x11800000); EnableWindow(exe.MainWindowHandle, false); ShowWindow(exe.MainWindowHandle, SW_HIDE); handle newSmurf = new handle(exe, smurfName); smurfList.Add(newSmurf); }
public void addWindow(Process exe, string smurfName, string region) { handle existedSmurf = smurfList.FirstOrDefault(e => (e.smurfName == smurfName)); if (existedSmurf != null) { existedSmurf.process = exe; } else { handle newSmurf = new handle(exe, smurfName, region); smurfList.Add(newSmurf); } modifyWindows(); }
public void HideScalingHandlesExcept(handle certainHandle) { connectedModelingObject.connectingLinesHandles.ClearLines(); TouchElements.Instance.HideButtonsExcept(certainHandle); foreach (Transform handle in NonUniformScalingHandles.transform) { if (certainHandle == null || handle != certainHandle.transform) { handle.gameObject.SetActive(false); } } if (certainHandle == null || YMovement.transform != certainHandle.transform) { YMovement.SetActive(false); } if (certainHandle == null || ToggleRotateOnOff.transform != certainHandle.transform) { ToggleRotateOnOff.SetActive(false); } if (certainHandle == null || UniformScale.transform != certainHandle.transform) { UniformScale.SetActive(false); } if (certainHandle == null || RotateAndTranslate.transform != certainHandle.transform) { RotateAndTranslate.SetActive(false); } groundPlane.SetActive(false); //WorldLocalToggle.Instance.Hide (); }
// Show ShowWindow(handle, SW_SHOW);
// Hide ShowWindow(handle, SW_HIDE);
LLVMTypeKind.LLVMMetadataTypeKind => new Type(handle, LLVMTypeKind.LLVMMetadataTypeKind),
Write(handle, buffer, LibuvAwaitable <UvWriteReq> .Callback, _awaitable);
LLVMTypeKind.LLVMX86_MMXTypeKind => new Type(handle, LLVMTypeKind.LLVMX86_MMXTypeKind),
_ => new User(handle, handle.Kind),
// Use this for initialization void Start() { handle = this.GetComponentInParent<handle>(); }
_ => new GlobalObject(handle, handle.Kind),
CX_DeclKind.CX_DeclKind_Invalid => new Decl(handle, handle.kind, handle.DeclKind),
LLVMTypeKind.LLVMTokenTypeKind => new Type(handle, LLVMTypeKind.LLVMTokenTypeKind),
GetComponent (handle).Start ();
CX_StmtClass.CX_StmtClass_Invalid => new Stmt(handle, handle.Kind, handle.StmtClass),
if (ValidateError(handle, path) == false) { return(false);
_ => new Value(handle, handle.Kind),
THSNN_Module_get_named_parameters(handle, pa.CreateArray, sa.CreateArray);
_ => new ConstantDataSequential(handle, handle.Kind),
_ => new Decl(handle, handle.kind, handle.DeclKind),
_ => new Stmt(handle, handle.Kind, handle.StmtClass),
_ => new Type(handle, handle.Kind),
set => Replace(handle, value);
// Update is called once per frame void Update() { if (Input.GetMouseButtonUp(0) && movingHandle) { currentFocus.GetComponent <handle> ().FinishUsingHandle(this); movingHandle = false; triggerPressed = false; } RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (pointOfCollisionGO != null) { float distance; if (dragPlane.Raycast(ray, out distance)) { pointOfCollisionGO.transform.position = ray.GetPoint(distance); //Debug.Log ("point of coll at" + pointOfCollisionGO.transform.position); } } // only change focus is the object is not moved at the moment // adjust this for touch if (!movingObject && !movingHandle && !scalingObject && !triggerPressed && ((!TouchManager.Instance.touchActive && !Input.GetMouseButton(0) && !Input.GetMouseButton(1) && !Input.GetMouseButton(2)) || (TouchManager.Instance.touchActive))) { if (!EventSystem.current.IsPointerOverGameObject()) { if (Physics.Raycast(ray, out hit)) { if (currentSelectionMode == selectionMode.laserpointer) { pointOfCollision = hit.point; } if (currentSelectionMode == selectionMode.laserpointer) { if (hit.rigidbody != null && hit.rigidbody.transform.parent != null) { collisionObject = hit.rigidbody.transform.parent.gameObject; } else { collisionObject = null; } } if (collisionObject != null) { if (currentFocus != collisionObject || recheckFocus) { count++; recheckFocus = false; if (collisionObject.CompareTag("ModelingObject")) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <ModelingObject> ().Focus(this); } else if (collisionObject.CompareTag("Handle")) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <handle> ().Focus(this); } else if (collisionObject.CompareTag("UiElement") && UiCanvasGroup.Instance.visible) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <UiElement> ().Focus(this); } else if (!UiCanvasGroup.Instance.visible && collisionObject.CompareTag("TeleportTrigger")) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <TeleportationTrigger> ().Focus(this); } else if (collisionObject.CompareTag("SelectionButton")) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <ObjectSelecter> ().Focus(this); if (currentFocus.GetComponent <ObjectSelecter> ().connectedObject != null) { currentFocus.GetComponent <ObjectSelecter> ().connectedObject.Focus(this); } } else if (!UiCanvasGroup.Instance.visible && collisionObject.CompareTag("TeleportPosition")) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <TeleportationPosition> ().Focus(this); } else if (!UiCanvasGroup.Instance.visible && collisionObject.CompareTag("Library")) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; library.Instance.Focus(this); } else if (collisionObject.CompareTag("HeightControl")) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <StageHeightController> ().Focus(this); } else if (collisionObject.CompareTag("DistanceControl")) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <StageDistanceController> ().Focus(this); } else if (collisionObject.CompareTag("Stage") && typeOfController == controllerType.mainController) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <StageFreeMovement> ().Focus(this); } else if (collisionObject.CompareTag("InfoPanel")) { DeFocusCurrent(collisionObject); currentFocus = collisionObject; currentFocus.GetComponent <Infopanel> ().Focus(this); } else { DeFocusCurrent(null); } } } else { if (currentFocus != null && collisionObject == null) { DeFocusCurrent(null); temps = Time.time; } } } else { if (currentFocus != null || (currentSelectionMode == selectionMode.directTouch && collisionObject == null)) { DeFocusCurrent(null); temps = Time.time; } } } else { if (currentFocus != null) { DeFocusCurrent(null); temps = Time.time; } } if (currentlyFocusedUiElement != null && currentSelection != null) { // check which element is hovered and focus right 3d handle if (currentlyFocusedUiElement.typeOfThis == NewUielement.typeOfUiElement.YMovement) { GameObject chosenHandle = currentSelection.GetComponent <ModelingObject> ().handles.YMovement; DeFocusCurrent(chosenHandle); currentFocus = chosenHandle; currentFocus.GetComponent <handle> ().Focus(this); pointOfCollision = chosenHandle.transform.position; } else if (currentlyFocusedUiElement.typeOfThis == NewUielement.typeOfUiElement.UniformScale) { GameObject chosenHandle = currentSelection.GetComponent <ModelingObject> ().handles.UniformScale.transform.GetChild(0).gameObject; DeFocusCurrent(chosenHandle); currentFocus = chosenHandle; currentFocus.GetComponent <handle> ().Focus(this); pointOfCollision = chosenHandle.transform.position; } else if (currentlyFocusedUiElement.typeOfThis == NewUielement.typeOfUiElement.ToggleRotation) { GameObject chosenHandle = currentSelection.GetComponent <ModelingObject> ().handles.ToggleRotateOnOff; DeFocusCurrent(chosenHandle); currentFocus = chosenHandle; currentFocus.GetComponent <handle> ().Focus(this); pointOfCollision = chosenHandle.transform.position; } else if (currentlyFocusedUiElement.typeOfThis == NewUielement.typeOfUiElement.RotateX) { GameObject chosenHandle = currentSelection.GetComponent <ModelingObject> ().handles.RotateX; DeFocusCurrent(chosenHandle); currentFocus = chosenHandle; currentFocus.GetComponent <handle> ().Focus(this); pointOfCollision = chosenHandle.transform.position; } else if (currentlyFocusedUiElement.typeOfThis == NewUielement.typeOfUiElement.RotateY) { GameObject chosenHandle = currentSelection.GetComponent <ModelingObject> ().handles.RotateY; DeFocusCurrent(chosenHandle); currentFocus = chosenHandle; currentFocus.GetComponent <handle> ().Focus(this); pointOfCollision = chosenHandle.transform.position; } else if (currentlyFocusedUiElement.typeOfThis == NewUielement.typeOfUiElement.RotateZ) { GameObject chosenHandle = currentSelection.GetComponent <ModelingObject> ().handles.RotateZ; DeFocusCurrent(chosenHandle); currentFocus = chosenHandle; currentFocus.GetComponent <handle> ().Focus(this); pointOfCollision = chosenHandle.transform.position; } } } if (currentFocus != null) { if (Input.GetMouseButtonDown(0)) { triggerPressed = true; temps = Time.time; } if (triggerPressed && (currentFocus.CompareTag("ModelingObject") || currentFocus.CompareTag("TeleportPosition") || currentFocus.CompareTag("Stage") || currentFocus.CompareTag("Library") || currentFocus.CompareTag("DistanceControl") || currentFocus.CompareTag("HeightControl")) && typeOfController == controllerType.mainController) { if (!movingObject && !groupItemSelection) { CreatePointOfCollisionPrefab(Vector3.up); //CreatePointOfCollisionPrefab (Camera.main.transform.forward * (-1f)); movingObject = true; if (currentFocus.CompareTag("ModelingObject")) { Logger.Instance.AddLine(Logger.typeOfLog.triggerOnObject); if (currentSelection != null && currentFocus != currentSelection) { //WorldLocalToggle.Instance.Hide (); currentSelection.GetComponent <ModelingObject> ().DeSelect(this); } if (!duplicateMode) { currentFocus.GetComponent <ModelingObject> ().StartMoving(this, currentFocus.GetComponent <ModelingObject> ()); if (typeOfController == controllerType.mainController) { //settingsButtonHelp.HideCompletely (false); } } else { if (currentFocus.GetComponent <ModelingObject> ().group == null) { // needs to be local position ObjectCreator.Instance.DuplicateObject(currentFocus.GetComponent <ModelingObject> (), null, currentFocus.transform.localPosition); } else { ObjectCreator.Instance.DuplicateGroup(currentFocus.GetComponent <ModelingObject> ().group, Vector3.zero); } ModelingObject duplicatedObject = ObjectCreator.Instance.latestModelingObject; DeFocusCurrent(duplicatedObject.gameObject); if (currentSelection != null) { currentSelection.GetComponent <ModelingObject> ().DeSelect(this); } currentFocus = duplicatedObject.gameObject; duplicatedObject.Focus(this); duplicatedObject.StartMoving(this, duplicatedObject); } } else if (currentFocus.CompareTag("Library")) { library.Instance.StartMoving(this); } else if (currentFocus.CompareTag("HeightControl")) { currentFocus.GetComponent <StageHeightController> ().StartMoving(this); } else if (currentFocus.CompareTag("DistanceControl")) { currentFocus.GetComponent <StageDistanceController> ().StartMoving(this); } } else if (currentFocus.CompareTag("Stage")) { currentFocus.GetComponent <StageFreeMovement> ().StartMoving(this); } } else if (triggerPressed && (movingHandle || currentFocus.CompareTag("Handle"))) { handle currentHandle = currentFocus.GetComponent <handle> (); if (!movingHandle) { CreatePointOfCollisionPrefab(Camera.main.transform.forward * (-1f)); if (currentHandle.typeOfHandle == handle.handleType.Rotation) { movingHandle = currentHandle.ApplyChanges(pointOfCollisionGO, movingHandle, this); } movingHandle = true; } else { movingHandle = currentHandle.ApplyChanges(pointOfCollisionGO, movingHandle, this); } //Debug.Log ("point of collisionpos " + pointOfCollisionGO.transform.position); //currentHandle.connectedObject.GetComponent<ModelingObject> ().HideBoundingBox (); // movingHandle = true; } } if (Input.GetMouseButtonUp(0)) { triggerPressed = false; grabbedIconOffset = Vector3.zero; if (movingHandle) { currentFocus.GetComponent <handle> ().FinishUsingHandle(this); movingHandle = false; } if (movingObject && typeOfController == controllerType.mainController) { //otherController.triggerPressed = false; //otherController.movingHandle = false; recheckFocus = true; if (currentFocus.CompareTag("ModelingObject")) { currentFocus.GetComponent <ModelingObject> ().StopMoving(this, currentFocus.GetComponent <ModelingObject> ()); if (currentFocus.GetComponent <ModelingObject> ().inTrashArea) { UiCanvasGroup.Instance.CloseMenu(this); currentFocus.GetComponent <ModelingObject> ().TrashObject(true); trashInfopanel.CloseInfoPanel(); } else { if (currentSelection != null) { if (currentSelection != currentFocus) { //currentSelection.GetComponent<ModelingObject> ().DeSelect (this); if (currentSettingSelectionMode == settingSelectionMode.alwaysOpen) { currentFocus.GetComponent <ModelingObject> ().Select(this, uiPositon.position); } } else { UiCanvasGroup.Instance.ShowAgain(uiPositon.position); } } else { if (currentSettingSelectionMode == settingSelectionMode.alwaysOpen) { currentFocus.GetComponent <ModelingObject> ().Select(this, uiPositon.position); } } } } else if (currentFocus.CompareTag("TeleportPosition")) { currentFocus.GetComponent <TeleportationPosition> ().StopMoving(this); Teleportation.Instance.JumpToPos(5); } else if (currentFocus.CompareTag("Library")) { library.Instance.StopMoving(this); } else if (currentFocus.CompareTag("HeightControl")) { currentFocus.GetComponent <StageHeightController> ().StopMoving(this); } else if (currentFocus.CompareTag("DistanceControl")) { currentFocus.GetComponent <StageDistanceController> ().StopMoving(this); } else if (currentFocus.CompareTag("Stage")) { currentFocus.GetComponent <StageFreeMovement> ().StopMoving(this); } } ///Destroy (pointOfCollisionGO); if (pointOfCollisionGO != null) { pointOfCollisionGO.SetActive(false); } movingObject = false; if (currentFocus != null) { if (currentFocus.CompareTag("ModelingObject")) { if (groupItemSelection) { if (currentFocus.GetComponent <ModelingObject> ().group == null) { ObjectsManager.Instance.AddObjectToGroup(ObjectsManager.Instance.currentGroup, currentFocus.GetComponent <ModelingObject> ()); } else { if (currentFocus.GetComponent <ModelingObject> ().group != ObjectsManager.Instance.currentGroup) { ObjectsManager.Instance.AddAllObjectsOfGroupToGroup(ObjectsManager.Instance.currentGroup, currentFocus.GetComponent <ModelingObject> ().group); } } } } else if (currentFocus.CompareTag("SelectionButton")) { UiCanvasGroup.Instance.Show(); currentFocus.GetComponent <ObjectSelecter> ().Select(this, uiPositon.position); } else if (currentFocus.CompareTag("Handle")) { handle currentHandle = currentFocus.GetComponent <handle> (); currentHandle.ResetLastPosition(); currentHandle.UnLock(); currentHandle.UnFocus(this); currentHandle.connectedObject.GetComponent <ModelingObject> ().ShowBoundingBox(true); } else if (currentFocus.CompareTag("UiElement") && UiCanvasGroup.Instance.visible && !movingObject && !movingHandle) { if (Time.time - tempsUI > 0.1f) { tempsUI = Time.time; currentFocus.GetComponent <UiElement> ().PerformAction(this); if (currentFocus.GetComponent <UiElement> ().goal != null) { currentFocus.GetComponent <UiElement> ().goal.ActivateMenu(); } Logger.Instance.AddLine(Logger.typeOfLog.uiElement); } } else if (currentFocus.CompareTag("InfoPanel")) { currentFocus.GetComponent <Infopanel> ().CloseInfoPanel(); } else if (currentFocus.CompareTag("TeleportTrigger")) { Teleportation.Instance.JumpToPos(currentFocus.GetComponent <TeleportationTrigger> ().triggerPos); } } temps = 0; } if (Input.GetKeyDown(KeyCode.LeftAlt)) { duplicateMode = true; } if (Input.GetKeyUp(KeyCode.LeftAlt)) { duplicateMode = false; } }
set => leveldb_readoptions_set_verify_checksums(handle, value);
public UserEvents(String script) { this.script = script; eventOps = null; }
_ => new Constant(handle, handle.Kind),
public UserEvents(handle func) { eventOps = func; script = null; }
public Weapon(string name, handle handle) : base(name) { Name = name; Part = Parts.Weapon; Handle = handle; }
LLVMTypeKind.LLVMLabelTypeKind => new Type(handle, LLVMTypeKind.LLVMLabelTypeKind),