入渠ドックを表します。
Inheritance: TimerNotifier, IIdentifiable
        public RepairingDockViewModel(RepairingDock 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.Ship),
                            () => App.ViewModelRoot.Activate());
                    }
                };
            }
            else
            {
                source.Completed += (sender, args) =>
                {
                    if (this.IsNotifyCompleted)
                    {
                        NotifyIconWrapper.Show(
                            "整備完了",
                            string.Format("入渠第 {0} ドックでの「{1}」の整備が完了しました。", this.Id, this.Ship));
                    }
                };
            }
        }
Example #2
0
        internal void Update(Ship[] s)
        {
            if (s.Length == 0)
            {
                this.RepairingDock = null;
                return;
            }

            var shipIds = s.Select(x => x.Id).ToArray();
            var repairyards = KanColleClient.Current.Homeport.Repairyard.Docks.Values.Where(x => x.Ship != null)
                .Where(x => shipIds.Any(X => X == x.ShipId));

            this.RepairingDock = repairyards.Any() ? repairyards.OrderByDescending(x => x.Remaining).First() : null;
        }
        public RepairingDockViewModel(RepairingDock 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.Repairyard_NotificationMessage_Title,
                        string.Format(Resources.Repairyard_NotificationMessage, this.Id, this.Ship),
                        () => App.ViewModelRoot.Activate());
                }
            };
        }
        public RepairingDockViewModel(RepairingDock 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.Ship),
                        () => this.Messenger.Raise(new WindowActionMessage(WindowAction.Active, "Window/Activate")));
                }
            };
        }
		public RepairingDockViewModel(RepairingDock source)
		{
			this.source = source;
			this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName)));
<<<<<<< .merge_file_a16052

			source.Completed += (sender, args) =>
			{
				if (this.IsNotifyCompleted)
				{
					PluginHost.Instance.GetNotifier().Show(
						NotifyType.Repair,
						Resources.Repairyard_NotificationMessage_Title,
						string.Format(Resources.Repairyard_NotificationMessage, this.Id, this.Ship),
						() => App.ViewModelRoot.Activate());
				}
			};
=======
>>>>>>> .merge_file_a14608
		}
 public RepairingDockViewModel(RepairingDock source)
 {
     this.source = source;
     this.CompositeDisposable.Add(new PropertyChangedEventListener(source, (sender, args) => this.RaisePropertyChanged(args.PropertyName)));
 }