Beispiel #1
0
        void search(string searchWord0, RecLogItem selectedRecLogItem = null, EpgContentInfo epgContentInfo0 = null)
        {
            string selectedItem1 = null;
            string searchWord1   = trimKeyword(searchWord0);

            _resultList = _mainWindow.recLogView.getRecLogList(searchWord1, Settings.Instance.RecLogWindow_SearchResultLimit, epgContentInfo0: epgContentInfo0);
            List <string> lines1 = new List <string>();

            if (0 < _resultList.Count)
            {
                foreach (RecLogItem item in _resultList)
                {
                    string line1 = "[" + item.recodeStatus_Abbr + "]" + "[’" + item.epgEventInfoR.start_time.ToString("yy/MM/dd") + "] " +
                                   item.epgEventInfoR.ShortInfo.event_name;
                    if (selectedRecLogItem != null && selectedRecLogItem.ID == item.ID)
                    {
                        selectedItem1 = line1;
                    }
                    else
                    {
                        lines1.Add(line1);
                    }
                }
            }
            else
            {
                lines1.Add("(NOT FOUND)");
            }
            //
            //if (string.IsNullOrEmpty(selectedItem1))
            //{
            //    richTextBox_SelectedItem.Visibility = Visibility.Collapsed;
            //}
            //else
            {
                richTextBox_SelectedItem.Visibility = Visibility.Visible;
                drawText(richTextBox_SelectedItem, new List <string>()
                {
                    selectedItem1
                }, _background_Selected);
            }
            textBox.Text = searchWord1;
            drawText(lines1);
        }
Beispiel #2
0
 public EpgEventInfo()
 {
     original_network_id = 0;
     transport_stream_id = 0;
     service_id          = 0;
     event_id            = 0;
     StartTimeFlag       = 0;
     start_time          = new DateTime();
     DurationFlag        = 0;
     durationSec         = 0;
     ShortInfo           = null;
     ExtInfo             = null;
     ContentInfo         = null;
     ComponentInfo       = null;
     AudioInfo           = null;
     EventGroupInfo      = null;
     EventRelayInfo      = null;
     FreeCAFlag          = 0;
 }
Beispiel #3
0
        public void Read(MemoryStream s, ushort version)
        {
            var r = new CtrlCmdReader(s, version);

            r.Begin();
            r.Read(ref original_network_id);
            r.Read(ref transport_stream_id);
            r.Read(ref service_id);
            r.Read(ref event_id);
            r.Read(ref StartTimeFlag);
            try
            {
                r.Read(ref start_time);
            }
            catch (ArgumentOutOfRangeException)
            {
            }
            r.Read(ref DurationFlag);
            r.Read(ref durationSec);
            int size = 0;

            ShortInfo = null;
            r.Read(ref size);
            if (size != 4)
            {
                r.Stream.Seek(-4, SeekOrigin.Current);
                ShortInfo = new EpgShortEventInfo();
                r.Read(ref ShortInfo);
            }
            ExtInfo = null;
            r.Read(ref size);
            if (size != 4)
            {
                r.Stream.Seek(-4, SeekOrigin.Current);
                ExtInfo = new EpgExtendedEventInfo();
                r.Read(ref ExtInfo);
            }
            ContentInfo = null;
            r.Read(ref size);
            if (size != 4)
            {
                r.Stream.Seek(-4, SeekOrigin.Current);
                ContentInfo = new EpgContentInfo();
                r.Read(ref ContentInfo);
            }
            ComponentInfo = null;
            r.Read(ref size);
            if (size != 4)
            {
                r.Stream.Seek(-4, SeekOrigin.Current);
                ComponentInfo = new EpgComponentInfo();
                r.Read(ref ComponentInfo);
            }
            AudioInfo = null;
            r.Read(ref size);
            if (size != 4)
            {
                r.Stream.Seek(-4, SeekOrigin.Current);
                AudioInfo = new EpgAudioComponentInfo();
                r.Read(ref AudioInfo);
            }
            EventGroupInfo = null;
            r.Read(ref size);
            if (size != 4)
            {
                r.Stream.Seek(-4, SeekOrigin.Current);
                EventGroupInfo = new EpgEventGroupInfo();
                r.Read(ref EventGroupInfo);
            }
            EventRelayInfo = null;
            r.Read(ref size);
            if (size != 4)
            {
                r.Stream.Seek(-4, SeekOrigin.Current);
                EventRelayInfo = new EpgEventGroupInfo();
                r.Read(ref EventRelayInfo);
            }
            r.Read(ref FreeCAFlag);
            r.End();
        }
Beispiel #4
0
 public void Read(MemoryStream s, ushort version)
 {
     var r = new CtrlCmdReader(s, version);
     r.Begin();
     r.Read(ref original_network_id);
     r.Read(ref transport_stream_id);
     r.Read(ref service_id);
     r.Read(ref event_id);
     r.Read(ref StartTimeFlag);
     try
     {
         r.Read(ref start_time);
     }
     catch (ArgumentOutOfRangeException)
     {
     }
     r.Read(ref DurationFlag);
     r.Read(ref durationSec);
     int size = 0;
     ShortInfo = null;
     r.Read(ref size);
     if (size != 4)
     {
         r.Stream.Seek(-4, SeekOrigin.Current);
         ShortInfo = new EpgShortEventInfo();
         r.Read(ref ShortInfo);
     }
     ExtInfo = null;
     r.Read(ref size);
     if (size != 4)
     {
         r.Stream.Seek(-4, SeekOrigin.Current);
         ExtInfo = new EpgExtendedEventInfo();
         r.Read(ref ExtInfo);
     }
     ContentInfo = null;
     r.Read(ref size);
     if (size != 4)
     {
         r.Stream.Seek(-4, SeekOrigin.Current);
         ContentInfo = new EpgContentInfo();
         r.Read(ref ContentInfo);
     }
     ComponentInfo = null;
     r.Read(ref size);
     if (size != 4)
     {
         r.Stream.Seek(-4, SeekOrigin.Current);
         ComponentInfo = new EpgComponentInfo();
         r.Read(ref ComponentInfo);
     }
     AudioInfo = null;
     r.Read(ref size);
     if (size != 4)
     {
         r.Stream.Seek(-4, SeekOrigin.Current);
         AudioInfo = new EpgAudioComponentInfo();
         r.Read(ref AudioInfo);
     }
     EventGroupInfo = null;
     r.Read(ref size);
     if (size != 4)
     {
         r.Stream.Seek(-4, SeekOrigin.Current);
         EventGroupInfo = new EpgEventGroupInfo();
         r.Read(ref EventGroupInfo);
     }
     EventRelayInfo = null;
     r.Read(ref size);
     if (size != 4)
     {
         r.Stream.Seek(-4, SeekOrigin.Current);
         EventRelayInfo = new EpgEventGroupInfo();
         r.Read(ref EventRelayInfo);
     }
     r.Read(ref FreeCAFlag);
     r.End();
 }
Beispiel #5
0
 public EpgEventInfo()
 {
     original_network_id = 0;
     transport_stream_id = 0;
     service_id = 0;
     event_id = 0;
     StartTimeFlag = 0;
     start_time = new DateTime();
     DurationFlag = 0;
     durationSec = 0;
     ShortInfo = null;
     ExtInfo = null;
     ContentInfo = null;
     ComponentInfo = null;
     AudioInfo = null;
     EventGroupInfo = null;
     EventRelayInfo = null;
     FreeCAFlag = 0;
 }
Beispiel #6
0
 void search(string searchWord0, RecLogItem selectedRecLogItem = null, EpgContentInfo epgContentInfo0 = null)
 {
     string selectedItem1 = null;
     string searchWord1 = trimKeyword(searchWord0);
     _resultList = _mainWindow.recLogView.getRecLogList(searchWord1, Settings.Instance.RecLogWindow_SearchResultLimit, epgContentInfo0: epgContentInfo0);
     List<string> lines1 = new List<string>();
     if (0 < _resultList.Count)
     {
         foreach (RecLogItem item in _resultList)
         {
             string line1 = "[" + item.recodeStatus_Abbr + "]" + "[’" + item.epgEventInfoR.start_time.ToString("yy/MM/dd") + "] " +
                 item.epgEventInfoR.ShortInfo.event_name;
             if (selectedRecLogItem != null && selectedRecLogItem.ID == item.ID)
             {
                 selectedItem1 = line1;
             }
             else
             {
                 lines1.Add(line1);
             }
         }
     }
     else
     {
         lines1.Add("(NOT FOUND)");
     }
     //
     //if (string.IsNullOrEmpty(selectedItem1))
     //{
     //    richTextBox_SelectedItem.Visibility = Visibility.Collapsed;
     //}
     //else
     {
         richTextBox_SelectedItem.Visibility = Visibility.Visible;
         drawText(richTextBox_SelectedItem, new List<string>() { selectedItem1 }, _background_Selected);
     }
     textBox.Text = searchWord1;
     drawText(lines1);
 }
Beispiel #7
0
        public List<RecLogItem> getRecLogList(string searchWord0, int resultLimit0, RecLogItem.RecodeStatuses recodeStatuse0 = RecLogItem.RecodeStatuses.ALL,
            DB_RecLog.searchColumns searchColumns0 = DB_RecLog.searchColumns.title, EpgContentInfo epgContentInfo0 = null)
        {
            List<RecLogItem> recLogItemList1;
            switch (searchMethod)
            {
                case searchMethods.LIKE:
                    recLogItemList1 = db_RecLog.search_Like(searchWord0, recodeStatuse0, searchColumns0, resultLimit0, epgContentInfo0);
                    break;
                case searchMethods.Contrains:
                    recLogItemList1 = db_RecLog.search_Fulltext(searchWord0, recodeStatuse0, searchColumns0, resultLimit0, epgContentInfo0);
                    break;
                case searchMethods.Freetext:
                    recLogItemList1 = db_RecLog.search_Fulltext(searchWord0, recodeStatuse0, searchColumns0, resultLimit0, epgContentInfo0, true);
                    break;
                default:
                    throw new NotSupportedException();
            }

            return recLogItemList1;
        }