Exemple #1
0
 public RecLogView()
 {
     InitializeComponent();
     //
     _menu_ReserveChangeOnOff.Header = "簡易予約/有効←→無効(_S)";
     _menu_ReserveChangeOnOff.Click += (object sender, RoutedEventArgs e) =>
     {
         MenuItem menuItem1 = (MenuItem)sender;
         RecLogItem recLogItem1 = (RecLogItem)menuItem1.DataContext;
         recLogItem1.epgEventInfoR.reserveAdd_ChangeOnOff();
     };
     //
     _menu_OpenChgReserveDialog.Header = "予約ダイアログを開く(_O)";
     _menu_OpenChgReserveDialog.Click += (object sender, RoutedEventArgs e) =>
     {
         MenuItem menuItem1 = (MenuItem)sender;
         RecLogItem recLogItem1 = (RecLogItem)menuItem1.DataContext;
         recLogItem1.epgEventInfoR.openReserveDialog(this);
     };
     //
     listView_RecLog.DataContext = _recLogItems;
     listView_RecLog.setColumnHeaderToolTip(gridView_RecLog);
     comboBox_Edit_Status.DataContext = new object[] {
         RecLogItem.RecodeStatuses.予約済み, RecLogItem.RecodeStatuses.録画完了, RecLogItem.RecodeStatuses.録画異常,  RecLogItem.RecodeStatuses.視聴済み,
         RecLogItem.RecodeStatuses.無効登録, RecLogItem.RecodeStatuses.不明
     };
     //
     db_RecLog = new DB_RecLog(Settings.Instance.RecLog_DB_MachineName, Settings.Instance.RecLog_DB_InstanceName);
     checkBox_RecLogEnabled.IsChecked = Settings.Instance.RecLog_SearchLog_IsEnabled;
     if (!string.IsNullOrWhiteSpace(Settings.Instance.RecLog_DB_MachineName))
     {
         textBox_MachineName.Text = Settings.Instance.RecLog_DB_MachineName;
     }
     else
     {
         textBox_MachineName.Text = Environment.MachineName;
     }
     textBox_InstanceName.Text = Settings.Instance.RecLog_DB_InstanceName;
     searchMethod = Settings.Instance.RecLog_SearchMethod;
     searchColumn = (DB_RecLog.searchColumns)Settings.Instance.RecLog_SearchColumn;
     recodeStatus = (RecLogItem.RecodeStatuses)Settings.Instance.RecLog_RecodeStatus;
     searchResultLimit = Settings.Instance.RecLog_SearchResultLimit;
     textBox_ResultLimit_RecLogWindow.Text = Settings.Instance.RecLogWindow_SearchResultLimit.ToString();
     //
     _bgw_Update_ReserveInfo.DoWork += _bgw_Update_ReserveInfo_DoWork;
     _bgw_Update_ReserveInfo.RunWorkerCompleted += _bgw_Update_ReserveInfo_RunWorkerCompleted;
     _bgw_Update_RecInfo.DoWork += _bgw_RecInfo_DoWork;
     _bgw_Update_EpgData.DoWork += _bgw_EpgData_DoWork;
     //
     grid_Edit.Visibility = Visibility.Collapsed;
     border_Button_DB_ConnectTest.BorderThickness = new Thickness(0);
     if (Settings.Instance.RecLog_SearchLog_IsEnabled)
     {
         border_CheckBox_RecLogEnabled.BorderThickness = new Thickness(0);
         panel_Setting.Visibility = Visibility.Collapsed;
         toggleButton_Setting.IsChecked = false;
         border_ToggleButton_Setting.BorderThickness = new Thickness(0);
     }
     richTextBox_HowTo.Document =
         new FlowDocument(
             new Paragraph(
                 new Run(this._howto)));
     clearEditor();
     isSearchOptionChanged = false;
 }
Exemple #2
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;
        }