Skip to content

Commit ad7890b

Browse files
committed
Reorganise files
1 parent aa85896 commit ad7890b

File tree

8 files changed

+20
-9
lines changed

8 files changed

+20
-9
lines changed

Flow.Launcher.Plugin.OneNote/IconGeneratorInfo.cs renamed to Flow.Launcher.Plugin.OneNote/Icons/IconGeneratorInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Drawing;
22
using Odotocodot.OneNote.Linq;
33

4-
namespace Flow.Launcher.Plugin.OneNote
4+
namespace Flow.Launcher.Plugin.OneNote.Icons
55
{
66
public record struct IconGeneratorInfo
77
{

Flow.Launcher.Plugin.OneNote/IconProvider.cs renamed to Flow.Launcher.Plugin.OneNote/Icons/IconProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using Flow.Launcher.Plugin.OneNote.UI;
1010
using Color = System.Drawing.Color;
1111

12-
namespace Flow.Launcher.Plugin.OneNote
12+
namespace Flow.Launcher.Plugin.OneNote.Icons
1313
{
1414
public class IconProvider : BaseModel, IDisposable
1515
{

Flow.Launcher.Plugin.OneNote/IconTheme.cs renamed to Flow.Launcher.Plugin.OneNote/Icons/IconTheme.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
using System;
12
using Flow.Launcher.Plugin.OneNote.UI;
23

3-
namespace Flow.Launcher.Plugin.OneNote
4+
namespace Flow.Launcher.Plugin.OneNote.Icons
45
{
56
public enum IconTheme
67
{
@@ -18,6 +19,7 @@ public static IconTheme ToIconTheme(this WindowsThemeWatcher.WindowsTheme theme)
1819
{
1920
WindowsThemeWatcher.WindowsTheme.Light => IconTheme.Dark,
2021
WindowsThemeWatcher.WindowsTheme.Dark => IconTheme.Light,
22+
_ => throw new ArgumentOutOfRangeException(nameof(theme))
2123
};
2224
}
2325
}

Flow.Launcher.Plugin.OneNote/UI/WindowsThemeWatcher.cs renamed to Flow.Launcher.Plugin.OneNote/Icons/WindowsThemeWatcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using System;
22
using System.Globalization;
3+
using System.Management;
34
using System.Security.Principal;
45
using Microsoft.Win32;
5-
using System.Management;
66

7-
namespace Flow.Launcher.Plugin.OneNote.UI
7+
namespace Flow.Launcher.Plugin.OneNote.Icons
88
{
99
// https://stackoverflow.com/questions/59366391/is-there-any-way-to-make-a-wpf-app-respect-the-system-choice-of-dark-light-theme
1010
public class WindowsThemeWatcher : IDisposable

Flow.Launcher.Plugin.OneNote/Main.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
using System.Collections.Generic;
33
using System.Threading;
44
using System.Threading.Tasks;
5+
using System.Windows.Controls;
6+
using Flow.Launcher.Plugin.OneNote.Icons;
7+
using Flow.Launcher.Plugin.OneNote.UI.ViewModels;
8+
using Flow.Launcher.Plugin.OneNote.UI.Views;
59
using Odotocodot.OneNote.Linq;
610
namespace Flow.Launcher.Plugin.OneNote
711
{
@@ -61,9 +65,9 @@ public List<Result> LoadContextMenus(Result selectedResult)
6165
return resultCreator.ContextMenu(selectedResult);
6266
}
6367

64-
public System.Windows.Controls.Control CreateSettingPanel()
68+
public Control CreateSettingPanel()
6569
{
66-
return new UI.Views.SettingsView(new UI.ViewModels.SettingsViewModel(context, settings, iconProvider));
70+
return new SettingsView(new SettingsViewModel(context, settings, iconProvider));
6771
}
6872

6973
public void Dispose()

Flow.Launcher.Plugin.OneNote/ResultCreator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4+
using Flow.Launcher.Plugin.OneNote.Icons;
45
using Odotocodot.OneNote.Linq;
56

67
namespace Flow.Launcher.Plugin.OneNote
@@ -442,7 +443,8 @@ public List<Result> SearchingByTitle()
442443
{
443444
return SingleResult($"Now searching by title.", null, iconProvider.Search);
444445
}
445-
public static List<Result> SingleResult(string title, string subTitle, string iconPath)
446+
447+
private static List<Result> SingleResult(string title, string subTitle, string iconPath)
446448
{
447449
return new List<Result>
448450
{

Flow.Launcher.Plugin.OneNote/Settings.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace Flow.Launcher.Plugin.OneNote
1+
using Flow.Launcher.Plugin.OneNote.Icons;
2+
3+
namespace Flow.Launcher.Plugin.OneNote
24
{
35
public class Settings : UI.Model
46
{

Flow.Launcher.Plugin.OneNote/UI/ViewModels/SettingsViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System;
33
using System.Collections.Generic;
44
using System.Linq;
5+
using Flow.Launcher.Plugin.OneNote.Icons;
56

67
namespace Flow.Launcher.Plugin.OneNote.UI.ViewModels
78
{

0 commit comments

Comments
 (0)