Exemple #1
0
        /// <summary>
        /// Reset the _tableEnum field to the table being displayed, if any
        /// </summary>
        private void ResetTableEnum()
        {
            bool bFound = false;
            int  index  = 0;

            _tableEnum = null;
            _tableEnum = Session.Current.Catalog.EnumerateTables(
                TableFilterFactory.FilterAllTables());

            while (_tableEnum.MoveNext())
            {
                index++;
                if (String.Equals(_tableEnum.Current.Alias, _tableAlias))
                {
                    bFound = true;
                    break;
                }
            }
            if (!bFound)
            {
                _tableEnum.Reset();
                _tableEnum.MoveNext();
                _tableIndex = 1;
            }
            else
            {
                _tableIndex = index;
            }
        }
Exemple #2
0
 /// <summary>
 /// Handle a click of the Display Next button
 /// </summary>
 private void buttonNext_Click(object sender, System.EventArgs e)
 {
     if (!_tableEnum.MoveNext())
     {
         _tableEnum.Reset();
         _tableEnum.MoveNext();
     }
     SetGrid(_tableEnum.Current, this.showTableStructure.Checked);
     _tableIndex = (_tableIndex + 1) % OpenTableCount;
     _tableAlias = _tableEnum.Current.Alias;
     UpdateNavigationButtons();
 }
Exemple #3
0
        /// <summary>
        /// Reset the _tableEnum field to the table being displayed, if any
        /// </summary>
        private void ResetTableEnum()
        {
            bool bFound = false;
            int index = 0;

            _tableEnum = null;
            _tableEnum = Session.Current.Catalog.EnumerateTables(
                TableFilterFactory.FilterAllTables());

            while (_tableEnum.MoveNext())
            {
                index++;
                if (String.Equals(_tableEnum.Current.Alias, _tableAlias))
                {
                    bFound = true;
                    break;
                }
            }
            if (!bFound)
            {
                _tableEnum.Reset();
                _tableEnum.MoveNext();
                _tableIndex = 1;
            }
            else
            {
                _tableIndex = index;
            }
        }