W10 Toasts

This commit is contained in:
Patrick Fic
2020-01-31 09:23:06 -08:00
parent 8cdb41f59b
commit 5fce4904df
5 changed files with 180 additions and 38 deletions

View File

@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '15.0'">
<VisualStudioVersion>15.0</VisualStudioVersion>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
</PropertyGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
<PropertyGroup>
<ProjectGuid>960a536e-23ad-482f-ab18-a96479809cff</ProjectGuid>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<EntryPointProjectUniqueName>..\BodyshopUploader\BodyshopUploader.csproj</EntryPointProjectUniqueName>
<GenerateAppInstallerFile>True</GenerateAppInstallerFile>
<PackageCertificateThumbprint>286119922DB88EA69297C34AE636B20CBC242ACF</PackageCertificateThumbprint>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundlePlatforms>neutral</AppxBundlePlatforms>
<AppInstallerUri>https://bodyshop.snapt.ca</AppInstallerUri>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Images\SplashScreen.scale-200.png" />
<Content Include="Images\LockScreenLogo.scale-200.png" />
<Content Include="Images\Square150x150Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Images\StoreLogo.png" />
<Content Include="Images\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BodyshopUploader\BodyshopUploader.csproj" />
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
</Project>

View File

@@ -5,16 +5,72 @@ VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BodyshopUploader", "BodyshopUploader\BodyshopUploader.csproj", "{76B98E9B-A33A-464F-A07B-56E773376543}"
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "BodyshopUploader.App", "BodyshopUploader.App\BodyshopUploader.App.wapproj", "{960A536E-23AD-482F-AB18-A96479809CFF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|ARM.ActiveCfg = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|ARM.Build.0 = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|ARM64.Build.0 = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|x64.ActiveCfg = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|x64.Build.0 = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|x86.ActiveCfg = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|x86.Build.0 = Debug|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|Any CPU.Build.0 = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|ARM.ActiveCfg = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|ARM.Build.0 = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|ARM64.ActiveCfg = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|ARM64.Build.0 = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|x64.ActiveCfg = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|x64.Build.0 = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|x86.ActiveCfg = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|x86.Build.0 = Release|Any CPU
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|ARM.ActiveCfg = Debug|ARM
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|ARM.Build.0 = Debug|ARM
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|ARM.Deploy.0 = Debug|ARM
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|ARM64.ActiveCfg = Debug|ARM64
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|ARM64.Build.0 = Debug|ARM64
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|ARM64.Deploy.0 = Debug|ARM64
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|x64.ActiveCfg = Debug|x64
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|x64.Build.0 = Debug|x64
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|x64.Deploy.0 = Debug|x64
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|x86.ActiveCfg = Debug|x86
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|x86.Build.0 = Debug|x86
{960A536E-23AD-482F-AB18-A96479809CFF}.Debug|x86.Deploy.0 = Debug|x86
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|Any CPU.Build.0 = Release|Any CPU
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|Any CPU.Deploy.0 = Release|Any CPU
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|ARM.ActiveCfg = Release|ARM
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|ARM.Build.0 = Release|ARM
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|ARM.Deploy.0 = Release|ARM
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|ARM64.ActiveCfg = Release|ARM64
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|ARM64.Build.0 = Release|ARM64
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|ARM64.Deploy.0 = Release|ARM64
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|x64.ActiveCfg = Release|x64
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|x64.Build.0 = Release|x64
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|x64.Deploy.0 = Release|x64
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|x86.ActiveCfg = Release|x86
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|x86.Build.0 = Release|x86
{960A536E-23AD-482F-AB18-A96479809CFF}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -10,6 +10,7 @@
<RootNamespace>BodyshopUploader</RootNamespace>
<AssemblyName>BodyshopUploader</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
@@ -276,6 +277,8 @@
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="Windows.Data" />
<Reference Include="Windows.UI" />
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
@@ -317,6 +320,7 @@
<Compile Include="Utils\JsonConverter.cs" />
<Compile Include="Utils\JsonExtensions.cs" />
<Compile Include="Utils\LoginHelpers.cs" />
<Compile Include="Utils\NotificationService.cs" />
<Compile Include="Utils\Queries\VehicleQueries.cs" />
<Compile Include="Utils\RelayCommand.cs" />
<Compile Include="Utils\TrayIcon.cs" />

View File

@@ -214,45 +214,8 @@ namespace BodyshopUploader.ViewModels
public async Task TestGql()
{
//Notification _n = new Notification()
//{
// Id = 123,
// Title = "This is a title",
// Subtitle = "Subtitle",
// Message = "Somethin"
//};
//Growler.AddNotification(_n);
notificationService.ShowNotification("abc", 123.45);
var r = new GraphQLRequest
{
Query = @"query MyQuery($key: String!) {
masterdata(where: {key: {_eq: $key}}) {
value
key
}
}",
Variables = new
{
key = Utils.AppMetaData.ShopRegion + "_ciecaopcodes"
}
};
var data = await Utils.GraphQL.ExecuteQuery(r);
//var t = Newtonsoft.Json.JsonConvert.DeserializeObject<List<dynamic>>(data.masterdata[0].value.Value);
Utils.AppMetaData.CiecaOpCodes = JObject.Parse(data.masterdata[0].value.Value);
try
{
var aa = Utils.AppMetaData.CiecaOpCodes.Property("OP1").Children();
var cc = Utils.AppMetaData.CiecaOpCodes["OP1"]["desc"].Value;
var ab = Utils.AppMetaData.CiecaOpCodes.Property("OP1.desc");
}
catch (Exception EX)
{
logger.Warn("Err");
}
}
}
}

View File

@@ -6,6 +6,7 @@ using System.Text;
using System.Threading.Tasks;
using BodyshopUploader.Utils.Growls;
using BodyshopUploader.Models;
using BodyshopUploader.Utils;
namespace BodyshopUploader.ViewModels
{
@@ -13,6 +14,8 @@ namespace BodyshopUploader.ViewModels
{
public GrowlNotification Growler;
private System.Timers.Timer _updateCheckTimer = new System.Timers.Timer(60 * 1000);
NotificationService notificationService = new NotificationService();
private ObservableCollection<Monitor> _monitoringPaths = new ObservableCollection<Monitor>();
public ObservableCollection<Monitor> MonitoringPaths