Skip to content

Commit f814de5

Browse files
committed
Add JSON property to determine processes to switch between
1 parent b88a9bd commit f814de5

File tree

13 files changed

+37
-23
lines changed

13 files changed

+37
-23
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ tools/
55
src/.vs/
66
*.suo
77
*.user
8-
*.DotSettings
8+
*.DotSettings
9+
.vs/
10+
src/Eve-O-Mock/.vs/
11+
src/Eve-O-Preview/.vs/

src/Eve-O-Mock/App.config

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
55
</startup>
6-
</configuration>
6+
</configuration>

src/Eve-O-Mock/Eve-O-Mock.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>EveOMock</RootNamespace>
1111
<AssemblyName>ExeFile</AssemblyName>
12-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
1515
<WarningLevel>4</WarningLevel>
16+
<TargetFrameworkProfile />
1617
</PropertyGroup>
1718
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1819
<PlatformTarget>AnyCPU</PlatformTarget>

src/Eve-O-Mock/Properties/Resources.Designer.cs

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Eve-O-Mock/Properties/Settings.Designer.cs

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ public ThumbnailConfiguration()
4747
this.ClientHotkey = new Dictionary<string, string>();
4848
this.DisableThumbnail = new Dictionary<string, bool>();
4949
this.PriorityClients = new List<string>();
50+
this.Processes = new List<string> { "ExeFile", "firefox", "chrome" };
5051

51-
this.MinimizeToTray = false;
52+
this.MinimizeToTray = false;
5253
this.ThumbnailRefreshPeriod = 500;
5354

5455
this.EnableCompatibilityMode = false;
@@ -189,7 +190,10 @@ public bool EnablePerClientThumbnailLayouts
189190
[JsonProperty]
190191
private List<string> PriorityClients { get; set; }
191192

192-
public Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation)
193+
[JsonProperty]
194+
public List<string> Processes { get; set; }
195+
196+
public Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation)
193197
{
194198
Point location;
195199

src/Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ public interface IThumbnailConfiguration
1414
List<string> CycleGroup2BackwardHotkeys { get; set; }
1515
Dictionary<string, int> CycleGroup2ClientsOrder { get; set; }
1616

17-
Dictionary<string, Color> PerClientActiveClientHighlightColor { get; set; }
17+
List<string> Processes { get; set; }
18+
19+
Dictionary<string, Color> PerClientActiveClientHighlightColor { get; set; }
1820

1921
bool MinimizeToTray { get; set; }
2022
int ThumbnailRefreshPeriod { get; set; }

src/Eve-O-Preview/Eve-O-Preview.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>EveOPreview</RootNamespace>
1212
<AssemblyName>EVE-O Preview</AssemblyName>
13-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1414
<NuGetPackageImportStamp>
1515
</NuGetPackageImportStamp>
1616
<TargetFrameworkProfile />

src/Eve-O-Preview/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[assembly: AssemblyCulture("")]
1313
[assembly: ComVisible(false)]
1414
[assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")]
15-
[assembly: AssemblyVersion("6.0.0.3")]
16-
[assembly: AssemblyFileVersion("6.0.0.3")]
15+
[assembly: AssemblyVersion("6.0.0.4")]
16+
[assembly: AssemblyFileVersion("6.0.0.4")]
1717

1818
[assembly: CLSCompliant(false)]

src/Eve-O-Preview/Properties/Resources.Designer.cs

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Eve-O-Preview/Services/Implementation/ProcessMonitor.cs

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
using System;
1+
using EveOPreview.Configuration;
2+
using System;
23
using System.Collections.Generic;
34
using System.Diagnostics;
5+
using System.Linq;
46

57
namespace EveOPreview.Services.Implementation
68
{
@@ -16,8 +18,11 @@ sealed class ProcessMonitor : IProcessMonitor
1618
private IProcessInfo _currentProcessInfo;
1719
#endregion
1820

19-
public ProcessMonitor()
21+
private IThumbnailConfiguration configuration;
22+
23+
public ProcessMonitor(IThumbnailConfiguration configuration)
2024
{
25+
this.configuration = configuration;
2126
this._processCache = new Dictionary<IntPtr, string>(512);
2227

2328
// This field cannot be initialized properly in constructor
@@ -27,8 +32,7 @@ public ProcessMonitor()
2732

2833
private bool IsMonitoredProcess(string processName)
2934
{
30-
// This is a possible extension point
31-
return String.Equals(processName, ProcessMonitor.DEFAULT_PROCESS_NAME, StringComparison.OrdinalIgnoreCase);
35+
return configuration.Processes.Contains(processName, StringComparer.OrdinalIgnoreCase);
3236
}
3337

3438
private IProcessInfo GetCurrentProcessInfo()

src/Eve-O-Preview/View/Implementation/MainForm.Designer.cs

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Eve-O-Preview/app.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

0 commit comments

Comments
 (0)