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读取文件并获得文件编码,转换为指定编码的工具类代码
    OpenStreetMap地图数据介绍(转)
    字符串匹配的KMP算法(转)
    Dijkstra算法求最短路径(java)(转)
    用java解析在OpenStreetMap上下载的地图数据(SAX版,适合比较大的xml文件)
    用java解析在OpenStreetMap上下载的地图数据
    加载依赖的jar包在命令行编译和运行java文件
    CentOS 加载/挂载 U盘 (转)
    MongoDB:如何正常关闭服务(转)
    JTS(Geometry)(转)
  • 原文地址:https://www.cnblogs.com/lvlaozf/p/8880446.html
Copyright © 2011-2022 走看看