Skip to content
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.

Commit

Permalink
WeCode 2.2 RC3
Browse files Browse the repository at this point in the history
Merge pull request #10 from patrick330602/test
  • Loading branch information
patrick330602 authored Jul 22, 2016
2 parents 1003678 + ea336dd commit bebf556
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Developer Hub For UWP/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected override void OnActivated(IActivatedEventArgs args)
switch(arg[1])
{
case "disableNoti":
_localSettings.Containers["Settings"].Values["IsUpdatePopupIgnored"] = true;
_localSettings.Containers["Settings"].Values["IsUpdatePopupDisabled"] = true;
break;
}
// Navigate accordingly
Expand Down
6 changes: 3 additions & 3 deletions Developer Hub For UWP/Pages/Browser.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
</Grid>
<Grid Margin="20,20,0,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="150"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>

</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
Expand Down
1 change: 1 addition & 0 deletions Developer Hub For UWP/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public SettingsPage()

bool PopupDisabled = Convert.ToBoolean(_localSettings.Containers["Settings"].Values["IsUpdatePopupDisabled"]);
txt.IsOn = PopupDisabled;
txt.Header = loader.GetString("IsUpdatePopupDisabled");
txt.OnContent = loader.GetString("on");
txt.OffContent = loader.GetString("off");
}
Expand Down
12 changes: 5 additions & 7 deletions Developer Hub For UWP/Shell.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,30 @@ public Shell()
// select the first top item
vm.SelectedItem = vm.TopItems.First();
this.ViewModel = vm;

//if new download
if (!_localSettings.Containers.ContainsKey("Settings"))
{
ApplicationDataContainer container = _localSettings.CreateContainer("Settings", ApplicationDataCreateDisposition.Always);
_localSettings.Containers["Settings"].Values["IsUpdatePopupIgnored"] = false;
_localSettings.Containers["Settings"].Values["IsUpdatePopupDisabled"] = false;
_localSettings.Containers["Settings"].Values["IsFonticonExtraFileDownloaded"] = false;
_localSettings.Containers["Settings"].Values["Version"] = "020200";

DelLegacyHistory();
TransferToStorage();
}
//if update
else if(_localSettings.Containers["Settings"].Values["Version"] != "020200")
{
_localSettings.Containers["Settings"].Values["Version"] = "020200";
_localSettings.Containers["Settings"].Values["IsUpdatePopupIgnored"] = false;
_localSettings.Containers["Settings"].Values["IsUpdatePopupDisabled"] = false;
}
// whether the internet is connected.
var conetvty = NetworkInformation.GetInternetConnectionProfile().GetNetworkConnectivityLevel();
bool PopIgnored = Convert.ToBoolean(_localSettings.Containers["Settings"].Values["IsUpdatePopupIgnored"]);
bool PopupDisabled = Convert.ToBoolean(_localSettings.Containers["Settings"].Values["IsUpdatePopupDisabled"]);
if (conetvty == NetworkConnectivityLevel.InternetAccess)
{
if (!PopupDisabled)
{
if(!PopIgnored) CheckUpdate();
}
if (!PopupDisabled) CheckUpdate();
UpdateInsidetenApi();
}

Expand Down
3 changes: 3 additions & 0 deletions Developer Hub For UWP/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,7 @@
<data name="on" xml:space="preserve">
<value>On</value>
</data>
<data name="IsUpdatePopupDisabled" xml:space="preserve">
<value>Do not Prompt Update Notification</value>
</data>
</root>
3 changes: 3 additions & 0 deletions Developer Hub For UWP/Strings/zh-Hans/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,7 @@
<data name="on" xml:space="preserve">
<value>启用</value>
</data>
<data name="IsUpdatePopupDisabled" xml:space="preserve">
<value>不再彈出更新提示</value>
</data>
</root>
3 changes: 3 additions & 0 deletions Developer Hub For UWP/Strings/zh-Hant/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -451,4 +451,7 @@ Fuzzy</comment>
<data name="on" xml:space="preserve">
<value>開啟</value>
</data>
<data name="IsUpdatePopupDisabled" xml:space="preserve">
<value>不再弹出更新提示提醒</value>
</data>
</root>

0 comments on commit bebf556

Please sign in to comment.