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));
        }
Exemple #2
0
        protected override void mc_Delete(object sender, ExecutedRoutedEventArgs e)
        {
            dataList = dataList.GetNoProtectedList();
            if (dataList.Count == 0)
            {
                return;
            }

            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;
                }
            }

            if (IniFileHandler.GetPrivateProfileInt("SET", "RecInfoDelFile", 0, SettingPath.CommonIniPath) == 1)
            {
                if (MessageBox.Show("録画ファイルが存在する場合は一緒に削除されます。\r\nよろしいですか?",
                                    "ファイル削除", MessageBoxButton.OKCancel) != MessageBoxResult.OK)
                {
                    return;
                }
            }

            IsCommandExecuted = MenuUtil.RecinfoDelete(dataList);
        }
Exemple #3
0
 protected override void mc_Delete(object sender, ExecutedRoutedEventArgs e)
 {
     dataList = dataList.GetNoProtectedList();
     if (mcs_DeleteCheck(e) == false || mcs_DeleteCheckDelFile(dataList) == false)
     {
         return;
     }
     IsCommandExecuted = MenuUtil.RecinfoDelete(dataList);
 }
Exemple #4
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);
        }
Exemple #5
0
        protected override void mc_Delete(object sender, ExecutedRoutedEventArgs e)
        {
            dataList = dataList.GetNoProtectedList();
            if (mcs_DeleteCheck(e) == false)
            {
                return;
            }

            if (IniFileHandler.GetPrivateProfileInt("SET", "RecInfoDelFile", 0, SettingPath.CommonIniPath) == 1)
            {
                if (MessageBox.Show("録画ファイルが存在する場合は一緒に削除されます。\r\nよろしいですか?",
                                    "ファイル削除", MessageBoxButton.OKCancel) != MessageBoxResult.OK)
                {
                    return;
                }
            }

            IsCommandExecuted = MenuUtil.RecinfoDelete(dataList);
        }