Esempio n. 1
0
        protected override void mc_ChgResMode(object sender, ExecutedRoutedEventArgs e)
        {
            if (dataList.Count == 0)
            {
                return;
            }

            var  data = CmdExeUtil.ReadObjData(e) as Type;
            uint id   = (uint)CmdExeUtil.ReadIdData(e);

            if (data == null)
            {
                //通常の変更
                IsCommandExecuted = MenuUtil.ReserveChangeResMode(dataList, id);
            }

            if (dataList.Count != 1)
            {
                return;                     //通常はここに引っかかることは無いはず
            }
            AutoAddData autoAdd = AutoAddData.AutoAddList(data, id);

            if (autoAdd != null)
            {
                IsCommandExecuted = MenuUtil.ReserveChangeResModeAutoAdded(dataList, autoAdd);
            }
        }
Esempio n. 2
0
        protected bool mcc_chgRecSetting(ExecutedRoutedEventArgs e)
        {
            List <RecSettingData> infoList = dataList.OfType <IRecSetttingData>().Where(data => data.RecSettingInfo != null).RecSettingList();

            if (infoList.Count == 0)
            {
                return(false);
            }

            if (e.Command == EpgCmds.ChgOnPreset)
            {
                var val = Settings.Instance.RecPreset(CmdExeUtil.ReadIdData(e, 0, 0xFE)).Data;
                foreach (var data in dataList.OfType <IRecSetttingData>())
                {
                    data.RecSettingInfo = val.DeepClone();
                }
            }
            else if (e.Command == EpgCmds.ChgRecmode)
            {
                var val = (byte)CmdExeUtil.ReadIdData(e, 0, 5);
                infoList.ForEach(info => info.RecMode = val);
            }
            else if (e.Command == EpgCmds.ChgPriority)
            {
                var val = (byte)CmdExeUtil.ReadIdData(e, 1, 5);
                infoList.ForEach(info => info.Priority = val);
            }
            else if (e.Command == EpgCmds.ChgRelay)
            {
                var val = (byte)CmdExeUtil.ReadIdData(e, 0, 1);
                infoList.ForEach(info => info.TuijyuuFlag = val);
            }
            else if (e.Command == EpgCmds.ChgPittari)
            {
                var val = (byte)CmdExeUtil.ReadIdData(e, 0, 1);
                infoList.ForEach(info => info.PittariFlag = val);
            }
            else if (e.Command == EpgCmds.ChgTuner)
            {
                var val = (uint)CmdExeUtil.ReadIdData(e, 0, int.MaxValue - 1);
                infoList.ForEach(info => info.TunerID = val);
            }
            else if (e.Command == EpgCmds.ChgMarginStart)
            {
                int?offset = CmdExeUtil.ReadIdData(e);
                MenuUtil.ChangeMargin(infoList, offset == 0, offset, null, true);
            }
            else if (e.Command == EpgCmds.ChgMarginEnd)
            {
                int?offset = CmdExeUtil.ReadIdData(e);
                MenuUtil.ChangeMargin(infoList, offset == 0, null, offset, true);
            }
            else if (e.Command == EpgCmds.ChgMarginValue)
            {
                return(MenuUtil.ChangeMarginValue(infoList, CmdExeUtil.ReadIdData(e, 0, 2) == 1, this.Owner));
            }
            return(true);
        }
Esempio n. 3
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 (eventListAdd.Count != 0)
     {
         IsCommandExecuted = true == MenuUtil.OpenEpgReserveDialog(eventListAdd[0], EpgInfoOpenMode);
     }
 }
Esempio n. 4
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());
     }
 }
Esempio n. 5
0
        protected bool mcc_chgRecSetting(ExecutedRoutedEventArgs e)
        {
            List <RecSettingData> infoList = dataList.OfType <IRecSetttingData>().RecSettingList();

            if (e.Command == EpgCmds.ChgOnPreset)
            {
                return(MenuUtil.ChangeOnPreset(infoList, (uint)CmdExeUtil.ReadIdData(e, 0, 0xFE)));
            }
            else if (e.Command == EpgCmds.ChgRecmode)
            {
                return(MenuUtil.ChangeRecmode(infoList, (byte)CmdExeUtil.ReadIdData(e, 0, 5)));
            }
            else if (e.Command == EpgCmds.ChgPriority)
            {
                return(MenuUtil.ChangePriority(infoList, (byte)CmdExeUtil.ReadIdData(e, 1, 5)));
            }
            else if (e.Command == EpgCmds.ChgRelay)
            {
                return(MenuUtil.ChangeRelay(infoList, (byte)CmdExeUtil.ReadIdData(e, 0, 1)));
            }
            else if (e.Command == EpgCmds.ChgPittari)
            {
                return(MenuUtil.ChangePittari(infoList, (byte)CmdExeUtil.ReadIdData(e, 0, 1)));
            }
            else if (e.Command == EpgCmds.ChgTuner)
            {
                return(MenuUtil.ChangeTuner(infoList, (uint)CmdExeUtil.ReadIdData(e, 0, int.MaxValue - 1)));
            }
            else if (e.Command == EpgCmds.ChgMarginStart)
            {
                return(MenuUtil.ChangeMargin(infoList, CmdExeUtil.ReadIdData(e), true));
            }
            else if (e.Command == EpgCmds.ChgMarginStartValue)
            {
                return(MenuUtil.ChangeMarginValue(infoList, true, this.Owner));
            }
            else if (e.Command == EpgCmds.ChgMarginEnd)
            {
                return(MenuUtil.ChangeMargin(infoList, CmdExeUtil.ReadIdData(e), false));
            }
            else if (e.Command == EpgCmds.ChgMarginEndValue)
            {
                return(MenuUtil.ChangeMarginValue(infoList, false, this.Owner));
            }
            return(false);
        }
Esempio n. 6
0
        protected virtual void mc_RestoreItem(object sender, ExecutedRoutedEventArgs e)
        {
            int count = 0;
            int id    = CmdExeUtil.ReadIdData(e);

            try//Historysは操作以外で削除されないが、直接実行なので念のため
            {
                count             = CmdHistorys.Historys[id].Items.Count;
                IsCommandExecuted = true == MenuUtil.RecWorkMainDataAdd(CmdHistorys.Historys[id].Items);
                if (IsCommandExecuted == true)
                {
                    CmdHistorys.Historys.RemoveAt(id);
                }
            }
            catch { }
            StatusManager.StatusNotifySet(IsCommandExecuted, GetCmdMessageFormat("アイテムの復元", count));
        }
Esempio n. 7
0
 protected override void mc_Play(object sender, ExecutedRoutedEventArgs e)
 {
     if (CmdExeUtil.ReadIdData(e) == 0)
     {
         if (dataList.Count == 0)
         {
             return;
         }
         CommonManager.Instance.FilePlay(dataList[0]);
     }
     else
     {
         if (headDataRec == null)
         {
             return;
         }
         CommonManager.Instance.FilePlay(headDataRec.RecFilePath);
     }
     IsCommandExecuted = true;
 }
Esempio n. 8
0
        protected override void mc_AddOnPreset(object sender, ExecutedRoutedEventArgs e)
        {
            int presetID = CmdExeUtil.ReadIdData(e, 0, 0xFE);

            IsCommandExecuted = MenuUtil.ReserveAdd(eventListAdd, null, presetID);
        }
Esempio n. 9
0
        protected virtual void mc_ShowAutoAddDialog(object sender, ExecutedRoutedEventArgs e)
        {
            AutoAddData autoAdd = AutoAddData.AutoAddList(CmdExeUtil.ReadObjData(e) as Type, (uint)CmdExeUtil.ReadIdData(e));

            if (autoAdd is EpgAutoAddData)
            {
                IsCommandExecuted = true == MenuUtil.OpenChangeEpgAutoAddDialog(autoAdd as EpgAutoAddData);
            }
            else if (autoAdd is ManualAutoAddData)
            {
                IsCommandExecuted = true == MenuUtil.OpenChangeManualAutoAddDialog(autoAdd as ManualAutoAddData, this.Owner);
            }
        }
Esempio n. 10
0
 protected override void mc_ChangeKeyEnabled(object sender, ExecutedRoutedEventArgs e)
 {
     IsCommandExecuted = MenuUtil.AutoAddChangeKeyEnabled(dataList, (byte)CmdExeUtil.ReadIdData(e, 0, 1) == 0);
 }
Esempio n. 11
0
 protected virtual void mc_ShowReserveDialog(object sender, ExecutedRoutedEventArgs e)
 {
     IsCommandExecuted = true == MenuUtil.OpenChangeReserveDialog((uint)CmdExeUtil.ReadIdData(e), EpgInfoOpenMode);
 }
Esempio n. 12
0
 protected virtual void mc_ShowAutoAddDialog(object sender, ExecutedRoutedEventArgs e)
 {
     IsCommandExecuted = true == MenuUtil.OpenChangeAutoAddDialog(CmdExeUtil.ReadObjData(e) as Type, (uint)CmdExeUtil.ReadIdData(e));
 }