コード例 #1
0
        public void LoadCourseTable()
        {
            //ImportDataFromCouseTableXlsx();
            //strdayofweek maybe (if en-US)MONDAY, TUESDAY.. ,(if tr-TR)PAZARTESİ, SALI... etc.
            string strdayofweek = DateTime.Today.ToString("dddd").ToUpper();

            var x = SchoolTimeSpanManager.schoolTimeSpansByWeekDay(strdayofweek);

            listViewCourseTable.ItemsSource = x;
        }
コード例 #2
0
        private void ClockTimer_Tick(object sender, object e)
        {
            textBlockClock.Text = getNow();
            textBlockToday.Text = getTodayUpper(LocalizationUtils.GetDefaultCultureInforName());

            if (!SchoolTimeSpanManager.isSchoolTimeSpansEmpty())
            {
                string   strdayofweek = DateTime.Today.ToString("dddd").ToUpper();
                TimeSpan tsnow        = DateTime.Now.TimeOfDay;
                CourseTableRowIdxAndRemainingTime i_and_t;

                i_and_t = SchoolTimeSpanManager.IndexByTime(tsnow, SchoolTimeSpanManager.schoolTimeSpansByWeekDay(strdayofweek));

                try
                {
                    listViewCourseTable.SelectedIndex = i_and_t.idx;
                }
                catch
                {
                }

                TextBlockRemeainingTime.Text = i_and_t.RemainingTime.ToString(@"hh\:mm\:ss");
            }
        }