Example #1
0
        public Form1(string[] a)
        {
            InitializeComponent();
            settingsg.loadfile();
            listBox1.AllowDrop = true;
            listBox1.DragDrop += new DragEventHandler(ddrop);
            listBox1.DragEnter += new DragEventHandler(dent);

            label3.AllowDrop = true;
            label3.DragDrop += new DragEventHandler(ddrop);
            label3.DragEnter += new DragEventHandler(dent);

            this.Closing += new CancelEventHandler(Form1_Closing);

            inip = ca();
            textBox3.Text += String.Format("Your internal IP is {0}{2}Your external IP is {1}{2}", inip, ip, Environment.NewLine);

            if (a.Length == 1)
            {
                short p = 0;
                if (Int16.TryParse(a[0], out p))
                    settingsg.port = a[0];
            }
            textBox2.Text = String.Format("http://{0}{1}", ip, settingsg.port == "80" ? string.Empty : ":" + settingsg.port);
            #if DEBUG
            System.Windows.Forms.MessageBox.Show("Server start");
            #endif
            HServer httpServer = new HServer(this, ip);
            Thread t = new Thread(new ThreadStart(httpServer.listen));
            t.Start();
            //ca();

            //addFileForce(@"C:\Users\\Desktop\classtyle.css");
        }
Example #2
0
 public hpr(TcpClient s, HServer srv)
 {
     this.socket = s;
     this.srv = srv;
 }