private void button_recFolderAdd_Click(object sender, RoutedEventArgs e) { if (String.IsNullOrEmpty(textBox_recFolder.Text) == false) { foreach (RecFileSetInfo info in recSetting.RecFolderList) { if (String.Compare(textBox_recFolder.Text, info.RecFolder, true) == 0 && String.Compare((String)comboBox_writePlugIn.SelectedItem, info.WritePlugIn, true) == 0 && String.Compare((String)comboBox_recNamePlugIn.SelectedItem, info.RecNamePlugIn, true) == 0) { MessageBox.Show("すでに追加されています"); return; } } RecFileSetInfo item = new RecFileSetInfo(); item.RecFolder = textBox_recFolder.Text; item.WritePlugIn = (String)comboBox_writePlugIn.SelectedItem; item.RecNamePlugIn = (String)comboBox_recNamePlugIn.SelectedItem; if (String.Compare(item.RecNamePlugIn, "なし", true) == 0) { item.RecNamePlugIn = ""; } recSetting.RecFolderList.Add(item); listView_recFolder.ItemsSource = null; listView_recFolder.ItemsSource = recSetting.RecFolderList; } }
public static bool EqualsValue(RecFileSetInfo src, RecFileSetInfo dest) { return(String.Compare(src.RecFileName, dest.RecFileName, true) == 0 && String.Compare(src.RecFolder, dest.RecFolder, true) == 0 && String.Compare(src.RecNamePlugIn, dest.RecNamePlugIn, true) == 0 && String.Compare(src.WritePlugIn, dest.WritePlugIn, true) == 0); }
public static bool EqualsValue(RecFileSetInfo src, RecFileSetInfo dest) { return(src.RecFileName.Equals(dest.RecFileName, StringComparison.OrdinalIgnoreCase) == true && src.RecFolder.Equals(dest.RecFolder, StringComparison.OrdinalIgnoreCase) == true && src.RecNamePlugIn.Equals(dest.RecNamePlugIn, StringComparison.OrdinalIgnoreCase) == true && src.WritePlugIn.Equals(dest.WritePlugIn, StringComparison.OrdinalIgnoreCase) == true); }
public static bool EqualsValue(RecFileSetInfo src, RecFileSetInfo dest) { return(src.RecFileName == dest.RecFileName && src.RecFolder == dest.RecFolder && src.RecNamePlugIn == dest.RecNamePlugIn && src.WritePlugIn == dest.WritePlugIn); }
private static void CopyData(RecFileSetInfo src, RecFileSetInfo dest) { dest.RecFileName = src.RecFileName; dest.RecFolder = src.RecFolder; dest.RecNamePlugIn = src.RecNamePlugIn; dest.WritePlugIn = src.WritePlugIn; }
private void button_recFolderAdd_1seg_Click(object sender, RoutedEventArgs e) { RecFolderWindow setting = new RecFolderWindow(); PresentationSource topWindow = PresentationSource.FromVisual(this); if (topWindow != null) { setting.Owner = (Window)topWindow.RootVisual; } if (setting.ShowDialog() == true) { RecFileSetInfo setInfo = setting.GetSetting(); foreach (RecFileSetInfoView info in listView_recFolder.Items) { if (info.PartialRec && setInfo.RecFolder.Equals(info.RecFolder, StringComparison.OrdinalIgnoreCase) && setInfo.WritePlugIn.Equals(info.WritePlugIn, StringComparison.OrdinalIgnoreCase) && setInfo.RecNamePlugIn.Equals(info.RecNamePlugIn, StringComparison.OrdinalIgnoreCase)) { MessageBox.Show("すでに追加されています"); return; } } listView_recFolder.Items.Add(new RecFileSetInfoView(setInfo, true)); } }
private void button_recFolderAdd_1seg_Click(object sender, RoutedEventArgs e) { RecFolderWindow setting = new RecFolderWindow(); PresentationSource topWindow = PresentationSource.FromVisual(this); if (topWindow != null) { setting.Owner = (Window)topWindow.RootVisual; } if (setting.ShowDialog() == true) { RecFileSetInfo setInfo = new RecFileSetInfo(); setting.GetSetting(ref setInfo); foreach (RecFileSetInfoView info in listView_recFolder_1seg.Items) { if (String.Compare(setInfo.RecFolder, info.RecFolder, true) == 0 && String.Compare(setInfo.WritePlugIn, info.WritePlugIn, true) == 0 && String.Compare(setInfo.RecNamePlugIn, info.RecNamePlugIn, true) == 0) { MessageBox.Show("すでに追加されています"); return; } } listView_recFolder_1seg.Items.Add(new RecFileSetInfoView(setInfo)); } }
public void LoadRecPresetData() { recPresetData = new RecSettingData(); String defName = "REC_DEF"; String defFolderName = "REC_DEF_FOLDER"; String defFolder1SegName = "REC_DEF_FOLDER_1SEG"; if (ID > 0) { defName += ID.ToString(); defFolderName += ID.ToString(); defFolder1SegName += ID.ToString(); } recPresetData.RecMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RecMode", 1, SettingPath.TimerSrvIniPath); recPresetData.Priority = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "Priority", 2, SettingPath.TimerSrvIniPath); recPresetData.TuijyuuFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "TuijyuuFlag", 1, SettingPath.TimerSrvIniPath); recPresetData.ServiceMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ServiceMode", 0, SettingPath.TimerSrvIniPath); recPresetData.PittariFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PittariFlag", 0, SettingPath.TimerSrvIniPath); recPresetData.BatFilePath = IniFileHandler.GetPrivateProfileString(defName, "BatFilePath", "", SettingPath.TimerSrvIniPath); recPresetData.RecTag = IniFileHandler.GetPrivateProfileString(defName, "RecTag", "", SettingPath.TimerSrvIniPath); recPresetData.RecFolderList.Clear(); int count = IniFileHandler.GetPrivateProfileInt(defFolderName, "Count", 0, SettingPath.TimerSrvIniPath); for (int i = 0; i < count; i++) { RecFileSetInfo folderInfo = new RecFileSetInfo(); folderInfo.RecFolder = IniFileHandler.GetPrivateProfileString(defFolderName, i.ToString(), "", SettingPath.TimerSrvIniPath); folderInfo.WritePlugIn = IniFileHandler.GetPrivateProfileString(defFolderName, "WritePlugIn" + i.ToString(), "Write_Default.dll", SettingPath.TimerSrvIniPath); folderInfo.RecNamePlugIn = IniFileHandler.GetPrivateProfileString(defFolderName, "RecNamePlugIn" + i.ToString(), "", SettingPath.TimerSrvIniPath); recPresetData.RecFolderList.Add(folderInfo); } recPresetData.PartialRecFolder.Clear(); count = IniFileHandler.GetPrivateProfileInt(defFolder1SegName, "Count", 0, SettingPath.TimerSrvIniPath); for (int i = 0; i < count; i++) { RecFileSetInfo folderInfo = new RecFileSetInfo(); folderInfo.RecFolder = IniFileHandler.GetPrivateProfileString(defFolder1SegName, i.ToString(), "", SettingPath.TimerSrvIniPath); folderInfo.WritePlugIn = IniFileHandler.GetPrivateProfileString(defFolder1SegName, "WritePlugIn" + i.ToString(), "Write_Default.dll", SettingPath.TimerSrvIniPath); folderInfo.RecNamePlugIn = IniFileHandler.GetPrivateProfileString(defFolder1SegName, "RecNamePlugIn" + i.ToString(), "", SettingPath.TimerSrvIniPath); recPresetData.PartialRecFolder.Add(folderInfo); } recPresetData.SuspendMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "SuspendMode", 0, SettingPath.TimerSrvIniPath); recPresetData.RebootFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RebootFlag", 0, SettingPath.TimerSrvIniPath); recPresetData.UseMargineFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "UseMargineFlag", 0, SettingPath.TimerSrvIniPath); recPresetData.StartMargine = IniFileHandler.GetPrivateProfileInt(defName, "StartMargine", 0, SettingPath.TimerSrvIniPath); recPresetData.EndMargine = IniFileHandler.GetPrivateProfileInt(defName, "EndMargine", 0, SettingPath.TimerSrvIniPath); recPresetData.ContinueRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ContinueRec", 0, SettingPath.TimerSrvIniPath); recPresetData.PartialRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PartialRec", 0, SettingPath.TimerSrvIniPath); recPresetData.TunerID = (UInt32)IniFileHandler.GetPrivateProfileInt(defName, "TunerID", 0, SettingPath.TimerSrvIniPath); }
private RecFileSetInfo GetCopyRecFileSetInfo(RecFileSetInfo info) { var info_copy = new RecFileSetInfo(); info_copy.RecFileName = info.RecFileName; info_copy.RecFolder = info.RecFolder; info_copy.RecNamePlugIn = info.RecNamePlugIn; info_copy.WritePlugIn = info.WritePlugIn; return(info_copy); }
public RecFileSetInfo GetSetting() { var info = new RecFileSetInfo(); info.RecFolder = textBox_recFolder.Text == "" ? "!Default" : textBox_recFolder.Text; info.WritePlugIn = (string)comboBox_writePlugIn.SelectedItem; info.RecNamePlugIn = (string)comboBox_recNamePlugIn.SelectedItem; if (info.RecNamePlugIn == "なし") { info.RecNamePlugIn = ""; } else if (textBox_recNameOption.Text != "") { info.RecNamePlugIn += '?' + textBox_recNameOption.Text; } return(info); }
protected void LoadPresetData() { string IDS = ID == 0 ? "" : ID.ToString(); string defName = "REC_DEF" + IDS; Data = new RecSettingData(); Data.RecMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RecMode", 1, SettingPath.TimerSrvIniPath); Data.IsEnable = Data.RecMode / 5 % 2 == 0; if (!Data.IsEnable) { Data.RecMode = (byte)(IniFileHandler.GetPrivateProfileInt(defName, "NoRecMode", 1, SettingPath.TimerSrvIniPath) % 5); } Data.Priority = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "Priority", 2, SettingPath.TimerSrvIniPath); Data.TuijyuuFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "TuijyuuFlag", 1, SettingPath.TimerSrvIniPath); Data.ServiceMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ServiceMode", 16, SettingPath.TimerSrvIniPath); Data.PittariFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PittariFlag", 0, SettingPath.TimerSrvIniPath); Data.UnPackBatFilePath(IniFileHandler.GetPrivateProfileString(defName, "BatFilePath", "", SettingPath.TimerSrvIniPath)); var GetRecFileSetInfo = new Action <string, List <RecFileSetInfo> >((appName, folderList) => { int count = IniFileHandler.GetPrivateProfileInt(appName, "Count", 0, SettingPath.TimerSrvIniPath); for (int i = 0; i < count; i++) { var folderInfo = new RecFileSetInfo(); folderInfo.RecFolder = IniFileHandler.GetPrivateProfileFolder(appName, i.ToString(), SettingPath.TimerSrvIniPath); folderInfo.WritePlugIn = IniFileHandler.GetPrivateProfileString(appName, "WritePlugIn" + i.ToString(), "Write_Default.dll", SettingPath.TimerSrvIniPath); folderInfo.RecNamePlugIn = IniFileHandler.GetPrivateProfileString(appName, "RecNamePlugIn" + i.ToString(), "", SettingPath.TimerSrvIniPath); folderList.Add(folderInfo); } }); GetRecFileSetInfo("REC_DEF_FOLDER" + IDS, Data.RecFolderList); GetRecFileSetInfo("REC_DEF_FOLDER_1SEG" + IDS, Data.PartialRecFolder); Data.SuspendMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "SuspendMode", 0, SettingPath.TimerSrvIniPath); Data.RebootFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RebootFlag", 0, SettingPath.TimerSrvIniPath); Data.UseMargineFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "UseMargineFlag", 0, SettingPath.TimerSrvIniPath); Data.StartMargine = IniFileHandler.GetPrivateProfileInt(defName, "StartMargine", 5, SettingPath.TimerSrvIniPath); Data.EndMargine = IniFileHandler.GetPrivateProfileInt(defName, "EndMargine", 2, SettingPath.TimerSrvIniPath); Data.ContinueRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ContinueRec", 0, SettingPath.TimerSrvIniPath); Data.PartialRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PartialRec", 0, SettingPath.TimerSrvIniPath); Data.TunerID = (UInt32)IniFileHandler.GetPrivateProfileInt(defName, "TunerID", 0, SettingPath.TimerSrvIniPath); }
private void button_recFolderChg_1seg_Click(object sender, RoutedEventArgs e) { if (listView_recFolder_1seg.SelectedItem != null) { RecFolderWindow setting = new RecFolderWindow(); PresentationSource topWindow = PresentationSource.FromVisual(this); if (topWindow != null) { setting.Owner = (Window)topWindow.RootVisual; } RecFileSetInfo selectInfo = ((RecFileSetInfoView)listView_recFolder_1seg.SelectedItem).Info; setting.SetDefSetting(selectInfo); if (setting.ShowDialog() == true) { setting.GetSetting(ref selectInfo); } listView_recFolder_1seg.Items.Refresh(); } }
public void SetDefSetting(RecFileSetInfo info) { textBox_recFolder.Text = info.RecFolder; foreach (string text in comboBox_writePlugIn.Items) { if (String.Compare(text, info.WritePlugIn, true) == 0) { comboBox_writePlugIn.SelectedItem = text; break; } } foreach (string text in comboBox_recNamePlugIn.Items) { if (String.Compare(text, info.RecNamePlugIn, true) == 0) { comboBox_recNamePlugIn.SelectedItem = text; break; } } }
public void SetDefSetting(RecFileSetInfo info) { textBox_recFolder.Text = info.RecFolder; foreach (string text in comboBox_writePlugIn.Items) { if (String.Compare(text, info.WritePlugIn, true) == 0) { comboBox_writePlugIn.SelectedItem = text; break; } } foreach (string text in comboBox_recNamePlugIn.Items) { if (String.Compare(text, info.RecNamePlugIn.Substring(0, (info.RecNamePlugIn + '?').IndexOf('?')), true) == 0) { comboBox_recNamePlugIn.SelectedItem = text; textBox_recNameOption.Text = info.RecNamePlugIn.IndexOf('?') < 0 ? "" : info.RecNamePlugIn.Substring(info.RecNamePlugIn.IndexOf('?') + 1); break; } } }
public void SetDefSetting(RecFileSetInfo info) { textBox_recFolder.Text = info.RecFolder.Equals("!Default", StringComparison.OrdinalIgnoreCase) ? "" : info.RecFolder; foreach (string text in comboBox_writePlugIn.Items) { if (text.Equals(info.WritePlugIn, StringComparison.OrdinalIgnoreCase)) { comboBox_writePlugIn.SelectedItem = text; break; } } foreach (string text in comboBox_recNamePlugIn.Items) { if (text.Equals(info.RecNamePlugIn.Substring(0, (info.RecNamePlugIn + '?').IndexOf('?')), StringComparison.OrdinalIgnoreCase)) { comboBox_recNamePlugIn.SelectedItem = text; textBox_recNameOption.Text = info.RecNamePlugIn.IndexOf('?') < 0 ? "" : info.RecNamePlugIn.Substring(info.RecNamePlugIn.IndexOf('?') + 1); break; } } }
public void SetDefSetting(RecFileSetInfo info) { button_ok.Content = "変更"; textBox_recFolder.Text = String.Compare(info.RecFolder, "!Default", true) == 0 ? "" : info.RecFolder; foreach (string text in comboBox_writePlugIn.Items) { if (String.Compare(text, info.WritePlugIn, true) == 0) { comboBox_writePlugIn.SelectedItem = text; break; } } foreach (string text in comboBox_recNamePlugIn.Items) { if (String.Compare(text, info.RecNamePlugIn.Substring(0, (info.RecNamePlugIn + '?').IndexOf('?')), true) == 0) { comboBox_recNamePlugIn.SelectedItem = text; textBox_recNameOption.Text = info.RecNamePlugIn.IndexOf('?') < 0 ? "" : info.RecNamePlugIn.Substring(info.RecNamePlugIn.IndexOf('?') + 1); break; } } }
private void recFolderAdd(bool partialRec) { var setting = new RecFolderWindow(); setting.Owner = CommonUtil.GetTopWindow(this); setting.SetPartialMode(partialRec); if (setting.ShowDialog() == true) { var setInfo = new RecFileSetInfo(); setting.GetSetting(ref setInfo); foreach (RecFileSetInfoView info in listView_recFolder.Items) { if (info.PartialRec == partialRec && String.Compare(setInfo.RecFolder, info.RecFolder, true) == 0 && String.Compare(setInfo.WritePlugIn, info.WritePlugIn, true) == 0 && String.Compare(setInfo.RecNamePlugIn, info.RecNamePlugIn, true) == 0) { MessageBox.Show("すでに追加されています"); return; } } listView_recFolder.Items.Add(new RecFileSetInfoView(setInfo, partialRec)); } }
private static void CopyData(RecFileSetInfo src, RecFileSetInfo dest) { dest.RecFileName = src.RecFileName; dest.RecFolder = src.RecFolder; dest.RecNamePlugIn = src.RecNamePlugIn; dest.WritePlugIn = src.WritePlugIn; }
public static bool EqualsTo(this RecFileSetInfo src, RecFileSetInfo dest) { return CopyObj.EqualsTo(src, dest, EqualsValue); }
public RecFileSetInfoView(RecFileSetInfo info, bool partialRec) { Info = info; PartialRec = partialRec; }
private RecFileSetInfo GetCopyRecFileSetInfo(RecFileSetInfo info) { var info_copy = new RecFileSetInfo(); info_copy.RecFileName = info.RecFileName; info_copy.RecFolder = info.RecFolder; info_copy.RecNamePlugIn = info.RecNamePlugIn; info_copy.WritePlugIn = info.WritePlugIn; return info_copy; }
public void LoadRecPresetData() { recPresetData = new RecSettingData(); String defName = "REC_DEF"; String defFolderName = "REC_DEF_FOLDER"; String defFolder1SegName = "REC_DEF_FOLDER_1SEG"; if (ID > 0) { defName += ID.ToString(); defFolderName += ID.ToString(); defFolder1SegName += ID.ToString(); } recPresetData.RecMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RecMode", 1, SettingPath.TimerSrvIniPath); recPresetData.Priority = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "Priority", 2, SettingPath.TimerSrvIniPath); recPresetData.TuijyuuFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "TuijyuuFlag", 1, SettingPath.TimerSrvIniPath); recPresetData.ServiceMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ServiceMode", 0, SettingPath.TimerSrvIniPath); recPresetData.PittariFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PittariFlag", 0, SettingPath.TimerSrvIniPath); recPresetData.BatFilePath = IniFileHandler.GetPrivateProfileString(defName, "BatFilePath", "", SettingPath.TimerSrvIniPath); recPresetData.RecFolderList.Clear(); int count = IniFileHandler.GetPrivateProfileInt(defFolderName, "Count", 0, SettingPath.TimerSrvIniPath); for (int i = 0; i < count; i++) { RecFileSetInfo folderInfo = new RecFileSetInfo(); folderInfo.RecFolder = IniFileHandler.GetPrivateProfileString(defFolderName, i.ToString(), "", SettingPath.TimerSrvIniPath); folderInfo.WritePlugIn = IniFileHandler.GetPrivateProfileString(defFolderName, "WritePlugIn" + i.ToString(), "Write_Default.dll", SettingPath.TimerSrvIniPath); folderInfo.RecNamePlugIn = IniFileHandler.GetPrivateProfileString(defFolderName, "RecNamePlugIn" + i.ToString(), "", SettingPath.TimerSrvIniPath); recPresetData.RecFolderList.Add(folderInfo); } recPresetData.PartialRecFolder.Clear(); count = IniFileHandler.GetPrivateProfileInt(defFolder1SegName, "Count", 0, SettingPath.TimerSrvIniPath); for (int i = 0; i < count; i++) { RecFileSetInfo folderInfo = new RecFileSetInfo(); folderInfo.RecFolder = IniFileHandler.GetPrivateProfileString(defFolder1SegName, i.ToString(), "", SettingPath.TimerSrvIniPath); folderInfo.WritePlugIn = IniFileHandler.GetPrivateProfileString(defFolder1SegName, "WritePlugIn" + i.ToString(), "Write_Default.dll", SettingPath.TimerSrvIniPath); folderInfo.RecNamePlugIn = IniFileHandler.GetPrivateProfileString(defFolder1SegName, "RecNamePlugIn" + i.ToString(), "", SettingPath.TimerSrvIniPath); recPresetData.PartialRecFolder.Add(folderInfo); } recPresetData.SuspendMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "SuspendMode", 0, SettingPath.TimerSrvIniPath); recPresetData.RebootFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RebootFlag", 0, SettingPath.TimerSrvIniPath); recPresetData.UseMargineFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "UseMargineFlag", 0, SettingPath.TimerSrvIniPath); recPresetData.StartMargine = IniFileHandler.GetPrivateProfileInt(defName, "StartMargine", 0, SettingPath.TimerSrvIniPath); recPresetData.EndMargine = IniFileHandler.GetPrivateProfileInt(defName, "EndMargine", 0, SettingPath.TimerSrvIniPath); recPresetData.ContinueRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ContinueRec", 0, SettingPath.TimerSrvIniPath); recPresetData.PartialRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PartialRec", 0, SettingPath.TimerSrvIniPath); recPresetData.TunerID = (UInt32)IniFileHandler.GetPrivateProfileInt(defName, "TunerID", 0, SettingPath.TimerSrvIniPath); }
public void GetSetting(ref RecFileSetInfo info) { info.RecFolder = defSet.RecFolder; info.WritePlugIn = defSet.WritePlugIn; info.RecNamePlugIn = defSet.RecNamePlugIn; }
public void GetSetting(ref RecFileSetInfo info) { info.RecFolder = defSet.RecFolder; info.WritePlugIn = defSet.WritePlugIn; info.RecNamePlugIn = defSet.RecNamePlugIn; }
public RecFileSetInfoView(RecFileSetInfo info) { Info = info; }
private void button_recFolderAdd_Click(object sender, RoutedEventArgs e) { RecFolderWindow setting = new RecFolderWindow(); PresentationSource topWindow = PresentationSource.FromVisual(this); if (topWindow != null) { setting.Owner = (Window)topWindow.RootVisual; } if (setting.ShowDialog() == true) { RecFileSetInfo setInfo = new RecFileSetInfo(); setting.GetSetting(ref setInfo); foreach (RecFileSetInfo info in recSetting.RecFolderList) { if (String.Compare(setInfo.RecFolder, info.RecFolder, true) == 0 && String.Compare(setInfo.WritePlugIn, info.WritePlugIn, true) == 0 && String.Compare(setInfo.RecNamePlugIn, info.RecNamePlugIn, true) == 0) { MessageBox.Show("すでに追加されています"); return; } } listView_recFolder.Items.Add(setInfo); } }
public static void GetDefRecSetting(UInt32 presetID, ref RecSettingData defKey) { StringBuilder buff = new StringBuilder(512); String defName = "REC_DEF"; String defFolderName = "REC_DEF_FOLDER"; String defFolder1SegName = "REC_DEF_FOLDER_1SEG"; if (presetID > 0) { defName += presetID.ToString(); defFolderName += presetID.ToString(); defFolder1SegName += presetID.ToString(); } defKey.RecMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RecMode", 1, SettingPath.TimerSrvIniPath); defKey.Priority = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "Priority", 2, SettingPath.TimerSrvIniPath); defKey.TuijyuuFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "TuijyuuFlag", 1, SettingPath.TimerSrvIniPath); defKey.ServiceMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ServiceMode", 0, SettingPath.TimerSrvIniPath); defKey.PittariFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PittariFlag", 0, SettingPath.TimerSrvIniPath); buff.Clear(); IniFileHandler.GetPrivateProfileString(defName, "BatFilePath", "", buff, 512, SettingPath.TimerSrvIniPath); defKey.BatFilePath = buff.ToString(); int count = IniFileHandler.GetPrivateProfileInt(defFolderName, "Count", 0, SettingPath.TimerSrvIniPath); for (int i = 0; i < count; i++) { RecFileSetInfo folderInfo = new RecFileSetInfo(); buff.Clear(); IniFileHandler.GetPrivateProfileString(defFolderName, i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath); folderInfo.RecFolder = buff.ToString(); buff.Clear(); IniFileHandler.GetPrivateProfileString(defFolderName, "WritePlugIn" + i.ToString(), "Write_Default.dll", buff, 512, SettingPath.TimerSrvIniPath); folderInfo.WritePlugIn = buff.ToString(); buff.Clear(); IniFileHandler.GetPrivateProfileString(defFolderName, "RecNamePlugIn" + i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath); folderInfo.RecNamePlugIn = buff.ToString(); defKey.RecFolderList.Add(folderInfo); } count = IniFileHandler.GetPrivateProfileInt(defFolder1SegName, "Count", 0, SettingPath.TimerSrvIniPath); for (int i = 0; i < count; i++) { RecFileSetInfo folderInfo = new RecFileSetInfo(); buff.Clear(); IniFileHandler.GetPrivateProfileString(defFolder1SegName, i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath); folderInfo.RecFolder = buff.ToString(); buff.Clear(); IniFileHandler.GetPrivateProfileString(defFolder1SegName, "WritePlugIn" + i.ToString(), "Write_Default.dll", buff, 512, SettingPath.TimerSrvIniPath); folderInfo.WritePlugIn = buff.ToString(); buff.Clear(); IniFileHandler.GetPrivateProfileString(defFolder1SegName, "RecNamePlugIn" + i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath); folderInfo.RecNamePlugIn = buff.ToString(); defKey.PartialRecFolder.Add(folderInfo); } defKey.SuspendMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "SuspendMode", 0, SettingPath.TimerSrvIniPath); defKey.RebootFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RebootFlag", 0, SettingPath.TimerSrvIniPath); defKey.UseMargineFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "UseMargineFlag", 0, SettingPath.TimerSrvIniPath); defKey.StartMargine = IniFileHandler.GetPrivateProfileInt(defName, "StartMargine", 0, SettingPath.TimerSrvIniPath); defKey.EndMargine = IniFileHandler.GetPrivateProfileInt(defName, "EndMargine", 0, SettingPath.TimerSrvIniPath); defKey.ContinueRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ContinueRec", 0, SettingPath.TimerSrvIniPath); defKey.PartialRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PartialRec", 0, SettingPath.TimerSrvIniPath); defKey.TunerID = (UInt32)IniFileHandler.GetPrivateProfileInt(defName, "TunerID", 0, SettingPath.TimerSrvIniPath); }
public RecFileSetInfoView(RecFileSetInfo info, bool partialRec) { Info = info; PartialRec = partialRec; }
public static bool EqualsTo(this RecFileSetInfo src, RecFileSetInfo dest) { return(CopyObj.EqualsTo(src, dest, EqualsValue)); }
public static void CopyTo(this RecFileSetInfo src, RecFileSetInfo dest) { CopyObj.CopyTo(src, dest, CopyData); }
public static void CopyTo(this RecFileSetInfo src, RecFileSetInfo dest) { CopyObj.CopyTo(src, dest, CopyData); }
private void recFolderAdd(bool partialRec) { var setting = new RecFolderWindow(); setting.SetPartialMode(partialRec); PresentationSource topWindow = PresentationSource.FromVisual(this); if (topWindow != null) { setting.Owner = (Window)topWindow.RootVisual; } if (setting.ShowDialog() == true) { var setInfo = new RecFileSetInfo(); setting.GetSetting(ref setInfo); foreach (RecFileSetInfoView info in listView_recFolder.Items) { if (info.PartialRec == partialRec && String.Compare(setInfo.RecFolder, info.RecFolder, true) == 0 && String.Compare(setInfo.WritePlugIn, info.WritePlugIn, true) == 0 && String.Compare(setInfo.RecNamePlugIn, info.RecNamePlugIn, true) == 0) { MessageBox.Show("すでに追加されています"); return; } } listView_recFolder.Items.Add(new RecFileSetInfoView(setInfo, partialRec)); } }
private void button_recFolderAdd_Click(object sender, RoutedEventArgs e) { if (String.IsNullOrEmpty(textBox_recFolder.Text) == false) { foreach (RecFileSetInfo info in recSetting.RecFolderList) { if (String.Compare(textBox_recFolder.Text, info.RecFolder, true) == 0 && String.Compare((String)comboBox_writePlugIn.SelectedItem, info.WritePlugIn, true) == 0 && String.Compare((String)comboBox_recNamePlugIn.SelectedItem, info.RecNamePlugIn, true) == 0) { MessageBox.Show("すでに追加されています"); return; } } RecFileSetInfo item = new RecFileSetInfo(); item.RecFolder = textBox_recFolder.Text; item.WritePlugIn = (String)comboBox_writePlugIn.SelectedItem; item.RecNamePlugIn = (String)comboBox_recNamePlugIn.SelectedItem; if (String.Compare(item.RecNamePlugIn, "なし", true) == 0) { item.RecNamePlugIn = ""; } recSetting.RecFolderList.Add(item); listView_recFolder.ItemsSource = null; listView_recFolder.ItemsSource = recSetting.RecFolderList; } }
public RecFileSetInfoView(RecFileSetInfo info) { Info = info; }
public static bool EqualsValue(RecFileSetInfo src, RecFileSetInfo dest) { return src.RecFileName == dest.RecFileName && src.RecFolder == dest.RecFolder && src.RecNamePlugIn == dest.RecNamePlugIn && src.WritePlugIn == dest.WritePlugIn; }
public static RecFileSetInfo Clone(this RecFileSetInfo src) { return(CopyObj.Clone(src, CopyData)); }
public void SetDefSetting(RecFileSetInfo info) { textBox_recFolder.Text = info.RecFolder; foreach (string text in comboBox_writePlugIn.Items) { if (String.Compare(text, info.WritePlugIn, true) == 0) { comboBox_writePlugIn.SelectedItem = text; break; } } foreach (string text in comboBox_recNamePlugIn.Items) { if (String.Compare(text, info.RecNamePlugIn, true) == 0) { comboBox_recNamePlugIn.SelectedItem = text; break; } } }