I am invoking a delegate and I'm not very informed about how it works and I have compilation errors because of it (Compiler Error CS1660). This is the code I have for it:
base.Invoke( delegate {
bool flag = (((this.layerPickPlaceProcess != null) && (this.robotComponent != null)) && ((((StateEnum) this.layerPickPlaceProcess.State) == StateEnum.Idle) || (((StateEnum) this.layerPickPlaceProcess.State) == StateEnum.Ready))) && ((((StateEnum) this.robotComponent.State) == StateEnum.Idle) || (((StateEnum) this.robotComponent.State) == StateEnum.Ready));
this.cmdManualPlace.Enabled = flag;
});