Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Zharay/KanColleViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyuvn committed May 1, 2014
2 parents fa39c5b + 371e816 commit 5533d18
Show file tree
Hide file tree
Showing 14 changed files with 643 additions and 13 deletions.
11 changes: 11 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
KCV Change Log
========================

v2.6.0 β r461 - 4/30/2014
* Facility repair timing has been fixed up to how they should be: (1) they only show
when lightly damaged and above and (2) they only show if healing 1 HP takes longer than
20 minutes.
* New update button on the start page. Clicking it takes you directly to the latest version
online. Does not show if there is no update.
* Update notifications can now be clicked to take you to the latest version online. Text
has been changed to reflect this.
* Update menu should now automatically have the versions found online without having to
press the button for it.

v2.6.0 β r458 - 4/30/2014
* Lots of back-end changes from Grabacr07. They mainly reimplement what I've done, but
with an emphasis on making fleet updating more streamlined. Things should be faster.
Expand Down
2 changes: 1 addition & 1 deletion Grabacr07.KanColleViewer/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected override void OnStartup(StartupEventArgs e)
WindowsNotification.Notifier.Show(
KanColleViewer.Properties.Resources.Updater_Notification_Title,
string.Format(KanColleViewer.Properties.Resources.Updater_Notification_NewAppVersion, KanColleClient.Current.Updater.GetOnlineVersion(0)),
() => App.ViewModelRoot.Activate());
() => Process.Start(KanColleClient.Current.Updater.GetOnlineVersion(0, true)));
}

if (Settings.Current.EnableUpdateTransOnStart)
Expand Down
2 changes: 1 addition & 1 deletion Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.6.0.458")]
[assembly: AssemblyVersion("2.6.0.461")]
3 changes: 2 additions & 1 deletion Grabacr07.KanColleViewer/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Grabacr07.KanColleViewer/Properties/Resources.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,8 @@
<value>KCV was unable to check for updates!</value>
</data>
<data name="Updater_Notification_NewAppVersion" xml:space="preserve">
<value>New Version of KCV is available! 「v{0}」</value>
<value>New Version of KCV is available! 「v{0}」
Click here to get it.</value>
</data>
<data name="Updater_Notification_Title" xml:space="preserve">
<value>Updater</value>
Expand Down
3 changes: 2 additions & 1 deletion Grabacr07.KanColleViewer/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,8 @@
<value>Translation files have been updated!</value>
</data>
<data name="Updater_Notification_NewAppVersion" xml:space="preserve">
<value>New Version of KCV is available! 「v{0}」</value>
<value>New Version of KCV is available! 「v{0}」
Click here to get it.</value>
</data>
<data name="Updater_Notification_Title" xml:space="preserve">
<value>Updater</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public string RepairToolTip
if (!this.Ship.IsDamaged)
return "OK";

return string.Format(Resources.Ship_RepairDockToolTip, this.Ship.RepairDockTime) + (this.Ship.IsSlightlyDamaged ? "\n" + string.Format(Resources.Ship_RepairFacilityToolTip, this.Ship.RepairFacilityTime) : "");
// Only need to show Facility time when they are not the same time and if the ship is lightly damaged
return string.Format(Resources.Ship_RepairDockToolTip, this.Ship.RepairDockTime) + (this.Ship.IsLightlyDamaged && this.Ship.RepairFacilityTime != this.Ship.RepairDockTime ? "\n" + string.Format(Resources.Ship_RepairFacilityToolTip, this.Ship.RepairFacilityTime) : "");
}
}

Expand Down
2 changes: 2 additions & 0 deletions Grabacr07.KanColleViewer/ViewModels/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,8 @@ public SettingsViewModel()
{
(sender, args) => this.RaisePropertyChanged(args.PropertyName),
});

this.CheckForUpdates();
}


Expand Down
15 changes: 15 additions & 0 deletions Grabacr07.KanColleViewer/ViewModels/StartContentViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Threading.Tasks;
using Grabacr07.KanColleViewer.Models;
using Grabacr07.KanColleWrapper;
using Livet;

namespace Grabacr07.KanColleViewer.ViewModels
Expand Down Expand Up @@ -95,6 +96,15 @@ public string SetRegionCookieButtonContent
}
#endregion

#region IsUpdateAvailable 変更通知プロパティ

public bool IsUpdateAvailable
{
get { return KanColleClient.Current.Updater.IsOnlineVersionGreater(0, App.ProductInfo.Version.ToString()); }
}

#endregion

private StartContentViewModel() { }

public async void DeleteInternetCache()
Expand Down Expand Up @@ -128,5 +138,10 @@ public void SetRegionCookie()
this.SetRegionCookieButtonContent = Properties.Resources.StartContent_SetRegionCookieMessage;
this.CanSetRegionCookie = false;
}

public void GetLatestKCV()
{
Process.Start(KanColleClient.Current.Updater.GetOnlineVersion(0, true));
}
}
}
13 changes: 13 additions & 0 deletions Grabacr07.KanColleViewer/Views/StartContent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:livet="http://schemas.livet-mvvm.net/2011/wpf"
xmlns:metro2="clr-namespace:Grabacr07.Desktop.Metro.Controls;assembly=Desktop.Metro"
xmlns:metro2Converter="clr-namespace:Grabacr07.Desktop.Metro.Converters;assembly=Desktop.Metro"
xmlns:root="clr-namespace:Grabacr07.KanColleViewer"
xmlns:views="clr-namespace:Grabacr07.KanColleViewer.Views"
xmlns:properties="clr-namespace:Grabacr07.KanColleViewer.Properties"
xmlns:controls="clr-namespace:Grabacr07.KanColleViewer.Views.Controls"
xmlns:settings="clr-namespace:Grabacr07.KanColleViewer.Views.Settings"
xmlns:vm="clr-namespace:Grabacr07.KanColleViewer.ViewModels"
xmlns:models="clr-namespace:Grabacr07.KanColleViewer.Models"
xmlns:converters="clr-namespace:Grabacr07.KanColleViewer.Views.Converters"
mc:Ignorable="d"
Width="638"
d:DesignWidth="638"
Expand Down Expand Up @@ -105,6 +107,8 @@
</Trigger>
</Style.Triggers>
</Style>

<metro2Converter:UniversalBooleanToVisibilityConverter x:Key="BooleanToVsibilityConverterKey" />
</ResourceDictionary>
</UserControl.Resources>

Expand Down Expand Up @@ -169,6 +173,15 @@
Foreground="{DynamicResource ActiveForegroundBrushKey}" />
</TextBlock>

<metro2:CallMethodButton Content="{Binding Resources.Settings_Updates_GetKCVBtn, Source={x:Static models:ResourceService.Current}, Mode=OneWay}"
ToolTip="{Binding Resources.Settings_Updates_GetKCVBtn_ToolTip, Source={x:Static models:ResourceService.Current}, Mode=OneWay}"
MethodName="GetLatestKCV"
Visibility="{Binding IsUpdateAvailable, Converter={StaticResource BooleanToVsibilityConverterKey}}"
HorizontalAlignment="Center"
Padding="30,5"
Margin="0,12,0,0"
SnapsToDevicePixels="True" />

<Rectangle Height="1"
Margin="0,12"
Style="{DynamicResource SeparatorRectangleStyleKey}" />
Expand Down
Loading

0 comments on commit 5533d18

Please sign in to comment.