Exemple #1
0
    // Use this for initialization
    void Start()
    {
        // Get Flat Calendar Instance
        //获取平面日历实例
        flatCalendar = GameObject.Find("FlatCalendar").GetComponent <FlatCalendar>();

        // Initialize Flat Calendar
        //初始化平日历
        flatCalendar.initFlatCalendar();

        // Install Demo Event List
        //安装演示事件列表
        flatCalendar.installDemoData();

        // Add Events Callbacks
        //添加事件回调
        flatCalendar.setCallback_OnDaySelected(dayUpdated);
        flatCalendar.setCallback_OnMonthChanged(monthUpdated);
        flatCalendar.setCallback_OnEventSelected(eventsDiscovered);
        flatCalendar.setCallback_OnNowday(backHome);

        // Set UI Style
        //设置UI样式
        flatCalendar.setUIStyle(1);
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        // Get Flat Calendar Instance
        flatCalendar = GameObject.Find("FlatCalendar").GetComponent <FlatCalendar>();

        // Initialize Flat Calendar
        flatCalendar.initFlatCalendar();

        // Install Demo Event List
        flatCalendar.installDemoData();

        // Add Events Callbacks
        flatCalendar.setCallback_OnDaySelected(dayUpdated);
        flatCalendar.setCallback_OnMonthChanged(monthUpdated);
        flatCalendar.setCallback_OnEventSelected(eventsDiscovered);
        flatCalendar.setCallback_OnNowday(backHome);

        // Set UI Style
        flatCalendar.setUIStyle(1);

        // Add Event Demo
        EventObj demoEvent = new EventObj("Event Name", "Event Description");

        flatCalendar.addEvent(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, demoEvent);
    }
Exemple #3
0
    void Awake()
    {
        _controller           = GameObject.Find("mainCtr").GetComponent <MainController>();
        _controller._calendar = cal;
        cal.initFlatCalendar();
        cal.setUIStyle(4);
        user_nickname.text = _controller._user.nickname;
        user_email.text    = _controller._user.email;
        Dictionary <string, Events> event_list = _controller._user.events_list;
        List <Group> group_list = _controller.group_list;

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


        int gidx = 1;

        foreach (Group g in group_list)
        {
            GameObject tmp = group_view.transform.GetChild(gidx).gameObject;
            tmp.SetActive(true);
            tmp.transform.GetChild(0).GetComponent <Text>().text = g.name;
            gidx++;
        }
        // cal.addEvent(2019, 11, 4, new FlatCalendar.EventObj("a", "b"));
        cal.updateUiLabelEvents(cal.currentTime.year, cal.currentTime.month, cal.currentTime.day);
    }
Exemple #4
0
        // -------------------------------------------

        /*
         * Constructor
         */
        public override void Initialize(params object[] _list)
        {
            double timestampDate = DateConverter.GetTimestamp();

            if (_list.Length > 0)
            {
                if (_list[0] is string)
                {
                    string bufferData = (string)_list[0];
                    if (bufferData.Length > 0)
                    {
                        if (!double.TryParse(bufferData, out timestampDate))
                        {
                            timestampDate = DateConverter.GetTimestamp();
                        }
                    }
                }
            }

            // INIT CALENDAR
            m_flatCalendar = GameObject.Find("FlatCalendar").GetComponent <FlatCalendar>();
            m_myDateTime   = DateConverter.TimeStampToDateTime(timestampDate);
            m_flatCalendar.initFlatCalendar();
            m_flatCalendar.setCallback_OnDaySelected(DayUpdated);
            m_flatCalendar.setUIStyle(0);
            UIEventController.Instance.DelayUIEvent(UIEventController.EVENT_BASICEVENT_DELAYED_CALL, 0.01f, this.gameObject, "SetRequestDate");

            UIEventController.Instance.UIEvent += new UIEventHandler(OnBasicEvent);
        }
Exemple #5
0
    // Use this for initialization
    void Start()
    {
        // Get Flat Calendar Instance
        flatCalendar = GameObject.Find("FlatCalendar").GetComponent <FlatCalendar>();

        // Initialize Flat Calendar
        flatCalendar.initFlatCalendar();

        // Install Demo Event List
        //flatCalendar.installDemoData();

        // Add Events Callbacks
        flatCalendar.setCallback_OnDaySelected(dayUpdated);
        flatCalendar.setCallback_OnMonthChanged(monthUpdated);
        flatCalendar.setCallback_OnEventSelected(eventsDiscovered);
        flatCalendar.setCallback_OnNowday(backHome);

        // Set UI Style
        flatCalendar.setUIStyle(1);
    }