Example #1
0
 public static void ReleaseObj(bool ResetPRP = true, bool ResetAP = true)
 {
     if (ResetPRP)
     {
         RP = null;
     }
     if (ResetAP)
     {
         Interaction = null;
     }
 }
Example #2
0
        public static void ReloadObj(ICatchError Er, bool ResetPRP = true, bool ResetAP = true)
        {
            try
            {
                ReleaseObj(ResetPRP, ResetAP);

                if (ResetPRP)
                {
                    RP = (IRemoteProvider)Activator.CreateInstance(
                        Type.GetTypeFromProgID("PresentRemoteProvider.RemoteProvider"));
                }
                if (ResetAP)
                {
                    Interaction = (IAPInteractionMng)Activator.CreateInstance(
                        Type.GetTypeFromProgID("APInterMng.APInteractionMng"));
                }
            }
            catch (Exception ex)
            {
                Er.Error(ex);
                ReleaseObj();
            }
        }