Exemple #1
0
        /// <summary>
        /// Handles the RowEnter event of the cbQueries control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.DataGridViewCellEventArgs"/> instance containing the event data.</param>
        private void cbAccounts_SelectedIndexChanged(object sender, EventArgs e)
        {
            GtAccount        accountDetails = (GtAccount)cbAccounts.SelectedItem;
            GtAccountAdapter _Adapter       = new GtAccountAdapter();
            var section = _SettingsHandler.GetConfig();

            _AccountList = _Adapter.ConvertToGtAccountList(section.AccountsItems);
            if (accountDetails == null)
            {
                throw new Exception("No account selected");
            }
        }
Exemple #2
0
        public TrackingForm()
        {
            InitializeComponent();

            _Auth            = new Auth2Register();
            _SettingsHandler = new GtSettingsHandler();
            _Section         = _SettingsHandler.GetConfig();
            _Adapter         = new GtAccountAdapter();
            _AccountList     = _Adapter.ConvertToGtAccountList(_Section.AccountsItems);
            //As DropDownList dataSource it's used a BidingSource with the object list we want displaying.
            cbAccounts.DataSource    = new BindingSource(_AccountList, null);
            cbAccounts.DisplayMember = "Key";
        }