Beispiel #1
0
        //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);
            }
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
 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);
                    }
                }
            });
        }
Beispiel #8
0
        /// <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());
 }
Beispiel #10
0
 /// <summary>
 /// Returns an enumerator that iterates through the collection.
 /// </summary>
 public IEnumerator <T> GetEnumerator()
 {
     return(_list.GetEnumerator());
 }
Beispiel #11
0
 public override IEnumerator <WordListEntry> GetEnumerator()
 {
     return(list.GetEnumerator());
 }
Beispiel #12
0
 public IEnumerator <BaseGameItem> GetEnumerator()
 {
     return(baseGameItems.GetEnumerator());
 }
Beispiel #13
0
 public IEnumerator <IClipboardItem> GetEnumerator()
 {
     return(_bindingList.GetEnumerator());
 }
Beispiel #14
0
 public IEnumerator <Film> GetEnumerator()
 {
     return(ListaFilmow.GetEnumerator());
 }
Beispiel #15
0
 public System.Collections.Generic.IEnumerator <T> GetEnumerator()
 {
     return(innerList.GetEnumerator());
 }
Beispiel #16
0
 public IEnumerator <Printscreen> GetEnumerator()
 {
     return(printscreens.GetEnumerator());
 }