<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FComponents%2FProgress_Bar</id>
		<title>Csharp/C Sharp/Components/Progress Bar - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FComponents%2FProgress_Bar"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Components/Progress_Bar&amp;action=history"/>
		<updated>2026-04-29T17:15:44Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Components/Progress_Bar&amp;diff=342&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Components/Progress_Bar&amp;diff=342&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/Components/Progress_Bar&amp;diff=343&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/Components/Progress_Bar&amp;diff=343&amp;oldid=prev"/>
				<updated>2010-05-26T11:38:07Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Auto progress bar==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form&lt;br /&gt;
{&lt;br /&gt;
  AutoProgress status = new AutoProgress();&lt;br /&gt;
  &lt;br /&gt;
  public Form1() {&lt;br /&gt;
      this.status = new AutoProgress();&lt;br /&gt;
      this.SuspendLayout();&lt;br /&gt;
      // &lt;br /&gt;
      // status&lt;br /&gt;
      // &lt;br /&gt;
      this.status.Location = new System.Drawing.Point(12, 8);&lt;br /&gt;
      this.status.Name = &amp;quot;status&amp;quot;;&lt;br /&gt;
      this.status.Size = new System.Drawing.Size(600, 20);&lt;br /&gt;
      // &lt;br /&gt;
      // Form1&lt;br /&gt;
      // &lt;br /&gt;
      this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);&lt;br /&gt;
      this.ClientSize = new System.Drawing.Size(292, 194);&lt;br /&gt;
      this.Controls.Add(this.status);&lt;br /&gt;
      this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));&lt;br /&gt;
      this.Name = &amp;quot;Form1&amp;quot;;&lt;br /&gt;
      this.Text = &amp;quot;Progress Host&amp;quot;;&lt;br /&gt;
      this.ResumeLayout(false);&lt;br /&gt;
      &lt;br /&gt;
      status.Start();&lt;br /&gt;
  }&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    Application.EnableVisualStyles();&lt;br /&gt;
    Application.Run(new Form1());&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
  public class AutoProgress : System.Windows.Forms.UserControl&lt;br /&gt;
    {&lt;br /&gt;
        internal System.Windows.Forms.ProgressBar myProgressBar;&lt;br /&gt;
        internal Timer myTimer;&lt;br /&gt;
        private int percentPerSecond = 5;&lt;br /&gt;
    public AutoProgress()&lt;br /&gt;
    {&lt;br /&gt;
            this.myProgressBar = new System.Windows.Forms.ProgressBar();&lt;br /&gt;
            this.myTimer = new System.Windows.Forms.Timer(new System.ruponentModel.Container());&lt;br /&gt;
            this.SuspendLayout();&lt;br /&gt;
            this.myProgressBar.Dock = System.Windows.Forms.DockStyle.Fill;&lt;br /&gt;
            this.myProgressBar.Location = new System.Drawing.Point(0, 0);&lt;br /&gt;
            this.myProgressBar.Name = &amp;quot;myProgressBar&amp;quot;;&lt;br /&gt;
            this.myProgressBar.Size = new System.Drawing.Size(164, 42);&lt;br /&gt;
            this.myProgressBar.TabIndex = 2;&lt;br /&gt;
            this.myTimer.Tick += new System.EventHandler(this.myTimer_Tick);&lt;br /&gt;
            this.Controls.Add(this.myProgressBar);&lt;br /&gt;
            this.Name = &amp;quot;AutoProgress&amp;quot;;&lt;br /&gt;
            this.Size = new System.Drawing.Size(164, 42);&lt;br /&gt;
            this.ResumeLayout(false);&lt;br /&gt;
            &lt;br /&gt;
    }&lt;br /&gt;
        public int PercentPerSecond&lt;br /&gt;
    {&lt;br /&gt;
      get {&lt;br /&gt;
        return percentPerSecond;&lt;br /&gt;
      }&lt;br /&gt;
      set {&lt;br /&gt;
                if (value &amp;lt; 0)&lt;br /&gt;
                {&lt;br /&gt;
                    throw new ArgumentException(&amp;quot;Progress cannot go backward.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
                else if (value == 0)&lt;br /&gt;
                {&lt;br /&gt;
                    throw new ArgumentException(&amp;quot;Progress must go on.&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
                percentPerSecond = value;&lt;br /&gt;
      }&lt;br /&gt;
    }           &lt;br /&gt;
    &lt;br /&gt;
    public void Start()&lt;br /&gt;
    {&lt;br /&gt;
      myProgressBar.Maximum = 200;&lt;br /&gt;
      myTimer.Interval = 100;&lt;br /&gt;
      decimal step = Math.Round((decimal)myProgressBar.Maximum * PercentPerSecond / 1000);&lt;br /&gt;
      myProgressBar.Step = (int)step;&lt;br /&gt;
            myProgressBar.Value = 0;&lt;br /&gt;
            myTimer.Start();&lt;br /&gt;
        }&lt;br /&gt;
        public void Stop()&lt;br /&gt;
        {&lt;br /&gt;
            myTimer.Stop();&lt;br /&gt;
            myProgressBar.Value = 0;&lt;br /&gt;
        }&lt;br /&gt;
        public void Finish()&lt;br /&gt;
        {&lt;br /&gt;
            myTimer.Stop();&lt;br /&gt;
            myProgressBar.Value = myProgressBar.Maximum;&lt;br /&gt;
        }&lt;br /&gt;
        private void myTimer_Tick(object sender, EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            myProgressBar.PerformStep();&lt;br /&gt;
            if (myProgressBar.Value == myProgressBar.Maximum)&lt;br /&gt;
            {&lt;br /&gt;
                myProgressBar.Value = 0;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>