コード例 #1
0
        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 + "」 が遠征から帰投しました。");
                    }
                };
            }
        }
コード例 #2
0
		public ExpeditionWrapper(int id, Expedition expedition)
		{
			this.Id = id;
			this.Source = expedition;
			this.Source.Subscribe(nameof(Expedition.Remaining), () => this.UpdateState()).AddTo(this);

		}
コード例 #3
0
        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")));
                }
            };
        }
コード例 #4
0
        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());
                }
            };
        }
コード例 #5
0
		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");
					}
				}},
			});
		}
コード例 #6
0
		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
		}
コード例 #7
0
ファイル: Fleet.cs プロジェクト: Zcynical/KanColleViewer
		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);
		}
コード例 #8
0
 public ExpeditionViewModel(Expedition expedition)
 {
     this.source = expedition;
     this.CompositeDisposable.Add(new PropertyChangedEventListener(expedition, (sender, args) => this.RaisePropertyChanged(args.PropertyName)));
 }