public ExpeditionViewModel(Expedition expedition) { this.source = expedition; this.CompositeDisposable.Add(new PropertyChangedEventListener(expedition, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); if (Toast.IsSupported) { expedition.Returned += (sender, args) => { if (this.IsNotifyReturned) { Toast.Show( "遠征完了", "「" + args.FleetName + "」が遠征から帰投しました。", () => App.ViewModelRoot.Activate()); } }; } else { expedition.Returned += (sender, args) => { if (this.IsNotifyReturned) { NotifyIconWrapper.Show( "遠征完了", "「" + args.FleetName + "」 が遠征から帰投しました。"); } }; } }
public ExpeditionWrapper(int id, Expedition expedition) { this.Id = id; this.Source = expedition; this.Source.Subscribe(nameof(Expedition.Remaining), () => this.UpdateState()).AddTo(this); }
public ExpeditionViewModel(Expedition expedition) { this.source = expedition; this.CompositeDisposable.Add(new PropertyChangedEventListener(expedition, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); expedition.Returned += (sender, args) => { if (this.IsNotifyReturned) { Toast.Show( "遠征完了", "'" + args.FleetName + "' が遠征から帰投しました。", () => this.Messenger.Raise(new WindowActionMessage(WindowAction.Active, "Window/Activate"))); } }; }
public ExpeditionViewModel(Expedition expedition) { this.source = expedition; this.CompositeDisposable.Add(new PropertyChangedEventListener(expedition, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); expedition.Returned += (sender, args) => { if (this.IsNotifyReturned) { WindowsNotification.Notifier.Show( Resources.Expedition_NotificationMessage_Title, string.Format(Resources.Expedition_NotificationMessage, args.FleetName), () => App.ViewModelRoot.Activate()); } }; }
public ExpeditionViewModel(Expedition expedition) { this.source = expedition; this.CompositeDisposable.Add(new PropertyChangedEventListener(expedition, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); if (Helper.IsInDesignMode) return; this.CompositeDisposable.Add(new PropertyChangedEventListener(KanColleClient.Current.Translations) { { "CurrentCulture", (sender, args) => { if (this.Mission != null) { this.Mission.Update(); this.RaisePropertyChanged("Mission"); } }}, }); }
public ExpeditionViewModel(Expedition expedition) { this.source = expedition; this.CompositeDisposable.Add(new PropertyChangedEventListener(expedition, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); <<<<<<< .merge_file_a00596 expedition.Returned += (sender, args) => { if (this.IsNotifyReturned) { PluginHost.Instance.GetNotifier().Show( NotifyType.Expedition, Resources.Expedition_NotificationMessage_Title, string.Format(Resources.Expedition_NotificationMessage, args.FleetName), () => App.ViewModelRoot.Activate()); } }; ======= >>>>>>> .merge_file_a10364 }
internal Fleet(Homeport parent, kcsapi_deck rawData) { this.homeport = parent; this.State = new FleetState(parent, this); this.Expedition = new Expedition(this); this.CompositeDisposable.Add(this.State); this.CompositeDisposable.Add(this.Expedition); this.Update(rawData); }
public ExpeditionViewModel(Expedition expedition) { this.source = expedition; this.CompositeDisposable.Add(new PropertyChangedEventListener(expedition, (sender, args) => this.RaisePropertyChanged(args.PropertyName))); }