Ejemplo n.º 1
0
 public void UpdateState(ScannerItem si, SimPe.Cache.PackageState ps, System.Windows.Forms.ListViewItem lvi)
 {
     if (ps.State != TriState.Null)
     {
         SimPe.PackedFiles.Wrapper.ShelveDimension cs = (SimPe.PackedFiles.Wrapper.ShelveDimension)ps.Data[0];
         AbstractScanner.SetSubItem(lvi, this.StartColum, cs.ToString(), ps);
     }
 }
Ejemplo n.º 2
0
        public void UpdateState(ScannerItem si, SimPe.Cache.PackageState ps, System.Windows.Forms.ListViewItem lvi)
        {
            uint fct = ps.Data[1];
            uint vct = ps.Data[0];

            AbstractScanner.SetSubItem(lvi, this.StartColum, vct.ToString(), ps);
            AbstractScanner.SetSubItem(lvi, this.StartColum + 1, fct.ToString(), ps);
        }
Ejemplo n.º 3
0
 public void UpdateState(ScannerItem si, SimPe.Cache.PackageState ps, System.Windows.Forms.ListViewItem lvi)
 {
     if (ps.State != TriState.Null)
     {
         ReadyState cs = (ReadyState)ps.Data[0];
         AbstractScanner.SetSubItem(lvi, this.StartColum, cs.ToString(), ps);
     }
 }
Ejemplo n.º 4
0
        public void UpdateState(ScannerItem si, SimPe.Cache.PackageState ps, System.Windows.Forms.ListViewItem lvi)
        {
            AbstractScanner.SetSubItem(lvi, this.StartColum + 1, "");

            System.Drawing.Color cl = lvi.ForeColor;
            if (ps.State == TriState.True)
            {
                uint c = 0;
                uint a = 0;
                for (int i = 0; i < ps.Data.Length - 1; i += 2)
                {
                    c |= ps.Data[i + 1];
                    a |= ps.Data[i];
                }

                string      age  = "";
                Data.Ages[] ages = (Data.Ages[])System.Enum.GetValues(typeof(Data.Ages));
                foreach (Data.Ages ag in ages)
                {
                    if ((a & (uint)ag) != 0)
                    {
                        if (age != "")
                        {
                            age += ", ";
                        }
                        age += ag.ToString();
                    }
                }
                if (a == 0)
                {
                    cl = System.Drawing.Color.Red;
                }
                AbstractScanner.SetSubItem(lvi, this.StartColum, age, cl);

                if (si.PackageCacheItem.Type != SimPe.Cache.PackageType.Skin)
                {
                    string category            = "";
                    Data.SkinCategories[] cats = (Data.SkinCategories[])System.Enum.GetValues(typeof(Data.SkinCategories));
                    foreach (Data.SkinCategories cat in cats)
                    {
                        if ((c & (uint)cat) != 0)
                        {
                            if (category != "")
                            {
                                category += ", ";
                            }
                            category += cat.ToString();
                        }
                    }
                    if (c == 0)
                    {
                        cl = System.Drawing.Color.Red;
                    }
                    AbstractScanner.SetSubItem(lvi, this.StartColum + 1, category, cl);
                }
            }
        }
Ejemplo n.º 5
0
        protected override void DoInitScan()
        {
            if (cachefile == null)
            {
                cachefile = MemoryCacheFile.InitCacheFile();
            }

            AbstractScanner.AddColumn(ListView, "Found Base", 180);
        }
Ejemplo n.º 6
0
        public void UpdateState(ScannerItem si, SimPe.Cache.PackageState ps, System.Windows.Forms.ListViewItem lvi)
        {
            string text = "yes";

            if (ps.State == TriState.False)
            {
                text = "no";
            }
            AbstractScanner.SetSubItem(lvi, this.StartColum, text, ps);
        }
Ejemplo n.º 7
0
 protected override void DoInitScan()
 {
     AbstractScanner.AddColumn(ListView, "Health", 100);
 }
Ejemplo n.º 8
0
 protected override void DoInitScan()
 {
     AbstractScanner.AddColumn(ListView, "Ages", 150);
     AbstractScanner.AddColumn(ListView, "Categories", 150);
 }
Ejemplo n.º 9
0
 protected override void DoInitScan()
 {
     AbstractScanner.AddColumn(ListView, "Shelve Dimension", 80);
 }
Ejemplo n.º 10
0
 protected override void DoInitScan()
 {
     AbstractScanner.AddColumn(ListView, "Vertices", 60);
     AbstractScanner.AddColumn(ListView, "Faces", 60);
 }
Ejemplo n.º 11
0
        public void UpdateState(ScannerItem si, SimPe.Cache.PackageState ps, System.Windows.Forms.ListViewItem lvi)
        {
            ps.State = TriState.True;
            string guids = "";
            string ff    = SimPe.Localization.Manager.GetString("unknown");

            foreach (uint guid in si.PackageCacheItem.Guids)
            {
                string flname = si.FileName.Trim().ToLower();
                if (guids != "")
                {
                    guids += ", ";
                }
                guids += "0x" + Helper.HexString(guid);

                /*foreach (MemoryCacheItem mci in cachefile.List)
                 * {
                 *      if (mci.Guid == guid)
                 *      {
                 *              if (mci.ParentCacheContainer!=null)
                 *              {
                 *                      if (mci.ParentCacheContainer.FileName.Trim().ToLower() != flname)
                 *                      {
                 *                              ps.State = TriState.False;
                 *                              break;
                 *                      }
                 *              }
                 *      }
                 * }*/

                string fl = si.Package.FileName.Trim().ToLower();
                if (list.ContainsKey(guid))
                {
                    string cmp = (string)list[guid];
                    if (cmp != fl)
                    {
                        ps.State = TriState.False;
                        ff       = cmp;
                    }
                    else
                    {
                        ps.State = TriState.True;
                    }
                }
                else
                {
                    list.Add(guid, fl);
                }
            }

            string text = "no";

            if (ps.State == TriState.False)
            {
                text = "yes";
            }

            AbstractScanner.SetSubItem(lvi, this.StartColum, guids);
            AbstractScanner.SetSubItem(lvi, this.StartColum + 1, text, ps);
            AbstractScanner.SetSubItem(lvi, this.StartColum + 2, ff);
        }
Ejemplo n.º 12
0
        protected override void DoInitScan()
        {
            if (list == null)
            {
                list = new Hashtable();
            }
            else
            {
                list.Clear();
            }

            string WaitingScreenMessage = "";

            if (WaitingScreen.Running)
            {
                WaitingScreenMessage = WaitingScreen.Message;
            }
            if (WaitingScreen.Running)
            {
                WaitingScreen.Message = "Init Cache File";
            }
            if (cachefile == null)
            {
                cachefile = MemoryCacheFile.InitCacheFile();
                cachefile.Save();
                cachefile.Dispose();
                GC.Collect();
                GC.WaitForPendingFinalizers();
                cachefile = null;
                cachefile = MemoryCacheFile.InitCacheFile();
            }

            AbstractScanner.AddColumn(ListView, "GUIDs", 180);
            AbstractScanner.AddColumn(ListView, "Duplicate GUID", 80);
            AbstractScanner.AddColumn(ListView, "First found", 80);

            if (WaitingScreen.Running)
            {
                WaitingScreen.Message = "Create hashtable";
            }
            foreach (MemoryCacheItem mci in cachefile.List)
            {
                string flname = null;
                if (mci.ParentCacheContainer == null)
                {
                    flname = mci.FileDescriptor.Filename;
                }
                else
                {
                    flname = mci.ParentCacheContainer.FileName;
                }
                list[(uint)mci.Guid] = flname.Trim().ToLower();

                /*if (mci.Guid == guid)
                 * {
                 *      if (mci.ParentCacheContainer!=null)
                 *      {
                 *              if (mci.ParentCacheContainer.FileName.Trim().ToLower() != flname)
                 *              {
                 *                      ps.State = TriState.False;
                 *                      break;
                 *              }
                 *      }
                 * }*/
            }
            if (WaitingScreen.Running)
            {
                WaitingScreen.Message = WaitingScreenMessage;
            }
        }
Ejemplo n.º 13
0
 public void UpdateState(ScannerItem si, SimPe.Cache.PackageState ps, System.Windows.Forms.ListViewItem lvi)
 {
     AbstractScanner.SetSubItem(lvi, this.StartColum, si.PackageCacheItem.Name);
 }
Ejemplo n.º 14
0
 protected override void DoInitScan()
 {
     AbstractScanner.AddColumn(ListView, "Caption", 180);
 }
Ejemplo n.º 15
0
 protected override void DoInitScan()
 {
     AbstractScanner.AddColumn(ListView, "Ready?", 80);
 }