Exemplo n.º 1
0
        private static bool IsAGraduationCeremonyInitializedAndIfNecessaryStartOne(Annex ths)
        {
            if (!ths.mGraduationCeremonyInitialized)
            {
                ths.CleanUpGraduationCeremony();
                float time = SimClock.HoursUntil(Annex.kGraduationTuning.kHourToShowGraduationMessage);
                ths.mDidIGraduationMessageAlarm = ths.AddAlarm(time, TimeUnit.Hours, ths.ShowIGraduationMessagesCallback, "Annex: I Graduated Message Alarm", AlarmType.AlwaysPersisted);

                float num2 = SimClock.HoursUntil(Annex.kGraduationTuning.kHourToShowGraduationInvitationMessage);
                ths.mGraduationInvitationAlarm = ths.AddAlarm(num2, TimeUnit.Hours, ths.ShowGraduationInvitationMessagesCallback, "Annex: Graduation Invitation Message Alarm", AlarmType.AlwaysPersisted);

                //float num3 = SimClock.HoursUntil(Annex.kGraduationTuning.kGraduationCeremonyStartHour);
                //ths.mStartGraduationCeremonyAlarm = ths.AddAlarm(num3, TimeUnit.Hours, ths.StartGraduationCeremonyCallback, "Annex: Graduation Ceremony Start Alarm", AlarmType.AlwaysPersisted);
                new StartGraduationCeremonyTask(ths);

                ths.mGraduationCeremonyInitialized = true;
            }

            return(ths.mGraduationCeremonyInitialized);
        }
Exemplo n.º 2
0
        private static bool IsAGraduationCeremonyInitializedAndIfNecessaryStartOne(Annex ths)
        {
            if (!ths.mGraduationCeremonyInitialized)
            {
                ths.CleanUpGraduationCeremony();
                float time = SimClock.HoursUntil(Annex.kGraduationTuning.kHourToShowGraduationMessage);
                ths.mDidIGraduationMessageAlarm = ths.AddAlarm(time, TimeUnit.Hours, ths.ShowIGraduationMessagesCallback, "Annex: I Graduated Message Alarm", AlarmType.AlwaysPersisted);

                float num2 = SimClock.HoursUntil(Annex.kGraduationTuning.kHourToShowGraduationInvitationMessage);
                ths.mGraduationInvitationAlarm = ths.AddAlarm(num2, TimeUnit.Hours, ths.ShowGraduationInvitationMessagesCallback, "Annex: Graduation Invitation Message Alarm", AlarmType.AlwaysPersisted);

                //float num3 = SimClock.HoursUntil(Annex.kGraduationTuning.kGraduationCeremonyStartHour);
                //ths.mStartGraduationCeremonyAlarm = ths.AddAlarm(num3, TimeUnit.Hours, ths.StartGraduationCeremonyCallback, "Annex: Graduation Ceremony Start Alarm", AlarmType.AlwaysPersisted);
                new StartGraduationCeremonyTask(ths);

                ths.mGraduationCeremonyInitialized = true;
            }

            return ths.mGraduationCeremonyInitialized;
        }