diff --git a/rootprox-2022/.vs/rootprox-2022/v16/.suo b/rootprox-2022/.vs/rootprox-2022/v16/.suo index ff42915..a39ed49 100644 Binary files a/rootprox-2022/.vs/rootprox-2022/v16/.suo and b/rootprox-2022/.vs/rootprox-2022/v16/.suo differ diff --git a/rootprox-2022/Classes/ColorsTheme.cs b/rootprox-2022/Classes/ColorsTheme.cs index 2b9a6a1..405fe54 100644 --- a/rootprox-2022/Classes/ColorsTheme.cs +++ b/rootprox-2022/Classes/ColorsTheme.cs @@ -10,18 +10,51 @@ namespace rootprox_2022.Classes class ColorsTheme { - public static Color PanelContainerLeft; - public static Color PanelChildForm; - public static Color PanelSubMenu; - public static Color PrimaryFont; + public static Color PanelContainerLeft; // Color del panel general principal + public static Color PanelChildForm; // Color del background de los formularios + public static Color PanelSubMenu; // Color del submenu principal + public static Color PrimaryFont; // Color del texto + public static Color PrimaryFontSelected; // Color del texto seleccionado + public static Color leftBorderButton; // Color del borde izquierdo del botón seleccionado + public static Color btnActivated; // Color del botón seleccionado // Default Colors private static readonly Color PanelContainerLeftD = Color.FromArgb(76, 137, 199); // E private static readonly Color PanelChildFormD = Color.FromArgb(171, 211, 251); // B private static readonly Color PanelSubMenuD = Color.FromArgb(47, 84, 122); // A private static readonly Color PrimaryFontD = Color.White; + private static readonly Color PrimaryFontSelectedD = Color.White; + private static readonly Color leftBorderButtonD = Color.FromArgb(83, 103, 122); // D + private static readonly Color btnActivatedD = Color.FromArgb(94, 172, 250); // C - #region -> Methods + // Red Theme + private static readonly Color PanelContainerLeftR = Color.FromArgb(179, 52, 37); // E + private static readonly Color PanelChildFormR = Color.FromArgb(234, 131, 119); // B + private static readonly Color PanelSubMenuR = Color.FromArgb(122, 35, 26); // A + private static readonly Color PrimaryFontR = Color.White; + private static readonly Color PrimaryFontSelectedR = Color.White; + private static readonly Color leftBorderButtonR = Color.FromArgb(102, 57, 52); // D + private static readonly Color btnActivatedR = Color.FromArgb(230, 66, 48); // C + + // Green Theme + private static readonly Color PanelContainerLeftG = Color.FromArgb(82, 194, 70); // E + private static readonly Color PanelChildFormG = Color.FromArgb(171, 247, 163); // B + private static readonly Color PanelSubMenuG = Color.FromArgb(50, 177, 42); // A + private static readonly Color PrimaryFontG = Color.White; + private static readonly Color PrimaryFontSelectedG = Color.Black; + private static readonly Color leftBorderButtonG = Color.FromArgb(81, 117, 77); // D + private static readonly Color btnActivatedG = Color.FromArgb(105, 245, 89); // C + + // Purple Theme + private static readonly Color PanelContainerLeftP = Color.FromArgb(158, 88, 199); // E + private static readonly Color PanelChildFormP = Color.FromArgb(227, 186, 251); // B + private static readonly Color PanelSubMenuP = Color.FromArgb(97, 54, 122); // A + private static readonly Color PrimaryFontP = Color.White; + private static readonly Color PrimaryFontSelectedP = Color.White; + private static readonly Color leftBorderButtonP = Color.FromArgb(111, 91, 122); // D + private static readonly Color btnActivatedP = Color.FromArgb(198, 109, 250); // C + + #region Methods public static void ChooseTheme(string Theme) { switch (Theme) @@ -31,6 +64,36 @@ public static void ChooseTheme(string Theme) PanelChildForm = PanelChildFormD; PanelSubMenu = PanelSubMenuD; PrimaryFont = PrimaryFontD; + PrimaryFontSelected = PrimaryFontSelectedD; + leftBorderButton = leftBorderButtonD; + btnActivated = btnActivatedD; + break; + case "Red": + PanelContainerLeft = PanelContainerLeftR; + PanelChildForm = PanelChildFormR; + PanelSubMenu = PanelSubMenuR; + PrimaryFont = PrimaryFontR; + PrimaryFontSelected = PrimaryFontSelectedR; + leftBorderButton = leftBorderButtonR; + btnActivated = btnActivatedR; + break; + case "Green": + PanelContainerLeft = PanelContainerLeftG; + PanelChildForm = PanelChildFormG; + PanelSubMenu = PanelSubMenuG; + PrimaryFont = PrimaryFontG; + PrimaryFontSelected = PrimaryFontSelectedG; + leftBorderButton = leftBorderButtonG; + btnActivated = btnActivatedG; + break; + case "Purple": + PanelContainerLeft = PanelContainerLeftP; + PanelChildForm = PanelChildFormP; + PanelSubMenu = PanelSubMenuP; + PrimaryFont = PrimaryFontP; + PrimaryFontSelected = PrimaryFontSelectedP; + leftBorderButton = leftBorderButtonP; + btnActivated = btnActivatedP; break; } } diff --git "a/rootprox-2022/Forms/ROOTPROX - Bisecci\303\263n.Designer.cs" "b/rootprox-2022/Forms/Methods/ROOTPROX - Bisecci\303\263n.Designer.cs" similarity index 100% rename from "rootprox-2022/Forms/ROOTPROX - Bisecci\303\263n.Designer.cs" rename to "rootprox-2022/Forms/Methods/ROOTPROX - Bisecci\303\263n.Designer.cs" diff --git "a/rootprox-2022/Forms/ROOTPROX - Bisecci\303\263n.cs" "b/rootprox-2022/Forms/Methods/ROOTPROX - Bisecci\303\263n.cs" similarity index 100% rename from "rootprox-2022/Forms/ROOTPROX - Bisecci\303\263n.cs" rename to "rootprox-2022/Forms/Methods/ROOTPROX - Bisecci\303\263n.cs" diff --git "a/rootprox-2022/Forms/ROOTPROX - Bisecci\303\263n.resx" "b/rootprox-2022/Forms/Methods/ROOTPROX - Bisecci\303\263n.resx" similarity index 100% rename from "rootprox-2022/Forms/ROOTPROX - Bisecci\303\263n.resx" rename to "rootprox-2022/Forms/Methods/ROOTPROX - Bisecci\303\263n.resx" diff --git a/rootprox-2022/Forms/ROOTPROX - Regla Falsa.Designer.cs b/rootprox-2022/Forms/Methods/ROOTPROX - Regla Falsa.Designer.cs similarity index 100% rename from rootprox-2022/Forms/ROOTPROX - Regla Falsa.Designer.cs rename to rootprox-2022/Forms/Methods/ROOTPROX - Regla Falsa.Designer.cs diff --git a/rootprox-2022/Forms/ROOTPROX - Regla Falsa.cs b/rootprox-2022/Forms/Methods/ROOTPROX - Regla Falsa.cs similarity index 100% rename from rootprox-2022/Forms/ROOTPROX - Regla Falsa.cs rename to rootprox-2022/Forms/Methods/ROOTPROX - Regla Falsa.cs diff --git a/rootprox-2022/Forms/ROOTPROX - Regla Falsa.resx b/rootprox-2022/Forms/Methods/ROOTPROX - Regla Falsa.resx similarity index 100% rename from rootprox-2022/Forms/ROOTPROX - Regla Falsa.resx rename to rootprox-2022/Forms/Methods/ROOTPROX - Regla Falsa.resx diff --git a/rootprox-2022/Forms/ROOTPROX - Secante.Designer.cs b/rootprox-2022/Forms/Methods/ROOTPROX - Secante.Designer.cs similarity index 100% rename from rootprox-2022/Forms/ROOTPROX - Secante.Designer.cs rename to rootprox-2022/Forms/Methods/ROOTPROX - Secante.Designer.cs diff --git a/rootprox-2022/Forms/ROOTPROX - Secante.cs b/rootprox-2022/Forms/Methods/ROOTPROX - Secante.cs similarity index 98% rename from rootprox-2022/Forms/ROOTPROX - Secante.cs rename to rootprox-2022/Forms/Methods/ROOTPROX - Secante.cs index 69f3e0b..45dee96 100644 --- a/rootprox-2022/Forms/ROOTPROX - Secante.cs +++ b/rootprox-2022/Forms/Methods/ROOTPROX - Secante.cs @@ -51,7 +51,7 @@ private double function(double x) private void btnCalculate_Click(object sender, EventArgs e) { int imax, iter; - double xi, xd, ea, em, xa, xaold; + double xi, xd, ea, em, xa; /* xi = a * xd = b diff --git a/rootprox-2022/Forms/ROOTPROX - Secante.resx b/rootprox-2022/Forms/Methods/ROOTPROX - Secante.resx similarity index 100% rename from rootprox-2022/Forms/ROOTPROX - Secante.resx rename to rootprox-2022/Forms/Methods/ROOTPROX - Secante.resx diff --git a/rootprox-2022/Forms/ROOTPROX - Inicio.Designer.cs b/rootprox-2022/Forms/ROOTPROX - Inicio.Designer.cs index a879257..7716e6e 100644 --- a/rootprox-2022/Forms/ROOTPROX - Inicio.Designer.cs +++ b/rootprox-2022/Forms/ROOTPROX - Inicio.Designer.cs @@ -33,6 +33,13 @@ private void InitializeComponent() this.btnBiseccion = new FontAwesome.Sharp.IconButton(); this.panelContainerLeft = new System.Windows.Forms.Panel(); this.btnTags = new FontAwesome.Sharp.IconButton(); + this.panelSubMenuTheme = new System.Windows.Forms.Panel(); + this.btnPurpleTheme = new FontAwesome.Sharp.IconButton(); + this.btnGreenTheme = new FontAwesome.Sharp.IconButton(); + this.btnRedTheme = new FontAwesome.Sharp.IconButton(); + this.btnBlueTheme = new FontAwesome.Sharp.IconButton(); + this.iconButton2 = new FontAwesome.Sharp.IconButton(); + this.btnTheme = new FontAwesome.Sharp.IconButton(); this.panelSubMenuHelp = new System.Windows.Forms.Panel(); this.btnAbout = new FontAwesome.Sharp.IconButton(); this.btnGuia = new FontAwesome.Sharp.IconButton(); @@ -44,6 +51,7 @@ private void InitializeComponent() this.btnExit = new FontAwesome.Sharp.IconButton(); this.panelForm = new System.Windows.Forms.Panel(); this.panelContainerLeft.SuspendLayout(); + this.panelSubMenuTheme.SuspendLayout(); this.panelSubMenuHelp.SuspendLayout(); this.panelSubMenuMethods.SuspendLayout(); this.SuspendLayout(); @@ -53,9 +61,9 @@ private void InitializeComponent() this.panelLogo.Dock = System.Windows.Forms.DockStyle.Top; this.panelLogo.Location = new System.Drawing.Point(0, 0); this.panelLogo.Name = "panelLogo"; - this.panelLogo.Size = new System.Drawing.Size(225, 100); + this.panelLogo.Size = new System.Drawing.Size(208, 100); this.panelLogo.TabIndex = 0; - this.panelLogo.Paint += new System.Windows.Forms.PaintEventHandler(this.panelLogo_Paint); + this.panelLogo.Click += new System.EventHandler(this.panelLogo_Click); // // btnBiseccion // @@ -64,15 +72,15 @@ private void InitializeComponent() this.btnBiseccion.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnBiseccion.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnBiseccion.ForeColor = System.Drawing.Color.White; - this.btnBiseccion.IconChar = FontAwesome.Sharp.IconChar.Mountain; + this.btnBiseccion.IconChar = FontAwesome.Sharp.IconChar.None; this.btnBiseccion.IconColor = System.Drawing.Color.White; this.btnBiseccion.IconFont = FontAwesome.Sharp.IconFont.Auto; this.btnBiseccion.IconSize = 28; this.btnBiseccion.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnBiseccion.Location = new System.Drawing.Point(0, 0); this.btnBiseccion.Name = "btnBiseccion"; - this.btnBiseccion.Padding = new System.Windows.Forms.Padding(35, 0, 0, 0); - this.btnBiseccion.Size = new System.Drawing.Size(225, 40); + this.btnBiseccion.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.btnBiseccion.Size = new System.Drawing.Size(208, 40); this.btnBiseccion.TabIndex = 10; this.btnBiseccion.Text = "Bisección"; this.btnBiseccion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -82,8 +90,11 @@ private void InitializeComponent() // // panelContainerLeft // + this.panelContainerLeft.AutoScroll = true; this.panelContainerLeft.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(137)))), ((int)(((byte)(199))))); this.panelContainerLeft.Controls.Add(this.btnTags); + this.panelContainerLeft.Controls.Add(this.panelSubMenuTheme); + this.panelContainerLeft.Controls.Add(this.btnTheme); this.panelContainerLeft.Controls.Add(this.panelSubMenuHelp); this.panelContainerLeft.Controls.Add(this.btnAyuda); this.panelContainerLeft.Controls.Add(this.panelSubMenuMethods); @@ -103,31 +114,181 @@ private void InitializeComponent() this.btnTags.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnTags.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnTags.ForeColor = System.Drawing.Color.White; - this.btnTags.IconChar = FontAwesome.Sharp.IconChar.Mountain; + this.btnTags.IconChar = FontAwesome.Sharp.IconChar.Archive; this.btnTags.IconColor = System.Drawing.Color.White; this.btnTags.IconFont = FontAwesome.Sharp.IconFont.Auto; this.btnTags.IconSize = 28; this.btnTags.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnTags.Location = new System.Drawing.Point(0, 395); + this.btnTags.Location = new System.Drawing.Point(0, 595); this.btnTags.Name = "btnTags"; this.btnTags.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnTags.Size = new System.Drawing.Size(225, 45); - this.btnTags.TabIndex = 18; + this.btnTags.Size = new System.Drawing.Size(208, 45); + this.btnTags.TabIndex = 21; this.btnTags.Text = "Lanzamientos"; this.btnTags.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnTags.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.btnTags.UseVisualStyleBackColor = true; this.btnTags.Click += new System.EventHandler(this.btnTags_Click); // + // panelSubMenuTheme + // + this.panelSubMenuTheme.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(84)))), ((int)(((byte)(122))))); + this.panelSubMenuTheme.Controls.Add(this.btnPurpleTheme); + this.panelSubMenuTheme.Controls.Add(this.btnGreenTheme); + this.panelSubMenuTheme.Controls.Add(this.btnRedTheme); + this.panelSubMenuTheme.Controls.Add(this.btnBlueTheme); + this.panelSubMenuTheme.Controls.Add(this.iconButton2); + this.panelSubMenuTheme.Dock = System.Windows.Forms.DockStyle.Top; + this.panelSubMenuTheme.Location = new System.Drawing.Point(0, 435); + this.panelSubMenuTheme.Name = "panelSubMenuTheme"; + this.panelSubMenuTheme.Size = new System.Drawing.Size(208, 160); + this.panelSubMenuTheme.TabIndex = 20; + // + // btnPurpleTheme + // + this.btnPurpleTheme.Dock = System.Windows.Forms.DockStyle.Top; + this.btnPurpleTheme.FlatAppearance.BorderSize = 0; + this.btnPurpleTheme.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnPurpleTheme.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnPurpleTheme.ForeColor = System.Drawing.Color.White; + this.btnPurpleTheme.IconChar = FontAwesome.Sharp.IconChar.None; + this.btnPurpleTheme.IconColor = System.Drawing.Color.White; + this.btnPurpleTheme.IconFont = FontAwesome.Sharp.IconFont.Auto; + this.btnPurpleTheme.IconSize = 28; + this.btnPurpleTheme.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnPurpleTheme.Location = new System.Drawing.Point(0, 120); + this.btnPurpleTheme.Name = "btnPurpleTheme"; + this.btnPurpleTheme.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.btnPurpleTheme.Size = new System.Drawing.Size(208, 40); + this.btnPurpleTheme.TabIndex = 15; + this.btnPurpleTheme.Text = "Morado"; + this.btnPurpleTheme.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnPurpleTheme.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.btnPurpleTheme.UseVisualStyleBackColor = true; + this.btnPurpleTheme.Click += new System.EventHandler(this.btnPurpleTheme_Click); + // + // btnGreenTheme + // + this.btnGreenTheme.Dock = System.Windows.Forms.DockStyle.Top; + this.btnGreenTheme.FlatAppearance.BorderSize = 0; + this.btnGreenTheme.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnGreenTheme.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnGreenTheme.ForeColor = System.Drawing.Color.White; + this.btnGreenTheme.IconChar = FontAwesome.Sharp.IconChar.None; + this.btnGreenTheme.IconColor = System.Drawing.Color.White; + this.btnGreenTheme.IconFont = FontAwesome.Sharp.IconFont.Auto; + this.btnGreenTheme.IconSize = 28; + this.btnGreenTheme.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnGreenTheme.Location = new System.Drawing.Point(0, 80); + this.btnGreenTheme.Name = "btnGreenTheme"; + this.btnGreenTheme.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.btnGreenTheme.Size = new System.Drawing.Size(208, 40); + this.btnGreenTheme.TabIndex = 14; + this.btnGreenTheme.Text = "Verde"; + this.btnGreenTheme.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnGreenTheme.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.btnGreenTheme.UseVisualStyleBackColor = true; + this.btnGreenTheme.Click += new System.EventHandler(this.btnGreenTheme_Click); + // + // btnRedTheme + // + this.btnRedTheme.Dock = System.Windows.Forms.DockStyle.Top; + this.btnRedTheme.FlatAppearance.BorderSize = 0; + this.btnRedTheme.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnRedTheme.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnRedTheme.ForeColor = System.Drawing.Color.White; + this.btnRedTheme.IconChar = FontAwesome.Sharp.IconChar.None; + this.btnRedTheme.IconColor = System.Drawing.Color.White; + this.btnRedTheme.IconFont = FontAwesome.Sharp.IconFont.Auto; + this.btnRedTheme.IconSize = 28; + this.btnRedTheme.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnRedTheme.Location = new System.Drawing.Point(0, 40); + this.btnRedTheme.Name = "btnRedTheme"; + this.btnRedTheme.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.btnRedTheme.Size = new System.Drawing.Size(208, 40); + this.btnRedTheme.TabIndex = 13; + this.btnRedTheme.Text = "Rojo"; + this.btnRedTheme.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnRedTheme.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.btnRedTheme.UseVisualStyleBackColor = true; + this.btnRedTheme.Click += new System.EventHandler(this.btnRedTheme_Click); + // + // btnBlueTheme + // + this.btnBlueTheme.Dock = System.Windows.Forms.DockStyle.Top; + this.btnBlueTheme.FlatAppearance.BorderSize = 0; + this.btnBlueTheme.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnBlueTheme.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnBlueTheme.ForeColor = System.Drawing.Color.White; + this.btnBlueTheme.IconChar = FontAwesome.Sharp.IconChar.None; + this.btnBlueTheme.IconColor = System.Drawing.Color.White; + this.btnBlueTheme.IconFont = FontAwesome.Sharp.IconFont.Auto; + this.btnBlueTheme.IconSize = 28; + this.btnBlueTheme.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnBlueTheme.Location = new System.Drawing.Point(0, 0); + this.btnBlueTheme.Name = "btnBlueTheme"; + this.btnBlueTheme.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.btnBlueTheme.Size = new System.Drawing.Size(208, 40); + this.btnBlueTheme.TabIndex = 12; + this.btnBlueTheme.Text = "Azul"; + this.btnBlueTheme.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnBlueTheme.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.btnBlueTheme.UseVisualStyleBackColor = true; + this.btnBlueTheme.Click += new System.EventHandler(this.btnBlueTheme_Click); + // + // iconButton2 + // + this.iconButton2.FlatAppearance.BorderSize = 0; + this.iconButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.iconButton2.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.iconButton2.ForeColor = System.Drawing.Color.White; + this.iconButton2.IconChar = FontAwesome.Sharp.IconChar.None; + this.iconButton2.IconColor = System.Drawing.Color.White; + this.iconButton2.IconFont = FontAwesome.Sharp.IconFont.Auto; + this.iconButton2.IconSize = 28; + this.iconButton2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.iconButton2.Location = new System.Drawing.Point(0, 0); + this.iconButton2.Name = "iconButton2"; + this.iconButton2.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.iconButton2.Size = new System.Drawing.Size(225, 40); + this.iconButton2.TabIndex = 11; + this.iconButton2.Text = "Guía de uso"; + this.iconButton2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.iconButton2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.iconButton2.UseVisualStyleBackColor = true; + // + // btnTheme + // + this.btnTheme.Dock = System.Windows.Forms.DockStyle.Top; + this.btnTheme.FlatAppearance.BorderSize = 0; + this.btnTheme.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnTheme.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnTheme.ForeColor = System.Drawing.Color.White; + this.btnTheme.IconChar = FontAwesome.Sharp.IconChar.PaintBrush; + this.btnTheme.IconColor = System.Drawing.Color.White; + this.btnTheme.IconFont = FontAwesome.Sharp.IconFont.Auto; + this.btnTheme.IconSize = 28; + this.btnTheme.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnTheme.Location = new System.Drawing.Point(0, 390); + this.btnTheme.Name = "btnTheme"; + this.btnTheme.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnTheme.Size = new System.Drawing.Size(208, 45); + this.btnTheme.TabIndex = 19; + this.btnTheme.Text = "Cambiar Tema"; + this.btnTheme.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnTheme.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.btnTheme.UseVisualStyleBackColor = true; + this.btnTheme.Click += new System.EventHandler(this.btnTheme_Click); + // // panelSubMenuHelp // this.panelSubMenuHelp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(47)))), ((int)(((byte)(84)))), ((int)(((byte)(122))))); this.panelSubMenuHelp.Controls.Add(this.btnAbout); this.panelSubMenuHelp.Controls.Add(this.btnGuia); this.panelSubMenuHelp.Dock = System.Windows.Forms.DockStyle.Top; - this.panelSubMenuHelp.Location = new System.Drawing.Point(0, 314); + this.panelSubMenuHelp.Location = new System.Drawing.Point(0, 310); this.panelSubMenuHelp.Name = "panelSubMenuHelp"; - this.panelSubMenuHelp.Size = new System.Drawing.Size(225, 81); + this.panelSubMenuHelp.Size = new System.Drawing.Size(208, 80); this.panelSubMenuHelp.TabIndex = 17; // // btnAbout @@ -137,15 +298,15 @@ private void InitializeComponent() this.btnAbout.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAbout.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnAbout.ForeColor = System.Drawing.Color.White; - this.btnAbout.IconChar = FontAwesome.Sharp.IconChar.Mountain; + this.btnAbout.IconChar = FontAwesome.Sharp.IconChar.None; this.btnAbout.IconColor = System.Drawing.Color.White; this.btnAbout.IconFont = FontAwesome.Sharp.IconFont.Auto; this.btnAbout.IconSize = 28; this.btnAbout.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnAbout.Location = new System.Drawing.Point(0, 40); this.btnAbout.Name = "btnAbout"; - this.btnAbout.Padding = new System.Windows.Forms.Padding(35, 0, 0, 0); - this.btnAbout.Size = new System.Drawing.Size(225, 40); + this.btnAbout.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.btnAbout.Size = new System.Drawing.Size(208, 40); this.btnAbout.TabIndex = 12; this.btnAbout.Text = "Acerca de"; this.btnAbout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -160,15 +321,15 @@ private void InitializeComponent() this.btnGuia.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnGuia.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnGuia.ForeColor = System.Drawing.Color.White; - this.btnGuia.IconChar = FontAwesome.Sharp.IconChar.Mountain; + this.btnGuia.IconChar = FontAwesome.Sharp.IconChar.None; this.btnGuia.IconColor = System.Drawing.Color.White; this.btnGuia.IconFont = FontAwesome.Sharp.IconFont.Auto; this.btnGuia.IconSize = 28; this.btnGuia.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnGuia.Location = new System.Drawing.Point(0, 0); this.btnGuia.Name = "btnGuia"; - this.btnGuia.Padding = new System.Windows.Forms.Padding(35, 0, 0, 0); - this.btnGuia.Size = new System.Drawing.Size(225, 40); + this.btnGuia.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.btnGuia.Size = new System.Drawing.Size(208, 40); this.btnGuia.TabIndex = 11; this.btnGuia.Text = "Guía de uso"; this.btnGuia.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -183,15 +344,15 @@ private void InitializeComponent() this.btnAyuda.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAyuda.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnAyuda.ForeColor = System.Drawing.Color.White; - this.btnAyuda.IconChar = FontAwesome.Sharp.IconChar.Mountain; + this.btnAyuda.IconChar = FontAwesome.Sharp.IconChar.Question; this.btnAyuda.IconColor = System.Drawing.Color.White; this.btnAyuda.IconFont = FontAwesome.Sharp.IconFont.Auto; this.btnAyuda.IconSize = 28; this.btnAyuda.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnAyuda.Location = new System.Drawing.Point(0, 269); + this.btnAyuda.Location = new System.Drawing.Point(0, 265); this.btnAyuda.Name = "btnAyuda"; this.btnAyuda.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnAyuda.Size = new System.Drawing.Size(225, 45); + this.btnAyuda.Size = new System.Drawing.Size(208, 45); this.btnAyuda.TabIndex = 16; this.btnAyuda.Text = "Ayuda"; this.btnAyuda.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -208,7 +369,7 @@ private void InitializeComponent() this.panelSubMenuMethods.Dock = System.Windows.Forms.DockStyle.Top; this.panelSubMenuMethods.Location = new System.Drawing.Point(0, 145); this.panelSubMenuMethods.Name = "panelSubMenuMethods"; - this.panelSubMenuMethods.Size = new System.Drawing.Size(225, 124); + this.panelSubMenuMethods.Size = new System.Drawing.Size(208, 120); this.panelSubMenuMethods.TabIndex = 15; // // btnReglaFalsa @@ -218,15 +379,15 @@ private void InitializeComponent() this.btnReglaFalsa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnReglaFalsa.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnReglaFalsa.ForeColor = System.Drawing.Color.White; - this.btnReglaFalsa.IconChar = FontAwesome.Sharp.IconChar.Mountain; + this.btnReglaFalsa.IconChar = FontAwesome.Sharp.IconChar.None; this.btnReglaFalsa.IconColor = System.Drawing.Color.White; this.btnReglaFalsa.IconFont = FontAwesome.Sharp.IconFont.Auto; this.btnReglaFalsa.IconSize = 28; this.btnReglaFalsa.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnReglaFalsa.Location = new System.Drawing.Point(0, 80); this.btnReglaFalsa.Name = "btnReglaFalsa"; - this.btnReglaFalsa.Padding = new System.Windows.Forms.Padding(35, 0, 0, 0); - this.btnReglaFalsa.Size = new System.Drawing.Size(225, 40); + this.btnReglaFalsa.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.btnReglaFalsa.Size = new System.Drawing.Size(208, 40); this.btnReglaFalsa.TabIndex = 12; this.btnReglaFalsa.Text = "Regla Falsa"; this.btnReglaFalsa.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -241,15 +402,15 @@ private void InitializeComponent() this.btnSecante.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSecante.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnSecante.ForeColor = System.Drawing.Color.White; - this.btnSecante.IconChar = FontAwesome.Sharp.IconChar.Mountain; + this.btnSecante.IconChar = FontAwesome.Sharp.IconChar.None; this.btnSecante.IconColor = System.Drawing.Color.White; this.btnSecante.IconFont = FontAwesome.Sharp.IconFont.Auto; this.btnSecante.IconSize = 28; this.btnSecante.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnSecante.Location = new System.Drawing.Point(0, 40); this.btnSecante.Name = "btnSecante"; - this.btnSecante.Padding = new System.Windows.Forms.Padding(35, 0, 0, 0); - this.btnSecante.Size = new System.Drawing.Size(225, 40); + this.btnSecante.Padding = new System.Windows.Forms.Padding(20, 0, 0, 0); + this.btnSecante.Size = new System.Drawing.Size(208, 40); this.btnSecante.TabIndex = 11; this.btnSecante.Text = "Secante"; this.btnSecante.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -264,7 +425,7 @@ private void InitializeComponent() this.btnMethods.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnMethods.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnMethods.ForeColor = System.Drawing.Color.White; - this.btnMethods.IconChar = FontAwesome.Sharp.IconChar.Mountain; + this.btnMethods.IconChar = FontAwesome.Sharp.IconChar.ChartLine; this.btnMethods.IconColor = System.Drawing.Color.White; this.btnMethods.IconFont = FontAwesome.Sharp.IconFont.Auto; this.btnMethods.IconSize = 28; @@ -272,7 +433,7 @@ private void InitializeComponent() this.btnMethods.Location = new System.Drawing.Point(0, 100); this.btnMethods.Name = "btnMethods"; this.btnMethods.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnMethods.Size = new System.Drawing.Size(225, 45); + this.btnMethods.Size = new System.Drawing.Size(208, 45); this.btnMethods.TabIndex = 14; this.btnMethods.Text = "Métodos"; this.btnMethods.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -287,15 +448,15 @@ private void InitializeComponent() this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnExit.Font = new System.Drawing.Font("Trebuchet MS", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnExit.ForeColor = System.Drawing.Color.White; - this.btnExit.IconChar = FontAwesome.Sharp.IconChar.Mountain; + this.btnExit.IconChar = FontAwesome.Sharp.IconChar.DoorOpen; this.btnExit.IconColor = System.Drawing.Color.White; this.btnExit.IconFont = FontAwesome.Sharp.IconFont.Auto; this.btnExit.IconSize = 28; this.btnExit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnExit.Location = new System.Drawing.Point(0, 516); + this.btnExit.Location = new System.Drawing.Point(0, 640); this.btnExit.Name = "btnExit"; this.btnExit.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnExit.Size = new System.Drawing.Size(225, 45); + this.btnExit.Size = new System.Drawing.Size(208, 45); this.btnExit.TabIndex = 10; this.btnExit.Text = "Salir"; this.btnExit.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -316,17 +477,17 @@ private void InitializeComponent() // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScroll = true; this.ClientSize = new System.Drawing.Size(934, 561); this.Controls.Add(this.panelForm); this.Controls.Add(this.panelContainerLeft); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.MaximizeBox = false; this.MinimumSize = new System.Drawing.Size(950, 600); this.Name = "ROOTPROX_Inicio"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "ROOTPROX - Inicio"; this.Load += new System.EventHandler(this.ROOTPROX_Inicio_Load); this.panelContainerLeft.ResumeLayout(false); + this.panelSubMenuTheme.ResumeLayout(false); this.panelSubMenuHelp.ResumeLayout(false); this.panelSubMenuMethods.ResumeLayout(false); this.ResumeLayout(false); @@ -340,7 +501,6 @@ private void InitializeComponent() private FontAwesome.Sharp.IconButton btnExit; private System.Windows.Forms.Panel panelForm; private FontAwesome.Sharp.IconButton btnMethods; - private FontAwesome.Sharp.IconButton btnTags; private System.Windows.Forms.Panel panelSubMenuHelp; private FontAwesome.Sharp.IconButton btnAbout; private FontAwesome.Sharp.IconButton btnGuia; @@ -348,6 +508,14 @@ private void InitializeComponent() private System.Windows.Forms.Panel panelSubMenuMethods; private FontAwesome.Sharp.IconButton btnReglaFalsa; private FontAwesome.Sharp.IconButton btnSecante; + private FontAwesome.Sharp.IconButton btnTheme; + private System.Windows.Forms.Panel panelSubMenuTheme; + private FontAwesome.Sharp.IconButton btnBlueTheme; + private FontAwesome.Sharp.IconButton iconButton2; + private FontAwesome.Sharp.IconButton btnGreenTheme; + private FontAwesome.Sharp.IconButton btnRedTheme; + private FontAwesome.Sharp.IconButton btnPurpleTheme; + private FontAwesome.Sharp.IconButton btnTags; } } diff --git a/rootprox-2022/Forms/ROOTPROX - Inicio.cs b/rootprox-2022/Forms/ROOTPROX - Inicio.cs index a6a77b8..4d5863c 100644 --- a/rootprox-2022/Forms/ROOTPROX - Inicio.cs +++ b/rootprox-2022/Forms/ROOTPROX - Inicio.cs @@ -8,44 +8,71 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using FontAwesome.Sharp; namespace rootprox_2022 { public partial class ROOTPROX_Inicio : Form { + // Campos + private IconButton currentBtn; + private Panel leftBorderBtn; + private Form activeForm; + public ROOTPROX_Inicio() { InitializeComponent(); customizeSubMenus(); + leftBorderBtn = new Panel(); + leftBorderBtn.Size = new Size(7, 45); + panelContainerLeft.Controls.Add(leftBorderBtn); } private void ROOTPROX_Inicio_Load(object sender, EventArgs e) { ColorsTheme.ChooseTheme("Default"); + // Left Panel panelContainerLeft.BackColor = ColorsTheme.PanelContainerLeft; + + // Child Form panelForm.BackColor = ColorsTheme.PanelChildForm; + + //SubMenus + panelSubMenuMethods.BackColor = ColorsTheme.PanelSubMenu; panelSubMenuHelp.BackColor = ColorsTheme.PanelSubMenu; + panelSubMenuTheme.BackColor = ColorsTheme.PanelSubMenu; + + // Buttons Font + btnMethods.ForeColor = ColorsTheme.PrimaryFont; // Methods Button btnBiseccion.ForeColor = ColorsTheme.PrimaryFont; - btnAyuda.ForeColor = ColorsTheme.PrimaryFont; - btnBiseccion.ForeColor = ColorsTheme.PrimaryFont; + btnSecante.ForeColor = ColorsTheme.PrimaryFont; + btnReglaFalsa.ForeColor = ColorsTheme.PrimaryFont; + btnAyuda.ForeColor = ColorsTheme.PrimaryFont; // Help Button + btnGuia.ForeColor = ColorsTheme.PrimaryFont; btnAbout.ForeColor = ColorsTheme.PrimaryFont; - btnTags.ForeColor = ColorsTheme.PrimaryFont; - btnExit.ForeColor = ColorsTheme.PrimaryFont; + btnTheme.ForeColor = ColorsTheme.PrimaryFont; // Theme Button + btnBlueTheme.ForeColor = ColorsTheme.PrimaryFont; + btnRedTheme.ForeColor = ColorsTheme.PrimaryFont; + btnGreenTheme.ForeColor = ColorsTheme.PrimaryFont; + btnPurpleTheme.ForeColor = ColorsTheme.PrimaryFont; + btnTags.ForeColor = ColorsTheme.PrimaryFont; // Tags Button + btnExit.ForeColor = ColorsTheme.PrimaryFont; // Exit Button } + #region Controles // Controls - private void panelLogo_Paint(object sender, PaintEventArgs e) + private void panelLogo_Click(object sender, EventArgs e) { - - - hideSubMenu(); + Reset(); } private void btnMethods_Click(object sender, EventArgs e) { showSubMenu(panelSubMenuMethods); + + activateBtn(sender); } private void btnBiseccion_Click(object sender, EventArgs e) @@ -72,6 +99,8 @@ private void btnReglaFalsa_Click(object sender, EventArgs e) private void btnAyuda_Click(object sender, EventArgs e) { showSubMenu(panelSubMenuHelp); + + activateBtn(sender); } private void btnGuia_Click(object sender, EventArgs e) @@ -83,7 +112,10 @@ private void btnGuia_Click(object sender, EventArgs e) private void btnAbout_Click(object sender, EventArgs e) { - + if (activeForm != null) + { + activeForm.Close(); + } hideSubMenu(); } @@ -95,17 +127,191 @@ private void btnTags_Click(object sender, EventArgs e) hideSubMenu(); } - private void btnExit_Click(object sender, EventArgs e) + private void btnTheme_Click(object sender, EventArgs e) { + showSubMenu(panelSubMenuTheme); + activateBtn(sender); } + private void btnBlueTheme_Click(object sender, EventArgs e) + { + ColorsTheme.ChooseTheme("Default"); + + // Left Panel + panelContainerLeft.BackColor = ColorsTheme.PanelContainerLeft; + + btnMethods.BackColor = ColorsTheme.PanelContainerLeft; + btnAyuda.BackColor = ColorsTheme.PanelContainerLeft; + btnTheme.BackColor = ColorsTheme.PanelContainerLeft; + btnTags.BackColor = ColorsTheme.PanelContainerLeft; + btnExit.BackColor = ColorsTheme.PanelContainerLeft; + + // Child Form + panelForm.BackColor = ColorsTheme.PanelChildForm; + + //SubMenus + panelSubMenuMethods.BackColor = ColorsTheme.PanelSubMenu; + panelSubMenuHelp.BackColor = ColorsTheme.PanelSubMenu; + panelSubMenuTheme.BackColor = ColorsTheme.PanelSubMenu; + + // Buttons Font + btnMethods.ForeColor = ColorsTheme.PrimaryFont; // Methods Button + btnBiseccion.ForeColor = ColorsTheme.PrimaryFont; + btnSecante.ForeColor = ColorsTheme.PrimaryFont; + btnReglaFalsa.ForeColor = ColorsTheme.PrimaryFont; + btnAyuda.ForeColor = ColorsTheme.PrimaryFont; // Help Button + btnGuia.ForeColor = ColorsTheme.PrimaryFont; + btnAbout.ForeColor = ColorsTheme.PrimaryFont; + btnTheme.ForeColor = ColorsTheme.PrimaryFont; // Theme Button + btnBlueTheme.ForeColor = ColorsTheme.PrimaryFont; + btnRedTheme.ForeColor = ColorsTheme.PrimaryFont; + btnGreenTheme.ForeColor = ColorsTheme.PrimaryFont; + btnPurpleTheme.ForeColor = ColorsTheme.PrimaryFont; + btnTags.ForeColor = ColorsTheme.PrimaryFont; // Tags Button + btnExit.ForeColor = ColorsTheme.PrimaryFont; // Exit Button + + hideSubMenu(); + Reset(); + } + + private void btnRedTheme_Click(object sender, EventArgs e) + { + ColorsTheme.ChooseTheme("Red"); + + // Left Panel + panelContainerLeft.BackColor = ColorsTheme.PanelContainerLeft; + + btnMethods.BackColor = ColorsTheme.PanelContainerLeft; + btnAyuda.BackColor = ColorsTheme.PanelContainerLeft; + btnTheme.BackColor = ColorsTheme.PanelContainerLeft; + btnTags.BackColor = ColorsTheme.PanelContainerLeft; + btnExit.BackColor = ColorsTheme.PanelContainerLeft; + + // Child Form + panelForm.BackColor = ColorsTheme.PanelChildForm; + + //SubMenus + panelSubMenuMethods.BackColor = ColorsTheme.PanelSubMenu; + panelSubMenuHelp.BackColor = ColorsTheme.PanelSubMenu; + panelSubMenuTheme.BackColor = ColorsTheme.PanelSubMenu; + + // Buttons Font + btnMethods.ForeColor = ColorsTheme.PrimaryFont; // Methods Button + btnBiseccion.ForeColor = ColorsTheme.PrimaryFont; + btnSecante.ForeColor = ColorsTheme.PrimaryFont; + btnReglaFalsa.ForeColor = ColorsTheme.PrimaryFont; + btnAyuda.ForeColor = ColorsTheme.PrimaryFont; // Help Button + btnGuia.ForeColor = ColorsTheme.PrimaryFont; + btnAbout.ForeColor = ColorsTheme.PrimaryFont; + btnTheme.ForeColor = ColorsTheme.PrimaryFont; // Theme Button + btnBlueTheme.ForeColor = ColorsTheme.PrimaryFont; + btnRedTheme.ForeColor = ColorsTheme.PrimaryFont; + btnGreenTheme.ForeColor = ColorsTheme.PrimaryFont; + btnPurpleTheme.ForeColor = ColorsTheme.PrimaryFont; + btnTags.ForeColor = ColorsTheme.PrimaryFont; // Tags Button + btnExit.ForeColor = ColorsTheme.PrimaryFont; // Exit Button + + hideSubMenu(); + Reset(); + } + + private void btnGreenTheme_Click(object sender, EventArgs e) + { + ColorsTheme.ChooseTheme("Green"); + + // Left Panel + panelContainerLeft.BackColor = ColorsTheme.PanelContainerLeft; + + btnMethods.BackColor = ColorsTheme.PanelContainerLeft; + btnAyuda.BackColor = ColorsTheme.PanelContainerLeft; + btnTheme.BackColor = ColorsTheme.PanelContainerLeft; + btnTags.BackColor = ColorsTheme.PanelContainerLeft; + btnExit.BackColor = ColorsTheme.PanelContainerLeft; + + // Child Form + panelForm.BackColor = ColorsTheme.PanelChildForm; + + //SubMenus + panelSubMenuMethods.BackColor = ColorsTheme.PanelSubMenu; + panelSubMenuHelp.BackColor = ColorsTheme.PanelSubMenu; + panelSubMenuTheme.BackColor = ColorsTheme.PanelSubMenu; + + // Buttons Font + btnMethods.ForeColor = ColorsTheme.PrimaryFont; // Methods Button + btnBiseccion.ForeColor = ColorsTheme.PrimaryFont; + btnSecante.ForeColor = ColorsTheme.PrimaryFont; + btnReglaFalsa.ForeColor = ColorsTheme.PrimaryFont; + btnAyuda.ForeColor = ColorsTheme.PrimaryFont; // Help Button + btnGuia.ForeColor = ColorsTheme.PrimaryFont; + btnAbout.ForeColor = ColorsTheme.PrimaryFont; + btnTheme.ForeColor = ColorsTheme.PrimaryFont; // Theme Button + btnBlueTheme.ForeColor = ColorsTheme.PrimaryFont; + btnRedTheme.ForeColor = ColorsTheme.PrimaryFont; + btnGreenTheme.ForeColor = ColorsTheme.PrimaryFont; + btnPurpleTheme.ForeColor = ColorsTheme.PrimaryFont; + btnTags.ForeColor = ColorsTheme.PrimaryFont; // Tags Button + btnExit.ForeColor = ColorsTheme.PrimaryFont; // Exit Button + + hideSubMenu(); + Reset(); + } + + private void btnPurpleTheme_Click(object sender, EventArgs e) + { + ColorsTheme.ChooseTheme("Purple"); + + // Left Panel + panelContainerLeft.BackColor = ColorsTheme.PanelContainerLeft; + + btnMethods.BackColor = ColorsTheme.PanelContainerLeft; + btnAyuda.BackColor = ColorsTheme.PanelContainerLeft; + btnTheme.BackColor = ColorsTheme.PanelContainerLeft; + btnTags.BackColor = ColorsTheme.PanelContainerLeft; + btnExit.BackColor = ColorsTheme.PanelContainerLeft; + + // Child Form + panelForm.BackColor = ColorsTheme.PanelChildForm; + + //SubMenus + panelSubMenuMethods.BackColor = ColorsTheme.PanelSubMenu; + panelSubMenuHelp.BackColor = ColorsTheme.PanelSubMenu; + panelSubMenuTheme.BackColor = ColorsTheme.PanelSubMenu; + + // Buttons Font + btnMethods.ForeColor = ColorsTheme.PrimaryFont; // Methods Button + btnBiseccion.ForeColor = ColorsTheme.PrimaryFont; + btnSecante.ForeColor = ColorsTheme.PrimaryFont; + btnReglaFalsa.ForeColor = ColorsTheme.PrimaryFont; + btnAyuda.ForeColor = ColorsTheme.PrimaryFont; // Help Button + btnGuia.ForeColor = ColorsTheme.PrimaryFont; + btnAbout.ForeColor = ColorsTheme.PrimaryFont; + btnTheme.ForeColor = ColorsTheme.PrimaryFont; // Theme Button + btnBlueTheme.ForeColor = ColorsTheme.PrimaryFont; + btnRedTheme.ForeColor = ColorsTheme.PrimaryFont; + btnGreenTheme.ForeColor = ColorsTheme.PrimaryFont; + btnPurpleTheme.ForeColor = ColorsTheme.PrimaryFont; + btnTags.ForeColor = ColorsTheme.PrimaryFont; // Tags Button + btnExit.ForeColor = ColorsTheme.PrimaryFont; // Exit Button + + hideSubMenu(); + Reset(); + } + + private void btnExit_Click(object sender, EventArgs e) + { + Close(); + } + #endregion + + #region Métodos // Methods private void customizeSubMenus() { panelSubMenuMethods.Visible = false; panelSubMenuHelp.Visible = false; + panelSubMenuTheme.Visible = false; } private void hideSubMenu() @@ -118,6 +324,10 @@ private void hideSubMenu() { panelSubMenuMethods.Visible = false; } + if (panelSubMenuTheme.Visible == true) + { + panelSubMenuTheme.Visible = false; + } } private void showSubMenu(Panel subMenu) @@ -134,7 +344,6 @@ private void showSubMenu(Panel subMenu) } - private Form activeForm = null; private void openChildForm(Form childForm) { if (activeForm != null) @@ -150,5 +359,52 @@ private void openChildForm(Form childForm) childForm.BringToFront(); childForm.Show(); } + + private void activateBtn(object senderBtn) + { + if (senderBtn != null) + { + disableBtn(); + + // Button + currentBtn = (IconButton)senderBtn; + currentBtn.BackColor = ColorsTheme.btnActivated; + currentBtn.ForeColor = ColorsTheme.PrimaryFontSelected; + currentBtn.IconColor = ColorsTheme.PrimaryFontSelected; + //currentBtn.TextAlign = ContentAlignment.MiddleCenter; + //currentBtn.ImageAlign = ContentAlignment.MiddleLeft; + + // Left border button + leftBorderBtn.BackColor = ColorsTheme.leftBorderButton; + leftBorderBtn.Location = new Point(0, currentBtn.Location.Y); + leftBorderBtn.Visible = true; + leftBorderBtn.BringToFront(); + } + } + + private void disableBtn() + { + if (currentBtn != null) + { + currentBtn.BackColor = ColorsTheme.PanelContainerLeft; + currentBtn.ForeColor = ColorsTheme.PrimaryFont; + currentBtn.IconColor = ColorsTheme.PrimaryFont; + //currentBtn.TextAlign = ContentAlignment.MiddleLeft; + //currentBtn.TextImageRelation = TextImageRelation.ImageBeforeText; + //currentBtn.ImageAlign = ContentAlignment.MiddleLeft; + } + } + + private void Reset() + { + if (activeForm != null) + { + activeForm.Close(); + } + disableBtn(); + leftBorderBtn.Visible = false; + } + #endregion } + } diff --git a/rootprox-2022/bin/Debug/rootprox-2022.exe b/rootprox-2022/bin/Debug/rootprox-2022.exe index 77dc102..da57212 100644 Binary files a/rootprox-2022/bin/Debug/rootprox-2022.exe and b/rootprox-2022/bin/Debug/rootprox-2022.exe differ diff --git a/rootprox-2022/bin/Debug/rootprox-2022.pdb b/rootprox-2022/bin/Debug/rootprox-2022.pdb index 523c2e5..46b814d 100644 Binary files a/rootprox-2022/bin/Debug/rootprox-2022.pdb and b/rootprox-2022/bin/Debug/rootprox-2022.pdb differ diff --git a/rootprox-2022/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/rootprox-2022/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 59285aa..a2b15b2 100644 Binary files a/rootprox-2022/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/rootprox-2022/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/rootprox-2022/obj/Debug/rootprox-2022.csproj.CoreCompileInputs.cache b/rootprox-2022/obj/Debug/rootprox-2022.csproj.CoreCompileInputs.cache index 5095ba6..048edfa 100644 --- a/rootprox-2022/obj/Debug/rootprox-2022.csproj.CoreCompileInputs.cache +++ b/rootprox-2022/obj/Debug/rootprox-2022.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -22925b649e46d8d837a60b89e5f0ac7608e0b36c +3938085b078d3a5a90376e02aeb554abe3984860 diff --git a/rootprox-2022/obj/Debug/rootprox-2022.csproj.GenerateResource.cache b/rootprox-2022/obj/Debug/rootprox-2022.csproj.GenerateResource.cache index 1af795a..9e34306 100644 Binary files a/rootprox-2022/obj/Debug/rootprox-2022.csproj.GenerateResource.cache and b/rootprox-2022/obj/Debug/rootprox-2022.csproj.GenerateResource.cache differ diff --git a/rootprox-2022/obj/Debug/rootprox-2022.exe b/rootprox-2022/obj/Debug/rootprox-2022.exe index 77dc102..da57212 100644 Binary files a/rootprox-2022/obj/Debug/rootprox-2022.exe and b/rootprox-2022/obj/Debug/rootprox-2022.exe differ diff --git a/rootprox-2022/obj/Debug/rootprox-2022.pdb b/rootprox-2022/obj/Debug/rootprox-2022.pdb index 523c2e5..46b814d 100644 Binary files a/rootprox-2022/obj/Debug/rootprox-2022.pdb and b/rootprox-2022/obj/Debug/rootprox-2022.pdb differ diff --git a/rootprox-2022/rootprox-2022.csproj b/rootprox-2022/rootprox-2022.csproj index 7da0de3..f516754 100644 --- a/rootprox-2022/rootprox-2022.csproj +++ b/rootprox-2022/rootprox-2022.csproj @@ -55,10 +55,10 @@ - + Form - + ROOTPROX - Bisección.cs @@ -67,27 +67,27 @@ ROOTPROX - Inicio.cs - + Form - + ROOTPROX - Regla Falsa.cs - + Form - + ROOTPROX - Secante.cs - + ROOTPROX - Bisección.cs - + ROOTPROX - Regla Falsa.cs - + ROOTPROX - Secante.cs