internal void NavigateToStream(Stream streamObject, StreamDeskDatabase db) { if (streamObject.StreamEmbed == "url_browser") { webBrowser1.ScrollBarsEnabled = true; toolStrip1.Visible = true; } else { webBrowser1.ScrollBarsEnabled = false; toolStrip1.Visible = false; } viewToolStripMenuItem.Visible = true; ActiveStreamObject = streamObject; ActiveDatabase = db; if (streamObject.ChatEmbed != "none" || streamObject.ChatEmbed != null) chatToolStripMenuItem.Visible = true; else chatToolStripMenuItem.Visible = false; Text = streamObject.Name + " > " + streamObject.ProviderObject.Name; if (streamObject.StreamEmbed == "url_browser" || streamObject.StreamEmbed == "url_custom") webBrowser1.Navigate(streamObject.GetStreamEmbedData("URL")); else { ClientSize = new Size(streamObject.Size.Width, streamObject.Size.Height); webBrowser1.DocumentText = db.GetStream(streamObject); } }
public void NavigateToStream(Stream streamObject, StreamDeskDatabase database) { Program.Instance.ShowViewMenu(); Program.Instance.ShowChatMenu(streamObject); ActiveStreamObject = streamObject; ActiveDatabase = database; Window.Title = streamObject.Name + " > " + streamObject.ProviderObject.Name; #if DEBUG Window.Title += " (Debug Build)"; #endif if (streamObject.StreamEmbed == "url_browser" || streamObject.StreamEmbed == "url_custom") webBrowser.MainFrame.LoadRequest(new NSUrlRequest(new NSUrl(streamObject.GetStreamEmbedData("URL")))); else { Window.SetContentSize(streamObject.Size); webBrowser.MainFrame.LoadHtmlString(database.GetStream(streamObject), new NSUrl("http://example.org")); } }