예제 #1
0
 /// <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;
 }
예제 #2
0
        public static double ConvertBasedOnType(this double maxProgress, TimeTaskType type)
        {
            switch (type)
            {
            case TimeTaskType.Generic:
                return(100);

            case TimeTaskType.Reading:
                return(maxProgress);

            default:
                return(100);
            }
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
 /// <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;
 }