Dev2.Settings.SettingsViewModel.OnSelectionChanged C# (CSharp) Method

OnSelectionChanged() private method

private OnSelectionChanged ( [ propertyName = null ) : void
propertyName [
return void
        void OnSelectionChanged([CallerMemberName] string propertyName = null)
        {
            if(_selectionChanging)
            {
                return;
            }

            _selectionChanging = true;
            switch(propertyName)
            {
                case "ShowLogging":
                    if (Settings == null || Settings.Logging == null)
                    {
                        ShowLogging = false;
                        ShowSecurity = true;
                    }
                    else
                    {
                        ShowLogging = true;
                        ShowSecurity = !ShowLogging;
                    }
                    break;

                case "ShowSecurity":
                    ShowSecurity = true;
                    ShowLogging = !ShowSecurity;
                    break;
            }
            _selectionChanging = false;
        }