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.BackColor = SystemColors.Control;
Textbox.Dock = DockStyle.Top;
Textbox.ImeMode = ImeMode.NoControl;
Textbox.Location = new Point(2, 17);

14
MainForm.Designer.cs generated
View File

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

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
{
@ -104,7 +87,6 @@ namespace GtaVUsersInfo
WindowParameters.SaveWindowParameters(window);
WindowResize();
}
isUser = true;
panelColorSettings = PanelColorSettings.LoadPanelSettings();
if (panelColorSettings != null)
@ -116,6 +98,7 @@ namespace GtaVUsersInfo
panelColorSettings = new PanelColorSettings(defaultPanelColor, defaultPanelColor, defaultPanelColor, defaultPanelColor);
ChangePanelColor();
}
isUser = true;
}
private bool IsFormFullscreen()
@ -135,8 +118,6 @@ namespace GtaVUsersInfo
}
}
private void MainForm_Load(object sender, EventArgs e)
{
AllPanelCreate();
@ -148,6 +129,7 @@ namespace GtaVUsersInfo
CarPanelCreate();
FontSettings.ChangeFontInControls(this, fontSettings);
ChangePanelColor();
}
private void WindowResize()
@ -163,10 +145,10 @@ namespace GtaVUsersInfo
{
parametersPanel.Controls.Clear();
foreach (Control param in parameters)
foreach (ParameterControl param in parameters)
{
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.SetChildIndex(param, 0);
}
@ -602,12 +584,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)

View File

@ -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>

View File

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

View File

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