/// <summary> /// If you want to stop working PenCommAgent, you can call this function. /// </summary> public void Dispose() { if (isConnected()) { mCommV2.Clean(); mCommV1.Clean(); } IsInitilized = false; }