示例#1
0
 public Controller getControl(ControlType pType)
 {
     if (pType == ControlType.ControlCalendar)
     {
         Controller controlCalendar = ControllerCalendar.getInstance();
         return(controlCalendar);
     }
     else if (pType == ControlType.ControlMedicine)
     {
         Controller controlMedicine = ControllerMedicine.getInstance();
         return(controlMedicine);
     }
     else if (pType == ControlType.ControlPayment)
     {
         Controller controlPayment = ControllerPayment.getInstance();
         return(controlPayment);
     }
     else if (pType == ControlType.ControlUser)
     {
         Controller controlUser = ControllerUser.getInstance();
         return(controlUser);
     }
     else
     {
         return(null);
     }
 }
 public static ControllerUser getInstance()
 {
     if (instance == null)
     {
         instance = new ControllerUser();
     }
     return(instance);
 }