예제 #1
0
        private static void GetAllForms(ref List <Form_WizardBase> _list, Form_WizardBase _entryForm)
        {
            _list.Add(_entryForm);

            if (_entryForm.Next != null)
            {
                WizardManager.GetAllForms(ref _list, _entryForm.Next);
            }
        }
예제 #2
0
        public static T StartWizard <T>(Form_WizardBase _entryForm)
        {
            if (_entryForm.Previous != null)
            {
                throw new Exception("EntryForm ne sme imet previousa!!!");
            }


            T _t = WizardManager.RunForm <T>(_entryForm);

            #region "Dispose all"
            List <Form_WizardBase> _list = new List <Form_WizardBase>();
            WizardManager.GetAllForms(ref _list, _entryForm);
            foreach (Form_WizardBase _form_WizardBase in _list)
            {
                if (!_entryForm.Disposing)
                {
                    _form_WizardBase.Dispose();
                }
            }
            #endregion "Dispose all"

            return(_t);
        }