Example #1
0
        private void DoHideProgress()
        {
            ProgressFrame ef = FindFrame();

            if (ef != null)
            {
                Collection.Remove(ef);
                ef.Dispose();
            }

            foreach (Control ctrl in Collection)
            {
                if (ctrl is ToolStrip)
                {
                    continue;
                }
                bool?vis = null;
                if (m_forceVisibility != null)
                {
                    vis = m_forceVisibility(ctrl);
                }
                ctrl.Visible = vis ?? true;
            }

            ProgressVisible = false;
        }
Example #2
0
        private void DoShowProgress()
        {
            ProgressFrame ef = FindFrame();

            foreach (Control ctrl in Collection)
            {
                if (ctrl is ToolStrip)
                {
                    continue;
                }
                bool?vis = null;
                if (m_forceVisibility != null)
                {
                    vis = m_forceVisibility(ctrl);
                }
                ctrl.Visible = vis ?? false;
            }

            if (ef == null)
            {
                ProgressFrame frm = new ProgressFrame();
                Collection.Add(frm);
                try
                {
                    frm.BringToFront();
                }
                catch (Exception err)
                {
                    Logging.Warning("DAE-00076 " + err.Message);
                    //throw new InternalError("[E :00076] " + err.Message, err);
                }
                frm.Dock = DockStyle.Fill;
                //frm.labErrorDetail.Text = Texts.Get(message ?? "");
            }
            else
            {
                ef.Visible = true;
                //ef.labErrorDetail.Text = Texts.Get(message ?? "");
            }

            ProgressVisible = true;
        }