Development 110218-1
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
using FoxTube.Controls;
|
||||||
|
using Windows.UI.Xaml;
|
||||||
|
|
||||||
|
namespace FoxTube.Classes
|
||||||
|
{
|
||||||
|
public class AdSizeTrigger : StateTriggerBase
|
||||||
|
{
|
||||||
|
private Advert _class;
|
||||||
|
|
||||||
|
public Advert Class
|
||||||
|
{
|
||||||
|
get { return _class; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_class = value;
|
||||||
|
SetActive(!_class.OverrideSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -282,7 +282,8 @@ namespace FoxTube
|
|||||||
if(!purchased)
|
if(!purchased)
|
||||||
{
|
{
|
||||||
AdsDisabled = false;
|
AdsDisabled = false;
|
||||||
NotPurchased.Invoke();
|
if(NotPurchased != null)
|
||||||
|
NotPurchased.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
xmlns:ad="using:Microsoft.Advertising.WinRT.UI"
|
xmlns:ad="using:Microsoft.Advertising.WinRT.UI"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d"
|
||||||
|
xmlns:classes="using:FoxTube.Classes">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
<VisualState>
|
<VisualState>
|
||||||
<VisualState.StateTriggers>
|
<VisualState.StateTriggers>
|
||||||
<AdaptiveTrigger MinWindowWidth="320"/>
|
<AdaptiveTrigger MinWindowWidth="320"/>
|
||||||
|
<classes:AdSizeTrigger Class="{x:Bind Instance}"/>
|
||||||
</VisualState.StateTriggers>
|
</VisualState.StateTriggers>
|
||||||
|
|
||||||
<VisualState.Setters>
|
<VisualState.Setters>
|
||||||
@@ -20,10 +22,10 @@
|
|||||||
<Setter Target="ad.Height" Value="50"/>
|
<Setter Target="ad.Height" Value="50"/>
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState>
|
<VisualState>
|
||||||
<VisualState.StateTriggers>
|
<VisualState.StateTriggers>
|
||||||
<AdaptiveTrigger MinWindowWidth="640"/>
|
<AdaptiveTrigger MinWindowWidth="640"/>
|
||||||
|
<classes:AdSizeTrigger Class="{x:Bind Instance}"/>
|
||||||
</VisualState.StateTriggers>
|
</VisualState.StateTriggers>
|
||||||
|
|
||||||
<VisualState.Setters>
|
<VisualState.Setters>
|
||||||
@@ -31,10 +33,10 @@
|
|||||||
<Setter Target="ad.Height" Value="100"/>
|
<Setter Target="ad.Height" Value="100"/>
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
|
||||||
<VisualState>
|
<VisualState>
|
||||||
<VisualState.StateTriggers>
|
<VisualState.StateTriggers>
|
||||||
<AdaptiveTrigger MinWindowWidth="728"/>
|
<AdaptiveTrigger MinWindowWidth="728"/>
|
||||||
|
<classes:AdSizeTrigger Class="{x:Bind Instance}"/>
|
||||||
</VisualState.StateTriggers>
|
</VisualState.StateTriggers>
|
||||||
|
|
||||||
<VisualState.Setters>
|
<VisualState.Setters>
|
||||||
@@ -44,9 +46,14 @@
|
|||||||
</VisualState>
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
</VisualStateManager.VisualStateGroups>
|
</VisualStateManager.VisualStateGroups>
|
||||||
<ad:AdControl Name="ad" ApplicationId="{x:Bind AppId}"
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ad:AdControl VerticalAlignment="Top"
|
||||||
|
Name="ad" ApplicationId="{x:Bind AppId}"
|
||||||
AdUnitId="{x:Bind AdUnitId}"
|
AdUnitId="{x:Bind AdUnitId}"
|
||||||
Height="50"
|
Height="{x:Bind Height}"
|
||||||
Width="300"/>
|
Width="{x:Bind Width}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices.WindowsRuntime;
|
using System.Runtime.InteropServices.WindowsRuntime;
|
||||||
@@ -21,6 +22,12 @@ namespace FoxTube.Controls
|
|||||||
{
|
{
|
||||||
public string AdUnitId { get; set; } = "test";
|
public string AdUnitId { get; set; } = "test";
|
||||||
public string AppId => "3f83fe91-d6be-434d-a0ae-7351c5a997f1";
|
public string AppId => "3f83fe91-d6be-434d-a0ae-7351c5a997f1";
|
||||||
|
public bool OverrideSize { get; set; } = false;
|
||||||
|
public Advert Instance => this;
|
||||||
|
|
||||||
|
public int Height { get; set; } = 50;
|
||||||
|
public int Width { get; set; } = 300;
|
||||||
|
|
||||||
public Advert()
|
public Advert()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
this.InitializeComponent();
|
||||||
|
|||||||
@@ -96,6 +96,7 @@
|
|||||||
<Compile Include="App.xaml.cs">
|
<Compile Include="App.xaml.cs">
|
||||||
<DependentUpon>App.xaml</DependentUpon>
|
<DependentUpon>App.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Classes\AdSizeTrigger.cs" />
|
||||||
<Compile Include="Classes\Caption.cs" />
|
<Compile Include="Classes\Caption.cs" />
|
||||||
<Compile Include="Classes\DownloadItemContainer.cs" />
|
<Compile Include="Classes\DownloadItemContainer.cs" />
|
||||||
<Compile Include="Classes\InboxItem.cs" />
|
<Compile Include="Classes\InboxItem.cs" />
|
||||||
@@ -432,7 +433,7 @@
|
|||||||
<Version>4.3.2</Version>
|
<Version>4.3.2</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="YoutubeExplode">
|
<PackageReference Include="YoutubeExplode">
|
||||||
<Version>4.4.0</Version>
|
<Version>4.5.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="YoutubeExtractor">
|
<PackageReference Include="YoutubeExtractor">
|
||||||
<Version>0.10.11</Version>
|
<Version>0.10.11</Version>
|
||||||
|
|||||||
@@ -93,7 +93,9 @@ namespace FoxTube
|
|||||||
|
|
||||||
SecretsVault.AuthorizationStateChanged += Vault_AuthorizationStateChanged;
|
SecretsVault.AuthorizationStateChanged += Vault_AuthorizationStateChanged;
|
||||||
SecretsVault.SubscriptionsChanged += SecretsVault_SubscriptionsChanged;
|
SecretsVault.SubscriptionsChanged += SecretsVault_SubscriptionsChanged;
|
||||||
|
SecretsVault.NotPurchased += () => removeAds.Visibility = Visibility.Visible;
|
||||||
SecretsVault.CheckAuthorization();
|
SecretsVault.CheckAuthorization();
|
||||||
|
SecretsVault.CheckAddons();
|
||||||
SetTitleBar();
|
SetTitleBar();
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user