Exemple #1
0
        public App()
        {
            timer.Interval = new TimeSpan(0, 0, 1);
            timer.Tick += new EventHandler(Timer_Tick);
            timer.Start();
            string uri = this.Host.Source.ToString();

            uri = uri.Substring(0, uri.LastIndexOf("/") + 1) + "Configuration.xml";
            HttpWebRequest webRequest = WebRequest.Create(new Uri(uri)) as HttpWebRequest;

            if (webRequest != null)
                webRequest.BeginGetResponse(getResponse, webRequest);
            else
                MessageBox.Show("Error! Configuration Not Set.");

            if (Cookie.Read(Login.USER_COOKIE_KEY) != null)
            {
                cookieuserexist = true;
                SmartMap_DomainContext context = new SmartMap_DomainContext();
                context.Load<User>(context.GetUserWithoutPasswordQuery(Cookie.Read(Login.USER_COOKIE_KEY)), UserLaoded, null);
            }
        }