/// <summary> /// 保存する /// </summary> public void Save() { Configuration appConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); appConfig.AppSettings.Settings["DebugRectEnabled"].Value = DebugRectEnabled ? "1" : "0"; appConfig.AppSettings.Settings["SimilarityThreshold"].Value = SimilarityThreshold.ToString(); appConfig.AppSettings.Settings["CaptureRect"].Value = RectToSaveString(CaptureRect); appConfig.AppSettings.Settings["RecordId"].Value = RecordId.ToString(); appConfig.AppSettings.Settings["RecordDate"].Value = RecordDate; appConfig.AppSettings.Settings["PlayerName1"].Value = PlayerName1; appConfig.AppSettings.Settings["PlayerName2"].Value = PlayerName2; appConfig.AppSettings.Settings["TargetField"].Value = TargetField; appConfig.AppSettings.Settings["CaptureStepNum"].Value = CaptureStepNum.ToString(); appConfig.AppSettings.Settings["CaptureOnlyTsumo"].Value = CaptureOnlyTsumo ? "1" : "0"; appConfig.AppSettings.Settings["SaveFile"].Value = SaveFile; appConfig.AppSettings.Settings["RecordTemplate"].Value = RecordTemplate; appConfig.Save(); }
public void WriteXml(XmlWriter w) { w.WriteElementString("SimilarityThreshold", SimilarityThreshold.ToString(CultureInfo.InvariantCulture)); w.WriteElementString("TemplateUpdateThreshold", TemplateUpdateThreshold.ToString(CultureInfo.InvariantCulture)); w.WriteStartElement("SearchWindow"); w.WriteAttributeString("unit", SearchWindowUnit.ToString()); w.WriteString(XmlHelper.WriteSize(SearchWindow)); w.WriteEndElement(); w.WriteStartElement("BlockWindow"); w.WriteAttributeString("unit", BlockWindowUnit.ToString()); w.WriteString(XmlHelper.WriteSize(BlockWindow)); w.WriteEndElement(); w.WriteElementString("RefinementNeighborhood", RefinementNeighborhood.ToString(CultureInfo.InvariantCulture)); w.WriteElementString("ResetOnMove", XmlHelper.WriteBoolean(ResetOnMove)); }