Esempio n. 1
0
        public ArchiaServiceScope(IServiceScope scope)
        {
            ThrowIf.Null(scope, nameof(scope));

            _scope          = scope;
            ServiceProvider = new ArchiaServiceProvider(_scope.ServiceProvider);
        }
Esempio n. 2
0
        protected ArchiaForm(ArchiaServiceProvider services)
        {
            ThrowIf.Null(services, nameof(services));

            Services = services;
            Logger   = services.Logger(this);
        }
Esempio n. 3
0
        public DashboardForm(ArchiaServiceProvider services) : base(services)
        {
            services.UserContext.EnsureSignedIn();

            InitializeComponent();

            UsernameLabel.Text = services.UserContext.User.UserName;
            PopulateActionsPanel();
            SetStatus("Signed into Archia");
        }
Esempio n. 4
0
        public SignInForm(ArchiaServiceProvider services) : base(services)
        {
            InitializeComponent();

#if DEBUG
            UsernameTextBox.Text = "aidan";
            PasswordTextBox.Text = "password123";
#endif

            HandleCredentialsTextChanged(this, EventArgs.Empty);
        }
Esempio n. 5
0
        public ArchiaAppService(ArchiaServiceProvider services)
        {
            ThrowIf.Null(services, nameof(services));

            _serviceScope = services.CreateScope();

            var signInForm = new SignInForm(_serviceScope.ServiceProvider);

            signInForm.FormClosed += (sender, e) => services.AppLifetime.StopApplication();

            _startStopProgress = new Progress <bool>(start =>
            {
                if (start)
                {
                    signInForm.Show();
                }
                else
                {
                    signInForm.Hide();
                }
            });
        }