예제 #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);
     }
 }
예제 #2
0
 public SpectrumDialog(Spectrum s)
 {
     InitializeComponent();
     this.spectrum = s;
     this.build_gui();
 }
예제 #3
0
 public SpectrumDialog(Spectrum s)
 {
     InitializeComponent();
     this.spectrum = s;
     this.build_gui();
 }
예제 #4
0
 public SpectrumEditor(Spectrum spectrum)
 {
     InitializeComponent();
     this.spectrum = spectrum;
     this.build_gui();
 }
예제 #5
0
 public SpectrumEditor(Spectrum spectrum)
 {
     InitializeComponent();
     this.spectrum = spectrum;
     this.build_gui();
 }