示例#1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                this.serverListener = new TcpListener(IPAddress.Parse(this.IP), this.Port);

                this.ClientList = new List <User>();

                this.DropBoxServerControler = new ServerControler();

                this.AddLog("Init server successfully...");
            } catch (Exception ex)
            {
                this.button_Listenning.Enabled = false;
                this.AddLogs("Failed to init server...",
                             String.Format("error msg : {0}", ex.Message));
            }
            this.MouseDown += new MouseEventHandler(MainForm_MouseDown);
            this.MouseMove += new MouseEventHandler(MainForm_MouseMove);

            this.groupBox_Client.MouseDown += new MouseEventHandler(MainForm_MouseDown);
            this.groupBox_Client.MouseMove += new MouseEventHandler(MainForm_MouseMove);

            this.groupBox_Log.MouseDown += new MouseEventHandler(MainForm_MouseDown);
            this.groupBox_Log.MouseMove += new MouseEventHandler(MainForm_MouseMove);
        }
示例#2
0
        private void MainForm_Load( object sender , EventArgs e )
        {
            try
            {
                this.serverListener = new TcpListener( IPAddress.Parse( this.IP ) , this.Port );

                this.ClientList = new List<User>();

                this.DropBoxServerControler = new ServerControler();

                this.AddLog( "Init server successfully..." );
            } catch ( Exception ex )
            {
                this.button_Listenning.Enabled = false;
                this.AddLogs("Failed to init server...",
                                String.Format("error msg : {0}",ex.Message));
            }
            this.MouseDown+=new MouseEventHandler( MainForm_MouseDown );
            this.MouseMove+=new MouseEventHandler( MainForm_MouseMove );

            this.groupBox_Client.MouseDown +=new MouseEventHandler( MainForm_MouseDown );
            this.groupBox_Client.MouseMove +=new MouseEventHandler( MainForm_MouseMove );

            this.groupBox_Log.MouseDown +=new MouseEventHandler( MainForm_MouseDown );
            this.groupBox_Log.MouseMove +=new MouseEventHandler( MainForm_MouseMove );
        }