using System;
using Infragistics.Win.UltraWinTabbedMdi;

namespace Infragistics_TabbedMdiTest
{
    public static class FormUtils
    {
        public static void Reopen(ChildForm form, MdiForm parentForm)
        {
            //MdiTabGroup group = null;

            //{
            //    MdiTab tab = parentForm.ultraTabbedMdiManager1.TabFromForm(form);

            //    if (tab != null)
            //        group = tab.TabGroup;
            //}

            //form.Close();
            form.ResetForm();
            //var childForm = new ChildForm();
            //childForm.MdiParent = parentForm;
            //childForm.Show();

            //if (group != null)
            //{
            //    try
            //    {
            //        MdiTab tab = parentForm.ultraTabbedMdiManager1.TabFromForm(childForm);

            //        if (tab != null && group.Manager != null)
            //            tab.MoveToGroup(group);
            //        else
            //        {

            //        }
            //    }
            //    catch (Exception ex)
            //    {

            //    }
            //}
        }
    }
}
