Example #1
0
 protected override void mc_ShowDialog(object sender, ExecutedRoutedEventArgs e)
 {
     if (dataList.Count != 0 && CmdExeUtil.ReadIdData(e) != 1)
     {
         IsCommandExecuted = true == MenuUtil.OpenChangeReserveDialog(dataList[0], EpgInfoOpenMode);
     }
     else if (headDataRec != null && (eventListAdd.Count == 0 || eventListAdd[0].IsOver()))
     {
         IsCommandExecuted = true == MenuUtil.OpenRecInfoDialog(headDataRec);
     }
     else if (eventListAdd.Count != 0)
     {
         IsCommandExecuted = true == MenuUtil.OpenEpgReserveDialog(eventListAdd[0], EpgInfoOpenMode, GetRecSetting());
     }
 }
Example #2
0
 protected override void mc_ShowDialog(object sender, ExecutedRoutedEventArgs e)
 {
     IsCommandExecuted = true == MenuUtil.OpenRecInfoDialog(dataList[0]);
 }
Example #3
0
        public AddReserveEpgWindow(EpgEventInfo info = null, int epgInfoOpenMode = 0, RecSettingData setInfo = null)
        {
            InitializeComponent();

            base.SetParam(false, checkBox_windowPinned, checkBox_dataReplace);
            recSettingView.PresetResCompare = true;

            //コマンドの登録
            this.CommandBindings.Add(new CommandBinding(EpgCmds.Cancel, (sender, e) => this.Close()));
            this.CommandBindings.Add(new CommandBinding(EpgCmds.AddInDialog, reserve_add, (sender, e) => e.CanExecute    = AddEnabled));
            this.CommandBindings.Add(new CommandBinding(EpgCmds.ChangeInDialog, reserve_chg, (sender, e) => e.CanExecute = KeepWin == true && AddEnabled && chgEnabled));
            this.CommandBindings.Add(new CommandBinding(EpgCmds.DeleteInDialog, reserve_del, (sender, e) => e.CanExecute = KeepWin == true && AddEnabled && chgEnabled));
            this.CommandBindings.Add(new CommandBinding(EpgCmds.BackItem, (sender, e) => MoveViewNextItem(-1), (sender, e) => e.CanExecute = KeepWin == true && (DataView is EpgViewBase || DataViewSearch != null || DataRefList.Any())));
            this.CommandBindings.Add(new CommandBinding(EpgCmds.NextItem, (sender, e) => MoveViewNextItem(1), (sender, e) => e.CanExecute  = KeepWin == true && (DataView is EpgViewBase || DataViewSearch != null || DataRefList.Any())));
            this.CommandBindings.Add(new CommandBinding(EpgCmds.Search, (sender, e) => MoveViewEpgTarget(), (sender, e) => e.CanExecute    = KeepWin == true && DataView is EpgViewBase));
            this.CommandBindings.Add(new CommandBinding(EpgCmds.ShowInDialog, (sender, e) => MenuUtil.OpenRecInfoDialog(MenuUtil.GetRecFileInfo(eventInfo)), (sender, e) => e.CanExecute = button_open_recinfo.Visibility == Visibility.Visible));

            //ボタンの設定
            mBinds.SetCommandToButton(button_cancel, EpgCmds.Cancel);
            mBinds.SetCommandToButton(button_add_reserve, EpgCmds.AddInDialog);
            mBinds.SetCommandToButton(button_chg_reserve, EpgCmds.ChangeInDialog);
            mBinds.SetCommandToButton(button_del_reserve, EpgCmds.DeleteInDialog);
            mBinds.SetCommandToButton(button_up, EpgCmds.BackItem);
            mBinds.SetCommandToButton(button_down, EpgCmds.NextItem);
            mBinds.SetCommandToButton(button_chk, EpgCmds.Search);
            mBinds.SetCommandToButton(button_open_recinfo, EpgCmds.ShowInDialog);
            RefreshMenu();

            //録画設定タブ関係の設定
            recSettingView.SelectedPresetChanged += SetReserveTabHeader;
            reserveTabHeader.MouseRightButtonUp  += recSettingView.OpenPresetSelectMenuOnMouseEvent;
            recSettingView.SetDefSetting(setInfo);

            tabControl.SelectedIndex = epgInfoOpenMode == 1 ? 0 : 1;
            if (KeepWin == true)
            {
                button_cancel.Content = "閉じる";
                //ステータスバーの設定
                this.statusBar.Status.Visibility = Visibility.Collapsed;
                StatusManager.RegisterStatusbar(this.statusBar, this);
            }
            else
            {
                button_chg_reserve.Visibility = Visibility.Collapsed;
                button_del_reserve.Visibility = Visibility.Collapsed;
                button_up.Visibility          = Visibility.Collapsed;
                button_down.Visibility        = Visibility.Collapsed;
                button_chk.Visibility         = Visibility.Collapsed;
            }
            ChangeData(info);
        }