public void LoadToolBar() { //toolbarbld = new ToolBarBuilder(frm, ToolBar); string strFilePath = ""; string strClsName = this.ToString(); string[] strArr = strClsName.Split('.'); string strFolderName = ""; string strFileName = ""; if (strArr.Length >= 3) { strFolderName = strArr[strArr.Length - 2]; strFileName = strArr[strArr.Length - 1]; } strFilePath = string.Format("{0}\\{1}\\frm_{1}_{2}_{3}.xml", "", frm.strModule, frm.strScreen, frm.strTarget); XmlDocument xmldoc = GlobalShare.GetXmlFile(strFilePath); if (xmldoc == null) { throw new Exception(string.Format("can't load xml file {0}!", strFilePath)); } string tbdir = XmlUtil.GetSubNodeText(xmldoc.SelectSingleNode("root"), "@RightToLeft"); toolbarbld.InitToolBar(tbdir == "1"); /* * this.toolStrip1.Items.Clear(); * string tbdir = XmlUtil.GetSubNodeText(xmldoc.SelectSingleNode("root"), "@RightToLeft"); * if (tbdir == "1") * { * this.toolStrip1.RightToLeft = RightToLeft.Yes; * }*/ AddComboInToolBar(xmldoc); AddButtonInToolBar(xmldoc); AddSimpleSearchInToolBar(xmldoc); }
public XmlDocument GetConfigXml(string flag) { string strFilePath = string.Format("{0}\\{1}\\{4}_{1}_{2}_{3}.xml", "", strModule, strScreen, strTarget, flag); return(GlobalShare.UpdateWithUseInfo(GlobalShare.GetXmlFile(strFilePath), strUid) as XmlDocument); }