2024-03-22 17:03:01 +08:00
|
|
|
|
using CDSAE3_Lian_Lian_Kan.Forms;
|
2024-04-18 08:38:59 +08:00
|
|
|
|
using CDSAE3_Lian_Lian_Kan.Properties;
|
|
|
|
|
using System.Text.Json;
|
|
|
|
|
using System.Text.Encodings.Web;
|
|
|
|
|
using System.Text.Unicode;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using CDSAE3_Lian_Lian_Kan.Forms.Interface;
|
2024-03-22 17:03:01 +08:00
|
|
|
|
|
2024-04-18 08:38:59 +08:00
|
|
|
|
namespace CDSAE3_Lian_Lian_Kan.Forms
|
2024-03-22 17:03:01 +08:00
|
|
|
|
{
|
|
|
|
|
public partial class LianLianKan : Form
|
|
|
|
|
{
|
|
|
|
|
public LianLianKan()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2024-04-18 08:38:59 +08:00
|
|
|
|
Etcs.hunderd_millsecond_timer.Elapsed += StartFunc;
|
2024-04-02 21:57:04 +08:00
|
|
|
|
Etcs.form = this;
|
2024-03-22 17:03:01 +08:00
|
|
|
|
}
|
2024-04-18 08:38:59 +08:00
|
|
|
|
private void StartFunc(object? Sender, EventArgs e)
|
2024-03-22 17:03:01 +08:00
|
|
|
|
{
|
2024-04-18 08:38:59 +08:00
|
|
|
|
Etcs.hunderd_millsecond_timer.Elapsed -= StartFunc;
|
|
|
|
|
Form? menuForm = null;
|
|
|
|
|
Invoke(() => menuForm = new Leisure_Mode_MenuForm());
|
|
|
|
|
Invoke(() => change_form(menuForm!, false, null, null, false, null));
|
|
|
|
|
}
|
|
|
|
|
public async Task change_form(Form newForm, bool doAnimation, Color? begin, Color? end, bool haveImage, Image? image)
|
|
|
|
|
{
|
|
|
|
|
if (doAnimation)
|
|
|
|
|
{
|
|
|
|
|
bufferForm.SetEffect(begin!.Value, end!.Value, haveImage, image);
|
|
|
|
|
bufferForm.BringToFront();
|
|
|
|
|
bufferForm.Visible = true;
|
|
|
|
|
}
|
2024-03-22 17:03:01 +08:00
|
|
|
|
MainPanel.Controls.Clear();
|
2024-04-18 08:38:59 +08:00
|
|
|
|
newForm.TopLevel = false;
|
|
|
|
|
newForm.Dock = DockStyle.Fill;
|
|
|
|
|
(newForm as IThemeChangeable)?.SetTheme();
|
|
|
|
|
MainPanel.Controls.Add(newForm);
|
|
|
|
|
BeginInvoke(() => newForm.Show());
|
|
|
|
|
MainPanel.SendToBack();
|
|
|
|
|
if (doAnimation)
|
|
|
|
|
{
|
|
|
|
|
await bufferForm.EffectAsync();
|
|
|
|
|
bufferForm.Visible = false;
|
|
|
|
|
}
|
2024-04-02 21:57:04 +08:00
|
|
|
|
GC.Collect();
|
2024-03-22 17:03:01 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|