private async void InitializeAppData() { //Zal.CommandExecutedOffline += OnCommandExecutedOffline; await Task.Run(async() => { //Zal.LoadOfflineCommands(LoadFromStorage(OFFLINE_COMMANDS_FILE)); //Zal.LoadDataFrom(await LoadFromStorageAsync(LOCAL_DATA_FILE)); var a = await LoadFromStorageAsync(LOCAL_DATA_FILE); //Zal.LoadDataFrom(a); await Zal.Session.TryLoginWithTokenAsync(); await Zal.StartSynchronizingAsync(); }); OnAppReady(); }
private async void LogOutButton_Clicked(object sender, EventArgs args) { Zal.Logout(); Navigation.InsertPageBefore(new LoginPage(), Navigation.NavigationStack.First()); await Navigation.PopToRootAsync(); }
protected override void OnSleep() { var a = Zal.GetDataJson(); SaveToStorage(LOCAL_DATA_FILE, a); }