本文整理汇总了C#中ISchedule.GetClassRoom方法的典型用法代码示例。如果您正苦于以下问题:C# ISchedule.GetClassRoom方法的具体用法?C# ISchedule.GetClassRoom怎么用?C# ISchedule.GetClassRoom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISchedule
的用法示例。
在下文中一共展示了ISchedule.GetClassRoom方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetFineOfFullSchedule
public int GetFineOfFullSchedule(ISchedule schedule, EntityStorage eStorage)
{
int fineResult = 0;
for (int groupIndex = 0; groupIndex < eStorage.StudentSubGroups.Length; groupIndex++)
{
PartialSchedule groupSchedule = schedule.GetPartialSchedule(eStorage.StudentSubGroups[groupIndex]);
for (int dayIndex = 0; dayIndex < Constants.DAYS_IN_WEEK; dayIndex++)
{
StudentsClass[] sClass = groupSchedule.GetClassesOfDay(dayIndex);
for (int classIndex = 0; classIndex < sClass.Length; classIndex++)
{
if (sClasses.FindAll((c) => c.sClass == sClass[classIndex]).Count() > 0)
{
FixedClasses vipClass = sClasses.Find((c) => c.sClass == sClass[classIndex]);
if (vipClass.Room != schedule.GetClassRoom(sClass[classIndex]) && vipClass.Time != schedule.GetClassPosition(sClass[classIndex]).Value.Time)
{
if (isBlock)
return Constants.BLOCK_FINE;
else
fineResult += fine;
}
}
}
}
}
return fineResult;
}
示例2: GetFineOfAddedClass
public int GetFineOfAddedClass(ISchedule schedule, EntityStorage eStorage)
{
int fineResult = 0;
StudentsClass tClass = schedule.GetTempClass();
int tTime = schedule.GetClassPosition(tClass).Value.Time;
if (sClasses.FindAll((c) => c.sClass == tClass).Count() > 0)
{
FixedClasses vipClass = sClasses.Find((c) => c.sClass == tClass);
if (vipClass.Room != schedule.GetClassRoom(tClass) || vipClass.Time != tTime)
{
if (isBlock)
return Constants.BLOCK_FINE;
else
fineResult += fine;
}
}
else
{
if (sClasses.FindAll((c) => c.Time == tTime && StudentsClass.StudentClassContainsEvenOneSubGroup(tClass, c.sClass)).Count() > 0)
{
if (isBlock)
return Constants.BLOCK_FINE;
else
fineResult += fine;
}
}
return fineResult;
}
示例3: GetFineOfFullSchedule
public int GetFineOfFullSchedule(ISchedule schedule, EntityStorage eStorage)
{
int fineResult = 0;
if (favClassRooms == null)
{ return fineResult; }
foreach (StudentsClass sClass in eStorage.Classes)
{
if (favClassRooms.ContainsKey(sClass))
{
if (favClassRooms[sClass].Find((c) => c == schedule.GetClassRoom(sClass)) == null)
{
if (isBlock)
return Constants.BLOCK_FINE;
else
fineResult += fine;
}
}
}
return fineResult;
}
示例4: GetFineOfFullSchedule
public int GetFineOfFullSchedule(ISchedule schedule, EntityStorage eStorage)
{
int fineResult = 0;
if (favBuildings == null)
{ return fineResult; }
foreach (StudentsClass sClass in eStorage.Classes)
{
foreach (Teacher teacher in sClass.Teacher)
{
if (favBuildings.ContainsKey(teacher))
{
if (favBuildings[teacher].IndexOf(schedule.GetClassRoom(sClass).Housing) == -1)
{
if (isBlock)
return Constants.BLOCK_FINE;
else
fineResult += fine;
}
}
}
}
return fineResult;
}