public void SetViewfinderType(ViewfinderType viewfinderType)
        {
            if (viewfinderType is ViewfinderTypeRectangular rectangular)
            {
                this.settingsManager.RectangularViewfinderColor             = rectangular.Color;
                this.settingsManager.RectangularViewfinderDisabledColor     = rectangular.DisabledColor;
                this.settingsManager.RectangularViewfinderSizeSpecification = rectangular.SizeSpecification;
                this.settingsManager.RectangularViewfinderWidth             = rectangular.Width;
                this.settingsManager.RectangularViewfinderWidthAspect       = rectangular.WidthAspect;
                this.settingsManager.RectangularViewfinderHeight            = rectangular.Height;
                this.settingsManager.RectangularViewfinderHeightAspect      = rectangular.HeightAspect;
            }
            else if (viewfinderType is ViewfinderTypeLaserline laserline)
            {
                this.settingsManager.LaserlineViewfinderWidth         = laserline.Width;
                this.settingsManager.LaserlineViewfinderEnabledColor  = laserline.EnabledColor;
                this.settingsManager.LaserlineViewfinderDisabledColor = laserline.DisabledColor;
            }
            else if (viewfinderType is ViewfinderTypeSpotlight spotlight)
            {
                this.settingsManager.SpotlightViewfinderBackgroundColor   = spotlight.BackgroundColor;
                this.settingsManager.SpotlightViewfinderEnabledColor      = spotlight.EnabledColor;
                this.settingsManager.SpotlightViewfinderDisabledColor     = spotlight.DisabledColor;
                this.settingsManager.SpotlightViewfinderSizeSpecification = spotlight.SizeSpecification;
                this.settingsManager.SpotlightViewfinderWidth             = spotlight.Width;
                this.settingsManager.SpotlightViewfinderWidthAspect       = spotlight.WidthAspect;
                this.settingsManager.SpotlightViewfinderHeight            = spotlight.Height;
                this.settingsManager.SpotlightViewfinderHeightAspect      = spotlight.HeightAspect;
            }

            this.UpdateViewfinder(viewfinderType);
        }
Beispiel #2
0
        public void SetViewfinderType(ViewfinderType viewfinderType)
        {
            if (viewfinderType is ViewfinderTypeRectangular rectangular)
            {
                this.settingsManager.RectangularViewfinderColor                 = rectangular.Color;
                this.settingsManager.RectangularViewfinderDisabledColor         = rectangular.DisabledColor;
                this.settingsManager.RectangularViewfinderSizeSpecification     = rectangular.SizeSpecification;
                this.settingsManager.RectangularViewfinderWidth                 = rectangular.Width;
                this.settingsManager.RectangularViewfinderWidthAspect           = rectangular.WidthAspect;
                this.settingsManager.RectangularViewfinderHeight                = rectangular.Height;
                this.settingsManager.RectangularViewfinderHeightAspect          = rectangular.HeightAspect;
                this.settingsManager.RectangularViewfinderShorterDimension      = rectangular.ShorterDimension;
                this.settingsManager.RectangularViewfinderLongerDimensionAspect = rectangular.LongerDimensionAspect;
                this.settingsManager.RectangularViewfinderDimming               = rectangular.Dimming;
                this.settingsManager.RectangularViewfinderStyle                 = rectangular.Style;
                this.settingsManager.RectangularViewfinderLineStyle             = rectangular.LineStyle;
                this.settingsManager.RectangularViewfinderAnimation             = rectangular.Animation;
                this.settingsManager.RectangularViewfinderLooping               = rectangular.Looping;
            }
            else if (viewfinderType is ViewfinderTypeLaserline laserline)
            {
                this.settingsManager.LaserlineViewfinderStyle         = laserline.Style;
                this.settingsManager.LaserlineViewfinderWidth         = laserline.Width;
                this.settingsManager.LaserlineViewfinderEnabledColor  = laserline.EnabledColor;
                this.settingsManager.LaserlineViewfinderDisabledColor = laserline.DisabledColor;
            }
            else if (viewfinderType is ViewfinderTypeAimer aimer)
            {
                this.settingsManager.AimerViewfinderDotColor   = aimer.DotColor;
                this.settingsManager.AimerViewfinderFrameColor = aimer.FrameColor;
            }

            this.UpdateViewfinder(viewfinderType);
        }
        public void SetSpotlightViewfinderSizeSpec(SizeSpecification spec)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeSpotlight)
            {
                ((ViewfinderTypeSpotlight)currentViewfinder).SizeSpecification = spec;
                this.SetViewfinderType(currentViewfinder);
            }
        }
        public void SetSpotlightViewfinderDisabledColor(UiColor color)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeSpotlight)
            {
                ((ViewfinderTypeSpotlight)currentViewfinder).DisabledColor = color;
                this.SetViewfinderType(currentViewfinder);
            }
        }
        public void SetSpotlightViewfinderWidthAspect(float aspect)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeSpotlight)
            {
                ((ViewfinderTypeSpotlight)currentViewfinder).WidthAspect = aspect;
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #6
0
        public void SetRectangularViewfinderLongerDimensionAspect(float longerDimensionAspect)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeRectangular)
            {
                ((ViewfinderTypeRectangular)currentViewfinder).LongerDimensionAspect = longerDimensionAspect;
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #7
0
        public void SetLaserlineViewfinderDisabledColor(UiColor color)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeLaserline)
            {
                ((ViewfinderTypeLaserline)currentViewfinder).DisabledColor = color;
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #8
0
        public void SetAimerViewfinderDotColor(UiColor color)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeAimer)
            {
                ((ViewfinderTypeAimer)currentViewfinder).DotColor = color;
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #9
0
        public void SetRectangularViewfinderLineStyle(RectangularViewfinderLineStyle style)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeRectangular)
            {
                ((ViewfinderTypeRectangular)currentViewfinder).LineStyle = style;
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #10
0
        public void SetRectangularViewfinderSizeSpec(SizeSpecification spec)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeRectangular)
            {
                ((ViewfinderTypeRectangular)currentViewfinder).SizeSpecification = spec;
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #11
0
        public void SetRectangularViewfinderDisabledColor(UiColor color)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeRectangular)
            {
                ((ViewfinderTypeRectangular)currentViewfinder).DisabledColor = color;
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #12
0
        public void SetRectangularViewfinderShorterDimension(float shorterDimensionFraction)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeRectangular)
            {
                ((ViewfinderTypeRectangular)currentViewfinder).ShorterDimension = new FloatWithUnit(shorterDimensionFraction, MeasureUnit.Fraction);
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #13
0
        public void SetRectangularViewfinderWidthAspect(float aspect)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeRectangular)
            {
                ((ViewfinderTypeRectangular)currentViewfinder).WidthAspect = aspect;
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #14
0
        public void SetRectangularViewfinderStyle(RectangularViewfinderStyle style)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeRectangular)
            {
                ((ViewfinderTypeRectangular)currentViewfinder).Style = style;
                currentViewfinder.ResetDefaults();
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #15
0
        public void SetLaserlineViewfinderStyle(LaserlineViewfinderStyle style)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeLaserline)
            {
                ((ViewfinderTypeLaserline)currentViewfinder).Style = style;
                currentViewfinder.ResetDefaults();
                this.SetViewfinderType(currentViewfinder);
            }
        }
Beispiel #16
0
        public void SetRectangularLoopingEnabled(bool enabled)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeRectangular)
            {
                ((ViewfinderTypeRectangular)currentViewfinder).Looping = enabled;
                this.SetViewfinderType(currentViewfinder);
            }
            settingsManager.RectangularViewfinderLooping = enabled;
        }
Beispiel #17
0
        public void SetRectangularDimming(float dimming)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeRectangular)
            {
                ((ViewfinderTypeRectangular)currentViewfinder).Dimming = dimming;
                this.SetViewfinderType(currentViewfinder);
            }
            settingsManager.RectangularViewfinderDimming = dimming;
        }
Beispiel #18
0
        public void SetLaserlineViewfinderEnabledColor(UiColor color)
        {
            ViewfinderType currentViewfinder = this.GetCurrentViewfinderType();

            if (currentViewfinder is ViewfinderTypeLaserline)
            {
                ((ViewfinderTypeLaserline)currentViewfinder).EnabledColor = color;
                this.SetViewfinderType(currentViewfinder);
            }
            this.settingsManager.LaserlineViewfinderEnabledColor = color;
        }
Beispiel #19
0
        private void ShowHideSubSettings()
        {
            ViewfinderType viewfinderType = this.viewModel.GetCurrentViewfinderType();

            if (viewfinderType is ViewfinderTypeNone)
            {
                this.SetupForNoViewfinder();
            }
            else if (viewfinderType is ViewfinderTypeRectangular)
            {
                this.SetupForRectangularViewfinder((ViewfinderTypeRectangular)viewfinderType);
            }
            else if (viewfinderType is ViewfinderTypeLaserline)
            {
                this.SetupForLaserlineViewfinder((ViewfinderTypeLaserline)viewfinderType);
            }
        }
Beispiel #20
0
        public void SetViewfinderType(ViewfinderType viewfinderType)
        {
            if (viewfinderType is ViewfinderTypeRectangular rectangular)
            {
                this.settingsManager.RectangularViewfinderColor             = (rectangular.Color);
                this.settingsManager.RectangularViewfinderSizeSpecification = (rectangular.SizeSpecification);
                this.settingsManager.RectangularViewfinderWidth             = rectangular.Width;
                this.settingsManager.RectangularViewfinderWidthAspect       = (rectangular.WidthAspect);
                this.settingsManager.RectangularViewfinderHeight            = (rectangular.Height);
                this.settingsManager.RectangularViewfinderHeightAspect      = (rectangular.HeightAspect);
            }
            else if (viewfinderType is ViewfinderTypeLaserline laserline)
            {
                this.settingsManager.LaserlineViewfinderWidth         = (laserline.Width);
                this.settingsManager.LaserlineViewfinderEnabledColor  = (laserline.EnabledColor);
                this.settingsManager.LaserlineViewfinderDisabledColor = (laserline.DisabledColor);
            }

            this.UpdateViewfinder(viewfinderType);
        }
        private void ShowHideSubSettings()
        {
            ViewfinderType viewfinderType = this.viewModel.GetCurrentViewfinderType();

            if (viewfinderType is ViewfinderTypeNone)
            {
                this.SetupForNoViewfinder();
            }
            else if (viewfinderType is ViewfinderTypeRectangular rectangular)
            {
                this.SetupForRectangularViewfinder(rectangular);
            }
            else if (viewfinderType is ViewfinderTypeLaserline laserline)
            {
                this.SetupForLaserlineViewfinder(laserline);
            }
            else if (viewfinderType is ViewfinderTypeSpotlight spotlight)
            {
                this.SetupForSpotlightViewfinder(spotlight);
            }
        }