Example #1
0
        /// <summary>
        /// Creates the controller.
        /// </summary>
        /// <param name="view">The view this controller is controlling.</param>
        /// <param name="hostedController">The controller that controls the UserControl shown in the client area of the form.</param>
        /// <param name="title">Title of the dialog.</param>
        /// <param name="applyvisible">Indicates if the Apply button is visible or not.</param>
        public DialogShellController(
            IDialogShellView view,
            IApplyController hostedController,
            string title,
            bool applyvisible)
        {
            View = view;
            _hostedController = hostedController;
            _title            = title;
            _isApplyVisible   = applyvisible;

            SetElements(true);
        }
Example #2
0
		/// <summary>
		/// Creates the controller.
		/// </summary>
		/// <param name="view">The view this controller is controlling.</param>
		/// <param name="hostedController">The controller that controls the UserControl shown in the client area of the form.</param>
		/// <param name="title">Title of the dialog.</param>
		/// <param name="applyvisible">Indicates if the Apply button is visible or not.</param>
		public DialogShellController(
			IDialogShellView view,
			IApplyController hostedController,
			string title,
			bool applyvisible)
		{
			View = view;
			_hostedController = hostedController;
			_title = title;
			_isApplyVisible = applyvisible;

			SetElements(true);
		}
Example #3
0
        /// <summary>
        /// Called when the user presses the OK button. Calls the Apply method of the
        /// hosted controller, then closes the form.
        /// </summary>
        public void EhOK(System.ComponentModel.CancelEventArgs e)
        {
            bool bSuccess = true;

            if (null != _hostedController)
            {
                bSuccess = _hostedController.Apply(true);
            }

            if (!bSuccess)
            {
                e.Cancel = true;
            }
            else
            {
                View = null;
            }
        }
Example #4
0
 /// <summary>
 /// Creates the controller.
 /// </summary>
 /// <param name="view">The view this controller is controlling.</param>
 /// <param name="hostedController">The controller that controls the UserControl shown in the client area of the form.</param>
 public DialogShellController(IDialogShellView view, IApplyController hostedController)
 {
     View = view;
     _hostedController = hostedController;
     SetElements(true);
 }
Example #5
0
 /// <summary>
 /// Called when the user presses the Cancel button. Then closes the form.
 /// </summary>
 public void EhCancel()
 {
     _hostedController.Revert(true);
     View = null;
 }
Example #6
0
		/// <summary>
		/// Creates the controller.
		/// </summary>
		/// <param name="view">The view this controller is controlling.</param>
		/// <param name="hostedController">The controller that controls the UserControl shown in the client area of the form.</param>
		public DialogShellController(IDialogShellView view, IApplyController hostedController)
		{
			View = view;
			_hostedController = hostedController;
			SetElements(true);
		}