FizVizController/FizVizController/Views/FizVizConfig.xaml.cs
/// <summary>
/// Get a block needle command based on the user input
/// </summary>
/// <returns></returns>
Get a block needle command based on the user input
Get a block needle command based on the user input
private DisplayMode GetBlockNeedle()
        {
            ushort? fadeTime = ViewUtility.GetUShort(FadeDurationTextBox);
            if (!fadeTime.HasValue) return null;
            ushort? holdTime = ViewUtility.GetUShort(BrightHoldTextBox);
            if (!holdTime.HasValue) return null;
            float highlight = 2.0f;
            bool useHighlight = UseHighlight.IsChecked.HasValue && UseHighlight.IsChecked.Value;
            if (!float.TryParse(HighlightMultiplierTextBox.Text, out highlight) && useHighlight)
            {
                HighlightMultiplierTextBox.BorderBrush = new SolidColorBrush(Colors.Red);
                return null;
            }
            return new BlockNeedleDisplayMode
            {
                HotColor = (Color)HotColorComboBox.SelectedValue,
                FadeTime = fadeTime.Value,
                HoldTime = holdTime.Value,
                UseHighlight = useHighlight,
                HighlightMultiplier = highlight
            };
        }
private DisplayMode GetBlockNeedle ( ) { ushort ? fadeTime = ViewUtility . GetUShort ( FadeDurationTextBox ) ; if ( ! fadeTime . HasValue ) return null ; ushort ? holdTime = ViewUtility . GetUShort ( BrightHoldTextBox ) ; if ( ! holdTime . HasValue ) return null ; float highlight = 2.0f ; bool useHighlight = UseHighlight . IsChecked . HasValue && UseHighlight . IsChecked . Value ; if ( ! float . TryParse ( HighlightMultiplierTextBox . Text , out highlight ) && useHighlight ) { HighlightMultiplierTextBox . BorderBrush = new SolidColorBrush ( Colors . Red ) ; return null ; } return new BlockNeedleDisplayMode { HotColor = ( Color ) HotColorComboBox . SelectedValue , FadeTime = fadeTime . Value , HoldTime = holdTime . Value , UseHighlight = useHighlight , HighlightMultiplier = highlight } ; }
Get a block needle command based on the user input
Get a block needle command based on the user input
None