예제 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ApplicationData applicationData = new ApplicationData();

            applicationData.UIData = DataGeneration.GenerateUIData();

            ApplicationModel = new ApplicationModel();
            ApplicationModel.ImportData(applicationData);

            ApplicationViewModel = new ApplicationViewModel();
            ApplicationViewModel.ApplyModel(ApplicationModel);
            ApplicationViewControl.DataContext = ApplicationViewModel;

            BaseLogic = new GameLogic();
            Messenger.Default.Register <NewMessage>(this, New);
            Messenger.Default.Register <LoadMessage>(this, Load);
            Messenger.Default.Register <SaveMessage>(this, Save);
            Messenger.Default.Register <QuitMessage>(this, Quit);
        }