Compare commits

...

3 Commits
1.0 ... main

Author SHA1 Message Date
c5cc5db745 - 2024-10-10 19:00:53 +03:00
042c137a5a - 2024-10-10 14:52:29 +03:00
309b57a787 Исправлены цвета панелей 2024-10-10 14:40:22 +03:00
40 changed files with 52 additions and 35 deletions

Binary file not shown.

Binary file not shown.

View File

@ -50,6 +50,7 @@
// //
// Textbox // Textbox
// //
Textbox.BackColor = SystemColors.Control;
Textbox.Dock = DockStyle.Top; Textbox.Dock = DockStyle.Top;
Textbox.ImeMode = ImeMode.NoControl; Textbox.ImeMode = ImeMode.NoControl;
Textbox.Location = new Point(2, 17); Textbox.Location = new Point(2, 17);

14
MainForm.Designer.cs generated
View File

@ -231,45 +231,45 @@
// openFileToolStripMenuItem // openFileToolStripMenuItem
// //
openFileToolStripMenuItem.Name = "openFileToolStripMenuItem"; openFileToolStripMenuItem.Name = "openFileToolStripMenuItem";
openFileToolStripMenuItem.Size = new Size(170, 22); openFileToolStripMenuItem.Size = new Size(180, 22);
openFileToolStripMenuItem.Text = "Открыть"; openFileToolStripMenuItem.Text = "Открыть";
openFileToolStripMenuItem.Click += openFileToolStripMenuItem_Click; openFileToolStripMenuItem.Click += openFileToolStripMenuItem_Click;
// //
// saveToolStripMenuItem // saveToolStripMenuItem
// //
saveToolStripMenuItem.Name = "saveToolStripMenuItem"; saveToolStripMenuItem.Name = "saveToolStripMenuItem";
saveToolStripMenuItem.Size = new Size(170, 22); saveToolStripMenuItem.Size = new Size(180, 22);
saveToolStripMenuItem.Text = "Сохранить"; saveToolStripMenuItem.Text = "Сохранить";
saveToolStripMenuItem.Click += saveToolStripMenuItem_Click; saveToolStripMenuItem.Click += saveToolStripMenuItem_Click;
// //
// saveAsКакToolStripMenuItem // saveAsКакToolStripMenuItem
// //
saveAsКакToolStripMenuItem.Name = "saveAsКакToolStripMenuItem"; saveAsКакToolStripMenuItem.Name = "saveAsКакToolStripMenuItem";
saveAsКакToolStripMenuItem.Size = new Size(170, 22); saveAsКакToolStripMenuItem.Size = new Size(180, 22);
saveAsКакToolStripMenuItem.Text = "Сохранить как"; saveAsКакToolStripMenuItem.Text = "Сохранить как";
saveAsКакToolStripMenuItem.Click += saveAsКакToolStripMenuItem_Click; saveAsКакToolStripMenuItem.Click += saveAsКакToolStripMenuItem_Click;
// //
// toolStripSeparator2 // toolStripSeparator2
// //
toolStripSeparator2.Name = "toolStripSeparator2"; toolStripSeparator2.Name = "toolStripSeparator2";
toolStripSeparator2.Size = new Size(167, 6); toolStripSeparator2.Size = new Size(177, 6);
// //
// newToolStripMenuItem // newToolStripMenuItem
// //
newToolStripMenuItem.Name = "newToolStripMenuItem"; newToolStripMenuItem.Name = "newToolStripMenuItem";
newToolStripMenuItem.Size = new Size(170, 22); newToolStripMenuItem.Size = new Size(180, 22);
newToolStripMenuItem.Text = "Новый персонаж"; newToolStripMenuItem.Text = "Новый персонаж";
newToolStripMenuItem.Click += newToolStripMenuItem_Click; newToolStripMenuItem.Click += newToolStripMenuItem_Click;
// //
// toolStripSeparator1 // toolStripSeparator1
// //
toolStripSeparator1.Name = "toolStripSeparator1"; toolStripSeparator1.Name = "toolStripSeparator1";
toolStripSeparator1.Size = new Size(167, 6); toolStripSeparator1.Size = new Size(177, 6);
// //
// exitToolStripMenuItem // exitToolStripMenuItem
// //
exitToolStripMenuItem.Name = "exitToolStripMenuItem"; exitToolStripMenuItem.Name = "exitToolStripMenuItem";
exitToolStripMenuItem.Size = new Size(170, 22); exitToolStripMenuItem.Size = new Size(180, 22);
exitToolStripMenuItem.Text = "Выйти"; exitToolStripMenuItem.Text = "Выйти";
exitToolStripMenuItem.Click += exitToolStripMenuItem_Click; exitToolStripMenuItem.Click += exitToolStripMenuItem_Click;
// //

View File

@ -1,26 +1,9 @@
using System; using GtaVUsersInfo.Controls;
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.Forms; using GtaVUsersInfo.Forms;
using System.Collections; using GtaVUsersInfo.Helpers;
using System.Security.Cryptography;
using GtaVUsersInfo.Sources; using GtaVUsersInfo.Sources;
using OpenQA.Selenium.DevTools.V127.Page; using Newtonsoft.Json;
using Microsoft.VisualBasic.ApplicationServices; using System.Data;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace GtaVUsersInfo namespace GtaVUsersInfo
{ {
@ -104,7 +87,6 @@ namespace GtaVUsersInfo
WindowParameters.SaveWindowParameters(window); WindowParameters.SaveWindowParameters(window);
WindowResize(); WindowResize();
} }
isUser = true;
panelColorSettings = PanelColorSettings.LoadPanelSettings(); panelColorSettings = PanelColorSettings.LoadPanelSettings();
if (panelColorSettings != null) if (panelColorSettings != null)
@ -116,6 +98,7 @@ namespace GtaVUsersInfo
panelColorSettings = new PanelColorSettings(defaultPanelColor, defaultPanelColor, defaultPanelColor, defaultPanelColor); panelColorSettings = new PanelColorSettings(defaultPanelColor, defaultPanelColor, defaultPanelColor, defaultPanelColor);
ChangePanelColor(); ChangePanelColor();
} }
isUser = true;
} }
private bool IsFormFullscreen() private bool IsFormFullscreen()
@ -135,8 +118,6 @@ namespace GtaVUsersInfo
} }
} }
private void MainForm_Load(object sender, EventArgs e) private void MainForm_Load(object sender, EventArgs e)
{ {
AllPanelCreate(); AllPanelCreate();
@ -148,6 +129,7 @@ namespace GtaVUsersInfo
CarPanelCreate(); CarPanelCreate();
FontSettings.ChangeFontInControls(this, fontSettings); FontSettings.ChangeFontInControls(this, fontSettings);
ChangePanelColor();
} }
private void WindowResize() private void WindowResize()
@ -163,10 +145,10 @@ namespace GtaVUsersInfo
{ {
parametersPanel.Controls.Clear(); parametersPanel.Controls.Clear();
foreach (Control param in parameters) foreach (ParameterControl param in parameters)
{ {
param.Dock = DockStyle.Top; param.Dock = DockStyle.Top;
(param as ParameterControl).MenuStrip = new ParameterItemMenuStrip(addNewParameter, deleteParameter, param as ParameterControl).Menu; param.MenuStrip = new ParameterItemMenuStrip(addNewParameter, deleteParameter, param).Menu;
parametersPanel.Controls.Add(param); parametersPanel.Controls.Add(param);
parametersPanel.Controls.SetChildIndex(param, 0); parametersPanel.Controls.SetChildIndex(param, 0);
} }
@ -602,12 +584,27 @@ namespace GtaVUsersInfo
private void ChangePanelColor() private void ChangePanelColor()
{ {
this.buttonsPanel.BackColor = panelColorSettings.leftPanel; this.buttonsPanel.BackColor = panelColorSettings.leftPanel;
PanelColorSettings.ChangeFontInControls(this.buttonsPanel, panelColorSettings.leftPanel);
this.parametersPanel.BackColor = panelColorSettings.rightPanel; this.parametersPanel.BackColor = panelColorSettings.rightPanel;
PanelColorSettings.ChangeFontInControls(this.parametersPanel, panelColorSettings.rightPanel);
this.carsPanel.BackColor = panelColorSettings.centerPanel; this.carsPanel.BackColor = panelColorSettings.centerPanel;
this.carsItems.BackColor = panelColorSettings.centerPanel; this.carsItems.BackColor = panelColorSettings.centerPanel;
this.upPanel.BackColor = panelColorSettings.upDownPanel; this.upPanel.BackColor = panelColorSettings.upDownPanel;
PanelColorSettings.ChangeFontInControls(this.upPanel, panelColorSettings.upDownPanel);
this.downPanel.BackColor = panelColorSettings.upDownPanel; this.downPanel.BackColor = panelColorSettings.upDownPanel;
PanelColorSettings.ChangeFontInControls(this.downPanel, panelColorSettings.upDownPanel);
this.menuStrip.BackColor = 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) private void buttonPanelToolStripMenuItem_Click(object sender, EventArgs e)

View File

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project> <Project>
<PropertyGroup> <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 /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -60,5 +60,24 @@ namespace GtaVUsersInfo.Sources
return null; 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.BackColor = color;
}
if (control.HasChildren)
{
ChangeFontInControls(control, color);
}
}
}
} }
} }

View File

@ -4,5 +4,5 @@
"leftPos": 150, "leftPos": 150,
"rightPos": 181, "rightPos": 181,
"isFullScreen": true, "isFullScreen": true,
"prevFile": "C:\\Users\\eugen\\YandexDisk\\БТШ\\Карл.json" "prevFile": "C:\\Users\\eugen\\YandexDisk\\Важное\\GTAV\\123.json"
} }