-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Program plugin fully on stylecop (#5964)
- Loading branch information
Showing
31 changed files
with
361 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/modules/launcher/Plugins/Microsoft.Plugin.Program/DisabledProgramSource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright (c) Microsoft Corporation | ||
// The Microsoft Corporation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
namespace Microsoft.Plugin.Program | ||
{ | ||
public class DisabledProgramSource : ProgramSource | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/modules/launcher/Plugins/Microsoft.Plugin.Program/ProgramSource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) Microsoft Corporation | ||
// The Microsoft Corporation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.IO; | ||
|
||
namespace Microsoft.Plugin.Program | ||
{ | ||
/// <summary> | ||
/// Contains user added folder location contents as well as all user disabled applications | ||
/// </summary> | ||
/// <remarks> | ||
/// <para>Win32 class applications set UniqueIdentifier using their full file path</para> | ||
/// <para>UWP class applications set UniqueIdentifier using their Application User Model ID</para> | ||
/// <para>Custom user added program sources set UniqueIdentifier using their location</para> | ||
/// </remarks> | ||
public class ProgramSource | ||
{ | ||
private string name; | ||
|
||
public string Location { get; set; } | ||
|
||
public string Name { get => name ?? new DirectoryInfo(Location).Name; set => name = value; } | ||
|
||
public bool Enabled { get; set; } = true; | ||
|
||
public string UniqueIdentifier { get; set; } | ||
} | ||
} |
35 changes: 6 additions & 29 deletions
35
...m/Programs/ApplicationActivationHelper.cs → .../Programs/ApplicationActivationManager.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/AppxFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) Microsoft Corporation | ||
// The Microsoft Corporation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Microsoft.Plugin.Program.Programs | ||
{ | ||
// Reference : https://stackoverflow.com/questions/32122679/getting-icon-of-modern-windows-app-from-a-desktop-application | ||
[Guid("5842a140-ff9f-4166-8f5c-62f5b7b0c781")] | ||
[ComImport] | ||
public class AppxFactory | ||
{ | ||
} | ||
} |
Oops, something went wrong.