示例#1
0
        private Row LaserlineViewfinderEnabledColorRow()
        {
            Row enabledColorRow;

            if (Equals(SettingsManager.Instance.LaserlineViewfinderStyleType, LaserlineViewfinderStyleType.Animated))
            {
                enabledColorRow = ChoiceRow <LaserlineViewfinderAnimatedEnabledColor> .Create(
                    "Enabled Color",
                    Enumeration.GetAll <LaserlineViewfinderAnimatedEnabledColor>().ToArray(),
                    () => SettingsManager.Instance.LaserlineViewfinderAnimatedEnabledColor,
                    color => SettingsManager.Instance.LaserlineViewfinderAnimatedEnabledColor = color,
                    this.DataSourceListener
                    );
            }
            else
            {
                enabledColorRow = ChoiceRow <LaserlineViewfinderEnabledColor> .Create(
                    "Enabled Color",
                    Enumeration.GetAll <LaserlineViewfinderEnabledColor>().ToArray(),
                    () => SettingsManager.Instance.LaserlineViewfinderEnabledColor,
                    color => SettingsManager.Instance.LaserlineViewfinderEnabledColor = color,
                    this.DataSourceListener
                    );
            }

            return(enabledColorRow);
        }
 private Section CreateLaserlineSettings()
 {
     return(new Section(new Row[]
     {
         FloatWithUnitRow.Create(
             "Width",
             () => (SettingsManager.Instance.Viewfinder as LaserlineViewfinder).Width,
             unit => (SettingsManager.Instance.Viewfinder as LaserlineViewfinder).Width = unit,
             this.DataSourceListener
             ),
         ChoiceRow <LaserlineViewfinderEnabledColor> .Create(
             "Enabled Color",
             Enumeration.GetAll <LaserlineViewfinderEnabledColor>().ToArray(),
             () => SettingsManager.Instance.LaserlineViewfinderEnabledColor,
             color => SettingsManager.Instance.LaserlineViewfinderEnabledColor = color,
             this.DataSourceListener
             ),
         ChoiceRow <LaserlineViewfinderDisabledColor> .Create(
             "Disabled Color",
             Enumeration.GetAll <LaserlineViewfinderDisabledColor>().ToArray(),
             () => SettingsManager.Instance.LaserlineViewfinderDisabledColor,
             color => SettingsManager.Instance.LaserlineViewfinderDisabledColor = color,
             this.DataSourceListener
             )
     }, "Laserline"));
 }
示例#3
0
 private Section CreateLaserlineSettings()
 {
     return(new Section(new Row[]
     {
         ChoiceRow <LaserlineViewfinderStyleType> .Create(
             "Style",
             Enumeration.GetAll <LaserlineViewfinderStyleType>().ToArray(),
             () => SettingsManager.Instance.LaserlineViewfinderStyleType,
             newStyle =>
         {
             SettingsManager.Instance.LaserlineViewfinderStyleType = newStyle;
             SettingsManager.Instance.ViewfinderKind = ViewfinderKind.UpdateLaserlineStyle(newStyle);
             this.laserlineSettings = this.CreateLaserlineSettings();
         },
             this.DataSourceListener),
         FloatWithUnitRow.Create(
             "Width",
             () => (SettingsManager.Instance.ViewfinderKind.Viewfinder as LaserlineViewfinder).Width,
             unit => (SettingsManager.Instance.ViewfinderKind.Viewfinder as LaserlineViewfinder).Width = unit,
             this.DataSourceListener
             ),
         this.LaserlineViewfinderEnabledColorRow(),
         ChoiceRow <LaserlineViewfinderDisabledColor> .Create(
             "Disabled Color",
             Enumeration.GetAll <LaserlineViewfinderDisabledColor>().ToArray(),
             () => SettingsManager.Instance.LaserlineViewfinderDisabledColor,
             color => SettingsManager.Instance.LaserlineViewfinderDisabledColor = color,
             this.DataSourceListener
             )
     }, "Laserline"));
 }
示例#4
0
 private Section CreateSpotlightSettings()
 {
     return(new Section(new Row[]
     {
         ChoiceRow <SpotlightViewfinderBackgroundColor> .Create(
             "Background Color",
             Enumeration.GetAll <SpotlightViewfinderBackgroundColor>().ToArray(),
             () => SettingsManager.Instance.SpotlightViewfinderBackgroundColor,
             color => SettingsManager.Instance.SpotlightViewfinderBackgroundColor = color,
             this.DataSourceListener
             ),
         ChoiceRow <SpotlightViewfinderEnabledColor> .Create(
             "Enabled Color",
             Enumeration.GetAll <SpotlightViewfinderEnabledColor>().ToArray(),
             () => SettingsManager.Instance.SpotlightViewfinderEnabledColor,
             color => SettingsManager.Instance.SpotlightViewfinderEnabledColor = color,
             this.DataSourceListener
             ),
         ChoiceRow <SpotlightViewfinderDisabledColor> .Create(
             "Disabled Color",
             Enumeration.GetAll <SpotlightViewfinderDisabledColor>().ToArray(),
             () => SettingsManager.Instance.SpotlightViewfinderDisabledColor,
             color => SettingsManager.Instance.SpotlightViewfinderDisabledColor = color,
             this.DataSourceListener
             )
     }, "Spotlight"));
 }
 private Section CreateRectangularSizeType()
 {
     return(new Section(new[]
     {
         ChoiceRow <RectangularSizeSpecification> .Create(
             "Size Specification",
             Enumeration.GetAll <RectangularSizeSpecification>().ToArray(),
             () => SettingsManager.Instance.ViewfinderSizeSpecification,
             spec => SettingsManager.Instance.ViewfinderSizeSpecification = spec,
             this.DataSourceListener)
     }));
 }
 public OverlayDataSource(IDataSourceListener dataSourceListener)
 {
     this.DataSourceListener = dataSourceListener;
     this.Sections           = new[]
     {
         new Section(new[]
         {
             ChoiceRow <NamedBrush> .Create("Brush",
                                            Enumeration.GetAll <NamedBrush>().ToArray(),
                                            () => NamedBrush.Create(SettingsManager.Instance.Brush),
                                            brush => SettingsManager.Instance.Brush = brush.Brush,
                                            this.DataSourceListener
                                            )
         }),
     };
 }
示例#7
0
 private Section CreateRectangularSettings()
 {
     return(new Section(new Row[]
     {
         ChoiceRow <RectangularViewfinderStyleType> .Create(
             "Style",
             Enumeration.GetAll <RectangularViewfinderStyleType>().ToArray(),
             () => SettingsManager.Instance.RectangularViewfinderStyleType,
             newStyle =>
         {
             SettingsManager.Instance.RectangularViewfinderStyleType = newStyle;
             SettingsManager.Instance.ViewfinderKind = ViewfinderKind.UpdateRectangularStyle(newStyle);
         },
             this.DataSourceListener),
         ChoiceRow <RectangularViewfinderLineStyleType> .Create(
             "Line Style",
             Enumeration.GetAll <RectangularViewfinderLineStyleType>().ToArray(),
             () => SettingsManager.Instance.RectangularViewfinderLineStyleType,
             newLineStyle =>
         {
             SettingsManager.Instance.RectangularViewfinderLineStyleType = newLineStyle;
             SettingsManager.Instance.ViewfinderKind = ViewfinderKind.UpdateRectangularStyle(
                 SettingsManager.Instance.RectangularViewfinderStyleType, newLineStyle);
         },
             this.DataSourceListener),
         FloatRow.Create(
             "Dimming (0.0 - 1.0)",
             () => NumberFormatter.Instance.FormatNFloat(SettingsManager.Instance.RectangularViewfinderDimming),
             () => SettingsManager.Instance.RectangularViewfinderDimming,
             value => SettingsManager.Instance.RectangularViewfinderDimming = value
             ),
         ChoiceRow <RectangularViewfinderColor> .Create(
             "Color",
             Enumeration.GetAll <RectangularViewfinderColor>().ToArray(),
             () => SettingsManager.Instance.RectangularViewfinderColor,
             newColor => SettingsManager.Instance.RectangularViewfinderColor = newColor,
             this.DataSourceListener),
         ChoiceRow <RectangularViewfinderDisabledColor> .Create(
             "Disabled Color",
             Enumeration.GetAll <RectangularViewfinderDisabledColor>().ToArray(),
             () => SettingsManager.Instance.RectangularViewfinderDisabledColor,
             newColor => SettingsManager.Instance.RectangularViewfinderDisabledColor = newColor,
             this.DataSourceListener
             )
     }, "Rectangular"));
 }
示例#8
0
 private Section CreateAimerSettings()
 {
     return(new Section(new Row[]
     {
         ChoiceRow <AimerViewfinderFrameColor> .Create(
             "Frame Color",
             Enumeration.GetAll <AimerViewfinderFrameColor>().ToArray(),
             () => SettingsManager.Instance.AimerViewfinderFrameColor,
             color => SettingsManager.Instance.AimerViewfinderFrameColor = color,
             this.DataSourceListener
             ),
         ChoiceRow <AimerViewfinderDotColor> .Create(
             "Dot Color",
             Enumeration.GetAll <AimerViewfinderDotColor>().ToArray(),
             () => SettingsManager.Instance.AimerViewfinderDotColor,
             color => SettingsManager.Instance.AimerViewfinderDotColor = color,
             this.DataSourceListener
             )
     }, "Aimer"));
 }