Exemplo n.º 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();
 }
Exemplo n.º 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();
            }
        }
Exemplo n.º 3
0
 private void CeaseConnection()
 {
     ServerConnect.isOnline = false;
     ServerConnect.Disconnect(new ServerErrorHandler("Could not cease connection. Please terminate it manually"));
 }