예제 #1
0
        public override void Initialize(GuiWidget application)
        {
            CreatorInformation information = new CreatorInformation(LaunchNewTextCreator, "TC_32x32.png", "Text Creator".Localize());

            RegisteredCreators.Instance.RegisterLaunchFunction(information);
            mainApplication = application;
        }
예제 #2
0
        public override void Initialize(GuiWidget application)
        {
            var information = new CreatorInformation(
                () => new TextCreatorMainWindow(),
                "TC_32x32.png",
                "Text Creator".Localize());

            RegisteredCreators.Instance.RegisterLaunchFunction(information);
        }
        public async Task PutCreatorInformation(string userId, [FromBody] CreatorInformation creatorInformation)
        {
            userId.AssertUrlParameterProvided("userId");
            creatorInformation.AssertBodyProvided("creatorInformation");

            var requester = await this.requesterContext.GetRequesterAsync();

            var requestedUserId = new UserId(userId.DecodeGuid());

            var command = new UpdateCreatorAccountSettingsCommand(requester, requestedUserId);

            await this.updateCreatorAccountSettings.HandleAsync(command);
        }
        public async Task WhenPutCreatorInformationIsCalled_ItShouldCallTheCommandHandler()
        {
            var command = new UpdateCreatorAccountSettingsCommand(Requester, RequestedUserId);

            this.promoteUserToCreator.Setup(v => v.HandleAsync(command))
            .Returns(Task.FromResult(0))
            .Verifiable();

            var updatedAccountSettings = new CreatorInformation();

            await this.target.PutCreatorInformation(RequestedUserId.Value.EncodeGuid(), updatedAccountSettings);

            this.updateAccountSettings.Verify();
        }
예제 #5
0
        public override void Initialize(GuiWidget application)
        {
            CreatorInformation information = new CreatorInformation(LaunchNewBrailleBuilder, "BB_32x32.png", "Braille Builder");

            RegisteredCreators.Instance.RegisterLaunchFunction(information);
            mainApplication = application;

            if (false)
            {
                UiThread.RunOnIdle(() =>
                {
                    LaunchNewBrailleBuilder(null, null);
                }, .5);
            }
        }