protected virtual void LicenseStatusChange(LicenseStatus oldObj, LicenseStatus newObj) { Action<LicenseStatusEventArg> handler = licenseChange; if (licenseChange != null) { LicenseStatusEventArg arg = new LicenseStatusEventArg(); arg.oldStatus = oldObj; arg.NewStatus = newObj; licenseStatus = newObj; handler(arg); } }
void licenseClient_licenseChange(LicenseStatusEventArg obj) { Console.WriteLine("Old :" + obj.oldStatus + " And " + "New :" + obj.NewStatus.ToString()); switch (obj.NewStatus) { case LicenseStatus.joinLicense: { WriteLog("licenseChange 이벤트 발생 " + LicenseStatus.joinLicense.ToString()); } break; case LicenseStatus.fullLicense: { WriteLog("licenseChange 이벤트 발생 current is " + LicenseStatus.fullLicense.ToString()); } break; case LicenseStatus.stopConnection: { WriteLog("licenseChange 이벤트 발생 " + LicenseStatus.stopConnection.ToString()); } break; case LicenseStatus.reConnectLicense: { WriteLog("licenseChange 이벤트 발생 " + LicenseStatus.reConnectLicense.ToString()); } break; default: break; } }