コード例 #1
0
        private void RefreshStatusList()
        {
            if (asyncOpManager.Count == 0)
            {
                this.Close();
            }
            else
            {
                // show the newer thread.

                AsyncOperationStatus operation = asyncOpManager.GetLastAsyncOperation();

                lblCurrent.Text = operation.Message;

                pbCurrent.Value = operation.Percentage;
            }
            // the list of details is shown.

            pnlDetails.Controls.Clear();

            foreach (AsyncOperationStatus op in asyncOpManager)
            {
                UCProgressStatus pStatus = new UCProgressStatus(  );

                pStatus.lblMessage.Text = op.Message;

                pStatus.pbStatus.Value = op.Percentage;

                pStatus.BackColor = SystemColors.ControlLightLight;

                if (asyncOpManager.Count > 0)
                {
                    pStatus.Location = new Point(2, pStatus.Size.Height * pnlDetails.Controls.Count + 2);
                }

                pnlDetails.Controls.Add(pStatus);
            }

            if (pnlDetails.Controls.Count > 0)
            {
                pnlDetails.Controls[0].BackColor = Color.GhostWhite;
            }
        }
コード例 #2
0
ファイル: FormStatus.cs プロジェクト: clarencemorse/myzilla
        private void RefreshStatusList()
        {
            if (asyncOpManager.Count == 0)
            {
                this.Close();
            }
            else
            {
                // show the newer thread.

                AsyncOperationStatus operation = asyncOpManager.GetLastAsyncOperation ();

                lblCurrent.Text = operation.Message;

                pbCurrent.Value = operation.Percentage;

            }
                // the list of details is shown.

                pnlDetails.Controls.Clear();

                foreach (AsyncOperationStatus op in asyncOpManager)
                {
                    UCProgressStatus pStatus = new UCProgressStatus(  );

                    pStatus.lblMessage.Text = op.Message;

                    pStatus.pbStatus.Value = op.Percentage;

                    pStatus.BackColor = SystemColors.ControlLightLight;

                    if (asyncOpManager.Count  > 0)
                    {
                        pStatus.Location = new Point(2, pStatus.Size.Height * pnlDetails.Controls.Count + 2);
                    }

                    pnlDetails.Controls.Add(pStatus);

                }

                if (pnlDetails.Controls.Count > 0)
                {
                    pnlDetails.Controls[0].BackColor = Color.GhostWhite;
                }
        }