-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also don't run update service under UWP mode.
- Loading branch information
1 parent
8d08e82
commit 11dad1c
Showing
18 changed files
with
135 additions
and
47 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
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Licensed to Spectre Systems AB under one or more agreements. | ||
// Spectre Systems AB licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
// --------------------------------------------------------------------- | ||
// Copyright (c) 2015 Matteo Pagani, licensed under MIT | ||
// https://github.com/qmatteoq/DesktopBridgeHelpers | ||
// --------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
|
||
namespace Jarvis.Infrastructure.Utilities | ||
{ | ||
public static class UwpUtility | ||
{ | ||
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | ||
public static extern int GetCurrentPackageFullName(ref int packageFullNameLength, StringBuilder packageFullName); | ||
|
||
public static bool IsRunningAsUwp() | ||
{ | ||
if (IsWindows7OrLower) | ||
{ | ||
return false; | ||
} | ||
else | ||
{ | ||
int length = 0; | ||
var builder = new StringBuilder(0); | ||
int result = GetCurrentPackageFullName(ref length, builder); | ||
|
||
builder = new StringBuilder(length); | ||
result = GetCurrentPackageFullName(ref length, builder); | ||
|
||
return result != 15700L; | ||
} | ||
} | ||
|
||
private static bool IsWindows7OrLower | ||
{ | ||
get | ||
{ | ||
int versionMajor = Environment.OSVersion.Version.Major; | ||
int versionMinor = Environment.OSVersion.Version.Minor; | ||
double version = versionMajor + ((double)versionMinor / 10); | ||
return version <= 6.1; | ||
} | ||
} | ||
} | ||
} |
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
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
2 changes: 1 addition & 1 deletion
2
...s/Views/Settings/GeneralSettingsView.xaml → ...is/Views/Settings/UpdateSettingsView.xaml
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