示例#1
0
        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);
            //    }
            //}
        }