public static void r_()
        {
            try {
                int r = 1;
                int g = 1;
                int b = 1;
                while (true)
                {
                    data.red = 1;
                    data.gre = 1;
                    data.blu = 1;

                    while (r < 1023 && g < 1023 && b < 1023)
                    {
                        r++;
                        g++;
                        b++;
                        r        = r + 5;
                        b        = b + 5;
                        g        = g + 5;
                        data.red = r;
                        data.gre = g;
                        data.blu = b;
                        AsynchronousClient.packet(data.PIN_red, r, data.PIN_blu, b, data.PIN_green, g);
                        //AsynchronousClient.packet(7, r, 6, b, 5, g);
                        if (stop == true)
                        {
                            System.Threading.Thread.CurrentThread.Interrupt();
                            stop = false;
                        }

                        // if (r == 1023) msg("true on_1023 ");
                    }
                    while (r > 1 && g > 1 && b > 1)
                    {
                        r--;
                        g--;
                        b--;
                        r        = r - 5;
                        b        = b - 5;
                        g        = g - 5;
                        data.blu = b;
                        data.red = r;
                        data.gre = g;
                        AsynchronousClient.packet(data.PIN_red, r, data.PIN_blu, b, data.PIN_green, g);
                        //     AsynchronousClient.packet(7, r, 6, b, 5, g);
                        if (stop == true)
                        {
                            System.Threading.Thread.CurrentThread.Interrupt();
                            stop = false;
                        }
                    }
                }
            }
            catch { }
        }
        private void slider_blu_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            slider_blu.Minimum = Convert.ToDouble(1);
            slider_blu.Maximum = Convert.ToDouble(1023);
            var t    = Convert.ToUInt32(e.NewValue);
            var rgb_ = "RED - " + data.red + " | " + "GREEN - " + data.gre + " | " + "BLU - " + data.blu;

            textBox.Text = rgb_;
            data.blu     = (int)t;
            AsynchronousClient.packet(data.PIN_red, data.red, data.PIN_blu, data.blu, data.PIN_green, data.gre);
        }