public static WPF_GUI show_Url(this WPF_GUI wpf_Gui, string url) { wpf_Gui.show_O2Browser(); wpf_Gui.statusMessage("Showing URL:{0}", url); if (url.uri().HEAD()) { wpf_Gui.O2Browser.open(url); } else { wpf_Gui.showOffineMessage("Could not open url: {0}".format(url)); } return(wpf_Gui); }
public static WPF_GUI show_YouTubeVideo(this WPF_GUI wpf_Gui, string youTubeVideoId) { wpf_Gui.statusMessage("Showing YouTube Video with Id:{0}", youTubeVideoId); wpf_Gui.WinFormPanel.clear(); wpf_Gui.WinFormPanel.add_Control(wpf_Gui.O2Browser); var code = ("<html><body cellspacing=\"0\" cellpadding=\"0\">" + "<object><param name=\"movie\" width=\"450\" height=\"380\" " + "value=\"http://www.youtube.com/v/{0}&hl=en_GB&fs=1\"></param><param name=\"allowFullScreen\" " + "value=\"false\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed " + "src=\"http://www.youtube.com/v/{0}&hl=en_GB&fs=1\" type=\"application/x-shockwave-flash\" " + "allowscriptaccess=\"always\" allowfullscreen=\"false\" width=\"450\" height=\"380\"></embed></object>" + "</body></html>") .format(youTubeVideoId); wpf_Gui.O2Browser.set_Text(code); return(wpf_Gui); }
public static WPF_GUI start_Process(this WPF_GUI wpf_Gui, string processToStart) { wpf_Gui.statusMessage("Starting process: {0}", processToStart); Processes.startProcess(processToStart); return(wpf_Gui); }
public static WPF_GUI show_O2Wiki(this WPF_GUI wpf_Gui, string wikiPageToShow) { wpf_Gui.statusMessage("Showing O2Platform Wiki page: {0}", wikiPageToShow); wpf_Gui.O2Browser.set_Text(wpf_Gui.Wiki_O2.html(wikiPageToShow)); //"O2_Videos_on_YouTube")); return(wpf_Gui); }