Пример #1
0
        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;
        }
Пример #2
0
        // 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;
        }
Пример #3
0
        private void DoSetting()
        {
            FormSetting frm = new FormSetting();

            InitSettingValue(frm);
            DialogResult dialogResult = frm.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                ApplySettingValue(frm);
            }
        }