コード例 #1
0
        private void HandleToggleButtonSwitch(bool isEnabled)
        {
            ICCAMode CCAMode = Application.Current.MainWindow as ICCAMode;

            // Watson crashes suggest that this will be null sometimes
            if (CCAMode != null)
            {
                CCAMode.HandleToggleStatusChanged(isEnabled);
            }

            SetConfidenceVisibility(Visibility.Hidden);
        }
        private void HandleToggleButtonSwitch(bool isEnabled)
        {
            ICCAMode CCAMode = Application.Current.MainWindow as ICCAMode;

            // Watson crashes suggest that this will be null sometimes
            if (CCAMode != null)
            {
                CCAMode.HandleToggleStatusChanged(isEnabled);
            }

            spConfidence.Children.Clear();
            tbConfidence.Text = "";

            if (isEnabled)
            {
                spConfidence.Children.Add(tbConfidenceLabel);
                spConfidence.Children.Add(tbConfidence);
            }
        }
コード例 #3
0
        private void HandleToggleButtonSwitch(bool isEnabled)
        {
            ICCAMode CCAMode = Application.Current.MainWindow as ICCAMode;

            // Watson crashes suggest that this will be null sometimes
            if (CCAMode != null)
            {
                CCAMode.HandleToggleStatusChanged(isEnabled);
            }

            if (isEnabled)
            {
                spConfidence.Visibility = Visibility.Visible;
            }
            else
            {
                spConfidence.Visibility = Visibility.Hidden;
                tbConfidence.Text       = "";
            }
        }