mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Code cleanup
This commit is contained in:
1 parent
0c245ba83d
commit
ae330c3769
73 files changed
+372
-364
No files matched your search
@@ -1,22 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Artemis.UI.Screens.Sidebar
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SidebarView.xaml
|
||||
/// Interaction logic for SidebarView.xaml
|
||||
/// </summary>
|
||||
public partial class SidebarView : UserControl
|
||||
{
|
||||
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Sidebar
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Artemis.Core.Events;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
@@ -85,10 +86,10 @@ namespace Artemis.UI.Screens.Sidebar
|
||||
return;
|
||||
|
||||
// Icon is provided as string to avoid having to reference MaterialDesignThemes
|
||||
var parsedIcon = System.Enum.TryParse<PackIconKind>(module.DisplayIcon, true, out var iconEnum);
|
||||
var parsedIcon = Enum.TryParse<PackIconKind>(module.DisplayIcon, true, out var iconEnum);
|
||||
if (parsedIcon == false)
|
||||
iconEnum = PackIconKind.QuestionMarkCircle;
|
||||
var sidebarItem = new FirstLevelNavigationItem { Icon = iconEnum, Label = module.DisplayName };
|
||||
var sidebarItem = new FirstLevelNavigationItem {Icon = iconEnum, Label = module.DisplayName};
|
||||
SidebarItems.Add(sidebarItem);
|
||||
SidebarItemObjects.Add(sidebarItem, module);
|
||||
}
|
||||
@@ -117,7 +118,7 @@ namespace Artemis.UI.Screens.Sidebar
|
||||
if (e.PluginInfo.Instance is Core.Plugins.Abstract.Module module)
|
||||
RemoveModule(module);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user