Ejemplo n.º 1
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await JoinableTaskFactory.SwitchToMainThreadAsync();

            await IncreaseFontSize.InitializeAsync(this);

            await DecreaseFontSize.InitializeAsync(this);

            await IncreaseEnvironmentFontSize.InitializeAsync(this);

            await DecreaseEnvironmentFontSize.InitializeAsync(this);
        }
Ejemplo n.º 2
0
        private void InitializeControls()
        {
            browseForLauncherButton = new StandardButton(20)
            {
                Position = new Point(2, 6),
                Text     = "[B] Browse"
            };
            browseForLauncherButton.Click += (sender, args) => BrowseEditor?.Invoke(this, EventArgs.Empty);
            Add(browseForLauncherButton);

            closeButton = new StandardButton(20)
            {
                Position = new Point(2, Height - 4),
                Text     = "[ESC] Close"
            };
            closeButton.Click += (sender, args) => Exit?.Invoke(this, EventArgs.Empty);
            Add(closeButton);

            prevFontSizeButton = new Button(1)
            {
                Position = new Point(13, 10),
                Text     = "<",
                CanFocus = false,
            };
            prevFontSizeButton.Click += (sender, args) => DecreaseFontSize?.Invoke(this, EventArgs.Empty);
            Add(prevFontSizeButton);

            nextFontSizeButton = new Button(1)
            {
                Position = new Point(21, 10),
                Text     = ">",
                CanFocus = false
            };
            nextFontSizeButton.Click += (sender, args) => IncreaseFontSize?.Invoke(this, EventArgs.Empty);
            Add(nextFontSizeButton);
        }