Beispiel #1
0
        public void MaterialList(MaterialCommoditiesList mc, DB.SQLiteConnectionUser conn)
        {
            //System.Diagnostics.Debug.WriteLine("Updated at " + this.EventTimeUTC.ToString());
            mc.Clear(false);

            if (Raw != null)
            {
                foreach (Material m in Raw)
                {
                    mc.Set(MaterialCommodities.MaterialRawCategory, m.Name, m.Count, 0, conn);
                }
            }

            if (Manufactured != null)
            {
                foreach (Material m in Manufactured)
                {
                    mc.Set(MaterialCommodities.MaterialManufacturedCategory, m.Name, m.Count, 0, conn);
                }
            }

            if (Encoded != null)
            {
                foreach (Material m in Encoded)
                {
                    mc.Set(MaterialCommodities.MaterialEncodedCategory, m.Name, m.Count, 0, conn);
                }
            }
        }
        public void UpdateMaterials(MaterialCommoditiesList mc)
        {
            //System.Diagnostics.Debug.WriteLine("Updated at " + this.EventTimeUTC.ToString());
            mc.Clear(false);

            if (Raw != null)
            {
                foreach (Material m in Raw)
                {
                    mc.Set(MaterialCommodityData.CatType.Raw, m.Name, m.Count, 0);
                }
            }

            if (Manufactured != null)
            {
                foreach (Material m in Manufactured)
                {
                    mc.Set(MaterialCommodityData.CatType.Manufactured, m.Name, m.Count, 0);
                }
            }

            if (Encoded != null)
            {
                foreach (Material m in Encoded)
                {
                    mc.Set(MaterialCommodityData.CatType.Encoded, m.Name, m.Count, 0);
                }
            }
        }
        public void MaterialList(MaterialCommoditiesList mc, DB.SQLiteConnectionUser conn)
        {
            if (Materials != null)
            {
                foreach (MaterialItem m in Materials.Materials)
                {
                    mc.Set(m.Category, m.Name, m.Count, 0, conn);
                }
            }

            if (Commodities != null)
            {
                foreach (CommodityItem m in Commodities.Commodities)
                {
                    mc.Set(MaterialCommodities.CommodityCategory, m.Name, m.Count, m.BuyPrice, conn);
                }
            }
        }
Beispiel #4
0
        public void MaterialList(MaterialCommoditiesList mc, DB.SQLiteConnectionUser conn)
        {
            //System.Diagnostics.Debug.WriteLine("Updated at " + this.EventTimeUTC.ToString());
            mc.Clear(true);

            foreach (Cargo c in Inventory)
            {
                mc.Set(MaterialCommodities.CommodityCategory, c.Name, c.Count, 0, conn);
            }
        }
Beispiel #5
0
 public void UpdateCommodities(MaterialCommoditiesList mc, DB.SQLiteConnectionUser conn)
 {
     if (Commodities != null)
     {
         foreach (CommodityItem m in Commodities.Commodities)
         {
             mc.Set(MaterialCommodityData.CommodityCategory, m.Name, m.Count, m.BuyPrice, conn);
         }
     }
 }
Beispiel #6
0
 public void UpdateMaterials(MaterialCommoditiesList mc, DB.SQLiteConnectionUser conn)
 {
     if (Materials != null)
     {
         foreach (MaterialItem m in Materials.Materials)
         {
             mc.Set(m.Category, m.Name, m.Count, 0, conn);
         }
     }
 }
Beispiel #7
0
 public void UpdateCommodities(MaterialCommoditiesList mc)
 {
     if (Commodities != null)
     {
         foreach (CommodityItem m in Commodities.Commodities)
         {
             mc.Set(MaterialCommodityData.CatType.Commodity, m.Name, m.Count, m.BuyPrice);
         }
     }
 }
Beispiel #8
0
 public void UpdateMaterials(MaterialCommoditiesList mc)
 {
     if (Materials != null)
     {
         foreach (MaterialItem m in Materials.Materials)
         {
             mc.Set(m.Category, m.Name, m.Count, 0);
         }
     }
 }
Beispiel #9
0
        public void UpdateCommodities(MaterialCommoditiesList mc)
        {
            if (Vessel.Equals("Ship"))      // only want ship cargo to change lists..
            {
                //System.Diagnostics.Debug.WriteLine("Updated at " + this.EventTimeUTC.ToString());
                mc.Clear(true);

                if (Inventory != null)
                {
                    foreach (Cargo c in Inventory)
                    {
                        mc.Set(MaterialCommodityData.CatType.Commodity, c.Name, c.Count, 0);
                    }
                }
            }
        }