I want to operate ER_Config:
- Add some configures of my app to the ER_Config using deployment tool;
- Get those configures in my app;
Is OK?
I want to operate ER_Config:
Is OK?
@ chulaiguo - It would probably be easiest to create a class to hold all of your settings and save this with extended weak reference
extended weak reference is stable? I write configure file with ewr, sometime the configure file has lost, why? code example:
private static ExtendedWeakReference _EWRDevice;
public static DeviceInfo LoadDeviceInfo()
{
try
{
_EWRDevice = ExtendedWeakReference.RecoverOrCreate(
typeof(DeviceInfo), 0, ExtendedWeakReference.c_SurvivePowerdown);
_EWRDevice.Priority = (Int32)ExtendedWeakReference.PriorityLevel.System;
DeviceInfo data = (DeviceInfo)_EWRDevice.Target;
if (data == null)
{
data = new DeviceInfo();
data.DeviceID = "2b002a00-1147-3034-3236-3335e1501000";//for test
}
return data;
}
catch (Exception ex)
{
Debug.Print(ex.Message);
return new DeviceInfo();
}
}
There is also a flush ewr method hidden in the GHI library
We had bad experiences with EWR. Sometimes EWR wans not recovered without knowing the reason. After some discussion with GHI people on the forum, we decided to not use EWR anymore.