private void btnC01_Click(object sender, EventArgs e) { Button butt = (Button)sender; if (isUse) { UpdateColor(butt.BackColor); isUse = false; } else if (isChange) { using (FormColorPicker form = new FormColorPicker(mf, butt.BackColor)) { int.TryParse((butt.Name.Substring(4, 2)), out int buttNumber); if (form.ShowDialog(this) == DialogResult.OK) { int iCol = (form.useThisColor.A << 24) | (form.useThisColor.R << 16) | (form.useThisColor.G << 8) | form.useThisColor.B; (customSectionColorsList[buttNumber - 1]) = iCol; butt.BackColor = form.useThisColor; } } SaveCustomColor(); isChange = false; } chkUse.Checked = false; }
private void btnVehicleColor_Click(object sender, EventArgs e) { using (FormColorPicker form = new FormColorPicker(mf, mf.vehicleColor)) { if (form.ShowDialog(this) == DialogResult.OK) { mf.vehicleColor = form.useThisColor; } } Properties.Settings.Default.setDisplay_colorVehicle = mf.vehicleColor; Settings.Default.Save(); }
private void btnFieldNight_Click(object sender, EventArgs e) { if (mf.isDay) { mf.SwapDayNightMode(); } using (var form = new FormColorPicker(mf, mf.fieldColorNight)) { var result = form.ShowDialog(); if (result == DialogResult.OK) { mf.fieldColorNight = form.useThisColor; } } Settings.Default.setDisplay_colorFieldNight = mf.fieldColorNight; Settings.Default.Save(); }
private void btnFrameNight_Click(object sender, EventArgs e) { if (mf.isDay) { mf.SwapDayNightMode(); } using (FormColorPicker form = new FormColorPicker(mf, mf.frameNightColor)) { if (form.ShowDialog(this) == DialogResult.OK) { mf.frameNightColor = form.useThisColor; } } Properties.Settings.Default.setDisplay_colorNightFrame = mf.frameNightColor; Settings.Default.Save(); mf.SwapDayNightMode(); mf.SwapDayNightMode(); }
private void btnDayText_Click(object sender, EventArgs e) { if (!mf.isDay) { mf.SwapDayNightMode(); } using (FormColorPicker form = new FormColorPicker(mf, mf.textColorDay)) { if (form.ShowDialog(this) == DialogResult.OK) { mf.textColorDay = form.useThisColor; } } Settings.Default.setDisplay_colorTextDay = mf.textColorDay; Settings.Default.Save(); mf.SwapDayNightMode(); mf.SwapDayNightMode(); }
private void btnFrameDay_Click(object sender, EventArgs e) { if (!mf.isDay) { mf.SwapDayNightMode(); } using (var form = new FormColorPicker(mf, mf.dayColor)) { var result = form.ShowDialog(); if (result == DialogResult.OK) { mf.dayColor = form.useThisColor; } } Properties.Settings.Default.setDisplay_colorDayMode = mf.dayColor; Settings.Default.Save(); mf.SwapDayNightMode(); mf.SwapDayNightMode(); }