Ejemplo n.º 1
0
        private void LoadOb()
        {
            lock (this)
            {
                JournalData.Clear();
                IEnumerator clientEnumerator = _entries.GetEnumerator();
                while (clientEnumerator.MoveNext())
                {
                    DictionaryEntry datas = (DictionaryEntry)clientEnumerator.Current;
                    journal_contentData entry = (journal_contentData)datas.Value;
                    if (entry.ID > 0)
                    {
                        JournalContentData data = new JournalContentData(entry);
                        if (!JournalData.Contains(data))
                            JournalData.Add(data);
                    }
                }

                var l1 =
                    from p in JournalData
                    where p.Enable == true
                    orderby p.Date descending
                    select p;
                JournalData = new ObservableCollection<JournalContentData>(l1);
            }
        }
Ejemplo n.º 2
0
 public JournalPacket(JournalContentData data)
     : base(data.ID.ToString())
 {
     Data = data.ToStruct();
 }
Ejemplo n.º 3
0
        private bool LoadOb()
        {
            JournalData.Clear();
            s_log.Info("Обнаружено записей: {0}", journalEntries.Count);
            if (!this.GenerateFreeGuids())
                return false;
            IEnumerator clientEnumerator = journalEntries.GetEnumerator();
            while (clientEnumerator.MoveNext())
            {
                DictionaryEntry datas = (DictionaryEntry)clientEnumerator.Current;
                journal_contentData entry = (journal_contentData)datas.Value;
                if (entry.ID>0)
                {
                    JournalContentData data = new JournalContentData(entry);
                    if (entry.ID > m_highGuid)
                        m_highGuid = entry.ID;
                    if (!JournalData.Contains(data))
                        JournalData.Add(data);
                }
            }
            s_log.Info("Записей загруженно: {0}/{1}", JournalData.Count, journalEntries.Count);

            var l1 =
                from p in JournalData
                where p.Enable == true 
                orderby p.Date descending 
                select p;
            JournalData = new ObservableCollection<JournalContentData>(l1);
            return true;
        }