Example #1
0
        /// <summary>
        /// обработка нажатия клавиш в главном меню
        /// </summary>
        public void OperationMenu()
        {
            WorkKeys.Doing act = WorkKeys.Navigation(ref select_position, len_menu);
            switch (act)
            {
            case WorkKeys.Doing.doit: SubMenu(); break;

            case WorkKeys.Doing.exit: workflag = false; break;
            }
        }
Example #2
0
        /// <summary>
        /// Дополнительные действия с элементом
        /// </summary>
        public void SubMenu()
        {
            int position = 0;

            string[,] subarr = list[select_position].SubMenu();
            int    rows        = subarr.GetUpperBound(0);
            bool   subworkflag = true;
            string todo        = "";

            while (subworkflag)
            {
                PrintSubMenu(subarr, position);
                WorkKeys.Doing act = WorkKeys.Navigation(ref position, rows);
                switch (act)
                {
                case WorkKeys.Doing.exit: subworkflag = false; break;

                case WorkKeys.Doing.doit: todo = subarr[position, 1]; subworkflag = false; break;
                }
            }

            switch (todo)
            {
            case "open": list[select_position].OpenElement(ref start_directory); break;

            case "copy": AddToCopyList(list[select_position]); break;

            case "delete": list[select_position].DeleteElement(); break;

            case "info": PrintInfo(list[select_position].Info());  break;

            case "backfold": list[select_position].OpenParentDir(ref start_directory); break;

            case "selectcopy": SelectCopyList(); break;

            case "paste": PasteCopyList(); break;

            case "clear": ClearCopyList(); break;
            }
        }