Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Fix a lot of bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yh200212121212 committed Sep 24, 2017
1 parent e12605a commit 83b1692
Show file tree
Hide file tree
Showing 218 changed files with 11,918 additions and 1,179 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
/.vs/KindleHelper/v15/Browse.VC.opendb
KindleHelper.v12.suo
KindleHelper.sdf
KindleHelper.opensdf
/ipch/kindlehelper.plugin.cppplugin-34f75514
/packages/
/Publish Version/
/setup/Publish Version
3 changes: 2 additions & 1 deletion AppConfigWriteLibrary/AppConfigWriteLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Helper.cs" />
<Compile Include="IHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,23 @@
using System.Configuration;
namespace AppConfigWriteLibrary
{
public class Class1
public class Helper : IHelper
{
/// <summary>
/// 读取配置文件
/// </summary>
/// <param name="key">键</param>
/// <returns></returns>
public string ReadConfig(string key)
{
return ConfigurationManager.AppSettings[key];
}
//第一个参数是xml文件中的add节点的value,第二个参数是add节点的key
public void SaveConfig(string ConnenctionString, string strKey)
/// <summary>
/// 保存配置文件
/// </summary>
/// <param name="Key">节点的键</param>
/// <param name="Value">节点的值</param>
public void SaveConfig(string Key, string Value)
{
XmlDocument doc = new XmlDocument();
//获得配置文件的全路径
Expand All @@ -28,11 +37,11 @@ public void SaveConfig(string ConnenctionString, string strKey)
//获得将当前元素的key属性
XmlAttribute att = nodes[i].Attributes["key"];
//根据元素的第一个属性来判断当前的元素是不是目标元素
if (att.Value == strKey)
if (att.Value == Key)
{
//对目标元素中的第二个属性赋值
att = nodes[i].Attributes["value"];
att.Value = ConnenctionString;
att.Value = Value;
break;
}
}
Expand Down
9 changes: 9 additions & 0 deletions AppConfigWriteLibrary/IHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;
namespace AppConfigWriteLibrary
{
interface IHelper
{
string ReadConfig(string key);
void SaveConfig(string Key, string Value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
D:\$代码\KindleHelper-master\KindleHelper-master\Publish Version\AppConfigWriteLibrary.dll
D:\$代码\KindleHelper-master\KindleHelper-master\Publish Version\AppConfigWriteLibrary.pdb
D:\$代码\KindleHelper-master\KindleHelper-master\AppConfigWriteLibrary\obj\Debug\AppConfigWriteLibrary.dll
D:\$代码\KindleHelper-master\KindleHelper-master\AppConfigWriteLibrary\obj\Debug\AppConfigWriteLibrary.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
80 changes: 0 additions & 80 deletions ClassLibrary1/Class1.cs

This file was deleted.

70 changes: 0 additions & 70 deletions ClassLibrary1/ClassLibrary1.csproj

This file was deleted.

36 changes: 0 additions & 36 deletions ClassLibrary1/Properties/AssemblyInfo.cs

This file was deleted.

Binary file removed ClassLibrary1/snk.snk
Binary file not shown.
24 changes: 0 additions & 24 deletions Epub/Tester/Program.cs

This file was deleted.

36 changes: 0 additions & 36 deletions Epub/Tester/Properties/AssemblyInfo.cs

This file was deleted.

Loading

0 comments on commit 83b1692

Please sign in to comment.