Source code modification-menu

Source: Internet
Author: User

Using system;
Using system. Collections. Generic;

Namespace source code modification
{
Public Enum command
{
R,
W,
C,
H,
Q,
Wrongcommand
}

Static public Class Menu
{
Static private string introduce =
"When there are too many attempts, there are still too many attempts when there are too many attempts when creating too many \ n" +
"Please place this program in the source code root folder \ n" +
"Enter the corresponding command character for the operation: \ n" +
"When there are too many threads, there are too many other threads, too many threads, too many threads ";
Static private string infoaboutcommand =
"When there are too many attempts, there are still too many attempts when there are too many attempts when creating too many \ n" +
"Codecr-generate the document to be translated Based on Source Code \ n" +
"Drawing w-modify source code \ n according to translated documents" +
"C-change source code encoding to UTF-8 \ n" +
"H-view HELP \ n" +
"┃ Q-exit program \ n" +
"When there are too many threads, there are too many other threads, too many threads, too many threads ";
Static private string erroraboutcommand =
"Too many threads have been transferred too many times when there are too many threads running \ n" +
"Invalid token command! \ N "+
"When there are too many threads, there are too many threads, too many threads ";
Static private string infotopacify =
"Too many threads have been transferred too many times when there are too many threads running \ n" +
"Processing... \ n" +
"When there are too many threads, there are too many threads, too many threads ";
Static private string infocommandrexcutedsuccessfully =
"Too many threads have been transferred too many times when there are too many threads running \ n" +
"Success: constantstring.txt is generated in the current directory! \ N "+
"When there are too many threads, there are too many threads, too many threads ";
Static private string infocommandwexcutedsuccessfullyparta =
"Too many threads have been transferred too many times when there are too many threads running \ n" +
"Success: constantstring.txt has completed source code ";
Static private string infocommandwexcutedsuccessfullypartb =
"Modify \ n" +
"When there are too many threads, there are too many threads, too many threads ";
Static private string infocommandcexcutedsuccessfullyparta =
"Too many threads have been transferred too many times when there are too many threads running \ n" +
"Success ";
Static private string infocommandcexcutedsuccessfullypartb =
"Source code file encoding method changed to UTF-8 \ n" +
"When there are too many threads, there are too many threads, too many threads ";
Static private string infohasnotfounddocument =
"Too many threads have been written into our records when there are too many threads \ n "+
"Failed: failed to modify source code! \ N "+
"Cause: constantstring.txt \ n" + not found in the directory of the program
"When there are too many threads, there are too many threads between them. When there are too many threads between them, there are too many threads between them. When there are too many threads between them, there are too many threads between them ";
Static private string infowrongformat =
"Too many threads have been written into our records when there are too many threads \ n "+
"Failed: failed to modify source code! \ N "+
"Cause of conflict: constantstring.txt format error! \ N "+
"When there are too many threads, there are too many threads between them. When there are too many threads between them, there are too many threads between them. When there are too many threads between them, there are too many threads between them ";
Static private string infofoundanexistentdocument =
"Too many threads have been written into our records when there are too many threads \ n "+
"Failed: constantstring.txt generation failed! \ N "+
"Cause: the format of constantstring.txt already exists in the current directory! \ N "+
"When there are too many threads, there are too many threads between them. When there are too many threads between them, there are too many threads between them. When there are too many threads between them, there are too many threads between them ";
Static private string infoexit =
"Too many threads have been transferred too many times when there are too many threads running \ n" +
"Quit press any key to exit the program... \ n" +
"When there are too many threads, there are too many threads, too many threads ";
Static private string infohelp =
"Too many threads have been transferred too many times when there are too many threads running \ n" +
"Please refer to the help documentation help.txt \ n" +
"When there are too many threads, there are too many threads, too many threads ";

Static public void showintroduce ()
{
Console. writeline (introduce );
}

Static public void showcommand ()
{
Console. writeline (infoaboutcommand );
}

Static public void showerroraboutcommand ()
{
Console. writeline ("\ n" + erroraboutcommand );
}

Static public void showpacify ()
{
Console. writeline ("\ n" + infotopacify );
}

Static public void showcommandrexcutedsuccessfully ()
{
Console. writeline (infocommandrexcutedsuccessfully );
}

Static public void showcommandwexcutedsuccessfully (INT amountofchanges)
{
Console. writeline (infocommandwexcutedsuccessfullyparta + amountofchanges + infocommandwexcutedsuccessfullypartb );
}

Static public void showcommandcexcutedsuccessfully (INT amountofconverted)
{
Console. writeline (infocommandcexcutedsuccessfullyparta + amountofconverted + infocommandcexcutedsuccessfullypartb );
}

Static public void showhasnotfounddocument ()
{
Console. writeline (infohasnotfounddocument );
Console. Write ('\ ');
}

Static public void showerroronformat ()
{
Console. writeline (infowrongformat );
Console. Write ('\ ');
}

Static public void showfoundanexistentdocument ()
{
Console. writeline (infofoundanexistentdocument );
Console. Write ('\ ');
}

Static public void showexit ()
{
Console. writeline (infoexit );
}

Static public void waitforexit ()
{
Console. readkey ();
}

Static public void showHelp ()
{
Console. writeline ("\ n" + infohelp );
}

Static public command getcommand ()
{
Char command = console. readkey (). keychar;
Command = Char. toupper (command );

If (command = Char. parse (command. R. tostring ()))
Return command. R;
Else if (command = Char. parse (command. W. tostring ()))
Return command. W;
Else if (command = Char. parse (command. C. tostring ()))
Return command. C;
Else if (command = Char. parse (command. H. tostring ()))
Return command. h;
Else if (command = Char. parse (command. Q. tostring ()))
Return command. Q;
Else
Return command. wrongcommand;
}
}
}

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.