コード例 #1
0
        public void UpdateJoints(ProjectRobotJoints joints)
        {
            ProjectRobotJoints originalJoints = GetJoints(joints.Id);

            originalJoints.Joints = joints.Joints;
            BaseUpdateJoints(originalJoints, joints);
        }
コード例 #2
0
    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);
    }
コード例 #3
0
 private void OnActionPointJointsUpdated(object sender, RobotJointsEventArgs args)
 {
     if (joints != null && joints.Id == args.Data.Id)
     {
         joints = args.Data;
         UpdateMenu();
     }
 }
コード例 #4
0
 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);
 }
コード例 #5
0
 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;
     }
 }
コード例 #6
0
 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);
 }
コード例 #7
0
 private void OnActionPointJointsUpdated(object sender, RobotJointsEventArgs args)
 {
     if (!gameObject.activeInHierarchy)
     {
         return;
     }
     if (joints != null && joints.Id == args.Data.Id)
     {
         joints = args.Data;
         UpdateMenu();
         MoveHereModel();
     }
 }
コード例 #8
0
 public void AddJoints(ProjectRobotJoints joints)
 {
     Data.RobotJoints.Add(joints);
 }
コード例 #9
0
 public void BaseUpdateJoints(ProjectRobotJoints originalJoints, ProjectRobotJoints joints)
 {
     originalJoints.Name    = joints.Name;
     originalJoints.IsValid = joints.IsValid;
     originalJoints.RobotId = joints.RobotId;
 }
コード例 #10
0
 public void RemoveJoints(ProjectRobotJoints joints)
 {
     Data.RobotJoints.Remove(joints);
 }
コード例 #11
0
 public ActionPointJointsAddedEventArgs(string actionPointID, ProjectRobotJoints joints)
 {
     ActionPointID = actionPointID;
     Joints        = joints;
 }
コード例 #12
0
 private void OpenDetailMenu(ProjectRobotJoints joint)
 {
     OrientationJointsDetailMenu.ShowMenu(CurrentActionPoint, joint);
 }