本文整理汇总了C#中EmptyClass.getfreetime方法的典型用法代码示例。如果您正苦于以下问题:C# EmptyClass.getfreetime方法的具体用法?C# EmptyClass.getfreetime怎么用?C# EmptyClass.getfreetime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmptyClass
的用法示例。
在下文中一共展示了EmptyClass.getfreetime方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: initFree
/// <summary>
/// 获得各个学号的课表
/// </summary>
private async void initFree()
{
for (int i = 0; i < muIdList.Count; i++)
{
int issuccess = 0;
List<ClassListLight> clist = new List<ClassListLight>();
while (issuccess < 2) //失败后重试两次
{
List<KeyValuePair<String, String>> paramList = new List<KeyValuePair<String, String>>();
paramList.Add(new KeyValuePair<string, string>("stuNum", muIdList[i].uId));
string kbtemp = await NetWork.getHttpWebRequest("redapi2/api/kebiao", paramList); //新
if (kbtemp != "")
{
JObject job = JObject.Parse(kbtemp);
if (Int32.Parse(job["status"].ToString()) == 200)
{
JArray jarry = Utils.ReadJso(kbtemp);
for (int j = 0; j < jarry.Count; j++)
{
ClassListLight cll = new ClassListLight();
var istriple = cll.getattribute((JObject)jarry[j]);
cll.Name = new string[] { muIdList[i].uName }; // muIdList[i].uName;
if (istriple != null)
{
clist.Add(istriple);
istriple.Name = cll.Name;
}
clist.Add(cll);
}
}
issuccess = 2;
}
else
{
issuccess++;
}
}
forsearchlist.Add(muIdList[i].uName, clist);
FreeLoddingProgressBar.Value = FreeLoddingProgressBar.Value + 100.0 / muIdList.Count;
Debug.WriteLine(FreeLoddingProgressBar.Value);
}
//查无课表,参数第几周==
EmptyClass ec = new EmptyClass(week, forsearchlist);
ec.getfreetime(result, termresult);
//freetime(11, forsearchlist);
FreeLoddingStackPanel.Visibility = Visibility.Collapsed;
FreeKBTableGrid.Visibility = Visibility.Visible;
ShowWeekendAppBarButton.Visibility = Visibility.Visible;
if (result.Count != 0)
showFreeKB(result);
else
showFreeKB(termresult);
}
示例2: CalendarWeekAppBarButton_Click
/// <summary>
/// 学期和周的切换
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void CalendarWeekAppBarButton_Click(object sender, RoutedEventArgs e)
{
if (week != -100)
{
week_old = week;
week = -100;
weekorterm = true;
HubSectionKBNum.Visibility = Visibility.Collapsed;
HubSectionKBNumD.Visibility = Visibility.Collapsed;
HubSectionKBNumZ.Visibility = Visibility.Collapsed;
ResultName.Initialize();
EmptyClass ec = new EmptyClass(week, forsearchlist);
ec.getfreetime(result, termresult);
showFreeKB(termresult, showWeekend);
}
else
{
weekorterm = false;
week = week_old;
HubSectionKBNum.Text = week.ToString();
HubSectionKBNum.Visibility = Visibility.Visible;
HubSectionKBNumD.Visibility = Visibility.Visible;
HubSectionKBNumZ.Visibility = Visibility.Visible;
ResultName.Initialize();
EmptyClass ec = new EmptyClass(week, forsearchlist);
ec.getfreetime(result, termresult);
showFreeKB(result, showWeekend);
}
}
示例3: ShowWeekendAppBarButton_Click
/// <summary>
/// 显示隐藏周末
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ShowWeekendAppBarButton_Click(object sender, RoutedEventArgs e)
{
if (showWeekend)
ShowWeekendAppBarButton.Label = "显示周末课表";
else
ShowWeekendAppBarButton.Label = "隐藏周末课表";
showWeekend = !showWeekend;
EmptyClass ec = new EmptyClass(week, forsearchlist);
ec.getfreetime(result, termresult); if (week != -100)
{
showFreeKB(result, showWeekend);
}
else
{
showFreeKB(termresult, showWeekend);
}
}
示例4: KBNumSearch
/// <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("请输入正确的周次");
}