Exemple #1
0
    public void ChangeCalendar(int i)
    {
        Dictionary <string, Events> event_list = null;

        _controller.CurrentGroup = i;

        //제목설정
        if (i == -1)
        {
            calendarName.text = "내 캘린더";
            event_list        = _controller._user.events_list;
        }
        else
        {
            calendarName.text = _controller.group_list[i].name;
            event_list        = _controller.group_list[i].events_list;
        }

        cal.removeAllCalendarEvents(); //이전꺼 지우기


        //Debug.Log("count= " + event_list.Count);
        foreach (KeyValuePair <string, Events> items in event_list)
        {
            Events item = items.Value;
            cal.addEvent(item.year, item.month, item.day, new FlatCalendar.EventObj(items.Key, item.title, item.description, item.hour, item.min, item.place));
        }
        cal.setCurrentTime();
        cal.evtListener_GoToNowday();
        //cal.updateUiLabelEvents(cal.currentTime.year, cal.currentTime.month, cal.currentTime.day);
    }