示例#1
0
        public ArchiaServiceScope(IServiceScope scope)
        {
            ThrowIf.Null(scope, nameof(scope));

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

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

            InitializeComponent();

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

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

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