Exemplo n.º 1
0
 public static void OpenInputForm(XtraUserControl uc, string vnTitle, string enTitle, Size size)
 {
     string languageID = new Configuration().Language;
     frmOpen frm = new frmOpen();
     frm.Text = (languageID.Equals("vi-VN")) ? vnTitle : enTitle;
     frm.Size = size;
     frm.MaximumSize = size;
     frm.MinimumSize = size;
     frm.Controls.Clear();
     uc.Dock = DockStyle.Fill;
     frm.Controls.Add(uc);
     uc.Show();
     frm.ShowDialog();
 }
Exemplo n.º 2
0
 public static void OpenForm(frmMain index, XtraUserControl uc, string vnTitle, string enTitle, XtraTabbedMdiManager tabMain)
 {
     string languageID = new Configuration().Language;
     bool found = false;
     foreach (XtraForm frm in index.MdiChildren)
     {
         if (frm.Text.Equals((languageID.Equals("vi-VN")) ? vnTitle : enTitle))
         {
             found = true;
             break;
         }
     }
     if (found)
     {
         foreach (XtraMdiTabPage tab in tabMain.Pages)
         {
             if (tab.Text.Equals((languageID.Equals("vi-VN")) ? vnTitle : enTitle))
             {
                 tabMain.SelectedPage = tab;
                 break;
             }
         }
     }
     else
     {
         XtraForm frm = new XtraForm();
         frm.Text = (languageID.Equals("vi-VN")) ? vnTitle : enTitle;
         frm.MdiParent = index;
         uc.Dock = DockStyle.Fill;
         frm.Controls.Clear();
         frm.Controls.Add(uc);
         frm.Show();
     }
 }