public override void CreateScreens() { if (screensCreated) return; // Add the screens in the order they should appear in ArchAngel Workbench Screens = new ArchAngel.Interfaces.Controls.ContentItems.ContentItem[1]; Screens[0] = new Screens.Screen1(); screensCreated = true; }
public override void CreateScreens() { if (screensCreated) { return; } // Add the screens in the order they should appear in ArchAngel Workbench Screens = new ArchAngel.Interfaces.Controls.ContentItems.ContentItem[1]; Screens[0] = new Screens.Screen1(); screensCreated = true; }
private void buttonBack_Click(object sender, EventArgs e) { ArchAngel.Interfaces.Controls.ContentItems.ContentItem contentItem = (ArchAngel.Interfaces.Controls.ContentItems.ContentItem)panelContent.Controls[0]; if (!contentItem.Back()) { return; } int indexOfCurrentItem = -1; for (int i = 0; i < _orderedContentItems.Count; i++) { if (_orderedContentItems[i] == contentItem) { // If we're at the first item, do nothing if (i > 0) { string name; foreach (ScreenNames key in _contentItems.Keys) { if (_contentItems[key] == _orderedContentItems[i - 1]) { if (contentItem.ValidateControls()) { panelContent.Controls.Clear(); LoadWizardPage(key); } break; } } } break; } } //ContentItems.ContentItem contentItem = (ContentItems.ContentItem)panelContent.Controls[0]; //ScreenNames newContentItemName = (ScreenNames)Enum.Parse(typeof(ScreenNames), contentItem.Back()); //if (newContentItemName != ScreenNames.Nothing) //{ // if (contentItem.ValidateControls()) // { // //panelContent.Controls.Clear(); // LoadWizardPage(newContentItemName); // } //} }
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; //} }
public void LoadWizardPage(ScreenNames screenName, bool calledFromClickEvent) { Cursor = Cursors.WaitCursor; Slyce.Common.Utility.SuspendPainting(panelContent.Handle); panelContent.Controls.Clear(); ArchAngel.Interfaces.Controls.ContentItems.ContentItem nextContentItem = _contentItems[screenName]; //switch (screenName) //{ // case ScreenNames.Columns: // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Project Details"); // } // pictureHeading.Image = imageListHeading.Images[0]; // break; // case ContentItems.ContentItem.ContentItemNames.SetupDatabase: // ShowTaskHelp(TaskHelpTypes.Database); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Database"); // } // pictureHeading.Image = imageListHeading.Images[1]; // break; // case ContentItems.ContentItem.ContentItemNames.EditModel: // ShowTaskHelp(TaskHelpTypes.Model); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Object Model"); // } // pictureHeading.Image = imageListHeading.Images[2]; // break; // case ContentItems.ContentItem.ContentItemNames.Options: // ShowTaskHelp(TaskHelpTypes.Options); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Options"); // } // pictureHeading.Image = imageListHeading.Images[3]; // break; // case ContentItems.ContentItem.ContentItemNames.Generation: // ShowTaskHelp(TaskHelpTypes.Generation); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Analysis"); // } // pictureHeading.Image = imageListHeading.Images[4]; // break; // case ContentItems.ContentItem.ContentItemNames.Merge: // ShowTaskHelp(TaskHelpTypes.Merge); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Generation"); // } // pictureHeading.Image = imageListHeading.Images[4]; // break; // default: // throw new NotImplementedException("Not coded yet: " + contentItemName.ToString()); //} _currentContentItem = nextContentItem; Slyce.Common.Utility.SuspendPainting(_currentContentItem.Handle); if (_currentContentItem == null) { return; } _currentContentItem.IsDisplaying(); panelContent.Controls.Clear(); panelContent.Controls.Add(_currentContentItem); _currentContentItem.Dock = DockStyle.Fill; //this.BackColor = _currentContentItem.BackColor; //pnlImageBackground.Visible = _currentContentItem.DisplayImage; panelTop.Visible = _currentContentItem.DisplayTopPanel; //headingContentTitle.Visible = !_currentContentItem.DisplayTopPanel; buttonBack.Visible = _currentContentItem.HasPrev; buttonBack.BringToFront(); buttonNext.Enabled = _currentContentItem.HasNext || _currentContentItem.HasFinish; //headingContentTitle.Text = _currentContentItem.Title; //headingContentTitle.Refresh(); labelPageHeader.Text = _currentContentItem.PageHeader; labelPageDescription.Text = _currentContentItem.PageDescription; buttonNext.Text = _currentContentItem.HasFinish ? "&Finish" : "&Next >"; if (!string.IsNullOrEmpty(_currentContentItem.NextText)) { buttonNext.Text = _currentContentItem.NextText; } ResizeControls(); Slyce.Common.Utility.ResumePainting(); Cursor = Cursors.Default; }
public void LoadWizardPage(ScreenNames screenName, bool calledFromClickEvent) { Cursor = Cursors.WaitCursor; Slyce.Common.Utility.SuspendPainting(panelContent.Handle); panelContent.Controls.Clear(); ArchAngel.Interfaces.Controls.ContentItems.ContentItem nextContentItem = _contentItems[screenName]; //switch (screenName) //{ // case ScreenNames.Columns: // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Project Details"); // } // pictureHeading.Image = imageListHeading.Images[0]; // break; // case ContentItems.ContentItem.ContentItemNames.SetupDatabase: // ShowTaskHelp(TaskHelpTypes.Database); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Database"); // } // pictureHeading.Image = imageListHeading.Images[1]; // break; // case ContentItems.ContentItem.ContentItemNames.EditModel: // ShowTaskHelp(TaskHelpTypes.Model); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Object Model"); // } // pictureHeading.Image = imageListHeading.Images[2]; // break; // case ContentItems.ContentItem.ContentItemNames.Options: // ShowTaskHelp(TaskHelpTypes.Options); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Options"); // } // pictureHeading.Image = imageListHeading.Images[3]; // break; // case ContentItems.ContentItem.ContentItemNames.Generation: // ShowTaskHelp(TaskHelpTypes.Generation); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Analysis"); // } // pictureHeading.Image = imageListHeading.Images[4]; // break; // case ContentItems.ContentItem.ContentItemNames.Merge: // ShowTaskHelp(TaskHelpTypes.Merge); // if (!calledFromClickEvent) // { // sequentialNavBar.ClickButton("Generation"); // } // pictureHeading.Image = imageListHeading.Images[4]; // break; // default: // throw new NotImplementedException("Not coded yet: " + contentItemName.ToString()); //} _currentContentItem = nextContentItem; Slyce.Common.Utility.SuspendPainting(_currentContentItem.Handle); if (_currentContentItem == null) { return; } _currentContentItem.IsDisplaying(); panelContent.Controls.Clear(); panelContent.Controls.Add(_currentContentItem); _currentContentItem.Dock = DockStyle.Fill; //this.BackColor = _currentContentItem.BackColor; //pnlImageBackground.Visible = _currentContentItem.DisplayImage; panelTop.Visible = _currentContentItem.DisplayTopPanel; //headingContentTitle.Visible = !_currentContentItem.DisplayTopPanel; buttonBack.Visible = _currentContentItem.HasPrev; buttonBack.BringToFront(); buttonNext.Enabled = _currentContentItem.HasNext || _currentContentItem.HasFinish; //headingContentTitle.Text = _currentContentItem.Title; //headingContentTitle.Refresh(); labelPageHeader.Text = _currentContentItem.PageHeader; labelPageDescription.Text = _currentContentItem.PageDescription; buttonNext.Text = _currentContentItem.HasFinish ? "&Finish" : "&Next >"; if (!string.IsNullOrEmpty(_currentContentItem.NextText)) { buttonNext.Text = _currentContentItem.NextText; } ResizeControls(); Slyce.Common.Utility.ResumePainting(); Cursor = Cursors.Default; }