Пример #1
0
        private void UpdateEventList(bool scroll = false)
        {
            lstCtrl.ReloadInfoData(dataList =>
            {
                var selected = new HashSet <UInt64>(serviceList.Where(item => item.IsSelected).Select(item => item.Key));
                foreach (var item in serviceEventList.Where(item => selected.Contains(item.serviceInfo.Key)))
                {
                    dataList.AddRange(item.eventList.Where(e => e.IsGroupMainEvent == true).ToSearchList(viewInfo.FilterEnded));
                }
                dataList.ForEach(d =>
                {
                    d.EpgSettingIndex = viewInfo.EpgSettingIndex;
                    d.Filtered        = viewData.EventFilteredHash.Contains(d.KeyID);
                });
                return(true);
            });

            if (RestoreState.selectList != null)
            {
                RestoreState.selectList.RestoreListViewSelected(listView_event);
            }

            if (scroll == true)
            {
                listView_event.ScrollIntoView(listView_event.SelectedItem);
            }
        }
Пример #2
0
        private void UpdateEventList(bool scroll = false)
        {
            lstCtrl.ReloadInfoData(dataList =>
            {
                if (serviceEventList.Count != serviceList.Count)
                {
                    return(false);
                }

                foreach (var list in serviceEventList.Zip(serviceList, (f, s) => new { f, s })
                         .Where(d => d.s.IsSelected == true).Select(d => d.f.eventList))
                {
                    dataList.AddRange(list.Where(e => e.IsGroupMainEvent == true).ToSearchList(viewInfo.FilterEnded));
                }
                return(true);
            });

            if (RestoreState.selectList != null)
            {
                RestoreState.selectList.RestoreListViewSelected(listView_event);
            }

            if (scroll == true)
            {
                listView_event.ScrollIntoView(listView_event.SelectedItem);
            }
        }
Пример #3
0
 protected override bool ReloadInfoData()
 {
     return(lstCtrl.ReloadInfoData(dataList =>
     {
         dataList.AddRange(CommonManager.Instance.DB.ReserveList.Values.Select(info => new ReserveItem(info)));
         return true;
     }));
 }
Пример #4
0
 private bool ReloadList()
 {
     return(lstCtrl.ReloadInfoData(dataList =>
     {
         dataList.AddRange(CommonManager.Instance.NotifyLogList.Select(info => new NotifySrvInfoItem(info)));
         return true;
     }));
 }
Пример #5
0
        private void UpdateEventList(bool scroll = false)
        {
            lstCtrl.ReloadInfoData(reloadEventList);

            if (scroll == true)
            {
                //lstCtrl内のジャンプがReloadReserveData()にキャンセルされるので、ReloadProgramViewItem()からのとき再実行しておく。
                Dispatcher.BeginInvoke(new Action(() => listView_event.ScrollIntoView(listView_event.SelectedItem)));
            }
        }
Пример #6
0
        protected override bool ReloadInfoData()
        {
            EpgCmds.DragCancel.Execute(null, dragMover);

            return(lstCtrl.ReloadInfoData(dataList =>
            {
                dataList.AddRange(AutoAddData.GetDBManagerList(typeof(T)).Select(info => (S)Activator.CreateInstance(typeof(S), info.DeepCloneObj())));
                dragMover.NotSaved = false;
                return true;
            }));
        }
Пример #7
0
 protected override bool ReloadInfoData()
 {
     return(lstCtrl.ReloadInfoData(dataList =>
     {
         foreach (ReserveData info in CommonManager.Instance.DB.ReserveList.Values)
         {
             dataList.Add(new ReserveItem(info));
         }
         return true;
     }));
 }
Пример #8
0
        protected override bool ReloadInfoData()
        {
            return(lstCtrl.ReloadInfoData(dataList =>
            {
                ErrCode err = CommonManager.Instance.DB.ReloadrecFileInfo();
                if (CommonManager.CmdErrMsgTypical(err, "録画情報の取得") == false)
                {
                    return false;
                }

                foreach (RecFileInfo info in CommonManager.Instance.DB.RecFileInfo.Values)
                {
                    dataList.Add(new RecInfoItem(info));
                }
                return true;
            }));
        }
Пример #9
0
        protected override bool ReloadInfoData()
        {
            EpgCmds.DragCancel.Execute(null, this);

            return(lstCtrl.ReloadInfoData(dataList =>
            {
                DBManager db = CommonManager.Instance.DB;
                ErrCode err = typeof(T) == typeof(EpgAutoAddData) ? db.ReloadEpgAutoAddInfo() : db.ReloadManualAutoAddInfo();
                if (CommonManager.CmdErrMsgTypical(err, "情報の取得") == false)
                {
                    return false;
                }

                ICollection values = typeof(T) == typeof(EpgAutoAddData) ? db.EpgAutoAddList.Values as ICollection : db.ManualAutoAddList.Values as ICollection;
                dataList.AddRange(values.OfType <T>().Select(info => (S)Activator.CreateInstance(typeof(S), info.CloneObj())));

                dragMover.NotSaved = false;
                return true;
            }));
        }
Пример #10
0
        protected override bool ReloadInfoData()
        {
            return(lstCtrl.ReloadInfoData(dataList =>
            {
                ErrCode err = CommonManager.Instance.DB.ReloadRecFileInfo();
                if (CommonManager.CmdErrMsgTypical(err, "録画情報の取得") == false)
                {
                    return false;
                }

                dataList.AddRange(CommonManager.Instance.DB.RecFileInfo.Values.Select(info => new RecInfoItem(info)));

                //ツールチップに番組情報を表示する場合は先に一括で詳細情報を読込んでおく
                if (Settings.Instance.NoToolTip == false && Settings.Instance.RecInfoToolTipMode == 1)
                {
                    CommonManager.Instance.DB.ReadRecFileAppend();
                }

                return true;
            }));
        }
Пример #11
0
        private void UpdateEventList(bool scroll = false)
        {
            lstCtrl.ReloadInfoData(dataList =>
            {
                var eventDic = serviceEventList.ToDictionary(item => item.serviceInfo.Create64Key(), item => item.eventList);
                foreach (var item in serviceList.Where(item => item.IsSelected == true && eventDic.ContainsKey(item.Key) == true))
                {
                    dataList.AddRange(eventDic[item.Key].Where(e => e.IsGroupMainEvent == true).ToSearchList(viewInfo.FilterEnded));
                }
                return(true);
            });

            if (RestoreState.selectList != null)
            {
                RestoreState.selectList.RestoreListViewSelected(listView_event);
            }

            if (scroll == true)
            {
                listView_event.ScrollIntoView(listView_event.SelectedItem);
            }
        }
Пример #12
0
        private void SearchPg(bool addSearchLog = false)
        {
            if (addSearchLog == true)
            {
                searchKeyView.AddSearchLog();
            }

            lstCtrl.ReloadInfoData(dataList =>
            {
                EpgSearchKeyInfo key = GetSearchKey();
                key.keyDisabledFlag  = 0; //無効解除
                var list             = new List <EpgEventInfo>();

                CommonManager.CreateSrvCtrl().SendSearchPg(CommonUtil.ToList(key), ref list);

                dataList.AddRange(list.ToSearchList(true));
                return(true);
            });

            UpdateStatus();
            SetRecSettingTabHeader(false);
            SetWindowTitle();
        }
Пример #13
0
        private void SearchPg(bool addSearchLog = false)
        {
            if (addSearchLog == true)
            {
                searchKeyView.AddSearchLog();
            }

            lstCtrl.ReloadInfoData(dataList =>
            {
                EpgSearchKeyInfo key = GetSearchKey();
                key.keyDisabledFlag  = 0; //無効解除
                var list             = new List <EpgEventInfo>();

                cmd.SendSearchPg(CommonUtil.ToList(key), ref list);

                lstCtrl.dataList.AddFromEventList(list, false, true);
                return(true);
            });

            UpdateStatus();
            SetRecSettingTabHeader(null, null);
            WindowTitleSet();
        }
Пример #14
0
        private void SearchPg(bool addSearchLog = false)
        {
            if (addSearchLog == true)
            {
                searchKeyView.AddSearchLog();
            }

            lstCtrl.ReloadInfoData(dataList =>
            {
                EpgSearchKeyInfo key = GetSearchKey();
                key.keyDisabledFlag  = 0; //無効解除

                ArcSearch            = searchKeyView.checkBox_noArcSearch.IsChecked == false && Settings.Instance.EpgSettingList[0].EpgArcDefaultDays > 0;
                EpgViewPeriod period = IsJumpPanelOpened ? SearchPeriod : ArcSearch ? prdef.DefPeriod : null;

                if (period != null)
                {
                    period.StrictLoad = true;
                }
                var list = CommonManager.Instance.DB.SearchPg(key.IntoList(), period);
                dataList.AddRange(list.ToSearchList(period == null));

                //起動直後用。実際には過去検索して無くても必要な場合があるが、あまり重要ではないので無視する。
                if (ArcSearch)
                {
                    CommonManager.Instance.DB.ReloadRecFileInfo();
                }

                return(true);
            });

            UpdateStatus();
            SetRecSettingTabHeader(false);
            SetWindowTitle();
            RefreshMoveButtonStatus();
            Searched = true;
        }
Пример #15
0
 protected override bool ReloadInfoData()
 {
     checkBox_displayInternal.IsEnabled = IniFileHandler.GetPrivateProfileInt("SET", "SaveNotifyLog", 0, SettingPath.TimerSrvIniPath) != 0;
     checkBox_displayInternal.ToolTip   = checkBox_displayInternal.IsEnabled == true ? null : "未接続または「情報通知ログをファイルに保存する(EpgTimerSrv)」が無効です";
     checkBox_displayInternal.IsChecked = checkBox_displayInternal.IsEnabled == false || Settings.Instance.NotifyLogEpgTimer;
     return(lstCtrl.ReloadInfoData(dataList =>
     {
         if (checkBox_displayInternal.IsChecked == false)
         {
             //サーバに保存されたログを使う
             string notifyLog = "";
             CommonManager.CreateSrvCtrl().SendGetNotifyLog(Math.Max(Settings.Instance.NotifyLogMax, 1), ref notifyLog);
             dataList.AddRange(notifyLog.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)
                               .Select(text => new NotifySrvInfoItem(text)));
         }
         else
         {
             //クライアントで蓄積したログを使う
             dataList.AddRange(CommonManager.Instance.NotifyLogList.Skip(CommonManager.Instance.NotifyLogList.Count - Settings.Instance.NotifyLogMax)
                               .Select(info => new NotifySrvInfoItem(info)));
         }
         return true;
     }));
 }
Пример #16
0
        private void Search()
        {
            try
            {
                lstCtrl.ReloadInfoData(dataList =>
                {
                    var targetItems = new List <IRecWorkMainData>();
                    if (SearchInfo.ReserveInfo == true)
                    {
                        targetItems.AddRange(CommonManager.Instance.DB.ReserveList.Values);
                    }
                    if (SearchInfo.RecInfo == true)
                    {
                        //起動直後は読み込んでない場合がある。
                        CommonManager.Instance.DB.ReloadRecFileInfo();

                        //詳細情報が必要な場合はあらかじめ読込んでおく。
                        if (SearchInfo.TitleOnly == false)
                        {
                            CommonManager.Instance.DB.ReadRecFileAppend();
                        }

                        targetItems.AddRange(CommonManager.Instance.DB.RecFileInfo.Values);
                    }
                    if (SearchInfo.EpgAutoAddInfo == true)
                    {
                        targetItems.AddRange(CommonManager.Instance.DB.EpgAutoAddList.Values);
                    }
                    if (SearchInfo.ManualAutoAddInfo == true)
                    {
                        targetItems.AddRange(CommonManager.Instance.DB.ManualAutoAddList.Values);
                    }

                    string sText = CommonManager.AdjustSearchText(SearchInfo.SearchWord);

                    if (SearchInfo.RegExp == true)
                    {
                        dataList.AddRange(InfoSearchItem.Items(targetItems).Where(data =>
                        {
                            string trgText = data.GetSearchText(SearchInfo.TitleOnly);
                            trgText        = CommonManager.ReplaceUrl(trgText).ToLower();
                            return(Regex.Match(trgText, sText).Success);
                        }));
                    }
                    else
                    {
                        string[] sWords = sText.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                        dataList.AddRange(InfoSearchItem.Items(targetItems).Where(data =>
                        {
                            //検索ワードで対象のタイトルまたは詳細をAND検索
                            string trgText = data.GetSearchText(SearchInfo.TitleOnly);
                            trgText        = CommonManager.AdjustSearchText(trgText).Replace(" ", "");
                            if (sWords.All(word => trgText.Contains(word)) == true)
                            {
                                return(true);
                            }

                            //キーワード予約を考慮し、逆に対象のタイトルで検索ワードのAND検索もしておく。
                            string[] trgWords = CommonManager.AdjustSearchText(data.DataTitle).Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                            return(trgWords.Any() == true && trgWords.All(word => sText.Contains(word)));
                        }));
                    }

                    ToolTipCheck();
                    return(true);
                });

                this.Title = ViewUtil.WindowTitleText(SearchInfo.SearchWord, "予約情報検索");
                UpdateStatus();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }