Пример #1
0
 public MessageManager()
 {
     this.pContentInfoQ = new Queue<ContentInfo>();
     this.contentInfoQLock = new object();
     dbm = wowZapp.LaffOutOut.Singleton.dbm;
     ccm = wowZapp.LaffOutOut.Singleton.ccm;
 }
Пример #2
0
        //public LaffOutOut(IntPtr handle, JniHandleOwnership transfer) : base(handle, transfer)
        public LaffOutOut(Context c)
        {
            context = c;
            AndroidData.SetTeleManager(c);
            LaffOutOut.Singleton = this;
            ContentDirectory = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            Version = "0.991";
            Published = "5th Feb 2013";

            this.dbm = new DBManager();
            try
            {
                this.dbm.SetupDB();
            } catch (Exception ex)
            {
                #if(DEBUG)
                System.Diagnostics.Debug.WriteLine("Database failed to be created! {0}--{1}", ex.Message, ex.StackTrace);
                #endif
            }//end try catch
            this.ccm = new ContentCacheManager();
            this.mmg = new MessageManager();

            if (LaffOutOut.Singleton == null)
                LaffOutOut.Singleton = this;

            #if DEBUG
            if (!System.IO.Directory.Exists(Android.OS.Environment.ExternalStorageDirectory + "/wz"))
                System.IO.Directory.CreateDirectory(Android.OS.Environment.ExternalStorageDirectory + "/wz");
            File.Copy(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "LOL.db"), Android.OS.Environment.ExternalStorageDirectory + "/wz/lol.db", true);
            #endif
        }