From 4a0ad0bfcc2a9710d5c6bb1de623f92153ea707c Mon Sep 17 00:00:00 2001 From: sabitertan Date: Sun, 12 Feb 2023 09:43:38 -0500 Subject: [PATCH] Code quality improvements --- .../ListExperimentalCountTest.razor | 8 +- .../Components/SelectExtendedTests.cs | 2 +- .../Mocks/MockEventListener.cs | 2 +- .../Mocks/MockResizeObserver.cs | 10 +- .../Components/CsvMapper/MudCsvMapper.razor | 4 +- .../DateWheelPicker/MudDateWheelPicker.razor | 6 +- .../MudDateWheelPicker.razor.cs | 6 +- .../Components/Gallery/MudGallery.razor.cs | 2 +- .../MudInputCssHelperExtended.cs | 2 +- .../InputExtended/MudInputExtended.razor.cs | 10 +- .../ListExtended/MudListExtended.razor.cs | 100 +++++++++--------- .../ListExtended/MudListItemExtended.razor.cs | 8 +- .../PasswordField/MudPasswordField.razor.cs | 6 +- .../Components/Popup/MudPopup.razor | 2 +- .../SelectExtended/MudSelectExtended.razor.cs | 46 ++++---- .../MudSelectItemExtended.razor.cs | 4 +- .../SpeedDial/MudSpeedDial.razor.cs | 14 +-- .../Components/Splitter/MudSplitter.razor.cs | 2 +- .../Components/Stepper/MudStep.razor.cs | 2 +- .../Components/Stepper/MudStepper.razor | 8 +- .../Components/Stepper/MudStepper.razor.cs | 18 ++-- .../Components/SwitchM3/MudSwitchM3.razor.cs | 2 +- .../Components/Toggle/MudToggle.razor.cs | 6 +- .../Components/Watch/MudWatch.razor.cs | 2 +- .../Components/Wheel/MudWheel.razor.cs | 8 +- .../Components/ComponentCard.razor.cs | 2 +- .../Components/ExamplePage.razor | 2 +- .../Pages/Components/BeASponsor.razor | 4 +- .../Pages/Examples/ListExtendedExample1.razor | 12 +-- .../Pages/Examples/ListExtendedExample4.razor | 8 +- .../Pages/Examples/PageExample3.razor | 4 +- .../Pages/Examples/PopupExample1.razor | 4 +- .../Examples/SelectExtendedExample5.razor | 2 +- .../Pages/Examples/SpeedDialExample1.razor | 4 +- .../Pages/Examples/StepperExample1.razor | 2 +- .../Pages/Examples/SwitchM3Example1.razor | 6 +- .../Examples/TextFieldExtendedExample1.razor | 12 +-- ComponentViewer.Docs/Pages/Index.razor | 4 +- ComponentViewer.Docs/Shared/MainLayout.razor | 6 +- 39 files changed, 176 insertions(+), 176 deletions(-) diff --git a/CodeBeam.MudExtensions.UnitTests.Viewer/TestComponents/ListExtended/ListExperimentalCountTest.razor b/CodeBeam.MudExtensions.UnitTests.Viewer/TestComponents/ListExtended/ListExperimentalCountTest.razor index 10195028..270ba705 100644 --- a/CodeBeam.MudExtensions.UnitTests.Viewer/TestComponents/ListExtended/ListExperimentalCountTest.razor +++ b/CodeBeam.MudExtensions.UnitTests.Viewer/TestComponents/ListExtended/ListExperimentalCountTest.razor @@ -5,11 +5,11 @@ - - + + - Photos - Work + Photos + Work diff --git a/CodeBeam.MudExtensions.UnitTests/Components/SelectExtendedTests.cs b/CodeBeam.MudExtensions.UnitTests/Components/SelectExtendedTests.cs index decfdd73..1ea2ba49 100644 --- a/CodeBeam.MudExtensions.UnitTests/Components/SelectExtendedTests.cs +++ b/CodeBeam.MudExtensions.UnitTests/Components/SelectExtendedTests.cs @@ -656,7 +656,7 @@ public void MultiSelect_SelectAll2() // get the first (select all item) and check if it is indeterminate var selectAllItem = comp.FindComponent>(); - selectAllItem.Instance.Icon.Should().Be(Icons.Filled.IndeterminateCheckBox); + selectAllItem.Instance.Icon.Should().Be(Icons.Material.Filled.IndeterminateCheckBox); // Check that all normal select items are actually selected //var items = comp.FindComponents>().Where(x=>x.Instance.HideContent==false).ToArray(); diff --git a/CodeBeam.MudExtensions.UnitTests/Mocks/MockEventListener.cs b/CodeBeam.MudExtensions.UnitTests/Mocks/MockEventListener.cs index 97f66576..c5b12bcd 100644 --- a/CodeBeam.MudExtensions.UnitTests/Mocks/MockEventListener.cs +++ b/CodeBeam.MudExtensions.UnitTests/Mocks/MockEventListener.cs @@ -59,7 +59,7 @@ public Task SubscribeGlobal(string eventName, int throotleInterval, Fun public Task Unsubscribe(Guid key) { var result = Callbacks.ContainsKey(key); - if (result == true) + if (result) { Callbacks.Remove(key); ElementIdMapper.Remove(key); diff --git a/CodeBeam.MudExtensions.UnitTests/Mocks/MockResizeObserver.cs b/CodeBeam.MudExtensions.UnitTests/Mocks/MockResizeObserver.cs index 17c4d2ab..51d3f6f9 100644 --- a/CodeBeam.MudExtensions.UnitTests/Mocks/MockResizeObserver.cs +++ b/CodeBeam.MudExtensions.UnitTests/Mocks/MockResizeObserver.cs @@ -39,7 +39,7 @@ public void UpdateTotalPanelSize(double newSize) { var entry = _cachedValues.Last(); - if (IsVertical == false) + if (!IsVertical) { entry.Value.Width = newSize; } @@ -57,7 +57,7 @@ public void UpdatePanelSize(int index, double newSize) { var entry = _cachedValues.ElementAt(index); - if (IsVertical == false) + if (!IsVertical) { entry.Value.Width = newSize; } @@ -85,12 +85,12 @@ public Task> Observe(IEnumerable@LocalizedStrings.Import + @LocalizedStrings.Import } else { - Reset + Reset } \ No newline at end of file diff --git a/CodeBeam.MudExtensions/Components/DateWheelPicker/MudDateWheelPicker.razor b/CodeBeam.MudExtensions/Components/DateWheelPicker/MudDateWheelPicker.razor index 152cacfa..193253af 100644 --- a/CodeBeam.MudExtensions/Components/DateWheelPicker/MudDateWheelPicker.razor +++ b/CodeBeam.MudExtensions/Components/DateWheelPicker/MudDateWheelPicker.razor @@ -22,13 +22,13 @@
@if (SubmitOnClose == false) { - + } @if (ShowToolbar) { - - + + }
} diff --git a/CodeBeam.MudExtensions/Components/DateWheelPicker/MudDateWheelPicker.razor.cs b/CodeBeam.MudExtensions/Components/DateWheelPicker/MudDateWheelPicker.razor.cs index a01957f9..776a23ce 100644 --- a/CodeBeam.MudExtensions/Components/DateWheelPicker/MudDateWheelPicker.razor.cs +++ b/CodeBeam.MudExtensions/Components/DateWheelPicker/MudDateWheelPicker.razor.cs @@ -19,7 +19,7 @@ protected override void OnInitialized() Converter = new MudBlazor.Converter() { SetFunc = x => x?.ToString(DateFormat), - GetFunc = x => DateTime.TryParseExact(x, DateFormat, null, System.Globalization.DateTimeStyles.None, out dt) == true ? dt : null, + GetFunc = x => DateTime.TryParseExact(x, DateFormat, null, System.Globalization.DateTimeStyles.None, out dt) ? dt : null, }; } @@ -189,7 +189,7 @@ protected override void OnInitialized() public int MaxHeight { get; set; } = 300; internal bool _isOpen; - internal string _currentIcon { get; set; } = Icons.Filled.CalendarMonth; + internal string _currentIcon { get; set; } = Icons.Material.Filled.CalendarMonth; [Parameter] [Category(CategoryTypes.FormComponent.ListAppearance)] @@ -243,7 +243,7 @@ public async Task OpenMenu() return; SetWheelValues(); _isOpen = true; - if (Editable == true) + if (Editable) { await InputReference.FocusAsync(); } diff --git a/CodeBeam.MudExtensions/Components/Gallery/MudGallery.razor.cs b/CodeBeam.MudExtensions/Components/Gallery/MudGallery.razor.cs index 6449d623..eef2e9e7 100644 --- a/CodeBeam.MudExtensions/Components/Gallery/MudGallery.razor.cs +++ b/CodeBeam.MudExtensions/Components/Gallery/MudGallery.razor.cs @@ -111,7 +111,7 @@ protected async Task SetAdjacentImage(int count) return; } - if (EnableAnimation == true) + if (EnableAnimation) { await _animate.Refresh(); } diff --git a/CodeBeam.MudExtensions/Components/InputExtended/MudInputCssHelperExtended.cs b/CodeBeam.MudExtensions/Components/InputExtended/MudInputCssHelperExtended.cs index cc7399aa..db432254 100644 --- a/CodeBeam.MudExtensions/Components/InputExtended/MudInputCssHelperExtended.cs +++ b/CodeBeam.MudExtensions/Components/InputExtended/MudInputCssHelperExtended.cs @@ -13,7 +13,7 @@ public static string GetClassname(MudBaseInputExtended baseInput, Func baseInput.Margin != Margin.None) - .AddClass("mud-input-underline", when: () => baseInput.DisableUnderLine == false && baseInput.Variant != Variant.Outlined) + .AddClass("mud-input-underline", when: () => !baseInput.DisableUnderLine && baseInput.Variant != Variant.Outlined) .AddClass("mud-shrink", when: shrinkWhen) .AddClass("mud-disabled", baseInput.Disabled) .AddClass("mud-input-error", baseInput.HasErrors) diff --git a/CodeBeam.MudExtensions/Components/InputExtended/MudInputExtended.razor.cs b/CodeBeam.MudExtensions/Components/InputExtended/MudInputExtended.razor.cs index 876273fe..47d60d88 100644 --- a/CodeBeam.MudExtensions/Components/InputExtended/MudInputExtended.razor.cs +++ b/CodeBeam.MudExtensions/Components/InputExtended/MudInputExtended.razor.cs @@ -36,10 +36,10 @@ public partial class MudInputExtended : MudBaseInputExtended protected string ClearButtonClassname => new CssBuilder() - .AddClass("me-n1", Adornment == Adornment.End && HideSpinButtons == false) - .AddClass("mud-icon-button-edge-end", Adornment == Adornment.End && HideSpinButtons == true) - .AddClass("me-6", Adornment != Adornment.End && HideSpinButtons == false) - .AddClass("mud-icon-button-edge-margin-end", Adornment != Adornment.End && HideSpinButtons == true) + .AddClass("me-n1", Adornment == Adornment.End && !HideSpinButtons) + .AddClass("mud-icon-button-edge-end", Adornment == Adornment.End && HideSpinButtons) + .AddClass("me-6", Adornment != Adornment.End && !HideSpinButtons) + .AddClass("mud-icon-button-edge-margin-end", Adornment != Adornment.End && HideSpinButtons) .Build(); protected override async Task OnAfterRenderAsync(bool firstRender) @@ -47,7 +47,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender) await base.OnAfterRenderAsync(firstRender); if (firstRender) { - if (AutoSize == true) + if (AutoSize) { await JSRuntime.InvokeVoidAsync("auto_size", ElementReference); StateHasChanged(); diff --git a/CodeBeam.MudExtensions/Components/ListExtended/MudListExtended.razor.cs b/CodeBeam.MudExtensions/Components/ListExtended/MudListExtended.razor.cs index d35fdb39..bf49f02c 100644 --- a/CodeBeam.MudExtensions/Components/ListExtended/MudListExtended.razor.cs +++ b/CodeBeam.MudExtensions/Components/ListExtended/MudListExtended.razor.cs @@ -38,7 +38,7 @@ public partial class MudListExtended : MudComponentBase, IDisposable protected string Stylename => new StyleBuilder() - .AddStyle("max-height", $"{MaxItems * (Dense == false ? 48 : 36) + (DisablePadding == true ? 0 : 16)}px", MaxItems != null) + .AddStyle("max-height", $"{MaxItems * (!Dense ? 48 : 36) + (DisablePadding ? 0 : 16)}px", MaxItems != null) .AddStyle("overflow-y", "auto", MaxItems != null) .AddStyle(Style) .Build(); @@ -192,11 +192,11 @@ public bool MultiSelection return; } _multiSelection = value; - if (_setParametersDone == false) + if (!_setParametersDone) { return; } - if (_multiSelection == false) + if (!_multiSelection) { if (!_centralCommanderIsProcessing) { @@ -314,11 +314,11 @@ public bool MultiSelection // (2) When this method runs once, prevents all value setters until OnAfterRender runs. That guarantees to have proper values. protected void HandleCentralValueCommander(string changedValueType, bool updateStyles = true) { - if (_setParametersDone == false) + if (!_setParametersDone) { return; } - if (_centralCommanderIsProcessing == true) + if (_centralCommanderIsProcessing) { return; } @@ -326,7 +326,7 @@ protected void HandleCentralValueCommander(string changedValueType, bool updateS if (changedValueType == nameof(SelectedValue)) { - if (MultiSelection == false) + if (!MultiSelection) { SelectedValues = new HashSet(_comparer) { SelectedValue }; UpdateSelectedItem(); @@ -334,7 +334,7 @@ protected void HandleCentralValueCommander(string changedValueType, bool updateS } else if (changedValueType == nameof(SelectedValues)) { - if (MultiSelection == true) + if (MultiSelection) { SelectedValue = SelectedValues == null ? default(T) : SelectedValues.LastOrDefault(); UpdateSelectedItem(); @@ -342,7 +342,7 @@ protected void HandleCentralValueCommander(string changedValueType, bool updateS } else if (changedValueType == nameof(SelectedItem)) { - if (MultiSelection == false) + if (!MultiSelection) { SelectedItems = new HashSet>() { SelectedItem }; UpdateSelectedValue(); @@ -350,7 +350,7 @@ protected void HandleCentralValueCommander(string changedValueType, bool updateS } else if (changedValueType == nameof(SelectedItems)) { - if (MultiSelection == true) + if (MultiSelection) { SelectedItem = SelectedItems == null ? null : SelectedItems.LastOrDefault(); UpdateSelectedValue(); @@ -389,7 +389,7 @@ protected internal void UpdateSelectedItem() protected internal void UpdateSelectedValue() { - if (MultiSelection == false && SelectedItem == null) + if (!MultiSelection && SelectedItem == null) { SelectedValue = default(T); SelectedValues = null; @@ -412,11 +412,11 @@ public T SelectedValue get => _selectedValue; set { - if (Converter.Set(_selectedValue) != Converter.Set(default(T)) && _firstRendered == false) + if (Converter.Set(_selectedValue) != Converter.Set(default(T)) && !_firstRendered) { return; } - if (_centralCommanderResultRendered == false && _firstRendered == true) + if (!_centralCommanderResultRendered && _firstRendered) { return; } @@ -450,11 +450,11 @@ public IEnumerable SelectedValues set { - if (value == null && _firstRendered == false) + if (value == null && !_firstRendered) { return; } - if (_centralCommanderResultRendered == false && _firstRendered == true) + if (!_centralCommanderResultRendered && _firstRendered) { return; } @@ -479,7 +479,7 @@ public IEnumerable SelectedValues //} _selectedValues = value == null ? null : new HashSet(value, _comparer); - if (_setParametersDone == false) + if (!_setParametersDone) { return; } @@ -500,7 +500,7 @@ public MudListItemExtended SelectedItem get => _selectedItem; set { - if (_centralCommanderResultRendered == false && _firstRendered == true) + if (!_centralCommanderResultRendered && _firstRendered) { return; } @@ -508,7 +508,7 @@ public MudListItemExtended SelectedItem return; _selectedItem = value; - if (_setParametersDone == false) + if (!_setParametersDone) { return; } @@ -529,7 +529,7 @@ public IEnumerable> SelectedItems get => _selectedItems; set { - if (_centralCommanderResultRendered == false && _firstRendered == true) + if (!_centralCommanderResultRendered && _firstRendered) { return; } @@ -543,7 +543,7 @@ public IEnumerable> SelectedItems return; _selectedItems = value == null ? null : value.ToHashSet(); - if (_setParametersDone == false) + if (!_setParametersDone) { return; } @@ -596,7 +596,7 @@ public List> GetItems() bool _setParametersDone = false; public override Task SetParametersAsync(ParameterView parameters) { - if (_centralCommanderIsProcessing == true) + if (_centralCommanderIsProcessing) { return Task.CompletedTask; } @@ -658,11 +658,11 @@ protected override async Task OnAfterRenderAsync(bool firstRender) if (MudSelectExtended == null && MudAutocomplete == null) { - if (MultiSelection == false && SelectedValue != null) + if (!MultiSelection && SelectedValue != null) { HandleCentralValueCommander(nameof(SelectedValue)); } - else if (MultiSelection == true && SelectedValues != null) + else if (MultiSelection && SelectedValues != null) { HandleCentralValueCommander(nameof(SelectedValues)); } @@ -745,7 +745,7 @@ protected internal void Unregister(MudListExtended child) protected internal async Task HandleKeyDown(KeyboardEventArgs obj) { - if (Disabled || (Clickable == false && MultiSelection == false)) + if (Disabled || (!Clickable && !MultiSelection)) return; if (ParentList != null) { @@ -788,7 +788,7 @@ protected internal async Task HandleKeyDown(KeyboardEventArgs obj) break; case "a": case "A": - if (obj.CtrlKey == true) + if (obj.CtrlKey) { if (MultiSelection) { @@ -858,7 +858,7 @@ protected internal void SetSelectedValue(MudListItemExtended item, bool force return; } - if (MultiSelection == false) + if (!MultiSelection) { SelectedValue = item.Value; } @@ -893,12 +893,12 @@ protected internal void UpdateSelectedStyles(bool deselectFirst = true, bool upd DeselectAllItems(items); } - if (IsSelectable() == false) + if (!IsSelectable()) { return; } - if (MultiSelection == false) + if (!MultiSelection) { items.FirstOrDefault(x => SelectedValue == null ? x.Value == null : SelectedValue.Equals(x == null ? null : x.Value))?.SetSelected(true); } @@ -907,7 +907,7 @@ protected internal void UpdateSelectedStyles(bool deselectFirst = true, bool upd items.Where(x => SelectedValues.Contains(x.Value, Comparer == null ? null : Comparer)).ToList().ForEach(x => x.SetSelected(true)); } - if (update == true) + if (update) { StateHasChanged(); } @@ -946,13 +946,13 @@ protected List> CollectAllMudListItems(bool exceptNestedA items.AddRange(list._items); } - if (exceptNestedAndExceptional == false) + if (!exceptNestedAndExceptional) { return items; } else { - return items.Where(x => x.NestedList == null && x.IsFunctional == false).ToList(); + return items.Where(x => x.NestedList == null && !x.IsFunctional).ToList(); } } @@ -994,21 +994,21 @@ protected string SelectAllCheckBoxIcon /// [Parameter] [Category(CategoryTypes.FormComponent.ListAppearance)] - public string CheckedIcon { get; set; } = Icons.Filled.CheckBox; + public string CheckedIcon { get; set; } = Icons.Material.Filled.CheckBox; /// /// Custom unchecked icon. /// [Parameter] [Category(CategoryTypes.FormComponent.ListAppearance)] - public string UncheckedIcon { get; set; } = Icons.Filled.CheckBoxOutlineBlank; + public string UncheckedIcon { get; set; } = Icons.Material.Filled.CheckBoxOutlineBlank; /// /// Custom indeterminate icon. /// [Parameter] [Category(CategoryTypes.FormComponent.ListAppearance)] - public string IndeterminateIcon { get; set; } = Icons.Filled.IndeterminateCheckBox; + public string IndeterminateIcon { get; set; } = Icons.Material.Filled.IndeterminateCheckBox; protected void SelectAllItems(bool? deselect = false) { @@ -1017,7 +1017,7 @@ protected void SelectAllItems(bool? deselect = false) { foreach (var item in items) { - if (item.IsSelected == true) + if (item.IsSelected) { item.SetSelected(false); } @@ -1028,7 +1028,7 @@ protected void SelectAllItems(bool? deselect = false) { foreach (var item in items) { - if (item.IsSelected == false) + if (!item.IsSelected) { item.SetSelected(true); } @@ -1036,7 +1036,7 @@ protected void SelectAllItems(bool? deselect = false) _allSelected = true; } - SelectedValues = items.Where(x => x.IsSelected == true).Select(y => y.Value).ToHashSet(_comparer); + SelectedValues = items.Where(x => x.IsSelected).Select(y => y.Value).ToHashSet(_comparer); if (MudSelectExtended != null) { MudSelectExtended.BeginValidatePublic(); @@ -1053,7 +1053,7 @@ protected int GetActiveItemIndex() var items = CollectAllMudListItems(true); if (_lastActivatedItem == null) { - var a = items.FindIndex(x => x.IsActive == true); + var a = items.FindIndex(x => x.IsActive); return a; } else @@ -1068,7 +1068,7 @@ protected T GetActiveItemValue() var items = CollectAllMudListItems(true); if (_lastActivatedItem == null) { - return items.FirstOrDefault(x => x.IsActive == true).Value; + return items.FirstOrDefault(x => x.IsActive).Value; } else { @@ -1099,7 +1099,7 @@ protected void DeactiveAllItems(List> items = null) public async Task ActiveFirstItem(string startChar = null) { var items = CollectAllMudListItems(true); - if (items == null || items.Count == 0 || items[0].Disabled == true) + if (items == null || items.Count == 0 || items[0].Disabled) { return; } @@ -1109,7 +1109,7 @@ public async Task ActiveFirstItem(string startChar = null) { items[0].SetActive(true); _lastActivatedItem = items[0]; - if (items[0].ParentListItem != null && items[0].ParentListItem.Expanded == false) + if (items[0].ParentListItem != null && !items[0].ParentListItem.Expanded) { items[0].ParentListItem.Expanded = true; } @@ -1126,7 +1126,7 @@ public async Task ActiveFirstItem(string startChar = null) return; } _lastActivatedItem.SetActive(true); - if (_lastActivatedItem.ParentListItem != null && _lastActivatedItem.ParentListItem.Expanded == false) + if (_lastActivatedItem.ParentListItem != null && !_lastActivatedItem.ParentListItem.Expanded) { _lastActivatedItem.ParentListItem.Expanded = true; } @@ -1139,7 +1139,7 @@ public async Task ActiveFirstItem(string startChar = null) { possibleItems[0].SetActive(true); _lastActivatedItem = possibleItems[0]; - if (_lastActivatedItem.ParentListItem != null && _lastActivatedItem.ParentListItem.Expanded == false) + if (_lastActivatedItem.ParentListItem != null && !_lastActivatedItem.ParentListItem.Expanded) { _lastActivatedItem.ParentListItem.Expanded = true; } @@ -1151,7 +1151,7 @@ public async Task ActiveFirstItem(string startChar = null) { possibleItems[0].SetActive(true); _lastActivatedItem = possibleItems[0]; - if (_lastActivatedItem.ParentListItem != null && _lastActivatedItem.ParentListItem.Expanded == false) + if (_lastActivatedItem.ParentListItem != null && !_lastActivatedItem.ParentListItem.Expanded) { _lastActivatedItem.ParentListItem.Expanded = true; } @@ -1162,7 +1162,7 @@ public async Task ActiveFirstItem(string startChar = null) var item = possibleItems[possibleItems.IndexOf(theItem) + 1]; item.SetActive(true); _lastActivatedItem = item; - if (_lastActivatedItem.ParentListItem != null && _lastActivatedItem.ParentListItem.Expanded == false) + if (_lastActivatedItem.ParentListItem != null && !_lastActivatedItem.ParentListItem.Expanded) { _lastActivatedItem.ParentListItem.Expanded = true; } @@ -1182,7 +1182,7 @@ public async Task ActiveAdjacentItem(int changeCount) { return; } - if (items[index + changeCount].Disabled == true) + if (items[index + changeCount].Disabled) { // Recursive await ActiveAdjacentItem(changeCount > 0 ? changeCount + 1 : changeCount - 1); @@ -1192,7 +1192,7 @@ public async Task ActiveAdjacentItem(int changeCount) items[index + changeCount].SetActive(true); _lastActivatedItem = items[index + changeCount]; - if (items[index + changeCount].ParentListItem != null && items[index + changeCount].ParentListItem.Expanded == false) + if (items[index + changeCount].ParentListItem != null && !items[index + changeCount].ParentListItem.Expanded) { items[index + changeCount].ParentListItem.Expanded = true; } @@ -1216,7 +1216,7 @@ public async Task ActivePreviousItem() items[index - 1].SetActive(true); _lastActivatedItem = items[index - 1]; - if (items[index - 1].ParentListItem != null && items[index - 1].ParentListItem.Expanded == false) + if (items[index - 1].ParentListItem != null && !items[index - 1].ParentListItem.Expanded) { items[index - 1].ParentListItem.Expanded = true; } @@ -1235,7 +1235,7 @@ public async Task ActiveLastItem() DeactiveAllItems(items); for (int i = 0; i < items.Count; i++) { - if (items[properLastIndex - i].Disabled != true) + if (!items[properLastIndex - i].Disabled) { properLastIndex -= i; break; @@ -1244,7 +1244,7 @@ public async Task ActiveLastItem() items[properLastIndex].SetActive(true); _lastActivatedItem = items[properLastIndex]; - if (items[properLastIndex].ParentListItem != null && items[properLastIndex].ParentListItem.Expanded == false) + if (items[properLastIndex].ParentListItem != null && !items[properLastIndex].ParentListItem.Expanded) { items[properLastIndex].ParentListItem.Expanded = true; } @@ -1283,7 +1283,7 @@ protected internal ValueTask ScrollToMiddleAsync(MudListItemExtended item) protected ICollection GetSearchedItems() { - if (SearchBox == false || ItemCollection == null || _searchString == null) + if (!SearchBox || ItemCollection == null || _searchString == null) { return ItemCollection; } diff --git a/CodeBeam.MudExtensions/Components/ListExtended/MudListItemExtended.razor.cs b/CodeBeam.MudExtensions/Components/ListExtended/MudListItemExtended.razor.cs index 8eec4af2..8f276dad 100644 --- a/CodeBeam.MudExtensions/Components/ListExtended/MudListItemExtended.razor.cs +++ b/CodeBeam.MudExtensions/Components/ListExtended/MudListItemExtended.razor.cs @@ -26,7 +26,7 @@ public partial class MudListItemExtended : MudComponentBase, IDisposable .AddClass("mud-list-item-clickable-extended", MudListExtended?.Clickable) .AddClass("mud-ripple", MudListExtended?.Clickable == true && !DisableRipple && !Disabled && !IsFunctional) .AddClass($"mud-selected-item mud-{MudListExtended?.Color.ToDescriptionString()}-text mud-{MudListExtended?.Color.ToDescriptionString()}-hover", _selected && !Disabled && NestedList == null && !MudListExtended.DisableSelectedItemStyle) - .AddClass("mud-list-item-hilight-extended", _active && !Disabled && NestedList == null && IsFunctional == false) + .AddClass("mud-list-item-hilight-extended", _active && !Disabled && NestedList == null && !IsFunctional) .AddClass("mud-list-item-disabled-extended", Disabled) .AddClass("mud-list-item-nested-background-extended", MudListExtended != null && MudListExtended.SecondaryBackgroundForNestedItemHeader && NestedList != null) .AddClass("mud-list-item-functional", IsFunctional) @@ -161,14 +161,14 @@ public bool Disabled /// [Parameter] [Category(CategoryTypes.List.Expanding)] - public string ExpandLessIcon { get; set; } = Icons.Filled.ExpandLess; + public string ExpandLessIcon { get; set; } = Icons.Material.Filled.ExpandLess; /// /// Custom expand more icon. /// [Parameter] [Category(CategoryTypes.List.Expanding)] - public string ExpandMoreIcon { get; set; } = Icons.Filled.ExpandMore; + public string ExpandMoreIcon { get; set; } = Icons.Material.Filled.ExpandMore; /// /// If true, the List Subheader will be indented. @@ -360,7 +360,7 @@ protected void OnClickHandler(MouseEventArgs ev) if (Disabled) return; - if (OnClickHandlerPreventDefault == true) + if (OnClickHandlerPreventDefault) { OnClick.InvokeAsync(ev).AndForget(); return; diff --git a/CodeBeam.MudExtensions/Components/PasswordField/MudPasswordField.razor.cs b/CodeBeam.MudExtensions/Components/PasswordField/MudPasswordField.razor.cs index a3dda63b..3fcbbc5d 100644 --- a/CodeBeam.MudExtensions/Components/PasswordField/MudPasswordField.razor.cs +++ b/CodeBeam.MudExtensions/Components/PasswordField/MudPasswordField.razor.cs @@ -106,15 +106,15 @@ public bool PasswordMode return; } _passwordMode = value; - if (_passwordMode == true) + if (_passwordMode) { _passwordInput = InputType.Password; - _passwordIcon = Icons.Filled.VisibilityOff; + _passwordIcon = Icons.Material.Filled.VisibilityOff; } else { _passwordInput = InputType.Text; - _passwordIcon = Icons.Filled.Visibility; + _passwordIcon = Icons.Material.Filled.Visibility; } PasswordModeChanged.InvokeAsync(value).AndForgetExt(); diff --git a/CodeBeam.MudExtensions/Components/Popup/MudPopup.razor b/CodeBeam.MudExtensions/Components/Popup/MudPopup.razor index 9da11900..6c868126 100644 --- a/CodeBeam.MudExtensions/Components/Popup/MudPopup.razor +++ b/CodeBeam.MudExtensions/Components/Popup/MudPopup.razor @@ -26,7 +26,7 @@ } else { - + } } diff --git a/CodeBeam.MudExtensions/Components/SelectExtended/MudSelectExtended.razor.cs b/CodeBeam.MudExtensions/Components/SelectExtended/MudSelectExtended.razor.cs index f491ed16..d0eaba29 100644 --- a/CodeBeam.MudExtensions/Components/SelectExtended/MudSelectExtended.razor.cs +++ b/CodeBeam.MudExtensions/Components/SelectExtended/MudSelectExtended.razor.cs @@ -166,7 +166,7 @@ public bool Dense /// [Parameter] [Category(CategoryTypes.FormComponent.Appearance)] - public string OpenIcon { get; set; } = Icons.Filled.ArrowDropDown; + public string OpenIcon { get; set; } = Icons.Material.Filled.ArrowDropDown; /// /// Dropdown color of select. Supports theme colors. @@ -180,7 +180,7 @@ public bool Dense /// [Parameter] [Category(CategoryTypes.FormComponent.Appearance)] - public string CloseIcon { get; set; } = Icons.Filled.ArrowDropUp; + public string CloseIcon { get; set; } = Icons.Material.Filled.ArrowDropUp; /// /// The value presenter. @@ -320,21 +320,21 @@ public bool Dense /// [Parameter] [Category(CategoryTypes.FormComponent.ListAppearance)] - public string CheckedIcon { get; set; } = Icons.Filled.CheckBox; + public string CheckedIcon { get; set; } = Icons.Material.Filled.CheckBox; /// /// Custom unchecked icon. /// [Parameter] [Category(CategoryTypes.FormComponent.ListAppearance)] - public string UncheckedIcon { get; set; } = Icons.Filled.CheckBoxOutlineBlank; + public string UncheckedIcon { get; set; } = Icons.Material.Filled.CheckBoxOutlineBlank; /// /// Custom indeterminate icon. /// [Parameter] [Category(CategoryTypes.FormComponent.ListAppearance)] - public string IndeterminateIcon { get; set; } = Icons.Filled.IndeterminateCheckBox; + public string IndeterminateIcon { get; set; } = Icons.Material.Filled.IndeterminateCheckBox; private bool _multiSelection = false; /// @@ -445,14 +445,14 @@ public IEnumerable SelectedValues if (SelectedValues.Count() == set.Count() && _selectedValues.All(x => set.Contains(x, _comparer))) return; - if (_selectedValuesSetterStarted == true) + if (_selectedValuesSetterStarted) { return; } _selectedValuesSetterStarted = true; _selectedValues = new HashSet(set, _comparer); SelectionChangedFromOutside?.Invoke(new HashSet(_selectedValues, _comparer)); - if (MultiSelection == false) + if (!MultiSelection) { SetValueAsync(_selectedValues.FirstOrDefault()).AndForget(); } @@ -561,7 +561,7 @@ protected override Task UpdateTextPropertyAsync(bool updateValue) { foreach (var val in SelectedValues) { - if (Strict == false && !Items.Select(x => x.Value).Contains(val)) + if (!Strict && !Items.Select(x => x.Value).Contains(val)) { textList.Add(ToStringFunc != null ? ToStringFunc(val) : Converter.Set(val)); continue; @@ -577,7 +577,7 @@ protected override Task UpdateTextPropertyAsync(bool updateValue) // when multiselection is true, we return // a comma separated list of selected values - if (MultiSelection == true) + if (MultiSelection) { if (MultiSelectionTextFunc != null) { @@ -615,11 +615,11 @@ protected override void OnInitialized() { base.OnInitialized(); UpdateIcon(); - if (MultiSelection == false && Value != null) + if (!MultiSelection && Value != null) { _selectedValues = new HashSet(_comparer) { Value }; } - else if (MultiSelection == true && SelectedValues != null) + else if (MultiSelection && SelectedValues != null) { // TODO: Check this line again SetValueAsync(SelectedValues.FirstOrDefault()).AndForget(); @@ -669,7 +669,7 @@ protected override void Dispose(bool disposing) { base.Dispose(disposing); - if (disposing == true) + if (disposing) { if (_keyInterceptor != null) { @@ -690,7 +690,7 @@ protected internal async void HandleKeyDown(KeyboardEventArgs obj) if (Disabled || ReadOnly) return; - if (_list != null && _isOpen == true) + if (_list != null && _isOpen) { await _list.HandleKeyDown(obj); } @@ -701,21 +701,21 @@ protected internal async void HandleKeyDown(KeyboardEventArgs obj) await CloseMenu(); break; case "ArrowUp": - if (obj.AltKey == true) + if (obj.AltKey) { await CloseMenu(); } - else if (_isOpen == false) + else if (!_isOpen) { await OpenMenu(); } break; case "ArrowDown": - if (obj.AltKey == true) + if (obj.AltKey) { await OpenMenu(); } - else if (_isOpen == false) + else if (!_isOpen) { await OpenMenu(); } @@ -728,7 +728,7 @@ protected internal async void HandleKeyDown(KeyboardEventArgs obj) break; case "Enter": case "NumpadEnter": - if (MultiSelection == false) + if (!MultiSelection) { if (!_isOpen) { @@ -742,7 +742,7 @@ protected internal async void HandleKeyDown(KeyboardEventArgs obj) } else { - if (_isOpen == false) + if (!_isOpen) { await OpenMenu(); break; @@ -898,7 +898,7 @@ public async Task SelectOption(object obj) public async Task ForceUpdate() { //await base.ForceUpdate(); - if (MultiSelection == false) + if (!MultiSelection) { SelectedValues = new HashSet(_comparer) { Value }; } @@ -930,7 +930,7 @@ protected internal bool Add(MudSelectItemExtended item) } } //UpdateSelectAllChecked(); - if (result.HasValue == false) + if (!result.HasValue) { result = item.Value?.Equals(Value); } @@ -1011,9 +1011,9 @@ protected bool IsValueInList if (Value == null) return false; //return _shadowLookup.TryGetValue(Value, out var _); - foreach (var item in Items) + foreach (var value in Items.Select(x => x.Value)) { - if (Comparer != null ? Comparer.Equals(item.Value, Value) : item.Value.Equals(Value)) //(Converter.Set(item.Value) == Converter.Set(Value)) + if (Comparer != null ? Comparer.Equals(value, Value) : value.Equals(Value)) //(Converter.Set(item.Value) == Converter.Set(Value)) { return true; } diff --git a/CodeBeam.MudExtensions/Components/SelectExtended/MudSelectItemExtended.razor.cs b/CodeBeam.MudExtensions/Components/SelectExtended/MudSelectItemExtended.razor.cs index 55a2bf5b..38c7ce65 100644 --- a/CodeBeam.MudExtensions/Components/SelectExtended/MudSelectItemExtended.razor.cs +++ b/CodeBeam.MudExtensions/Components/SelectExtended/MudSelectItemExtended.razor.cs @@ -130,7 +130,7 @@ protected string DisplayString var converter = MudSelectExtended?.Converter; if (converter == null) return $"{(string.IsNullOrEmpty(Text) ? Value : Text)}"; - return string.IsNullOrEmpty(Text) == false ? Text : converter.Set(Value); + return !string.IsNullOrEmpty(Text) ? Text : converter.Set(Value); } } @@ -139,7 +139,7 @@ protected void HandleOnClick() // Selection works on list. We arrange only popover state and some minor arrangements on click. MudSelectExtended?.SelectOption(Value).AndForget(); InvokeAsync(StateHasChanged); - if (MultiSelection == false) + if (!MultiSelection) { MudSelectExtended.CloseMenu().AndForget(); } diff --git a/CodeBeam.MudExtensions/Components/SpeedDial/MudSpeedDial.razor.cs b/CodeBeam.MudExtensions/Components/SpeedDial/MudSpeedDial.razor.cs index 7ec53dca..df177902 100644 --- a/CodeBeam.MudExtensions/Components/SpeedDial/MudSpeedDial.razor.cs +++ b/CodeBeam.MudExtensions/Components/SpeedDial/MudSpeedDial.razor.cs @@ -45,7 +45,7 @@ public partial class MudSpeedDial : MudComponentBase public EventCallback OnMainButtonClick { get; set; } [Parameter] - public string Icon { get; set; } = Icons.Filled.Add; + public string Icon { get; set; } = Icons.Material.Filled.Add; [Parameter] public string IconOnOpen { get; set; } @@ -74,7 +74,7 @@ public Origin Origin protected string GetIcon() { - if (Open == true && !string.IsNullOrEmpty(IconOnOpen)) + if (Open && !string.IsNullOrEmpty(IconOnOpen)) { return IconOnOpen; } @@ -115,7 +115,7 @@ protected async Task MainButtonClick() bool _popoverMouseEnter; protected void RootMouseEnter() { - if (OpenOnHover == false) + if (!OpenOnHover) { return; } @@ -126,7 +126,7 @@ protected void RootMouseEnter() protected void PopoverMouseEnter() { - if (OpenOnHover == false) + if (!OpenOnHover) { return; } @@ -135,7 +135,7 @@ protected void PopoverMouseEnter() protected async Task PopoverMouseLeave() { - if (OpenOnHover == false) + if (!OpenOnHover) { return; } @@ -145,13 +145,13 @@ protected async Task PopoverMouseLeave() protected async Task WaitToClose() { - if (OpenOnHover == false) + if (!OpenOnHover) { return; } _rootMouseEnter = false; await Task.Delay(100); - if (_popoverMouseEnter == false && _rootMouseEnter == false) + if (!_popoverMouseEnter && !_rootMouseEnter) { CloseMenu(); } diff --git a/CodeBeam.MudExtensions/Components/Splitter/MudSplitter.razor.cs b/CodeBeam.MudExtensions/Components/Splitter/MudSplitter.razor.cs index 02e5e28f..8db0d808 100644 --- a/CodeBeam.MudExtensions/Components/Splitter/MudSplitter.razor.cs +++ b/CodeBeam.MudExtensions/Components/Splitter/MudSplitter.razor.cs @@ -12,7 +12,7 @@ public partial class MudSplitter : MudComponentBase MudSlider _slider; protected string Classname => new CssBuilder("mud-splitter") - .AddClass($"border-solid border-2 mud-border-{Color.ToDescriptionString()}", Bordered == true) + .AddClass($"border-solid border-2 mud-border-{Color.ToDescriptionString()}", Bordered) .AddClass($"mud-splitter-generate mud-splitter-generate-{_styleGuid}") .AddClass(Class) .Build(); diff --git a/CodeBeam.MudExtensions/Components/Stepper/MudStep.razor.cs b/CodeBeam.MudExtensions/Components/Stepper/MudStep.razor.cs index 805e1952..c0195c4a 100644 --- a/CodeBeam.MudExtensions/Components/Stepper/MudStep.razor.cs +++ b/CodeBeam.MudExtensions/Components/Stepper/MudStep.razor.cs @@ -15,7 +15,7 @@ public partial class MudStep : MudComponentBase, IDisposable { protected string Classname => new CssBuilder() - .AddClass("d-none", ((MudStepper.ActiveIndex < MudStepper.Steps.Count && MudStepper.Steps[MudStepper.ActiveIndex] != this) || (MudStepper.ShowResultStep() && IsResultStep == false)) || (IsResultStep && MudStepper.ShowResultStep() == false)) + .AddClass("d-none", ((MudStepper.ActiveIndex < MudStepper.Steps.Count && MudStepper.Steps[MudStepper.ActiveIndex] != this) || (MudStepper.ShowResultStep() && !IsResultStep)) || (IsResultStep && !MudStepper.ShowResultStep())) .AddClass(Class) .Build(); diff --git a/CodeBeam.MudExtensions/Components/Stepper/MudStepper.razor b/CodeBeam.MudExtensions/Components/Stepper/MudStepper.razor index 016fa675..2b09270c 100644 --- a/CodeBeam.MudExtensions/Components/Stepper/MudStepper.razor +++ b/CodeBeam.MudExtensions/Components/Stepper/MudStepper.razor @@ -16,11 +16,11 @@ @if (step.Status == Enums.StepStatus.Completed) { - + } else if (step.Status == StepStatus.Skipped) { - + } else { @@ -60,7 +60,7 @@ { if (ActiveIndex < Steps.Count && Steps[ActiveIndex].Status != StepStatus.Continued || showResultStep) { - + } else { @@ -100,7 +100,7 @@ { if (ActiveIndex < Steps.Count && Steps[ActiveIndex].Status != StepStatus.Continued) { - + } else { diff --git a/CodeBeam.MudExtensions/Components/Stepper/MudStepper.razor.cs b/CodeBeam.MudExtensions/Components/Stepper/MudStepper.razor.cs index 62299540..69e0ab0e 100644 --- a/CodeBeam.MudExtensions/Components/Stepper/MudStepper.razor.cs +++ b/CodeBeam.MudExtensions/Components/Stepper/MudStepper.razor.cs @@ -20,8 +20,8 @@ public partial class MudStepper : MudComponentBase Guid _animateGuid = Guid.NewGuid(); protected string HeaderClassname => new CssBuilder("d-flex align-center mud-stepper-header gap-4 pa-2") - .AddClass("mud-ripple", DisableRipple == false && Linear == false) - .AddClass("cursor-pointer mud-stepper-header-non-linear", Linear == false) + .AddClass("mud-ripple", !DisableRipple && !Linear) + .AddClass("cursor-pointer mud-stepper-header-non-linear", !Linear) .AddClass("flex-column", HeaderTextView == HeaderTextView.NewLine) .Build(); @@ -168,7 +168,7 @@ protected set internal void AddStep(MudStep step) { _allSteps.Add(step); - if (step.IsResultStep == false) + if (!step.IsResultStep) { Steps.Add(step); } @@ -201,7 +201,7 @@ protected internal async Task SetActiveIndex(int count, bool firstCompleted = fa StepChangeDirection.Backward ); - if (skipPreventProcess == false && PreventStepChange != null && PreventStepChange.Invoke(stepChangeDirection) == true) + if (!skipPreventProcess && PreventStepChange != null && PreventStepChange.Invoke(stepChangeDirection)) { return; } @@ -212,11 +212,11 @@ protected internal async Task SetActiveIndex(int count, bool firstCompleted = fa await _animate.Refresh(); } - if (ActiveIndex == Steps.Count - 1 && HasResultStep() == false && 0 < count) + if (ActiveIndex == Steps.Count - 1 && !HasResultStep() && 0 < count) { return; } - else if (firstCompleted == true) + else if (firstCompleted) { if (HasResultStep()) { @@ -227,7 +227,7 @@ protected internal async Task SetActiveIndex(int count, bool firstCompleted = fa { ActiveIndex = 0; } - else if (ActiveIndex == Steps.Count - 1 && IsAllStepsCompleted() == false && 0 < count) + else if (ActiveIndex == Steps.Count - 1 && !IsAllStepsCompleted() && 0 < count) { ActiveIndex = Steps.IndexOf(Steps.FirstOrDefault(x => x.Status == StepStatus.Continued)); } @@ -248,7 +248,7 @@ public async Task CompleteStep(int index, bool moveToNextStep = true) if (isActiveStep) { var stepChangeDirection = (moveToNextStep ? StepChangeDirection.Forward : StepChangeDirection.None); - if (PreventStepChange != null && PreventStepChange.Invoke(stepChangeDirection) == true) + if (PreventStepChange != null && PreventStepChange.Invoke(stepChangeDirection)) { return; } @@ -271,7 +271,7 @@ public async Task SkipStep(int index, bool moveToNextStep = true) if (isActiveStep) { var stepChangeDirection = (moveToNextStep ? StepChangeDirection.Forward : StepChangeDirection.None); - if (PreventStepChange != null && PreventStepChange.Invoke(stepChangeDirection) == true) + if (PreventStepChange != null && PreventStepChange.Invoke(stepChangeDirection)) { return; } diff --git a/CodeBeam.MudExtensions/Components/SwitchM3/MudSwitchM3.razor.cs b/CodeBeam.MudExtensions/Components/SwitchM3/MudSwitchM3.razor.cs index 048076af..4939378b 100644 --- a/CodeBeam.MudExtensions/Components/SwitchM3/MudSwitchM3.razor.cs +++ b/CodeBeam.MudExtensions/Components/SwitchM3/MudSwitchM3.razor.cs @@ -157,7 +157,7 @@ protected override void Dispose(bool disposing) { base.Dispose(disposing); - if (disposing == true) + if (disposing) { if(_keyInterceptor != null) { diff --git a/CodeBeam.MudExtensions/Components/Toggle/MudToggle.razor.cs b/CodeBeam.MudExtensions/Components/Toggle/MudToggle.razor.cs index 446e64d2..68fb2162 100644 --- a/CodeBeam.MudExtensions/Components/Toggle/MudToggle.razor.cs +++ b/CodeBeam.MudExtensions/Components/Toggle/MudToggle.razor.cs @@ -16,14 +16,14 @@ public partial class MudToggle : MudComponentBase { protected string Classname => new CssBuilder() - .AddClass(Class, Toggled == false) - .AddClass(ClassToggled, Toggled == true) + .AddClass(Class, !Toggled) + .AddClass(ClassToggled, Toggled) .AddClass(ClassCommon) .Build(); protected string GetStyle() { - if (Toggled == false) + if (!Toggled) { return $"{StyleCommon} {Style}"; } diff --git a/CodeBeam.MudExtensions/Components/Watch/MudWatch.razor.cs b/CodeBeam.MudExtensions/Components/Watch/MudWatch.razor.cs index f447213e..e7fd4257 100644 --- a/CodeBeam.MudExtensions/Components/Watch/MudWatch.razor.cs +++ b/CodeBeam.MudExtensions/Components/Watch/MudWatch.razor.cs @@ -253,7 +253,7 @@ public async void Elapse(object sender, System.Timers.ElapsedEventArgs args) Value = TimeSpan.FromMilliseconds(_stopwatch.ElapsedMilliseconds); } #pragma warning disable CS4014 - if (Wheel == true) + if (Wheel) { if (oldHour != ((int)Value.TotalHours)) { diff --git a/CodeBeam.MudExtensions/Components/Wheel/MudWheel.razor.cs b/CodeBeam.MudExtensions/Components/Wheel/MudWheel.razor.cs index a39ac88b..5a1fe06a 100644 --- a/CodeBeam.MudExtensions/Components/Wheel/MudWheel.razor.cs +++ b/CodeBeam.MudExtensions/Components/Wheel/MudWheel.razor.cs @@ -31,19 +31,19 @@ public partial class MudWheel : MudBaseInput protected string OuterItemClassname(int index) => new CssBuilder($"mud-wheel-item mud-wheel-ani-{_animateGuid}") .AddClass("wheel-item-closest", Math.Abs(ItemCollection.IndexOf(Value) - index) == 1) - .AddClass("my-1", Dense == false) + .AddClass("my-1", !Dense) .AddClass("mud-disabled", Disabled) .Build(); protected string BorderClassname => new CssBuilder("mud-wheel-border mud-wheel-item mud-width-full") .AddClass($"mud-wheel-border-{Color.ToDescriptionString()}") .AddClass($"wheel-border-gradient-{Color.ToDescriptionString()}", SmoothBorders) - .AddClass("my-1", Dense == false) + .AddClass("my-1", !Dense) .Build(); protected string EmptyItemClassname => new CssBuilder("mud-wheel-ani-{_animateGuid} mud-wheel-item wheel-item-empty") - .AddClass("my-1", Dense == false) - .AddClass("wheel-item-empty-dense", Dense == true) + .AddClass("my-1", !Dense) + .AddClass("wheel-item-empty-dense", Dense) .Build(); MudAnimate _animate; diff --git a/ComponentViewer.Docs/Components/ComponentCard.razor.cs b/ComponentViewer.Docs/Components/ComponentCard.razor.cs index 53b7ce9d..8330453a 100644 --- a/ComponentViewer.Docs/Components/ComponentCard.razor.cs +++ b/ComponentViewer.Docs/Components/ComponentCard.razor.cs @@ -26,7 +26,7 @@ public partial class ComponentCard private void NavigateComponentPage() { - if (NavigateToComponentPage == false) + if (!NavigateToComponentPage) { return; } diff --git a/ComponentViewer.Docs/Components/ExamplePage.razor b/ComponentViewer.Docs/Components/ExamplePage.razor index 55c07a8e..fa4a36b9 100644 --- a/ComponentViewer.Docs/Components/ExamplePage.razor +++ b/ComponentViewer.Docs/Components/ExamplePage.razor @@ -4,7 +4,7 @@
- + @Title
@ChildContent diff --git a/ComponentViewer.Docs/Pages/Components/BeASponsor.razor b/ComponentViewer.Docs/Pages/Components/BeASponsor.razor index 3730790d..ba295d1e 100644 --- a/ComponentViewer.Docs/Pages/Components/BeASponsor.razor +++ b/ComponentViewer.Docs/Pages/Components/BeASponsor.razor @@ -2,7 +2,7 @@ @inject NavigationManager NavigationManager
- + Small donations make MudExtensions better. @@ -12,5 +12,5 @@ MudExtensions
- Turn Back + Turn Back \ No newline at end of file diff --git a/ComponentViewer.Docs/Pages/Examples/ListExtendedExample1.razor b/ComponentViewer.Docs/Pages/Examples/ListExtendedExample1.razor index b05b8867..0d891551 100644 --- a/ComponentViewer.Docs/Pages/Examples/ListExtendedExample1.razor +++ b/ComponentViewer.Docs/Pages/Examples/ListExtendedExample1.razor @@ -18,9 +18,9 @@ Icons with text - - - + + + @@ -29,9 +29,9 @@ Avatar with text - - - + + + diff --git a/ComponentViewer.Docs/Pages/Examples/ListExtendedExample4.razor b/ComponentViewer.Docs/Pages/Examples/ListExtendedExample4.razor index 202f0b70..13aac59d 100644 --- a/ComponentViewer.Docs/Pages/Examples/ListExtendedExample4.razor +++ b/ComponentViewer.Docs/Pages/Examples/ListExtendedExample4.razor @@ -7,11 +7,11 @@ - - + + - - + + diff --git a/ComponentViewer.Docs/Pages/Examples/PageExample3.razor b/ComponentViewer.Docs/Pages/Examples/PageExample3.razor index 62b905a9..0a7f634e 100644 --- a/ComponentViewer.Docs/Pages/Examples/PageExample3.razor +++ b/ComponentViewer.Docs/Pages/Examples/PageExample3.razor @@ -4,7 +4,7 @@ @if (_showAppbar && !_appbarBottom) { - + @@ -15,7 +15,7 @@ @if (_showAppbar && _appbarBottom) { - + diff --git a/ComponentViewer.Docs/Pages/Examples/PopupExample1.razor b/ComponentViewer.Docs/Pages/Examples/PopupExample1.razor index 7668deaf..b2efef4d 100644 --- a/ComponentViewer.Docs/Pages/Examples/PopupExample1.razor +++ b/ComponentViewer.Docs/Pages/Examples/PopupExample1.razor @@ -8,7 +8,7 @@
- +
Follow Us And get the latest news. @@ -41,7 +41,7 @@ else - + diff --git a/ComponentViewer.Docs/Pages/Examples/SelectExtendedExample5.razor b/ComponentViewer.Docs/Pages/Examples/SelectExtendedExample5.razor index 4e3bf563..c42be758 100644 --- a/ComponentViewer.Docs/Pages/Examples/SelectExtendedExample5.razor +++ b/ComponentViewer.Docs/Pages/Examples/SelectExtendedExample5.razor @@ -1,7 +1,7 @@  - + @foreach (var state in states) { diff --git a/ComponentViewer.Docs/Pages/Examples/SpeedDialExample1.razor b/ComponentViewer.Docs/Pages/Examples/SpeedDialExample1.razor index 55ac91d2..73be4069 100644 --- a/ComponentViewer.Docs/Pages/Examples/SpeedDialExample1.razor +++ b/ComponentViewer.Docs/Pages/Examples/SpeedDialExample1.razor @@ -45,7 +45,7 @@ bool _openOnHover = true; bool _openOnClick = true; bool _differentIconOnOpen = true; - string _openIcon = Icons.Filled.Close; + string _openIcon = Icons.Material.Filled.Close; private async Task ButtonClick(string text) { @@ -69,7 +69,7 @@ _differentIconOnOpen = _switch.Checked; if (_differentIconOnOpen == true) { - _openIcon = Icons.Filled.Close; + _openIcon = Icons.Material.Filled.Close; } else { diff --git a/ComponentViewer.Docs/Pages/Examples/StepperExample1.razor b/ComponentViewer.Docs/Pages/Examples/StepperExample1.razor index ed2a1405..d9ead126 100644 --- a/ComponentViewer.Docs/Pages/Examples/StepperExample1.razor +++ b/ComponentViewer.Docs/Pages/Examples/StepperExample1.razor @@ -40,7 +40,7 @@ {
- + Your reservation succesfully completed.
diff --git a/ComponentViewer.Docs/Pages/Examples/SwitchM3Example1.razor b/ComponentViewer.Docs/Pages/Examples/SwitchM3Example1.razor index 3166c131..a20e9cb3 100644 --- a/ComponentViewer.Docs/Pages/Examples/SwitchM3Example1.razor +++ b/ComponentViewer.Docs/Pages/Examples/SwitchM3Example1.razor @@ -18,14 +18,14 @@ None - + Off Icon None - - + +
diff --git a/ComponentViewer.Docs/Pages/Examples/TextFieldExtendedExample1.razor b/ComponentViewer.Docs/Pages/Examples/TextFieldExtendedExample1.razor index bc354b8c..7fe357fc 100644 --- a/ComponentViewer.Docs/Pages/Examples/TextFieldExtendedExample1.razor +++ b/ComponentViewer.Docs/Pages/Examples/TextFieldExtendedExample1.razor @@ -9,7 +9,7 @@ kg - + @@ -18,7 +18,7 @@ kg - + @@ -27,7 +27,7 @@ kg - + } @@ -35,19 +35,19 @@ { - + - + - + } diff --git a/ComponentViewer.Docs/Pages/Index.razor b/ComponentViewer.Docs/Pages/Index.razor index 74de1af4..3eaacb76 100644 --- a/ComponentViewer.Docs/Pages/Index.razor +++ b/ComponentViewer.Docs/Pages/Index.razor @@ -7,7 +7,7 @@ - + @@ -38,7 +38,7 @@
- +
diff --git a/ComponentViewer.Docs/Shared/MainLayout.razor b/ComponentViewer.Docs/Shared/MainLayout.razor index 62f0c360..7268db0f 100644 --- a/ComponentViewer.Docs/Shared/MainLayout.razor +++ b/ComponentViewer.Docs/Shared/MainLayout.razor @@ -9,14 +9,14 @@ - + CodeBeam MudExtensions
- - + + @if (_open == true) {