forked from Zharay/KanColleViewer
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
southrop
committed
Jan 2, 2014
1 parent
685a2a6
commit 25d03d9
Showing
69 changed files
with
9,660 additions
and
9,660 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
4,104 changes: 2,052 additions & 2,052 deletions
4,104
Grabacr07.KanColleViewer/Themes/Mukyutter.Dark.xaml
Large diffs are not rendered by default.
Oops, something went wrong.
106 changes: 53 additions & 53 deletions
106
Grabacr07.KanColleViewer/ViewModels/BindableTextViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Livet; | ||
|
||
namespace Grabacr07.KanColleViewer.ViewModels | ||
{ | ||
public class BindableTextViewModel : ViewModel | ||
{ | ||
#region Text 変更通知プロパティ | ||
|
||
private string _Text; | ||
|
||
public string Text | ||
{ | ||
get { return this._Text; } | ||
set | ||
{ | ||
if (this._Text != value) | ||
{ | ||
this._Text = value; | ||
this.RaisePropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
|
||
public class HyperlinkViewModel : BindableTextViewModel | ||
{ | ||
#region Uri 変更通知プロパティ | ||
|
||
private Uri _Uri; | ||
|
||
public Uri Uri | ||
{ | ||
get { return this._Uri; } | ||
set | ||
{ | ||
if (this._Uri != value) | ||
{ | ||
this._Uri = value; | ||
this.RaisePropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Livet; | ||
|
||
namespace Grabacr07.KanColleViewer.ViewModels | ||
{ | ||
public class BindableTextViewModel : ViewModel | ||
{ | ||
#region Text 変更通知プロパティ | ||
|
||
private string _Text; | ||
|
||
public string Text | ||
{ | ||
get { return this._Text; } | ||
set | ||
{ | ||
if (this._Text != value) | ||
{ | ||
this._Text = value; | ||
this.RaisePropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
|
||
public class HyperlinkViewModel : BindableTextViewModel | ||
{ | ||
#region Uri 変更通知プロパティ | ||
|
||
private Uri _Uri; | ||
|
||
public Uri Uri | ||
{ | ||
get { return this._Uri; } | ||
set | ||
{ | ||
if (this._Uri != value) | ||
{ | ||
this._Uri = value; | ||
this.RaisePropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
} |
206 changes: 103 additions & 103 deletions
206
Grabacr07.KanColleViewer/ViewModels/Contents/Docks/BuildingDockViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,103 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Grabacr07.KanColleViewer.Model; | ||
using Grabacr07.KanColleWrapper.Models; | ||
using Livet; | ||
using Livet.EventListeners; | ||
using Livet.Messaging.Windows; | ||
|
||
namespace Grabacr07.KanColleViewer.ViewModels.Contents.Docks | ||
{ | ||
public class BuildingDockViewModel : ViewModel | ||
{ | ||
private readonly BuildingDock source; | ||
|
||
public int Id | ||
{ | ||
get { return this.source.Id; } | ||
} | ||
|
||
public string Ship | ||
{ | ||
get { return source.Ship == null ? "----" : source.Ship.Name; } | ||
} | ||
|
||
public string CompleteTime | ||
{ | ||
get { return source.CompleteTime.HasValue ? source.CompleteTime.Value.LocalDateTime.ToString("MM/dd HH:mm") : "--/-- --:--:--"; } | ||
} | ||
|
||
public string Remaining | ||
{ | ||
get { return source.Remaining.HasValue ? source.Remaining.Value.ToString(@"hh\:mm\:ss") : "--:--:--"; } | ||
} | ||
|
||
public BuildingDockState State | ||
{ | ||
get { return this.source.State; } | ||
} | ||
|
||
#region CanDisplayShipName 変更通知プロパティ | ||
|
||
private bool _CanDisplayShipName; | ||
|
||
/// <summary> | ||
/// 建造中の艦娘の艦名を表示するかどうかを示す値を取得または設定します。 | ||
/// </summary> | ||
public bool CanDisplayShipName | ||
{ | ||
get { return this._CanDisplayShipName; } | ||
set | ||
{ | ||
if (this._CanDisplayShipName != value) | ||
{ | ||
this._CanDisplayShipName = value; | ||
this.RaisePropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
#region IsNotifyCompleted 変更通知プロパティ | ||
|
||
private bool _IsNotifyCompleted; | ||
|
||
public bool IsNotifyCompleted | ||
{ | ||
get { return this._IsNotifyCompleted; } | ||
set | ||
{ | ||
if (this._IsNotifyCompleted != value) | ||
{ | ||
this._IsNotifyCompleted = value; | ||
this.RaisePropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
public BuildingDockViewModel(BuildingDock source) | ||
{ | ||
this.source = source; | ||
this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); | ||
|
||
if (Helper.IsWindows8OrGreater) | ||
{ | ||
source.Completed += (sender, args) => | ||
{ | ||
if (this.IsNotifyCompleted) | ||
{ | ||
Toast.Show( | ||
"建造完了", | ||
string.Format("工廠第 {0} ドックでの{1}の建造が完了しました。", this.Id, this.CanDisplayShipName ? "「" + this.Ship + "」" : "艦娘"), | ||
() => App.ViewModelRoot.Messenger.Raise(new WindowActionMessage(WindowAction.Active, "Window/Activate"))); | ||
} | ||
}; | ||
} | ||
} | ||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Grabacr07.KanColleViewer.Model; | ||
using Grabacr07.KanColleWrapper.Models; | ||
using Livet; | ||
using Livet.EventListeners; | ||
using Livet.Messaging.Windows; | ||
|
||
namespace Grabacr07.KanColleViewer.ViewModels.Contents.Docks | ||
{ | ||
public class BuildingDockViewModel : ViewModel | ||
{ | ||
private readonly BuildingDock source; | ||
|
||
public int Id | ||
{ | ||
get { return this.source.Id; } | ||
} | ||
|
||
public string Ship | ||
{ | ||
get { return source.Ship == null ? "----" : source.Ship.Name; } | ||
} | ||
|
||
public string CompleteTime | ||
{ | ||
get { return source.CompleteTime.HasValue ? source.CompleteTime.Value.LocalDateTime.ToString("MM/dd HH:mm") : "--/-- --:--:--"; } | ||
} | ||
|
||
public string Remaining | ||
{ | ||
get { return source.Remaining.HasValue ? source.Remaining.Value.ToString(@"hh\:mm\:ss") : "--:--:--"; } | ||
} | ||
|
||
public BuildingDockState State | ||
{ | ||
get { return this.source.State; } | ||
} | ||
|
||
#region CanDisplayShipName 変更通知プロパティ | ||
|
||
private bool _CanDisplayShipName; | ||
|
||
/// <summary> | ||
/// 建造中の艦娘の艦名を表示するかどうかを示す値を取得または設定します。 | ||
/// </summary> | ||
public bool CanDisplayShipName | ||
{ | ||
get { return this._CanDisplayShipName; } | ||
set | ||
{ | ||
if (this._CanDisplayShipName != value) | ||
{ | ||
this._CanDisplayShipName = value; | ||
this.RaisePropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
#region IsNotifyCompleted 変更通知プロパティ | ||
|
||
private bool _IsNotifyCompleted; | ||
|
||
public bool IsNotifyCompleted | ||
{ | ||
get { return this._IsNotifyCompleted; } | ||
set | ||
{ | ||
if (this._IsNotifyCompleted != value) | ||
{ | ||
this._IsNotifyCompleted = value; | ||
this.RaisePropertyChanged(); | ||
} | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
public BuildingDockViewModel(BuildingDock source) | ||
{ | ||
this.source = source; | ||
this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); | ||
|
||
if (Helper.IsWindows8OrGreater) | ||
{ | ||
source.Completed += (sender, args) => | ||
{ | ||
if (this.IsNotifyCompleted) | ||
{ | ||
Toast.Show( | ||
"建造完了", | ||
string.Format("工廠第 {0} ドックでの{1}の建造が完了しました。", this.Id, this.CanDisplayShipName ? "「" + this.Ship + "」" : "艦娘"), | ||
() => App.ViewModelRoot.Messenger.Raise(new WindowActionMessage(WindowAction.Active, "Window/Activate"))); | ||
} | ||
}; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.