/// <summary>
            /// Initializes a new instance of the <see cref="DialogScreen"/> class.
            /// </summary>
            /// <param name="dialog">The dialog that owns this screen.</param>
            /// <param name="globalContent">The screen's global content manager.</param>
            public DialogScreen(EscMenuDialog dialog, ContentManager globalContent)
                : base("Content/UI/Dialogs/EscMenuDialog", "EscMenuDialog", globalContent)
            {
                Contract.Require(dialog, "dialog");

                View.SetViewModel(new DialogScreenVM(dialog));
            }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GamePlayViewModel"/> class.
        /// </summary>
        /// <param name="owner">The <see cref="GameMenuScreen"/> that owns this view model.</param>
        /// <param name="escMenuDialog">The escape menu dialog box used by this screen.</param>
        public GamePlayViewModel(GamePlayScreen owner, EscMenuDialog escMenuDialog)
        {
            Contract.Require(owner, "owner");

            this.owner = owner;
            this.escMenuDialog = escMenuDialog;

            this.V1Color = Color.Red;
            this.V2Color = Color.Lime;
            this.V3Color = Color.Blue;
        }
            /// <summary>
            /// Initializes a new instance of the <see cref="DialogScreenVM"/> class.
            /// </summary>
            /// <param name="dialog">The dialog box that owns the screen.</param>
            internal DialogScreenVM(EscMenuDialog dialog)
            {
                Contract.Require(dialog, "dialog");

                this.dialog = dialog;
            }