Beispiel #1
0
        public void SetComponents(MapCon mapCon, ListViewPanel SpawnList, ListViewPanel SpawnTimerList, ListViewPanel GroundItemList, MapPane mapPane, EQData eq)

        {
            this.mapCon = mapCon;

            this.SpawnList = SpawnList;

            this.SpawnTimerList = SpawnTimerList;

            this.GroundItemList = GroundItemList;

            this.eq = eq;

            initialized = true;
        }
Beispiel #2
0
        // Add new spawns to the list, or update changed spawns.

        // Also misused to save the spawn list occasionally

        public void UpdateList(ListViewPanel SpawnTimerList)
        {
            LogLib.WriteLine("Entering UpdateList()", LogLevel.Trace);
            DateTime now = DateTime.Now;

            try

            {
                foreach (SPAWNTIMER st in mobsTimer2.Values)

                {
                    ListViewItem itmSpawnTimerList = st.GetListItem();


                    if (itmSpawnTimerList != null)

                    {
                        st.itmSpawnTimerList = itmSpawnTimerList;

                        try

                        {
                            SpawnTimerList.listView.Items.Add(itmSpawnTimerList);
                        }

                        catch (Exception ex) { LogLib.WriteLine("Error in ProcessSpawnTimer() List Add: " + itmSpawnTimerList + " - ", ex); }
                    }
                }
            }

            catch (Exception ex) { LogLib.WriteLine("Error in ProcessSpawnTimer(): ", ex); }

            if (MustSave)

            {
                TimeSpan interval = DateTime.Now.Subtract(LastSaveTime);

                if (interval.TotalSeconds > 10)

                {
                    SaveTimers();
                }
            }



            LogLib.WriteLine("Exiting UpdateList()", LogLevel.Trace);
        }
Beispiel #3
0
        // Add new spawns to the list, or update changed spawns.
        // Also misused to save the spawn list occasionally
        public void UpdateList(ListViewPanel SpawnTimerList)
        {
            _ = DateTime.Now;
            try

            {
                foreach (Spawntimer st in mobsTimer2.Values)
                {
                    ListViewItem itmSpawnTimerList = st.GetListItem();

                    if (itmSpawnTimerList != null)
                    {
                        st.ItmSpawnTimerList = itmSpawnTimerList;
                        SpawnTimerList.listView.Items.Add(itmSpawnTimerList);
                    }
                }
            }
            catch (Exception ex) { LogLib.WriteLine("Error in ProcessSpawnTimer(): ", ex); }

            if (MustSave && DateTime.Now.Subtract(LastSaveTime).TotalSeconds > 60)
            {
                SaveTimers();
            }
        }