Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (ColorDialog cd = new ColorDialog())
     {
         if (cd.ShowDialog() == DialogResult.OK)
         {
             brushPreview1.SetColor(cd.Color);
             drawCanvas1.DrawingBrush = new SolidBrush(cd.Color);
             client.Send(new SetColorPacket(cd.Color));
         }
     }
 }
Exemple #2
0
        public frmMain(string connectionName, string _IP, int _port)
        {
            InitializeComponent();

            client = new GDClient();
            client.ClientDataRetrieve += Client_ClientDataRetrieve;


            if (!client.Connect(_IP, _port))
            {
                MessageBox.Show("Failed to connect.");
                DialogResult = DialogResult.Abort;
                return;
            }
            Username = connectionName;
            client.StartRetrieve();
            client.Send(new ConnectionPacket(connectionName));

            this.Text += string.Format(" {0}", connectionName);
        }