Skip to content

Commit 262a5c0

Browse files
authored
Merge pull request #544 from emoacht/develop
Develop
2 parents a226d09 + 1c16a7c commit 262a5c0

40 files changed

+280
-64
lines changed

Source/IconImage/DarkAppIcon.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
</UserControl.Resources>
1919

2020
<Grid Background="{x:Null}">
21-
<Rectangle Fill="{StaticResource BackBrush}"/>
21+
<!--<Rectangle Fill="{StaticResource BackBrush}"/>-->
22+
<Rectangle Fill="{StaticResource BackBrush}" RadiusX="20" RadiusY="20"/>
2223

2324
<Grid>
2425
<Border BorderBrush="{StaticResource EdgeBrush}"

Source/IconImage/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("4.5.0.0")]
55-
[assembly: AssemblyFileVersion("4.5.0.0")]
54+
[assembly: AssemblyVersion("4.6.0.0")]
55+
[assembly: AssemblyFileVersion("4.6.0.0")]

Source/Installer/Product.wxs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3-
<Product Id="*" Name="Monitorian" Manufacturer="emoacht" Version="4.5.1"
3+
<Product Id="*" Name="Monitorian" Manufacturer="emoacht" Version="4.6.0"
44
Language="1033" Codepage="1252" UpgradeCode="{81A4D148-75D3-462E-938D-8C208FB48E3C}">
55
<Package Id="*" InstallerVersion="500" Compressed="yes"
66
InstallScope="perMachine" InstallPrivileges="elevated"
@@ -101,6 +101,12 @@
101101
<File Id="CoreResourcesLibrary_de" Name="$(var.Monitorian.TargetName).Core.resources.dll" KeyPath="yes"/>
102102
</Component>
103103
</Directory>
104+
<Directory Id="ResourcesFolder_elGR" Name="el-GR"
105+
FileSource="$(var.Monitorian.TargetDir)el-GR">
106+
<Component Id="CoreResourcesLibrary_elGR" Guid="{D8FA6F67-57B7-45AA-8C81-C323A50787DE}">
107+
<File Id="CoreResourcesLibrary_elGR" Name="$(var.Monitorian.TargetName).Core.resources.dll" KeyPath="yes"/>
108+
</Component>
109+
</Directory>
104110
<Directory Id="ResourcesFolder_es" Name="es"
105111
FileSource="$(var.Monitorian.TargetDir)es">
106112
<Component Id="CoreResourcesLibrary_es" Guid="{4329EAB1-6FC9-41F4-8A6E-77FA6C67B15C}">
@@ -224,6 +230,7 @@
224230
<ComponentRef Id="CoreResourcesLibrary_ar"/>
225231
<ComponentRef Id="CoreResourcesLibrary_ca"/>
226232
<ComponentRef Id="CoreResourcesLibrary_de"/>
233+
<ComponentRef Id="CoreResourcesLibrary_elGR"/>
227234
<ComponentRef Id="CoreResourcesLibrary_es"/>
228235
<ComponentRef Id="CoreResourcesLibrary_fr"/>
229236
<ComponentRef Id="CoreResourcesLibrary_it"/>

Source/Monitorian.Core/AppControllerCore.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ protected virtual void Update(string instanceName, int brightness)
449449
protected virtual async Task UpdateMessageAsync(string deviceInstanceId, string message)
450450
{
451451
var monitor = Monitors.FirstOrDefault(x => string.Equals(x.DeviceInstanceId, deviceInstanceId, StringComparison.OrdinalIgnoreCase));
452-
System.Diagnostics.Debug.WriteLine(message);
453452
if (monitor is not null)
454453
{
455454
await monitor.ShowNormalMessageAsync(message, TimeSpan.FromSeconds(30));

Source/Monitorian.Core/AppKeeper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public AppKeeper()
2121
StartupAgent = new StartupAgent();
2222
}
2323

24-
public Task<bool> StartAsync(StartupEventArgs e) => StartAsync(e, Enumerable.Empty<string>());
24+
public Task<bool> StartAsync(StartupEventArgs e) => StartAsync(e, []);
2525

2626
public async Task<bool> StartAsync(StartupEventArgs e, IEnumerable<string> additionalOptions)
2727
{
@@ -60,10 +60,10 @@ public void Write(string content)
6060

6161
#region Arguments
6262

63-
public static IReadOnlyList<string> StandardArguments => _standardArguments?.ToArray() ?? Array.Empty<string>();
63+
public static IReadOnlyList<string> StandardArguments => _standardArguments?.ToArray() ?? [];
6464
private static string[] _standardArguments;
6565

66-
public static IReadOnlyList<string> OtherArguments => _otherArguments?.ToArray() ?? Array.Empty<string>();
66+
public static IReadOnlyList<string> OtherArguments => _otherArguments?.ToArray() ?? [];
6767
private static string[] _otherArguments;
6868

6969
public static IEnumerable<string> EnumerateStandardOptions() =>
@@ -79,7 +79,7 @@ public static IEnumerable<string> EnumerateStandardOptions() =>
7979
private async Task ParseArgumentsAsync(StartupEventArgs e, string[] standardOptions)
8080
{
8181
// Load persistent arguments.
82-
var args = (await LoadArgumentsAsync())?.Split() ?? Array.Empty<string>();
82+
var args = (await LoadArgumentsAsync())?.Split() ?? [];
8383

8484
// Concatenate current and persistent arguments.
8585
// The first element of StartupEventArgs.Args is not executing assembly's path unlike

Source/Monitorian.Core/Helper/ExceptionExtension.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static string ToDetailedString(this Exception ex)
2222
{
2323
innerExceptions = (ex.InnerException is not null)
2424
? new Exception[] { ex.InnerException }
25-
: Array.Empty<Exception>();
25+
: [];
2626

2727
foreach (var property in EnumerateAddedProperties(ex))
2828
{
@@ -61,12 +61,12 @@ private static IEnumerable<PropertyInfo> EnumerateAddedProperties(Exception ex)
6161

6262
private static string GetEnvironmentString(string key)
6363
{
64-
var method = typeof(Environment).GetMethod("GetResourceString", BindingFlags.NonPublic | BindingFlags.Static, null, new Type[] { typeof(string) }, null);
64+
var method = typeof(Environment).GetMethod("GetResourceString", BindingFlags.NonPublic | BindingFlags.Static, null, [typeof(string)], null);
6565

6666
string buffer = null;
6767
try
6868
{
69-
buffer = method?.Invoke(null, new object[] { key }) as string;
69+
buffer = method?.Invoke(null, [key]) as string;
7070
}
7171
catch
7272
{

Source/Monitorian.Core/Helper/OsVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ internal static class OsVersion
5151

5252
#region Cache
5353

54-
private static readonly Dictionary<string, bool> _cache = new();
54+
private static readonly Dictionary<string, bool> _cache = [];
5555
private static readonly object _lock = new();
5656

5757
private static bool IsEqualToOrGreaterThan(in int major, in int minor = 0, in int build = 0, [CallerMemberName] string propertyName = null)

Source/Monitorian.Core/Helper/SimpleSerialization.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ public static string ConvertCollectionValue(string value) =>
6666
IsPrettified ? Indent + ConvertValue(value) : value;
6767
}
6868

69-
public class StringWrapper
69+
public class StringWrapper(string value)
7070
{
71-
private readonly string _value;
72-
73-
public StringWrapper(string value) => this._value = value;
71+
private readonly string _value = value;
7472

7573
public override string ToString() => _value;
7674
}

Source/Monitorian.Core/Helper/Throttle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class Throttle<T>
7171
{
7272
protected readonly SemaphoreSlim _semaphore = new(1, 1);
7373
protected readonly DispatcherTimer _timer;
74-
protected readonly Queue<T> _queue = new();
74+
protected readonly Queue<T> _queue = [];
7575
protected readonly Action<T[]> _action;
7676

7777
public Throttle(TimeSpan dueTime, Action<T[]> action)

Source/Monitorian.Core/Models/DocumentService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static string BuildHtml(string fileName, string title, string body)
3737
title = Path.GetFileNameWithoutExtension(fileName);
3838

3939
body = body?
40-
.Split(new[] { "\r\n\r\n", "\n\n" /* two consecutive line breaks */ }, StringSplitOptions.RemoveEmptyEntries)
40+
.Split(["\r\n\r\n", "\n\n" /* two consecutive line breaks */ ], StringSplitOptions.RemoveEmptyEntries)
4141
.Select(x =>
4242
{
4343
var array = x.Split(Array.Empty<char>(), 2, StringSplitOptions.RemoveEmptyEntries);

0 commit comments

Comments
 (0)