Click here to Skip to main content
15,896,726 members

sunweichao - Professional Profile



Summary

    Blog RSS
15
Authority
6
Debator
1
Enquirer
98
Organiser
425
Participant
0
Author
0
Editor
This member doesn't quite have enough reputation to be able to display their biography and homepage.

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
General解决路径名中不能有空格的问题 Pin
sunweichao15-Dec-10 15:13
sunweichao15-Dec-10 15:13 
这几天做一个通讯程序,要通过“运行”开启一个进程
结果有时候可以正常调用,有时候就出现问题
出问题代码如下:

Process p=Process.Start(t_path.Text.ToString(),t_file.Text.ToString());
Process.start()第一个参数是运行的程序名称,后面是该程序参数

如果这两个路径中不含空格的时候就可以正常运行,
如果包含像"D:\Program Files\"或者"G:\Documents and Settings"之类的路径程序就会出问题
原因是在运行行里面 如果运行的程序只接收一个参数,参数里面夹一个空格就相当于回车
也就是说,如果运行输入:c:\aa.exe d:\Program Files\tt.txt
其实运行的是:c:\aa.exe d:\Program
这样肯定会出错了

正确的写法应该是:
Process p=Process.Start("\""+t_path.Text.ToString()+"\"","\""+t_file.Text.ToString()+"\"");

这种写法绝对保险。
GeneralIP Address Input Validation Control In WPF Pin
sunweichao13-Nov-10 14:11
sunweichao13-Nov-10 14:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.