コード例 #1
0
 public CompileValue GetValue(CompileCategory category, int index)
 {
     if ((int)category < (int)CompileThresholds.Gather)
     {
         CompileDataset dataset = Datasets[(int)category];
         return(index >= 0 && index < dataset.collection.Count ? dataset.collection[index] : null);
     }
     return(null);
 }
コード例 #2
0
        public CompileValue GetValue(CompileCategory category, string fileName)
        {
            CompileDataset dataset = Datasets[(int)category];

            if (dataset.dictionary.ContainsKey(fileName))
            {
                return(dataset.dictionary[fileName]);
            }
            return(null);
        }
コード例 #3
0
        private void ReadCompileUnit(BinaryReader reader, List <UnitValue> list, uint index)
        {
            var name        = reader.ReadString();
            var compileData = new UnitValue(name, index);

            for (CompileCategory category = 0; (int)category < (int)CompileThresholds.Display; ++category)
            {
                compileData.SetValue(category, reader.ReadUInt32());
            }

            list.Add(compileData);
        }
コード例 #4
0
 public List <CompileValue> GetCollection(CompileCategory category)
 {
     return(Datasets[(int)category].collection);
 }
コード例 #5
0
 public UnitTotal GetTotal(CompileCategory category)
 {
     return((int)category < (int)CompileThresholds.Display && (int)category < Totals.Count ? Totals[(int)category] : null);
 }
コード例 #6
0
 public ObservableCollection <CompileValue> GetCollection(CompileCategory category)
 {
     return(_datasets[(int)category].collection);
 }