zoukankan      html  css  js  c++  java
  • devgridContral

      #region 加载gridControl布局项
            /// <summary>
            /// 加载gridControl布局项
            /// </summary>
            private void LoadLayoutFile()
            {
                string strLayOutFilePath = GdkyConstant.RootDirectory + "config\Layout\conInstLayout.xml";
                if (File.Exists(strLayOutFilePath))
                {
                    grdConData.ForceInitialize();
                    OptionsLayoutBase optionLayout = new OptionsLayoutBase();
                    grdConData.MainView.RestoreLayoutFromXml(strLayOutFilePath, optionLayout);
                }
            }

       #region 保存gridControl布局项
            /// <summary>
            /// 保存gridControl布局项
            /// </summary>
            private void SaveLayoutFile()
            {
                string strLayOutTmp = GdkyConstant.RootDirectory + "config\Layout";
                if (!Directory.Exists(strLayOutTmp))
                {
                    Directory.CreateDirectory(strLayOutTmp);
                }
                string strLayOutFilePath = string.Format("{0}\{1}.xml", strLayOutTmp, "conInstLayout");
                OptionsLayoutBase optionLayout = new OptionsLayoutBase();
                grdConData.MainView.SaveLayoutToXml(strLayOutFilePath, optionLayout);
            }
            #endregion

               

               /////----获取配置文件

               string strLayOutTmp =Environment.CurrentDirectory+ "config\Layout";
                if (!File.Exists(strLayOutTmp))
                {
                    Directory.CreateDirectory(strLayOutTmp);
                }
                string strLayOutFilePath = string.Format("{0}\{1}.xml", strLayOutTmp, "MsInstLayout");
            

                DataTable dt = new DataTable();
                dt = this.testDataSet1.Table_1;
                if (dt.Rows.Count > 0)
                {
                string xmlContent=dt.Rows[0][0].ToString();
                CreatXmlToSave(xmlContent, strLayOutFilePath);
                }

                ////---

  • 相关阅读:
    子类构造函数是否会默认调用父类的无参构造函数
    使用多线程
    进程和多线程的概念及线程的优点
    Java API文档
    InputStream
    【颗粒归仓】--Zookeeper基本概念
    【颗粒归仓】--Struts2
    【颗粒归仓】--spring IoC容器
    【颗粒归仓】--Java泛型
    【多线程】--线程同步
  • 原文地址:https://www.cnblogs.com/lvlaozf/p/8880446.html
Copyright © 2011-2022 走看看