public static void NavigateMyBrowser(FeedItem item) { item.IsRead = true; // 既読履歴を更新 UpdateReadHistory(item); App.BrowseURL = item.Link; var bgw = WindowInfo.FindWindowByName(null, TITLE); WinMessage.Send(bgw, BROWSING_URL_MESSAGE, IntPtr.Zero, IntPtr.Zero); }
/// <summary> /// Uriをもとにブラウザを起動する。 /// </summary> /// <param name="item"></param> public static void StartBrowser(String browserPath, FeedItem item) { item.IsRead = true; // 既読履歴を更新 UpdateReadHistory(item); // ブラウザを起動 Process.Start(browserPath, $"{App.Configure?.BrowserOption ?? ""} {item.Link}"); // 自動で最小化するオプション if (App.Configure?.IsAutoMinimize ?? false) { var bgw = WindowInfo.FindWindowByName(null, TITLE); WinMessage.Send(bgw, Window_MIN_MESSAGE, IntPtr.Zero, IntPtr.Zero); } }
/// <summary> /// RSSフィードのサイト選択変更 /// </summary> private void SiteSelectBox_SelectionChanged(Object sender, SelectionChangedEventArgs e) { if (sender is ComboBox cmb) { if (!(cmb.SelectedItem is RssSiteInfo item)) { return; } UpdateListBox(item, LISTBOX_UPDATE); this.FeedList.SelectedIndex = 0; this.FeedList.ScrollIntoView(this.FeedList.SelectedItem); FilterClear(); // メインウインドウにサイト変更メッセージを送信する var bgw = WindowInfo.FindWindowByName(null, TITLE); WinMessage.Send(bgw, CHANGE_MESSAGE, (IntPtr)item.ID, IntPtr.Zero); } }