コード例 #1
0
        /// <summary>
        /// Redirecting the user to the select source view page
        /// </summary>
        private void GoToSelectSource()
        {
            // Reset the state to the initial values
            if (DisplayViewModel.IsBackupDone && !DisplayViewModel.IsBackupRunning)
            {
                DisplayViewModel.ResetState();
            }

            // Injecting the SelectSourceViewModel
            ViewModelLocator.ApplicationViewModel.GoToView(_SelectSourceViewModel);
        }
コード例 #2
0
        /// <summary>
        /// The action when the user choose backup folder
        /// </summary>
        private void SelectDestFolder()
        {
            // Reset the state to the initial values
            if (DisplayViewModel.IsBackupDone && !DisplayViewModel.IsBackupRunning)
            {
                DisplayViewModel.ResetState();
            }

            string folder = _DialogService.SelectFolder("Choose folder to backup in hard drive", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));

            if (folder != null)
            {
                Details.DestFolder = folder;
                ViewModelLocator.CacheViewModel.Save();
            }
        }