コード例 #1
0
    private async Task <RequestResult> ValidateParent(object selectedParent)
    {
        IActionPointParent parent = (IActionPointParent)selectedParent;
        RequestResult      result = new RequestResult(true, "");

        if (parent.GetId() == CurrentActionPoint.GetId())
        {
            result.Success = false;
            result.Message = "Action point cannot be its own parent!";
        }

        return(result);
    }
コード例 #2
0
ファイル: LeftMenu.cs プロジェクト: robofit/arcor2_areditor
    private async void AssignToParent(object selectedObject)
    {
        IActionPointParent parent = (IActionPointParent)selectedObject;

        if (parent == null)
        {
            return;
        }
        string id = "";

        id = parent.GetId();
        bool result = await Base.GameManager.Instance.UpdateActionPointParent(selectedActionPoint, id);

        if (!result)
        {
            selectedActionPoint.WriteUnlock();
        }
    }
コード例 #3
0
    private async void AssignToParent(object selectedObject)
    {
        IActionPointParent parent = (IActionPointParent)selectedObject;

        if (parent == null)
        {
            return;
        }
        bool result = await Base.GameManager.Instance.UpdateActionPointParent(CurrentActionPoint, parent.GetId());

        if (result)
        {
            //
        }
    }