public void SetEngineTypes(List <KVPBase> data)
 {
     EngineTypes.Clear();
     foreach (var item in data)
     {
         EngineTypes.Add(item);
     }
 }
示例#2
0
 public void SetEngineTypes(List <KVPBase> data)
 {
     data = data.OrderBy(p => p.Name).ToList();
     EngineTypes.Clear();
     data.ForEach(o => EngineTypes.Add(o));
     if (LoadEngineTypesComplete != null)
     {
         LoadEngineTypesComplete(this, new EventArgs());
     }
 }
        public override async void Refresh()
        {
            base.Refresh();

            Refreshing = true;

            EngineTypes.Clear();

            var ets = await Services.Host.EngineTypeService.GetEngineTypes();

            var engineTypes = ets as EngineType[] ?? ets.ToArray();

            if (engineTypes != null && engineTypes.Any())
            {
                foreach (var et in engineTypes)
                {
                    EngineTypes.Add(new EngineTypeViewModel(et));
                }
            }

            Refreshing = false;
        }
示例#4
0
 private void ClearLists()
 {
     Marks.Clear(); Models.Clear();
     EngineTypes.Clear(); EngineVolumes.Clear(); BodyTypes.Clear(); TransTypes.Clear();
 }