예제 #1
0
 public bool Activate()
 {
     if (!_controller.Activate())
     {
         return(false);
     }
     StartPollingThread();
     return(true);
 }
예제 #2
0
 public static void SetActiveController(IController value)
 {
     // deactive old controller
     _activeController?.Deactivate();
     _activeController = value;
     if (_activeController != null)
     {
         _activeController.Activate();
         if (Delay != TimeSpan.Zero)
         {
             _bufferedActiveController = new BufferedController(value, Delay);
         }
     }
 }
예제 #3
0
        public void Activate()
        {
            if (!IsActive)
            {
                logfile.WriteLine(this.GetType().ToString() + " activating");

                foreach (object controllerobject in controllers)
                {
                    IController controller = controllerobject as IController;
                    controller.Activate();
                }

                IsActive = true;
            }
        }
예제 #4
0
        /// <summary>
        ///     Reinitializes the controller and view. Call this when the UI is out of sync.
        /// </summary>
        public void ResetController()
        {
            if (_activeController == null)
            {
                return;
            }
            panelContent.AssignView(_activeController.View);

            if (!AllowUserResize)
            {
                // Resize form to content.
                _activeController.View.Dock     = DockStyle.None;
                this.InvokeSafe(c => ClientSize = new Size(_activeController.View.Width,
                                                           _activeController.View.Height + (menuStripNavigation.Visible ? menuStripNavigation.Height : 0)));
            }
            else
            {
                _activeController.View.Dock = DockStyle.Fill;
            }

            _activeController.Activate();
        }
예제 #5
0
 public bool Activate()
 {
     return(_controller.Activate());
 }
예제 #6
0
 public bool Activate()
 {
     return(_real.Activate());
 }