Skip to content

Commit

Permalink
Update to taking care of modifications by Screenly OSE. Some changes …
Browse files Browse the repository at this point in the history
…on API types.
  • Loading branch information
Jérémy Filhoulaud committed Dec 27, 2018
1 parent 97c3b56 commit 41ec0d9
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 29 deletions.
6 changes: 4 additions & 2 deletions AddOrChangeAssetPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ private async void ButtonSubmit_Click(object sender, RoutedEventArgs e)
a.StartDate = (this.DatePickerStart.Date.Date + this.TimePickerStart.Time).ToUniversalTime();
a.EndDate = (this.DatePickerEnd.Date.Date + this.TimePickerEnd.Time).ToUniversalTime();
a.Duration = this.TextBoxDuration.Text;
a.IsEnabled = this.ToggleSwitchEnable.IsOn ? "1" : "0";
a.NoCache = this.ToggleSwitchDisableCache.IsOn ? "1" : "0";
a.IsEnabled = this.ToggleSwitchEnable.IsOn ? 1 : 0;
a.NoCache = this.ToggleSwitchDisableCache.IsOn ? 1 : 0;
a.Mimetype = this.ComboBoxAssetType.SelectedValue as string;
a.SkipAssetCheck = 1;
a.IsProcessing = 0;

var dialog = new MessageDialog(this.Loader.GetString("ConfirmationAddAsset"));

Expand Down
14 changes: 10 additions & 4 deletions Asset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,28 @@ public class Asset
public DateTime EndDate { get; set; }

[Newtonsoft.Json.JsonProperty(PropertyName = "is_enabled")]
public string IsEnabled { get; set; }
public Int32 IsEnabled { get; set; }

[Newtonsoft.Json.JsonProperty(PropertyName = "is_processing")]
public Int32? IsProcessing { get; set; }

[Newtonsoft.Json.JsonProperty(PropertyName = "skip_asset_check")]
public Int32 SkipAssetCheck { get; set; }

[Newtonsoft.Json.JsonIgnore]
public bool IsEnabledSwitch
{
get
{
return IsEnabled.Equals("1") ? true : false;
return IsEnabled.Equals(1) ? true : false;
}
}

[Newtonsoft.Json.JsonProperty(PropertyName = "nocache")]
public string NoCache { get; set; }
public Int32 NoCache { get; set; }

[Newtonsoft.Json.JsonProperty(PropertyName = "is_active")]
public Boolean IsActive { get; set; }
public Int32 IsActive { get; set; }

private string _Uri;

Expand Down
4 changes: 2 additions & 2 deletions Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public ObservableCollection<Asset> ActiveAssets
{
get
{
return new ObservableCollection<Asset>(this.Assets.FindAll(x => x.IsActive));
return new ObservableCollection<Asset>(this.Assets.FindAll(x => x.IsActive.Equals(1)));
}
}

Expand All @@ -33,7 +33,7 @@ public ObservableCollection<Asset> InactiveAssets
{
get
{
return new ObservableCollection<Asset>(this.Assets.FindAll(x => !x.IsActive));
return new ObservableCollection<Asset>(this.Assets.FindAll(x => x.IsActive.Equals(0)));
}
}

Expand Down
2 changes: 1 addition & 1 deletion MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private async void ToggleSwitchEnable_Toggled(object sender, Windows.UI.Xaml.Rou
{
currentAsset.StartDate = currentAsset.StartDate.ToUniversalTime();
currentAsset.EndDate = currentAsset.EndDate.ToUniversalTime();
currentAsset.IsEnabled = (sender as ToggleSwitch).IsOn ? "1" : "0";
currentAsset.IsEnabled = (sender as ToggleSwitch).IsOn ? 1 : 0;
await this.CurrentDevice.UpdateAssetAsync(currentAsset);
this.RefreshAssetsForCurrentDeviceAsync();
}
Expand Down
2 changes: 1 addition & 1 deletion Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="bd4d638c-2e98-49e2-be8a-65be3fa9900d" Publisher="CN=j.filhoulaud" Version="1.0.11.0" />
<Identity Name="bd4d638c-2e98-49e2-be8a-65be3fa9900d" Publisher="CN=j.filhoulaud" Version="1.0.14.0" />
<mp:PhoneIdentity PhoneProductId="bd4d638c-2e98-49e2-be8a-65be3fa9900d" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>ScreenlyManager</DisplayName>
Expand Down
15 changes: 13 additions & 2 deletions ScreenlyManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>ScreenlyManager</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand All @@ -22,6 +22,10 @@
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
<PackageCertificateThumbprint>0B29CE2394A65C25639F4C5661053DEB3599C892</PackageCertificateThumbprint>
<RuntimeIdentifiers>win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot</RuntimeIdentifiers>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppInstallerUpdateFrequency>1</AppInstallerUpdateFrequency>
<AppInstallerCheckForUpdateFrequency>OnApplicationRun</AppInstallerCheckForUpdateFrequency>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -94,7 +98,6 @@
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
<PRIResource Include="Strings\fr-FR\Resources.resw" />
<PRIResource Include="Strings\en-US\Resources.resw" />
</ItemGroup>
Expand Down Expand Up @@ -192,6 +195,14 @@
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.2.2</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>9.0.1</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
Expand Down
17 changes: 0 additions & 17 deletions project.json

This file was deleted.

0 comments on commit 41ec0d9

Please sign in to comment.