Example #1
0
        private void BaseMainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            configtime         = cb.GetConfig();
            this.txt_time.Text = DateTime.Now.ToShortTimeString();
            this.txt_week.Text = "星期" + "日一二三四五六".Substring((int)System.DateTime.Now.DayOfWeek, 1);
            this.txt_date.Text = DateTime.Now.ToShortDateString();

            MainTime          = new System.Timers.Timer(1000);
            MainTime.Elapsed += new ElapsedEventHandler(MainTime_Elapsed);
            MainTime.Start();

            NotieTime          = new System.Timers.Timer(configtime.NoticeShowTime * 1000);
            NotieTime.Elapsed += new ElapsedEventHandler(NotieTime_Elapsed);

            base.NavigationToUserPage(this.Grid_Container, GetUserControlNameFromDic(0));
        }