You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using AddressBook_MVVMSampleV2.Interface;
|
|
|
|
|
using AddressBook_MVVMSampleV2.Model;
|
|
|
|
|
using AddressBook_MVVMSampleV2.Service;
|
|
|
|
|
using AddressBook_MVVMSampleV2.View;
|
|
|
|
|
using AddressBook_MVVMSampleV2.ViewModel;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
|
|
namespace AddressBook_MVVMSampleV2
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for App.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class App : Application
|
|
|
|
|
{
|
|
|
|
|
protected override void OnStartup(StartupEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
base.OnStartup(e);
|
|
|
|
|
|
|
|
|
|
IMessageBoxService messageBoxService = new MessageBoxService();
|
|
|
|
|
MainViewModel mainViewModel = new MainViewModel(messageBoxService, CreateAddView);
|
|
|
|
|
MainView mainView = new MainView(mainViewModel);
|
|
|
|
|
mainView.Show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private IDialogView CreateAddView(Person modifyData, AddViewModel.ViewType type = AddViewModel.ViewType.Add)
|
|
|
|
|
{
|
|
|
|
|
AddViewModel viewModel = new AddViewModel(modifyData, type);
|
|
|
|
|
return new AddView(viewModel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnExit(ExitEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
base.OnExit(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|