Example #1
0
 internal int AlertTransferStationFloor(object sender, WarningEventArgs e)
 {
     Console.WriteLine
         ("*** {0} FLOOR - The HWT System is malfunctioning!",
         e.WarningTime);
     return 1;
 }
Example #2
0
 internal int AlertControlRoom(object sender, WarningEventArgs e)
 {
     Console.WriteLine
         ("*** {0} CONTROL - The HWT System is malfunctioning!",
         e.WarningTime);
     return 2;
 }
Example #3
0
 internal int AlertManagement(object sender, WarningEventArgs e)
 {
     Console.WriteLine
         ("*** {0} MANAGEMENT - The HWT System is malfunctioning!",
         e.WarningTime);
     return 3;
 }
Example #4
0
        internal void RaiseWarningEvent()
        {
            if (OnRaiseWarning != null)
            {
                WarningEventArgs wea = new WarningEventArgs();

                // If we were to look at the integer return value that
                // we get back from OnRaiseWarning, it would be the
                // value of the last method called...in this case 3.
                // Methods that are called through events typically
                // don't return a value. Instead they should be declared
                // returning void.
                OnRaiseWarning(this, wea);
            }
        }