ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/AnywhereTS-MSSQL/trunk/TSAdminTool/WebSupport.cs
Revision: 47
Committed: Thu Jul 12 14:29:34 2012 UTC (10 years, 10 months ago) by william
File size: 1470 byte(s)
Log Message:
+ fix compilation errors

File Contents

# Content
1 using System;
2 using System.Collections.Generic;
3 using System.Diagnostics;
4 using System.Text;
5 using System.Windows.Forms;
6 using log4net;
7 namespace AnywhereTS
8 {
9 public static class WebSupport
10 {
11 public static void OpenURL(string url)
12 { // Open a
13
14 try
15 {
16 // Try letting system select browser
17 System.Diagnostics.Process.Start(url);
18 }
19 catch
20 {
21 try
22 {
23 System.Diagnostics.Process.Start("IExplore.exe", url);
24 }
25 catch (Exception e)
26 {
27 MessageBox.Show("AnywhereTS was not able to launch a web browser on your computer. Please launch a web browser and type in the following URL in order to display the requested page: " + url);
28 using (log4net.NDC.Push(string.Format("SqlException: MESSAGE={0}{1}Diagnostics:{1}{2}", e.Message, System.Environment.NewLine, e.ToString())))
29 {
30 Logging.ATSAdminLog.Error("AnywhereTS encountered an error while attempting the start the web browser");
31 }
32 }
33 }
34 }
35
36 public static void DisplayProInfo()
37 {
38 OpenURL("http://anywherets.com");
39 }
40
41 } // Class WebSupport
42 } // Namespace AnywhereTS