示例#1
0
        public static void Initialize(FormBase masterForm)
        {
            _masterForm = masterForm;
            _inputPanel = new InputPanel();

            ViewTransitionManager.Initialize(masterForm.TransitionControl);
        }
示例#2
0
        /// <summary>
        /// Show view onto the screen
        /// </summary>
        /// <param name="view">View to activate</param>
        /// <param name="type">Type of a transition</param>
        public static void ActivateView(IView view, TransitionType type)
        {
            if (_masterForm.InvokeRequired)
            {
                _masterForm.Invoke(new Action <IView>(ActivateView), new object[] { view, type });
                return;
            }

            var from = _currentView != null ? _currentView : view;
            var to   = view;

            AddViewToForm(to);

            ViewTransitionManager.Execute(from, to, type);
        }