示例#1
0
        public async Task SetLocationTypeAsync(LocationType locationType)
        {
            switch (locationType)
            {
            case LocationTypeRectangular rectangular:
            {
                this.settingsManager.LocationSelectionRectangularWidth             = rectangular.Width;
                this.settingsManager.LocationSelectionRectangularHeight            = rectangular.Height;
                this.settingsManager.LocationSelectionRectangularHeightAspect      = rectangular.HeightAspectRatio;
                this.settingsManager.LocationSelectionRectangularWidthAspect       = rectangular.WidthAspectRatio;
                this.settingsManager.LocationSelectionRectangularSizeSpecification = rectangular.SizeSpecification;
            }
            break;
            }

            await this.settingsManager.SetLocationSelectionAsync(locationType.BuildLocationSelection());
        }
 private async Task UpdateLocationAsync(LocationType locationType)
 {
     await this.settingsManager.SetLocationSelectionAsync(locationType.BuildLocationSelection());
 }