Beispiel #1
0
 void SetContent()
 {
     cb.Items.Clear();
     cb.Sorted = false;
     foreach (SimPe.PackedFiles.Wrapper.ExtSDesc sdsc in FileTable.ProviderRegistry.SimDescriptionProvider.SimInstance.Values)
     {
         SimPe.Interfaces.IAlias a = new SimPe.Data.StaticAlias(sdsc.SimId, sdsc.SimName + " " + sdsc.SimFamilyName, new object[] { sdsc });
         cb.Items.Add(a);
     }
     cb.Sorted = true;
 }
Beispiel #2
0
        void SetContent()
        {
            cb.BeginUpdate();
            try
            {
                if (!loaded)
                {
                    return;
                }
                if (this.DesignMode)
                {
                    return;
                }

                cb.Items.Clear();
                cb.Sorted = false;
                foreach (SimPe.Cache.MemoryCacheItem mci in ObjectCache.List)
                {
                    bool use = false;
                    if (this.ShowInventory && mci.IsInventory && !mci.IsToken && !mci.IsMemory && !mci.IsJobData)
                    {
                        use = true;
                    }
                    if (this.ShowTokens && mci.IsToken)
                    {
                        use = true;
                    }
                    if (this.ShowMemories && !mci.IsToken && mci.IsMemory)
                    {
                        use = true;
                    }
                    if (this.ShowJobData && mci.IsJobData)
                    {
                        use = true;
                    }
                    if (this.ShowAspiration && mci.IsAspiration)
                    {
                        use = true;
                    }
                    if (this.ShowBadge && mci.IsBadge)
                    {
                        use = true;
                    }
                    if (this.ShowSkill && mci.IsSkill)
                    {
                        use = true;
                    }

                    if (!use)
                    {
                        continue;
                    }

                    SimPe.Interfaces.IAlias a = new SimPe.Data.StaticAlias(mci.Guid,
                                                                           mci.Name + " {" + mci.ObjdName + "}",
                                                                           new object[] { mci });

                    cb.Items.Add(a);
                }
                cb.Sorted = true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            finally
            {
                cb.EndUpdate();
            }
        }