Исправлены цвета панелей

This commit is contained in:
2024-10-10 14:40:22 +03:00
parent 61db7beb4c
commit 309b57a787
36 changed files with 43 additions and 26 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -50,6 +50,7 @@
//
// Textbox
//
Textbox.BackColor = SystemColors.Control;
Textbox.Dock = DockStyle.Top;
Textbox.ImeMode = ImeMode.NoControl;
Textbox.Location = new Point(2, 17);
+2 -2
View File
@@ -284,7 +284,7 @@
//
textToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { colorTextToolStripMenuItem, styleTextToolStripMenuItem, toolStripSeparator3, defaultToolStripMenuItem });
textToolStripMenuItem.Name = "textToolStripMenuItem";
textToolStripMenuItem.Size = new Size(106, 22);
textToolStripMenuItem.Size = new Size(180, 22);
textToolStripMenuItem.Text = "Текст";
//
// colorTextToolStripMenuItem
@@ -317,7 +317,7 @@
//
colorToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { buttonPanelToolStripMenuItem, parameterPanelToolStripMenuItem, carPanelToolStripMenuItem, top_downPanelToolStripMenuItem });
colorToolStripMenuItem.Name = "colorToolStripMenuItem";
colorToolStripMenuItem.Size = new Size(106, 22);
colorToolStripMenuItem.Size = new Size(180, 22);
colorToolStripMenuItem.Text = "Цвета";
//
// buttonPanelToolStripMenuItem
+19 -23
View File
@@ -1,26 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.AccessControl;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
using GtaVUsersInfo.Helpers;
using GtaVUsersInfo.Controls;
using Newtonsoft.Json;
using System.IO;
using System.Data.Common;
using GtaVUsersInfo.Controls;
using GtaVUsersInfo.Forms;
using System.Collections;
using System.Security.Cryptography;
using GtaVUsersInfo.Helpers;
using GtaVUsersInfo.Sources;
using OpenQA.Selenium.DevTools.V127.Page;
using Microsoft.VisualBasic.ApplicationServices;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using Newtonsoft.Json;
using System.Data;
namespace GtaVUsersInfo
{
@@ -135,8 +118,6 @@ namespace GtaVUsersInfo
}
}
private void MainForm_Load(object sender, EventArgs e)
{
AllPanelCreate();
@@ -602,12 +583,27 @@ namespace GtaVUsersInfo
private void ChangePanelColor()
{
this.buttonsPanel.BackColor = panelColorSettings.leftPanel;
PanelColorSettings.ChangeFontInControls(this.buttonsPanel, panelColorSettings.leftPanel);
this.parametersPanel.BackColor = panelColorSettings.rightPanel;
PanelColorSettings.ChangeFontInControls(this.parametersPanel, panelColorSettings.rightPanel);
this.carsPanel.BackColor = panelColorSettings.centerPanel;
this.carsItems.BackColor = panelColorSettings.centerPanel;
this.upPanel.BackColor = panelColorSettings.upDownPanel;
PanelColorSettings.ChangeFontInControls(this.upPanel, panelColorSettings.upDownPanel);
this.downPanel.BackColor = panelColorSettings.upDownPanel;
PanelColorSettings.ChangeFontInControls(this.downPanel, panelColorSettings.upDownPanel);
this.menuStrip.BackColor = panelColorSettings.upDownPanel;
this.splitterLeft.BackColor = panelColorSettings.upDownPanel;
this.splitterRigth.BackColor = panelColorSettings.upDownPanel;
}
private void buttonPanelToolStripMenuItem_Click(object sender, EventArgs e)
@@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2024-10-10T10:54:38.0393379Z;True|2024-10-10T13:48:01.9862052+03:00;True|2024-10-10T12:30:25.7657642+03:00;True|2024-10-10T10:55:42.4660156+03:00;True|2024-10-10T10:36:20.4890831+03:00;</History>
<History>True|2024-10-10T11:39:55.0855728Z;True|2024-10-10T13:54:38.0393379+03:00;True|2024-10-10T13:48:01.9862052+03:00;True|2024-10-10T12:30:25.7657642+03:00;True|2024-10-10T10:55:42.4660156+03:00;True|2024-10-10T10:36:20.4890831+03:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
+20
View File
@@ -60,5 +60,25 @@ namespace GtaVUsersInfo.Sources
return null;
}
}
public static void ChangeFontInControls(Control parent, Color color)
{
foreach (Control control in parent.Controls)
{
if (control is TextBox ||
control is Button ||
control is ComboBox ||
control is Label ||
control is MenuStrip)
{
control.BackColor = color;
}
if (control.HasChildren)
{
ChangeFontInControls(control, color);
}
}
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.