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); } }
public SpectrumDialog(Spectrum s) { InitializeComponent(); this.spectrum = s; this.build_gui(); }
public SpectrumEditor(Spectrum spectrum) { InitializeComponent(); this.spectrum = spectrum; this.build_gui(); }