using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraLayout;
using WinformGeneralDeveloperFrame;
using WinformGeneralDeveloperFrame.Commons;

namespace WinformGeneralDeveloperFrame
{
    public partial class XtraForm1 : FrmBaseForm
    {
        public XtraForm1()
        {
            InitializeComponent();
        }

        private void xtraTabControl1_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e)
        {

        }

        private void grdListView_DoubleClick(object sender, EventArgs e)
        {

        }

        private void XtraForm1_Load(object sender, EventArgs e)
        {
            //using (var db =new Model1())
            //{
            //    grdList.DataSource = db.T_ACL_Menu.ToList();
            //    treeListLookUpEdit1.Properties.DataSource = GetDataTableUtils.SqlTable("");
            //    lookUpEdit1.Properties.DataSource = db.T_ACL_Menu.Select(p => new {p.Name, p.ID}).ToList();
            //    repositoryItemTreeListLookUpEdit1TreeList.DataSource = db.T_ACL_Menu.Select(p => new { p.Name, p.ID, p.PID }).ToList();
            //    repositoryItemTreeListLookUpEdit1.DataSource= db.T_ACL_Menu.Select(p => new { p.Name, p.ID, p.PID }).ToList();
            //    repositoryItemLookUpEdit1.DataSource= db.T_ACL_Menu.Select(p => new { p.Name, p.ID }).ToList();
            //    repositoryItemSearchLookUpEdit1.DataSource=db.T_ACL_Menu.Select(p => new { p.Name, p.ID }).ToList();
            //    searchLookUpEdit1.Properties.DataSource= db.T_ACL_Menu.Select(p => new { p.Name, p.ID }).ToList();
            //    checkedComboBoxEdit1.EditValue = "新增,复核";
            //    checkedComboBoxEdit1.Properties.DataSource= GetDataTableUtils.SqlTable("菜单tree");
            //    //comboBoxEdit1.Properties.Items.Add(db.T_ACL_Menu.Select(p => new { p.Name }).ToList());
            //    foreach (DataRow info in GetDataTableUtils.SqlTable("菜单tree").Rows)
            //    {
            //        comboBoxEdit1.Properties.Items.Add(info.ItemArray[2].ToString());
            //    }
            //}
            //InitFrom(xtraTabControl1,grdList,grdListView,new LayoutControlGroup[]{Root},ne);
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            var con=ExtensionMethod.getControl(this, "checkedComboBoxEdit1");
        }

        public override  bool CheckInput()
        {
            return true;
        }
    }
}