When I access the Internet through Ubuntu at night, I see an article "Download bus routes for major cities" in the garden. The blogger provides an EXE which is not running in Linux, I think of developing one with GTK # in mono. The key code blogger has provided it, and all of them have the following. First:
I have heard that. Net has a mono implementation in Linux, but it has never been used. I just took this opportunity to play.
Open monodevelop, create a GTK # project, and use the visualization GUI Design Tool provided by monodevelop. Drag several controls according to the pictures of the blogger, and then start.
Copy the provided Code directly, add several modules to the reference, and then search for two regular expressions that the landlord did not provide on the Internet.
After several simple syntax errors, the compilation is successful after the modification.
I am so excited that I have to run it quickly and there is no result.
After debugging, we found garbled characters and set the character encoding.
Webdownloader. Encoding = system. Text. encoding. getencoding ("GBK ");
OK. The result of this operation will be available.
There are still many other functions that haven't been added, but I have already succeeded in Nanjing.
There are several issues left over:
1. I only moved from Nanjing to another city. I can directly modify the code without associating it with the drop-down list box.
2. Download 93 pages, sometimes hanging in the middle. I don't know if the speed is slow or the thread cannot be written in Linux.
3. Do not know the event corresponding to the onshow form in GTK.
The above two questions are the ones familiar with monodevelop. Learn from them.
The program source code is attached: who is interested in improving busstation? Let me learn.