private void UpdateFunctionViewIfNecessary() { // 如果当前函数类型不匹配则重新创建新的function if ((null == this._function && FunctionType != FunctionType.None) || (null != this._function && !this._function.IsTypeFit(FunctionType))) { this._globalInfo.MainForm.Invoke(new Action(() => { this._function = FunctionBase.CreateFunction(FunctionType, this.DataCache); this._parentForm.InitFunctionResultArea(this._function); this._parentForm.InitFunctionConfigArea(this._function); RefreshFunctionConfigArea(); })); } }