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

Commit

Permalink
更新至4.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Xin committed Oct 21, 2019
0 parents commit 29c4752
Show file tree
Hide file tree
Showing 140 changed files with 37,604 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vs
*.rar
*.zip
.Debug
4 changes: 4 additions & 0 deletions .gitignore.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vs
*.rar
*.zip
Debug
25 changes: 25 additions & 0 deletions HappyReading.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.572
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HappyReading", "HappyReading\HappyReading.csproj", "{A7AAEB8A-9CDA-485D-88A5-15208889EDDA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A7AAEB8A-9CDA-485D-88A5-15208889EDDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7AAEB8A-9CDA-485D-88A5-15208889EDDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7AAEB8A-9CDA-485D-88A5-15208889EDDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7AAEB8A-9CDA-485D-88A5-15208889EDDA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D93B108A-14B4-439B-9FF3-83E11E3D2ED4}
EndGlobalSection
EndGlobal
13 changes: 13 additions & 0 deletions HappyReading/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SourceStation" value="追书网"/>
<add key="Typeface" value="宋体"/>
<add key="Theme" value="护眼模式"/>
<add key="FontSize" value="23"/>
<add key="FattenNumber" value="50"/>
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
22 changes: 22 additions & 0 deletions HappyReading/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Application x:Class="HappyReading.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:HappyReading"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<!-- Accent and AppTheme setting -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedTabControl.xaml" />

</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions HappyReading/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace HappyReading
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
}
}
42 changes: 42 additions & 0 deletions HappyReading/BLL/ConfigReadWrite.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using HappyReading.DAL;
using HappyReading.Model;
using System;

namespace HappyReading.BLL
{
/// <summary>
/// 配置读写
/// </summary>
class ConfigReadWrite
{

/// <summary>
/// 写入配置
/// </summary>
/// <param name="config"></param>
public static void SetConfig(Config config)
{
ConfigHelper.SetConfig("Theme", config.Theme);
ConfigHelper.SetConfig("FontSize", config.FontSize.ToString());
ConfigHelper.SetConfig("Typeface", config.Typeface);
ConfigHelper.SetConfig("SourceStation", config.SourceStation);
ConfigHelper.SetConfig("FattenNumber", config.FattenNumber.ToString());
ConfigHelper.SetConfig("Width_height", config.Width_height);
}

/// <summary>
/// 读取配置
/// </summary>
public static Config GetConfig()
{
Config config = new Config();
config.FontSize = Convert.ToInt32(ConfigHelper.GetConfig("FontSize"));
config.Typeface = ConfigHelper.GetConfig("Typeface");
config.Theme = ConfigHelper.GetConfig("Theme");
config.SourceStation= ConfigHelper.GetConfig("SourceStation");
config.FattenNumber = Convert.ToInt32(ConfigHelper.GetConfig("FattenNumber"));
config.Width_height = ConfigHelper.GetConfig("Width_height");
return config;
}
}
}

0 comments on commit 29c4752

Please sign in to comment.