/*
     * private void GenerateBlackBoard() {
     *  var blackboard = new Blackboard(_graphView);
     *  blackboard.Add(new BlackboardSection { title = "全局变量" });
     *  blackboard.addItemRequested = _blackboard => { _graphView.AddPropertyToBlackBoard(new ExposedProperty()); };
     *
     *  blackboard.SetPosition(new Rect(10,30,200,300));
     *  //_graphView.Blackboard = blackboard;
     *  _graphView.Add(blackboard);
     *
     * }
     */
    private void RequestDataOperation(bool save)
    {
        if (string.IsNullOrEmpty(_fileName))
        {
            EditorUtility.DisplayDialog("无效文件名", "请输入有效文件名", "确定");
            return;
        }

        if (save)
        {
            GraphSaveUtility.SaveGraph(_fileName, _graphView);
        }
        else
        {
            GraphSaveUtility.LoadGraph(_fileName, _graphView);
        }
    }
    private void RequestDataOperation(bool toSave)
    {
        if (string.IsNullOrEmpty(_fileName))
        {
            EditorUtility.DisplayDialog("Invalid file name", "Please enter a valid file name", "Sound Good");
            return;
        }

        GraphSaveUtility saveUtility = GraphSaveUtility.GetInstance(_graphView);

        if (toSave)
        {
            saveUtility.SaveGraph(_fileName);
        }
        else
        {
            saveUtility.LoadGraph(_fileName);
        }
    }