当前位置: 首页>>代码示例>>C#>>正文


C# Progress.BringToFront方法代码示例

本文整理汇总了C#中Progress.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# Progress.BringToFront方法的具体用法?C# Progress.BringToFront怎么用?C# Progress.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Progress的用法示例。


在下文中一共展示了Progress.BringToFront方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BeginValidation

        void BeginValidation()
        {
            if (listBoxFont.Items.Count == 0)
            {
                MessageBox.Show(this, "No fonts to validate!\r\nYou must first add one or more fonts to the font file list.");
            }
            else
            {
                // disable the ui during validation

                EnableUI(false);


                try
                {
                    // tell the validator which tests to perform

                    for (int i=0; i<checkedListBoxTests.Items.Count; i++)
                    {
                        string sTable = checkedListBoxTests.Items[i].ToString();
                        bool bPerform = checkedListBoxTests.GetItemChecked(i);
                        m_Validator.SetTablePerformTest(sTable, bPerform);
                    }

                    if (checkBoxRast.Checked)
                    {
                        m_Validator.SetRastPerformTest(checkBoxBW.Checked, checkBoxGray.Checked, checkBoxClearType.Checked,
                            checkBoxCTCompWidth.Checked, checkBoxCTVert.Checked, checkBoxCTBGR.Checked, checkBoxCTFractWidth.Checked);
                    }
                    else
                    {
                        m_Validator.SetRastPerformTest(false, false, false, false, false, false, false);
                    }
                    int x = Int32.Parse(textBoxXRes.Text);
                    int y = Int32.Parse(textBoxYRes.Text);
                    int [] pointsizes = ParseRastPointSizes();
                    
                    m_Validator.SetRastTestParams(x, y, pointsizes, m_RastTestTransform);


                    // put up the progress dialog which will manage the validation

                    string [] sFiles = new string[listBoxFont.Items.Count];
                    for (int i=0; i<listBoxFont.Items.Count; i++)
                    {
                        sFiles[i] = listBoxFont.Items[i].ToString();
                    }
                    m_formProgress = new Progress(this, m_Validator, sFiles, 
                        m_PersistedData.m_ReportFileDestination,
                        m_PersistedData.m_bOpenReportFile,
                        m_PersistedData.m_sReportFixedDir);
                    m_formProgress.TopLevel = false;
                    m_formProgress.Parent = this;
                    m_formProgress.BringToFront();
                    // centering isn't working with the current .Net framework, so force it to be centered
                    //m_formProgress.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
                    m_formProgress.SetBounds(Width/2 - m_formProgress.Width/2, Height/2 - m_formProgress.Height/2,
                        m_formProgress.Width, m_formProgress.Height, BoundsSpecified.Location);

                    m_formProgress.Show();
                }
                catch (Exception e)
                {
                    MessageBox.Show(this, e.Message, "Error");
                    EnableUI(true);
                }
            }
        }
开发者ID:bitforks,项目名称:Font-Validator,代码行数:68,代码来源:Form1.cs


注:本文中的Progress.BringToFront方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。