同步提交

This commit is contained in:
iFish 2014-05-05 19:34:47 +08:00
parent c17ee774a9
commit 33207cb5dd
24 changed files with 2104 additions and 1347 deletions

63
.gitattributes vendored Normal file
View File

@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

137
.gitignore vendored
View File

@ -1,68 +1,69 @@
_项目发布_/
_DB_/
Packages/
_bin.*
*.bin
bin
obj
*.user
*.suo
*.lnk
*.rar
*ReSharper*
*Example*
Doc
desktop.ini
bin.*/
*.sdf
*.vs10x
Sample Projects/
.idea
ipch/
.vs10x
*.aux
*.dvi
*.log
*.ps
*.sdf
*.opensdf
#OS junk files
Thumbs.db
*.DS_Store
#Visual Studio files
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.sbr
obj/
[Bb]in
[Dd]ebug*/
[Rr]elease*/
#Toolinga
[Tt]est[Rr]esult
.pdsync
.pdsyncu
#Project files
[Bb]uild/
*.pdsync
*.pdsyncu
*.dotCover
_项目发布_
_项目发布_/
_DB_/
Packages/
_bin.*
*.bin
bin
obj
*.user
*.suo
*.lnk
*.rar
*ReSharper*
*Example*
Doc
desktop.ini
bin.*/
*.sdf
*.vs10x
Sample Projects/
.idea
ipch/
.vs10x
*.aux
*.dvi
*.log
*.ps
*.sdf
*.opensdf
#OS junk files
Thumbs.db
*.DS_Store
#Visual Studio files
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.sbr
obj/
[Bb]in
[Dd]ebug*/
[Rr]elease*/
#Toolinga
[Tt]est[Rr]esult
.pdsync
.pdsyncu
#Project files
[Bb]uild/
*.pdsync
*.pdsyncu
*.dotCover
_项目发布_
tools/

6
.nuget/NuGet.Config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>

BIN
.nuget/NuGet.exe Normal file

Binary file not shown.

144
.nuget/NuGet.targets Normal file
View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
<!-- Property that enables building a package from a project -->
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
<!-- Determines if package restore consent is required to restore packages -->
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
</PropertyGroup>
<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
<!--
<PackageSource Include="https://www.nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
</ItemGroup>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
</PropertyGroup>
<PropertyGroup>
<PackagesProjectConfig Condition=" '$(OS)' == 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config</PackagesProjectConfig>
<PackagesProjectConfig Condition=" '$(OS)' != 'Windows_NT'">$(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config</PackagesProjectConfig>
</PropertyGroup>
<PropertyGroup>
<PackagesConfig Condition="Exists('$(MSBuildProjectDirectory)\packages.config')">$(MSBuildProjectDirectory)\packages.config</PackagesConfig>
<PackagesConfig Condition="Exists('$(PackagesProjectConfig)')">$(PackagesProjectConfig)</PackagesConfig>
</PropertyGroup>
<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>
<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>
<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
</Target>
<Target Name="_DownloadNuGet">
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />
<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Net" />
<Using Namespace="Microsoft.Build.Framework" />
<Using Namespace="Microsoft.Build.Utilities" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
OutputFilename = Path.GetFullPath(OutputFilename);
Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>
</Project>

View File

@ -1,22 +1,35 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30324.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web12306", "Web12306\Web12306.csproj", "{56406C67-2B6F-4152-9EC0-E6D80E86B96D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{56406C67-2B6F-4152-9EC0-E6D80E86B96D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56406C67-2B6F-4152-9EC0-E6D80E86B96D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56406C67-2B6F-4152-9EC0-E6D80E86B96D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56406C67-2B6F-4152-9EC0-E6D80E86B96D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30324.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web12306", "Web12306\Web12306.csproj", "{56406C67-2B6F-4152-9EC0-E6D80E86B96D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StationDataFileGenerator", "StationDataFileGenerator\StationDataFileGenerator.csproj", "{0C7635A7-78F5-459D-BBDE-CEEC51E546B9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{4C2B47DF-F10F-4EE2-9150-96FBC50A8F58}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{56406C67-2B6F-4152-9EC0-E6D80E86B96D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56406C67-2B6F-4152-9EC0-E6D80E86B96D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56406C67-2B6F-4152-9EC0-E6D80E86B96D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56406C67-2B6F-4152-9EC0-E6D80E86B96D}.Release|Any CPU.Build.0 = Release|Any CPU
{0C7635A7-78F5-459D-BBDE-CEEC51E546B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C7635A7-78F5-459D-BBDE-CEEC51E546B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C7635A7-78F5-459D-BBDE-CEEC51E546B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C7635A7-78F5-459D-BBDE-CEEC51E546B9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Newtonsoft.Json;
namespace StationDataFileGenerator
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var targetDataFile = Path.Combine(_root, @"..\Web12306\js\station\station_data.js");
var inputDataFile = Path.Combine(_root, @"station_name.js");
var inputPopFile = Path.Combine(_root, @"favorite_name.js");
//常规数据
var commonDataText = File.ReadAllText(inputDataFile);
var popDataText = File.ReadAllText(inputPopFile);
//@bjb|北京北|VAP|beijingbei|bjb|0
//@bji|北京|BJP|0
var commonData = new Regex(@"@([a-z]+)\|([^\|]+)\|([^\|]+)\|([^\|@]+)\|([^\|@]+)\|([^\|@'""]+)", RegexOptions.IgnoreCase).Matches(commonDataText)
.Cast<Match>().Select(s => new { p = s.Groups[4].Value.ToLower(), n = s.Groups[2].Value.ToLower(), c = s.Groups[3].Value, s = int.Parse(s.Groups[6].Value), h = s.Groups[5].Value.ToLower() })
.GroupBy(s => char.ToUpper(s.h[0])).ToDictionary(s => s.Key, s => s.OrderBy(x => x.s).ToDictionary(x => x.c))
;
var popData = new Regex(@"@([a-z]+)\|([^\|]+)\|([^\|]+)\|([^\|@]+)", RegexOptions.IgnoreCase).Matches(popDataText)
.Cast<Match>().Select(s => s.Groups[3].Value).ToArray();
;
File.WriteAllText(targetDataFile, "define(function(require, exports, module){\r\n exports.data=" + Newtonsoft.Json.JsonConvert.SerializeObject(commonData) + ";\r\n exports.popcity=" + JsonConvert.SerializeObject(popData) + ";\r\n});");
Console.Write("OK.");
Console.ReadKey();
}
static string _root = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("StationDataFileGenerator")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("StationDataFileGenerator")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("39829ee5-f828-4d9a-8796-af7f845102ba")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.34014
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace StationDataFileGenerator.Properties
{
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 返回此类使用的、缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("StationDataFileGenerator.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 为所有资源查找重写当前线程的 CurrentUICulture 属性,
/// 方法是使用此强类型资源类。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace StationDataFileGenerator.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0C7635A7-78F5-459D-BBDE-CEEC51E546B9}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StationDataFileGenerator</RootNamespace>
<AssemblyName>StationDataFileGenerator</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\tools\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="6.0.3" targetFramework="net40" />
</packages>

17
Web12306/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Web12306</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
</natures>
</projectDescription>

View File

@ -1,240 +1,250 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{56406C67-2B6F-4152-9EC0-E6D80E86B96D}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Web12306</RootNamespace>
<AssemblyName>Web12306</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.Entity" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http">
</Reference>
<Reference Include="System.Net.Http.WebRequest">
</Reference>
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Optimization">
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.1\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.Razor.3.0.0\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="WebGrease">
<Private>True</Private>
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
</Reference>
<Reference Include="Antlr3.Runtime">
<Private>True</Private>
<HintPath>..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Formatting">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.0.0\lib\net45\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.WebHost">
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.0.0\lib\net45\System.Web.Http.WebHost.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="App_Start\FilterConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="App_Start\WebApiConfig.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="css\base.css" />
<Content Include="css\buttons.css" />
<Content Include="css\fa\css\font-awesome.css" />
<Content Include="css\fa\fonts\fontawesome-webfont.svg" />
<Content Include="css\index.css" />
<Content Include="css\ui\city-selector.css" />
<Content Include="css\ui\date-popup.css" />
<Content Include="css\ui\date-selector.css" />
<Content Include="css\ui\index-search-base.css" />
<Content Include="css\ui\options-param.css" />
<Content Include="css\ui\passenger-selector.css" />
<Content Include="css\ui\query-result.css" />
<Content Include="css\ui\train-stops.css" />
<Content Include="css\ui\travel-method.css" />
<Content Include="css\ui\widget-login.css" />
<Content Include="css\ui\widget-ticketsubmit.css" />
<Content Include="css\ui\widget.css" />
<Content Include="Global.asax" />
<Content Include="images\code.png" />
<Content Include="images\css-sprite.mkm" />
<Content Include="images\loading.gif" />
<Content Include="images\css-sprite.png" />
<Content Include="images\icon.png" />
<Content Include="images\logo.png" />
<Content Include="images\logo12306.png" />
<Content Include="images\page-bg.png" />
<Content Include="images\search-box-bg.png" />
<Content Include="images\ticket-submit-info-arrow.png" />
<Content Include="images\ticket-submit-qr.png" />
<Content Include="index.html" />
<Content Include="js\account\LoginUser.js" />
<Content Include="js\boot.js" />
<Content Include="css\fa\fonts\fontawesome-webfont.eot" />
<Content Include="css\fa\fonts\fontawesome-webfont.ttf" />
<Content Include="css\fa\fonts\fontawesome-webfont.woff" />
<Content Include="css\fa\fonts\FontAwesome.otf" />
<None Include="js\docs\chrome-api-vsdoc.js" />
<Content Include="js\data.js" />
<Content Include="js\passenger\Passenger.js" />
<Content Include="js\passenger\PassengerList.js" />
<Content Include="js\platform\EventObject.js" />
<Content Include="js\platform\extensionConnect.js" />
<Content Include="js\platform\paser.js" />
<Content Include="js\platform\storage.js" />
<Content Include="js\platform\webRequest.js" />
<Content Include="js\profile\Profile.js" />
<Content Include="js\profile\ProfileList.js" />
<Content Include="js\ui\index.js" />
<Content Include="js\modules\jquery\jquery.js" />
<Content Include="js\modules\seajs\sea.js" />
<Content Include="js\modules\underscore\underscore.js" />
<Content Include="js\ui\widget.js" />
<Content Include="js\ui\widget_datedropdown.js" />
<Content Include="Web.config" />
<Content Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="js\order\" />
<Folder Include="js\query\" />
<Folder Include="js\station\" />
<Folder Include="js\vc\" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>47028</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:47028/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target> -->
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{56406C67-2B6F-4152-9EC0-E6D80E86B96D}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Web12306</RootNamespace>
<AssemblyName>Web12306</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.Entity" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http">
</Reference>
<Reference Include="System.Net.Http.WebRequest">
</Reference>
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Optimization">
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.1\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.Razor.3.0.0\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<Private>True</Private>
<HintPath>..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="WebGrease">
<Private>True</Private>
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
</Reference>
<Reference Include="Antlr3.Runtime">
<Private>True</Private>
<HintPath>..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Formatting">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.0.0\lib\net45\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.WebHost">
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.0.0\lib\net45\System.Web.Http.WebHost.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="App_Start\FilterConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="App_Start\WebApiConfig.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="css\base.css" />
<Content Include="css\buttons.css" />
<Content Include="css\fa\css\font-awesome.css" />
<Content Include="css\fa\fonts\fontawesome-webfont.svg" />
<Content Include="css\index.css" />
<Content Include="css\ui\city-selector.css" />
<Content Include="css\ui\date-popup.css" />
<Content Include="css\ui\date-selector.css" />
<Content Include="css\ui\index-search-base.css" />
<Content Include="css\ui\options-param.css" />
<Content Include="css\ui\passenger-selector.css" />
<Content Include="css\ui\query-result.css" />
<Content Include="css\ui\train-stops.css" />
<Content Include="css\ui\travel-method.css" />
<Content Include="css\ui\widget-login.css" />
<Content Include="css\ui\widget-ticketsubmit.css" />
<Content Include="css\ui\widget.css" />
<Content Include="Global.asax" />
<Content Include="images\code.png" />
<Content Include="images\css-sprite.mkm" />
<Content Include="images\loading.gif" />
<Content Include="images\css-sprite.png" />
<Content Include="images\icon.png" />
<Content Include="images\logo.png" />
<Content Include="images\logo12306.png" />
<Content Include="images\page-bg.png" />
<Content Include="images\search-box-bg.png" />
<Content Include="images\ticket-submit-info-arrow.png" />
<Content Include="images\ticket-submit-qr.png" />
<Content Include="index.html" />
<Content Include="js\account\LoginUser.js" />
<Content Include="js\boot.js" />
<Content Include="css\fa\fonts\fontawesome-webfont.eot" />
<Content Include="css\fa\fonts\fontawesome-webfont.ttf" />
<Content Include="css\fa\fonts\fontawesome-webfont.woff" />
<Content Include="css\fa\fonts\FontAwesome.otf" />
<None Include="js\docs\chrome-api-vsdoc.js" />
<Content Include="js\data.js" />
<Content Include="js\passenger\Passenger.js" />
<Content Include="js\passenger\PassengerList.js" />
<Content Include="js\platform\EventObject.js" />
<Content Include="js\platform\extensionConnect.js" />
<Content Include="js\platform\paser.js" />
<Content Include="js\platform\storage.js" />
<Content Include="js\platform\webRequest.js" />
<Content Include="js\profile\Profile.js" />
<Content Include="js\profile\ProfileList.js" />
<Content Include="js\station\station_data.js" />
<Content Include="js\ui\index.js" />
<Content Include="js\modules\jquery\jquery.js" />
<Content Include="js\modules\seajs\sea.js" />
<Content Include="js\modules\underscore\underscore.js" />
<Content Include="js\ui\widget.js" />
<Content Include="js\ui\widget_cityselector.js" />
<Content Include="js\ui\widget_datedropdown.js" />
<Content Include="Web.config" />
<Content Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="js\order\" />
<Folder Include="js\query\" />
<Folder Include="js\vc\" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>47028</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:47028/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。启用“NuGet 程序包还原”可下载这些程序包。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target> -->
</Project>

View File

@ -1,133 +1,139 @@
/*城市选择*/
#citySelector {
width: 400px;
height: 400px;
box-shadow: 3px 3px 10px rgba(110, 110, 110, 0.5);
background-color: #f5f6f5;
z-index: 100;
position: absolute;
}
#citySelector .allCityList {
width: 100%;
height: 100%;
position: relative;
}
#citySelector .allCityList .city-recently-used {
width: 100%;
height: 48px;
background: linear-gradient(to top, #f66d07, #fc9803);
font-size: 12px;
}
#citySelector .allCityList .city-recently-used li {
float: left;
width: 50px;
box-sizing: border-box;
border-radius: 4px;
color: #ffffff;
margin: 8px 0 8px 15px;
padding: 9px;
text-align: center;
cursor: pointer;
font-weight: bold;
}
#citySelector .allCityList .city-recently-used li:hover,
#citySelector .allCityList .city-recently-used li.selected {
background: #fff linear-gradient(to top, #f1f1f1, #ffffff);
background: #fff -moz-linear-gradient(to top, #f1f1f1, #ffffff);
color: #f17206;
}
#citySelector .allCityList .common p {
padding: 14px 0 10px 30px;
font-weight: bold;
color: #74848d;
}
#citySelector .allCityList .common .commonCityList {
margin: 0 12px 12px 12px;
overflow: hidden;
}
#citySelector .allCityList .common .commonCityList dd {
margin: 0;
border: 1px solid #d0d0d0;
border-radius: 4px;
color: #7d848d;
width: 72px;
float: left;
line-height: 32px;
background-color: #f9f8f3;
text-align: center;
cursor: pointer;
}
#citySelector .allCityList .common .commonCityList dd:hover {
background-color: #ff9b00;
color: #ffffff;
}
#citySelector .allCityList .common .commonCityList dd + dd {
margin-left: 7px;
}
#citySelector .allCityList .cityList {
border-left: 1px solid #e1e1e1;
margin: 0 12px 12px 12px;
overflow: hidden;
color: #7b848d;
border-right: 1px solid #e1e1e1;
border-bottom: 1px solid #e1e1e1;
}
#citySelector .allCityList .cityList li {
float: left;
width: 25%;
line-height: 35px;
text-align: center;
border-left: 1px solid #e1e1e1;
border-top: 1px solid #e1e1e1;
box-sizing: border-box;
cursor: pointer;
}
#citySelector .allCityList .cityList li:hover {
background-color: #ff9b00;
color: white;
}
#citySelector .allCityList .cityList li:active {
background-color: #f78800;
color: white;
}
#citySelector .allCityList .cityPager {
position: absolute;
bottom: 0;
left: 0;
padding-bottom: 9px;
text-align: center;
width: 100%;
}
#citySelector .allCityList .cityPager button {
line-height: 24px;
background: linear-gradient(0, #e6e6e6, #f9f9f9);
color: #7d848d;
border: 1px solid #bdbcbc;
border-radius: 4px;
cursor: pointer;
}
#citySelector .allCityList .cityPager button:hover {
background: linear-gradient(to top, #efefef, #ffffff);
}
#citySelector .allCityList .cityPager button:disabled {
border: 1px solid transparent;
background: none transparent;
color: #9da2a8;
}
/*城市选择*/
#citySelector {
width: 400px;
height: 400px;
box-shadow: 3px 3px 10px rgba(110, 110, 110, 0.5);
background-color: #f5f6f5;
z-index: 100;
position: absolute;
display: none;
}
#citySelector.open,
#citySelector:hover {
display: block;
}
#citySelector .allCityList {
width: 100%;
height: 100%;
position: relative;
}
#citySelector .allCityList .city-recently-used {
width: 100%;
height: 48px;
background: linear-gradient(to top, #f66d07, #fc9803);
font-size: 12px;
}
#citySelector .allCityList .city-recently-used li {
float: left;
width: 50px;
box-sizing: border-box;
border-radius: 4px;
color: #ffffff;
margin: 8px 0 8px 15px;
padding: 9px;
text-align: center;
cursor: pointer;
font-weight: bold;
}
#citySelector .allCityList .city-recently-used li:hover,
#citySelector .allCityList .city-recently-used li.selected {
background: #fff linear-gradient(to top, #f1f1f1, #ffffff);
background: #fff -moz-linear-gradient(to top, #f1f1f1, #ffffff);
color: #f17206;
}
#citySelector .allCityList .common p {
padding: 14px 0 10px 30px;
font-weight: bold;
color: #74848d;
}
#citySelector .allCityList .common .commonCityList {
margin: 0 12px 12px 12px;
overflow: hidden;
}
#citySelector .allCityList .common .commonCityList dd {
margin: 0;
border: 1px solid #d0d0d0;
border-radius: 4px;
color: #7d848d;
width: 72px;
float: left;
line-height: 32px;
background-color: #f9f8f3;
text-align: center;
cursor: pointer;
}
#citySelector .allCityList .common .commonCityList dd:hover {
background-color: #ff9b00;
color: #ffffff;
}
#citySelector .allCityList .common .commonCityList dd + dd {
margin-left: 7px;
}
#citySelector .allCityList .cityList {
border-left: 1px solid #e1e1e1;
margin: 0 12px 12px 12px;
overflow: hidden;
color: #7b848d;
border-right: 1px solid #e1e1e1;
border-bottom: 1px solid #e1e1e1;
}
#citySelector .allCityList .cityList li {
float: left;
width: 25%;
line-height: 35px;
text-align: center;
border-left: 1px solid #e1e1e1;
border-top: 1px solid #e1e1e1;
box-sizing: border-box;
cursor: pointer;
}
#citySelector .allCityList .cityList li:hover {
background-color: #ff9b00;
color: white;
}
#citySelector .allCityList .cityList li:active {
background-color: #f78800;
color: white;
}
#citySelector .allCityList .cityPager {
position: absolute;
bottom: 0;
left: 0;
padding-bottom: 9px;
text-align: center;
width: 100%;
}
#citySelector .allCityList .cityPager button {
line-height: 24px;
background: linear-gradient(0, #e6e6e6, #f9f9f9);
color: #7d848d;
border: 1px solid #bdbcbc;
border-radius: 4px;
cursor: pointer;
}
#citySelector .allCityList .cityPager button:hover {
background: linear-gradient(to top, #efefef, #ffffff);
}
#citySelector .allCityList .cityPager button:disabled {
border: 1px solid transparent;
background: none transparent;
color: #9da2a8;
}

View File

@ -1,10 +1,31 @@
@import url(date-selector.css);
#dateSelector {
box-shadow: 3px 3px 10px rgba(110, 110, 110, 0.5);
border-radius: 5px;
border: 1px solid #d1d1d1;
background-color: #ffffff;
z-index: 100;
}
@import url(date-selector.css);
#dateSelector {
box-shadow: 3px 3px 10px rgba(110, 110, 110, 0.5);
border-radius: 5px;
border: 1px solid #d1d1d1;
background-color: #ffffff;
z-index: 100;
position: absolute;
display: none;
}
#dateSelector:hover {
display: block;
}
#dateSelector.open {
display: block;
}
#dateSelector.open:hover {
display: block;
}
#dateSelector .month-second, #dateSelector .month-first {
float: left;
}
#dateSelector .month-second {
border-left: 1px solid #d1d1d1;
}

View File

@ -1,206 +1,223 @@
.date-bar-wrap {
height: 60px;
margin-top: 18px;
border-bottom: 3px solid #f88c21;
border-left: 1px solid #dfdfdf;
border-right: 1px solid #dfdfdf;
}
.date-bar-wrap .date-bar-prev,
.date-bar-wrap .date-bar-next {
width: 28px;
height: 58px;
background: linear-gradient(to bottom, #fcfcfb, #e5e4e4);
border-top: 1px solid #dfdfdf;
border-bottom: 1px solid #d67e29;
cursor: pointer;
}
.date-bar-wrap .date-bar-prev .arrow-left,
.date-bar-wrap .date-bar-next .arrow-right {
display: block;
margin: 20px auto;
width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
position: relative;
}
.date-bar-wrap .date-bar-prev .arrow-left {
border-right: 10px solid #a8a7a8;
}
.date-bar-wrap .date-bar-next .arrow-right {
border-left: 10px solid #a8a7a8;
}
.date-bar-wrap .date-bar-prev .arrow-left:after,
.date-bar-wrap .date-bar-next .arrow-right:after {
content: '';
position: absolute;
display: block;
margin: 10px auto;
width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
top: -20px;
}
.date-bar-wrap .date-bar-prev .arrow-left:after {
border-right: 10px solid #efeeee;
left: 3px;
}
.date-bar-wrap .date-bar-next .arrow-right:after {
border-left: 10px solid #efeeee;
left: -13px;
}
.date-bar-wrap .date-bar-prev:hover .arrow-left {
border-right: 10px solid #f88c21;
}
.date-bar-wrap .date-bar-next:hover .arrow-right {
border-left: 10px solid #f88c21;
}
.date-bar-wrap .date-bar-prev {
border-right: 1px solid #cccbc8;
}
.date-bar-wrap .date-bar-next {
border-left: 1px solid #cccbc8;
}
.date-bar-wrap .date-bar {
width: 922px;
height: 60px;
background: linear-gradient(to bottom, #f1f0f0, #dbdbdb);
color: #777;
}
.date-bar-wrap .date-bar .date-bar-list {
width: 100%;
height: 60px;
}
.date-bar-wrap .date-bar .date-bar-list li {
width: 12.5%;
height: 100%;
float: left;
border-top: 1px solid #dfdfdf;
border-left: 1px solid #b8b7b7;
border-bottom: 1px solid #d67e29;
position: relative;
cursor: pointer;
box-sizing: border-box;
}
.date-bar-wrap .date-bar .date-bar-list li h5 {
font-weight: bold;
font-size: 16px;
text-align: center;
margin: 8px auto 5px auto;
}
.date-bar-wrap .date-bar .date-bar-list li span {
display: block;
text-align: center;
}
.date-bar-wrap .date-bar .date-bar-list li.selected,
.date-bar-wrap .date-bar .date-bar-list li:hover {
background: linear-gradient(to bottom, #fc9e40, #f78b20);
color: #ffffff;
border-left: 1px solid #d67e29;
border-top: 1px solid #d67e29;
border-bottom: 1px solid #f78b20;
}
.date-bar-wrap .date-bar .date-bar-list li.selected:after,
.date-bar-wrap .date-bar .date-bar-list li.selected:before {
content: '';
position: absolute;
width: 0;
height: 0;
border-bottom: 5px solid #c6701a;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
top: 100%;
left: 50%;
margin-left: -5px;
margin-top: -1px;
}
.date-bar-wrap .date-bar .date-bar-list li.selected:after {
border-bottom: 5px solid #f5f5f5;
margin-top: 0;
}
.date-bar-wrap .date-bar .date-bar-list li.selected + li {
border-left: 1px solid #d67e29;
}
.date-bar-wrap .date-bar .date-bar-list li:last-child {
}
.date-bar-wrap .date-bar .date-bar-list li:first-child {
border-left: none;
}
/*日期选择器*/
.date-selector {
background-color: #ffffff;
}
.date-selector nav {
}
.date-selector nav header {
font-size: 18px;
line-height: 61px;
color: #7d848d;
text-align: center;
font-weight: bold;
}
.date-selector table {
border-collapse: separate;
}
.date-selector table th {
line-height: 31px;
border-top: 1px solid #bb6c29;
border-bottom: 1px solid #bb6c29;
background: linear-gradient(to top, #f87c06, #fa9104);
color: #ffffff;
width: 45px;
text-align: center;
}
.date-selector table td {
line-height: 31px;
border-bottom: 1px solid #e1e1e1;
background: #f2f2f2;
color: #7d848d;
width: 45px;
text-align: center;
}
.date-selector table td + td {
border-left: 1px solid #e1e1e1;
}
.date-selector table td:hover {
background-color: #ff9b00;
color: #ffffff;
cursor: pointer;
}
.date-selector table td:active {
background-color: #f78800;
color: #ffffff;
cursor: pointer;
}
.date-bar-wrap {
height: 60px;
margin-top: 18px;
border-bottom: 3px solid #f88c21;
border-left: 1px solid #dfdfdf;
border-right: 1px solid #dfdfdf;
}
.date-bar-wrap .date-bar-prev,
.date-bar-wrap .date-bar-next {
width: 28px;
height: 58px;
background: linear-gradient(to bottom, #fcfcfb, #e5e4e4);
border-top: 1px solid #dfdfdf;
border-bottom: 1px solid #d67e29;
cursor: pointer;
}
.date-bar-wrap .date-bar-prev .arrow-left,
.date-bar-wrap .date-bar-next .arrow-right {
display: block;
margin: 20px auto;
width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
position: relative;
}
.date-bar-wrap .date-bar-prev .arrow-left {
border-right: 10px solid #a8a7a8;
}
.date-bar-wrap .date-bar-next .arrow-right {
border-left: 10px solid #a8a7a8;
}
.date-bar-wrap .date-bar-prev .arrow-left:after,
.date-bar-wrap .date-bar-next .arrow-right:after {
content: '';
position: absolute;
display: block;
margin: 10px auto;
width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
top: -20px;
}
.date-bar-wrap .date-bar-prev .arrow-left:after {
border-right: 10px solid #efeeee;
left: 3px;
}
.date-bar-wrap .date-bar-next .arrow-right:after {
border-left: 10px solid #efeeee;
left: -13px;
}
.date-bar-wrap .date-bar-prev:hover .arrow-left {
border-right: 10px solid #f88c21;
}
.date-bar-wrap .date-bar-next:hover .arrow-right {
border-left: 10px solid #f88c21;
}
.date-bar-wrap .date-bar-prev {
border-right: 1px solid #cccbc8;
}
.date-bar-wrap .date-bar-next {
border-left: 1px solid #cccbc8;
}
.date-bar-wrap .date-bar {
width: 922px;
height: 60px;
background: linear-gradient(to bottom, #f1f0f0, #dbdbdb);
color: #777;
}
.date-bar-wrap .date-bar .date-bar-list {
width: 100%;
height: 60px;
}
.date-bar-wrap .date-bar .date-bar-list li {
width: 12.5%;
height: 100%;
float: left;
border-top: 1px solid #dfdfdf;
border-left: 1px solid #b8b7b7;
border-bottom: 1px solid #d67e29;
position: relative;
cursor: pointer;
box-sizing: border-box;
}
.date-bar-wrap .date-bar .date-bar-list li h5 {
font-weight: bold;
font-size: 16px;
text-align: center;
margin: 8px auto 5px auto;
}
.date-bar-wrap .date-bar .date-bar-list li span {
display: block;
text-align: center;
}
.date-bar-wrap .date-bar .date-bar-list li.selected,
.date-bar-wrap .date-bar .date-bar-list li:hover {
background: linear-gradient(to bottom, #fc9e40, #f78b20);
color: #ffffff;
border-left: 1px solid #d67e29;
border-top: 1px solid #d67e29;
border-bottom: 1px solid #f78b20;
}
.date-bar-wrap .date-bar .date-bar-list li.selected:after,
.date-bar-wrap .date-bar .date-bar-list li.selected:before {
content: '';
position: absolute;
width: 0;
height: 0;
border-bottom: 5px solid #c6701a;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
top: 100%;
left: 50%;
margin-left: -5px;
margin-top: -1px;
}
.date-bar-wrap .date-bar .date-bar-list li.selected:after {
border-bottom: 5px solid #f5f5f5;
margin-top: 0;
}
.date-bar-wrap .date-bar .date-bar-list li.selected + li {
border-left: 1px solid #d67e29;
}
.date-bar-wrap .date-bar .date-bar-list li:last-child {
}
.date-bar-wrap .date-bar .date-bar-list li:first-child {
border-left: none;
}
/*日期选择器*/
.date-selector {
background-color: #ffffff;
}
.date-selector nav {
}
.date-selector nav header {
font-size: 18px;
line-height: 61px;
color: #7d848d;
text-align: center;
font-weight: bold;
}
.date-selector table {
border-collapse: separate;
}
.date-selector table th {
line-height: 31px;
border-top: 1px solid #bb6c29;
border-bottom: 1px solid #bb6c29;
background: linear-gradient(to top, #f87c06, #fa9104);
color: #ffffff;
width: 45px;
text-align: center;
}
.date-selector table td {
line-height: 31px;
border-bottom: 1px solid #e1e1e1;
background: #f2f2f2;
color: #7d848d;
width: 45px;
text-align: center;
}
.date-selector table td + td {
border-left: 1px solid #e1e1e1;
}
.date-selector table td:hover,
.date-selector table td.date-selected {
background-color: #ff9b00;
color: #ffffff;
cursor: pointer;
}
.date-selector table td:active {
background-color: #f78800;
color: #ffffff;
cursor: pointer;
}
.date-selector .date-current {
color: #f78800;
font-weight: bold;
}
.date-selector .date-notavailable {
background-color: #ffffff;
color: #ccc;
}
.date-selector .date-notavailable:hover {
cursor: not-allowed;
background: none;
color: #ccc;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,29 +1,30 @@
define(function(require) {
var param = require("../data.js");
var ajax = require("../platform/webRequest.js");
var storage = require('../platform/storage.js');
var widget = require("./widget.js");
//初始化UI
(function() {
$("#passenger-selector-id").focus(function () {
$(this).parent().parent().addClass("hover");
}).blur(function () {
$(this).parent().parent().removeClass("hover");
});
$("#travel-theme-select").focus(function () {
$(this).parent().parent().addClass("hover");
}).blur(function () {
$(this).parent().parent().removeClass("hover");
});
$("#btn-save-travel-theme").click(function() {
widget.showFloatDialog($("#save-travel-method"));
});
})();
//初始化日期
require("./widget_datedropdown.js").init();
setTimeout(function () {
}, 1000);
});
define(function(require) {
var param = require("../data.js");
var ajax = require("../platform/webRequest.js");
var storage = require('../platform/storage.js');
var widget = require("./widget.js");
//初始化UI
(function() {
$("#passenger-selector-id").focus(function () {
$(this).parent().parent().addClass("hover");
}).blur(function () {
$(this).parent().parent().removeClass("hover");
});
$("#travel-theme-select").focus(function () {
$(this).parent().parent().addClass("hover");
}).blur(function () {
$(this).parent().parent().removeClass("hover");
});
$("#btn-save-travel-theme").click(function() {
widget.showFloatDialog($("#save-travel-method"));
});
})();
//初始化日期
require("./widget_datedropdown.js").init("input.ui-date");
require("./widget_cityselector.js").init("input.ui-cityselector");
setTimeout(function () {
}, 1000);
});

View File

@ -0,0 +1,37 @@
define(function(require, exports) {
var $html = '<div id="citySelector"><div class="allCityList"><ul class="city-recently-used"><li class="selected">常用</li><li>A-E</li><li>F-J</li><li>K-O</li><li>P-T</li><li>U-Z</li></ul><div class="common"><p>常用城市</p><dl class="commonCityList"></dl></div><ul class="cityList"></ul><div class="cityPager"><button class="city-prev" disabled="disabled">上一页</button><button class="city-next">下一页</button></div></div></div>';
var selector;
var divCity;
var CitySelector = function(options) {
var that = this;
that.showPopup = function(ele) {
var offset = ele.offset();
divCity.css({ left: offset.left + "px", top: (offset.top + ele.height()) + "px" });
divCity.addClass("open");
};
that.hidePopup = function() {
divCity.removeClass("open");
};
return this;
};
exports.init = function(eleSelector, args) {
$("body").append($html);
divCity = $("#citySelector");
args = $.extend({}, args);
selector = new CitySelector(args);
$(document).on("focus", eleSelector, function () {
selector.showPopup($(this));
}).on("blur", eleSelector, function () {
selector.hidePopup($(this));
});
};
});

View File

@ -1,23 +1,146 @@
define(function (require, exports, module) {
var eo = require("../platform/EventObject.js");
var DateDropDown = function() {
};
DateDropDown.prototype = Object.create(eo);
DateDropDown.constructor = DateDropDown;
exports.init = function(objs) {
objs.each(function() {
var tb = $(this);
var date = tb.data("ui-date-dropdown") || new DateDropDown();
tb.data("ui-date-dropdown", date);
return tb;
});
};
define(function (require, exports, module) {
var eo = require("../platform/EventObject.js");
var getCurDate = function () {
var now = new Date();
//now = new Date(Math.floor(now.getTime() / 86400000) * 86400000);
now = new Date(now.getFullYear(), now.getMonth(), now.getDate());
return now;
};
var getDateString = function (date) {
return date.getFullYear() + "-" + (date.getMonth() < 9 ? "0" : "") + (date.getMonth() + 1) + "-" + (date.getDate() < 9 ? "0" : "") + date.getDate();
};
var renderCalendar = function (container, monthStart, minDate, maxDate) {
var weekdayOfFirstDay = monthStart.getDay();
var calendarBegin = new Date(monthStart.getTime() + 86400000 * weekdayOfFirstDay * -1);
var cells = container.find("td");
var thismonth = monthStart.getMonth();
var currentDate = getCurDate();
var dateTmp = calendarBegin;
for (var i = 0; i < 35; i++) {
var cell = cells.eq(i);
cell.html(dateTmp.getDate());
if (dateTmp.getMonth() !== thismonth || dateTmp < minDate || dateTmp > maxDate) {
cell.addClass("date-notavailable");
}
if (dateTmp.getTime() === currentDate.getTime()) {
cell.addClass("date-current");
}
cell.attr("data-date", getDateString(dateTmp));
dateTmp = new Date(dateTmp.getTime() + 86400000);
}
//显示时间
container.find("header").html(monthStart.getFullYear() + "年" + (monthStart.getMonth() + 1) + "月");
};
var DateDropDown = function (options) {
var that = this;
that.showPopup = function (ele) {
var curDate = ele.val();
var now = getCurDate();
var selected = ele.data("selectedDate") || [];
var dateDom = $("#dateSelector");
//如果日历已经创建了,则不变。
if (curDate)
selected.push(curDate);
var dayStart = new Date(now.getFullYear(), now.getMonth(), 1);
var maxShowDay = new Date(now.getTime() + 86400 * 1000 * options.maxSellDays);
if (dateDom.prop("data-month") !== getDateString(dayStart)) {
renderCalendar(dateDom.find(">.month-first"), dayStart, now, maxShowDay);
renderCalendar(dateDom.find(">.month-second"), new Date(dayStart.getFullYear(), dayStart.getMonth() + 1, 1), now, maxShowDay);
dateDom.prop("data-month", getDateString(dayStart));
}
//判断当前的购买日期是否超过月底了,决定是否显示第二个日历
if (maxShowDay.getMonth() > now.getMonth()) {
dateDom.find(">.month-second").show();
} else {
dateDom.find(">.month-second").hide();
}
//确定有标记
dateDom.find("td").removeClass("date-selected").filter(selected.map(function (e) { return "[data-date='" + e + "']"; }).join(",")).addClass("date-selected");
dateDom.data("date-target", ele);
//显示
var offset = ele.offset();
dateDom.css({ left: offset.left + "px", top: (offset.top + ele.height()) + "px" });
dateDom.addClass("open");
};
that.hidePopup = function () {
var dateDom = $("#dateSelector");
dateDom.removeClass("open");
};
return this;
};
DateDropDown.prototype = Object.create(eo);
DateDropDown.constructor = DateDropDown;
var dropdownInstance;
exports.init = function (selector, params) {
var date_classes = ["month-first", "month-second"];
var dom = ['<div id="dateSelector">'];
_.each(date_classes, function (e) {
var cls = e + '';
dom.push('<div class="' + cls + '"><section class="date-selector"><nav><span class="month-prev"></span><span class="month-next"></span><header></header></nav><table><tr><th>日</th><th>一</th><th>二</th><th>三</th><th>四</th><th>五</th><th>六</th></tr>');
for (var i = 0; i < 5; i++) {
dom.push("<tr>");
for (var j = 0; j < 7; j++) {
dom.push("<td></td>");
}
dom.push("</tr>");
}
dom.push("</table></section></div>");
});
$("body").append(dom.join(""));
$("#dateSelector td").click(function () {
var container = $("#dateSelector");
var cell = $(this);
if (cell.hasClass("date-notavailable") || !container.data("date-target")) return;
var target = container.data("date-target").val(cell.attr("data-date"));
target.trigger("datechanged.widget.ui.datepopup");
dropdownInstance.hidePopup();
container.removeData("date-target");
//移走,确定关闭它
target[0].blur();
container.css({
left: "-1000px",
top: "-1000px"
});
});
params = $.extend({
maxSellDays: 20,
selectDate: [],
minDate: getCurDate()
}, params);
dropdownInstance = new DateDropDown(params);
$(document).on("focus", selector, function () {
dropdownInstance.showPopup($(this));
}).on("blur", selector, function () {
dropdownInstance.hidePopup($(this));
});
};
});