public History GetUserHistory(Card card, UserHistoryType type) { return new History() { Text = string.Format("{0} - {1}", _userMessages[type], card.Title), Created = _dtp.Now }; }
/** Return the appropriate symbol name from the constants * for the user history type. */ public static string GetUserHistoryIcon(UserHistoryType historyType) { #if DEBUG Console.WriteLine("TreeViewHelper.GetUserHistoryIcon"); #endif switch(historyType) { default: Debug.PrintMessage ("treeview_helper_get_user_history_icon: unknown type {0}.\n", historyType); return null; case UserHistoryType.USER_HISTORY_START_GAME: return Option.ConstApp("string_treeview_helper_user_history_symbol_start_game_icon"); case UserHistoryType.USER_HISTORY_FIRE_FINANCE: return Option.ConstApp("string_treeview_helper_user_history_symbol_fire_finances_icon"); case UserHistoryType.USER_HISTORY_FIRE_FAILURE: return Option.ConstApp("string_treeview_helper_user_history_symbol_fire_failure_icon"); case UserHistoryType.USER_HISTORY_JOB_OFFER_ACCEPTED: return Option.ConstApp("string_treeview_helper_user_history_symbol_job_offer_accepted_icon"); case UserHistoryType.USER_HISTORY_END_SEASON: return Option.ConstApp("string_treeview_helper_user_history_symbol_end_season_icon"); case UserHistoryType.USER_HISTORY_WIN_FINAL: return Option.ConstApp("string_treeview_helper_user_history_symbol_win_final_icon"); case UserHistoryType.USER_HISTORY_LOSE_FINAL: return Option.ConstApp("string_treeview_helper_user_history_symbol_lose_final_icon"); case UserHistoryType.USER_HISTORY_PROMOTED: return Option.ConstApp("string_treeview_helper_user_history_symbol_promoted_icon"); case UserHistoryType.USER_HISTORY_RELEGATED: return Option.ConstApp("string_treeview_helper_user_history_symbol_relegated_icon"); case UserHistoryType.USER_HISTORY_REACH_CUP_ROUND: return Option.ConstApp("string_treeview_helper_user_history_symbol_reach_cup_round_icon"); case UserHistoryType.USER_HISTORY_CHAMPION: return Option.ConstApp("string_treeview_helper_user_history_symbol_champion_icon"); } return null; }