protected void autoadd_add_chg(ExecutedRoutedEventArgs e, int code) { bool ret = false; try { AutoAddData data = GetData(); if (data != null && CheckAutoAddChange(e, code) == 0) { if (code == 0) { ret = MenuUtil.AutoAddAdd(data.IntoList()); if (ret == true) { //割り当てられたIDが欲しいだけなのでEpgTimer内のもろもろは再構築せず、Srvからデータだけ取得する。 SetData(AutoAddData.GetAutoAddListSrv(typeof(S)).LastOrDefault() as S); SetViewMode(AutoAddMode.Change); } } else { ret = MenuUtil.AutoAddChange(data.IntoList()); } } } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } StatusManager.StatusNotifySet(ret, AutoAddString + "を" + cmdMsg[code]); }
protected override void mc_ChgBulkRecSet(object sender, ExecutedRoutedEventArgs e) { if (MenuUtil.ChangeBulkSet(dataList, this.Owner, typeof(T) == typeof(ManualAutoAddData)) == false) { return; } IsCommandExecuted = MenuUtil.AutoAddChange(dataList); }
protected override void mc_ChangeRecSetting(object sender, ExecutedRoutedEventArgs e) { if (mcc_chgRecSetting(e) == false) { return; } IsCommandExecuted = MenuUtil.AutoAddChange(dataList); }
protected override void mc_ChgGenre(object sender, ExecutedRoutedEventArgs e) { if (MenuUtil.ChgGenre(dataList.RecSearchKeyList(), this.Owner) == false) { return; } IsCommandExecuted = MenuUtil.AutoAddChange(dataList); }
private void button_chg_epgAutoAdd_Click(object sender, ExecutedRoutedEventArgs e) { bool ret = false; try { ret = CheckAutoAddChange(e, 1); if (ret == true) { ret = MenuUtil.AutoAddChange(CommonUtil.ToList(this.GetAutoAddData())); } } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } CommonManager.Instance.StatusNotifySet(ret, "キーワード予約を変更", this); }
public override bool SaveChange(Dictionary <uint, uint> changeIDTable) { var newList = View.lstCtrl.dataList.Select(item => item.Data.CloneObj() as T).ToList(); newList.ForEach(item => item.DataID = changeIDTable[item.DataID]); bool ret = MenuUtil.AutoAddChange(newList, false, false, false, false); if (ret == true) { //dataListと検索ダイアログへのIDの反映。dataListは既にコピーだが、SaveChange成功後に行う View.lstCtrl.dataList.ForEach(item => item.Data.DataID = changeIDTable[item.Data.DataID]); View.PostProcSaveOrder(changeIDTable); } return(ret); }
public override bool SaveChange(Dictionary <ulong, ulong> changeIDTable) { var newList = View.lstCtrl.dataList.AutoAddInfoList().DeepClone(); newList.ForEach(item => item.DataID = changeIDTable[item.DataID]); bool ret = MenuUtil.AutoAddChange(newList, false, false, false, true); StatusManager.StatusNotifySet(ret, "並べ替えを保存"); if (ret == true) { //dataListと検索ダイアログへのIDの反映。dataListは既にコピーだが、SaveChange成功後に行う View.lstCtrl.dataList.ForEach(item => item.Data.DataID = changeIDTable[item.Data.DataID]); View.PostProcSaveOrder(changeIDTable); } return(ret); }
private void button_add_chg(object sender, ExecutedRoutedEventArgs e, bool chgFlag) { try { UInt32 startTime = ((UInt32)comboBox_startHH.SelectedIndex * 60 * 60) + ((UInt32)comboBox_startMM.SelectedIndex * 60) + (UInt32)comboBox_startSS.SelectedIndex; UInt32 endTime = ((UInt32)comboBox_endHH.SelectedIndex * 60 * 60) + ((UInt32)comboBox_endMM.SelectedIndex * 60) + (UInt32)comboBox_endSS.SelectedIndex; while (endTime < startTime) { endTime += 24 * 60 * 60; } UInt32 duration = endTime - startTime; if (duration >= 24 * 60 * 60) { //深夜時間帯の処理の関係で、不可条件が新たに発生しているため、その対応。 MessageBox.Show("24時間以上の録画時間は設定出来ません。", "録画時間長の確認", MessageBoxButton.OK); return; } if (CheckAutoAddChange(e, chgFlag == false ? 0 : 1) == false) { return; } // if (defKey == null) { defKey = new ManualAutoAddData(); } defKey.startTime = startTime; defKey.durationSecond = duration; defKey.dayOfWeekFlag = 0; if (checkBox_week0.IsChecked == true) { defKey.dayOfWeekFlag |= 0x01; } if (checkBox_week1.IsChecked == true) { defKey.dayOfWeekFlag |= 0x02; } if (checkBox_week2.IsChecked == true) { defKey.dayOfWeekFlag |= 0x04; } if (checkBox_week3.IsChecked == true) { defKey.dayOfWeekFlag |= 0x08; } if (checkBox_week4.IsChecked == true) { defKey.dayOfWeekFlag |= 0x10; } if (checkBox_week5.IsChecked == true) { defKey.dayOfWeekFlag |= 0x20; } if (checkBox_week6.IsChecked == true) { defKey.dayOfWeekFlag |= 0x40; } //開始時刻を0~24時に調整する。 defKey.RegulateData(); defKey.IsEnabled = checkBox_keyDisabled.IsChecked != true; defKey.title = textBox_title.Text; ChSet5Item chItem = comboBox_service.SelectedItem as ChSet5Item; defKey.stationName = chItem.ServiceName; defKey.originalNetworkID = chItem.ONID; defKey.transportStreamID = chItem.TSID; defKey.serviceID = chItem.SID; defKey.recSetting = recSettingView.GetRecSetting(); if (chgFlag == true) { bool ret = MenuUtil.AutoAddChange(CommonUtil.ToList(defKey)); CommonManager.Instance.StatusNotifySet(ret, "プログラム予約登録を変更"); } else { bool ret = MenuUtil.AutoAddAdd(CommonUtil.ToList(defKey)); CommonManager.Instance.StatusNotifySet(ret, "プログラム予約登録を追加"); } } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } DialogResult = true; }