Exemple #1
0
        protected override void mc_ToAutoadd(object sender, ExecutedRoutedEventArgs e)
        {
            ReserveData  resData      = null;
            IBasicPgInfo eventRefData = null;

            if (eventList.Count != 0)
            {
                resData = CtrlCmdDefEx.ConvertEpgToReserveData(eventList[0]);
                if (dataList.Count != 0)
                {
                    resData.RecSetting = dataList[0].RecSetting.DeepClone();
                }
                else
                {
                    resData.RecSetting = Settings.Instance.RecPresetList[0].Data.DeepClone();
                }
                eventRefData = eventList[0];
            }
            else if (dataList.Count != 0)
            {
                resData      = dataList[0];
                eventRefData = new ReserveItem(resData).EventInfo ?? (IBasicPgInfo)resData;
            }

            var key = MenuUtil.SendAutoAddKey(eventRefData, CmdExeUtil.IsKeyGesture(e));

            MenuUtil.SendAutoAdd(resData, CmdExeUtil.IsKeyGesture(e), key);
            IsCommandExecuted = true;
        }
Exemple #2
0
 protected override void mc_CopyContent(object sender, ExecutedRoutedEventArgs e)
 {
     if (eventList.Count != 0)//番組情報優先
     {
         MenuUtil.CopyContent2Clipboard(eventList[0], CmdExeUtil.IsKeyGesture(e));
     }
     else if (dataList.Count != 0)
     {
         MenuUtil.CopyContent2Clipboard(dataList[0], CmdExeUtil.IsKeyGesture(e));
     }
     IsCommandExecuted = true;
 }
Exemple #3
0
 protected override void mc_CopyTitle(object sender, ExecutedRoutedEventArgs e)
 {
     if (eventList.Count != 0)//番組情報優先
     {
         MenuUtil.CopyTitle2Clipboard(eventList[0].DataTitle, CmdExeUtil.IsKeyGesture(e));
     }
     else if (dataList.Count != 0)
     {
         MenuUtil.CopyTitle2Clipboard(dataList[0].DataTitle, CmdExeUtil.IsKeyGesture(e));
     }
     IsCommandExecuted = true; //itemCount!=0 だが、この条件はこの位置では常に満たされている。
 }
Exemple #4
0
 protected override void mc_SearchTitle(object sender, ExecutedRoutedEventArgs e)
 {
     if (eventList.Count != 0)//番組情報優先
     {
         MenuUtil.SearchTextWeb(eventList[0].DataTitle, CmdExeUtil.IsKeyGesture(e));
     }
     else if (dataList.Count != 0)
     {
         MenuUtil.SearchTextWeb(dataList[0].DataTitle, CmdExeUtil.IsKeyGesture(e));
     }
     IsCommandExecuted = true;
 }
Exemple #5
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); }
        }
Exemple #6
0
        protected override void mc_ToAutoadd(object sender, ExecutedRoutedEventArgs e)
        {
            ReserveData resData = null;

            if (eventList.Count != 0)
            {
                resData = CtrlCmdDefEx.ConvertEpgToReserveData(eventList[0]);
                if (dataList.Count != 0)
                {
                    resData.RecSetting = dataList[0].RecSetting.Clone();
                }
                else
                {
                    resData.RecSetting = Settings.Instance.RecPresetList[0].RecPresetData.Clone();
                }
            }
            else if (dataList.Count != 0)
            {
                resData = dataList[0];
            }
            MenuUtil.SendAutoAdd(resData, CmdExeUtil.IsKeyGesture(e));
            IsCommandExecuted = true;
        }
Exemple #7
0
        protected override void mc_ToAutoadd(object sender, ExecutedRoutedEventArgs e)
        {
            ReserveData  resData      = dataList.Count != 0 ? dataList[0] : null;
            IBasicPgInfo eventRefData = eventList.Count != 0 ? eventList[0] : null;

            if (resData != null)
            {
                eventRefData = eventRefData ?? new ReserveItem(resData).EventInfo ?? (IBasicPgInfo)resData;
            }
            else if (eventRefData != null)
            {
                resData            = ((EpgEventInfo)eventRefData).ToReserveData();
                resData.RecSetting = GetRecSetting() ?? Settings.Instance.RecPresetList[0].Data.DeepClone();
            }
            else if (recinfoList.Count != 0)
            {
                eventRefData = recinfoList[0];
            }

            var key = MenuUtil.SendAutoAddKey(eventRefData, CmdExeUtil.IsKeyGesture(e), GetSearchKey());

            MenuUtil.SendAutoAdd(resData ?? eventRefData, CmdExeUtil.IsKeyGesture(e), key);
            IsCommandExecuted = true;
        }
Exemple #8
0
 protected override void mc_CopyTitle(object sender, ExecutedRoutedEventArgs e)
 {
     //番組情報優先
     MenuUtil.CopyTitle2Clipboard((headDataEv ?? headDataRec).DataTitle, CmdExeUtil.IsKeyGesture(e));
     IsCommandExecuted = true;
 }
Exemple #9
0
 protected override void mc_CopyContent(object sender, ExecutedRoutedEventArgs e)
 {
     MenuUtil.CopyContent2Clipboard(dataList[0], CmdExeUtil.IsKeyGesture(e));
     IsCommandExecuted = true;
 }
Exemple #10
0
 protected override void mc_CopyTitle(object sender, ExecutedRoutedEventArgs e)
 {
     //番組情報優先
     MenuUtil.CopyTitle2Clipboard(headDataEv.DataTitle, CmdExeUtil.IsKeyGesture(e));
     IsCommandExecuted = true; //itemCount!=0 だが、この条件はこの位置では常に満たされている。
 }
Exemple #11
0
 protected virtual void mc_SearchTitle(object sender, ExecutedRoutedEventArgs e)
 {
     MenuUtil.SearchTextWeb(dataList[0].DataTitle, CmdExeUtil.IsKeyGesture(e));
     IsCommandExecuted = true;
 }
Exemple #12
0
 protected virtual void mc_CopyTitle(object sender, ExecutedRoutedEventArgs e)
 {
     MenuUtil.CopyTitle2Clipboard(dataList[0].DataTitle, CmdExeUtil.IsKeyGesture(e));
     IsCommandExecuted = true;
 }
Exemple #13
0
 protected virtual void mc_ToAutoadd(object sender, ExecutedRoutedEventArgs e)
 {
     MenuUtil.SendAutoAdd(dataList[0] as IBasicPgInfo, CmdExeUtil.IsKeyGesture(e));
     IsCommandExecuted = true;
 }
        private void mc_ReSearch(object sender, ExecutedRoutedEventArgs e)
        {
            if (listView_result.SelectedItem == null)
            {
                return;
            }
            //
            string word = MenuUtil.TrimEpgKeyword(lstCtrl.SelectSingleItem().EventName, CmdExeUtil.IsKeyGesture(e));

            if (e.Command == EpgCmds.ReSearch)
            {
                TextBox_SearchWord.Text = word;
                mc_Search(sender, e);
            }
            else
            {
                WriteWindowSaveData();
                InfoSearchSettingData data = SearchInfo.DeepClone();
                data.SearchWord = word;
                new InfoSearchWindow(data, noSearchSettingSave).Show();
            }
        }
Exemple #15
0
 protected virtual void mc_InfoSearchTitle(object sender, ExecutedRoutedEventArgs e)
 {
     IsCommandExecuted = true == MenuUtil.OpenInfoSearchDialog(dataList[0].DataTitle, CmdExeUtil.IsKeyGesture(e));
 }
Exemple #16
0
 protected override void mc_InfoSearchTitle(object sender, ExecutedRoutedEventArgs e)
 {
     //番組情報優先
     IsCommandExecuted = true == MenuUtil.OpenInfoSearchDialog((headDataEv ?? headDataRec).DataTitle, CmdExeUtil.IsKeyGesture(e));
 }
Exemple #17
0
 protected override void mc_SearchTitle(object sender, ExecutedRoutedEventArgs e)
 {
     //番組情報優先
     MenuUtil.SearchTextWeb((headDataEv ?? headDataRec).DataTitle, CmdExeUtil.IsKeyGesture(e));
     IsCommandExecuted = true;
 }
Exemple #18
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); }
        }