private void ApplySettingValue(FormSetting form) { this.NumberOfRays = form.NumberOfRay; this.ParticleRaysPen = new Pen(Color.FromArgb(form.RayBrightness, form.RayColor), form.RayThickness); this.ReflectionLimit = form.ReflectionLimit; this.BackColor = form.BackgroundColor; }
// Setting ////////////////////////////////////////////////////////////////////////////////////////////////// private void InitSettingValue(FormSetting form) { form.NumberOfRay = this.NumberOfRays; form.RayBrightness = this.ParticleRaysPen.Color.A; form.RayThickness = (int)this.particleRaysPen.Width; form.ReflectionLimit = this.ReflectionLimit; form.RayColor = Color.FromArgb(255, this.particleRaysPen.Color); form.BackgroundColor = this.BackColor; }
private void DoSetting() { FormSetting frm = new FormSetting(); InitSettingValue(frm); DialogResult dialogResult = frm.ShowDialog(); if (dialogResult == DialogResult.OK) { ApplySettingValue(frm); } }