UserPreference
Revision as of 05:13, 22 November 2016 by Nguyenduyan (talk | contribs)
UserPreference
A user preference
Constructors
- (string navName "Navigation access value was stored with", int prefType "Unique key for the setting") - Get existing a new personalized stored value.
- (string navName "Navigation access to associate the value with", int prefType "Unique key for the setting", string value "Value to store") - Create a new or update existing personalized stored value.
Methods
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- TypeInformation TypeInformation { get; } - Get information about this class.
- string Value { get; set; } - Get/Set the current value
Examples
//create a new userPreference
string navName="Questionnaire_Search";
number prefType=1;
string value="Hello world";
UserPreference pref = new UserPreference(navName, prefType,value);
pref.Save();
//Get existing userPreference
string navName="Questionnaire_Search";
number prefType=1;
UserPreference pref = new UserPreference(navName, prefType);
print(pref.Value);//return: Hello world
//Update an existing userPreference
string navName="Questionnaire_Search";
number prefType=1;
string value="abc xyz";
UserPreference pref = new UserPreference(navName, prefType, value);
pref.Save();
print(pref.Value);//return: abc xyz