/// <summary>
        /// Toggle control visibility based on the dialog state.
        /// </summary>
        private void SetState()
        {
            // insert operation complete.
            if (mResults_ != null)
            {
                nextBtn_.Enabled          = false;
                backBtn_.Enabled          = true;
                doneBtn_.Visible          = true;
                cancelBtn_.Visible        = false;
                browseCtrl_.Visible       = false;
                valuesCtrl_.Visible       = false;
                resultsCtrl_.Visible      = true;
                asyncResultsCtrl_.Visible = false;
            }

            // async request started.
            else if (mAsyncSent_)
            {
                nextBtn_.Enabled          = mResults_ != null;
                backBtn_.Enabled          = true;
                doneBtn_.Visible          = false;
                cancelBtn_.Visible        = true;
                browseCtrl_.Visible       = false;
                valuesCtrl_.Visible       = false;
                resultsCtrl_.Visible      = false;
                asyncResultsCtrl_.Visible = true;
            }

            // editing values to use in an insert operation.
            else if (mItem_ != null)
            {
                nextBtn_.Enabled          = true;
                backBtn_.Enabled          = true;
                doneBtn_.Visible          = false;
                cancelBtn_.Visible        = true;
                browseCtrl_.Visible       = false;
                valuesCtrl_.Visible       = true;
                resultsCtrl_.Visible      = false;
                asyncResultsCtrl_.Visible = false;
            }

            // selecting an item to use for the insert operation.
            else
            {
                nextBtn_.Enabled          = false;
                backBtn_.Enabled          = false;
                doneBtn_.Visible          = false;
                cancelBtn_.Visible        = true;
                browseCtrl_.Visible       = true;
                valuesCtrl_.Visible       = false;
                resultsCtrl_.Visible      = false;
                asyncResultsCtrl_.Visible = false;

                browseCtrl_.ClearSelection();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Toggle control visibility based on the dialog state.
        /// </summary>
        private void SetState()
        {
            if (mResults_ != null)
            {
                nextBtn_.Enabled          = false;
                backBtn_.Enabled          = true;
                doneBtn_.Visible          = true;
                cancelBtn_.Visible        = false;
                trendCtrl_.Visible        = false;
                browseCtrl_.Visible       = false;
                trendItemsCtrl_.Visible   = false;
                itemsCtrl_.Visible        = true;
                resultsCtrl_.Visible      = true;
                asyncResultsCtrl_.Visible = false;
            }
            else if (mAsyncSent_)
            {
                nextBtn_.Enabled          = mResults_ != null;
                backBtn_.Enabled          = true;
                doneBtn_.Visible          = false;
                cancelBtn_.Visible        = true;
                trendCtrl_.Visible        = true;
                browseCtrl_.Visible       = false;
                trendItemsCtrl_.Visible   = false;
                itemsCtrl_.Visible        = false;
                resultsCtrl_.Visible      = false;
                asyncResultsCtrl_.Visible = true;
            }
            else
            {
                nextBtn_.Enabled          = !mSingleItem_ || mType_ == RequestType.ReadRaw;
                backBtn_.Enabled          = false;
                doneBtn_.Visible          = false;
                cancelBtn_.Visible        = true;
                trendCtrl_.Visible        = true;
                browseCtrl_.Visible       = mSingleItem_;
                trendItemsCtrl_.Visible   = !mSingleItem_;
                itemsCtrl_.Visible        = false;
                resultsCtrl_.Visible      = false;
                asyncResultsCtrl_.Visible = false;

                browseCtrl_.ClearSelection();
            }
        }
        /// <summary>
        /// Toggle control visibility based on the dialog state.
        /// </summary>
        private void SetState()
        {
            if (mResults_ != null)
            {
                nextBtn_.Enabled          = false;
                backBtn_.Enabled          = true;
                doneBtn_.Visible          = true;
                cancelBtn_.Visible        = false;
                trendCtrl_.Visible        = true;
                browseCtrl_.Visible       = false;
                attributesCtrl_.Visible   = false;
                resultsCtrl_.Visible      = true;
                asyncResultsCtrl_.Visible = false;
            }
            else if (mAsyncSent_)
            {
                nextBtn_.Enabled          = mResults_ != null;
                backBtn_.Enabled          = true;
                doneBtn_.Visible          = false;
                cancelBtn_.Visible        = true;
                trendCtrl_.Visible        = true;
                browseCtrl_.Visible       = false;
                attributesCtrl_.Visible   = false;
                resultsCtrl_.Visible      = false;
                asyncResultsCtrl_.Visible = true;
            }
            else
            {
                nextBtn_.Enabled          = mItem_ != null;
                backBtn_.Enabled          = mItem_ != null && !mFixedItem_;
                doneBtn_.Visible          = false;
                cancelBtn_.Visible        = true;
                trendCtrl_.Visible        = true;
                browseCtrl_.Visible       = mItem_ == null;
                attributesCtrl_.Visible   = mItem_ != null;
                resultsCtrl_.Visible      = mItem_ != null;
                asyncResultsCtrl_.Visible = false;

                browseCtrl_.ClearSelection();
            }
        }