//Wykonywanie wszystkich operacji private void button_wykonaj_Click(object sender, EventArgs e) { if (list.Count == 0) { label_komunikat.Text = "Brak zadań do wykonania."; } else { string text = ""; label_komunikat.Text = "Wykonuję."; IEnumerator <Task> i = list.GetEnumerator(); while (i.MoveNext()) { i.Current.ExecuteQuest(); /*if (i.Current.JpgPath != "") * { * text += i.Current.TaskName + ", "; * }*/ } //text = text.Substring(0, text.Length - 2); //label_komunikat.Text = "Wykonano zadania: " + text + ";"; logger.Log("Wykonano zadania: " + text + ";"); } }
private IEnumerable <Image> CycleImages() { var en = StagedImageList.GetEnumerator(); while (en.MoveNext()) { var img = Image.FromFile(en.Current.FilePath); yield return(img); } }
public ArrayList ConvertToArrayList(BindingList <Measurement> bm) { ArrayList arrayList = new ArrayList(); IEnumerator enumerator = (IEnumerator)bm.GetEnumerator(); while (enumerator.MoveNext()) { arrayList.Add((object)(Measurement)enumerator.Current); } return(arrayList); }
private void fireSelectionChanged(BindingList <ICompound> selectedCompounds) { List <ICompound> selected = new List <ICompound>(); IEnumerator <ICompound> enumerator = selectedCompounds.GetEnumerator(); while (enumerator.MoveNext()) { selected.Add(enumerator.Current); } //this.EventAggregator.GetEvent<CompoundSelectionChanged>().Publish(selected); }
private void btn_run_Click(object sender, EventArgs e) { if (tasks == null) { Stopped(); return; } current_task = tasks.GetEnumerator(); btn_cancel.Enabled = true; btn_run.Enabled = false; btn_done.Enabled = false; RunNextTask(); }
private void fireSelectionChanged(BindingList <ICompoundGroupItem> selectedCompounds) { IEnumerator <ICompoundGroupItem> enumerator = selectedCompounds.GetEnumerator(); ICompoundGroup obj = null; while (enumerator.MoveNext()) { ICompoundGroupItem temp = enumerator.Current; if (obj == null) { obj = temp.CompoundGroupInfo; } } EventAggregator.GetEvent <CompoundSelectionChanged>().Publish(obj); }
/// <summary> /// Updates the list of <see cref="KimsufiServerStatus"/>. /// </summary> /// <param name="serverStatus">The list of <see cref="KimsufiServerStatus"/>.</param> public void SetKimsufiServerStatus(IList <ServerStatus> serverStatus) { this.InvokeOnUiThreadIfRequired(() => { foreach (ServerStatus item in serverStatus) { // Does the item already exists in the binding source ? var listEnumerator = internalServerStatus.GetEnumerator(); bool isEdited = false; while (listEnumerator.MoveNext()) { ServerStatus colItem = listEnumerator.Current; if (colItem.Name == item.Name && colItem.GeographicZone == item.GeographicZone) { bool shouldAlert = false; // Check alerts (if we watch a specific server, that was previously unavailable and is now available). if (colItem.Watch && colItem.IsAvailable == false && item.IsAvailable == true) { shouldAlert = true; } // Perform item update. colItem.GeographicZone = item.GeographicZone; colItem.IsAvailable = item.IsAvailable; colItem.Memory = item.Memory; colItem.Network = item.Network; colItem.Price = item.Price; colItem.Processor = item.Processor; colItem.ProcessorDetails = item.ProcessorDetails; colItem.Storage = item.Storage; isEdited = true; if (shouldAlert) { AlertFor(colItem); } } } if (!isEdited) { internalServerStatus.Add(item); } } }); }
/// <summary> /// /// </summary> /// <param name="pIP"></param> /// <param name="pBrowser"></param> /// <param name="pCookie"></param> /// <returns></returns> private bool IsInDGV(String pIP, String pBrowser, String pCookie) { bool lRetVal = false; Session.Config.Session lSess; IEnumerator lEnumList = cSessions.GetEnumerator(); lEnumList.Reset(); while (lEnumList.MoveNext()) { if ((lSess = (Session.Config.Session)lEnumList.Current) != null) { if (lSess.SrcIP == pIP && // lSess.Browser == pBrowser && lSess.SessionCookies == pCookie) { lRetVal = true; break; } // if (lSess.Sr... } // if ((lSess... } // while (lEnumLi... return(lRetVal); }
IEnumerator IEnumerable.GetEnumerator() { return(_internalList.GetEnumerator()); }
/// <summary> /// Returns an enumerator that iterates through the collection. /// </summary> public IEnumerator <T> GetEnumerator() { return(_list.GetEnumerator()); }
public override IEnumerator <WordListEntry> GetEnumerator() { return(list.GetEnumerator()); }
public IEnumerator <BaseGameItem> GetEnumerator() { return(baseGameItems.GetEnumerator()); }
public IEnumerator <IClipboardItem> GetEnumerator() { return(_bindingList.GetEnumerator()); }
public IEnumerator <Film> GetEnumerator() { return(ListaFilmow.GetEnumerator()); }
public System.Collections.Generic.IEnumerator <T> GetEnumerator() { return(innerList.GetEnumerator()); }
public IEnumerator <Printscreen> GetEnumerator() { return(printscreens.GetEnumerator()); }