예제 #1
0
        /// <summary>
        /// <see cref="Information"/> をホストしている別ウィンドウを閉じ、アタッチされたメイン ウィンドウで <see cref="MainWindowViewModelBase.Content"/> を表示します。
        /// </summary>
        public void MergeWindow()
        {
            if (this.splitWindow != null)
            {
                this.splitWindow.PropertyChanged -= this.HandleSplitWindowClosed;
                this.splitWindow.Close();
                this.splitWindow = null;

                if (!this.IsClosed)
                {
                    // このウィンドウが既に閉じられた後だったとき (= アプリ終了するとき) は
                    // Split 設定を上書きしないようにする
                    this.ContentVisibility      = Visibility.Visible;
                    this.Settings.IsSplit.Value = false;
                }
            }
        }
예제 #2
0
        /// <summary>
        /// <see cref="Information"/> をホストする別ウィンドウを表示し、アタッチされたメイン ウィンドウから <see cref="MainWindowViewModelBase.Content"/> を非表示にします。
        /// </summary>
        public void SplitWindow()
        {
            if (this.Settings.IsSplit && this.splitWindow != null)
            {
                this.splitWindow.Activate();
            }
            else
            {
                this.splitWindow         = new InformationWindowViewModel(this);
                this.splitWindow.Closed += this.HandleSplitWindowClosed;

                if (this.IsInitialized)
                {
                    this.Transition(this.splitWindow, typeof(InformationWindow), TransitionMode.NewOrActive, false);
                }

                this.ContentVisibility      = Visibility.Collapsed;
                this.Settings.IsSplit.Value = true;
            }
        }
예제 #3
0
		public void Initialize()
		{
			if (GeneralSettings.IsProxyMode)
			{
				// プロキシ モード (艦これのウィンドウを表示しないやつ)
				// KanColleWindow は作らず、InformationWindow を MainWindow として運用する
				this.informationWindow = new InformationWindowViewModel(true);
				this.MainWindow = this.informationWindow;
			}
			else
			{
				// 通常モード ((艦これ + 情報ウィンドウ) or その分割)
				this.kanColleWindow = new KanColleWindowViewModel(true);
				this.MainWindow = this.kanColleWindow;
			}

			KanColleClient.Current.Subscribe(nameof(KanColleClient.IsStarted), this.UpdateMode).AddTo(this);
			KanColleClient.Current.Subscribe(nameof(KanColleClient.IsInSortie), this.UpdateMode).AddTo(this);
		}
		/// <summary>
		/// <see cref="Information"/> をホストしている別ウィンドウを閉じ、アタッチされたメイン ウィンドウで <see cref="MainWindowViewModelBase.Content"/> を表示します。
		/// </summary>
		public void MergeWindow()
		{
			if (this.splitWindow != null)
			{
				this.splitWindow.Closed -= this.HandleSplitWindowClosed;
				this.splitWindow.Close();
				this.splitWindow = null;

				if (!this.IsClosed)
				{
					// このウィンドウが既に閉じられた後だったとき (= アプリ終了するとき) は
					// Split 設定を上書きしないようにする
					this.ContentVisibility = Visibility.Visible;
					this.Settings.IsSplit.Value = false;
				}

				this.UpdateTaskbar();
			}
		}
		/// <summary>
		/// <see cref="Information"/> をホストする別ウィンドウを表示し、アタッチされたメイン ウィンドウから <see cref="MainWindowViewModelBase.Content"/> を非表示にします。
		/// </summary>
		public void SplitWindow()
		{
			if (this.Settings.IsSplit && this.splitWindow != null)
			{
				this.splitWindow.Activate();
			}
			else
			{
				this.splitWindow = new InformationWindowViewModel(this);
				this.splitWindow.Closed += this.HandleSplitWindowClosed;

				if (this.IsInitialized) this.Transition(this.splitWindow, typeof(InformationWindow), TransitionMode.NewOrActive, false);

				this.ContentVisibility = Visibility.Collapsed;
				this.Settings.IsSplit.Value = true;
				this.UpdateTaskbar();
			}
		}