예제 #1
0
        public void Session_Load()
        {
            string path;
            var    openFileService = new OpenProjectFileService();

            var result = openFileService.OpenProjectFile(out path);

            if (result != true)
            {
                return;
            }

            //Assert.IsNotNull(Project.Load(path));
        }
예제 #2
0
파일: App.xaml.cs 프로젝트: Midova/mcounter
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var mainWindow = new MainWindow();

            var openFileService            = new OpenProjectFileService();
            var saveFileService            = new SaveProjectFileService();
            var confirmationRequestService = new ConfirmationRequestService();
            var dialogWindowService        = new DialogWindowService();

            dialogWindowService.Register(typeof(AboutWindowModel), typeof(AboutWindow));

            var context = new MainViewModel(openFileService, saveFileService, confirmationRequestService, dialogWindowService);

            mainWindow.DataContext = context;

            MainWindow = mainWindow;
            MainWindow.Show();
        }