/// <summary> /// Constructor for time task types fragments /// </summary> /// <param name="taskType">The task's type for this fragment to create</param> /// <param name="viewModel">The view model for this fragment</param> public MvxFragmentInfo(TimeTaskType taskType, IMvxViewModel viewModel) { Title = taskType.ToString(); IconResourceId = taskType.ToIcon(); FragmentType = typeof(AddNewTimeTaskFragment); ViewModel = viewModel; }
public static double ConvertBasedOnType(this double maxProgress, TimeTaskType type) { switch (type) { case TimeTaskType.Generic: return(100); case TimeTaskType.Reading: return(maxProgress); default: return(100); } }
public static int ToIcon(this TimeTaskType taskType) { // Return associated icon based on provided type switch (taskType) { case TimeTaskType.Generic: return(Resource.Drawable.icon_type_generic); case TimeTaskType.Reading: return(Resource.Drawable.icon_type_reading); default: return(-1); } }
/// <summary> /// Default constructor that initializes this fragment with provided data /// </summary> /// <param name="type">The type of this time task</param> public AddNewTimeTaskFragment(TimeTaskType type) { // Get the type for this specific time task Type = type; }