Exemplo n.º 1
0
        private void GetSelectedAccountAndFillTokensToControl()
        {
            if (cmbAccounts.SelectedItem != null)
            {
                IAccountSettings selectedAccount = userExcelAccounts.FirstOrDefault(x => x.Name == cmbAccounts.SelectedItem.ToString());
                userExcelFullAccount = (ExcelAccountSettings)loggedUser.GetDetailsForAccount(selectedAccount.ID, selectedAccount.Owner);
                cmbTokens.Items.Clear();
                cmbTokens.Text = String.Empty;
                panelSelectFolderForFiles.Show();
                pathToFolder = userExcelFullAccount.GetPathToCurrentFolderForUserFromConfigFile(new AuthorizationResult(true, loggedUser));
                if (!String.IsNullOrEmpty(pathToFolder))
                {
                    txtCurrentFolder.Text = pathToFolder;
                    panelSelectFolderForFiles.Show();
                }

                foreach (var item in userExcelFullAccount.Tokens)
                {
                    cmbTokens.Items.Add(item.TokenName);
                }
            }
            else if (cmbAccounts.SelectedItem != null && dataGrid_mapping.Rows.Count > 1)
            {
                FillDataGridWithExistingMapping();
            }
        }
Exemplo n.º 2
0
 private void activeTrelloAccounts_SelectedIndexChanged(object sender, EventArgs e)
 {
     trelloToken.Enabled = true;
     trelloToken.Items.Clear();
     trelloToken.SelectedItem    = null;
     addingTrelloToken.Enabled   = true;
     trelloTokenGroup.Enabled    = true;
     addingAccountGB.Visible     = false;
     addingAccount.Visible       = false;
     informationGroupBox.Visible = false;
     if (activeTrelloAccounts.SelectedItem != null)
     {
         IAccountSettings account = userTrelloAccounts.FirstOrDefault(x => x.Name == activeTrelloAccounts.SelectedItem.ToString());
         if (account != null)
         {
             userTrelloFullAccount = (TrelloAccountSettings)loggedUser.GetDetailsForAccount(account.ID);
             if (userTrelloAccounts != null)
             {
                 trelloToken.Items.Clear();
                 foreach (var token in userTrelloFullAccount.Tokens)
                 {
                     trelloToken.Items.Add(token.TokenName);
                 }
             }
         }
     }
 }
Exemplo n.º 3
0
 private void GetSelectedAccountAndFillTokensToControl()
 {
     if (cmbAcconts.SelectedItem != null)
     {
         IAccountSettings selectedAccount = userDBAccounts.FirstOrDefault(x => x.Name == cmbAcconts.SelectedItem.ToString());
         userDBFullAccount = (DatabaseAccountSettings)loggedUser.GetDetailsForAccount(selectedAccount.ID, selectedAccount.Owner);
         cmbTokens.Items.Clear();
         cmbTokens.Text      = String.Empty;
         numUpdateTime.Value = userDBFullAccount.MinUpdateTime;
         foreach (var item in userDBFullAccount.Tokens)
         {
             cmbTokens.Items.Add(item.TokenName);
         }
         btnChangeToken.Enabled = false;
         btnDeleteToken.Enabled = false;
     }
 }