コード例 #1
0
        static void Main(string[] allInputString)
        {
            dbi298845_prangersEntities database = new dbi298845_prangersEntities();
            countrycode countrycode             = GetOrCreateDefaultCountryCode(database);

            // Create the router to route the commands through.
            CommandRouter commandRouter = new CommandRouter(database, countrycode);

            // Register all possible commands.
            commandRouter.Register(new CommandImportPostalCode());
            commandRouter.Register(new CommandImportStore());
            commandRouter.Register(new CommandImportBottom());
            commandRouter.Register(new CommandImportProduct());
            commandRouter.Register(new CommandImportIngredient());
            commandRouter.Register(new CommandImportPizzaIngredient());
            commandRouter.Register(new CommandParseMapping());
            commandRouter.Register(new CommandImportOrder());

            // Execute the command
            commandRouter.Execute(allInputString);
            Console.ReadKey();
        }
コード例 #2
0
 private void startClicked(object sender, RoutedEventArgs e)
 {
     CommandRouter.Execute(MainViewModel.StartCommand);
 }
コード例 #3
0
 private void selectionChanged(object sender, SelectionChangedEventArgs e)
 {
     CommandRouter.Execute(MainViewModel.SelectCommand, (string)e.AddedItems.FirstOrDefault());
 }
コード例 #4
0
 private void openClicked(object sender, RoutedEventArgs e)
 {
     CommandRouter.Execute(MainViewModel.OpenCommand);
 }