Files
ChanSort/ChanSort.Api/Utils/BrowserHelper.cs
hbeham f762230b05 - support for 2013 LA-series (DVB-S only; deactivating TV-Data File Cleanup when there are preset DVB-S channels)
- support for LH3000 (which has same record size but different layout than all other known LH models)
- added various Assistant dialogs
- icons updated
2013-05-03 19:02:30 +02:00

44 lines
727 B
C#

using System.IO;
namespace ChanSort
{
public static class BrowserHelper
{
public static void OpenUrl(string url)
{
OpenHtml(@"
<html>
<head>
<meta http-equiv='Refresh' content='0;" + url + @"'/>
</head>
</html>");
}
public static void OpenMail(string url)
{
OpenHtml(@"
<html>
<head>
<script language=""javascript"">
window.open(""" + url + @""");
window.close();
</script>
</head>
</html>");
}
public static void OpenHtml(string html)
{
try
{
string fileName = Path.GetTempFileName() + ".html";
File.WriteAllText(fileName, html);
System.Diagnostics.Process.Start(fileName);
}
catch
{
}
}
}
}