├── .gitattributes ├── .gitignore ├── README.md ├── Weather.sln ├── Weather ├── App.config ├── MainForm.Designer.cs ├── MainForm.cs ├── MainForm.resx ├── Place.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Weather.csproj ├── WeatherDay.Designer.cs ├── WeatherDay.cs ├── WeatherDay.resx ├── WeatherDayMore.Designer.cs ├── WeatherDayMore.cs ├── WeatherDayMore.resx ├── WeatherDetail.cs ├── XmlOperator.cs ├── logo.ico └── pic.png └── _config.yml /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Weather 2 | 用C#编写的天气预报小工具 3 | ## 功能 4 | #### 1、查询中国省份、城市及地区三级的天气预报; 5 | #### 2、显示1-7天一周的天气预报及未来8-15天的天气预报; 6 | #### 3、能定制地区的天气预报。 7 | ## 界面 8 | ![image](https://github.com/cnxy/Weather/blob/master/Weather/pic.png) 9 | -------------------------------------------------------------------------------- /Weather.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2009 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Weather", "Weather\Weather.csproj", "{816AFFA4-D87C-4D20-805F-BEE2C4DDE70E}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {816AFFA4-D87C-4D20-805F-BEE2C4DDE70E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {816AFFA4-D87C-4D20-805F-BEE2C4DDE70E}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {816AFFA4-D87C-4D20-805F-BEE2C4DDE70E}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {816AFFA4-D87C-4D20-805F-BEE2C4DDE70E}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {E35C2538-475D-4A42-9EA5-450A9A3AD20F} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Weather/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Weather/MainForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Weather 2 | { 3 | partial class MainForm 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要修改 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); 32 | this.toolStrip = new System.Windows.Forms.ToolStrip(); 33 | this.comboBoxProvince = new System.Windows.Forms.ToolStripComboBox(); 34 | this.comboBoxCity = new System.Windows.Forms.ToolStripComboBox(); 35 | this.comboBoxDistrict = new System.Windows.Forms.ToolStripComboBox(); 36 | this.buttonSearch = new System.Windows.Forms.ToolStripButton(); 37 | this.buttonCustom = new System.Windows.Forms.ToolStripDropDownButton(); 38 | this.buttonAbout = new System.Windows.Forms.ToolStripButton(); 39 | this.statusStrip = new System.Windows.Forms.StatusStrip(); 40 | this.lblStatus = new System.Windows.Forms.ToolStripStatusLabel(); 41 | this.lblVerson = new System.Windows.Forms.ToolStripStatusLabel(); 42 | this.weatherDayMore8 = new Weather.WeatherDayMore(); 43 | this.weatherDayMore7 = new Weather.WeatherDayMore(); 44 | this.weatherDayMore6 = new Weather.WeatherDayMore(); 45 | this.weatherDayMore5 = new Weather.WeatherDayMore(); 46 | this.weatherDayMore4 = new Weather.WeatherDayMore(); 47 | this.weatherDayMore3 = new Weather.WeatherDayMore(); 48 | this.weatherDayMore2 = new Weather.WeatherDayMore(); 49 | this.weatherDayMore1 = new Weather.WeatherDayMore(); 50 | this.weatherDay7 = new Weather.WeatherDay(); 51 | this.weatherDay6 = new Weather.WeatherDay(); 52 | this.weatherDay5 = new Weather.WeatherDay(); 53 | this.weatherDay4 = new Weather.WeatherDay(); 54 | this.weatherDay3 = new Weather.WeatherDay(); 55 | this.weatherDay2 = new Weather.WeatherDay(); 56 | this.weatherDay1 = new Weather.WeatherDay(); 57 | this.toolStrip.SuspendLayout(); 58 | this.statusStrip.SuspendLayout(); 59 | this.SuspendLayout(); 60 | // 61 | // toolStrip 62 | // 63 | this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; 64 | this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 65 | this.comboBoxProvince, 66 | this.comboBoxCity, 67 | this.comboBoxDistrict, 68 | this.buttonSearch, 69 | this.buttonCustom, 70 | this.buttonAbout}); 71 | this.toolStrip.Location = new System.Drawing.Point(0, 0); 72 | this.toolStrip.Name = "toolStrip"; 73 | this.toolStrip.Size = new System.Drawing.Size(738, 28); 74 | this.toolStrip.TabIndex = 4; 75 | this.toolStrip.Text = "toolStrip1"; 76 | // 77 | // comboBoxProvince 78 | // 79 | this.comboBoxProvince.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 80 | this.comboBoxProvince.Margin = new System.Windows.Forms.Padding(5, 3, 1, 0); 81 | this.comboBoxProvince.Name = "comboBoxProvince"; 82 | this.comboBoxProvince.Size = new System.Drawing.Size(75, 25); 83 | this.comboBoxProvince.SelectedIndexChanged += new System.EventHandler(this.ComboBoxProvince_SelectedIndexChanged); 84 | // 85 | // comboBoxCity 86 | // 87 | this.comboBoxCity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 88 | this.comboBoxCity.Margin = new System.Windows.Forms.Padding(1, 3, 1, 0); 89 | this.comboBoxCity.Name = "comboBoxCity"; 90 | this.comboBoxCity.Size = new System.Drawing.Size(75, 25); 91 | this.comboBoxCity.SelectedIndexChanged += new System.EventHandler(this.comboBoxCity_SelectedIndexChanged); 92 | // 93 | // comboBoxDistrict 94 | // 95 | this.comboBoxDistrict.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 96 | this.comboBoxDistrict.Margin = new System.Windows.Forms.Padding(1, 3, 1, 0); 97 | this.comboBoxDistrict.Name = "comboBoxDistrict"; 98 | this.comboBoxDistrict.Size = new System.Drawing.Size(75, 25); 99 | // 100 | // buttonSearch 101 | // 102 | this.buttonSearch.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; 103 | this.buttonSearch.Image = ((System.Drawing.Image)(resources.GetObject("buttonSearch.Image"))); 104 | this.buttonSearch.ImageTransparentColor = System.Drawing.Color.Magenta; 105 | this.buttonSearch.Margin = new System.Windows.Forms.Padding(0, 3, 0, 2); 106 | this.buttonSearch.Name = "buttonSearch"; 107 | this.buttonSearch.Size = new System.Drawing.Size(36, 23); 108 | this.buttonSearch.Text = "查询"; 109 | this.buttonSearch.Click += new System.EventHandler(this.buttonSearch_Click); 110 | // 111 | // buttonCustom 112 | // 113 | this.buttonCustom.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; 114 | this.buttonCustom.Image = ((System.Drawing.Image)(resources.GetObject("buttonCustom.Image"))); 115 | this.buttonCustom.ImageTransparentColor = System.Drawing.Color.Magenta; 116 | this.buttonCustom.Margin = new System.Windows.Forms.Padding(0, 3, 0, 2); 117 | this.buttonCustom.Name = "buttonCustom"; 118 | this.buttonCustom.Size = new System.Drawing.Size(45, 23); 119 | this.buttonCustom.Text = "定制"; 120 | // 121 | // buttonAbout 122 | // 123 | this.buttonAbout.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; 124 | this.buttonAbout.Image = ((System.Drawing.Image)(resources.GetObject("buttonAbout.Image"))); 125 | this.buttonAbout.ImageTransparentColor = System.Drawing.Color.Magenta; 126 | this.buttonAbout.Margin = new System.Windows.Forms.Padding(0, 3, 0, 2); 127 | this.buttonAbout.Name = "buttonAbout"; 128 | this.buttonAbout.Size = new System.Drawing.Size(36, 23); 129 | this.buttonAbout.Text = "关于"; 130 | this.buttonAbout.Click += new System.EventHandler(this.buttonAbout_Click); 131 | // 132 | // statusStrip 133 | // 134 | this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 135 | this.lblStatus, 136 | this.lblVerson}); 137 | this.statusStrip.Location = new System.Drawing.Point(0, 535); 138 | this.statusStrip.Name = "statusStrip"; 139 | this.statusStrip.Size = new System.Drawing.Size(738, 22); 140 | this.statusStrip.TabIndex = 5; 141 | this.statusStrip.Text = "statusStrip1"; 142 | // 143 | // lblStatus 144 | // 145 | this.lblStatus.Name = "lblStatus"; 146 | this.lblStatus.Size = new System.Drawing.Size(691, 17); 147 | this.lblStatus.Spring = true; 148 | this.lblStatus.TextAlign = System.Drawing.ContentAlignment.BottomLeft; 149 | // 150 | // lblVerson 151 | // 152 | this.lblVerson.Name = "lblVerson"; 153 | this.lblVerson.Size = new System.Drawing.Size(32, 17); 154 | this.lblVerson.Text = "版本"; 155 | // 156 | // weatherDayMore8 157 | // 158 | this.weatherDayMore8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 159 | this.weatherDayMore8.Day = null; 160 | this.weatherDayMore8.Info = null; 161 | this.weatherDayMore8.Location = new System.Drawing.Point(5, 500); 162 | this.weatherDayMore8.MaximumSize = new System.Drawing.Size(730, 30); 163 | this.weatherDayMore8.MinimumSize = new System.Drawing.Size(730, 30); 164 | this.weatherDayMore8.Name = "weatherDayMore8"; 165 | this.weatherDayMore8.Size = new System.Drawing.Size(730, 30); 166 | this.weatherDayMore8.TabIndex = 2; 167 | this.weatherDayMore8.Temperature = null; 168 | this.weatherDayMore8.Wind1 = null; 169 | this.weatherDayMore8.Wind2 = null; 170 | // 171 | // weatherDayMore7 172 | // 173 | this.weatherDayMore7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 174 | this.weatherDayMore7.Day = null; 175 | this.weatherDayMore7.Info = null; 176 | this.weatherDayMore7.Location = new System.Drawing.Point(5, 464); 177 | this.weatherDayMore7.MaximumSize = new System.Drawing.Size(730, 30); 178 | this.weatherDayMore7.MinimumSize = new System.Drawing.Size(730, 30); 179 | this.weatherDayMore7.Name = "weatherDayMore7"; 180 | this.weatherDayMore7.Size = new System.Drawing.Size(730, 30); 181 | this.weatherDayMore7.TabIndex = 2; 182 | this.weatherDayMore7.Temperature = null; 183 | this.weatherDayMore7.Wind1 = null; 184 | this.weatherDayMore7.Wind2 = null; 185 | // 186 | // weatherDayMore6 187 | // 188 | this.weatherDayMore6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 189 | this.weatherDayMore6.Day = null; 190 | this.weatherDayMore6.Info = null; 191 | this.weatherDayMore6.Location = new System.Drawing.Point(5, 428); 192 | this.weatherDayMore6.MaximumSize = new System.Drawing.Size(730, 30); 193 | this.weatherDayMore6.MinimumSize = new System.Drawing.Size(730, 30); 194 | this.weatherDayMore6.Name = "weatherDayMore6"; 195 | this.weatherDayMore6.Size = new System.Drawing.Size(730, 30); 196 | this.weatherDayMore6.TabIndex = 2; 197 | this.weatherDayMore6.Temperature = null; 198 | this.weatherDayMore6.Wind1 = null; 199 | this.weatherDayMore6.Wind2 = null; 200 | // 201 | // weatherDayMore5 202 | // 203 | this.weatherDayMore5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 204 | this.weatherDayMore5.Day = null; 205 | this.weatherDayMore5.Info = null; 206 | this.weatherDayMore5.Location = new System.Drawing.Point(5, 392); 207 | this.weatherDayMore5.MaximumSize = new System.Drawing.Size(730, 30); 208 | this.weatherDayMore5.MinimumSize = new System.Drawing.Size(730, 30); 209 | this.weatherDayMore5.Name = "weatherDayMore5"; 210 | this.weatherDayMore5.Size = new System.Drawing.Size(730, 30); 211 | this.weatherDayMore5.TabIndex = 2; 212 | this.weatherDayMore5.Temperature = null; 213 | this.weatherDayMore5.Wind1 = null; 214 | this.weatherDayMore5.Wind2 = null; 215 | // 216 | // weatherDayMore4 217 | // 218 | this.weatherDayMore4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 219 | this.weatherDayMore4.Day = null; 220 | this.weatherDayMore4.Info = null; 221 | this.weatherDayMore4.Location = new System.Drawing.Point(5, 356); 222 | this.weatherDayMore4.MaximumSize = new System.Drawing.Size(730, 30); 223 | this.weatherDayMore4.MinimumSize = new System.Drawing.Size(730, 30); 224 | this.weatherDayMore4.Name = "weatherDayMore4"; 225 | this.weatherDayMore4.Size = new System.Drawing.Size(730, 30); 226 | this.weatherDayMore4.TabIndex = 2; 227 | this.weatherDayMore4.Temperature = null; 228 | this.weatherDayMore4.Wind1 = null; 229 | this.weatherDayMore4.Wind2 = null; 230 | // 231 | // weatherDayMore3 232 | // 233 | this.weatherDayMore3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 234 | this.weatherDayMore3.Day = null; 235 | this.weatherDayMore3.Info = null; 236 | this.weatherDayMore3.Location = new System.Drawing.Point(5, 320); 237 | this.weatherDayMore3.MaximumSize = new System.Drawing.Size(730, 30); 238 | this.weatherDayMore3.MinimumSize = new System.Drawing.Size(730, 30); 239 | this.weatherDayMore3.Name = "weatherDayMore3"; 240 | this.weatherDayMore3.Size = new System.Drawing.Size(730, 30); 241 | this.weatherDayMore3.TabIndex = 2; 242 | this.weatherDayMore3.Temperature = null; 243 | this.weatherDayMore3.Wind1 = null; 244 | this.weatherDayMore3.Wind2 = null; 245 | // 246 | // weatherDayMore2 247 | // 248 | this.weatherDayMore2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 249 | this.weatherDayMore2.Day = null; 250 | this.weatherDayMore2.Info = null; 251 | this.weatherDayMore2.Location = new System.Drawing.Point(5, 284); 252 | this.weatherDayMore2.MaximumSize = new System.Drawing.Size(730, 30); 253 | this.weatherDayMore2.MinimumSize = new System.Drawing.Size(730, 30); 254 | this.weatherDayMore2.Name = "weatherDayMore2"; 255 | this.weatherDayMore2.Size = new System.Drawing.Size(730, 30); 256 | this.weatherDayMore2.TabIndex = 2; 257 | this.weatherDayMore2.Temperature = null; 258 | this.weatherDayMore2.Wind1 = null; 259 | this.weatherDayMore2.Wind2 = null; 260 | // 261 | // weatherDayMore1 262 | // 263 | this.weatherDayMore1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 264 | this.weatherDayMore1.Day = null; 265 | this.weatherDayMore1.Info = null; 266 | this.weatherDayMore1.Location = new System.Drawing.Point(5, 248); 267 | this.weatherDayMore1.MaximumSize = new System.Drawing.Size(730, 30); 268 | this.weatherDayMore1.MinimumSize = new System.Drawing.Size(730, 30); 269 | this.weatherDayMore1.Name = "weatherDayMore1"; 270 | this.weatherDayMore1.Size = new System.Drawing.Size(730, 30); 271 | this.weatherDayMore1.TabIndex = 2; 272 | this.weatherDayMore1.Temperature = null; 273 | this.weatherDayMore1.Wind1 = null; 274 | this.weatherDayMore1.Wind2 = null; 275 | // 276 | // weatherDay7 277 | // 278 | this.weatherDay7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 279 | this.weatherDay7.Day = null; 280 | this.weatherDay7.Info = null; 281 | this.weatherDay7.Location = new System.Drawing.Point(635, 33); 282 | this.weatherDay7.MaximumSize = new System.Drawing.Size(99, 209); 283 | this.weatherDay7.MinimumSize = new System.Drawing.Size(99, 209); 284 | this.weatherDay7.Name = "weatherDay7"; 285 | this.weatherDay7.Size = new System.Drawing.Size(99, 209); 286 | this.weatherDay7.TabIndex = 1; 287 | this.weatherDay7.Temperature = null; 288 | this.weatherDay7.Wind = null; 289 | // 290 | // weatherDay6 291 | // 292 | this.weatherDay6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 293 | this.weatherDay6.Day = null; 294 | this.weatherDay6.Info = null; 295 | this.weatherDay6.Location = new System.Drawing.Point(530, 33); 296 | this.weatherDay6.MaximumSize = new System.Drawing.Size(99, 209); 297 | this.weatherDay6.MinimumSize = new System.Drawing.Size(99, 209); 298 | this.weatherDay6.Name = "weatherDay6"; 299 | this.weatherDay6.Size = new System.Drawing.Size(99, 209); 300 | this.weatherDay6.TabIndex = 1; 301 | this.weatherDay6.Temperature = null; 302 | this.weatherDay6.Wind = null; 303 | // 304 | // weatherDay5 305 | // 306 | this.weatherDay5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 307 | this.weatherDay5.Day = null; 308 | this.weatherDay5.Info = null; 309 | this.weatherDay5.Location = new System.Drawing.Point(425, 33); 310 | this.weatherDay5.MaximumSize = new System.Drawing.Size(99, 209); 311 | this.weatherDay5.MinimumSize = new System.Drawing.Size(99, 209); 312 | this.weatherDay5.Name = "weatherDay5"; 313 | this.weatherDay5.Size = new System.Drawing.Size(99, 209); 314 | this.weatherDay5.TabIndex = 1; 315 | this.weatherDay5.Temperature = null; 316 | this.weatherDay5.Wind = null; 317 | // 318 | // weatherDay4 319 | // 320 | this.weatherDay4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 321 | this.weatherDay4.Day = null; 322 | this.weatherDay4.Info = null; 323 | this.weatherDay4.Location = new System.Drawing.Point(320, 33); 324 | this.weatherDay4.MaximumSize = new System.Drawing.Size(99, 209); 325 | this.weatherDay4.MinimumSize = new System.Drawing.Size(99, 209); 326 | this.weatherDay4.Name = "weatherDay4"; 327 | this.weatherDay4.Size = new System.Drawing.Size(99, 209); 328 | this.weatherDay4.TabIndex = 1; 329 | this.weatherDay4.Temperature = null; 330 | this.weatherDay4.Wind = null; 331 | // 332 | // weatherDay3 333 | // 334 | this.weatherDay3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 335 | this.weatherDay3.Day = null; 336 | this.weatherDay3.Info = null; 337 | this.weatherDay3.Location = new System.Drawing.Point(215, 33); 338 | this.weatherDay3.MaximumSize = new System.Drawing.Size(99, 209); 339 | this.weatherDay3.MinimumSize = new System.Drawing.Size(99, 209); 340 | this.weatherDay3.Name = "weatherDay3"; 341 | this.weatherDay3.Size = new System.Drawing.Size(99, 209); 342 | this.weatherDay3.TabIndex = 1; 343 | this.weatherDay3.Temperature = null; 344 | this.weatherDay3.Wind = null; 345 | // 346 | // weatherDay2 347 | // 348 | this.weatherDay2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 349 | this.weatherDay2.Day = null; 350 | this.weatherDay2.Info = null; 351 | this.weatherDay2.Location = new System.Drawing.Point(110, 33); 352 | this.weatherDay2.MaximumSize = new System.Drawing.Size(99, 209); 353 | this.weatherDay2.MinimumSize = new System.Drawing.Size(99, 209); 354 | this.weatherDay2.Name = "weatherDay2"; 355 | this.weatherDay2.Size = new System.Drawing.Size(99, 209); 356 | this.weatherDay2.TabIndex = 1; 357 | this.weatherDay2.Temperature = null; 358 | this.weatherDay2.Wind = null; 359 | // 360 | // weatherDay1 361 | // 362 | this.weatherDay1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 363 | this.weatherDay1.Day = null; 364 | this.weatherDay1.Info = null; 365 | this.weatherDay1.Location = new System.Drawing.Point(5, 33); 366 | this.weatherDay1.MaximumSize = new System.Drawing.Size(99, 209); 367 | this.weatherDay1.MinimumSize = new System.Drawing.Size(99, 209); 368 | this.weatherDay1.Name = "weatherDay1"; 369 | this.weatherDay1.Size = new System.Drawing.Size(99, 209); 370 | this.weatherDay1.TabIndex = 0; 371 | this.weatherDay1.Temperature = ""; 372 | this.weatherDay1.Wind = null; 373 | // 374 | // MainForm 375 | // 376 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 377 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 378 | this.ClientSize = new System.Drawing.Size(738, 557); 379 | this.Controls.Add(this.statusStrip); 380 | this.Controls.Add(this.toolStrip); 381 | this.Controls.Add(this.weatherDayMore8); 382 | this.Controls.Add(this.weatherDayMore7); 383 | this.Controls.Add(this.weatherDayMore6); 384 | this.Controls.Add(this.weatherDayMore5); 385 | this.Controls.Add(this.weatherDayMore4); 386 | this.Controls.Add(this.weatherDayMore3); 387 | this.Controls.Add(this.weatherDayMore2); 388 | this.Controls.Add(this.weatherDayMore1); 389 | this.Controls.Add(this.weatherDay7); 390 | this.Controls.Add(this.weatherDay6); 391 | this.Controls.Add(this.weatherDay5); 392 | this.Controls.Add(this.weatherDay4); 393 | this.Controls.Add(this.weatherDay3); 394 | this.Controls.Add(this.weatherDay2); 395 | this.Controls.Add(this.weatherDay1); 396 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 397 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 398 | this.MaximizeBox = false; 399 | this.Name = "MainForm"; 400 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; 401 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 402 | this.Text = "天气预报"; 403 | this.Load += new System.EventHandler(this.MainForm_Load); 404 | this.toolStrip.ResumeLayout(false); 405 | this.toolStrip.PerformLayout(); 406 | this.statusStrip.ResumeLayout(false); 407 | this.statusStrip.PerformLayout(); 408 | this.ResumeLayout(false); 409 | this.PerformLayout(); 410 | 411 | } 412 | 413 | #endregion 414 | 415 | private WeatherDay weatherDay1; 416 | private WeatherDay weatherDay2; 417 | private WeatherDay weatherDay3; 418 | private WeatherDay weatherDay4; 419 | private WeatherDay weatherDay5; 420 | private WeatherDay weatherDay6; 421 | private WeatherDay weatherDay7; 422 | private WeatherDayMore weatherDayMore1; 423 | private System.Windows.Forms.ToolStrip toolStrip; 424 | private System.Windows.Forms.ToolStripDropDownButton buttonCustom; 425 | private System.Windows.Forms.ToolStripButton buttonAbout; 426 | private WeatherDayMore weatherDayMore2; 427 | private WeatherDayMore weatherDayMore3; 428 | private WeatherDayMore weatherDayMore4; 429 | private WeatherDayMore weatherDayMore5; 430 | private WeatherDayMore weatherDayMore6; 431 | private WeatherDayMore weatherDayMore7; 432 | private System.Windows.Forms.StatusStrip statusStrip; 433 | private System.Windows.Forms.ToolStripStatusLabel lblStatus; 434 | private System.Windows.Forms.ToolStripStatusLabel lblVerson; 435 | private System.Windows.Forms.ToolStripComboBox comboBoxProvince; 436 | private System.Windows.Forms.ToolStripComboBox comboBoxCity; 437 | private System.Windows.Forms.ToolStripComboBox comboBoxDistrict; 438 | private System.Windows.Forms.ToolStripButton buttonSearch; 439 | private WeatherDayMore weatherDayMore8; 440 | } 441 | } 442 | 443 | -------------------------------------------------------------------------------- /Weather/MainForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Reflection; 11 | using System.IO; 12 | 13 | namespace Weather 14 | { 15 | public partial class MainForm : Form 16 | { 17 | public MainForm() 18 | { 19 | InitializeComponent(); 20 | } 21 | 22 | 23 | public void InvokeToForm(Action action) => this.Invoke(action); 24 | public void BeginInvokeToForm(Action action) => this.BeginInvoke(action); 25 | private void BindProvince() 26 | { 27 | this.InvokeToForm(() => 28 | { 29 | comboBoxProvince.ComboBox.ValueMember = "ID"; 30 | comboBoxProvince.ComboBox.DisplayMember = "Name"; 31 | }); 32 | PlaceModel[] provinces = Place.GetProvinces(); 33 | if(provinces != null) 34 | { 35 | this.InvokeToForm(() => comboBoxProvince.ComboBox.DataSource = provinces); 36 | } 37 | } 38 | 39 | private void BindCity() 40 | { 41 | PlaceModel city = null; 42 | this.InvokeToForm(() => 43 | { 44 | comboBoxCity.ComboBox.ValueMember = "ID"; 45 | comboBoxCity.ComboBox.DisplayMember = "Name"; 46 | city = comboBoxProvince.ComboBox.SelectedItem as PlaceModel; 47 | }); 48 | if(city != null) 49 | { 50 | PlaceModel[] citys = Place.GetCitys(city); 51 | this.InvokeToForm(() => comboBoxCity.ComboBox.DataSource = citys); 52 | } 53 | } 54 | 55 | private void BindDistrict() 56 | { 57 | PlaceModel province = null; 58 | PlaceModel city = null; 59 | this.InvokeToForm(() => 60 | { 61 | comboBoxDistrict.ComboBox.ValueMember = "ID"; 62 | comboBoxDistrict.ComboBox.DisplayMember = "Name"; 63 | province = comboBoxProvince.ComboBox.SelectedItem as PlaceModel; 64 | city = comboBoxCity.ComboBox.SelectedItem as PlaceModel; 65 | }); 66 | if(province != null && city != null) 67 | { 68 | PlaceModel[] districts = Place.GetDistricts(province, city); 69 | this.InvokeToForm(() => comboBoxDistrict.ComboBox.DataSource = districts); 70 | } 71 | else 72 | { 73 | this.InvokeToForm(() => lblStatus.Text = "地区加载错误,请确保联网正确"); 74 | } 75 | } 76 | 77 | private void MainForm_Load(object sender, EventArgs e) 78 | { 79 | lblVerson.Text = $"版本:{Assembly.GetExecutingAssembly().GetName().Version.ToString()}"; 80 | lblStatus.Text = "数据加载中"; 81 | BindMenu(); 82 | Task.Factory.StartNew(() => 83 | { 84 | BindProvince(); 85 | BindCity(); 86 | BindDistrict(); 87 | this.BeginInvokeToForm(() => { 88 | if(areas!= null && areas.Areas!= null && areas.Areas.Length >0) 89 | { 90 | comboBoxProvince.SelectedItem = areas.Areas[0].Province; 91 | comboBoxCity.SelectedItem = areas.Areas[0].City; 92 | comboBoxDistrict.SelectedItem = areas.Areas[0].District; 93 | } 94 | buttonSearch.PerformClick(); 95 | }); 96 | }).ContinueWith(t=> 97 | { 98 | if(t.IsFaulted) 99 | { 100 | this.InvokeToForm(() => lblStatus.Text = "地区加载错误,请确保联网正确"); 101 | } 102 | }); 103 | 104 | } 105 | 106 | private void ComboBoxProvince_SelectedIndexChanged(object sender, EventArgs e) 107 | { 108 | BindCity(); 109 | } 110 | 111 | private void comboBoxCity_SelectedIndexChanged(object sender, EventArgs e) 112 | { 113 | BindDistrict(); 114 | } 115 | 116 | private void buttonSearch_Click(object sender, EventArgs e) 117 | { 118 | PlaceModel province = null, city= null, district = null; 119 | this.InvokeToForm(() => 120 | { 121 | province = this.comboBoxProvince.ComboBox.SelectedItem as PlaceModel; 122 | city = this.comboBoxCity.ComboBox.SelectedItem as PlaceModel; 123 | district = this.comboBoxDistrict.ComboBox.SelectedItem as PlaceModel; 124 | }); 125 | if(province != null && city != null && district != null) 126 | { 127 | this.InvokeToForm(() =>lblStatus.Text = "查询中"); 128 | Task.Factory.StartNew(() => 129 | { 130 | WeatherDetail detail = this.Search(province, city, district); 131 | this.Invoke(new Action(() => 132 | { 133 | this.SetWeather(detail); 134 | lblStatus.Text = "已完成"; 135 | })); 136 | }).ContinueWith(t=> 137 | { 138 | if(t.IsFaulted) 139 | { 140 | this.InvokeToForm(() =>lblStatus.Text = "查询错误,请确保联网正确"); 141 | } 142 | }); 143 | } 144 | } 145 | 146 | private void SetWeather(WeatherDetail detail) 147 | { 148 | WeatherDay[] weatherDays = new WeatherDay[] { weatherDay1, weatherDay2, weatherDay3, weatherDay4, weatherDay5, weatherDay6, weatherDay7 }; 149 | for(int i=0;i(path); 187 | if(areas != null) 188 | { 189 | for(int i=0;i 198 | { 199 | ToolStripMenuItem _toolStripMenuItem = (ToolStripMenuItem)s; 200 | Area area = (Area)_toolStripMenuItem.Tag; 201 | comboBoxProvince.SelectedItem = area.Province; 202 | comboBoxCity.SelectedItem = area.City; 203 | comboBoxDistrict.SelectedItem = area.District; 204 | buttonSearch.PerformClick(); 205 | }; 206 | buttonCustom.DropDownItems.Add(toolStripMenuItem); 207 | } 208 | } 209 | else 210 | { 211 | areas = new AreaCollection(); 212 | } 213 | buttonCustom.DropDownItems.Add(new ToolStripSeparator()); 214 | ToolStripMenuItem toolStripMenuItem1 = new ToolStripMenuItem() 215 | { 216 | Name = "toolStripMenuItem_AddCity", 217 | Text = "添加城市", 218 | }; 219 | toolStripMenuItem1.Click += (s, o) => 220 | { 221 | PlaceModel province = comboBoxProvince.ComboBox.SelectedItem as PlaceModel; 222 | PlaceModel city = comboBoxCity.ComboBox.SelectedItem as PlaceModel; 223 | PlaceModel district = comboBoxDistrict.ComboBox.SelectedItem as PlaceModel; 224 | if(province != null && city != null && district != null) 225 | { 226 | areas.Add(new Area() { Name = district.Name, Province = province, City = city, District = district }); 227 | XmlOperator.Serialize(path,areas); 228 | BindMenu(); 229 | } 230 | }; 231 | buttonCustom.DropDownItems.Add(toolStripMenuItem1); 232 | 233 | 234 | ToolStripMenuItem toolStripMenuItem2 = new ToolStripMenuItem() 235 | { 236 | Name = "toolStripMenuItem_DeleteCity", 237 | Text = "删除城市", 238 | }; 239 | toolStripMenuItem2.Click += (s, o) => 240 | { 241 | PlaceModel province = comboBoxProvince.ComboBox.SelectedItem as PlaceModel; 242 | PlaceModel city = comboBoxCity.ComboBox.SelectedItem as PlaceModel; 243 | PlaceModel district = comboBoxDistrict.ComboBox.SelectedItem as PlaceModel; 244 | if (province != null && city != null && district != null) 245 | { 246 | areas.Remove(new Area() { Name = district.Name, Province = province, City = city, District = district }); 247 | XmlOperator.Serialize(path, areas); 248 | BindMenu(); 249 | } 250 | }; 251 | buttonCustom.DropDownItems.Add(toolStripMenuItem2); 252 | } 253 | } 254 | } 255 | -------------------------------------------------------------------------------- /Weather/MainForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 125 | 126 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 127 | YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG 128 | YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 129 | 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw 130 | bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc 131 | VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 132 | c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 133 | Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo 134 | mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ 135 | kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D 136 | TgDQASA1MVpwzwAAAABJRU5ErkJggg== 137 | 138 | 139 | 140 | 141 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/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M+LNQDIhjEA2pM3ANaQMyfTjTKrz4sx+s2JMP/MiTD/zIkw/8yJ 192 | MP/MiTD/zIkw/8yJMP/MiTD/zIkw/8yJMP/MiTD/zIkw/8yJMP/MiTD/zIkw/8yJMP/MiTD/zIkw/8yJ 193 | MP/MiTD/zIkw/8yJMP/MiTD/zIkw/8yJMP/MiTD/zoox/9KNMs/UjjJNuHocANGMMgDRjDMAAAAAAAAA 194 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzJAyAMWGMgDdkzMA1I40OdSOM8vPizL/zYoy/82K 195 | Mv/NijL/zYoy/82KMv/NijL/zYoy/82KMv/NijL/zYoy/82KMv/NijL/zYoy/82KMv/NijL/zYoy/82K 196 | Mv/NijL/zYoy/82KMv/NijL/zYoy/82KMv/NijL/zYoy/82KMv/NijL/zYoy/86KMv/SjTPq1pAzZcOC 197 | LgPRjDMA0IwzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADNijcA/6g+ANqSNgDWjzU11I4008+L 198 | M//OijP/zooz/86KM//OijP/zooz/86KM//OijP/zooz/86KM//OijP/zooz/86KM//OijP/zooz/86K 199 | M//OijP/zooz/86KM//OijP/zooz/86KM//OijP/zooz/86KM//OijP/zooz/86KM//OijP/zooz/86K 200 | M//OizP/04408NeQNWW0dCkB0o0zANaMMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADRjTUA1pA1ANSP 201 | NSDVkDXE0Iw0/8+LNP/PizT/z4s0/8+LNP/PjDT/z4sz/8+KMv/PijL/z4oy/8+KMv/PijL/z4oy/8+K 202 | Mv/PijL/z4oy/8+KMv/PijL/z4oy/8+KMv/PijL/z4oy/8+KMv/PijL/z4oy/8+KMv/PijL/z4sz/9CM 203 | NP/PizT/z4s0/8+LNP/PizT/z4w0/9SPNerWkDVN25Y3AKRdHwDMiDEAAAAAAAAAAAAAAAAAAAAAANKQ 204 | NwDQjDUA0Is1B9aRN5rSjjX/0I01/9CNNf/QjTX/0I01/9CMNP/LiDH/x4s9/8eQSf/HkUr/x5FK/8eR 205 | Sv/HkUr/x5FK/8eRSv/HkUr/x5FK/8eRSv/HkUr/x5FK/8eRSv/HkUr/x5FK/8eRSv/HkUr/x5FK/8eR 206 | Sv/HkUn/xoxA/8mHM//PizL/0I01/9CNNf/QjTX/0I01/9CNNf/VkDbQ1pE2I9eSNwDXlDkAAAAAAAAA 207 | AAAAAAAAAAAAAMCFMgDblDgA15E3U9SQN/TRjTb/0Y42/9GONv/Rjjb/0Y01/8yMOP/Ur3//7ODP//Xu 208 | 5f/17ub/9e7m//Xu5v/17ub/9e7m//Xu5v/17ub/9e7m//Xu5v/17ub/9e7m//Xu5v/17ub/9e7m//Xu 209 | 5v/17ub/9e7m//Xu5v/17uX/8ObZ/97Fpf/Ll1P/zosz/9GONv/Rjjb/0Y42/9GNNv/Tjzb/15I3ks6N 210 | NgTSjzcAAAAAAAAAAAAAAAAA1JQ/ANSQNwDVkTcS15I4v9KPN//Rjjf/0Y43/9GON//Rjjf/z4w1/9u4 211 | i//8+vn///////////////////////////////////////////////////////////////////////// 212 | ///////////////////////////////////////////////////y6t//0qNn/9CMNP/Rjjf/0Y43/9GO 213 | N//Rjjf/1ZE46teSODvYkzkA0o85AAAAAAAAAAAA0ow0ANyVOgDYkzlX1pE5+NKPOP/Tjzj/0484/9OP 214 | OP/Sjjb/1ZpQ//bt4v////////////////////////////////////////////////////////////// 215 | ////////////////////////////////////////////////////////////////////////8ebZ/9KY 216 | Tv/Sjjb/0484/9OPOP/Tjzj/1JA4/9iTOZjKiTED0I01AMSJOQAAAAAA0pE7ANOSPAfZlDur1JE5/9OQ 217 | Of/TkDn/05A5/9OQOf/SjjX/3q5v//37+f////////////////////////////////////////////// 218 | //////////////////////////////////////////////////////////////////////////////// 219 | /////////////+G9jv/Sjjb/05A5/9OQOf/TkDn/05A5/9iTOt/ZlDwn2ZQ7ANeUPQDWkTkA2ZU8ANmV 220 | PCzYlDvk1JE6/9SROv/UkTr/1JE6/9SROv/Tjzf/361s//37+P////////////////////////////// 221 | //////////////////////////////////////////////////////////////////////////////// 222 | /////////////////////////////+/Yu//UkTv/1JE6/9SROv/UkTr/1JE6/9eTO/3ZlTxm35g8AM+Q 223 | PgDWlDgA3JY9ANqVPGLYlDz91ZI7/9WSO//Vkjv/1ZI7/9WSO//VkTr/2ZxN//fq2v////////////// 224 | //////////////////////////////////////////////////////////////////////////////// 225 | //////////////////////////////////////////////LexP/WlD7/1ZI7/9WSO//Vkjv/1ZI7/9aT 226 | O//alTymzo42BNSROADWkj8ApnMyAdyXPpnXlD3/1pM8/9aTPP/Wkzz/1pM8/9aTPP/Wkzz/1ZI6/+O2 227 | fP/89e7///////////////////////////////////////////////////////////////////////// 228 | /////////////////////////////////////////////////////////////+7TsP/Wkjv/1pM8/9aT 229 | PP/Wkzz/1pM8/9aTPP/blj7T2ZU9GdaTPADYlkEA25hCDtuXP8LXlD3/15Q9/9eUPf/XlD3/15Q9/9eU 230 | Pf/XlD3/15Q9/9aSO//cqWb/7tKv//ThyP/68eb///////////////////////////////////////// 231 | /////////////////////////////////////////////////////////////////////////vz5/+O0 232 | eP/Wkjr/15Q9/9eUPf/XlD3/15Q9/9eUPf/alj7u2pdANtqWPwDYlkAA25hBIN2YQNzYlT7/2JU+/9iV 233 | Pv/XlT//0JJA/86PPf/Pjzz/1ZI8/9GZUf/Urnz/zp1c/9OVRf/tzaX///////////////////////// 234 | //////////////////////////////////////////////////////////////////////////////// 235 | ////////8Na0/9mYRP/XlD7/2JU+/9iVPv/YlT7/2JU+/9eUPv/blz/635tBV+SdQgDZl0AA2phCM9qX 236 | QO7Ylj//2JY//9iVP//YlT//wa51/6XNtP+qxqf/zJ9a/+rVu//+/v7/+PTu/961gP/jtXn//v37//// 237 | //////////////////////////////////////////////////////////////////////////////// 238 | //////////////359P/v06//255O/9iVPv/YlkD/2JY//9iWP//Ylj//2JY//9iVP//al0D/3JlBcuGb 239 | QADinUMA4JxDRtyYQfbZlkD/2ZZA/9mWQP/ZlkD/15tJ/7rJof+w1rz/3rqI//38+////////////+/f 240 | zP/Vm1H/8NWz///+/v////////////////////////////////////////////////////////////// 241 | ///////////////////57+L/7Mqe/+Kwbv/amET/2ZY//9mWQP/ZlkD/2ZZA/9mWQP/ZlkD/2ZZA/9mW 242 | QP/al0H/25hBiOKWOgDpoUYA455FU96aQ/nal0L/2pdC/9qXQv/al0L/25dA/9eWQf/PnlP/79W0//// 243 | //////////////79/f/ixqL/05lP/+a+iv/z3cD/893A/+3No//79ez///////////////////////// 244 | ///////////////////////////////////v0q3/2ZQ8/9mWP//al0H/2pdC/9qXQv/al0L/2pdC/9qX 245 | Qv/al0L/2pdC/9qXQv/bmEL/4JxElsmWSgHpokcA455FWt+bRPvbmEL/25hD/9uYQ//al0L/zpVH/7at 246 | e//FrXH/9N3B///////////////////////9/Pv/6da//9Spc//QnFr/0pxW/9qbSP/14cj///////// 247 | ///////////////////////////////////////////////+/v/ov4n/2pY//9uYQ//bmEP/25hD/9uY 248 | Q//bmEP/25hD/9uYQ//bmEP/25hD/9uYQ//cmUP/455FnNSVQgPpo0gA5J9GXeCcRfvbmUT/3JlE/9yZ 249 | Q//VnlD/ssSg/6Ds6f+4xp7/8dOu//////////////////////////////////z7+f/38uv/8N7H/92d 250 | S//pv4j//v38//////////////////////////////////////////////////nt3f/gpFf/25hC/9yZ 251 | RP/cmUT/3JlE/9yZRP/cmUT/3JlE/9yZRP/cmUT/3JlE/9yZRP/dmkT/5J9Gn9WVQgTqpEkA5aBIXeGd 252 | RvvcmkX/3ZpF/92aRf/cnEf/2KJV/9GrZv/Op2H/5LV5//779/////////////////////////////// 253 | ////////78+n/9yZQ//enkz/89u8/////////////////////////////////////////////fn1/+i9 254 | hP/cmUL/3ZpF/92aRf/dmkX/3ZpF/92aRf/dmkX/3ZpF/92aRf/dmkX/3ZpF/92aRf/em0X/5aBHn9SX 255 | QgTspUoA5qFIWOKeR/rdm0b/3ptG/96bRv/em0b/3ptF/9+ZQf/Hpmb/vbB9/+/Srv////////////// 256 | ///////////////////35dD/3qNY/92aRP/dmkT/4KRW//LZuP/+/Pn///////////////////////// 257 | ///78+j/6sGM/96bRv/dm0b/3ptG/96bRv/em0b/3ptG/96bRv/em0b/3ptG/96bRv/em0b/3ptG/92b 258 | Rv/fnEb/5aFJm9OWRwPspksA56NLT+KfSPjenEf/3pxH/96cR//enEf/35xG/9WdTv+o18T/peLW/9Kq 259 | Z//rxpr/++/i//77+P///Pn//fXt//HYuP/Lr3j/v612/96bRv/enEf/3ptF/9+fTf/pu4L/89u9//nr 260 | 2v/67+D/9+bS//DQqP/krWf/3ptF/96cRv/enEf/3pxH/96cR//enEf/3pxH/96cR//enEf/3pxH/96c 261 | R//enEf/3pxH/96cR//fnUf/46BJksGUYgHlokoA5KFKQOGeSfTfnUj/351I/9+dSP/fnUj/4JxG/8+t 262 | a//AxJf/065q/9SnX/+0uZD/y694/+S3e//YtoX/0q1z/9ijWP+r17//puDS/9mfUP/gnUf/351I/9+d 263 | R//fm0X/351J/+GjU//ipVf/4aFP/9+cRv/fnEb/351I/9+dSP/fnUj/351I/9+dSP/fnUj/351I/9+d 264 | SP/fnUj/351I/9+dSP/fnUj/351I/9+dSP/gnkj/4Z5JguacQwDgnkoA4aBLLeOgSungnkn/4J5J/+Ce 265 | Sf/gnkn/4J5J/9+fS//hnUf/4ptE/9OtaP+h7uv/wMOV/9miU/+p1L//r9O4/96gTv/VrWj/ttGx/9Cs 266 | av/hnUf/4J5J/+CeSf/gnkn/4J5J/+CdSP/gnUj/4J1I/+CeSf/gnkn/4J5J/+CeSf/gnkn/4J5J/+Ce 267 | Sf/gnkn/4J5J/+CeSf/gnkn/4J5J/+CeSf/gnkn/4J5J/+CeSf/joEr+5aFLauqlTADioE0A5qNOG+ej 268 | TNXhn0r/4Z9K/+GfSv/hn0r/4Z9K/+GfSv/hn0r/4p1H/9Kxbv+9zKT/36FQ/+KeSP+9zaj/udGw/+Ke 269 | SP/inkj/36FQ/92kVf/hnkn/4Z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7/5KJO/+SiTv/kok7/5KNP/+q3dv/svoP/5qhZ/+SjUP/osGj/5KJO/+ShTP/nrGH/7LyA/+Si 283 | Tf/kok7/5KJO/+SiTv/kok7/5KJO/+SiTv/kok7/5KJO/+ilT/fqp1BQ7KdRAN+wUQAAAAAA4aNSAM2Z 284 | UwHrp1KS56RQ/+WjT//lo0//5aNP/+WjT//lo0//5aNP/+WjT//lo0//5aNP/+WjT//lo0//5aNP/+Wj 285 | T//lo0//5aNP/+WjT//lo0//5aNP/+WjT//lo1D/5aNO/+WiTv/or2b/7sKK/+epW//loUz/5aRS/+u5 286 | eP/wyZj/6K1h/+WiTf/lok7/5aNP/+WjUP/lo0//5aNP/+WjT//lo0//5aNQ/+qnUc7qp1EY6aZRAOGk 287 | TwAAAAAA5KNRAO2pUwDsqFI86qdS7eakUP/mpFD/5qRQ/+akUP/mpFD/5qRQ/+akUP/mpFD/5qRQ/+ak 288 | UP/mpFD/5qRQ/+akUP/mpFD/5qRQ/+akUP/mpFD/5qRQ/+akUP/mpFD/6bFp/+eoWP/lok3/6rJr/+y6 289 | fP/prmT/5qZU/+epWf/sunv/6rVw/+mvZv/suXj/6Ktd/+akUP/mpFD/5qRQ/+akUP/mpFD/6KZR/+yo 290 | Unr/uV4A4KBNAAAAAAAAAAAAAAAAAOmnUwDoplQG7apUn+imUv/npVL/56VS/+elUv/npVL/56VS/+el 291 | Uv/npVL/56VS/+elUv/npVL/56VS/+elUv/npVL/56VS/+elUv/npVL/56VS/+elUv/npE//7Ll4/+y4 292 | d//npVL/7LZz/+y6ev/tvX//67Nt/+elUf/st3T/7r+E/+6/hP/qsmr/7r+E/+elUv/npVL/56VS/+el 293 | Uv/npVL/7KlT1uypVCPrqFMA5KNOAAAAAAAAAAAAAAAAAO6qVADuq1UA7apUM+ypVOLoplP/56ZT/+em 294 | U//nplP/56ZT/+emU//nplP/56ZT/+emU//nplP/56ZT/+emU//nplP/56ZT/+emU//nplP/56ZT/+em 295 | U//nplL/6KlY/+6+gP/uv4P/7r6B/+mpWv/pqlv/7r6A/+6+gv/uvYD/6q9k/+/Bh//rsWn/7sCF/+im 296 | U//nplP/56ZT/+emUv/rqFT676tVa/+3XQDmpVEAAAAAAAAAAAAAAAAAAAAAAOimUwDjolIA//16AO+s 297 | VnDsqVX66KdU/+inVP/op1T/6KdU/+inVP/op1T/6KdU/+inVP/op1T/6KdU/+inVP/op1T/6KdU/+in 298 | VP/op1T/6KdU/+inVP/op1T/6KdT/+inU//pqFf/6KdT/+inU//oplP/6KdU/+moV//op1P/6KZT/+y0 299 | bf/uvH3/6q5h/+imU//op1T/6KdU/+qoVP/vrFar7alUDu2pVADnpVIAAAAAAAAAAAAAAAAAAAAAAAAA 300 | AADopVQA7qtVAO2rVQvxrVeZ7KpW/+moVf/pqFX/6ahV/+moVf/pqFX/6ahV/+moVf/pqFX/6ahV/+mo 301 | Vf/pqFX/6ahV/+moVf/pqFX/6ahV/+moVf/pqFX/6ahV/+moVf/pqFX/6ahV/+moVf/pqFX/6ahV/+mo 302 | Vf/pqFX/6ahV/+mnU//pp1P/6adU/+moVf/pqFX/6qlV//CtV8vxrVco869YAO+rVQAAAAAAAAAAAAAA 303 | AAAAAAAAAAAAAAAAAAAAAAAA8axWAPCsVgDuq1YW8K1YqO2qV//qqVb/6qlW/+qpVv/qqVb/6qlW/+qp 304 | Vv/qqVb/6qlW/+qpVv/qqVb/6qlW/+qpVv/qqVb/6qlW/+qpVv/qqVb/6qlW/+qpVv/qqVb/6qlW/+qp 305 | Vv/qqVb/6qlW/+qpVv/qqVb/6qlW/+qpVv/qqVb/6qlW/+qpVv/rqlb/8a1Y0/GuWDj4sVkAo3xIAOaj 306 | UwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4qlUAPuzXADzrlkA7qxXFvOvWpnvrFj566pX/+up 307 | V//rqVf/66lX/+upV//rqVf/66lX/+upV//rqVf/66lX/+upV//rqVf/66lX/+upV//rqVf/66lX/+up 308 | V//rqVf/66lX/+upV//rq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AAAgAAAAAABAADAAAAAAAEAAMAAAAAAAwAAwAAAAAADAADgAAAAAAcAAPAA 334 | AAAABwAA8AAAAAAPAAD4AAAAAB8AAPwAAAAAPwAA/wAAAAB/AAD/gAAAAf8AAP/wAAAH/wAA//wAAD// 335 | AAA= 336 | 337 | 338 | -------------------------------------------------------------------------------- /Weather/Place.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Net; 7 | using System.IO; 8 | 9 | namespace Weather 10 | { 11 | class Place 12 | { 13 | public static PlaceModel[] GetProvinces() 14 | { 15 | return GetPlaceList("http://www.weather.com.cn/data/city3jdata/china.html"); 16 | } 17 | 18 | public static PlaceModel[] GetCitys(PlaceModel province) 19 | { 20 | return GetPlaceList($"http://www.weather.com.cn/data/city3jdata/provshi/{province.ID}.html"); 21 | } 22 | 23 | public static PlaceModel[] GetDistricts(PlaceModel province,PlaceModel city) 24 | { 25 | return GetPlaceList($"http://www.weather.com.cn/data/city3jdata/station/{province.ID}{city.ID}.html"); 26 | } 27 | 28 | static PlaceModel[] GetPlaceList(string url) 29 | { 30 | try 31 | { 32 | HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest; 33 | //request.Timeout = 3000; 34 | HttpWebResponse response = request.GetResponse() as HttpWebResponse; 35 | using (Stream stream = response.GetResponseStream()) 36 | using (StreamReader reader = new StreamReader(stream)) 37 | { 38 | string content = reader.ReadToEnd(); 39 | response.Close(); 40 | return JsonToArray(content).ToArray(); 41 | } 42 | } 43 | catch 44 | { 45 | return new List().ToArray(); 46 | } 47 | } 48 | 49 | static PlaceModel[] JsonToArray(string json) 50 | { 51 | List list = new List(); 52 | string[] array1 = json.Replace("{", "").Replace("}", "").Split(','); 53 | string[] array2; 54 | for (int i = 0; i < array1.Length; i++) 55 | { 56 | array2 = array1[i].Split(':'); 57 | for (int j = 0; j < array2.Length; j = j + 2) 58 | { 59 | list.Add(new PlaceModel { ID = array2[j].Replace("\"", ""), Name = array2[j + 1].Replace("\"", "") }); 60 | } 61 | } 62 | return list.ToArray(); 63 | } 64 | } 65 | 66 | public class PlaceModel 67 | { 68 | public string ID { set; get; } 69 | public string Name { set; get; } 70 | 71 | public override bool Equals(object obj) 72 | { 73 | PlaceModel pm = (PlaceModel)obj; 74 | if (this.ID == pm.ID && this.Name == pm.Name) 75 | return true; 76 | return false; 77 | } 78 | public override int GetHashCode() 79 | { 80 | return (this.ID + this.Name).GetHashCode(); 81 | } 82 | 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Weather/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace Weather 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// 应用程序的主入口点。 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new MainForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Weather/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Weather")] 9 | [assembly: AssemblyDescription("Write By CNXY. http://www.cnc6.cn")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Weather")] 13 | [assembly: AssemblyCopyright("Copyright © CNXY 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("816affa4-d87c-4d20-805f-bee2c4dde70e")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | // 方法是按如下所示使用“*”: : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.1")] 36 | [assembly: AssemblyFileVersion("1.0.0.1")] 37 | -------------------------------------------------------------------------------- /Weather/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Weather.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Weather.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 使用此强类型资源类,为所有资源查找 51 | /// 重写当前线程的 CurrentUICulture 属性。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Weather/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Weather/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Weather.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Weather/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Weather/Weather.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {816AFFA4-D87C-4D20-805F-BEE2C4DDE70E} 8 | WinExe 9 | Weather 10 | Weather 11 | v4.0 12 | 512 13 | true 14 | 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | logo.ico 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | Form 53 | 54 | 55 | MainForm.cs 56 | 57 | 58 | 59 | 60 | 61 | UserControl 62 | 63 | 64 | WeatherDay.cs 65 | 66 | 67 | UserControl 68 | 69 | 70 | WeatherDayMore.cs 71 | 72 | 73 | 74 | 75 | MainForm.cs 76 | 77 | 78 | ResXFileCodeGenerator 79 | Resources.Designer.cs 80 | Designer 81 | 82 | 83 | True 84 | Resources.resx 85 | True 86 | 87 | 88 | WeatherDay.cs 89 | 90 | 91 | WeatherDayMore.cs 92 | 93 | 94 | SettingsSingleFileGenerator 95 | Settings.Designer.cs 96 | 97 | 98 | True 99 | Settings.settings 100 | True 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Weather/WeatherDay.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Weather 2 | { 3 | partial class WeatherDay 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region 组件设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要修改 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.labelDay = new System.Windows.Forms.Label(); 32 | this.labelInfo = new System.Windows.Forms.Label(); 33 | this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 34 | this.labelTemp = new System.Windows.Forms.Label(); 35 | this.labelWind = new System.Windows.Forms.Label(); 36 | this.pictureBoxWeather = new System.Windows.Forms.PictureBox(); 37 | this.tableLayoutPanel.SuspendLayout(); 38 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWeather)).BeginInit(); 39 | this.SuspendLayout(); 40 | // 41 | // labelDay 42 | // 43 | this.labelDay.BackColor = System.Drawing.Color.LightGray; 44 | this.labelDay.Dock = System.Windows.Forms.DockStyle.Fill; 45 | this.labelDay.Location = new System.Drawing.Point(0, 0); 46 | this.labelDay.Margin = new System.Windows.Forms.Padding(0); 47 | this.labelDay.Name = "labelDay"; 48 | this.labelDay.Size = new System.Drawing.Size(97, 30); 49 | this.labelDay.TabIndex = 0; 50 | this.labelDay.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 51 | // 52 | // labelInfo 53 | // 54 | this.labelInfo.Dock = System.Windows.Forms.DockStyle.Fill; 55 | this.labelInfo.Location = new System.Drawing.Point(0, 30); 56 | this.labelInfo.Margin = new System.Windows.Forms.Padding(0); 57 | this.labelInfo.Name = "labelInfo"; 58 | this.labelInfo.Size = new System.Drawing.Size(97, 35); 59 | this.labelInfo.TabIndex = 1; 60 | this.labelInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 61 | // 62 | // tableLayoutPanel 63 | // 64 | this.tableLayoutPanel.ColumnCount = 1; 65 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 66 | this.tableLayoutPanel.Controls.Add(this.labelDay, 0, 0); 67 | this.tableLayoutPanel.Controls.Add(this.labelInfo, 0, 1); 68 | this.tableLayoutPanel.Controls.Add(this.labelTemp, 0, 2); 69 | this.tableLayoutPanel.Controls.Add(this.labelWind, 0, 3); 70 | this.tableLayoutPanel.Controls.Add(this.pictureBoxWeather, 0, 4); 71 | this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; 72 | this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0); 73 | this.tableLayoutPanel.Name = "tableLayoutPanel"; 74 | this.tableLayoutPanel.RowCount = 5; 75 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); 76 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); 77 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); 78 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); 79 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F)); 80 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 81 | this.tableLayoutPanel.Size = new System.Drawing.Size(97, 207); 82 | this.tableLayoutPanel.TabIndex = 2; 83 | // 84 | // labelTemp 85 | // 86 | this.labelTemp.Dock = System.Windows.Forms.DockStyle.Fill; 87 | this.labelTemp.Location = new System.Drawing.Point(0, 65); 88 | this.labelTemp.Margin = new System.Windows.Forms.Padding(0); 89 | this.labelTemp.Name = "labelTemp"; 90 | this.labelTemp.Size = new System.Drawing.Size(97, 35); 91 | this.labelTemp.TabIndex = 2; 92 | this.labelTemp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 93 | // 94 | // labelWind 95 | // 96 | this.labelWind.Dock = System.Windows.Forms.DockStyle.Fill; 97 | this.labelWind.Location = new System.Drawing.Point(0, 100); 98 | this.labelWind.Margin = new System.Windows.Forms.Padding(0); 99 | this.labelWind.Name = "labelWind"; 100 | this.labelWind.Size = new System.Drawing.Size(97, 35); 101 | this.labelWind.TabIndex = 3; 102 | this.labelWind.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 103 | // 104 | // pictureBoxWeather 105 | // 106 | this.pictureBoxWeather.Dock = System.Windows.Forms.DockStyle.Fill; 107 | this.pictureBoxWeather.Location = new System.Drawing.Point(0, 135); 108 | this.pictureBoxWeather.Margin = new System.Windows.Forms.Padding(0); 109 | this.pictureBoxWeather.Name = "pictureBoxWeather"; 110 | this.pictureBoxWeather.Size = new System.Drawing.Size(97, 72); 111 | this.pictureBoxWeather.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; 112 | this.pictureBoxWeather.TabIndex = 4; 113 | this.pictureBoxWeather.TabStop = false; 114 | // 115 | // WeatherDay 116 | // 117 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 118 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 119 | this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 120 | this.Controls.Add(this.tableLayoutPanel); 121 | this.MaximumSize = new System.Drawing.Size(99, 209); 122 | this.MinimumSize = new System.Drawing.Size(99, 209); 123 | this.Name = "WeatherDay"; 124 | this.Size = new System.Drawing.Size(97, 207); 125 | this.tableLayoutPanel.ResumeLayout(false); 126 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWeather)).EndInit(); 127 | this.ResumeLayout(false); 128 | 129 | } 130 | 131 | #endregion 132 | 133 | private System.Windows.Forms.Label labelDay; 134 | private System.Windows.Forms.Label labelInfo; 135 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; 136 | private System.Windows.Forms.Label labelTemp; 137 | private System.Windows.Forms.Label labelWind; 138 | private System.Windows.Forms.PictureBox pictureBoxWeather; 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /Weather/WeatherDay.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Drawing; 5 | using System.Data; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace Weather 12 | { 13 | [DefaultProperty("Day")] 14 | public partial class WeatherDay : UserControl 15 | { 16 | public WeatherDay() 17 | { 18 | InitializeComponent(); 19 | } 20 | 21 | string day; 22 | [Category("设置")] 23 | [Description("设置或获得日期")] 24 | [DefaultValue("")] 25 | public string Day 26 | { 27 | set 28 | { 29 | this.day = value; 30 | this.labelDay.Text = this.day; 31 | } 32 | get 33 | { 34 | return this.day; 35 | } 36 | } 37 | string info; 38 | [Category("设置")] 39 | [Description("设置或获得天气信息")] 40 | [DefaultValue("")] 41 | public string Info 42 | { 43 | set 44 | { 45 | this.info = value; 46 | this.labelInfo.Text = this.info; 47 | } 48 | get 49 | { 50 | return this.info; 51 | } 52 | } 53 | 54 | string temperature; 55 | [Category("设置")] 56 | [Description("设置或获得温度")] 57 | public string Temperature 58 | { 59 | set 60 | { 61 | this.temperature = value; 62 | this.labelTemp.Text = this.temperature; 63 | } 64 | get 65 | { 66 | return this.temperature; 67 | } 68 | } 69 | 70 | 71 | string wind; 72 | [Category("设置")] 73 | [Description("设置或获得风级")] 74 | [DefaultValue("")] 75 | public string Wind 76 | { 77 | set 78 | { 79 | this.wind = value; 80 | this.labelWind.Text = this.wind; 81 | } 82 | get 83 | { 84 | return this.wind; 85 | } 86 | } 87 | 88 | WeatherStatus status = WeatherStatus.Weizhi; 89 | [Category("设置")] 90 | [Description("设置或获得天气图标")] 91 | [DefaultValue(WeatherStatus.Weizhi)] 92 | public WeatherStatus WeatherStatus 93 | { 94 | set 95 | { 96 | this.status = value; 97 | this.pictureBoxWeather.ImageLocation = this.GetBigWeatherStatusString(this.status); 98 | } 99 | get 100 | { 101 | return this.status; 102 | } 103 | } 104 | 105 | string GetBigWeatherStatusString(WeatherStatus weatherStatus) 106 | { 107 | string url = "http://www.webxml.com.cn/images/weather/"; 108 | switch (weatherStatus) 109 | { 110 | case WeatherStatus.Weizhi: url += "a_nothing.gif";break; 111 | case WeatherStatus.Qing: url += "a_0.gif"; break; 112 | case WeatherStatus.Duoyun: url += "a_1.gif"; break; 113 | case WeatherStatus.Yin: url += "a_2.gif"; break; 114 | case WeatherStatus.Zhenyu: url += "a_3.gif"; break; 115 | case WeatherStatus.Leizhenyu: url += "a_4.gif"; break; 116 | case WeatherStatus.LeizhenyuBingpao: url += "a_5.gif"; break; 117 | case WeatherStatus.Yujiaxue: url += "a_6.gif"; break; 118 | case WeatherStatus.Xiaoyu: url += "a_7.gif"; break; 119 | case WeatherStatus.Zhongyu: url += "a_8.gif"; break; 120 | case WeatherStatus.Dayu: url += "a_9.gif"; break; 121 | case WeatherStatus.Baoyu: url += "a_10.gif"; break; 122 | case WeatherStatus.Dabaoyu: url += "a_11.gif"; break; 123 | case WeatherStatus.Tedabaoyu: url += "a_12.gif"; break; 124 | case WeatherStatus.Zhenxue: url += "a_13.gif"; break; 125 | case WeatherStatus.Xiaoxue: url += "a_14.gif"; break; 126 | case WeatherStatus.Zhongxue: url += "a_15.gif"; break; 127 | case WeatherStatus.Daxue: url += "a_16.gif"; break; 128 | case WeatherStatus.Baoxue: url += "a_17.gif"; break; 129 | case WeatherStatus.Wu: url += "a_18.gif"; break; 130 | case WeatherStatus.Dongyu: url += "a_19.gif"; break; 131 | case WeatherStatus.Shachenbao: url += "a_20.gif"; break; 132 | case WeatherStatus.XiaoyuZhuangZhongyu: url += "a_21.gif"; break; 133 | case WeatherStatus.ZhongyuZhuangDayu: url += "a_22.gif"; break; 134 | case WeatherStatus.DayuZhuangBaoyu: url += "a_23.gif"; break; 135 | case WeatherStatus.BaoyuZhuangDabaoyu: url += "a_24.gif"; break; 136 | case WeatherStatus.DabaoyuZhuangTedabaoyu: url += "a_25.gif"; break; 137 | case WeatherStatus.XiaoxueZhuangZhongxue: url += "a_26.gif"; break; 138 | case WeatherStatus.ZhongxueZhuangDaxue: url += "a_27.gif"; break; 139 | case WeatherStatus.DaxueZhuangBaoxue: url += "a_28.gif"; break; 140 | case WeatherStatus.Fuchen: url += "a_29.gif"; break; 141 | case WeatherStatus.Yasha: url += "a_30.gif"; break; 142 | case WeatherStatus.Qiangshachenbao: url += "a_31.gif"; break; 143 | case WeatherStatus.Xiaodaozhongyu: url += "a_21.gif"; break; 144 | case WeatherStatus.Zhongdaodayu: url += "a_22.gif"; break; 145 | case WeatherStatus.Dadaobaoyu: url += "a_23.gif"; break; 146 | case WeatherStatus.Xiaodaozhongxue: url += "a_26.gif"; break; 147 | case WeatherStatus.Zhongdaodaxue: url += "a_27.gif"; break; 148 | case WeatherStatus.Dadaobaoxue: url += "a_28.gif"; break; 149 | case WeatherStatus.Xiaozhenyu: url += "a_3.gif"; break; 150 | case WeatherStatus.Yintian: url += "a_2.gif"; break; 151 | case WeatherStatus.Mai: url += "a_18.gif"; break; 152 | case WeatherStatus.Wumai: url += "a_18.gif"; break; 153 | default: url += "a_nothing.gif"; break; 154 | } 155 | return url; 156 | } 157 | 158 | 159 | } 160 | 161 | 162 | 163 | /// 164 | /// 天气状态 165 | /// 166 | public enum WeatherStatus 167 | { 168 | /// 169 | /// 未知 170 | /// 171 | Weizhi, 172 | /// 173 | /// 晴 174 | /// 175 | Qing, 176 | /// 177 | /// 多云 178 | /// 179 | Duoyun, 180 | /// 181 | /// 阴 182 | /// 183 | Yin, 184 | /// 185 | /// 阵雨 186 | /// 187 | Zhenyu, 188 | /// 189 | /// 雷阵雨 190 | /// 191 | Leizhenyu, 192 | /// 193 | /// 雷阵雨并伴有冰雹 194 | /// 195 | LeizhenyuBingpao, 196 | /// 197 | /// 雨夹雪 198 | /// 199 | Yujiaxue, 200 | /// 201 | /// 小雨 202 | /// 203 | Xiaoyu, 204 | /// 205 | /// 中雨 206 | /// 207 | Zhongyu, 208 | /// 209 | /// 大雨 210 | /// 211 | Dayu, 212 | /// 213 | /// 暴雨 214 | /// 215 | Baoyu, 216 | /// 217 | /// 大暴雨 218 | /// 219 | Dabaoyu, 220 | /// 221 | /// 特大暴雨 222 | /// 223 | Tedabaoyu, 224 | /// 225 | /// 阵雪 226 | /// 227 | Zhenxue, 228 | /// 229 | /// 小雪 230 | /// 231 | Xiaoxue, 232 | /// 233 | /// 中雪 234 | /// 235 | Zhongxue, 236 | /// 237 | /// 大雪 238 | /// 239 | Daxue, 240 | /// 241 | /// 暴雪 242 | /// 243 | Baoxue, 244 | /// 245 | /// 雾 246 | /// 247 | Wu, 248 | /// 249 | /// 冻雨 250 | /// 251 | Dongyu, 252 | /// 253 | /// 沙尘暴 254 | /// 255 | Shachenbao, 256 | /// 257 | /// 小雨-中雨 258 | /// 259 | XiaoyuZhuangZhongyu, 260 | /// 261 | /// 中雨-大雨 262 | /// 263 | ZhongyuZhuangDayu, 264 | /// 265 | /// 大雨-暴雨 266 | /// 267 | DayuZhuangBaoyu, 268 | /// 269 | /// 大雨-大暴雨 270 | /// 271 | BaoyuZhuangDabaoyu, 272 | /// 273 | /// 大暴雨-特大暴雨 274 | /// 275 | DabaoyuZhuangTedabaoyu, 276 | /// 277 | /// 小雪-中雪 278 | /// 279 | XiaoxueZhuangZhongxue, 280 | /// 281 | /// 中雪-大雪 282 | /// 283 | ZhongxueZhuangDaxue, 284 | /// 285 | /// 大雪-暴雪 286 | /// 287 | DaxueZhuangBaoxue, 288 | /// 289 | /// 浮尘 290 | /// 291 | Fuchen, 292 | /// 293 | /// 扬沙 294 | /// 295 | Yasha, 296 | /// 297 | /// 强沙尘暴 298 | /// 299 | Qiangshachenbao, 300 | /// 301 | /// 小到中雨 302 | /// 303 | Xiaodaozhongyu, 304 | /// 305 | /// 中到大雨 306 | /// 307 | Zhongdaodayu, 308 | /// 309 | /// 大到暴雨 310 | /// 311 | Dadaobaoyu, 312 | /// 313 | /// 小到中雪 314 | /// 315 | Xiaodaozhongxue, 316 | /// 317 | /// 中到大雪 318 | /// 319 | Zhongdaodaxue, 320 | /// 321 | /// 大到暴雪 322 | /// 323 | Dadaobaoxue, 324 | /// 325 | /// 小阵雨 326 | /// 327 | Xiaozhenyu, 328 | /// 329 | /// 阴天 330 | /// 331 | Yintian, 332 | /// 333 | /// 霾 334 | /// 335 | Mai, 336 | /// 337 | /// 雾霾 338 | /// 339 | Wumai 340 | } 341 | 342 | } 343 | -------------------------------------------------------------------------------- /Weather/WeatherDay.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Weather/WeatherDayMore.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Weather 2 | { 3 | partial class WeatherDayMore 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region 组件设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要修改 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 32 | this.labelDay = new System.Windows.Forms.Label(); 33 | this.pictureBoxWeather = new System.Windows.Forms.PictureBox(); 34 | this.labelInfo = new System.Windows.Forms.Label(); 35 | this.labelWind1 = new System.Windows.Forms.Label(); 36 | this.labelTemp = new System.Windows.Forms.Label(); 37 | this.labelWind2 = new System.Windows.Forms.Label(); 38 | this.tableLayoutPanel.SuspendLayout(); 39 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWeather)).BeginInit(); 40 | this.SuspendLayout(); 41 | // 42 | // tableLayoutPanel 43 | // 44 | this.tableLayoutPanel.ColumnCount = 7; 45 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 110F)); 46 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 30F)); 47 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 48 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 140F)); 49 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 140F)); 50 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 140F)); 51 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 140F)); 52 | this.tableLayoutPanel.Controls.Add(this.labelDay, 0, 0); 53 | this.tableLayoutPanel.Controls.Add(this.pictureBoxWeather, 1, 0); 54 | this.tableLayoutPanel.Controls.Add(this.labelWind1, 5, 0); 55 | this.tableLayoutPanel.Controls.Add(this.labelInfo, 3, 0); 56 | this.tableLayoutPanel.Controls.Add(this.labelTemp, 4, 0); 57 | this.tableLayoutPanel.Controls.Add(this.labelWind2, 6, 0); 58 | this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; 59 | this.tableLayoutPanel.Location = new System.Drawing.Point(0, 0); 60 | this.tableLayoutPanel.Name = "tableLayoutPanel"; 61 | this.tableLayoutPanel.RowCount = 1; 62 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); 63 | this.tableLayoutPanel.Size = new System.Drawing.Size(728, 28); 64 | this.tableLayoutPanel.TabIndex = 0; 65 | // 66 | // labelDay 67 | // 68 | this.labelDay.BackColor = System.Drawing.Color.LightGray; 69 | this.labelDay.Dock = System.Windows.Forms.DockStyle.Fill; 70 | this.labelDay.Location = new System.Drawing.Point(0, 0); 71 | this.labelDay.Margin = new System.Windows.Forms.Padding(0); 72 | this.labelDay.Name = "labelDay"; 73 | this.labelDay.Size = new System.Drawing.Size(110, 28); 74 | this.labelDay.TabIndex = 1; 75 | this.labelDay.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 76 | // 77 | // pictureBoxWeather 78 | // 79 | this.pictureBoxWeather.Dock = System.Windows.Forms.DockStyle.Fill; 80 | this.pictureBoxWeather.Location = new System.Drawing.Point(110, 0); 81 | this.pictureBoxWeather.Margin = new System.Windows.Forms.Padding(0); 82 | this.pictureBoxWeather.Name = "pictureBoxWeather"; 83 | this.pictureBoxWeather.Size = new System.Drawing.Size(30, 28); 84 | this.pictureBoxWeather.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; 85 | this.pictureBoxWeather.TabIndex = 5; 86 | this.pictureBoxWeather.TabStop = false; 87 | // 88 | // labelInfo 89 | // 90 | this.labelInfo.Dock = System.Windows.Forms.DockStyle.Fill; 91 | this.labelInfo.Location = new System.Drawing.Point(160, 0); 92 | this.labelInfo.Margin = new System.Windows.Forms.Padding(0); 93 | this.labelInfo.Name = "labelInfo"; 94 | this.labelInfo.Size = new System.Drawing.Size(140, 28); 95 | this.labelInfo.TabIndex = 6; 96 | this.labelInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 97 | // 98 | // labelWind1 99 | // 100 | this.labelWind1.Dock = System.Windows.Forms.DockStyle.Fill; 101 | this.labelWind1.Location = new System.Drawing.Point(440, 0); 102 | this.labelWind1.Margin = new System.Windows.Forms.Padding(0); 103 | this.labelWind1.Name = "labelWind1"; 104 | this.labelWind1.Size = new System.Drawing.Size(140, 28); 105 | this.labelWind1.TabIndex = 9; 106 | this.labelWind1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 107 | // 108 | // labelTemp 109 | // 110 | this.labelTemp.Dock = System.Windows.Forms.DockStyle.Fill; 111 | this.labelTemp.Location = new System.Drawing.Point(300, 0); 112 | this.labelTemp.Margin = new System.Windows.Forms.Padding(0); 113 | this.labelTemp.Name = "labelTemp"; 114 | this.labelTemp.Size = new System.Drawing.Size(140, 28); 115 | this.labelTemp.TabIndex = 10; 116 | this.labelTemp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 117 | // 118 | // labelWind2 119 | // 120 | this.labelWind2.Dock = System.Windows.Forms.DockStyle.Fill; 121 | this.labelWind2.Location = new System.Drawing.Point(580, 0); 122 | this.labelWind2.Margin = new System.Windows.Forms.Padding(0); 123 | this.labelWind2.Name = "labelWind2"; 124 | this.labelWind2.Size = new System.Drawing.Size(148, 28); 125 | this.labelWind2.TabIndex = 9; 126 | this.labelWind2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; 127 | // 128 | // WeatherDayMore 129 | // 130 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 131 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 132 | this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 133 | this.Controls.Add(this.tableLayoutPanel); 134 | this.MaximumSize = new System.Drawing.Size(730, 30); 135 | this.MinimumSize = new System.Drawing.Size(730, 30); 136 | this.Name = "WeatherDayMore"; 137 | this.Size = new System.Drawing.Size(728, 28); 138 | this.tableLayoutPanel.ResumeLayout(false); 139 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxWeather)).EndInit(); 140 | this.ResumeLayout(false); 141 | 142 | } 143 | 144 | #endregion 145 | 146 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; 147 | private System.Windows.Forms.Label labelDay; 148 | private System.Windows.Forms.PictureBox pictureBoxWeather; 149 | private System.Windows.Forms.Label labelInfo; 150 | private System.Windows.Forms.Label labelWind1; 151 | private System.Windows.Forms.Label labelTemp; 152 | private System.Windows.Forms.Label labelWind2; 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /Weather/WeatherDayMore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Drawing; 5 | using System.Data; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace Weather 12 | { 13 | public partial class WeatherDayMore : UserControl 14 | { 15 | public WeatherDayMore() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | string day; 21 | [Category("设置")] 22 | [Description("设置或获得日期")] 23 | [DefaultValue("")] 24 | public string Day 25 | { 26 | set 27 | { 28 | this.day = value; 29 | this.labelDay.Text = this.day; 30 | } 31 | get 32 | { 33 | return this.day; 34 | } 35 | } 36 | string info; 37 | [Category("设置")] 38 | [Description("设置或获得天气信息")] 39 | [DefaultValue("")] 40 | public string Info 41 | { 42 | set 43 | { 44 | this.info = value; 45 | this.labelInfo.Text = this.info; 46 | } 47 | get 48 | { 49 | return this.info; 50 | } 51 | } 52 | 53 | string temperature; 54 | [Category("设置")] 55 | [Description("设置或获得温度")] 56 | public string Temperature 57 | { 58 | set 59 | { 60 | this.temperature = value; 61 | this.labelTemp.Text = this.temperature; 62 | } 63 | get 64 | { 65 | return this.temperature; 66 | } 67 | } 68 | 69 | 70 | string wind1; 71 | [Category("设置")] 72 | [Description("设置或获得风级1")] 73 | [DefaultValue("")] 74 | public string Wind1 75 | { 76 | set 77 | { 78 | this.wind1 = value; 79 | this.labelWind1.Text = this.wind1; 80 | } 81 | get 82 | { 83 | return this.wind1; 84 | } 85 | } 86 | 87 | string wind2; 88 | [Category("设置")] 89 | [Description("设置或获得风级2")] 90 | [DefaultValue("")] 91 | public string Wind2 92 | { 93 | set 94 | { 95 | this.wind2 = value; 96 | this.labelWind2.Text = this.wind2; 97 | } 98 | get 99 | { 100 | return this.wind2; 101 | } 102 | } 103 | 104 | WeatherStatus status = WeatherStatus.Weizhi; 105 | [Category("设置")] 106 | [Description("设置或获得天气图标")] 107 | [DefaultValue(WeatherStatus.Weizhi)] 108 | public WeatherStatus WeatherStatus 109 | { 110 | set 111 | { 112 | this.status = value; 113 | this.pictureBoxWeather.ImageLocation = this.GetSmallWeatherStatusString(this.status); 114 | } 115 | get 116 | { 117 | return this.status; 118 | } 119 | } 120 | 121 | string GetSmallWeatherStatusString(WeatherStatus weatherStatus) 122 | { 123 | string url = "http://www.webxml.com.cn/images/weather/"; 124 | switch (weatherStatus) 125 | { 126 | case WeatherStatus.Weizhi: url += "nothing.gif"; break; 127 | case WeatherStatus.Qing: url += "0.gif"; break; 128 | case WeatherStatus.Duoyun: url += "1.gif"; break; 129 | case WeatherStatus.Yin: url += "2.gif"; break; 130 | case WeatherStatus.Zhenyu: url += "3.gif"; break; 131 | case WeatherStatus.Leizhenyu: url += "4.gif"; break; 132 | case WeatherStatus.LeizhenyuBingpao: url += "5.gif"; break; 133 | case WeatherStatus.Yujiaxue: url += "6.gif"; break; 134 | case WeatherStatus.Xiaoyu: url += "7.gif"; break; 135 | case WeatherStatus.Zhongyu: url += "8.gif"; break; 136 | case WeatherStatus.Dayu: url += "9.gif"; break; 137 | case WeatherStatus.Baoyu: url += "10.gif"; break; 138 | case WeatherStatus.Dabaoyu: url += "11.gif"; break; 139 | case WeatherStatus.Tedabaoyu: url += "12.gif"; break; 140 | case WeatherStatus.Zhenxue: url += "13.gif"; break; 141 | case WeatherStatus.Xiaoxue: url += "14.gif"; break; 142 | case WeatherStatus.Zhongxue: url += "15.gif"; break; 143 | case WeatherStatus.Daxue: url += "16.gif"; break; 144 | case WeatherStatus.Baoxue: url += "17.gif"; break; 145 | case WeatherStatus.Wu: url += "18.gif"; break; 146 | case WeatherStatus.Dongyu: url += "19.gif"; break; 147 | case WeatherStatus.Shachenbao: url += "20.gif"; break; 148 | case WeatherStatus.XiaoyuZhuangZhongyu: url += "21.gif"; break; 149 | case WeatherStatus.ZhongyuZhuangDayu: url += "22.gif"; break; 150 | case WeatherStatus.DayuZhuangBaoyu: url += "23.gif"; break; 151 | case WeatherStatus.BaoyuZhuangDabaoyu: url += "24.gif"; break; 152 | case WeatherStatus.DabaoyuZhuangTedabaoyu: url += "25.gif"; break; 153 | case WeatherStatus.XiaoxueZhuangZhongxue: url += "26.gif"; break; 154 | case WeatherStatus.ZhongxueZhuangDaxue: url += "27.gif"; break; 155 | case WeatherStatus.DaxueZhuangBaoxue: url += "28.gif"; break; 156 | case WeatherStatus.Fuchen: url += "29.gif"; break; 157 | case WeatherStatus.Yasha: url += "30.gif"; break; 158 | case WeatherStatus.Qiangshachenbao: url += "31.gif"; break; 159 | case WeatherStatus.Xiaodaozhongyu: url += "21.gif"; break; 160 | case WeatherStatus.Zhongdaodayu: url += "22.gif"; break; 161 | case WeatherStatus.Dadaobaoyu: url += "23.gif"; break; 162 | case WeatherStatus.Xiaodaozhongxue: url += "26.gif"; break; 163 | case WeatherStatus.Zhongdaodaxue: url += "27.gif"; break; 164 | case WeatherStatus.Dadaobaoxue: url += "28.gif"; break; 165 | case WeatherStatus.Xiaozhenyu: url += "3.gif"; break; 166 | case WeatherStatus.Yintian: url += "2.gif"; break; 167 | case WeatherStatus.Mai: url += "18.gif"; break; 168 | case WeatherStatus.Wumai: url += "18.gif"; break; 169 | default: url += "nothing.gif"; break; 170 | } 171 | return url; 172 | } 173 | } 174 | } 175 | -------------------------------------------------------------------------------- /Weather/WeatherDayMore.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Weather/WeatherDetail.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.IO; 6 | using System.Net; 7 | using System.Text.RegularExpressions; 8 | 9 | namespace Weather 10 | { 11 | class WeatherDetail 12 | { 13 | public PlaceModel province; 14 | public PlaceModel city; 15 | public PlaceModel district; 16 | public WeatherDetail(PlaceModel province,PlaceModel city,PlaceModel district) 17 | { 18 | this.province = province; 19 | this.city = city; 20 | this.district = district; 21 | } 22 | public string[] Day_1To7 { private set; get; } 23 | public string[] Day_7To15 { private set; get; } 24 | public string[] Info_1To7 { private set; get; } 25 | public string[] Info_7To15 { private set; get; } 26 | public string[] Temperature_1To7 { private set; get; } 27 | public string[] Temperature_7To15 { private set; get; } 28 | public string [] Wind_1To7 { private set; get; } 29 | public string [] Wind1_7To15 { private set; get; } 30 | public string[] Wind2_7To15 { private set; get; } 31 | public WeatherStatus[] WeatherStatus_1To7 { private set; get; } 32 | public WeatherStatus[] WeatherStatus_7To15 { private set; get; } 33 | public void HandleWeather() 34 | { 35 | using (WebClient webClient = new WebClient() { Encoding = Encoding.UTF8}) 36 | { 37 | string url = $"http://www.weather.com.cn/weather/"; 38 | if (city.ID == "00") 39 | { 40 | url += $"{province.ID}{district.ID}{city.ID}.shtml"; 41 | } 42 | else if (district.ID.Length >2) 43 | { 44 | url += $"{district.ID}.shtml"; 45 | } 46 | else 47 | { 48 | url += $"{province.ID}{city.ID}{district.ID}.shtml"; 49 | } 50 | 51 | byte [] contentBytes = webClient.DownloadData(url); 52 | using (MemoryStream stream = new MemoryStream(contentBytes)) 53 | using(StreamReader reader = new StreamReader(stream)) 54 | { 55 | string content = reader.ReadToEnd(); 56 | MatchCollection matches = Regex.Matches(content, "
    .*?
", RegexOptions.Singleline); 57 | if(matches.Count > 0) 58 | { 59 | matches = Regex.Matches(matches[0].Value, "
  • ",RegexOptions.Singleline); 60 | if(matches.Count == 7) 61 | { 62 | List dayList = new List(); 63 | List infoList = new List(); 64 | List tempList = new List(); 65 | List windList = new List(); 66 | List statusList = new List(); 67 | MatchCollection matches_temp; 68 | foreach (Match match in matches) 69 | { 70 | //日期:31日(今日) 71 | matches_temp = Regex.Matches(match.Value, "

    .*?

    "); 72 | if (matches_temp.Count > 0) dayList.Add(RemoveAngleBrackets(matches_temp[0].Value)); 73 | else dayList.Add(""); 74 | //天气信息:晴 75 | matches_temp = Regex.Matches(match.Value, ""); 76 | if (matches_temp.Count > 0) 77 | { 78 | infoList.Add(RemoveAngleBrackets(matches_temp[0].Value)); 79 | WeatherStatus status = GetWeatherStatus(RemoveAngleBrackets(matches_temp[0].Value)); 80 | if(status == WeatherStatus.Weizhi) 81 | { 82 | status = GetUnkownWeatherStatus(RemoveAngleBrackets(matches_temp[0].Value)); 83 | } 84 | statusList.Add(status); 85 | } 86 | else 87 | { 88 | dayList.Add(""); 89 | statusList.Add(WeatherStatus.Weizhi); 90 | } 91 | //温度信息:4/-1℃ 92 | //风力信息:3-4级转3级 93 | matches_temp = Regex.Matches(match.Value, ".*?"); 94 | string temperature = ""; 95 | string wind = ""; 96 | if (matches_temp.Count > 0) 97 | { 98 | temperature = RemoveAngleBrackets(matches_temp[0].Value)+"℃"; 99 | } 100 | matches_temp = Regex.Matches(match.Value, ".*?"); 101 | if (matches_temp.Count >= 1) 102 | { 103 | temperature = string.IsNullOrEmpty(temperature) ? RemoveAngleBrackets(matches_temp[0].Value) : $"{temperature}/{RemoveAngleBrackets(matches_temp[0].Value)}"; 104 | } 105 | if(matches_temp.Count >= 2) 106 | { 107 | wind = RemoveAngleBrackets(matches_temp[1].Value); 108 | } 109 | tempList.Add(temperature); 110 | windList.Add(wind); 111 | } 112 | this.Day_1To7 = dayList.ToArray(); 113 | this.Info_1To7 = infoList.ToArray(); 114 | this.Temperature_1To7 = tempList.ToArray(); 115 | this.Wind_1To7 = windList.ToArray(); 116 | this.WeatherStatus_1To7 = statusList.ToArray(); 117 | } 118 | } 119 | } 120 | 121 | //More 122 | url = $"http://www.weather.com.cn/weather15d/"; 123 | if (city.ID == "00") 124 | { 125 | url += $"{province.ID}{district.ID}{city.ID}.shtml"; 126 | } 127 | else if (district.ID.Length > 2) 128 | { 129 | url += $"{district.ID}.shtml"; 130 | } 131 | else 132 | { 133 | url += $"{province.ID}{city.ID}{district.ID}.shtml"; 134 | } 135 | 136 | contentBytes = webClient.DownloadData(url); 137 | using (MemoryStream stream = new MemoryStream(contentBytes)) 138 | using (StreamReader reader = new StreamReader(stream)) 139 | //---- 140 | { 141 | string content = reader.ReadToEnd(); 142 | MatchCollection matches = Regex.Matches(content, "
      .*?
    ", RegexOptions.Singleline); 143 | if (matches.Count > 0) 144 | { 145 | matches = Regex.Matches(matches[0].Value, "", RegexOptions.Singleline); 146 | if (matches.Count == 8) 147 | { 148 | List dayList = new List(); 149 | List infoList = new List(); 150 | List tempList = new List(); 151 | List wind1List = new List(); 152 | List wind2List = new List(); 153 | List statusList = new List(); 154 | MatchCollection matches_temp; 155 | foreach (Match match in matches) 156 | { 157 | //日期:31日(今日) 158 | matches_temp = Regex.Matches(match.Value, ".*?"); 159 | if (matches_temp.Count > 0) dayList.Add(RemoveAngleBrackets(matches_temp[0].Value)); 160 | else dayList.Add(""); 161 | //天气信息:晴 162 | matches_temp = Regex.Matches(match.Value, ".*?"); 163 | if (matches_temp.Count > 0) 164 | { 165 | infoList.Add(RemoveAngleBrackets(matches_temp[0].Value)); 166 | WeatherStatus status = GetWeatherStatus(RemoveAngleBrackets(matches_temp[0].Value)); 167 | if (status == WeatherStatus.Weizhi) 168 | { 169 | status = GetUnkownWeatherStatus(RemoveAngleBrackets(matches_temp[0].Value)); 170 | } 171 | statusList.Add(status); 172 | } 173 | else 174 | { 175 | dayList.Add(""); 176 | statusList.Add(WeatherStatus.Weizhi); 177 | } 178 | //温度信息:4/-1℃ 179 | //风力信息:3-4级转3级 180 | matches_temp = Regex.Matches(match.Value, ""); 181 | if (matches_temp.Count > 0) tempList.Add(RemoveAngleBrackets(RemoveAngleBrackets(matches_temp[0].Value))); 182 | else tempList.Add(""); 183 | 184 | matches_temp = Regex.Matches(match.Value, ".*?"); 185 | if (matches_temp.Count > 0) wind1List.Add(RemoveAngleBrackets(matches_temp[0].Value)); 186 | else wind1List.Add(""); 187 | 188 | matches_temp = Regex.Matches(match.Value, ".*?"); 189 | if (matches_temp.Count > 0) wind2List.Add(RemoveAngleBrackets(matches_temp[0].Value)); 190 | else wind2List.Add(""); 191 | } 192 | this.Day_7To15 = dayList.ToArray(); 193 | this.Info_7To15 = infoList.ToArray(); 194 | this.Temperature_7To15 = tempList.ToArray(); 195 | this.Wind1_7To15 = wind1List.ToArray(); 196 | this.Wind2_7To15 = wind2List.ToArray(); 197 | this.WeatherStatus_7To15 = statusList.ToArray(); 198 | } 199 | } 200 | } 201 | //---- 202 | 203 | } 204 | } 205 | 206 | private string RemoveAngleBrackets(string input) 207 | { 208 | int firstStartIndex = input.IndexOf('<'); 209 | int firstEndIndex = input.IndexOf('>'); 210 | string result = input.Remove(firstStartIndex, firstEndIndex- firstStartIndex + 1); 211 | firstStartIndex = result.LastIndexOf('<'); 212 | firstEndIndex = result.LastIndexOf('>'); 213 | result = result.Remove(firstStartIndex, firstEndIndex- firstStartIndex + 1); 214 | return result; 215 | } 216 | 217 | private WeatherStatus GetWeatherStatus(string weatherInfo) 218 | { 219 | switch(weatherInfo) 220 | { 221 | case "晴": return WeatherStatus.Qing; 222 | case "多云": return WeatherStatus.Duoyun; 223 | case "阴": return WeatherStatus.Yin; 224 | case "阵雨": return WeatherStatus.Zhenyu; 225 | case "雷阵雨": return WeatherStatus.Leizhenyu; 226 | case "雷阵雨并伴有冰雹": return WeatherStatus.LeizhenyuBingpao; 227 | case "雨夹雪": return WeatherStatus.Yujiaxue; 228 | case "小雨": return WeatherStatus.Xiaoyu; 229 | case "中雨": return WeatherStatus.Zhongyu; 230 | case "大雨": return WeatherStatus.Dayu; 231 | case "暴雨": return WeatherStatus.Baoyu; 232 | case "大暴雨": return WeatherStatus.Dabaoyu; 233 | case "特大暴雨": return WeatherStatus.Tedabaoyu; 234 | case "阵雪": return WeatherStatus.Zhenxue; 235 | case "小雪": return WeatherStatus.Xiaoyu; 236 | case "中雪": return WeatherStatus.Zhongxue; 237 | case "大雪": return WeatherStatus.Daxue; 238 | case "暴雪": return WeatherStatus.Baoxue; 239 | case "雾": return WeatherStatus.Wu; 240 | case "冻雨": return WeatherStatus.Dongyu; 241 | case "沙尘暴": return WeatherStatus.Shachenbao; 242 | case "小雨转中雨": return WeatherStatus.XiaoyuZhuangZhongyu; 243 | case "中雨转大雨": return WeatherStatus.ZhongyuZhuangDayu; 244 | case "大雨转暴雨": return WeatherStatus.DayuZhuangBaoyu; 245 | case "暴雨转大暴雨": return WeatherStatus.BaoyuZhuangDabaoyu; 246 | case "大暴雨转特大暴雨": return WeatherStatus.DabaoyuZhuangTedabaoyu; 247 | case "小雪转中雪": return WeatherStatus.XiaoxueZhuangZhongxue; 248 | case "中雪转大雪": return WeatherStatus.ZhongxueZhuangDaxue; 249 | case "大雪转暴雪": return WeatherStatus.DaxueZhuangBaoxue; 250 | case "浮尘": return WeatherStatus.Fuchen; 251 | case "扬沙": return WeatherStatus.Yasha; 252 | case "强沙尘暴": return WeatherStatus.Qiangshachenbao; 253 | case "小到中雨": return WeatherStatus.Xiaodaozhongyu; 254 | case "中到大雨": return WeatherStatus.Zhongdaodayu; 255 | case "大到暴雨": return WeatherStatus.Dadaobaoyu; 256 | case "小到中雪": return WeatherStatus.Xiaodaozhongxue; 257 | case "中到大雪": return WeatherStatus.Zhongdaodaxue; 258 | case "大到暴雪": return WeatherStatus.Dadaobaoxue; 259 | case "小阵雨": return WeatherStatus.Xiaozhenyu; 260 | case "阴天": return WeatherStatus.Yintian; 261 | case "霾": return WeatherStatus.Mai; 262 | case "雾霾": return WeatherStatus.Wumai; 263 | default:return WeatherStatus.Weizhi; 264 | } 265 | } 266 | 267 | private WeatherStatus GetUnkownWeatherStatus(string weatherInfo) 268 | { 269 | string result = weatherInfo; 270 | 271 | int index = 0; 272 | if (result.Contains("间")) 273 | { 274 | index = result.IndexOf("间"); 275 | result = result.Remove(index, result.Length - index); 276 | } 277 | if(result.Contains("转")) 278 | { 279 | index = result.IndexOf("转"); 280 | result = result.Remove(index, result.Length - index); 281 | } 282 | 283 | if (result.Contains("雨")) return WeatherStatus.Xiaoyu; 284 | if (result.Contains("雪")) return WeatherStatus.Xiaoxue; 285 | if (result.Contains("雾")) return WeatherStatus.Wu; 286 | if (result.Contains("霾")) return WeatherStatus.Mai; 287 | 288 | return GetWeatherStatus(result); 289 | } 290 | } 291 | } 292 | -------------------------------------------------------------------------------- /Weather/XmlOperator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.IO; 6 | using System.Xml.Serialization; 7 | 8 | namespace Weather 9 | { 10 | class XmlOperator 11 | { 12 | public static void Serialize(string fileName, T instance) 13 | { 14 | XmlSerializer xmlSerializer = new XmlSerializer(typeof(T)); 15 | using (FileStream stream = new FileStream(fileName, FileMode.Create)) 16 | { 17 | xmlSerializer.Serialize(stream, instance); 18 | } 19 | } 20 | 21 | public static T Deserialize(string fileName) 22 | { 23 | if (!File.Exists(fileName)) return default(T); 24 | XmlSerializer xmlSerializer = new XmlSerializer(typeof(T)); 25 | using (FileStream stream = new FileStream(fileName, FileMode.Open)) 26 | { 27 | return (T)xmlSerializer.Deserialize(stream); 28 | } 29 | } 30 | } 31 | 32 | public class AreaCollection 33 | { 34 | public Area[] Areas { set; get; } 35 | 36 | public void Add(Area area) 37 | { 38 | if (this.Areas == null) this.Areas = new Area[0]; 39 | List list = this.Areas.ToList(); 40 | if(!list.Contains(area)) 41 | { 42 | list.Add(area); 43 | this.Areas = list.ToArray(); 44 | } 45 | } 46 | 47 | public void Remove(Area area) 48 | { 49 | if (this.Areas == null) this.Areas = new Area[0]; 50 | List list = this.Areas.ToList(); 51 | if (list.Contains(area)) 52 | { 53 | list.Remove(area); 54 | this.Areas = list.ToArray(); 55 | } 56 | } 57 | 58 | } 59 | 60 | public class Area:IEquatable 61 | { 62 | public string Name { set; get; } 63 | 64 | public PlaceModel Province { set; get; } 65 | public PlaceModel City { set; get; } 66 | public PlaceModel District { set; get; } 67 | 68 | 69 | public bool Equals(Area other) 70 | { 71 | if (this.Name == other.Name && this.Province.Equals(other.Province) && this.City.Equals(other.City) && this.District.Equals(other.District)) 72 | return true; 73 | return false; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Weather/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnxy/Weather/e2e4277a71194fbc9dfe94f346b441673cfbb648/Weather/logo.ico -------------------------------------------------------------------------------- /Weather/pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cnxy/Weather/e2e4277a71194fbc9dfe94f346b441673cfbb648/Weather/pic.png -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal --------------------------------------------------------------------------------