Exemplo n.º 1
0
        void ResetData()
        {
            MySurname    = null;
            MyName       = null;
            MyMiddlename = null;
            MyPhone      = null;
            MyEmail      = null;
            MyHomePhone  = null;
            MySite       = null;
            MyDegree     = null;
            MyCardName   = null;
            MyBirthdate  = null;
            PersonalImageAdapter.Photos?.Clear();
            PersonalImageAdapter.Photos?.Add(null);
            _personalImageAdapter.NotifyDataSetChanged();
            NativeMethods.ResetHomeAddress();
            NativeMethods.ResetSocialNetworkList();

            EditCompanyDataActivity.Position = null;
            //if (Directory.Exists(cards_cache_dir))
            //    Directory.Delete(cards_cache_dir, true);
            _databaseMethods.CleanPersonalNetworksTable();
            _databaseMethods.ClearUsersCardTable();
            _nativeMethods.RemovePersonalImages();
            _surnameEt.Text        = null;
            _nameMiddlenameEt.Text = null;
            _mobilePhoneEt.Text    = null;
            _emailEt.Text          = null;
            _homePhoneEt.Text      = null;
            _siteEt.Text           = null;
            _degreeEt.Text         = null;
            _cardNameEt.Text       = null;
            FillFields();
        }
Exemplo n.º 2
0
 public void ClearAll()
 {
     #region clearing tables, variables and photos
     var TaskA = new Task(async() =>
     {
         await RemovePersonalImages();
         await RemoveLogo();
         await RemoveOfflineCache();
         //var QRs_cache_dir = Path.Combine(docs, Constants.QRs_cache_dir);
     });
     TaskA.Start();
     databaseMethods.CleanPersonalNetworksTable();
     databaseMethods.ClearCompanyCardTable();
     databaseMethods.ClearUsersCardTable();
     //CropCompanyLogoViewController.currentImage = null;
     CompanyDataActivity.CroppedResult = null;
     //CompanyAddressMapViewController.lat = null;
     //CompanyAddressMapViewController.lng = null;
     CompanyAddressMapActivity.CompanyLat            = null;
     CompanyAddressMapActivity.CompanyLng            = null;
     CompanyAddressActivity.FullCompanyAddressStatic = null;
     CompanyAddressActivity.Country       = null;
     CompanyAddressActivity.Region        = null;
     CompanyAddressActivity.City          = null;
     CompanyAddressActivity.Index         = null;
     CompanyAddressActivity.Notation      = null;
     CompanyDataActivity.CompanyName      = null;
     CompanyDataActivity.LinesOfBusiness  = null;
     CompanyDataActivity.Position         = null;
     CompanyDataActivity.FoundationYear   = null;
     CompanyDataActivity.Clients          = null;
     CompanyDataActivity.CompanyPhone     = null;
     CompanyDataActivity.CorporativePhone = null;
     CompanyDataActivity.Fax             = null;
     CompanyDataActivity.CompanyEmail    = null;
     CompanyDataActivity.CorporativeSite = null;
     PersonalDataActivity.MySurname      = null;
     PersonalDataActivity.MyName         = null;
     PersonalDataActivity.MyMiddlename   = null;
     PersonalDataActivity.MyPhone        = null;
     PersonalDataActivity.MyEmail        = null;
     PersonalDataActivity.MyHomePhone    = null;
     PersonalDataActivity.MySite         = null;
     PersonalDataActivity.MyDegree       = null;
     PersonalDataActivity.MyCardName     = null;
     try { PersonalImageAdapter.Photos?.Clear(); } catch { }
     PersonalDataActivity.MyBirthdate = null;
     NativeMethods.ResetHomeAddress();
     NativeMethods.ResetCompanyAddress();
     EditCompanyDataActivity.Position = null;
     EditCompanyDataActivity.LogoId   = null;
     #endregion clearing tables, variables and photos
 }
        void ClearAll()
        {
            var taskA = new Task(async() =>
            {
                await _nativeMethods.RemovePersonalImages();
                await _nativeMethods.RemoveLogo();
                //await nativeMethods.RemoveOfflineCache();
                //var QRs_cache_dir = Path.Combine(docs, Constants.QRs_cache_dir);
            });

            taskA.Start();
            _databaseMethods.CleanPersonalNetworksTable();
            _databaseMethods.ClearCompanyCardTable();
            _databaseMethods.ClearUsersCardTable();
            //CropCompanyLogoViewController.currentImage = null;
            CompanyDataActivity.CroppedResult = null;
            NativeMethods.ResetCompanyAddress();
            CompanyDataActivity.CompanyName      = null;
            CompanyDataActivity.LinesOfBusiness  = null;
            CompanyDataActivity.Position         = null;
            CompanyDataActivity.FoundationYear   = null;
            CompanyDataActivity.Clients          = null;
            CompanyDataActivity.CompanyPhone     = null;
            CompanyDataActivity.CorporativePhone = null;
            CompanyDataActivity.Fax             = null;
            CompanyDataActivity.CompanyEmail    = null;
            CompanyDataActivity.CorporativeSite = null;
            PersonalDataActivity.MySurname      = null;
            PersonalDataActivity.MyName         = null;
            PersonalDataActivity.MyMiddlename   = null;
            PersonalDataActivity.MyPhone        = null;
            PersonalDataActivity.MyEmail        = null;
            PersonalDataActivity.MyHomePhone    = null;
            PersonalDataActivity.MySite         = null;
            PersonalDataActivity.MyDegree       = null;
            PersonalDataActivity.MyCardName     = null;
            try { PersonalImageAdapter.Photos.Clear(); } catch { }
            PersonalDataActivity.MyBirthdate = null;

            NativeMethods.ResetHomeAddress();
            EditCompanyDataActivity.Position = null;
            EditCompanyDataActivity.LogoId   = null;
        }
        private async Task <bool> Clear()
        {
            await Task.Run(async() =>
            {
                await _nativeMethods.RemovePersonalImages();
                await _nativeMethods.RemoveLogo();
            });

            _databaseMethods.CleanPersonalNetworksTable();
            _databaseMethods.ClearCompanyCardTable();
            _databaseMethods.ClearUsersCardTable();
            NativeMethods.ResetSocialNetworkList();
            EditCompanyDataActivity.CroppedResult = null;
            CompanyDataActivity.CroppedResult     = null;
            NativeMethods.ResetCompanyAddress();
            CompanyDataActivity.CompanyName      = null;
            CompanyDataActivity.LinesOfBusiness  = null;
            CompanyDataActivity.Position         = null;
            CompanyDataActivity.FoundationYear   = null;
            CompanyDataActivity.Clients          = null;
            CompanyDataActivity.CompanyPhone     = null;
            CompanyDataActivity.CorporativePhone = null;
            CompanyDataActivity.Fax               = null;
            CompanyDataActivity.CompanyEmail      = null;
            CompanyDataActivity.CorporativeSite   = null;
            EditPersonalDataActivity.MySurname    = null;
            EditPersonalDataActivity.MyName       = null;
            EditPersonalDataActivity.MyMiddlename = null;
            EditPersonalDataActivity.MyPhone      = null;
            EditPersonalDataActivity.MyEmail      = null;
            EditPersonalDataActivity.MyHomePhone  = null;
            EditPersonalDataActivity.MySite       = null;
            EditPersonalDataActivity.MyDegree     = null;
            EditPersonalDataActivity.MyCardName   = null;
            try { EditPersonalImageAdapter.Photos.Clear(); } catch { }
            try { PersonalImageAdapter.Photos.Clear(); } catch { }
            EditPersonalDataActivity.MyBirthDate = null;
            NativeMethods.ResetCompanyAddress();
            EditCompanyDataActivity.Position = null;
            EditCompanyDataActivity.LogoId   = null;
            return(true);
        }
Exemplo n.º 5
0
 protected override void OnPause()
 {
     base.OnPause();
     _databaseMethods.CleanPersonalNetworksTable();
     foreach (var item /*index*/ in SocialNetworkAdapter.SocialNetworks)//.selectedIndexes)
     {
         int socialnetworkId = 0;
         if (item.SocialNetworkName == Constants.facebook)
         {
             socialnetworkId = 1;
         }
         else if (item.SocialNetworkName == Constants.instagram)
         {
             socialnetworkId = 4;
         }
         else if (item.SocialNetworkName == Constants.linkedin)
         {
             socialnetworkId = 3;
         }
         else if (item.SocialNetworkName == Constants.twitter)
         {
             socialnetworkId = 5;
         }
         else if (item.SocialNetworkName == Constants.vkontakte)
         {
             socialnetworkId = 2;
         }
         if (!String.IsNullOrEmpty(item.UsersUrl))
         {
             _databaseMethods.InsertPersonalNetwork(new SocialNetworkModel {
                 SocialNetworkID = socialnetworkId, ContactUrl = item.UsersUrl
             });
         }
         //databaseMethods.InsertPersonalNetwork(new SocialNetworkModel { SocialNetworkID = datalist[index].Id, ContactUrl = datalist[index].ContactUrl });
     }
 }
Exemplo n.º 6
0
        public static void log_out(Activity context)
        {
            //string dbPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "ormdemo.db3");
            //var db = new SQLiteConnection(dbPath);
            //var docs = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            //var cards_cache_dir = Path.Combine(docs, Constants.CardsPersonalImages);
            //var logo_cache_dir = Path.Combine(docs, Constants.CardsLogo);



            #region clearing tables, variables and photos
            var taskA = new Task(async() =>
            {
                await _nativeMethods.RemovePersonalImages();
                await _nativeMethods.RemoveLogo();
                await _nativeMethods.RemoveOfflineCache();
                //var QRs_cache_dir = Path.Combine(docs, Constants.QRs_cache_dir);
            });
            taskA.Start();
            NativeMethods.ResetSocialNetworkList();
            _databaseMethods.CleanPersonalNetworksTable();
            _databaseMethods.ClearCompanyCardTable();
            _databaseMethods.ClearUsersCardTable();
            _databaseMethods.ClearValidTillRepeatAfterTable();
            _databaseMethods.CleanCloudSynTable();
            _databaseMethods.CleanCardNames();
            _databaseMethods.CleanEtagTable();
            //clearing table
            try
            {
                _databaseMethods.CleanDifferentPurposesTable();
            }
            catch { }

            //clearing table
            try
            {
                _databaseMethods.CleanLoginAfterTable();
            }
            catch { }

            //clearing table
            try
            {
                _databaseMethods.CleanLoginedFromTable();
            }
            catch { }

            //CompanyDataActivity.currentImage = null;
            CompanyDataActivity.CroppedResult = null;
            //CompanyAddressMapViewController.lat = null;
            //CompanyAddressMapViewController.lng = null;
            CompanyAddressMapActivity.CompanyLat            = null;
            CompanyAddressMapActivity.CompanyLng            = null;
            CompanyAddressActivity.FullCompanyAddressStatic = null;
            CompanyAddressActivity.Country       = null;
            CompanyAddressActivity.Region        = null;
            CompanyAddressActivity.City          = null;
            CompanyAddressActivity.Index         = null;
            CompanyAddressActivity.Notation      = null;
            CompanyDataActivity.CompanyName      = null;
            CompanyDataActivity.LinesOfBusiness  = null;
            CompanyDataActivity.Position         = null;
            CompanyDataActivity.FoundationYear   = null;
            CompanyDataActivity.Clients          = null;
            CompanyDataActivity.CompanyPhone     = null;
            CompanyDataActivity.CorporativePhone = null;
            CompanyDataActivity.Fax             = null;
            CompanyDataActivity.CompanyEmail    = null;
            CompanyDataActivity.CorporativeSite = null;
            PersonalDataActivity.MySurname      = null;
            PersonalDataActivity.MyName         = null;
            PersonalDataActivity.MyMiddlename   = null;
            PersonalDataActivity.MyPhone        = null;
            PersonalDataActivity.MyEmail        = null;
            PersonalDataActivity.MyHomePhone    = null;
            PersonalDataActivity.MySite         = null;
            PersonalDataActivity.MyDegree       = null;
            PersonalDataActivity.MyCardName     = null;
            try { PersonalImageAdapter.Photos.Clear(); } catch { }
            PersonalDataActivity.MyBirthdate = null;
            NativeMethods.ResetHomeAddress();
            NativeMethods.ResetCompanyAddress();
            try { CreatingCardActivity.Datalist.Clear(); } catch { }
            try { QrActivity.CardNames.Clear(); } catch { }
            EditCompanyDataActivity.Position          = null;
            EditCompanyDataActivity.LogoId            = null;
            QrActivity.CardsRemaining                 = 0;
            QrActivity.IsPremium                      = false;
            QrActivity.ExtraPersonData                = null;
            QrActivity.ExtraEmploymentData            = null;
            QrActivity.CompanyLogoInQr                = null;
            WaitingEmailConfirmActivity.CameFromPurge = false;
            //clearing webView cookies
            CookieSyncManager.CreateInstance(context);
            CookieManager cookieManager = CookieManager.Instance;
            cookieManager.RemoveAllCookies(null);
            #endregion clearing tables, variables and photos
        }
Exemplo n.º 7
0
 private void ClearAll()
 {
     #region clearing tables, variables and photos
     var taskA = new Task(async() =>
     {
         await _nativeMethods.RemovePersonalImages();
         await _nativeMethods.RemoveLogo();
     });
     taskA.Start();
     _databaseMethods.CleanPersonalNetworksTable();
     _databaseMethods.ClearCompanyCardTable();
     _databaseMethods.ClearUsersCardTable();
     IdsOfAttachments.Clear();
     ImagesFromServerList.Clear();
     try
     {
         NativeMethods.ResetSocialNetworkList();
     }
     catch { }
     CompanyDataActivity.CompanyName      = null;
     CompanyDataActivity.LinesOfBusiness  = null;
     CompanyDataActivity.Position         = null;
     CompanyDataActivity.FoundationYear   = null;
     CompanyDataActivity.Clients          = null;
     CompanyDataActivity.CompanyPhone     = null;
     CompanyDataActivity.CorporativePhone = null;
     CompanyDataActivity.Fax             = null;
     CompanyDataActivity.CompanyEmail    = null;
     CompanyDataActivity.CorporativeSite = null;
     PersonalDataActivity.MySurname      = null;
     PersonalDataActivity.MyName         = null;
     PersonalDataActivity.MyMiddlename   = null;
     PersonalDataActivity.MyPhone        = null;
     PersonalDataActivity.MyEmail        = null;
     PersonalDataActivity.MyHomePhone    = null;
     PersonalDataActivity.MySite         = null;
     PersonalDataActivity.MyDegree       = null;
     PersonalDataActivity.MyCardName     = null;
     try { PersonalImageAdapter.Photos.Clear(); } catch { }
     PersonalDataActivity.MyBirthdate = null;
     NativeMethods.ResetHomeAddress();
     NativeMethods.ResetCompanyAddress();
     EditCompanyDataActivity.CompanyName      = null;
     EditCompanyDataActivity.LinesOfBusiness  = null;
     EditCompanyDataActivity.Position         = null;
     EditCompanyDataActivity.FoundationYear   = null;
     EditCompanyDataActivity.Clients          = null;
     EditCompanyDataActivity.CompanyPhone     = null;
     EditCompanyDataActivity.CorporativePhone = null;
     EditCompanyDataActivity.Fax             = null;
     EditCompanyDataActivity.CompanyEmail    = null;
     EditCompanyDataActivity.CorporativeSite = null;
     EditPersonalDataActivity.MySurname      = null;
     EditPersonalDataActivity.MyName         = null;
     EditPersonalDataActivity.MyMiddlename   = null;
     EditPersonalDataActivity.MyPhone        = null;
     EditPersonalDataActivity.MyEmail        = null;
     EditPersonalDataActivity.MyHomePhone    = null;
     EditPersonalDataActivity.MySite         = null;
     EditPersonalDataActivity.MyDegree       = null;
     EditPersonalDataActivity.MyCardName     = null;
     EditPersonalDataActivity.MyBirthDate    = null;
     EditCompanyDataActivity.LogoId          = null;
     EditCompanyDataActivity.CroppedResult   = null;
     #endregion clearing tables, variables and photos
 }
Exemplo n.º 8
0
        void ClearData()
        {
            Task.Run(() =>
            {
                _nativeMethods.RemovePersonalImages();
                _nativeMethods.RemoveLogo();
                //await nativeMethods.RemoveOfflineCache();
            });
            _databaseMethods.CleanPersonalNetworksTable();
            _databaseMethods.ClearCompanyCardTable();
            _databaseMethods.ClearUsersCardTable();
            try { PersonalImageAdapter.Photos.Clear(); } catch { }
            //CompanyDataActivity.currentImage = null;
            CompanyDataActivity.CroppedResult = null;
            //CompanyAddressMapActivity.lat = null;
            //CompanyAddressMapActivity.lng = null;
            CompanyAddressMapActivity.CompanyLat            = null;
            CompanyAddressMapActivity.CompanyLng            = null;
            CompanyAddressActivity.FullCompanyAddressStatic = null;
            CompanyAddressActivity.Country       = null;
            CompanyAddressActivity.Region        = null;
            CompanyAddressActivity.City          = null;
            CompanyAddressActivity.Index         = null;
            CompanyAddressActivity.Notation      = null;
            CompanyDataActivity.CompanyName      = null;
            CompanyDataActivity.LinesOfBusiness  = null;
            CompanyDataActivity.Position         = null;
            CompanyDataActivity.FoundationYear   = null;
            CompanyDataActivity.Clients          = null;
            CompanyDataActivity.CompanyPhone     = null;
            CompanyDataActivity.CorporativePhone = null;
            CompanyDataActivity.Fax             = null;
            CompanyDataActivity.CompanyEmail    = null;
            CompanyDataActivity.CorporativeSite = null;
            PersonalDataActivity.MySurname      = null;
            PersonalDataActivity.MyName         = null;
            PersonalDataActivity.MyMiddlename   = null;
            PersonalDataActivity.MyPhone        = null;
            PersonalDataActivity.MyEmail        = null;
            PersonalDataActivity.MyHomePhone    = null;
            PersonalDataActivity.MySite         = null;
            PersonalDataActivity.MyDegree       = null;
            PersonalDataActivity.MyCardName     = null;
            //try { PersonalDataViewController.images_list.Clear(); } catch { }
            PersonalDataActivity.MyBirthdate      = null;
            HomeAddressActivity.FullAddressStatic = null;
            HomeAddressActivity.MyCountry         = null;
            HomeAddressActivity.MyRegion          = null;
            HomeAddressActivity.MyCity            = null;
            HomeAddressActivity.MyIndex           = null;
            HomeAddressActivity.MyNotation        = null;
            NewCardAddressMapActivity.Lat         = null;
            NewCardAddressMapActivity.Lng         = null;
            EditCompanyDataActivity.Position      = null;
            EditCompanyDataActivity.LogoId        = null;

            HomeAddressActivity.FullAddressTemp           = null;
            HomeAddressActivity.MyCountryTemp             = null;
            HomeAddressActivity.MyRegionTemp              = null;
            HomeAddressActivity.MyCityTemp                = null;
            HomeAddressActivity.MyIndexTemp               = null;
            HomeAddressActivity.MyNotationTemp            = null;
            CompanyAddressActivity.FullCompanyAddressTemp = null;
            CompanyAddressActivity.CountryTemp            = null;
            CompanyAddressActivity.RegionTemp             = null;
            CompanyAddressActivity.CityTemp               = null;
            CompanyAddressActivity.IndexTemp              = null;
            CompanyAddressActivity.NotationTemp           = null;
            try
            {
                NativeMethods.ResetSocialNetworkList();
            }
            catch { }
        }
        private void ClearAll()
        {
            _databaseMethods.CleanPersonalNetworksTable();
            _databaseMethods.ClearCompanyCardTable();
            _databaseMethods.ClearUsersCardTable();
            NativeMethods.ResetSocialNetworkList();
            CompanyDataActivity.CroppedResult     = null;
            EditCompanyDataActivity.CroppedResult = null;
            //CompanyAddressMapViewController.lat = null;
            //CompanyAddressMapViewController.lng = null;
            CompanyAddressMapActivity.CompanyLat            = null;
            CompanyAddressMapActivity.CompanyLng            = null;
            CompanyAddressActivity.FullCompanyAddressStatic = null;
            CompanyAddressActivity.Country       = null;
            CompanyAddressActivity.Region        = null;
            CompanyAddressActivity.City          = null;
            CompanyAddressActivity.Index         = null;
            CompanyAddressActivity.Notation      = null;
            CompanyDataActivity.CompanyName      = null;
            CompanyDataActivity.LinesOfBusiness  = null;
            CompanyDataActivity.Position         = null;
            CompanyDataActivity.FoundationYear   = null;
            CompanyDataActivity.Clients          = null;
            CompanyDataActivity.CompanyPhone     = null;
            CompanyDataActivity.CorporativePhone = null;
            CompanyDataActivity.Fax               = null;
            CompanyDataActivity.CompanyEmail      = null;
            CompanyDataActivity.CorporativeSite   = null;
            EditPersonalDataActivity.MySurname    = null;
            EditPersonalDataActivity.MyName       = null;
            EditPersonalDataActivity.MyMiddlename = null;
            EditPersonalDataActivity.MyPhone      = null;
            EditPersonalDataActivity.MyEmail      = null;
            EditPersonalDataActivity.MyHomePhone  = null;
            EditPersonalDataActivity.MySite       = null;
            EditPersonalDataActivity.MyDegree     = null;
            EditPersonalDataActivity.MyCardName   = null;
            try { PersonalImageAdapter.Photos.Clear(); } catch { }
            try { EditPersonalImageAdapter.Photos.Clear(); } catch { }
            EditPersonalDataActivity.MyBirthDate     = null;
            EditCompanyDataActivity.CompanyName      = null;
            EditCompanyDataActivity.LinesOfBusiness  = null;
            EditCompanyDataActivity.Position         = null;
            EditCompanyDataActivity.FoundationYear   = null;
            EditCompanyDataActivity.Clients          = null;
            EditCompanyDataActivity.CompanyPhone     = null;
            EditCompanyDataActivity.CorporativePhone = null;
            EditCompanyDataActivity.Fax             = null;
            EditCompanyDataActivity.CompanyEmail    = null;
            EditCompanyDataActivity.CorporativeSite = null;
            HomeAddressActivity.FullAddressStatic   = null;
            HomeAddressActivity.MyCountry           = null;
            HomeAddressActivity.MyRegion            = null;
            HomeAddressActivity.MyCity     = null;
            HomeAddressActivity.MyIndex    = null;
            HomeAddressActivity.MyNotation = null;
            NewCardAddressMapActivity.Lat  = null;
            NewCardAddressMapActivity.Lng  = null;
            EditCompanyDataActivity.LogoId = null;

            HomeAddressActivity.FullAddressTemp           = null;
            HomeAddressActivity.MyCountryTemp             = null;
            HomeAddressActivity.MyRegionTemp              = null;
            HomeAddressActivity.MyCityTemp                = null;
            HomeAddressActivity.MyIndexTemp               = null;
            HomeAddressActivity.MyNotationTemp            = null;
            CompanyAddressActivity.FullCompanyAddressTemp = null;
            CompanyAddressActivity.CountryTemp            = null;
            CompanyAddressActivity.RegionTemp             = null;
            CompanyAddressActivity.CityTemp               = null;
            CompanyAddressActivity.IndexTemp              = null;
            CompanyAddressActivity.NotationTemp           = null;
        }