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


C# ToolStripProgressBar.PerformStep方法代码示例

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


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

示例1: RealmChecks

		static public void RealmChecks(ref TextBox textbox, ref ToolStripProgressBar ProgressBar)
		{
			if (!Directory.Exists((string)Settings.Global.Properties["POLPath"] + @"\realm"))
				textbox.AppendText("* Fail: Realms have not been generated." + Environment.NewLine);
			else
			{
				string[] tmp = FileSystemUtil.GetAllFileNames((string)Settings.Global.Properties["POLPath"] + @"\realm", "*.*");
				if (tmp.Length > 1)
					textbox.AppendText("* Pass: Realm folder detected." + Environment.NewLine);
				else
					textbox.AppendText("* Fail: Realm folder is empty." + Environment.NewLine);
			}
            ProgressBar.PerformStep();

			foreach (string s in PL_UOConvert.GetConfigFileNames())
			{
                if (File.Exists((string)Settings.Global.Properties["POLPath"] + @"\" + s))
					textbox.AppendText("* Pass: Found config file '" + s + "'." + Environment.NewLine);
				else
					textbox.AppendText("* Fail: Config file '" + s + "' not found." + Environment.NewLine);
                ProgressBar.PerformStep();
			}

		}
开发者ID:polserver,项目名称:poltools,代码行数:24,代码来源:POLChecks.cs

示例2: ScriptChecks

        static public void ScriptChecks(ref TextBox textbox, ref ToolStripProgressBar ProgressBar)
		{
			string[] src = FileSystemUtil.GetAllFileNames((string)Settings.Global.Properties["POLPath"], "*.src");
			string[] ecl = FileSystemUtil.GetAllFileNames((string)Settings.Global.Properties["POLPath"], "*.ecl");
            string[] asp = FileSystemUtil.GetAllFileNames((string)Settings.Global.Properties["POLPath"], "*.asp");

            ScriptCount.Add("ECL", ecl.Length);
            ScriptCount.Add("SRC", src.Length);
            ScriptCount.Add("ASP", asp.Length);

			if (ecl.Length < src.Length)
				textbox.AppendText("* Warning: Not all scripts are compiled." + Environment.NewLine);
			else if (ecl.Length > src.Length)
				textbox.AppendText("* Warning: There are more ecl files than src files." + Environment.NewLine);
			else
				textbox.AppendText("* Pass: All scripts are compiled." + Environment.NewLine);
			textbox.AppendText("Found " + src.Length.ToString() + " .src files and " + ecl.Length.ToString() + " .ecl files." + Environment.NewLine);
            ProgressBar.PerformStep();
		}
开发者ID:polserver,项目名称:poltools,代码行数:19,代码来源:POLChecks.cs

示例3: createXML

        public override void createXML(ToolStripProgressBar MyProgress)
        {
            int index = 1;
            int total = 0;
            object rowIndex = 2;
            object colIndex1 = 1;
            object colIndex2 = 2;
            object colIndex3 = 3;
            object colIndex4 = 4;
            object colIndex5 = 5;
            object colIndex6 = 6;
            object colIndex7 = 7;

            //get total lines
            MyProgress.Value = 50;
            while (((Range)workSheet.Cells[index, colIndex1]).Value2 != null)
            {
                total = index++;
            }
            MyProgress.Maximum = total;
            MyProgress.Step = 1;
            MyProgress.Value = 0;
            MyProgress.ToolTipText = total + " registers founded.";
            index = 0;

            try
            {
                while (((Range)workSheet.Cells[rowIndex, colIndex1]).Value2 != null)
                {
                    rowIndex = 2 + index;
                    this.fillBDOCData(myBDOCExcelLine, rowIndex);
                    //XML
                    this.createStream(myBDOCExcelLine);
                    MyProgress.PerformStep();
                    index++;

                }
                this.FinalXML = this.xmlDoc.InnerXml;
                this.FinalTXT = this.FinalTXTData + "\r\n" + this.FinalTXTEntity;
                this.appEXCEL.Quit();

            }
            catch (Exception ex)
            {
                appEXCEL.Quit();
                Console.WriteLine(ex.Message);
                throw ex;
            }
        }
开发者ID:andresvela,项目名称:BDOCEXCEL2XML,代码行数:49,代码来源:BdocXCLTransFlux.cs

示例4: IncrementProgressBar

 /// <summary>
 /// Increment progress bar.
 /// </summary>
 /// <param name="toolStripName"></param>
 /// <param name="controlName"></param>
 public static void IncrementProgressBar(ToolStrip toolStripName, ToolStripProgressBar controlName)
 {
     if (toolStripName.InvokeRequired)
     {
         toolStripName.Invoke((System.Action)(() =>
         {
             controlName.PerformStep();
         }));
     }
     else
     {
         controlName.PerformStep();
     }
 }
开发者ID:gcorthey,项目名称:CrossThreadLib,代码行数:19,代码来源:Class1.cs

示例5: Shuffle

        public void Shuffle(ToolStripProgressBar progressBar)
        {
            progressBar.Maximum = 20;
            progressBar.Minimum = 0;
            progressBar.Value = 1;
            progressBar.Step = 1;
            int lastFace = -1;

            for (int i = 0; i < 20; i++)
            {
                var rd = new Random();

                int face = rd.Next(0, 100) % 6;
                int dir = rd.Next(0, 100) % 2;

                while (face == lastFace)
                {
                    face = rd.Next(0, 100) % 6;
                }

                lastFace = face;
                CubeSide side = null;

                switch (face)
                {
                    case 0:
                        side = _front;
                        break;
                    case 1:
                        side = _back;
                        break;
                    case 2:
                        side = _right;
                        break;
                    case 3:
                        side = _left;
                        break;
                    case 4:
                        side = _down;
                        break;
                    case 5:
                        side = _top;
                        break;
                }

                if (side != null)
                {
                    switch (dir)
                    {
                        case 0:
                            RotateCW(side);
                            break;
                        case 1:
                            RotateCCW(side);
                            break;
                        case 2:
                            RotateCW(side);
                            RotateCW(side);
                            break;
                    }
                }
                if (progressBar.ProgressBar == null)
                {
                    return;
                }
                progressBar.PerformStep();
            }
            progressBar.Value = 0; //reset progressbar to 0
        }
开发者ID:hoangkianh,项目名称:RubikSolver,代码行数:69,代码来源:Solver.cs

示例6: SolveTopEdges

        /// <summary>
        /// Solve the top edge of the cube
        /// </summary>
        /// <param name="progressBar"></param>
        private void SolveTopEdges(ToolStripProgressBar progressBar)
        {
            // while the edges not solved
            for (int i = 0; i < 4; i++)
            {
                progressBar.PerformStep();

                CubeSide side1 = FindEdge(_top.Color, _front.Color);
                CubeSide side2 = FindEdge(_front.Color, _top.Color);

                if (side1 == _right)
                {
                    if (side2 == _front)
                    {
                        m_S += "F-.";
                        DoMove("F-.");
                    }
                    else if (side2 == _top)
                    {
                        m_S += "R-.F-.";
                        DoMove("R-.F-.");
                    }
                    else if (side2 == _back)
                    {
                        m_S += "T+.T+.B+.T+.T+.";
                        DoMove("T+.T+.B+.T+.T+.");
                    }
                    else if (side2 == _down)
                    {
                        m_S += "R+.F-.R-.";
                        DoMove("R+.F-.R-.");
                    }
                }
                else if (side1 == _left)
                {
                    if (side2 == _top)
                    {
                        m_S += "L+.F+.";
                        DoMove("L+.F+.");
                    }
                    else if (side2 == _front)
                    {
                        m_S += "F+.";
                        DoMove("F+.");
                    }
                    else if (side2 == _back)
                    {
                        m_S += "L+.L+.F+.L+.L+.";
                        DoMove("L+.L+.F+.L+.L+.");
                    }
                    else if (side2 == _down)
                    {
                        m_S += "L-.F+.L+.";
                        DoMove("L-.F+.L+.");
                    }
                }
                else if (side1 == _front)
                {
                    if (side2 == _top)
                    {
                        m_S += "F-.T+.L-.T-.";
                        DoMove("F-.T+.L-.T-.");
                    }
                    else if (side2 == _left)
                    {
                        m_S += "T+.L-.T-.";
                        DoMove("T+.L-.T-.");
                    }
                    else if (side2 == _right)
                    {
                        m_S += "T-.R+.T+.";
                        DoMove("T-.R+.T+.");
                    }
                    else if (side2 == _down)
                    {
                        m_S += "F-.T-.R+.T+.";
                        DoMove("F-.T-.R+.T+.");
                    }
                }
                else if (side1 == _back)
                {
                    if (side2 == _right)
                    {
                        m_S += "T-.R-.T+.";
                        DoMove("T-.R-.T+.");
                    }
                    else if (side2 == _left)
                    {
                        m_S += "T+.L+.T-.";
                        DoMove("T+.L+.T-.");
                    }
                    else if (side2 == _top)
                    {
                        m_S += "B-.T-.R-.T+.";
                        DoMove("B-.T-.R-.T+.");
                    }
//.........这里部分代码省略.........
开发者ID:hoangkianh,项目名称:RubikSolver,代码行数:101,代码来源:Solver.cs

示例7: SolveTopCorner

        /// <summary>
        /// Solve the top corner of the cube
        /// </summary>
        /// <param name="progressBar"></param>
        private void SolveTopCorner(ToolStripProgressBar progressBar)
        {
            for (int i = 0; i < 4; i++)
            {
                progressBar.PerformStep();

                CubeSide side1 = FindCorner(_top.Color, _front.Color, _right.Color);
                CubeSide side2 = FindCorner(_front.Color, _top.Color, _right.Color);

                if (side1 == _front)
                {
                    if (side2 == _right)
                    {
                        m_S += "F+.D+.F-.D+.D+.R-.D+.R+.";
                        DoMove("F+.D+.F-.D+.D+.R-.D+.R+.");
                    }
                    else if (side2 == _left)
                    {
                        m_S += "D+.D+.F+.D-.F-.";
                        DoMove("D+.D+.F+.D-.F-.");
                    }
                    else if (side2 == _top)
                    {
                        m_S += "F-.D-.F+.F+.D+.D+.F-.";
                        DoMove("F-.D-.F+.F+.D+.D+.F-.");
                    }
                    else if (side2 == _down)
                    {
                        m_S += "D-.R-.D+.R+.";
                        DoMove("D-.R-.D+.R+.");
                    }
                }
                else if (side1 == _right)
                {
                    if (side2 == _front)
                    {
                        m_S += "D+.F+.D-.F-.";
                        DoMove("D+.F+.D-.F-.");
                    }
                    else if (side2 == _back)
                    {
                        m_S += "R+.D+.D+.R+.R+.D+.R+.";
                        DoMove("R+.D+.D+.R+.R+.D+.R+.");
                    }
                    else if (side2 == _top)
                    {
                        m_S += "R-.D-.R+.D+.D+.F+.D-.F-.";
                        DoMove("R-.D-.R+.D+.D+.F+.D-.F-.");
                    }
                    else if (side2 == _down)
                    {
                        m_S += "D+.D+.R-.D+.R+.";
                        DoMove("D+.D+.R-.D+.R+.");
                    }
                }
                else if (side1 == _left)
                {
                    if (side2 == _down)
                    {
                        m_S += "R-.D+.R+.";
                        DoMove("R-.D+.R+.");
                    }
                    else if (side2 == _front)
                    {
                        m_S += "L+.D+.L-.D-.R-.D+.R+.";
                        DoMove("L+.D+.L-.D-.R-.D+.R+.");
                    }
                    else if (side2 == _back)
                    {
                        m_S += "F+.D+.D+.F-.";
                        DoMove("F+.D+.D+.F-.");
                    }
                    else if (side2 == _top)
                    {
                        m_S += "L-.D-.L+.F+.D-.F-.";
                        DoMove("L-.D-.L+.F+.D-.F-.");
                    }
                }
                else if (side1 == _back)
                {
                    if (side2 == _down)
                    {
                        m_S += "R-.D+.D+.R+.";
                        DoMove("R-.D+.D+.R+.");
                    }
                    else if (side2 == _right)
                    {
                        m_S += "F+.D-.F-.";
                        DoMove("F+.D-.F-.");
                    }
                    else if (side2 == _left)
                    {
                        m_S += "B+.D+.B-.R-.D+.R+.";
                        DoMove("B+.D+.B-.R-.D+.R+.");
                    }
                    else if (side2 == _top)
//.........这里部分代码省略.........
开发者ID:hoangkianh,项目名称:RubikSolver,代码行数:101,代码来源:Solver.cs

示例8: SolveMiddleEdges

        /// <summary>
        /// Solve the middle edges
        /// </summary>
        /// <param name="progressBar"></param>
        private void SolveMiddleEdges(ToolStripProgressBar progressBar)
        {
            for (int i = 0; i < 4; i++)
            {
                progressBar.PerformStep();

                CubeSide side1 = FindEdge(_front.Color, _right.Color);
                CubeSide side2 = FindEdge(_right.Color, _front.Color);

                //check to see if the side we are looking for is
                //in one of the middle sides. If it is move it out

                if (side1 == _left && side2 == _back ||
                    side1 == _back && side2 == _left)
                {
                    m_S += "B+.D-.B-.D-.L-.D+.L+.";
                    DoMove("B+.D-.B-.D-.L-.D+.L+.");
                }
                else if (side1 == _left && side2 == _front ||
                         side1 == _front && side2 == _left)
                {
                    m_S += "L+.D-.L-.D-.F-.D+.F+.";
                    DoMove("L+.D-.L-.D-.F-.D+.F+.");
                }
                else if (side1 == _right && side2 == _back ||
                         side1 == _back && side2 == _right)
                {
                    m_S += "B-.D+.B+.D+.R+.D-.R-.";
                    DoMove("B-.D+.B+.D+.R+.D-.R-.");
                }
                else if (side1 == _right && side2 == _front)
                {
                    m_S += "R-.D+.R+.D+.F+.D-.F-.";
                    DoMove("R-.D+.R+.D+.F+.D-.F-.");
                }

                //now that it is moved out find it again and put it in place
                side1 = FindEdge(_front.Color, _right.Color);
                side2 = FindEdge(_right.Color, _front.Color);

                if (side1 == _down)
                {
                    if (side2 == _right)
                    {
                        m_S += "D+.";
                        DoMove("D+.");
                    }
                    else if (side2 == _front)
                    {
                        m_S += "D+.D+.";
                        DoMove("D+.D+.");
                    }
                    else if (side2 == _left)
                    {
                        m_S += "D-.";
                        DoMove("D-.");
                    }
                    m_S += "F+.D-.F-.D-.R-.D+.R+.";
                    DoMove("F+.D-.F-.D-.R-.D+.R+.");
                }
                else if (side2 == _down)
                {
                    if (side1 == _right)
                    {
                        m_S += "D+.D+.";
                        DoMove("D+.D+.");
                    }
                    else if (side1 == _front)
                    {
                        m_S += "D-.";
                        DoMove("D-.");
                    }
                    else if (side1 == _back)
                    {
                        m_S += "D+.";
                        DoMove("D+.");
                    }
                    m_S += "R-.D+.R+.D+.F+.D-.F-.";
                    DoMove("R-.D+.R+.D+.F+.D-.F-.");
                }
                m_S += "C+.";
                DoMove("C+.");
            }
        }
开发者ID:hoangkianh,项目名称:RubikSolver,代码行数:88,代码来源:Solver.cs

示例9: SolveDownEdges

        /// <summary>
        /// solve the bottom edge pieces
        /// </summary>
        /// <param name="progressBar"></param>
        /// <returns>True if solve down edges, false if otherwise</returns>
        private bool SolveDownEdges(ToolStripProgressBar progressBar)
        {
            int count;
            int flag = 0;
            int iter = 0;

            // first solve the edge pieces
            while ((count = GetDownEdgeOrient(ref flag)) < 4)
            {
                iter++;
                progressBar.PerformStep();

                if (count < 2)
                {
                    m_S += "F+.D+.L+.D-.L-.F-.";
                    DoMove("F+.D+.L+.D-.L-.F-.");
                }
                else if (flag == RIGHTLEFT)
                {
                    m_S += "F+.L+.D+.L-.D-.F-.";
                    DoMove("F+.L+.D+.L-.D-.F-.");
                }
                else if (flag == FRONTBACK)
                {
                    m_S += "C+.F+.L+.D+.L-.D-.F-.";
                    DoMove("C+.F+.L+.D+.L-.D-.F-.");
                }
                else if (flag == RIGHTBACK)
                {
                    m_S += "F+.D+.L+.D-.L-.F-.";
                    DoMove("F+.D+.L+.D-.L-.F-.");
                }
                else if (flag == FRONTRIGHT)
                {
                    m_S += "C+.F+.D+.L+.D-.L-.F-.";
                    DoMove("C+.F+.D+.L+.D-.L-.F-.");
                }
                else if (flag == FRONTLEFT)
                {
                    m_S += "C+.C+.F+.D+.L+.D-.L-.F-.";
                    DoMove("C+.C+.F+.D+.L+.D-.L-.F-.");
                }
                else if (flag == BACKLEFT)
                {
                    m_S += "C+.C+.C+.F+.D+.L+.D-.L-.F-.";
                    DoMove("C+.C+.C+.F+.D+.L+.D-.L-.F-.");
                }

                if (iter > 10)
                {
                    return false;
                }
            }

            iter = 0;
            //Now Position the pieces correctly
            while ((count = GetDownEdgePos(ref flag)) > 0)
            {
                iter++;
                progressBar.PerformStep();

                if (count == 4)
                {
                    m_S += "D+.";
                    DoMove("D+.");
                }
                else if (count == 3)
                {
                    while (true)
                    {
                        if ((flag & MRIGHTLEFT) != 0 &&
                            (flag & MLEFTFRONT) != 0 &&
                            (flag & MFRONTRIGHT) != 0)
                        {
                            m_S += "L-.D-.L+.D-.L-.D+.D+.L+.";
                            DoMove("L-.D-.L+.D-.L-.D+.D+.L+.");
                            break;
                        }

                        if ((flag & MLEFTRIGHT) != 0 &&
                            (flag & MRIGHTFRONT) != 0 &&
                            (flag & MFRONTLEFT) != 0)
                        {
                            m_S += "L-.D+.D+.L+.D+.L-.D+.L+.";
                            DoMove("L-.D+.D+.L+.D+.L-.D+.L+.");
                            break;
                        }

                        m_S += "C+.";
                        DoMove("C+.");
                        GetDownEdgePos(ref flag);
                    }
                }
                else if (count == 2)
                {
//.........这里部分代码省略.........
开发者ID:hoangkianh,项目名称:RubikSolver,代码行数:101,代码来源:Solver.cs

示例10: SolveDownCorners

        /// <summary>
        /// solve the bottom corners
        /// </summary>
        /// <param name="progressBar"></param>
        /// <returns></returns>
        private bool SolveDownCorners(ToolStripProgressBar progressBar)
        {
            int count;
            int flag = 0;
            int iter = 0;

            //first orient the corner pieces
            while ((count = GetDownCornerOrient(ref flag)) > 0)
            {
                iter++;
                progressBar.PerformStep();

                if (count > 3)
                {
                    m_S += "B+.L+.B-.L-.D+.D+.R-.B+.B+.R+.B-.R-.B+.B+.R+.B-.D+.D+.";
                    DoMove("B+.L+.B-.L-.D+.D+.R-.B+.B+.R+.B-.R-.B+.B+.R+.B-.D+.D+.");
                }
                else if (count == 3)
                {
                    if (flag == (SBACK | SLEFT | SFRONT))
                    {
                        m_S += "B+.L+.B-.L-.D+.D+.R-.B+.B+.R+.B-.R-.B+.B+.R+.B-.D+.D+.";
                        DoMove("B+.L+.B-.L-.D+.D+.R-.B+.B+.R+.B-.R-.B+.B+.R+.B-.D+.D+.");
                    }
                    else
                    {
                        m_S += "C+.";
                        DoMove("C+.");
                    }
                }
                else if (count == 2)
                {
                    if (flag == (SRIGHT | SFRONT))
                    {
                        m_S += "D+.L+.D-.L-.D+.L+.D-.R-.D+.L-.D-.L+.D+.L-.D-.R+.";
                        DoMove("D+.L+.D-.L-.D+.L+.D-.R-.D+.L-.D-.L+.D+.L-.D-.R+.");
                    }
                    else if (flag == (SRIGHT | SLEFT))
                    {
                        m_S += "B+.L-.T+.T+.L+.B-.D+.D+.B+.L-.T+.T+.L+.B-.D+.D+.";
                        DoMove("B+.L-.T+.T+.L+.B-.D+.D+.B+.L-.T+.T+.L+.B-.D+.D+.");
                    }
                    else
                    {
                        m_S += "C+.";
                        DoMove("C+.");
                    }
                }
                if (iter > 10)
                {
                    return false;
                }
            }

            iter = 0;
            //now position the corner pieces
            while ((count = GetDownCornerPos(ref flag)) > 0)
            {
                iter++;
                progressBar.PerformStep();

                if (count == 4)
                {
                    if ((flag & MLEFTRIGHT) != 0 && (flag & MFRONTBACK) != 0)
                    {
                        m_S += "L+.L+.R+.R+.T+.L+.L+.R+.R+.D+.D+.L+.L+.R+.R+.T+.L+.L+.R+.R+.D+.D+.";
                        DoMove("L+.L+.R+.R+.T+.L+.L+.R+.R+.D+.D+.L+.L+.R+.R+.T+.L+.L+.R+.R+.D+.D+.");
                    }
                    else if ((flag & MLEFTFRONT) != 0 && (flag & MBACKRIGHT) != 0)
                    {
                        m_S += "F+.L-.F-.R+.F+.L+.F-.R+.R+.B-.L+.B+.R+.B-.L-.B+.";
                        DoMove("F+.L-.F-.R+.F+.L+.F-.R+.R+.B-.L+.B+.R+.B-.L-.B+.");
                    }
                    else
                    {
                        m_S += "C+.";
                        DoMove("C+.");
                    }
                }
                else if (count == 3)
                {
                    if ((flag & MLEFTRIGHT) != 0 && (flag & MRIGHTBACK) != 0 && (flag & MBACKLEFT) != 0)
                    {
                        m_S += "L-.F+.L-.B+.B+.L+.F-.L-.B+.B+.L+.L+.";
                        DoMove("L-.F+.L-.B+.B+.L+.F-.L-.B+.B+.L+.L+.");
                    }
                    else if ((flag & MLEFTBACK) != 0 && (flag & MBACKRIGHT) != 0 && (flag & MRIGHTLEFT) != 0)
                    {
                        m_S += "L+.L+.B+.B+.L+.F+.L-.B+.B+.L+.F-.L+.";
                        DoMove("L+.L+.B+.B+.L+.F+.L-.B+.B+.L+.F-.L+.");
                    }
                    else
                    {
                        m_S += "C+.";
                        DoMove("C+.");
//.........这里部分代码省略.........
开发者ID:hoangkianh,项目名称:RubikSolver,代码行数:101,代码来源:Solver.cs

示例11: BehaviorPerformStep

		public void BehaviorPerformStep ()
		{
			ToolStripProgressBar tsi = new ToolStripProgressBar ();

			tsi.PerformStep ();
			Assert.AreEqual (10, tsi.Value, "B1");
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:7,代码来源:ToolStripProgressBarTest.cs

示例12: Create

        /// <summary>
        /// Create archives based on specifications passed and internal state
        /// </summary>		
        void Create(string zipFileName, ArrayList fileSpecs, ref ToolStripProgressBar ProgressBar)
        {
            if (Path.GetExtension(zipFileName).Length == 0)
            {
                zipFileName = Path.ChangeExtension(zipFileName, ".zip");
            }

            try
            {
                using (ZipFile zf = ZipFile.Create(zipFileName))
                {
                    zf.BeginUpdate();

                    activeZipFile_ = zf;

                    foreach (string spec in fileSpecs)
                    {
                        // This can fail with wildcards in spec...
                        string path = Path.GetDirectoryName(Path.GetFullPath(spec));
                        string fileSpec = Path.GetFileName(spec);

                        zf.NameTransform = new ZipNameTransform(Settings.Global.Properties["POLPath"]);

                        FileSystemScanner scanner = new FileSystemScanner(fileSpec);
                        scanner.ProcessFile = new ProcessFileHandler(ProcessFile);
                        scanner.Scan(path, false);
                        ProgressBar.PerformStep();
                    }
                    zf.CommitUpdate();
                    ProgressBar.PerformStep();
                }
            }
            catch (Exception ex)
            {
                ExceptionBox.ExceptionForm tmp = new ExceptionBox.ExceptionForm(ref ex);
                tmp.ShowDialog();
            }
        }
开发者ID:polserver,项目名称:poltools,代码行数:41,代码来源:Databackup.cs

示例13: ProgressBarPerformStep

        private void ProgressBarPerformStep(ToolStripProgressBar pb)
        {
            // InvokeRequired required compares the thread ID of the
            // calling thread to the thread ID of the creating thread.
            // If these threads are different, it returns true.
            if (statusStrip1.InvokeRequired)
            {
                ProgressBarPerformStepCallback d = new ProgressBarPerformStepCallback(ProgressBarPerformStep);
                statusStrip1.BeginInvoke(d, new object[] { pb });
            }
            else
            {
                if (pb.Value == pb.Maximum)
                    ProgressBarFillTimes++;

                if (ProgressBarFillTimes == 100)
                {
                    pb.Value = pb.Minimum;
                    ProgressBarFillTimes = 0;
                }
                pb.PerformStep();
            }
        }
开发者ID:AlexandrSurkov,项目名称:PKStudio,代码行数:23,代码来源:MainForm.cs


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