Beispiel #1
0
        public Global()
        {
            NetworkManager = new NetworkManager ();
            //ImageManager = new ImageManager ();

            //db set up
            string sqliteFilename = "TAP5050_DB.db3";
            string documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.Personal); // Documents folder
            string dbPath = Path.Combine(documentsPath, sqliteFilename);
            DatabaseManager = new DatabaseManager (dbPath);
        }
Beispiel #2
0
        public override void OnCreate()
        {
            base.OnCreate ();

                AndroidEnvironment.UnhandledExceptionRaiser += MyApp_UnhandledExceptionHandler;

                TapGlobal tapglobal = new TapGlobal (this);
                taputil= new TapUtil (this);
                GlobalVariable staticvalue = new GlobalVariable ();
                networknamager = new NetworkManager ();
                imagemanager = new ImageManager ();
                debugreport = new DebugReport (this);

                string databasename="tap5050seller.db";
                string path = global::Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/Tap5050/";
                Java.IO.File basefile = new Java.IO.File (global::Android.OS.Environment.ExternalStorageDirectory.AbsolutePath+"/Tap5050/");

                Java.IO.File internalbasefile = new Java.IO.File (System.Environment.GetFolderPath (System.Environment.SpecialFolder.Personal));
                string appinternalpath = System.Environment.GetFolderPath (System.Environment.SpecialFolder.Personal);
                var personalpath=appinternalpath+databasename;

                bool success = true;
                if (!internalbasefile.Exists()){
                    success=internalbasefile.Mkdirs();
                    Java.IO.File file =new Java.IO.File(personalpath);
                    file.CreateNewFile ();
                }

                if (success){
                    databasemanager = new DatabaseManager (personalpath);
                }

                INSTANCE = this;
        }