private void Button_Clicked(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(accountName.Text) || string.IsNullOrEmpty(accountPassword.Text))
            {
                DisplayAlert("Failure", "Please insert data into the fields", "Ok!");
                return;
            }

            buttonSubmit.BackgroundColor = Color.FromRgba(52, 152, 219, 255);
            Account account = new Account()
            {
                Username = accountName.Text,
                Password = accountPassword.Text,
                Detail   = accountDetail.Text
            };

            if (App.database.Add(ref account))
            {
                DisplayAlert("Success", "Account successfully added", "Great!");
                OnAccountChanged?.Invoke(this, new AccountDataEventArgs(account.Id));
            }
            else
            {
                DisplayAlert("Failure", "Unable to add account", "Ok!");
            }

            Application.Current.MainPage.Navigation.PopAsync();
        }
예제 #2
0
 void accountChanged()
 {
     // steam account changed! (login/logout)
     OnAccountChanged?.Invoke(this, new AccountChangedEventArgs()
     {
         SteamID = currentUserId,
     });
 }
예제 #3
0
        private void _worker_OnAccountChanged(object?sender, AccountChangedEventArgs e)
        {
            CurrentSteamId = e.SteamID;
            OnAccountChanged?.Invoke(this, e);

            if (e.SteamID != "")
            {
                // user logged in
                // need to wait a few seconds otherwise our keybinds are overwritten again?!
                Task.Delay(5000).ContinueWith(t =>
                {
                    if (!FileUtils.AppData.HasBackup(CurrentSteamId))
                    {
                        CreateBackup();
                    }

                    WriteKeybinds();
                });
            }
        }
예제 #4
0
    protected override void OnOkClicked()
    {
        userWalletManager.SetWalletAccount(currentlySelectedAddress - 1);
        userWalletManager.SetWalletPath(addressesIndex == 0 ? Wallet.DEFAULT_PATH : Wallet.ELECTRUM_LEDGER_PATH);

        tradableAssetNotificationManager.LoadNewNotificationList();

        lockedPRPSManager.ClearList();
        lockedPRPSManager.PeriodicUpdate();
        lockPRPSManager.PeriodicUpdate();

        ethereumTransactionManager.ClearTransactionList();
        ethereumTransactionManager.PeriodicUpdate();
        ethereumTransactionButtonManager.ProcessNewAssetList();

        tradableAssetButtonManager.ResetButtonNotifications();
        tradableAssetManager.PeriodicUpdate();

        OnAccountChanged?.Invoke(currentlySelectedAddress - 1);
    }
예제 #5
0
 private void AccountListView_ItemTapped(object sender, ItemTappedEventArgs e)
 {
     OnAccountChanged?.Invoke(this, new AccountDataEventArgs((e.Item as Account).Id));
     Application.Current.MainPage.Navigation.PopAsync();
 }