当前位置: 首页>>代码示例>>C#>>正文


C# DevExpress.RestoreLayoutFromXml方法代码示例

本文整理汇总了C#中DevExpress.RestoreLayoutFromXml方法的典型用法代码示例。如果您正苦于以下问题:C# DevExpress.RestoreLayoutFromXml方法的具体用法?C# DevExpress.RestoreLayoutFromXml怎么用?C# DevExpress.RestoreLayoutFromXml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DevExpress的用法示例。


在下文中一共展示了DevExpress.RestoreLayoutFromXml方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReStoreLayOut

 public static void ReStoreLayOut(DevExpress.XtraGrid.Views.BandedGrid.AdvBandedGridView ListView)
 {
     if (System.IO.File.Exists(Common.GetSolutionPath(Application.StartupPath) + @"GridLayout\" + Application.ProductName + "." + ListView.GridControl.FindForm ().Name + "." + ListView.GridControl.Name + "." + ListView.Name + ".xml"))
         ListView.RestoreLayoutFromXml(Common.GetSolutionPath(Application.StartupPath) + @"GridLayout\" + Application.ProductName + "." + ListView.GridControl.FindForm ().Name + "." + ListView.GridControl.Name + "." + ListView.Name + ".xml");
 }
开发者ID:xlgwr,项目名称:producting,代码行数:5,代码来源:formlayout.cs

示例2: LoadLayout

            /// <summary>
            ///  Ѱ��(��className+����Form������+"_"+EFDevLayoutControl������)�������ļ�.���ز���..���ݲ���(����ģʽ)ѡ���ӦĿ¼�µ������ļ�.
            /// </summary>
            /// <param name="ConfigModule">����ģʽ,Ĭ��ʱ�Ȳ����û�����,�ٲ�����Ŀ������..</param>
            /// <param name="className">������[����������_+EFDevLayoutControl���Ʋ�������Ψһxml�ļ�������ʱ,�ڿ�ͷ���������</param>
            /// <param name="moduleName">һ��ģ������.��DE,FI��</param>
            public void LoadLayout(DevExpress.XtraLayout.LayoutControl layoutControl, ConfigEnum ConfigModule, string className, string moduleName)
            {
                //ģ������
                string formName = layoutControl.FindForm().Name;
                if (moduleName.Trim().Equals(""))
                {
                    moduleName = formName.Length > 6 ? formName.Substring(4, 2) : formName;
                }
                if (formName.StartsWith("Form"))
                {
                    formName = formName.Substring(4);
                }
                //XML·��
                string fileDirectory = System.Reflection.Assembly.GetExecutingAssembly().Location;
                fileDirectory = Path.GetDirectoryName(fileDirectory);
                string fileDirectoryUser = fileDirectory + "\\..\\UserConfig\\" + "EF.EF_Args.formUserId" + "\\" + moduleName + "\\";
                string fileDirectoryEP = fileDirectory + "\\..\\" + moduleName + "\\";

                //�Ȳ鿴�û�������,Ŀ¼�����ڶ�ȡ��Ŀ����
                //  ---2011-10-27 �� XML�������� ��Ϊ "��������_"+EFDevLayoutControl������+_className.XML
                string fileName = formName + "_" + layoutControl.Name + (className.Trim().Equals("") ? "" : ("_" + className.Trim())) + ".xml";
                //string fileName = className.Trim() + formName + "_" + layoutControl.Name + ".xml";
                string filePath = "";
                if (ConfigModule == ConfigEnum.EPConfig)
                {
                    filePath = fileDirectoryEP + fileName;
                }
                else if (ConfigModule == ConfigEnum.UserConfig)
                {
                    filePath = fileDirectoryUser + fileName;
                }
                else //Ĭ������.�ȶ�ȡ�û�������,���������ȡ��Ŀ������
                {
                    filePath = fileDirectoryUser + fileName;
                    if (!  IsFileExit(ref filePath))//������,���ȡ��Ŀ����
                    {
                        filePath = fileDirectoryEP + fileName;
                    }
                }

                if   (IsFileExit(ref filePath))    // (System.IO.File.Exists(filePath))  //����,���ȡ
                {

                    //string EPConfigXML = fileDirectoryEP + fileName; //��Ŀ������xml
                    //��Ŀ������xml ������ھ��鷳��---������,��ֱ�Ӷ�ȡ�����ļ�
                    //---�ȼ�����Ŀ������,�Ѳ��ɼ�����,����Ϊ��������
                    //---������û������� "�ټ����û�������",�����˳�
                    //---�ٰѲ�����������Ϊ���ɼ�
                    //if (System.IO.File.Exists(EPConfigXML))
                    //{
                    //    layoutControl.RestoreLayoutFromXml(EPConfigXML);
                    //    if (view is DevExpress.XtraGrid.Views.Grid.GridView)
                    //    {
                    //        foreach (DevExpress.XtraGrid.Columns.GridColumn gridCol in ((DevExpress.XtraGrid.Views.Grid.GridView)view).Columns)
                    //        {
                    //            gridCol.OptionsColumn.ShowInCustomizationForm = gridCol.Visible;
                    //        }
                    //    }
                    //    //Ȼ������û�������
                    //    if (filePath.Equals(EPConfigXML))
                    //    {
                    //        break;
                    //    }
                    //    view.RestoreLayoutFromXml(filePath);
                    //    //Ȼ���ٴμ��,����Ŀ�����ɼ���,Ҳ��Ϊ���ɼ�
                    //    if (view is DevExpress.XtraGrid.Views.Grid.GridView)
                    //    {
                    //        foreach (DevExpress.XtraGrid.Columns.GridColumn gridCol in ((DevExpress.XtraGrid.Views.Grid.GridView)view).Columns)
                    //        {
                    //            gridCol.Visible = gridCol.OptionsColumn.ShowInCustomizationForm;
                    //        }
                    //    }
                    //}
                    //else
                    //{
                    //    view.RestoreLayoutFromXml(filePath);
                    //}
                    layoutControl.RestoreLayoutFromXml(filePath);
                   // return true;
                }
                else
                {
                   // return false;
                }
            }
开发者ID:sunpander,项目名称:VSDT,代码行数:91,代码来源:Utility.cs

示例3: xuat_excel

        /// <summary>
        /// hàm này cho phép xuất excel và lưu dữ liệu trong Release
        /// </summary>
        /// <param name="v_grv"> tên của gridview</param>
        /// <param name="name"> tên file mà bạn muốn xuất ra</param>
        public static void xuat_excel(DevExpress.XtraGrid.Views.Grid.GridView v_grv, string name)
        {
            name =name+ ".xls";
            v_grv.SaveLayoutToXml("tempLayout.xml");
            foreach (DevExpress.XtraGrid.Columns.GridColumn col in v_grv.Columns)
            {
                col.Visible = true;
            }
            v_grv.ExportToXls(name);

            v_grv.RestoreLayoutFromXml("tempLayout.xml");
        }
开发者ID:DaoManhTuan,项目名称:DoAn1,代码行数:17,代码来源:User.cs


注:本文中的DevExpress.RestoreLayoutFromXml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。