Exemplo n.º 1
0
        private void RefreshSettingsAccountList()
        {
            List <IAccountSettings> userAllAccounts = loggedUser.GetAllUserAccounts();

            sharedUserExcelAccounts = loggedUser.GetAllSharedUserAccounts();
            userExcelAccounts       = SettingsManager.GetAllUserAccountsInSource(userAllAccounts, Sources.Excel);
            sharedUserExcelAccounts = SettingsManager.GetAllUserAccountsInSource(sharedUserExcelAccounts, Sources.Excel);
            panelSelectFolderForFiles.Hide();
            cmbAccounts.Items.Clear();
            foreach (var item in userExcelAccounts)
            {
                cmbAccounts.Items.Add(item.Name);
            }
            comboBox_shared.Items.Clear();
            if (sharedUserExcelAccounts.Count > 0)
            {
                comboBox_shared.Show();
                foreach (var item in sharedUserExcelAccounts)
                {
                    comboBox_shared.Items.Add(item.Name);
                }
            }
            else
            {
                comboBox_shared.Hide();
            }
        }
Exemplo n.º 2
0
        private void RefreshSettingsAccountList()
        {
            List <IAccountSettings> userAllAccounts = loggedUser.GetAllUserAccounts();

            sharedUserTrelloAccounts = loggedUser.GetAllSharedUserAccounts();
            userTrelloAccounts       = SettingsManager.GetAllUserAccountsInSource(userAllAccounts, Sources.Trello);
            sharedUserTrelloAccounts = SettingsManager.GetAllUserAccountsInSource(sharedUserTrelloAccounts, Sources.Trello);

            activeTrelloAccounts.Items.Clear();
            foreach (var item in userTrelloAccounts)
            {
                activeTrelloAccounts.Items.Add(item.Name);
            }
            sharedTrelloAccountsBox.Items.Clear();
            if (sharedUserTrelloAccounts.Count > 0)
            {
                sharedTrelloAccountsBox.Show();
                foreach (var item in sharedUserTrelloAccounts)
                {
                    sharedTrelloAccountsBox.Items.Add(item.Name);
                }
            }
            else
            {
                sharedTrelloAccountsBox.Visible = false;
            }
        }
Exemplo n.º 3
0
        private void RefreshSettingsAccountList()
        {
            List <IAccountSettings> userAllAccounts = loggedUser.GetAllUserAccounts();

            sharedUserDBAccounts = loggedUser.GetAllSharedUserAccounts();
            userDBAccounts       = SettingsManager.GetAllUserAccountsInSource(userAllAccounts, Sources.DataBase);
            sharedUserDBAccounts = SettingsManager.GetAllUserAccountsInSource(sharedUserDBAccounts, Sources.DataBase);

            cmbAcconts.Items.Clear();
            foreach (var item in userDBAccounts)
            {
                cmbAcconts.Items.Add(item.Name);
            }
            cmbSharedAccounts.Items.Clear();
            if (sharedUserDBAccounts.Count > 0)
            {
                label13.Show();
                cmbSharedAccounts.Show();
                foreach (var item in sharedUserDBAccounts)
                {
                    cmbSharedAccounts.Items.Add(item.Name);
                }
            }
            else
            {
                label13.Hide();
                cmbSharedAccounts.Hide();
            }
        }
Exemplo n.º 4
0
        public SettingsDialog(UserProvider.UserDTO loggedUser)
        {
            InitializeComponent();
            this.loggedUser         = loggedUser;
            this.userAccounts       = loggedUser.GetAllUserAccounts();
            this.sharedUserAccounts = loggedUser.GetAllSharedUserAccounts();

            dbSetingDialog      = new DBSettingDialog(loggedUser, userAccounts, sharedUserAccounts);
            trelloSettingDialog = new TrelloSettingDialog(loggedUser, userAccounts, sharedUserAccounts);
            gsSettingDialog     = new GoogleSheetsSettingDialog(loggedUser, userAccounts, sharedUserAccounts);
            excelSettingsDialog = new ExcelSettingsDialog(loggedUser, userAccounts, sharedUserAccounts);
        }
        private void RefreshSettings()
        {
            List <IAccountSettings> userAllAccounts = loggedUser.GetAllUserAccounts();

            sharedUserGSAccounts = loggedUser.GetAllSharedUserAccounts();
            userGoogleAccounts   = SettingsManager.GetAllUserAccountsInSource(userAllAccounts, Sources.GoogleSheets);
            sharedUserGSAccounts = SettingsManager.GetAllUserAccountsInSource(sharedUserGSAccounts, Sources.GoogleSheets);

            AccountsNameComboBox.Items.Clear();
            foreach (var item in userGoogleAccounts)
            {
                AccountsNameComboBox.Items.Add(item.Name);
            }
            GR4ComboBox.Items.Clear();
            foreach (var item in userGoogleAccounts)
            {
                GR4ComboBox.Items.Add(item.Name);
            }
        }