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


C# Progress.Show方法代码示例

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


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

示例1: button_backup_Click

        private void button_backup_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            DialogResult result = fbd.ShowDialog();
            if (result == DialogResult.OK)
            {
                int lastFoo = (int)Enum.GetValues(typeof(ECRComms.program)).Cast<ECRComms.program>().Last();

                for (int p = 0; p <= lastFoo; p++)
                {
                    Progress pr = new Progress(Program.ecr);
                    pr.Show();

                    string  name = ((ECRComms.program)p).ToString();
                    data = Program.ecr.getprogram((ECRComms.program)p);

                    pr.Close();

                    try
                    {
                        writedata(data.ToArray(),  Path.Combine(fbd.SelectedPath, name + ".dat"));
                    }
                    catch (Exception _Exception)
                    {
                        Console.WriteLine("Exception caught saving file{0}", _Exception.ToString());
                    }

                }
            }
        }
开发者ID:robincornelius,项目名称:ECRComms,代码行数:30,代码来源:Form3.cs

示例2: btnLevel_Click

        private void btnLevel_Click(object sender, EventArgs e)
        {            
            btnLevel.Enabled = false;
            btnPA.Enabled = false;
            btnTXCarrier.Enabled = false;
            btnLevel.BackColor = Color.Green;

            p = new Progress("Calibrate VU RX Level");
            p.Show();

            Thread t = new Thread(new ThreadStart(CalRXLevel));
            t.Name = "Calibrate RX Level Thread";
            t.IsBackground = true;
            t.Priority = ThreadPriority.Normal;
            t.Start();
        }
开发者ID:wa1gon,项目名称:PowerSDR,代码行数:16,代码来源:FLEX5000VUCalForm.cs

示例3: Button_Click

		private async void Button_Click(object sender, RoutedEventArgs e)
		{
			var newWindow = new Progress();
			newWindow.Show();

			// The Progress<T> constructor captures our UI context,
			//  so the lambda will be run on the UI thread.
			var progress = new Progress<int>(percent =>
			{
				textBox1.Text = percent + "%";
				newWindow.connectionProgress.Value = percent;
			});

			// DoProcessing does most of its work on the thread pool.
			await DoProcessingOnThreadPoolAsync(progress);
		}
开发者ID:publicENEMY,项目名称:FuntionalPrototype,代码行数:16,代码来源:MainWindow.xaml.cs

示例4: bildSpeichernToolStripMenuItem_Click

        private void bildSpeichernToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Tuple<string, string> data = (Tuple<string, string>)pictureBox1.Tag;

              string filetype = string.Empty;
              switch (data.Item1)
              {
            case "image/jpeg":
            case "image/jpg":
              filetype = "jpg";
              break;
              }

              if (data.Item2.StartsWith("http"))
              {
            SaveFileDialog sfd = new SaveFileDialog();
            sfd.Filter = string.Format("*.{0}|*.{0}", filetype);

            GedcomIndividual individual = (GedcomIndividual)familyTreeView.SelectedNode.Tag;
            sfd.FileName = individual.Name.ToString();

            if (sfd.ShowDialog() == DialogResult.OK)
            {
              Progress progress = new Progress();
              progress.Show();

              WebClient client = new WebClient();
              string tmpFile = string.Concat(Path.GetTempFileName(), filetype);
              client.DownloadProgressChanged += (x, args) => {
            progress.ReportProgress(args.ProgressPercentage);

            progress.ReportProgress(string.Format("{0} of {1}", args.BytesReceived.FormatBytes(), args.TotalBytesToReceive.FormatBytes()));
              };

              client.DownloadFileCompleted += (y, args) => {
            progress.Close();
              };
              client.DownloadFileAsync(new Uri(data.Item2), sfd.FileName);
            }
              }
        }
开发者ID:FlorianKolb,项目名称:GEDCOM,代码行数:41,代码来源:MainWindow.cs

示例5: Main_DragDrop

        private void Main_DragDrop(object sender, DragEventArgs e)
        {
            if (e.Effect == DragDropEffects.Link)
            {
                e.Effect = DragDropEffects.None;

                var filenames = (IEnumerable<string>)e.Data.GetData("FileDrop");

                fdbOutputDirectory.SelectedPath = Path.GetDirectoryName(filenames.First());

                if (DlgBox.ShowDialog(fdbOutputDirectory, this) == DialogResult.OK)
                {
                    var progressForm = new Progress(new Arguments.Progress
                    {
                        InputFilenames = filenames,
                        OutputDirectory = fdbOutputDirectory.SelectedPath,
                        CallingForm = this
                    });

                    progressForm.Show();
                    Hide();
                }
            }
        }
开发者ID:vitalyobukhov,项目名称:Flac2Alac,代码行数:24,代码来源:Main.cs

示例6: btnHarmFil60_Click

        private void btnHarmFil60_Click(object sender, System.EventArgs e)
        {
            btnCheckAll.PerformClick();
            chk60m.Checked = false;

            console.PowerOn = true;
            console.CurrentMeterTXMode = MeterTXMode.FORWARD_POWER;
            progress = new Progress("Calibrate PA Gain");

            Thread t = new Thread(new ThreadStart(CalibratePAGain));
            t.Name = "PA Gain Calibration Thread";
            t.IsBackground = true;
            t.Priority = ThreadPriority.AboveNormal;
            t.Start();

            if(console.PowerOn)
                progress.Show();
        }
开发者ID:ae6jl-mdd,项目名称:powersdr-iq,代码行数:18,代码来源:paqualify.cs

示例7: FillGrid

		private void FillGrid()
		{
			lock (lockReadWrite)
			{
				// Progress bar for loading the items in the event log
				Progress progress = null;				

				// Reset the counters for event log types
				ResetCounters();
								
				// Show the progress bar only if the event log is not on the local machine
				if (!((log.MachineName == ".") || (log.MachineName == System.Net.Dns.GetHostName())))
				{
					progress = new Progress();
					progress.Show();
					progress.btnCancel.Click += new EventHandler(Progress_Cancel_Click);
				}

				Application.DoEvents();

				this.Cursor = Cursors.WaitCursor;

				try
				{
					dgEvents.SelectionChanged -= dgEvents_SelectionChanged;

					DataSet currentEntries = null;

					// Retrieve the Event Log Entries via WMI
					using (ManagementObjectCollection entries = GetEvents())
					{
						currentEntries = BuildDataSet(entries, progress);
					}

					// The request was cancelled
					if (currentEntries == null)
					{
						return;
					}
										
					if (bindingSource == null)
					{						
						bindingSource = new BindingSource(currentEntries, "Entries");
					}
					else
					{
						bindingSource.DataSource = currentEntries;
					}

					UpdateBindingSourceFilter();
					dgEvents.DataSource = bindingSource;
					dgEvents.Refresh();

					UpdateCounterButtons();
					dgEvents.SelectionChanged += dgEvents_SelectionChanged;
				}
				catch (Exception ex)
				{
					MessageBox.Show("Exception caught : " + ex.ToString(), "EventLog Viewer", MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
				finally
				{
					this.Cursor = Cursors.Default;

					if (progress != null)
					{
						progress.Close();
					}

					this.Focus();
				}
			}
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:73,代码来源:EventLogViewer.cs

示例8: btnRunSignal_Click

        private void btnRunSignal_Click(object sender, System.EventArgs e)
        {
            progress = new Progress("Signal Level Test");

            Thread t = new Thread(new ThreadStart(SignalTest));
            t.Name = "ProdTestSignal";
            t.IsBackground = true;
            t.Priority = ThreadPriority.Normal;
            t.Start();

            if(console.PowerOn)
                progress.Show();
        }
开发者ID:ae6jl-mdd,项目名称:powersdr-iq,代码行数:13,代码来源:production_test.cs

示例9: OnClosing

        /// <summary>
        /// When the form closes, make sure the wallet stops refreshing and all work is saved.
        /// </summary>
        /// <param name="e"></param>
        protected async override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            if (!skipExitWrappers)
            {
                Cursor = Cursors.WaitCursor;
                SetStatus(WalletStatus.Ready, "Exiting...");

                skipExitWrappers = true;
                e.Cancel = true;

                Progress progess = new Progress();
                progess.Show(this);

                var tf = new TaskFactory();

                progess.SetProgress("Stopping miners", 0);
                await tf.StartNew(() => MinerManager.Exit());


                progess.SetProgress("Stopping wallet", 33);
                await tf.StartNew(() => Wallet.Exit());


                progess.SetProgress("Stopping daemon", 66);
                await tf.StartNew(() => Daemon.Exit());

                Close();
            }
        }
开发者ID:BitKoot,项目名称:CryptoNoteWallet,代码行数:33,代码来源:MainWindow.cs

示例10: btnRunPACal_Click

 private void btnRunPACal_Click(object sender, System.EventArgs e)
 {
     console.PowerOn = true;
     btnRunPACal.Enabled = false;
     grpPA.Enabled = false;
     grpIO.Enabled = false;
     progress = new Progress("Cal PA Bridge/Power/SWR");
     btnRunPACal.BackColor = console.ButtonSelectedColor;
     Thread t = new Thread(new ThreadStart(PARunCal));
     t.Name = "Run PA Cal Thread";
     t.IsBackground = true;
     t.Priority = ThreadPriority.Normal;
     t.Start();
     progress.Show();
 }
开发者ID:ae6jl-mdd,项目名称:powersdr-iq,代码行数:15,代码来源:FLEX5000FinalTestForm.cs

示例11: btnPAVerify_Click

 private void btnPAVerify_Click(object sender, System.EventArgs e)
 {
     grpPA.Enabled = false;
     grpIO.Enabled = false;
     btnPAVerify.BackColor = console.ButtonSelectedColor;
     progress = new Progress("Verify PA Power");
     Thread t = new Thread(new ThreadStart(VerifyPA));
     t.Name = "Verify PA Power";
     t.IsBackground = true;
     t.Priority = ThreadPriority.Normal;
     t.Start();
     progress.Show();
 }
开发者ID:ae6jl-mdd,项目名称:powersdr-iq,代码行数:13,代码来源:FLEX5000FinalTestForm.cs

示例12: btnPASWR_Click

 private void btnPASWR_Click(object sender, System.EventArgs e)
 {
     progress = new Progress("Cal SWR");
     grpPA.Enabled = false;
     grpIO.Enabled = false;
     btnPASWR.BackColor = console.ButtonSelectedColor;
     Thread t = new Thread(new ThreadStart(CalPASWR));
     t.Name = "Cal SWR Thread";
     t.IsBackground = true;
     t.Priority = ThreadPriority.Normal;
     t.Start();
     progress.Show();
 }
开发者ID:ae6jl-mdd,项目名称:powersdr-iq,代码行数:13,代码来源:FLEX5000FinalTestForm.cs

示例13: btnPAPower_Click

        private void btnPAPower_Click(object sender, System.EventArgs e)
        {
            grpPA.Enabled = false;
            grpIO.Enabled = false;
            btnPAPower.BackColor = console.ButtonSelectedColor;
            progress = new Progress("Calibrate PA Power");

            Thread t = new Thread(new ThreadStart(CalPAPower));
            t.Name = "PA Power Cal Thread";
            t.IsBackground = true;
            t.Priority = ThreadPriority.AboveNormal;
            t.Start();

            if(console.PowerOn)
                progress.Show();
        }
开发者ID:ae6jl-mdd,项目名称:powersdr-iq,代码行数:16,代码来源:FLEX5000FinalTestForm.cs

示例14: btnNullBridge_Click

 private void btnNullBridge_Click(object sender, System.EventArgs e)
 {
     grpPA.Enabled = false;
     grpIO.Enabled = false;
     btnNullBridge.BackColor = console.ButtonSelectedColor;
     progress = new Progress("Null PA Bridge");
     Thread t = new Thread(new ThreadStart(NullBridge));
     t.Name = "Null PA Bridge Thread";
     t.IsBackground = true;
     t.Priority = ThreadPriority.Normal;
     t.Start();
     progress.Show();
 }
开发者ID:ae6jl-mdd,项目名称:powersdr-iq,代码行数:13,代码来源:FLEX5000FinalTestForm.cs

示例15: Main

        static void Main(string[] args)
        {
            Progress progressWindow;
            PrepareThread prepareThread;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            progressWindow = new Progress();
            prepareThread = new PrepareThread(args, progressWindow);

            Thread backgroundThread = new Thread(new ThreadStart(prepareThread.Run));

            progressWindow.Show();
            backgroundThread.Start();

            Application.Run(progressWindow);
        }
开发者ID:rkuschel,项目名称:win-installer,代码行数:17,代码来源:XenPrep.cs


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