示例#1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);



            var PackageInfo = PackageManager.GetPackageInfo(PackageName, 0);

            Core.Globals.AndroidVersionCode = PackageInfo.VersionCode;
            Core.Globals.AndroidVersionName = PackageInfo.VersionName;
            Core.Globals.IsUpdateNeeded     = false;

            Core.Globals.AppID      = "1001";
            Core.Globals.AppVersion = Core.Globals.AndroidVersionCode.ToString("D6");
            Core.Globals.OSType     = "ANDROID";
            Core.Globals.OSVersion  = Android.OS.Build.VERSION.Release;

            Core.Globals.MACAddress = DeviceUtil.GetMACAddress();

            var appPreferences = new AppPreferences(this.ApplicationContext);

            Core.Globals.MasterDBInfo            = new DBFileInfo();
            Core.Globals.MasterDBInfo.FileName   = appPreferences.GetMasterDBInfoFileName();
            Core.Globals.MasterDBInfo.FileSize   = appPreferences.GetMasterDBInfoFileSize();
            Core.Globals.MasterDBInfo.FileType   = appPreferences.GetMasterDBInfoFileType();
            Core.Globals.MasterDBInfo.IsComplete = appPreferences.GetMasterDBInfoIsComplete();
            Core.Globals.MasterDBInfo.PathHTTP   = appPreferences.GetMasterDBInfoPathHttp();
            Core.Globals.MasterDBInfo.Version    = appPreferences.GetMasterDBInfoVersion();

            Core.Globals.AuditDBInfo = new DBFileInfo();

            //if (int.Parse(Core.Globals.AppInformation.Version) > Core.Globals.AndroidVersionCode)
            //{
            //    Core.Globals.IsUpdateNeeded = true;
            //} else
            //{
            //    Core.Globals.IsUpdateNeeded = false;
            //}

            //transitionTimer = new Timer(this.TransitionViewController, null, 2000, System.Threading.Timeout.Infinite);
        }