private void button_searchDef_Click(object sender, RoutedEventArgs e) { SetDefSearchSettingWindow dlg = new SetDefSearchSettingWindow(); dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual; dlg.SetDefSetting(((Settings)DataContext).CreateDefSearchSetting()); if (dlg.ShowDialog() == true) { EpgSearchKeyInfo defSearchKey = dlg.GetSetting(); var settings = (Settings)DataContext; settings.SearchKeyAndKey = defSearchKey.andKey; settings.SearchKeyNotKey = defSearchKey.notKey; settings.SearchKeyRegExp = defSearchKey.regExpFlag != 0; settings.SearchKeyAimaiFlag = defSearchKey.aimaiFlag != 0; settings.SearchKeyTitleOnly = defSearchKey.titleOnlyFlag != 0; settings.SearchKeyContentList.Clear(); foreach (EpgContentData info in defSearchKey.contentList) { var item = new ContentKindInfo(); item.Nibble1 = info.content_nibble_level_1; item.Nibble2 = info.content_nibble_level_2; settings.SearchKeyContentList.Add(item); } settings.SearchKeyDateItemList.Clear(); settings.SearchKeyDateItemList.AddRange(defSearchKey.dateList); settings.SearchKeyServiceList.Clear(); settings.SearchKeyServiceList.AddRange(defSearchKey.serviceList); settings.SearchKeyNotContent = defSearchKey.notContetFlag != 0; settings.SearchKeyNotDate = defSearchKey.notDateFlag != 0; settings.SearchKeyFreeCA = defSearchKey.freeCAFlag; settings.SearchKeyChkRecEnd = defSearchKey.chkRecEnd; settings.SearchKeyChkRecDay = defSearchKey.chkRecDay; } }
private void button_searchDef_Click(object sender, RoutedEventArgs e) { SetDefSearchSettingWindow dlg = new SetDefSearchSettingWindow(); dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual; dlg.SetDefSetting(defSearchKey); if (dlg.ShowDialog() == true) { dlg.GetSetting(ref defSearchKey); } }
private void button_searchDef_Click(object sender, RoutedEventArgs e) { var dlg = new SetDefSearchSettingWindow(); dlg.Owner = CommonUtil.GetTopWindow(this); dlg.SetDefSetting(defSearchKey); if (dlg.ShowDialog() == true) { defSearchKey = dlg.GetSetting(); } }