public frmMain() { InitializeComponent(); CSharpBrowserSettings settings = new CSharpBrowserSettings(); // Uri url = new Uri ("file:///" + Application.StartupPath.Replace ('\\', '/') + "/main.html"); Uri url = new Uri (Application.StartupPath + "\\main.html"); settings.DefaultUrl = "http://teaerp.sinaapp.com/"; //settings.UserAgent = "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19"; settings.CachePath = @"C:\temp\caches"; chromeWebBrowser1.Initialize(settings); webBrowser1.Url = url; webBrowser1.ObjectForScripting = this; myBrowser.ObjectForScripting = this; myPage.Hide(); timer1.Interval = 1000; string host = getSetting("webHost"); if (host[host.Length - 1] != '/') host += "/"; controllerUrl = host + "Home"; evalActionUrl = controllerUrl + "/Eval"; encryption = new EncryptionUtility("TfoPqado2GvjxvC1GsmY6Q=="); }
public HomeController() { encryption = new EncryptionUtility("TfoPqado2GvjxvC1GsmY6Q=="); //connStr =getSetting("connstr"); }