Beispiel #1
0
        void setSession()
        {
            string[] a = (session.SesInfo).Split('=');
            this.session = getSession();
            webclient    = new WebClientEx();
            a            = (session.SesInfo).Split('=');

            webclient.Headers.Add(HttpRequestHeader.Cookie, session.SesInfo);
            webclient.CookieContainer.Add(new Uri("http://" + ip.ToString()), new Cookie(a[0], a[1]));
        }
Beispiel #2
0
        public MainWindow(IPAddress ip)
        {
            this.ip               = ip;
            this.rebodlg          = new Rebooting();
            rebodlg.StartPosition = FormStartPosition.CenterParent;
            session               = getSession();
            InitializeComponent();
            Thread a = new Thread(signalThread);

            a.SetApartmentState(ApartmentState.MTA);
            a.Start();
            this.FormClosed += MainWindow_FormClosed;
            this.Text        = this.Text + " (" + this.ip.ToString() + " connected)";
        }