Esempio n. 1
0
        public static bool Execute(面積管理システムCommandType cmdType)
        {
            ICommand command = GetCommand(cmdType);
            if (command.CanExecute)
                return command.Execute();

            return false;
        }
Esempio n. 2
0
 private static ICommand GetCommand(面積管理システムCommandType cmdType)
 {
     switch (cmdType)
     {
         case 面積管理システムCommandType.Add:
             return new AddCommand();
         case 面積管理システムCommandType.Delete:
             return new DeleteCommand();
         default:
             throw new NotImplementedException();
     }
 }
Esempio n. 3
0
 public static bool CanExecute(面積管理システムCommandType cmdType)
 {
     return GetCommand(cmdType).CanExecute;
 }