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

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

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

            InitializeComponent();

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

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

            HandleCredentialsTextChanged(this, EventArgs.Empty);
        }
Ejemplo 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();
                }
            });
        }