public GithubRepositoryDiscovery(
     IGithub github,
     ModalSettings settings,
     INuKeeperLogger logger)
 {
     _github   = github;
     _settings = settings;
     _logger   = logger;
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
 public PackageUpdater(
     IGithub github,
     IUpdateRunner localUpdater,
     INuKeeperLogger logger,
     ModalSettings modalSettings)
 {
     _github        = github;
     _updateRunner  = localUpdater;
     _logger        = logger;
     _modalSettings = modalSettings;
 }
Exemplo n.º 4
0
 static HxModal()
 {
     Defaults = new ModalSettings()
     {
         ShowCloseButton   = true,
         CloseOnEscape     = true,
         Size              = ModalSize.Regular,
         Fullscreen        = ModalFullscreen.Disabled,
         UseStaticBackdrop = true,
         Scrollable        = false,
         Centered          = false,
     };
 }
Exemplo n.º 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);
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 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>()));
 }