// return: // -1 出错 // 0 配置文件不存在 // 1 成功 public int Initial(string strCfgFilename, StopManager stopManager, out string strError) { strError = ""; this.dom = new XmlDocument(); try { this.dom.Load(strCfgFilename); this.CfgFilename = strCfgFilename; } catch (FileNotFoundException /*ex*/) { strError = "配置文件 '" + strCfgFilename + "' 不存在"; this.dom.LoadXml("<root />"); // 便于后面建立新内容 this.CfgFilename = strCfgFilename; return(0); } catch (Exception ex) { strError = "配置文件 '" + strCfgFilename + "' 装载到XMLDOM时出错: " + ex.Message; return(-1); } this.stopManager = stopManager; return(1); }
public void Initial(ServerCollection servers, RmsChannelCollection channels, DigitalPlatform.StopManager stopManager, string serverUrl, string strCfgFilePath) { this.Servers = servers; this.Channels = channels; this.stopManager = stopManager; this.ServerUrl = serverUrl; this.Path = strCfgFilePath; // this.textBox_path.Text = this.ServerUrl + "?" + this.Path; }
public void Initial(ServerCollection servers, RmsChannelCollection channels, DigitalPlatform.StopManager stopManager, string serverUrl, string strDatabaseObject) { this.Servers = servers; this.Channels = channels; this.stopManager = stopManager; this.ServerUrl = serverUrl; this.textBox_databaseObject.Text = strDatabaseObject; }
public int Initial(ServerCollection servers, RmsChannelCollection channels, DigitalPlatform.StopManager stopManager, string serverUrl, out string strError) { this.Servers = servers; this.Channels = channels; this.stopManager = stopManager; this.ServerUrl = serverUrl; strError = ""; int nRet = Fill(this.Lang, out strError); if (nRet == -1) { return(-1); } return(0); }
// 初始化 // parameters: // userRightsDom 用户记录的dom对象。将直接引用这个对象 public void Initial(ServerCollection servers, RmsChannelCollection channels, DigitalPlatform.StopManager stopManager, string serverUrl, XmlDocument UserRightsDom) { this.Servers = servers; this.Channels = channels; this.stopManager = stopManager; this.ServerUrl = serverUrl; this.UserRightsDom = UserRightsDom; // 直接引用外界的dom对象 // 用服务器端获得的信息填充树 Cursor save = this.Cursor; this.Cursor = Cursors.WaitCursor; FillAll(null); InitialRightsParam(); this.Cursor = save; this.m_bChanged = false; }
public int Initial(ServerCollection servers, RmsChannelCollection channels, DigitalPlatform.StopManager stopManager, string serverUrl, out string strError) { this.Servers = servers; this.Channels = channels; this.stopManager = stopManager; this.ServerUrl = serverUrl; strError = ""; int nRet = Fill(this.Lang, out strError); if (nRet == -1) return -1; return 0; }
// return: // -1 出错 // 0 配置文件不存在 // 1 成功 public int Initial(string strCfgFilename, StopManager stopManager, out string strError) { strError = ""; this.dom = new XmlDocument(); try { this.dom.Load(strCfgFilename); this.CfgFilename = strCfgFilename; } catch (FileNotFoundException /*ex*/) { strError = "配置文件 '" + strCfgFilename + "' 不存在"; this.dom.LoadXml("<root />"); // 便于后面建立新内容 this.CfgFilename = strCfgFilename; return 0; } catch (Exception ex) { strError = "配置文件 '" + strCfgFilename + "' 装载到XMLDOM时出错: " + ex.Message; return -1; } this.stopManager = stopManager; return 1; }
public void Initial(ServerCollection servers, RmsChannelCollection channels, DigitalPlatform.StopManager stopManager, string serverUrl, string strDbName) { this.Servers = servers; this.Channels = channels; this.stopManager = stopManager; this.ServerUrl = serverUrl; this.DbName = strDbName; if (this.DbName != "") { // 获得数据库Style string strError = ""; this.DbStyle = this.GetDbStyle( this.DbName, out strError); if (this.DbStyle == -1) throw new Exception(strError); // 用服务器端获得的信息填充树 Cursor save = this.Cursor; this.Cursor = Cursors.WaitCursor; FillAll(null); this.Cursor = save; } }