public BaseRealApi(string resName) { this.resName = resName; inBlock = "InBlock"; outBlock = "OutBlock"; if (real == null) { real = new XARealClass(); real.ReceiveRealData += Real_ReceiveRealData; real.LoadFromResFile($".\\res\\{resName}.res"); } }