public void UpdateJoints(ProjectRobotJoints joints) { ProjectRobotJoints originalJoints = GetJoints(joints.Id); originalJoints.Joints = joints.Joints; BaseUpdateJoints(originalJoints, joints); }
public async void ShowMenu(Base.ActionPoint currentActionPoint, ProjectRobotJoints joints) { /*try { * await WebsocketManager.Instance.WriteLock(joints.Id, false); * } catch (RequestFailedException ex) { * Notifications.Instance.ShowNotification("Failed to lock joints", ex.Message); * Debug.LogError(ex.Message); * return; * }*/ CurrentActionPoint = currentActionPoint; this.joints = joints; isOrientationDetail = false; try { RobotName.text = SceneManager.Instance.GetRobot(joints.RobotId).GetName(); ArmName.text = joints.ArmId; } catch (ItemNotFoundException ex) { Notifications.Instance.ShowNotification(ex.Message, ""); } await PrepareRobotModel(joints.RobotId, false); MoveHereModel(); UpdateJointsList(); ShowMenu(currentActionPoint); }
private void OnActionPointJointsUpdated(object sender, RobotJointsEventArgs args) { if (joints != null && joints.Id == args.Data.Id) { joints = args.Data; UpdateMenu(); } }
public void ShowMenu(Base.ActionPoint currentActionPoint, ProjectRobotJoints joints) { this.joints = joints; isOrientationDetail = false; try { RobotName.text = SceneManager.Instance.GetRobot(joints.RobotId).GetName(); } catch (ItemNotFoundException ex) { Notifications.Instance.ShowNotification(ex.Message, ""); } ShowMenu(currentActionPoint); }
public void ActionPointJointsRemoved(ProjectRobotJoints joints) { try { ActionPoint actionPoint = GetActionPointWithJoints(joints.Id); actionPoint.RemoveJoints(joints); OnActionPointUpdated?.Invoke(this, new ActionPointUpdatedEventArgs(actionPoint)); OnProjectChanged?.Invoke(this, EventArgs.Empty); } catch (KeyNotFoundException ex) { Debug.LogError(ex); Notifications.Instance.ShowNotification("Failed to remove action point joints", ex.Message); return; } }
public async void OpenDetailMenu(ProjectRobotJoints joint) { AddOrientationContainer.SetActive(false); AddJointsContainer.SetActive(false); if (OrientationJointsDetailMenu.IsVisible()) { OrientationJointsDetailMenu.HideMenu(); } ContainerJoints.SetActive(false); ContainerOrientations.SetActive(false); ContainerPosition.SetActive(false); OrientationJointsDetailMenu.ShowMenu(CurrentActionPoint, joint); }
private void OnActionPointJointsUpdated(object sender, RobotJointsEventArgs args) { if (!gameObject.activeInHierarchy) { return; } if (joints != null && joints.Id == args.Data.Id) { joints = args.Data; UpdateMenu(); MoveHereModel(); } }
public void AddJoints(ProjectRobotJoints joints) { Data.RobotJoints.Add(joints); }
public void BaseUpdateJoints(ProjectRobotJoints originalJoints, ProjectRobotJoints joints) { originalJoints.Name = joints.Name; originalJoints.IsValid = joints.IsValid; originalJoints.RobotId = joints.RobotId; }
public void RemoveJoints(ProjectRobotJoints joints) { Data.RobotJoints.Remove(joints); }
public ActionPointJointsAddedEventArgs(string actionPointID, ProjectRobotJoints joints) { ActionPointID = actionPointID; Joints = joints; }
private void OpenDetailMenu(ProjectRobotJoints joint) { OrientationJointsDetailMenu.ShowMenu(CurrentActionPoint, joint); }