public bool Read() { bool successfule = true; XmlDocument xDoc = new XmlDocument(); try { xDoc.Load(this.setteiFileName); XmlElement xKifunarabe = xDoc.DocumentElement; this.setteiFileVer = xKifunarabe.GetAttribute("setteiFileVer"); XmlNodeList xShogiEngineNodeList = xKifunarabe.GetElementsByTagName("shogiEngine"); foreach (XmlNode xShogiEngineNode in xShogiEngineNodeList) { XmlElement xShogiEngine = (XmlElement)xShogiEngineNode; this.shogiEngineName = xShogiEngine.GetAttribute("name"); this.shogiEngineFilePath = xShogiEngine.GetAttribute("file"); break; } } catch (Exception ex) { // エラー successfule = false; Util_Message.Whisper(ex.GetType().Name + " " + ex.Message); } return(successfule); }
public void DebugWrite() { StringBuilder sb = new StringBuilder(); sb.AppendLine("設定ファイル : " + this.SetteiFileName); sb.AppendLine("設定ファイルVer : " + this.SetteiFileVer); sb.AppendLine("将棋エンジン : " + this.ShogiEngineName); sb.AppendLine("将棋エンジン・ファイル: " + this.ShogiEngineFilePath); sb.AppendLine(); sb.AppendLine(); sb.AppendLine(); sb.AppendLine(); Util_Message.Whisper(sb.ToString()); }