Esempio n. 1
0
        async Task LoadFieldListCommand()
        {
            if (IsRefreshing)
            {
                return;
            }

            IsRefreshing = true;

            try
            {
                FieldList.Clear();
                var items = await App.FieldTable.GetItemsAsync(SelectedFarmer);

                FieldList = new ObservableCollection <FieldModel>(items);
                //foreach (var item in items)
                //{
                //    //item.IsDeleted = item.FarmerId > 0  && item.FarmerId < 11 ?  false : true;
                //    FieldList.Add(item);
                //}
            }
            catch (Exception ex)
            {
                //Debug.WriteLine(ex);
            }
            finally
            {
                await Task.Delay(500);

                IsRefreshing = false;
            }
        }
Esempio n. 2
0
 protected void PopulateFieldList(bool blankOnly)
 {
     try
     {
         FieldList.Clear();
         EmptyFieldList.Clear();
         foreach (var propinfo in GetType().GetProperties())
         {
             if (_fieldListExclude.Contains(propinfo.Name) == false)
             {
                 if (!blankOnly)
                 {
                     FieldList.Add(propinfo.Name, propinfo.GetValue(this, null));
                     if (propinfo.GetValue(this, null).ToString() != string.Empty)
                     {
                         FieldListNoBlankRows.Add(propinfo.Name, propinfo.GetValue(this, null));
                     }
                 }
                 EmptyFieldList.Add(propinfo.Name, null);
             }
         }
     }
     catch (NullReferenceException ex)
     {
         throw new BookieException("Known issue with Mobi");
     }
 }
Esempio n. 3
0
 private void ClearAllFields()
 {
     FieldList.Clear();
     ErrorCount = 0;
     if (FileType.Delimited == TextFileType)
     {
         CanInfer = true;
     }
     SampleFormattedData = new DataView();
 }
Esempio n. 4
0
        public void Dispose()
        {
            InputList.Clear();
            FieldList.Clear();

            foreach (var m in OutputList)
            {
                m.Dispose();
            }
            OutputList.Clear();
        }
Esempio n. 5
0
 private void SetFieldList(string[] headers)
 {
     FieldList.Clear();
     foreach (var columnHeaderName in headers)
     {
         var aField = new WrapperAfield()
         {
             Name = columnHeaderName, ViewModelHandle = this
         };
         FieldList.Add(aField);
     }
 }
Esempio n. 6
0
        protected override void CopyFrom(TypeBase type)
        {
            base.CopyFrom(type);

            CompositeType compositeType = (CompositeType)type;

            FieldList.Clear();
            FieldList.Capacity = compositeType.FieldList.Capacity;
            OperationList.Clear();
            OperationList.Capacity = compositeType.OperationList.Capacity;

            foreach (Field field in compositeType.FieldList)
            {
                AddField(field.Clone(this));
            }
            foreach (Operation operation in compositeType.OperationList)
            {
                AddOperation(operation.Clone(this));
            }
        }
Esempio n. 7
0
 public void TurnChange()
 {
     foreach (GameObject go in FieldList)
     {
         go.transform.parent = Trash.transform;
         go.transform.Find("MiniCard").gameObject.SetActive(false);
     }
     TrashList.AddRange(FieldList);
     FieldList.Clear();
     Draw();
     NormalPoint  = 0;
     SpecialPoint = 0;
     if (TurnPlayer)
     {
         HandsAnimeStart();
     }
     else
     {
         HandsUpdate();
     }
     EndThisTurn = false;
 }