Add onitemselected on history listview
Migrate pref string to C