示例#1
0
 private void ViewerForm_Load(object sender, EventArgs e)
 {
     pictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
     ServerConnect.EventImageRecieved += ViewerForm_UpdatePicture;
     ServerConnect.parentForm          = this;
     this.Capture = true;
     new Task(() => ServerConnect.Listen()).Start();
 }
示例#2
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            ServerConnect.Connect(tbIPAdress.Text, Int32.Parse(tbPort.Text));

            if (ServerConnect.netStream != null)
            {
                this.Hide();
                new ViewerForm(this).ShowDialog();
            }
        }
示例#3
0
 private void CeaseConnection()
 {
     ServerConnect.isOnline = false;
     ServerConnect.Disconnect(new ServerErrorHandler("Could not cease connection. Please terminate it manually"));
 }