Inheritance: System.Windows.Forms.Control
Ejemplo n.º 1
0
        public void Setup()
        {
            InitializeControl = (page) =>
            {
                _winformPage = (WinForms.WizardPage)page;

                _winformPage.Initialize += (s, e) =>
                {
                    if (this.Initialize != null)
                    {
                        this.Initialize(s, e);
                    }
                };

                GetTag            = () => _winformPage.Tag;
                SetTag            = (value) => _winformPage.Tag = value;
                GetSuppress       = () => _winformPage.Suppress;
                SetSuppress       = (value) => _winformPage.Suppress = value;
                GetAllowNext      = () => _winformPage.AllowNext;
                SetAllowNext      = (value) => _winformPage.AllowNext = value;
                GetNextPage       = () => new WizardAdapterPage(_winformPage.NextPage);
                SetNextPage       = (value) => _winformPage.NextPage = value._winformPage;
                GetIsFinishedPage = () => _winformPage.IsFinishPage;
                SetIsFinishedPage = (value) => _winformPage.IsFinishPage = value;
                GetText           = () => _winformPage.Text;
                SetText           = (value) => _winformPage.Text = value;
                GetSize           = () => _winformPage.Size;
                SetSize           = (value) => _winformPage.Size = value;
            };
        }
Ejemplo n.º 2
0
        private void ShowPage(WizardPage page, int pageNumber)
        {
            if (page.Suppress)
            {
                ShowPage(GetNextPage());
                return;
            }
            if (_currentShownPage != null)
                _contentPanel.Controls.Remove(_currentShownPage);

            _currentPageIndex = pageNumber;
            _currentShownPage = page;
            _currentShownPage.InvokeInitializeEvent();
            _currentShownPage.Dock = DockStyle.Fill;
            _contentPanel.Controls.Add(_currentShownPage);
            _backButton.Enabled = _history.Count > 0;
            _nextAndFinishedButton.Enabled = _currentShownPage.AllowNext;
            _currentShownPage.AllowNextChanged -= _currentShownPage_AllowNextChanged;
            _currentShownPage.AllowNextChanged += _currentShownPage_AllowNextChanged;

            _history.Push(pageNumber);
        }
Ejemplo n.º 3
0
 protected virtual void ShowPage(WizardPage page)
 {
     ShowPage(page, Pages.IndexOf(page));
 }
        public void Setup()
        {
            InitializeControl = (page) =>
            {
                _winformPage = (WinForms.WizardPage)page;

                _winformPage.Initialize += (s, e) =>
                {
                    if (this.Initialize != null)
                        this.Initialize(s, e);
                };

                GetTag = () => _winformPage.Tag;
                SetTag = (value) => _winformPage.Tag = value;
                GetSuppress = () => _winformPage.Suppress;
                SetSuppress = (value) => _winformPage.Suppress = value;
                GetAllowNext = () => _winformPage.AllowNext;
                SetAllowNext = (value) => _winformPage.AllowNext = value;
                GetNextPage = () => new WizardAdapterPage(_winformPage.NextPage);
                SetNextPage = (value) => _winformPage.NextPage = value._winformPage;
                GetIsFinishedPage = () => _winformPage.IsFinishPage;
                SetIsFinishedPage = (value) => _winformPage.IsFinishPage = value;
                GetText = () => _winformPage.Text;
                SetText = (value) => _winformPage.Text = value;
                GetSize = () => _winformPage.Size;
                SetSize = (value) => _winformPage.Size = value;
            };
        }