Exemple #1
0
 public void LinkPageForm(object tTag)
 {
     try
     {
         Assembly aAssembly = Assembly.GetEntryAssembly();
         string   strPath   = aAssembly.GetName().ToString();
         string   strForm   = strPath.Substring(0, strPath.IndexOf(",")) + "." + LinkPage.Trim();
         Type     tType     = aAssembly.GetType(strForm);
         Form     frm       = ((Form)Activator.CreateInstance(tType));
         frm.Tag = tTag;
         frm.ShowDialog();
     }
     catch (Exception eException)
     {
         System.Windows.Forms.MessageBox.Show(eException.Message);
     }
 }
Exemple #2
0
 public Form LinkPageForm()
 {
     try
     {
         Assembly aAssembly = Assembly.GetEntryAssembly();
         string   strPath   = aAssembly.GetName().ToString();
         string   strForm   = strPath.Substring(0, strPath.IndexOf(",")) + "." + LinkPage.Trim();
         Type     tType     = aAssembly.GetType(strForm);
         return((Form)Activator.CreateInstance(tType));
     }
     catch (Exception eException)
     {
         System.Windows.Forms.MessageBox.Show(eException.Message);
         return(null);
     }
 }