Exemple #1
0
        public static void ON(string title)
        {
            //OFF();

            //On = true;
            Title = title;
            if (fins == null)
            {
                fins = new frm_ProgressBar();
            }
            try
            {
                thd.Abort();
            }
            catch (Exception ex) { }
            thd = null;
            thd = new Thread(new ThreadStart(fins.RunThread));
            thd.Start();
            //thd.Join();
        }
Exemple #2
0
 void RunThread()
 {
     //progressBar1.Invoke(ctrl_text, progressBar1, 0);
     ////progressBar1.Value = 0;
     //for (int i = 0; i <= 100; i++)
     //{
     //    progressBar1.Invoke(ctrl_text, progressBar1, i);
     //    label1.Invoke(ctrl_text, label1, i + "%");
     //    //grfx.DrawLine(Pens.Red, new Point(progressBar1.Value * 4, 0), new Point(progressBar1.Value * 4, 400));
     //    Thread.Sleep(200);
     //}
     try
     {
         fins.Invoke(cl_frm, fins);
     }
     catch (Exception ex) { }
     finally
     {
         fins      = new frm_ProgressBar();
         fins.Text = Title;
         fins.ShowDialog();
     }
 }