C # mobile device development

Source: Internet
Author: User

1. How to get the file location:
String path = System. IO. Path. GetDirectoryName (System. Reflection. Assembly. GetExecutingAssembly (). GetName (). CodeBase );
Difference from WinForm Program Development: string Path = System. IO. Directory. GetCurrentDirectory ();

2. How to read text files: (use StreamReader)
Note that Unicode is supported in PPC, so the text file is first converted to Unicode encoding;
StreamReader myreader = new StreamReader (System. IO. Stream) File. OpenRead (filenameuser), System. Text. UnicodeEncoding. Unicode );
Differences from WinForm program development:
StreamReader myreader = new StreamReader (System. IO. Stream) File. OpenRead (filename), System. Text. Encoding. ASCII );

3. Notes for synchronizing data to PDA:
Microsoft ActiveSync, a synchronization software from Microsoft, is located at: Program Files // project name //........... so if you want to perform file operations
, Remember to synchronize the file to be operated to this directory;

4. the operation for reading XML from PDA is similar to that of WinForm, but some do not overwrite the XML file. Otherwise, the speed will be slow, mainly because of the memory and clock speed of PDA;

5. Interface Design: Because the screen of the PDA is not very large, we should arrange the screen properly when setting the interface. My consistent principle is: a main interface, provide connections or buttons for each interface on the main interface. do not perform operations such as Splitter on the PDA;

6. There are other issues to be aware!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.