public GithubRepositoryDiscovery(
     IGithub github,
     ModalSettings settings,
     INuKeeperLogger logger)
 {
     _github   = github;
     _settings = settings;
     _logger   = logger;
 }
Exemple #2
0
        /// <summary>
        /// Raises the <see cref="ShowModalWindow"/> event which is handled on the view.
        /// </summary>
        /// <param name="modalSettings">Details of the modal form to display.</param>
        protected void ShowModal(ModalSettings modalSettings)
        {
            var showModalWindow = ShowModalWindow;

            if (showModalWindow != null)
            {
                showModalWindow(this, modalSettings);
            }
        }
Exemple #3
0
 public PackageUpdater(
     IGithub github,
     IUpdateRunner localUpdater,
     INuKeeperLogger logger,
     ModalSettings modalSettings)
 {
     _github        = github;
     _updateRunner  = localUpdater;
     _logger        = logger;
     _modalSettings = modalSettings;
 }
Exemple #4
0
 static HxModal()
 {
     Defaults = new ModalSettings()
     {
         ShowCloseButton   = true,
         CloseOnEscape     = true,
         Size              = ModalSize.Regular,
         Fullscreen        = ModalFullscreen.Disabled,
         UseStaticBackdrop = true,
         Scrollable        = false,
         Centered          = false,
     };
 }
Exemple #5
0
        private void OpenWindow(object param)
        {
            var modalSettings = new ModalSettings()
            {
                Title     = WindowTitle,
                View      = "DevelopmentInProgress.ExampleModule.View.ExampleModalView,DevelopmentInProgress.ExampleModule",
                ViewModel = "DevelopmentInProgress.ExampleModule.ViewModel.ExampleModalViewModel,DevelopmentInProgress.ExampleModule",
                Height    = 700,
                Width     = 700
            };

            modalSettings.Parameters.Add("ModalParameter", WindowParameter);
            ShowModal(modalSettings);
        }
Exemple #6
0
        public async Task SuccessInRepoMode()
        {
            var github   = Substitute.For <IGithub>();
            var settings = new ModalSettings
            {
                Mode       = GithubMode.Repository,
                Repository = new RepositorySettings()
            };

            var githubRepositoryDiscovery = MakeGithubRepositoryDiscovery(github, settings);

            var reposResponse = await githubRepositoryDiscovery.GetRepositories();

            var repos = reposResponse.ToList();

            Assert.That(repos, Is.Not.Null);
            Assert.That(repos.Count, Is.EqualTo(1));
            Assert.That(repos[0], Is.EqualTo(settings.Repository));
        }
Exemple #7
0
 /// <summary>
 /// Handles the ShowModalWindow event raised by the view model.
 /// </summary>
 /// <param name="sender">The view model.</param>
 /// <param name="e">Modal settings.</param>
 protected void ShowModalWindow(object sender, ModalSettings e)
 {
     ViewContext.ModalNavigator.ShowModal(e);
 }
Exemple #8
0
        /// <summary>
        /// Raises the <see cref="ShowModalWindow"/> event which is handled on the view.
        /// </summary>
        /// <param name="modalSettings">Details of the modal form to display.</param>
        protected void ShowModal(ModalSettings modalSettings)
        {
            var showModalWindow = ShowModalWindow;

            showModalWindow?.Invoke(this, modalSettings);
        }
Exemple #9
0
 private static IGithubRepositoryDiscovery MakeGithubRepositoryDiscovery(IGithub github, ModalSettings settings)
 {
     return(new GithubRepositoryDiscovery(github, settings, new NullNuKeeperLogger()));
 }
 private static IGitHubRepositoryDiscovery MakeGithubRepositoryDiscovery(IGitHub gitHub, ModalSettings settings)
 {
     return(new GitHubRepositoryDiscovery(gitHub, settings, Substitute.For <INuKeeperLogger>()));
 }