public void SetViewMode(Calendar.ViewMode newViewMode) { // updates the calendar currentViewMode = newViewMode; displayViewModeText.text = Calendar.ViewModeToString(currentViewMode); parentCalendar.SetViewMode(currentViewMode); CloseDropdown(); }
public void ChangeCalendarViewMode(string newViewModeString) { // Changes the current active calendar try { Calendar.ViewMode newViewMode = (Calendar.ViewMode)System.Enum.Parse(typeof(Calendar.ViewMode), newViewModeString); currentActiveCalendar.BuildCalendar(newViewMode, currentActiveCalendar.currentMonth); DisplaySelectedDateInformation(); } catch (System.Exception) { // Couldnt parse enum print("Couldnt parse"); } }
public void ManuallySetViewMode(Calendar.ViewMode newViewMode) { // just updates the dropdown currentViewMode = newViewMode; displayViewModeText.text = Calendar.ViewModeToString(currentViewMode); CloseDropdown(); }