public ReSortieBarViewModel(FleetViewModel parent, FleetReSortie reSortie)
        {
            this.source = reSortie;
            this.CompositeDisposable.Add(new PropertyChangedEventListener(reSortie)
            {
                { () => reSortie.Reason, (sender, args) => this.UpdateMessage() },
                { () => reSortie.Remaining, (sender, args) => this.UpdateRemaining() },
            });

            this.UpdateMessage();
            this.UpdateRemaining();

            if (Helper.IsWindows8OrGreater)
            {
                reSortie.Readied += (sender, args) =>
                {
                    if (this.IsNotifyReadied)
                    {
                        Toast.Show(
                            "疲労回復完了",
                            "「" + parent.Name + "」の全艦娘の疲労が回復しました。",
                            () => this.Messenger.Raise(new WindowActionMessage(WindowAction.Active, "Window/Activate")));
                    }
                };
            }
        }
Пример #2
0
 private void UpdateFleets()
 {
     this.Fleets = KanColleClient.Current.Homeport.Fleets.Select(kvp => new FleetViewModel(kvp.Value)).ToArray();
     this.SelectedFleet = this.Fleets.FirstOrDefault();
     this.Fleets.ForEach(x => x.Expedition.IsNotifyReturned = this.IsNotifyReturned);
 }