Ejemplo n.º 1
0
 public OgreException(OgreException rhs) : this(OgrePINVOKE.new_OgreException__SWIG_2(OgreException.getCPtr(rhs)), true)
 {
     if (OgrePINVOKE.SWIGPendingException.Pending)
     {
         throw OgrePINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 2
0
 private void checkOgreException()
 {
     if (Mogre.OgreException.IsThrown)
     {
         string        a = "";
         OgreException x = Mogre.OgreException.LastException;
         a += "Source: " + x.Source + "; Number: " + x.Number.ToString() + "; Description: " + x.Description;
         log("[ main() ] " + a);
         Mogre.OgreException.ClearLastException();
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Wczytuje daną reklamę z dysku i ładuje do TextureManagera. W przypadku błędu zwraca null
        /// </summary>
        /// <param name="ad"></param>
        /// <returns></returns>
        public string LoadAdTexture(Ad ad)
        {
            if (ad == null)
            {
                return(null);
            }

            string path = ad.path;

            try
            {
                //     Image s = new Image();

                //       Image k = s.Load("7178C1654343ECCF358E8EEA0271100B.gif", "General");
                //     Image k = s.Load("1.gif", "General");

                //   TextureManager.Singleton.Load("../../media/FE55EF898AF9D8FE122A83882B98C32D.gif", "Ads");
                if (path.EndsWith(".gif"))
                {
                    //   throw new Exception("nie ma obslugi gif");
                }

                TextureManager.Singleton.Load(path, "Ads");
                return(path);
            }

            catch (SEHException ex)
            {
                // nie można zdekodować obrazka? pobieranie jednak sie nie udalo?
                if (OgreException.IsThrown)
                {
                    try
                    {
                        OgreException.ClearLastException();
                        File.Delete(path);
                    }
                    catch (Exception ex2)
                    {
                    }
                }

                return(null);
            }
        }
Ejemplo n.º 4
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(OgreException obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }