Exemplo n.º 1
0
        void rect_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            string value = this.materials.get_rgb_reflectance();

            string[]       rgb  = value.Split(',');
            byte           r    = Convert.ToByte(rgb[0]);
            byte           g    = Convert.ToByte(rgb[1]);
            byte           b    = Convert.ToByte(rgb[2]);
            Spectrum       spec = new Spectrum(r, g, b);
            SpectrumDialog sd   = new SpectrumDialog(spec);

            sd.ShowDialog();
            bool ret = (bool)sd.DialogResult;

            if (ret)
            {
                string col = spec.R.ToString() + "," + spec.G.ToString() + "," + spec.B.ToString();
                this.materials.set_rgb_reflectance(col);
            }
        }
Exemplo n.º 2
0
 void rect_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     string value = this.materials.get_rgb_reflectance();
     string[] rgb = value.Split(',');
     byte r = Convert.ToByte(rgb[0]);
     byte g = Convert.ToByte(rgb[1]);
     byte b = Convert.ToByte(rgb[2]);
     Spectrum spec = new Spectrum(r, g, b);
     SpectrumDialog sd = new SpectrumDialog(spec);
     sd.ShowDialog();
     bool ret = (bool)sd.DialogResult;
     if (ret)
     {
         string col = spec.R.ToString() + "," + spec.G.ToString() + "," + spec.B.ToString();
         this.materials.set_rgb_reflectance(col);
     }
 }