public async Task AddColorPoint(double hue, double x, double y) { var point = new ColorPoint { hue = hue, x = x, y = y }; Console.WriteLine(point.ToString()); await displayClients.Do(async displays => { foreach (var client in displays) { await client.SendAsync("RecieveColorPoint", point); } }); }
static void Main(string[] args) { int x, y, red, blue, green; Console.Write("Enter x coordinates: "); x = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter y coordinates: "); y = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter coordinates of red color: "); red = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter coordinates of blue color: "); blue = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter coordinates of green color: "); green = Convert.ToInt32(Console.ReadLine()); Point point = new ColorPoint(x, y, red, blue, green); Console.WriteLine(point.ToString()); Console.ReadLine(); }
private void ColorPicker2_OnPicked(ColorPoint colorPoint) { _tb2.Text = colorPoint.ToString(); }