Exemple #1
0
        /// <summary>
        /// 当UserAskCancel标志为True时,通过此方法通知进度条是否真的要取消。
        /// </summary>
        public void EnableUserCancel(bool bEnableCancel)
        {
            //add by liyonghua 20101220,(bug3065),start
            //如果点击“否”,即bEnableCancel等于false时,进度不取消,继续进行
            if (bEnableCancel == false)
            {
                m_AskCancelFlag = 0;
                return;
            }
            //add by liyonghua 20101220,(bug3065),end
            System.Threading.Interlocked.Exchange(ref m_AskCancelFlag, 0);
            if (FakeProgress)
            {
                return;
            }
            if (null == m_FormProgress)
            {
                return;
            }

            ProgressInfo vInfo = new ProgressInfo();

            vInfo.action      = ProgressAction.enumEnableCancel;
            vInfo.actionValue = null;
            m_FormProgress.AppendProgressAction(vInfo, true);
        }
Exemple #2
0
        //dwt add 20110322 将进度条窗口normal回来
        public void MakeProgressWindowNormalState()
        {
            if (null == m_FormProgress)
            {
                return;
            }
            ProgressInfo vInfo = new ProgressInfo();

            vInfo.action = ProgressAction.enumMakeWindowStateNormal;
            m_FormProgress.AppendProgressAction(vInfo, true);
        }
Exemple #3
0
        /// <summary>
        /// 设置进度条的描述信息。
        /// </summary>
        /// <param name="nProgress"></param>
        public void SetProgress(string strDesc)
        {
            if (!EnterProgress())
            {
                return;
            }
            ProgressInfo vInfo = new ProgressInfo();

            vInfo.action      = ProgressAction.enumChangeDesc;
            vInfo.actionValue = strDesc;
            m_FormProgress.AppendProgressAction(vInfo, true);
        }
Exemple #4
0
        /// <summary>
        /// 关闭进度条。
        /// </summary>
        public void Close()
        {
            if (!EnterProgress())
            {
                return;
            }

            ProgressInfo vInfo = new ProgressInfo();

            vInfo.action      = ProgressAction.enumClose;
            vInfo.actionValue = null;
            m_FormProgress.AppendProgressAction(vInfo, true);
        }
Exemple #5
0
        /// <summary>
        /// 增加一个指定的步伐
        /// </summary>
        /// <param name="nStepLen"></param>
        public void PerformStep(int nStepLen)
        {
            if (FakeProgress)
            {
                return;
            }
            if (!EnterProgress())
            {
                return;
            }

            ProgressInfo vInfo = new ProgressInfo();

            vInfo.action      = ProgressAction.enumPerformStep;
            vInfo.actionValue = nStepLen;
            m_FormProgress.AppendProgressAction(vInfo, true);
        }
Exemple #6
0
        /// <summary>
        /// 设置进度条的值。
        /// </summary>
        /// <param name="nProgress"></param>
        public void SetProgress(int nProgress)
        {
            if (FakeProgress)
            {
                return;
            }

            if (!EnterProgress())
            {
                return;
            }

            ProgressInfo vInfo = new ProgressInfo();

            vInfo.action      = ProgressAction.enumProgressValue;
            vInfo.actionValue = nProgress;
            m_FormProgress.AppendProgressAction(vInfo, true);
        }