public void AddReads(List <SeqRead> _reads) { if (Reads == null) { Reads = new List <SeqRead> (); } lock (Reads) { Reads.AddRange(_reads); } }
public void AddRead(SeqRead _read) { if (Reads == null) { Reads = new List <SeqRead> (); } MainData.LoadedSeqs++; lock (Reads) { Reads.Add(_read); } }
public DocTitlePageType TitlePage { get; set; } // public bool CalcRating(out long r) { r = 0; if ((Likes != null) && (Reads != null)) { r = Likes.Count * 100 + Reads.GroupBy(read => read.UserId).Count(); return true; } return false; }
private void Init(RedisClientSection section) { if (!string.IsNullOrEmpty(section.Cached)) { mCached = new KCached.CacheManager(section.Cached); } foreach (HostItem item in section.Writes) { Writes.Add(new RedisHost(item.Host, item.Connections)); } foreach (HostItem item in section.Reads) { Reads.Add(new RedisHost(item.Host, item.Connections)); } DB = section.DB; }
public void ContentCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { try { TotalReadings = Reads.Count().ToString(); duration = (DateTime.UtcNow - startedDateTime).ToString(); Duration = duration; UniqueReads = GetUniqueReads(); LastRead = e.NewItems.Cast <Read>().FirstOrDefault();//SyncRoot; dataGrid.ScrollIntoView(LastRead); } catch (Exception ex) { Debug.WriteLine(string.Format("{0}: {1}\n{2}", nameof(ContentCollectionChanged), ex.Message, ex.StackTrace)); } }
public object Read(Reads a_ReadType, DatabaseModel.Maps a_Map, DatabaseModel.Photos a_Photo) { switch (a_ReadType) { case Reads.FULLPHOTOPATH: return(GetPhotoPath(a_Photo)); case Reads.ALLPHOTOSFROMMAP: return(GetAllPhotosFromMap(a_Map)); case Reads.ALLPHOTOS: return(GetAllPhotos()); case Reads.DATACONTEXT: default: return(null); } }
private void Init(Reading reading) { try { Reads = reading.Reads; LastRead = Reads.LastOrDefault(); Started = Consts.UNKNOWN; Duration = Consts.UNKNOWN; if (reading.StartedDateTime != null) { startedDateTime = (DateTime)reading.StartedDateTime; Started = startedDateTime.ToString("dd.MM.yy HH:mm:ss:fff", CultureInfo.InvariantCulture); } if (reading.Reads.Count == 0) { TimingPoint = Consts.UNKNOWN; } if (reading.Reads.Count > 0) { TimingPoint = reading.TimingPoint; } TotalReadings = reading.TotalReadings.ToString(); IP = reading.Reader.Host; if (reading.IsConnected == true) { Status = "Connected"; } else if (reading.IsConnected == false) { Status = "Disconnected"; } else { Status = "Waiting for the BOX..."; } Task.Run(() => { while (true) { if (Started != Consts.UNKNOWN) { var tempDuration = DateTime.UtcNow.AddTicks(-startedDateTime.Ticks); Application.Current.Dispatcher.Invoke((Action)(() => { if (reading.IsConnected == true) { Duration = tempDuration.ToString("HH:mm:ss:fff", CultureInfo.InvariantCulture); } })); } Thread.Sleep(100); } }); if (string.IsNullOrEmpty(reading.FileName)) { RecoveryFile = Consts.UNKNOWN; } else { RecoveryFile = reading.FileName; } UniqueReads = GetUniqueReads(); } catch (Exception ex) { Debug.WriteLine(string.Format("{0}: {1}\n{2}", nameof(this.Init), ex.Message, ex.StackTrace)); } }
public ReadsAttribute(Reads desc) { }