Exemplo n.º 1
0
        public void LoadWizardPage(ScreenNames screenName, bool calledFromClickEvent)
        {
            try
            {
                Cursor = Cursors.WaitCursor;
                Slyce.Common.Utility.SuspendPainting(panelContent);
                panelContent.Controls.Clear();
                ArchAngel.Interfaces.Controls.ContentItems.ContentItem nextContentItem = _contentItems[screenName];

                _currentContentItem = nextContentItem;
                Slyce.Common.Utility.SuspendPainting(_currentContentItem);

                if (_currentContentItem == null)
                {
                    Slyce.Common.Utility.ResumePainting(panelContent);
                    Slyce.Common.Utility.ResumePainting(_currentContentItem);
                    return;
                }
                _currentContentItem.OnDisplaying();
                panelContent.Controls.Clear();
                panelContent.Controls.Add(_currentContentItem);
                _currentContentItem.Dock = DockStyle.Fill;
                panelTop.Visible         = _currentContentItem.DisplayTopPanel;
                buttonBack.Visible       = _currentContentItem.HasPrev;
                buttonBack.BringToFront();
                buttonNext.Enabled        = _currentContentItem.HasNext || _currentContentItem.HasFinish;
                labelPageHeader.Text      = _currentContentItem.PageHeader;
                labelPageDescription.Text = _currentContentItem.PageDescription;
                buttonNext.Text           = _currentContentItem.HasFinish ? "&Finish" : "&Next >";

                if (!string.IsNullOrEmpty(_currentContentItem.NextText))
                {
                    buttonNext.Text = _currentContentItem.NextText;
                }
                ResizeControls();
                _currentContentItem.Focus();
            }
            finally
            {
                Slyce.Common.Utility.ResumePainting(panelContent);
                Slyce.Common.Utility.ResumePainting(_currentContentItem);
                Cursor = Cursors.Default;
            }
        }
Exemplo n.º 2
0
        private void FormFilter2_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult = FinishClicked ? DialogResult.OK : DialogResult.Cancel;

            if (FinishClicked)
            {
                foreach (ScreenNames key in _contentItems.Keys)
                {
                    ArchAngel.Interfaces.Controls.ContentItems.ContentItem item = _contentItems[key];

                    if (!item.Save())
                    {
                        MessageBox.Show("Problem saving data.");
                        e.Cancel = true;
                        return;
                    }
                }
            }
            //else
            //{
            //    // The user didn't click finish. They just clicked close, so they don't want to save what they have done, so revert to the original filter.
            //    _filter = _realFilter;
            //}
        }
Exemplo n.º 3
0
        public override void CreateScreens()
        {
            if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) return;

            Screens = new ContentItem[2];
            Screens[0] = new Controls.ContentItems.SetupDatabase();
            Screens[1] = new Controls.ContentItems.EditModel();
        }
Exemplo n.º 4
0
        public void LoadWizardPage(ScreenNames screenName, bool calledFromClickEvent)
        {
            try
            {
                Cursor = Cursors.WaitCursor;
                Slyce.Common.Utility.SuspendPainting(panelContent);
                panelContent.Controls.Clear();
                ArchAngel.Interfaces.Controls.ContentItems.ContentItem nextContentItem = _contentItems[screenName];

                _currentContentItem = nextContentItem;
                Slyce.Common.Utility.SuspendPainting(_currentContentItem);

                if (_currentContentItem == null)
                {
                    Slyce.Common.Utility.ResumePainting(panelContent);
                    Slyce.Common.Utility.ResumePainting(_currentContentItem);
                    return;
                }
                _currentContentItem.OnDisplaying();
                panelContent.Controls.Clear();
                panelContent.Controls.Add(_currentContentItem);
                _currentContentItem.Dock = DockStyle.Fill;
                panelTop.Visible = _currentContentItem.DisplayTopPanel;
                buttonBack.Visible = _currentContentItem.HasPrev;
                buttonBack.BringToFront();
                buttonNext.Enabled = _currentContentItem.HasNext || _currentContentItem.HasFinish;
                labelPageHeader.Text = _currentContentItem.PageHeader;
                labelPageDescription.Text = _currentContentItem.PageDescription;
                buttonNext.Text = _currentContentItem.HasFinish ? "&Finish" : "&Next >";

                if (!string.IsNullOrEmpty(_currentContentItem.NextText))
                {
                    buttonNext.Text = _currentContentItem.NextText;
                }
                ResizeControls();
                _currentContentItem.Focus();
            }
            finally
            {
                Slyce.Common.Utility.ResumePainting(panelContent);
                Slyce.Common.Utility.ResumePainting(_currentContentItem);
                Cursor = Cursors.Default;
            }
        }
Exemplo n.º 5
0
        public void LoadWizardPage(ContentItem.OptionsItemNames contentItemName, bool calledFromClickEvent)
        {
            try
            {
                Cursor = Cursors.WaitCursor;
                Slyce.Common.Utility.SuspendPainting(panelContent);
                panelContent.Controls.Clear();
                OptionScreen nextContentItem = _contentItems[contentItemName];

                //webBrowserHelp.Navigate(HelpDirectory + @"\" + nextContentItem.HelpFileName);

                switch (contentItemName)
                {
                    case ContentItem.OptionsItemNames.General:
                        //ShowTaskHelp(TaskHelpTypes.ProjectDetails);

                        if (!calledFromClickEvent)
                        {
                            sequentialNavBar1.ClickButton("General");
                        }

                        pictureHeading.Image = imageListHeading.Images[0];
                        break;
                    case ContentItem.OptionsItemNames.Formatting:
                        //ShowTaskHelp(TaskHelpTypes.ProjectDetails);

                        if (!calledFromClickEvent)
                        {
                            sequentialNavBar1.ClickButton("Formatting");
                        }

                        pictureHeading.Image = imageListHeading.Images[0];
                        break;
                    default:
                        throw new NotImplementedException("Not coded yet: " + contentItemName.ToString());
                }
                _currentContentItem = nextContentItem;
                Slyce.Common.Utility.SuspendPainting(_currentContentItem);

                if (_currentContentItem == null)
                {
                    return;
                }
                _currentContentItem.OnDisplaying();

                panelContent.Controls.Clear();
                panelContent.Controls.Add(_currentContentItem);
                _currentContentItem.Dock = DockStyle.Fill;
                //this.BackColor = _currentContentItem.BackColor;
                //pnlImageBackground.Visible = _currentContentItem.DisplayImage;
                panelTop.Visible = true;// _currentContentItem.DisplayTopPanel;
                headingContentTitle.Visible = !_currentContentItem.DisplayTopPanel;
                buttonBack.Visible = true;// _currentContentItem.HasPrev;
                buttonBack.BringToFront();
                buttonNext.Enabled = true;// _currentContentItem.HasNext || _currentContentItem.HasFinish;
                headingContentTitle.Text = _currentContentItem.Title;
                headingContentTitle.Refresh();
                labelPageHeader.Text = _currentContentItem.PageHeader;
                labelPageDescription.Text = _currentContentItem.PageDescription;

                if (!string.IsNullOrEmpty(_currentContentItem.NextText))
                {
                    buttonNext.Text = _currentContentItem.NextText;
                }
                ResizeControls();
            }
            finally
            {
                Slyce.Common.Utility.ResumePainting(panelContent);
                Slyce.Common.Utility.ResumePainting(_currentContentItem);
                Cursor = Cursors.Default;
            }
        }
Exemplo n.º 6
0
 void ContentItem_StatusChanged(ContentItem sender)
 {
     buttonNext.Enabled = sender.HasNext || sender.HasFinish;
     headingContentTitle.Text = sender.Title;
     headingContentTitle.Refresh();
     labelPageHeader.Text = sender.PageHeader;
     labelPageDescription.Text = sender.PageDescription;
 }
Exemplo n.º 7
0
 public ValidationResult(bool validationFailed, ContentItem screenToShow)
 {
     ValidationFailed = validationFailed;
     ScreenToShow = screenToShow;
 }