This class encapsulates the data and the operations presented by UI elements that display the setup for TESO game mode.
상속: SetupBaseVM
        /// <summary>
        /// Performs the initial setup for the game mode being created.
        /// </summary>
        /// <param name="p_dlgShowView">The delegate to use to display a view.</param>
        /// <param name="p_dlgShowMessage">The delegate to use to display a message.</param>
        /// <returns><c>true</c> if the setup completed successfully;
        /// <c>false</c> otherwise.</returns>
        public bool PerformInitialSetup(ShowViewDelegate p_dlgShowView, ShowMessageDelegate p_dlgShowMessage)
        {
            if (EnvironmentInfo.Settings.CustomGameModeSettings[GameModeDescriptor.ModeId] == null)
            {
                EnvironmentInfo.Settings.CustomGameModeSettings[GameModeDescriptor.ModeId] = new PerGameModeSettings <object>();
            }

            TESOSetupVM vmlSetup = new TESOSetupVM(EnvironmentInfo, GameModeDescriptor);
            SetupForm   frmSetup = new SetupForm(vmlSetup);

            if (((DialogResult)p_dlgShowView(frmSetup, true)) == DialogResult.Cancel)
            {
                return(false);
            }
            return(vmlSetup.Save());
        }
예제 #2
0
		/// <summary>
		/// A simple constructor that initializes the object with the given values.
		/// </summary>
		/// <param name="p_vmlViewModel">The view model that provides the data and operations for this view.</param>
		public SetupForm(TESOSetupVM p_vmlViewModel)
			: this()
		{
			ViewModel = p_vmlViewModel;
		}
예제 #3
0
파일: SetupForm.cs 프로젝트: hackerlank/nmm
 /// <summary>
 /// A simple constructor that initializes the object with the given values.
 /// </summary>
 /// <param name="p_vmlViewModel">The view model that provides the data and operations for this view.</param>
 public SetupForm(TESOSetupVM p_vmlViewModel)
     : this()
 {
     ViewModel = p_vmlViewModel;
 }
		/// <summary>
		/// Performs the initial setup for the game mode being created.
		/// </summary>
		/// <param name="p_dlgShowView">The delegate to use to display a view.</param>
		/// <param name="p_dlgShowMessage">The delegate to use to display a message.</param>
		/// <returns><c>true</c> if the setup completed successfully;
		/// <c>false</c> otherwise.</returns>
		public bool PerformInitialSetup(ShowViewDelegate p_dlgShowView, ShowMessageDelegate p_dlgShowMessage)
		{
			if (EnvironmentInfo.Settings.CustomGameModeSettings[GameModeDescriptor.ModeId] == null)
				EnvironmentInfo.Settings.CustomGameModeSettings[GameModeDescriptor.ModeId] = new PerGameModeSettings<object>();

			TESOSetupVM vmlSetup = new TESOSetupVM(EnvironmentInfo, GameModeDescriptor);
			SetupForm frmSetup = new SetupForm(vmlSetup);
			if (((DialogResult)p_dlgShowView(frmSetup, true)) == DialogResult.Cancel)
				return false;
			return vmlSetup.Save();
		}