private void button_recSetting_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new SetRecPresetWindow(this);

            dlg.SetSettingMode("予約操作時の録画設定");
            dlg.DataView.SetDefSetting(GetSetting().RecSetting);
            if (dlg.ShowDialog() == true)
            {
                SetRecSettingCmbo(dlg.DataView.GetRecSetting());
            }
        }
Exemplo n.º 2
0
        public static bool ChangeMarginValue(List <RecSettingData> infoList, bool start, UIElement owner = null)
        {
            try
            {
                infoList[0].SetMargin(false);

                var dlg = new SetRecPresetWindow(owner);
                dlg.SetSettingMode(start == true ? "開始マージン設定" : "終了マージン設定", start == true ? 0 : 1);
                dlg.DataView.SetDefSetting(infoList[0]);

                if (dlg.ShowDialog() == false)
                {
                    return(false);
                }

                RecSettingData setData = dlg.DataView.GetRecSetting();
                ChangeMargin(infoList, false, start ? (int?)setData.StartMargine : null, start ? null : (int?)setData.EndMargine, false);
                return(true);
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
            return(false);
        }
Exemplo n.º 3
0
        public static bool ChangeBulkSet(IEnumerable <IRecSetttingData> dataList, UIElement owner = null, bool pgAll = false)
        {
            try
            {
                var dlg = new SetRecPresetWindow(owner);
                dlg.SetSettingMode("まとめて録画設定を変更");
                dlg.DataView.SetViewMode(pgAll != true);
                dlg.DataView.SetDefSetting(dataList.First().RecSettingInfo);

                if (dlg.ShowDialog() == false)
                {
                    return(false);
                }

                RecSettingData setData = dlg.DataView.GetRecSetting();
                foreach (var data in dataList)
                {
                    data.RecSettingInfo = setData.DeepClone();
                }
                return(true);
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); }
            return(false);
        }