public BuildingDockViewModel(BuildingDock source) { this.source = source; this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); if (Toast.IsSupported) { source.Completed += (sender, args) => { if (this.IsNotifyCompleted) { Toast.Show( "建造完了", string.Format("工廠第 {0} ドックでの{1}の建造が完了しました。", this.Id, this.CanDisplayShipName ? "「" + this.Ship + "」" : "艦娘"), () => App.ViewModelRoot.Activate()); } }; } else { source.Completed += (sender, args) => { if (this.IsNotifyCompleted) { NotifyIconWrapper.Show( "建造完了", string.Format("工廠第 {0} ドックでの{1}の建造が完了しました。", this.Id, this.CanDisplayShipName ? "「" + this.Ship + "」" : "艦娘")); } }; } }
public BuildingDockViewModel(BuildingDock source) { this.source = source; this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); source.Completed += (sender, args) => { if (this.IsNotifyCompleted) { Toast.Show( "建造完了", string.Format("工廠第 {0} ドックでの{1}の建造が完了しました。", this.Id, this.CanDisplayShipName ? this.Ship : "艦娘"), () => this.Messenger.Raise(new WindowActionMessage(WindowAction.Active, "Window/Activate"))); } }; }
public BuildingDockViewModel(BuildingDock source) { this.source = source; this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); source.Completed += (sender, args) => { if (this.IsNotifyCompleted) { WindowsNotification.Notifier.Show( Resources.Dockyard_NotificationMessage_Title, string.Format( Resources.Dockyard_NotificationMessage, this.Id, this.CanDisplayShipName ? this.Ship : Resources.Common_ShipGirl), () => App.ViewModelRoot.Activate()); } }; }
public BuildingDockViewModel(BuildingDock source) { this.source = source; this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); }