SearchWindow.xaml の相互作用ロジック
Inheritance: System.Windows.Window
Esempio n. 1
0
 private void button_add_Click(object sender, RoutedEventArgs e)
 {
     SearchWindow dlg = new SearchWindow();
     dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
     dlg.SetViewMode(1);
     dlg.ShowDialog();
 }
Esempio n. 2
0
 public static void blinkSearchButton_Stop(SearchWindow searchWindow0, Button button0)
 {
     if (searchWindow0 == BlackoutWindow.unvisibleSearchWindow) {
         BlackoutWindow.unvisibleSearchWindow = null;
         //
         button0.BeginAnimation(Button.OpacityProperty, null);
         button0.Opacity = 1;
         button0.Effect = null;
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Hide()した検索ウィンドウがあることを知らせるため、検索ボタンを点滅させる
 /// </summary>
 /// <param name="button0"></param>
 /// <param name="isBlink0"></param>
 public static void blinkSearchButton_Start(SearchWindow searchWindow0, Button button0)
 {
     BlackoutWindow.unvisibleSearchWindow = searchWindow0;
     //
     button0.Effect = new System.Windows.Media.Effects.DropShadowEffect();
     var animation = new System.Windows.Media.Animation.DoubleAnimation {
         From = 1.0,
         To = 0.7,
         RepeatBehavior = System.Windows.Media.Animation.RepeatBehavior.Forever,
         AutoReverse = true
     };
     button0.BeginAnimation(Button.OpacityProperty, animation);
 }
Esempio n. 4
0
 private void button_change_Click(object sender, RoutedEventArgs e)
 {
     if (listView_key.SelectedItem != null)
     {
         EpgAutoDataItem info = listView_key.SelectedItem as EpgAutoDataItem;
         SearchWindow dlg = new SearchWindow();
         dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
         dlg.SetViewMode(2);
         dlg.SetChgAutoAddID(info.EpgAutoAddInfo.dataID);
         dlg.SetSearchDefKey(info.EpgAutoAddInfo.searchInfo);
         dlg.SetRecInfoDef(info.EpgAutoAddInfo.recSetting);
         dlg.ShowDialog();
     }
 }
Esempio n. 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); }
        }
Esempio n. 6
0
 protected override void mcs_ctxmLoading_switch(ContextMenu ctxm, MenuItem menu)
 {
     base.mcs_ctxmLoading_switch(ctxm, menu);
     //
     // ジャンル登録
     //
     if (menu.Tag == EpgCmds.SetGenre)
     {
         SearchWindow sw1 = Owner as SearchWindow;
         if (sw1.listView_result.SelectedItem != null)
         {
             SearchItem si1 = sw1.listView_result.SelectedItem as SearchItem;
             if (si1 != null && si1.EventInfo.ContentInfo != null)
             {
                 MenuUtil.addGenre(menu, si1.EventInfo.ContentInfo.nibbleList, (contentKindInfo0) =>
                 {
                     sw1.searchKeyView.setGenre(contentKindInfo0);
                 });
             }
         }
     }
 }
Esempio n. 7
0
        private void cm_autoadd_Click(object sender, RoutedEventArgs e)
        {
            {
                if (listView_event.SelectedItem != null)
                {
                    SearchItem item = listView_event.SelectedItem as SearchItem;

                    SearchWindow dlg = new SearchWindow();
                    dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;

                    EpgSearchKeyInfo key = new EpgSearchKeyInfo();

                    if (item.EventInfo.ShortInfo != null)
                    {
                        key.andKey = item.EventInfo.ShortInfo.event_name;
                    }
                    key.serviceList.Add((long)CommonManager.Create64Key(item.EventInfo.original_network_id, item.EventInfo.transport_stream_id, item.EventInfo.service_id));

                    dlg.SetSearchDefKey(key);
                    dlg.ShowDialog();
                }
            }
        }
Esempio n. 8
0
 void showDialog()
 {
     if (listView_key.SelectedItem == null)
     {
         return;
     }
     //
     try
     {
         EpgAutoDataItem info = listView_key.SelectedItem as EpgAutoDataItem;
         SearchWindow    dlg  = new SearchWindow();
         dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
         dlg.SetViewMode(2);
         dlg.SetChgAutoAddID(info.EpgAutoAddInfo.dataID);
         dlg.SetSearchDefKey(info.EpgAutoAddInfo.searchInfo);
         dlg.SetRecInfoDef(info.EpgAutoAddInfo.recSetting);
         dlg.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
     }
 }
Esempio n. 9
0
        /// <summary>
        /// 右クリックメニュー 自動予約登録イベント呼び出し
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cm_autoadd_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (sender.GetType() != typeof(MenuItem))
                {
                    return;
                }

                ReserveData reserve = GetReserveItem(clickPos);
                if (reserve == null)
                {
                    return;
                }

                SearchWindow dlg = new SearchWindow();
                dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
                dlg.SetViewMode(1);

                EpgSearchKeyInfo key = new EpgSearchKeyInfo();

                if (reserve.Title != null)
                {
                    key.andKey = reserve.Title;
                }
                Int64 sidKey = ((Int64)reserve.OriginalNetworkID) << 32 | ((Int64)reserve.TransportStreamID) << 16 | ((Int64)reserve.ServiceID);
                key.serviceList.Add(sidKey);

                dlg.SetSearchDefKey(key);
                dlg.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }
Esempio n. 10
0
 void showDialog()
 {
     if (listView_key.SelectedItem == null) { return; }
     //
     try
     {
         EpgAutoDataItem info = listView_key.SelectedItem as EpgAutoDataItem;
         SearchWindow dlg = new SearchWindow();
         dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
         dlg.SetViewMode(2);
         dlg.SetChgAutoAddID(info.EpgAutoAddInfo.dataID);
         dlg.SetSearchDefKey(info.EpgAutoAddInfo.searchInfo);
         dlg.SetRecInfoDef(info.EpgAutoAddInfo.recSetting);
         dlg.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
     }
 }
Esempio n. 11
0
 private void listView_key_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         if (listView_key.SelectedItem != null)
         {
             EpgAutoDataItem info = listView_key.SelectedItem as EpgAutoDataItem;
             SearchWindow dlg = new SearchWindow();
             dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
             dlg.SetViewMode(2);
             dlg.SetChgAutoAddID(info.EpgAutoAddInfo.dataID);
             dlg.SetSearchDefKey(info.EpgAutoAddInfo.searchInfo);
             dlg.SetRecInfoDef(info.EpgAutoAddInfo.recSetting);
             dlg.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
     }
 }
Esempio n. 12
0
 private void button_add_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         SearchWindow dlg = new SearchWindow();
         dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
         dlg.SetViewMode(1);
         dlg.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
     }
 }
Esempio n. 13
0
        private void autoadd_Click(object sender, RoutedEventArgs e)
        {
            if (listView_recinfo.SelectedItem != null)
            {
                SearchWindow dlg = new SearchWindow();
                dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
                dlg.SetViewMode(1);

                EpgSearchKeyInfo key = new EpgSearchKeyInfo();

                RecInfoItem item = listView_recinfo.SelectedItem as RecInfoItem;

                key.andKey = item.RecInfo.Title;
                Int64 sidKey = ((Int64)item.RecInfo.OriginalNetworkID) << 32 | ((Int64)item.RecInfo.TransportStreamID) << 16 | ((Int64)item.RecInfo.ServiceID);
                key.serviceList.Add(sidKey);

                dlg.SetSearchDefKey(key);
                dlg.ShowDialog();
            }
        }
Esempio n. 14
0
        private void cm_autoadd_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (sender.GetType() != typeof(MenuItem))
                {
                    return;
                }
                if (listView_event.SelectedItem != null)
                {
                    SearchItem item = listView_event.SelectedItem as SearchItem;

                    SearchWindow dlg = new SearchWindow();
                    dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
                    dlg.SetViewMode(1);

                    EpgSearchKeyInfo key = new EpgSearchKeyInfo();

                    if (item.EventInfo.ShortInfo != null)
                    {
                        key.andKey = item.EventInfo.ShortInfo.event_name;
                    }
                    Int64 sidKey = ((Int64)item.EventInfo.original_network_id) << 32 | ((Int64)item.EventInfo.transport_stream_id) << 16 | ((Int64)item.EventInfo.service_id);
                    key.serviceList.Add(sidKey);

                    dlg.SetSearchDefKey(key);
                    dlg.ShowDialog();                
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }
Esempio n. 15
0
 void SearchCmd()
 {
     SearchWindow search = new SearchWindow();
     PresentationSource topWindow = PresentationSource.FromVisual(this);
     if (topWindow != null)
     {
         search.Owner = (Window)topWindow.RootVisual;
     }
     search.SetViewMode(0);
     search.ShowDialog();
 }
Esempio n. 16
0
        /// <summary>
        /// 右クリックメニュー 自動予約登録イベント呼び出し
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cm_autoadd_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (sender.GetType() != typeof(MenuItem))
                {
                    return;
                }

                ReserveData reserve = new ReserveData();
                if (GetReserveItem(clickPos, ref reserve) == false)
                {
                    return;
                }

                SearchWindow dlg = new SearchWindow();
                dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
                dlg.SetViewMode(1);

                EpgSearchKeyInfo key = new EpgSearchKeyInfo();

                if (reserve.Title != null)
                {
                    key.andKey = reserve.Title;
                }
                Int64 sidKey = ((Int64)reserve.OriginalNetworkID) << 32 | ((Int64)reserve.TransportStreamID) << 16 | ((Int64)reserve.ServiceID);
                key.serviceList.Add(sidKey);

                dlg.SetSearchDefKey(key);
                dlg.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }
Esempio n. 17
0
 private static void SetHideSearchWindow(SearchWindow win)
 {
     // 情報を保持は最新のもの1つだけ
     hideSearchWindow = win;
     mainWindow.EmphasizeSearchButton(SearchWindow.HasHideSearchWindow);
 }
Esempio n. 18
0
 protected override void PostProcSaveOrder(Dictionary <ulong, ulong> changeIDTable)
 {
     SearchWindow.UpdatesAutoAddViewOrderChanged(changeIDTable);
 }
Esempio n. 19
0
        /// <summary>
        /// 右クリックメニュー 自動予約登録イベント呼び出し
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cm_autoadd_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (sender.GetType() != typeof(MenuItem))
                {
                    return;
                }

                EpgEventInfo program = new EpgEventInfo();
                if (GetProgramItem(clickPos, ref program) == false)
                {
                    return;
                }

                SearchWindow dlg = new SearchWindow();
                dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
                dlg.SetViewMode(1);

                EpgSearchKeyInfo key = new EpgSearchKeyInfo();

                if (program.ShortInfo != null)
                {
                    key.andKey = program.ShortInfo.event_name;
                }
                Int64 sidKey = ((Int64)program.original_network_id) << 32 | ((Int64)program.transport_stream_id) << 16 | ((Int64)program.service_id);
                key.serviceList.Add(sidKey);

                dlg.SetSearchDefKey(key);
                dlg.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }