Skip to content

Commit

Permalink
Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Dec 14, 2024
1 parent ee0f758 commit 53c3243
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 9 deletions.
8 changes: 6 additions & 2 deletions demo/ReaLTaiizor.UI/ReaLTaiizor.UI/Form22.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ namespace ReaLTaiizor.UI
{
public partial class Form22 : Form
{
public Form22()
public Form22(bool State = false)
{
InitializeComponent();
parrotSplashScreen1.InitializeLoader(this);

if (!State)
{
parrotSplashScreen1.InitializeLoader(this);
}
}

private void ParrotColorPicker1_SelectedColorChanged(object sender, EventArgs e)
Expand Down
86 changes: 86 additions & 0 deletions demo/ReaLTaiizor.UI/ReaLTaiizor.UI/Forms/FormManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
using ReaLTaiizor.Controls;
using ReaLTaiizor.UI.Helpers;
using System;
using System.Drawing;
using System.Windows.Forms;
using Panel = ReaLTaiizor.Controls.Panel;

namespace ReaLTaiizor.UI.Forms
{
public partial class FormManager : Form
{
public FormManager()
{
InitializeComponent();

MaximizeBox = false;
Text = "Form Manager";
Size = new Size(616, 520);
BackColor = Color.FromArgb(42, 42, 42);
FormBorderStyle = FormBorderStyle.FixedSingle;
StartPosition = FormStartPosition.CenterScreen;

Panel buttonPanel = new()
{
AutoScroll = false,
Dock = DockStyle.Fill,
Padding = new Padding(0)
};

FlowLayoutPanel flowLayout = new()
{
AutoScroll = false,
WrapContents = true,
Dock = DockStyle.Fill,
Padding = new Padding(0)
};

string[] formNames = {
"Air", "Dungeon", "Dream", "Ribbon",
"Space", "Thunder", "Sky", "Moon",
"Alone", "Fox", "Forever", "Hope",
"Lost", "Royal", "Material", "Night",
"Metro", "Poison", "Crown", "Parrot",
"Cyber", "Form1", "Form2"
};

for (int i = 0; i < formNames.Length; i++)
{
ForeverButton btn = new()
{
Tag = formNames[i],
Text = formNames[i],
TextColor = Color.White,
Margin = new Padding(10),
Size = new Size(180, 40),
BaseColor = Color.FromArgb(60, 60, 60)
};

btn.Click += Button_Click;
flowLayout.Controls.Add(btn);
}

buttonPanel.Controls.Add(flowLayout);
Controls.Add(buttonPanel);
}

private void Button_Click(object sender, EventArgs e)
{
if (sender is ForeverButton btn)
{
Form newForm = FormHelper.Open(new[] { btn.Tag.ToString(), "Manager" });
newForm.ShowDialog();
}
}

private void InitializeComponent()
{
this.SuspendLayout();
this.Name = "FormManager";
this.ClientSize = new Size(800, 600);
this.AutoScaleMode = AutoScaleMode.Font;
this.AutoScaleDimensions = new SizeF(7F, 15F);
this.ResumeLayout(false);
}
}
}
7 changes: 4 additions & 3 deletions demo/ReaLTaiizor.UI/ReaLTaiizor.UI/Helpers/FormHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
using ReaLTaiizor.UI.Forms;
using System.Linq;
using System.Windows.Forms;

namespace ReaLTaiizor.UI.Helpers
Expand Down Expand Up @@ -30,9 +31,9 @@ public static Form Open(string[] Arg)
"19" or "form19" or "metro" => new Form19(),
"20" or "form20" or "poison" => new Form20(),
"21" or "form21" or "crown" => new Form21(),
"22" or "form22" or "parrot" => new Form22(),
"22" or "form22" or "parrot" => new Form22(Arg.Count() > 1),
"23" or "form23" or "cyber" => new Form23(),
_ => new Form17(),
_ => new FormManager(),
};
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/ReaLTaiizor/Controls/ControlBox/DungeonControlBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ namespace ReaLTaiizor.Controls

public class DungeonControlBox : Control
{

#region Enums

public enum MouseState
Expand All @@ -24,6 +23,7 @@ public enum MouseState
}

#endregion

#region MouseStates
private MouseState State = MouseState.None;
private int X;
Expand Down Expand Up @@ -103,6 +103,7 @@ protected override void OnMouseMove(MouseEventArgs e)
Invalidate();
}
#endregion

#region Properties

private bool _DefaultLocation = true;
Expand Down
2 changes: 1 addition & 1 deletion src/ReaLTaiizor/Controls/ControlBox/NightControlBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ protected override void OnMouseUp(MouseEventArgs e)

if (hover_close & e.Button == MouseButtons.Left)
{
Application.Exit();
pf.Close();
}
}

Expand Down
1 change: 0 additions & 1 deletion src/ReaLTaiizor/Controls/ControlBox/ThunderControlBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace ReaLTaiizor.Controls

public class ThunderControlBox : Control
{

#region Properties

private bool _DefaultLocation = true;
Expand Down
2 changes: 1 addition & 1 deletion src/ReaLTaiizor/ReaLTaiizor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// Creator: Taiizor
// Website: www.vegalya.com
// Created: 15.May.2019
// Changed: 13.Dec.2024
// Changed: 14.Dec.2024
// Version: 3.8.1.2
//
// |---------DO-NOT-REMOVE---------|
Expand Down

0 comments on commit 53c3243

Please sign in to comment.