예제 #1
0
 /// <summary>
 /// Constructor for reload assembly
 /// </summary>
 static Program()
 {
     try
     {
         AppDomain.CurrentDomain.AssemblyResolve += (sender, e) =>
         {
             AssemblyName requestedName = new AssemblyName(e.Name);
             //request to change the dll assembly
             if (requestedName.Name == "Oracle.DataAccess")
             {
                 return(Assembly.LoadFrom(UiUtility.GetOracleDataAccessPath()));
             }
             else
             {
                 return(null);
             }
         };
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, "Please Check", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }