Exemplo n.º 1
0
 /// <summary>
 /// 输入周查课表
 /// </summary>
 private void KBNumSearch()
 {
     if (KBNumFlyoutTextBox.Text != "" && KBNumFlyoutTextBox.Text.IndexOf(".") == -1)
     {
         try
         {
             week = int.Parse(KBNumFlyoutTextBox.Text);
             HubSectionKBNum.Text = KBNumFlyoutTextBox.Text;
             KBNumFlyout.Hide();
             ResultName = new string[7, 6][];
             EmptyClass ec = new EmptyClass(week, forsearchlist);
             result = new ObservableCollection <ClassListLight>();
             ec.getfreetime(result, termresult);
             showFreeKB(result, showWeekend);
         }
         catch (Exception)
         {
             Utils.Message("请输入正确的周次");
         }
     }
     else
     {
         Utils.Message("请输入正确的周次");
     }
 }
        /// <summary>
        /// 输入周查课表
        /// </summary>
        private async void KBNumSearch()
        {
            if (KBNumFlyoutTextBox.Text != "" && KBNumFlyoutTextBox.Text.IndexOf(".") == -1)
            {
                try
                {
                    week = int.Parse(KBNumFlyoutTextBox.Text);
                    FilterAppBarButton.Label = "第" + KBNumFlyoutTextBox.Text + "周";
                    KBNumFlyout.Hide();
                    ResultName = new string[7, 6][];
                    EmptyClass ec = new EmptyClass(week, forsearchlist);
                    result = new ObservableCollection <ClassListLight>();
                    //ec.getfreetime(result, termresult);
                    //await ec.getfreetimeasync(result, termresult);
                    await GetData(ec);

                    showFreeKB(result, showWeekend);
                }
                catch (Exception)
                {
                    Utils.Message("请输入正确的周次");
                }
            }
            else
            {
                Utils.Message("请输入正确的周次");
            }
        }
Exemplo n.º 3
0
 private void KBNumSearchButton_Click(object sender, RoutedEventArgs e)
 {
     if (KBNumFlyoutTextBox.Text != "" && KBNumFlyoutTextBox.Text.IndexOf(".") == -1)
     {
         HubSectionKBNum.Text          = KBNumFlyoutTextBox.Text;
         appSetting.Values["FreeWeek"] = KBNumFlyoutTextBox.Text;
         KBNumFlyout.Hide();
     }
     else
     {
         Utils.Message("请输入正确的周次");
     }
 }
Exemplo n.º 4
0
 private void KBNumSearchButton_Click(object sender, RoutedEventArgs e)
 {
     if (KBNumFlyoutTextBox.Text != "" && KBNumFlyoutTextBox.Text.IndexOf(".") == -1)
     {
         showKB(2, Int16.Parse(KBNumFlyoutTextBox.Text));
         HubSectionKBNum.Text = "第" + KBNumFlyoutTextBox.Text + "周";
         DateTime now       = DateTime.Now;
         DateTime weekstart = GetWeekFirstDayMon(KBNumFlyoutTextBox.Text == "" ? now : now.AddDays((Int16.Parse(KBNumFlyoutTextBox.Text) - Int16.Parse(appSetting.Values["nowWeek"].ToString())) * 7));
         DateTime weekend   = GetWeekLastDaySun(KBNumFlyoutTextBox.Text == "" ? now : now.AddDays((Int16.Parse(KBNumFlyoutTextBox.Text) - Int16.Parse(appSetting.Values["nowWeek"].ToString())) * 7));
         this.HubSectionKBDate.Text = weekstart.Month + "." + weekstart.Day + "--" + weekend.Month + "." + weekend.Day;
         KBNumFlyout.Hide();
     }
     else
     {
         Utils.Message("请输入正确的周次");
     }
 }
Exemplo n.º 5
0
 private void HubSectionKBNum_Tapped(object sender, TappedRoutedEventArgs e)
 {
     KBNumFlyout.ShowAt(page);
     HubSectionKBNum.SelectAll();
 }
Exemplo n.º 6
0
 private void FilterAppBarButton_Click(object sender, RoutedEventArgs e)
 {
     KBNumFlyout.ShowAt(commandBar);
 }