Skip to content

Commit b1d94fd

Browse files
committed
Change point to insert options related to monitor
1 parent 1c39a9e commit b1d94fd

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Source/Monitorian.Core/AppKeeper.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
using Monitorian.Core.Models;
1010
using Monitorian.Core.Models.Monitor;
11-
using Monitorian.Core.Models.Watcher;
1211
using Monitorian.Core.Views;
1312
using StartupAgency;
1413

@@ -74,9 +73,7 @@ public static IEnumerable<string> EnumerateStandardOptions() =>
7473
StartupAgent.Options,
7574
MonitorManager.Options,
7675
LanguageService.Options,
77-
WindowPainter.Options,
78-
BrightnessConnector.Options,
79-
DisplayInformationWatcher.Options
76+
WindowPainter.Options
8077
}
8178
.SelectMany(x => x);
8279

Source/Monitorian.Core/Models/Monitor/MonitorManager.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ public BasicItem(
4343

4444
#endregion
4545

46-
#region Preclusion/Preclearance
46+
#region Options
4747

48-
public static IReadOnlyCollection<string> Options => new[] { PrecludeOption, PreclearOption };
48+
public static IReadOnlyCollection<string> Options => (new[] { PrecludeOption, PreclearOption })
49+
.Concat(BrightnessConnector.Options)
50+
.Concat(DisplayInformationWatcher.Options)
51+
.ToArray();
4952

5053
private const string PrecludeOption = "/preclude";
5154
private const string PreclearOption = "/preclear";

Source/Monitorian.Core/Models/Watcher/BrightnessConnector.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,17 @@ private static string FindFamilyName(string identityName)
104104
return package?.Id.FamilyName;
105105
}
106106

107-
public virtual bool IsEnabled => _isSpecified && _isAvailable && !string.IsNullOrEmpty(_familyName.Value);
108-
private readonly bool _isSpecified;
109-
private bool _isAvailable = true; // default
110-
111107
/// <summary>
112108
/// Options
113109
/// </summary>
114110
public static IReadOnlyCollection<string> Options => new[] { ConnectOption };
115111

116112
private const string ConnectOption = "/connect";
117113

114+
public virtual bool IsEnabled => _isSpecified && _isAvailable && !string.IsNullOrEmpty(_familyName.Value);
115+
private readonly bool _isSpecified;
116+
private bool _isAvailable = true; // default
117+
118118
public BrightnessConnector()
119119
{
120120
_isSpecified = OsVersion.Is10OrGreater &&

0 commit comments

Comments
 (0)