问题描述
<?xmlversion="1.0"encoding="utf-8"?><configuration><configSections><sectionGroupname="userSettings"type="System.Configuration.UserSettingsGroup,System,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"><sectionname="Microsoft.Samples.Windows.Forms.ClientSettings.Settings"type="System.Configuration.ClientSettingsSection,System,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"allowExeDefinition="MachineToLocalUser"/></sectionGroup><sectionGroupname="pps"type="System.Configuration.ppsGroup,System,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"><sectionname="Microsoft.Samples.Windows.Forms.ClientSettings.Settings"type="System.Configuration.ClientSettingsSection,System,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"allowExeDefinition="MachineToLocalUser"/></sectionGroup></configSections>><system.diagnostics><sources><!--ThissectiondefinestheloggingconfigurationforMy.Application.Log--><sourcename="DefaultSource"switchName="DefaultSwitch"><listeners><addname="FileLog"/><!--UncommentthebelowsectiontowritetotheApplicationEventLog--><!--<addname="EventLog"/>--></listeners></source></sources><switches><addname="DefaultSwitch"value="Information"/></switches><sharedListeners><addname="FileLog"type="Microsoft.VisualBasic.Logging.FileLogTraceListener,Microsoft.VisualBasic,Version=8.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a,processorArchitecture=MSIL"initializeData="FileLogWriter"/><!--UncommentthebelowsectionandreplaceAPPLICATION_NAMEwiththenameofyourapplicationtowritetotheApplicationEventLog--><!--<addname="EventLog"type="System.Diagnostics.EventLogTraceListener"initializeData="APPLICATION_NAME"/>--></sharedListeners></system.diagnostics><userSettings><Microsoft.Samples.Windows.Forms.ClientSettings.Settings><settingname="DetectURLsSetting"serializeAs="String"><value>True</value></setting><settingname="WordWrapSetting"serializeAs="String"><value>True</value></setting></Microsoft.Samples.Windows.Forms.ClientSettings.Settings></userSettings><pps><Microsoft.Samples.Windows.Forms.ClientSettings.Settings><pp><settingname="username"serializeas="string"><value>true</value></setting><settingpassowrd="123"></setting></pp></Microsoft.Samples.Windows.Forms.ClientSettings.Settings></pps></configuration>红色部分一半是我模仿着写的那些代码也太难了吧,是不是有什么参考文件,其次关于appconfig的写法和用途介绍,最后关于上面我写的部分怎么用mysettings引用不到pp部分的设置?
解决方案
解决方案二:
另外我看了一下参考程序保存设置后并没有修改appconfig的内容怎么回事呢?