本文整理汇总了C#中System.Windows.Media.Int32Collection.GetEnumerator方法的典型用法代码示例。如果您正苦于以下问题:C# Int32Collection.GetEnumerator方法的具体用法?C# Int32Collection.GetEnumerator怎么用?C# Int32Collection.GetEnumerator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Media.Int32Collection
的用法示例。
在下文中一共展示了Int32Collection.GetEnumerator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Submission
// Copy a job...
public Submission(string db, string backupdb, Int32Collection jobs, bool move = false)
{
InitializeComponent();
Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
Title = move ? "Moving..." : "Copying...";
ColumnDefinition c1 = new ColumnDefinition();
ColumnDefinition c2 = new ColumnDefinition();
c1.Width = new GridLength(170);
c2.Width = new GridLength(75);
outerGrid.ColumnDefinitions.Add(c1);
outerGrid.ColumnDefinitions.Add(c2);
workers.Clear();
Int32Collection.Enumerator e = jobs.GetEnumerator();
while (e.MoveNext())
{
int jobID = e.Current;
WindowInteropHelper helper = new WindowInteropHelper(this);
SubmissionWorker w = new SubmissionWorker(helper.Handle, workers.Count());
w.DoWork += new DoWorkEventHandler(worker_DoWork);
w.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged);
w.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
w.WorkerReportsProgress = true;
w.WorkerSupportsCancellation = false;
RowDefinition r = new RowDefinition();
outerGrid.RowDefinitions.Add(r);
r.Height = new GridLength(26);
Label l = new Label();
l.Content = (move ? "Moving" : "Copying") + " Job #" + jobID.ToString() + "...";
l.Height = 26;
Grid.SetRow(l, outerGrid.RowDefinitions.Count() - 1);
Grid.SetColumn(l, 0);
outerGrid.Children.Add(l);
ProgressBar p = new ProgressBar();
p.Height = 26;
p.Width = 75;
Grid.SetRow(p, outerGrid.RowDefinitions.Count() - 1);
Grid.SetColumn(p, 1);
outerGrid.Children.Add(p);
pbars.Add(w.id, p);
String[] args = { "Copy", db, backupdb, jobID.ToString(), move.ToString() };
workers.Add(workers.Count(), w);
w.RunWorkerAsync(args);
}
Mouse.OverrideCursor = null;
}