Exemple #1
0
        private void mc_Research(object sender, ExecutedRoutedEventArgs e)
        {
            try
            {
                if (listView_result.SelectedItem != null)
                {
                    SearchItem       item   = lstCtrl.SelectSingleItem();
                    EpgSearchKeyInfo defKey = MenuUtil.SendAutoAddKey(item.EventInfo, CmdExeUtil.IsKeyGesture(e), GetSearchKey());

                    if (e.Command == EpgCmds.ReSearch)
                    {
                        SetSearchKey(defKey);
                        SearchPg();
                    }
                    else
                    {
                        WriteWindowSaveData();

                        var dlg = new SearchWindow(mode: winMode == AutoAddMode.Change ? AutoAddMode.NewAdd : winMode);
                        if (Settings.Instance.MenuSet.CancelAutoAddOff == true)
                        {
                            defKey.keyDisabledFlag = 0;
                        }
                        dlg.SetSearchKey(defKey);
                        dlg.SetRecSetting(this.GetRecSetting());
                        dlg.Show();
                    }
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }
Exemple #2
0
        public static void SendAutoAdd(IBasicPgInfo item, bool NotToggle = false, EpgSearchKeyInfo key = null)
        {
            try
            {
                if (item == null)
                {
                    return;
                }

                var dlg = new SearchWindow(mode: AutoAddMode.NewAdd);
                dlg.SetSearchKey(key ?? SendAutoAddKey(item, NotToggle));

                if (item is IRecSetttingData)
                {
                    var            item_r    = (item as IRecSetttingData);
                    RecPresetItem  recPreSet = item_r.RecSettingInfo.LookUpPreset(item_r.IsManual, true);
                    RecSettingData recSet    = recPreSet.Data;
                    if (recPreSet.IsCustom == true && recSet.RecMode == 5)
                    {
                        recSet.RecMode = 1;
                    }
                    dlg.SetRecSetting(recSet);
                }

                dlg.Show();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }
Exemple #3
0
        public static void SendAutoAdd(IBasicPgInfo item, bool NotToggle = false)
        {
            try
            {
                if (item == null)
                {
                    return;
                }

                var dlg = new SearchWindow();
                dlg.SetViewMode(SearchWindow.SearchMode.NewAdd);

                EpgSearchKeyInfo key = Settings.Instance.DefSearchKey.Clone();
                key.andKey     = TrimEpgKeyword(item.DataTitle, NotToggle);
                key.regExpFlag = 0;
                key.serviceList.Clear();
                key.serviceList.Add((Int64)item.Create64Key());
                dlg.SetSearchKey(key);

                if (item is IRecSetttingData)
                {
                    var            item_r    = (item as IRecSetttingData);
                    RecPresetItem  recPreSet = item_r.RecSettingInfo.LookUpPreset(item_r.IsManual, true);
                    RecSettingData recSet    = recPreSet.RecPresetData;
                    if (recPreSet.IsCustom == true && recSet.RecMode == 5)
                    {
                        recSet.RecMode = 1;
                    }
                    dlg.SetRecSetting(recSet);
                }

                dlg.Show();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }
Exemple #4
0
        private void mc_Research(object sender, ExecutedRoutedEventArgs e)
        {
            try
            {
                if (listView_result.SelectedItem != null)
                {
                    SearchItem item = lstCtrl.SelectSingleItem();

                    EpgSearchKeyInfo defKey = GetSearchKey();
                    defKey.andKey     = MenuUtil.TrimEpgKeyword(item.EventName, CmdExeUtil.IsKeyGesture(e));
                    defKey.regExpFlag = 0;
                    defKey.serviceList.Clear();
                    UInt64 sidKey = item.EventInfo.Create64Key();
                    defKey.serviceList.Add((Int64)sidKey);

                    if (e.Command == EpgCmds.ReSearch)
                    {
                        SetSearchKey(defKey);
                        SearchPg();
                    }
                    else
                    {
                        var dlg = new SearchWindow();
                        dlg.SetViewMode(winMode == SearchMode.Change ? SearchMode.NewAdd : winMode);
                        if (Settings.Instance.MenuSet.CancelAutoAddOff == true)
                        {
                            defKey.keyDisabledFlag = 0;
                        }
                        dlg.SetSearchKey(defKey);
                        dlg.SetRecSetting(this.GetRecSetting());
                        dlg.Left = this.Left + 50;
                        dlg.Top  = this.Top + 25;
                        dlg.checkBox_windowPinned.IsChecked = checkBox_windowPinned.IsChecked;
                        dlg.Show();
                    }
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
        }