Пример #1
0
        public override int Lab(Group group, Equipment equipment, Room room, ISubActivities subActivities)
        {
            MessageEventArgs       message = new MessageEventArgs();
            SuccessFactorEventArgs factor  = new SuccessFactorEventArgs();

            message.text = "Lab start : \n";

            if (room.Name != "Laboratory")
            {
                message.text += "Students cannot study. They dont have laboratory";
                CallMessageEvent(this, message);
                return(0);
            }
            else if (subActivities == null)
            {
                message.text += "Students nothing to do";
                CallMessageEvent(this, message);
                return(0);
            }
            if (subActivities.ToString() != "Perform experiment")
            {
                message.text += "Students do not conduct experiments. It is not possible to conduct physics";
                CallMessageEvent(this, message);
                return(0);
            }
            message.text  += subActivities.Action() + "\n";
            successFactor += CheckEquipment(equipment);
            message.text  += "Students study";
            CallMessageEvent(this, message);
            CallFactorEvent(this, factor);
            groupRating.SetGroupGrades(group, name);
            return(successFactor);
        }
Пример #2
0
        public override int Lab(Group group, Equipment equipment, Room room, ISubActivities subActivities)
        {
            successFactor = 0;
            CallMessageEvent("Lab start : ");
            successFactor = 0;

            if (room.Name != "Laboratory")
            {
                CallMessageEvent("Students cannot study. They dont have laboratory");
                return(0);
            }
            else if (subActivities == null)
            {
                CallMessageEvent("Students nothing to do");
                return(0);
            }
            if (subActivities.ToString() != "Perform experiment")
            {
                CallMessageEvent("Students do not conduct experiments. It is not possible to conduct physics");
                return(0);
            }
            CallMessageEvent(subActivities.Action());
            successFactor += CheckEquipment(equipment);
            CallMessageEvent("Students study");
            return(successFactor);
        }
Пример #3
0
        public override int Practice(Group group, Equipment equipment, ISubActivities subActivities)
        {
            MessageEventArgs       message = new MessageEventArgs();
            SuccessFactorEventArgs factor  = new SuccessFactorEventArgs();

            bool CheckAct()
            {
                if (subActivities is ReadText)
                {
                    return(true);
                }
                else if (subActivities is TellText)
                {
                    return(true);
                }
                else if (subActivities is WriteText)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

            if (subActivities == null)
            {
                message.text = "Students do nothing, it is impossible to conduct classes";
                CallMessageEvent(this, message);
                return(0);
            }
            else if (!CheckAct())
            {
                message.text = "Students perform the wrong actions, it is impossible to conduct classes";
                CallMessageEvent(this, message);
                return(0);
            }
            else if (!(equipment is TapeRecorder))
            {
                message.text = "We dont have TapeRecorder, it is impossible to conduct classes";
                CallMessageEvent(this, message);
                return(0);
            }

            successFactor = 0;
            message.text  = "Practice start : ";
            CallMessageEvent(this, message);
            successFactor       += CheckEquipment(equipment);
            successFactor       += 1;
            factor.text          = subActivities.Action() + ".Student success factor: ";
            factor.successFactor = successFactor;
            CallFactorEvent(this, factor);
            message.text = "Students study";
            CallMessageEvent(this, message);
            groupRating.SetGroupGrades(group, name);
            return(successFactor);
        }
Пример #4
0
 public virtual int Practice(Group group, Equipment equipment, ISubActivities subActivities)
 {
     successFactor = 0;
     Message?.Invoke("Practice start : ");
     successFactor += CheckEquipment(equipment);
     if (subActivities != null)
     {
         successFactor += 1;
         Factor?.Invoke(subActivities.Action() + $".Student success factor: {successFactor}");
     }
     Message?.Invoke("Students study");
     groupRating.SetGroupGrades(group, name);
     return(successFactor);
 }
Пример #5
0
        public virtual int Practice(Group group, Equipment equipment, ISubActivities subActivities)
        {
            MessageEventArgs message = new MessageEventArgs();

            successFactor = 0;
            message.text  = "Practice start : ";
            Message?.Invoke(this, message);
            successFactor += CheckEquipment(equipment);
            if (subActivities != null)
            {
                SuccessFactorEventArgs factor = new SuccessFactorEventArgs();
                successFactor       += 1;
                factor.text          = subActivities.Action() + ".Student success factor: ";
                factor.successFactor = successFactor;
                Factor?.Invoke(this, factor);
            }
            message.text = "Students study";
            Message?.Invoke(this, message);
            groupRating.SetGroupGrades(group, name);
            return(successFactor);
        }