예제 #1
0
파일: Program.cs 프로젝트: 152056231/work
        static void Main(string[] args)
        {
            Text           text     = new Text();
            Classification classify = new Classification();

            while (true)
            {
                Console.WriteLine("*************************************************************");
                Console.WriteLine("*                                                           *");
                Console.WriteLine("*           1:新建笔记          2:打开笔记                 *");
                Console.WriteLine("*           3:新建分类          4:管理分类                 *");
                Console.WriteLine("*           5:保存笔记          6:退出                     *");
                Console.WriteLine("*                                                           *");
                Console.WriteLine("*************************************************************");
                Console.WriteLine("请选择要执行的功能(1-6):");
                while (true)
                {
                    int option = int.Parse(Console.ReadLine());
                    switch (option)
                    {
                    case 1:
                        text.Createnote();
                        break;

                    case 2:
                        text.Opennote();
                        break;

                    case 3:
                        classify.CreateClassification();
                        break;

                    case 4:
                        classify.ManageClassification();
                        break;

                    case 5:
                        text.Savenote();
                        break;

                    case 6:
                        Environment.Exit(0);
                        break;

                    default:
                        Console.WriteLine("输入有误!");
                        break;
                    }
                }
            }
        }