原始碼修改-Program

來源:互聯網
上載者:User
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 原始碼修改{    class Program    {        static void Main(string[] args)        {            Menu.ShowIntroduce();            Command command ;            while (true)            {                Menu.ShowCommand();                command = Menu.GetCommand();                if (command == Command.R)                {                    Menu.ShowPacify();                    //  執行產生翻譯文檔邏輯                    ReadDocument readDocument = new ReadDocument();                    //  判斷是否已存在翻譯文檔                    if (!readDocument.HasFoundDocument)                    {                        //  建立一個翻譯文檔                        readDocument.CreateANewDocument();                    }                    //  判斷是否已有已存在格式正確的翻譯文檔                    if (readDocument.DocumentFormatIsOK)                    {                        readDocument.OverReading();                        Menu.ShowFoundAnExistentDocument();                        Menu.ShowExit();                        Menu.WaitForExit();                        return;                    }                    readDocument.OverReading();                    WriteDocument writeDocument = new WriteDocument();                    ReadSourceFile readSourceFile = new ReadSourceFile(writeDocument);                    TravelAllFiles trevel = new TravelAllFiles();                    trevel.Go(readSourceFile);                    writeDocument.OverWritting();                    Menu.ShowCommandRExcutedSuccessfully();                    Menu.ShowExit();                    Menu.WaitForExit();                    return;                }                else if (command == Command.W)                {                    Menu.ShowPacify();                    //  執行根據已翻譯文檔修改原始碼邏輯                    ReadDocument readDocument = new ReadDocument();                    if (!readDocument.HasFoundDocument)                    {                        Menu.ShowHasNotFoundDocument();                        Menu.ShowExit();                        Menu.WaitForExit();                        return;                    }                    if (!readDocument.DocumentFormatIsOK)                    {                        readDocument.OverReading();                        Menu.ShowErrorOnFormat();                        Menu.ShowExit();                        Menu.WaitForExit();                        return;                    }                    WriteSourceFile writeSourceFile = new WriteSourceFile(readDocument);                    TravelAllFiles travel = new TravelAllFiles();                    travel.Go(writeSourceFile);                    Menu.ShowCommandWExcutedSuccessfully(writeSourceFile.AmountOfChanges);                    Menu.ShowExit();                    Menu.WaitForExit();                    return;                }                else if (command == Command.C)                {                    Menu.ShowPacify();                    ConvertEncodingToUTF8 convert = new ConvertEncodingToUTF8() ;                    TravelAllFiles travel = new TravelAllFiles();                    travel.Go(convert);                    Menu.ShowCommandCExcutedSuccessfully(convert.AmountOfHasConverted);                    Menu.ShowExit();                    Menu.WaitForExit();                    return;                }                else if (command == Command.H)                {                    Menu.ShowHelp();                }                else if (command == Command.Q)                    return;                else                    Menu.ShowErrorAboutCommand();            }        }    }}

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.