public FrozenActivity(ComputerActivity resumeActivity)
     : this(AVG_THAWTIME, resumeActivity)
 {
 }
 public FrozenActivity(int maxThaw, ComputerActivity resumeActivity)
 {
     this.IsSolid = (maxThaw == 0 || resumeActivity == null);
     this.TimeTillThaw = new Random().Next(maxThaw);
     this.ActivityToResume = resumeActivity;
 }
        public void BeginNewActivity(ComputerActivity act)
        {
            if (CurrentActivity != null)
                CurrentActivity.Terminate();
            CurrentActivity = act;
            act.Computer = this;
            act.Runtime = 0;
            act.Begin();

            ActivityStartEvent ase = new ActivityStartEvent();
            ase.Activity = CurrentActivity;
            ase.Computer = this;
            this.DisbatchEvent(ase);
        }