Exemplo n.º 1
0
        public void DataLoadLogAdd(string entry)
        {
            DataLogEntry t = default(DataLogEntry);

            if (entry != null)
            {
                t.Label = string.Format(System.Globalization.CultureInfo.CurrentCulture, "{0:HH: mm:ss}", System.DateTime.Now);
                t.Text  = entry;

                //lock (this)
                //{
                //    currentIndex += 1;

                // if (currentIndex > maxCount) { currentIndex = 0; }

                //if (DataLoadLog.Count <= maxCount)
                //{
                // Add if not full yet
                DataLoadLog.Insert(0, t);
                //}
                //else
                //{
                //    // Replace if full
                //    DataLoadLog[currentIndex] = t;
                //}
                //}
            }
        }
Exemplo n.º 2
0
        private async Task <bool> DataLoadLogRemove()
        {
            await MainThread.InvokeOnMainThreadAsync(() =>
            {
                if (DataLoadLog.Count > 0)
                {
                    DataLoadLog.Remove(DataLoadLog.FirstOrDefault());
                }
            });

            return(true);
        }
Exemplo n.º 3
0
        private async Task <bool> DataLoadLogAdd(string entry)
        {
            await MainThread.InvokeOnMainThreadAsync(() =>
            {
                DataLogEntry t = default(DataLogEntry);

                if (!string.IsNullOrEmpty(entry))
                {
                    t.Label = string.Format(System.Globalization.CultureInfo.CurrentCulture, "{0:HH: mm:ss}", System.DateTime.Now);
                    t.Text  = entry;

                    DataLoadLog.Insert(0, t);
                }
            });

            return(true);
        }