using DevExpress.XtraBars;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
namespace formMaster
{
public partial class FluentDesignForm3 : DevExpress.XtraBars.FluentDesignSystem.FluentDesignForm
{
public FluentDesignForm3()
{
InitializeComponent();
}
public static void OpenFormByName(string name)
{
var ins = Assembly.GetExecutingAssembly().GetTypes().FirstOrDefault(x => x.Name == name);
if (ins != null)
{
var frm = Activator.CreateInstance(ins) as Form;
if (Application.OpenForms[frm.Name] != null)
{
frm = Application.OpenForms[frm.Name];
}
else
{
frm.Show();
}
frm.BringToFront();
// frm.SendToBack();
// frm.ShowDialog();
}
}
private void accordionControl1_ElementClick(object sender, DevExpress.XtraBars.Navigation.ElementClickEventArgs e)
{
//MessageBox.Show(e.Element.Name);
var tag = e.Element.Name as string;
if (tag != string.Empty)
{
OpenFormByName(tag);
}
}
private void group3_Click(object sender, EventArgs e)
{
}
private void FluentDesignForm3_Click(object sender, EventArgs e)
{
this.SendToBack();
}
private void FluentDesignForm3_MouseClick(object sender, MouseEventArgs e)
{
this.SendToBack();
}
private void fluentDesignFormContainer1_Click(object sender, EventArgs e)
{
}
private void group2_Click(object sender, EventArgs e)
{
}
}
}