Example #1
0
        private void mc_Delete(object sender, ExecutedRoutedEventArgs e)
        {
            if (listView_result.SelectedItem == null)
            {
                return;
            }
            //
            List <IRecWorkMainData> dataList = lstCtrl.GetSelectedItemsList().Select(data => data.Data).ToList();

            dataList.RemoveAll(d => d is RecFileInfo && (d as RecFileInfo).ProtectFlag != 0);

            if (CmdExeUtil.CheckDeleteCancel(e, dataList) == true)
            {
                return;
            }

            if (CmdExeRecinfo.mcs_DeleteCheckDelFile(dataList.OfType <RecFileInfo>()) == false)
            {
                return;
            }

            if (MenuUtil.CautionManyMessage(dataList.Count, "削除の確認") == false)
            {
                return;
            }

            MenuUtil.ReserveDelete(dataList.OfType <ReserveData>().ToList(), false);
            MenuUtil.RecinfoDelete(dataList.OfType <RecFileInfo>().ToList(), false);
            MenuUtil.AutoAddDelete(dataList.OfType <AutoAddData>().ToList(), false);

            StatusManager.StatusNotifySet(true, mc.GetCmdMessageFormat("削除を実行", dataList.Count));
        }
Example #2
0
 protected override void mc_Delete(object sender, ExecutedRoutedEventArgs e)
 {
     if (mcs_DeleteCheck(e) == false)
     {
         return;
     }
     IsCommandExecuted = MenuUtil.ReserveDelete(dataList);
 }
Example #3
0
        protected override void mc_Delete(object sender, ExecutedRoutedEventArgs e)
        {
            List <ReserveData> resList = dataList.ToList();

            if (e.Command == EpgCmds.DeleteAll)
            {
                recinfoList.Clear();
            }
            recinfoList = recinfoList.GetNoProtectedList();
            dataList.AddRange(recinfoList.Select(info => new ReserveDataEnd {
                Title = "[録画済み] " + info.Title
            }));

            if (mcs_DeleteCheck(e) == false || CmdExeRecinfo.mcs_DeleteCheckDelFile(recinfoList) == false)
            {
                return;
            }
            IsCommandExecuted = MenuUtil.ReserveDelete(resList) && MenuUtil.RecinfoDelete(recinfoList);
        }
        private void reserve_proc(ExecutedRoutedEventArgs e, int proc)
        {
            if (CmdExeUtil.IsMessageBeforeCommand(e) == true)
            {
                if (MessageBox.Show("予約を" + cmdMsg[proc] + "します。\r\nよろしいですか?", cmdMsg[proc] + "の確認", MessageBoxButton.OKCancel) != MessageBoxResult.OK)
                {
                    return;
                }
            }

            bool ret = false;

            if (proc == 0)
            {
                ret = MenuUtil.ReserveAdd(CommonUtil.ToList(eventInfo), recSettingView);
            }
            else
            {
                List <ReserveData> list = GetReserveList();
                if (proc == 1)
                {
                    RecSettingData recSet = recSettingView.GetRecSetting();
                    list.ForEach(data => data.RecSetting = recSet);
                    ret = MenuUtil.ReserveChange(list);
                }
                else
                {
                    ret = MenuUtil.ReserveDelete(list);
                }
            }

            StatusManager.StatusNotifySet(ret, "録画予約を" + cmdMsg[proc]);

            if (ret == false)
            {
                return;
            }
            if (KeepWin == false)
            {
                this.Close();
            }
        }
Example #5
0
        private void button_del_reserve_Click(object sender, ExecutedRoutedEventArgs e)
        {
            if (CmdExeUtil.IsDisplayKgMessage(e) == true)
            {
                if (MessageBox.Show("この予約を削除します。\r\nよろしいですか?", "削除の確認", MessageBoxButton.OKCancel) != MessageBoxResult.OK)
                {
                    return;
                }
            }

            if (CheckExistReserveItem() == false)
            {
                return;
            }

            bool ret = MenuUtil.ReserveDelete(CommonUtil.ToList(reserveInfo));

            CommonManager.Instance.StatusNotifySet(ret, "録画予約を削除");

            DialogResult = true;
        }
Example #6
0
 protected override void mc_Delete(object sender, ExecutedRoutedEventArgs e)
 {
     if (dataList.Count != 0)
     {
         if (e.Command == EpgCmds.DeleteAll)
         {
             if (CmdExeUtil.CheckAllDeleteCancel(e, dataList.Count) == true)
             {
                 return;
             }
         }
         else
         {
             if (CmdExeUtil.CheckKeyboardDeleteCancel(e, dataList.Select(data => data.Title).ToList()) == true)
             {
                 return;
             }
         }
         IsCommandExecuted = MenuUtil.ReserveDelete(dataList);
     }
 }
        private void reserve_del(object sender, ExecutedRoutedEventArgs e)
        {
            if (CheckReserveChange(e, 2) == false)
            {
                return;
            }

            bool ret = MenuUtil.ReserveDelete(CommonUtil.ToList(reserveInfo));

            StatusManager.StatusNotifySet(ret, "録画予約を削除");
            if (ret == false)
            {
                return;
            }

            if (KeepWin == false)
            {
                this.Close();
                return;
            }

            SetAddMode(AddMode.Re_Add);
            SetReserveTabHeader(false);
        }