using Sunny.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
class FormEx
{
public static void ShowSubForm(Control fatherForm, UIForm subForm)
{
if (subForm == null || fatherForm == null)
{
return;
}
if (fatherForm.Controls.Count > 0)
{
foreach (var f in fatherForm.Controls)
{
if (f is Form form)
{
form.Close();
}
}
fatherForm.Controls.Clear();
}
//subForm.Dock = DockStyle.Fill;
subForm.Location=new System.Drawing.Point(0,0);
subForm.Size = fatherForm.ClientSize;
subForm.ShowTitle = false;
subForm.TopLevel = false;
subForm.AutoSize = false;
fatherForm.SuspendLayout();
fatherForm.Controls.Add(subForm);
fatherForm.ResumeLayout();
subForm.Show();
}
public static void SetButtonSelected(object sender)
{
//if (((UISymbolButton)sender).Selected)
// return;
((UISymbolButton)sender).Selected = true;
}
///